text:
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright 2020 Google Inc. All rights reserved.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<androidx.constraintlayout.widget.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:title="UAMP"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/list"
        android:name="com.example.android.uamp.MediaItemFragment"
        style="@style/MediaItemList"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/toolbar"
        tools:context="com.example.android.uamp.fragments.MediaItemFragment"
        tools:listitem="@layout/fragment_mediaitem" />

    <ProgressBar
        android:id="@+id/loadingSpinner"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="@+id/list" />

    <ImageView
        android:id="@+id/networkError"
        android:layout_width="64dp"
        android:layout_height="64dp"
        android:layout_gravity="center"
        android:tint="@color/colorAccent"
        android:visibility="gone"
        app:layout_constraintTop_toBottomOf="@+id/loadingSpinner"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:srcCompat="@drawable/ic_signal_wifi_off_black_24dp" />

</androidx.constraintlayout.widget.ConstraintLayout>


text:
var bunyan = require('bunyan');
var log = bunyan.createLogger({name: 'db.js'});
var util = require('util');
var config = require("config");
function DB(cb){
	this.mongo = require('mongodb');
    this.mongoose = require('mongoose');
    var db_url = "mongodb://";
    if(config.mongoUser){
        db_url += config.mongoUser;
        if(config.mongoPass){
            db_url += ":" + config.mongoPass;
        }
        db_url += "@"
    }
    db_url += config.mongoHost
    if(config.mongoPort){
        db_url += ":" + config.mongoPort;
    }
    db_url += "/" + config.mongoDbName;
    log.info("db.js","connecting to",db_url)
    var db = this.mongoose.connect(db_url).connection;
    db.on("error",function(){
        log.error("db.js","mongo Connection error:",arguments)
        log.error("db.js","please ensure DB is functional: mongod --dbpath data/ --fork --logpath logs/mongo.log");
        cb.apply(this,arguments);
        process.exit();
    });
    db.once("open",function(){
        log.info("db.js","db connection open");
        this.db = db;
        this.User = require("./models/user");
        this.Chore = require("./models/chore");
        cb(null,db);
    });
}
DB.prototype.getUsers=function(ids,cb){
    if(ids){
        if(ids instanceof String){
            ids = [ids];
        }
        this.User.find({
            '_id': { $in: ids}
        }).exec(cb);
    }else{
        cb("ids must be set");
    }
}
module.exports = DB;

redpajama_set_name: RedPajamaGithub


text:
#ifndef vetor_H_
#define vetor_H_

/**
 * Estrutura que guarda um elemento de um vetor. Cada elemento contém uma string e uma prioridade (inteiro)
 */
typedef struct {
	int prioridade;
	char * valor;
} elemento;

/**
 * Estrutura que guarda dados relativos a um vetor de elementos.
 */
typedef struct {
	/* este campo diz o número de elementos correntemente no vetor */
	int tamanho_actual;
	/* este campo indica o tamanho maximo do vetor */
	int tamanho_maximo;

	/* vetor de apontadores para elementos */
	elemento ** elementos;
} vetor;

/**
 * variavel global (inicializada em vetor.c) que contabiliza o numero de vezes que maior_que é chamado
 */
extern int ncomparacoes;

/**
 * esta funcao cria um vetor vazio com o tamanho maximo especificado
 */
vetor * vetor_cria(int tamanho_maximo);

/**
 * esta funcao cria um vetor vazio com o tamanho maximo especificado + 1
 * para que os indices do heap comecem em 1
 */
vetor * vetor_criaHeap(int tamanho_maximo);

/**
 * esta funcao cria um elemento com o valor e prioridade especificados
 */
elemento * elemento_cria(int prioridade, const char * valor);

/**
 * esta funcao imprime o vetor passado como argumento no ecra
 */
void vetor_imprime(vetor * v);

/**
 * esta funcao imprime o heap passado como argumento no ecra
 */
void vetor_imprimeHeap(vetor * v);

/**
 * esta funcao retorna 1 caso o elemento e1 tenha prioridade maior que e2 ou 0 em qualquer dos outros casos (igual ou menor)
 */
int maior_que(elemento * e1, elemento * e2);

/**
 * esta funcao retorna 1 caso o elemento e1 tenha um valor "alfabeticamente superior" e2 ou 0 em qualquer dos outros casos (igual ou menor)
 */
int maior_que_HeapSort(elemento * e1, elemento * e2);

#endif /* vetor_H_ */


text:
package main // import "drive.upspin.io/cmd/upspin-setupstorage-drive"

import (
	"flag"
	"fmt"
	"log"
	"os"
	"path/filepath"
	"time"

	"upspin.io/subcmd"

	"drive.upspin.io/config"
	"golang.org/x/oauth2"
)

const help = `
setupstorage-drive is the second step in establishing an upspinserver,
It sets up Google Drive storage for your Upspin installation. You may
skip this step if you wish to store Upspin data on your server's local
disk.

The first step is 'setupdomain' and the final step is 'setupserver'.
setupstorage-drive will add the Upspin Drive Storage application to your
Drive account. It then writes the obtained OAuth2 token information to
$where/$domain/serviceaccount.json and updates the server configuration
files in that directory to use the selected account.

Simply follow the on-screen instructions which will guide you through the
process.
`

type state struct{ *subcmd.State }

func main() {
	const name = "setupstorage-drive"

	log.SetFlags(0)
	log.SetPrefix("upspin setupstorage-drive: ")

	where := flag.String("where", filepath.Join(os.Getenv("HOME"), "upspin", "deploy"), "`directory` to store private configuration files")
	domain := flag.String("domain", "", "domain `name` for this Upspin installation")

	s := &state{State: subcmd.NewState(name)}
	s.ParseFlags(flag.CommandLine, os.Args[1:], help, "setupstorage-drive -domain=<name>")
	if *domain == "" {
		s.Exitf("%s\nthe -domain flag must be provided")
	}

	tok := s.tokenFromWeb()
	cfgPath := filepath.Join(*where, *domain)
	cfg := s.ReadServerConfig(cfgPath)
	cfg.StoreConfig = []string{
		"backend=Drive",
		"accessToken=" + tok.AccessToken,
		"tokenType=" + tok.TokenType,
		"refreshToken=" + tok.RefreshToken,
		"expiry=" + tok.Expiry.Format(time.RFC3339),
	}
	s.WriteServerConfig(cfgPath, cfg)

	fmt.Fprintf(os.Stderr, "You should now deploy the upspinserver binary and run 'upspin setupserver'.\n")
	s.ExitNow()
}

// tokenFromWeb attempts to obtain an OAuth2 token via the web and returns it.
func (s *state) tokenFromWeb() *oauth2.Token {
	authURL := config.OAuth2.AuthCodeURL("state-token", oauth2.AccessTypeOffline)
	fmt.Printf("Open this URL in your browser to obtain an authorization code:\n\t%s\n", authURL)
	var code string
	fmt.Print("Auth code: ")
	if _, err := fmt.Scan(&code); err != nil {
		s.Exitf("unable to read authorization code %v", err)
	}
	tok, err := config.OAuth2.Exchange(oauth2.NoContext, code)
	if err != nil {
		s.Exitf("unable to retrieve token from web %v", err)
	}
	return tok
}


text:
module Scribble
  module Methods
    class Layout < Block
      register :layout, String, [Object, 1]

      def layout name, object = nil
        template.load(name, self).tap do |partial_context|
          raise Errors::NotFound.new("Layout partial '#{name}' not found #{@call.line_and_column}") if partial_context.nil?
          partial_context.set_variable name.to_sym, object if object
          @render_format = partial_context.format
        end.render
      end

      method :content

      def content
        render context: @context
      end

      def render_format
        @render_format || super
      end
    end
  end
end


text:
module ActiveMongoid
  module Associations
    module RecordRelation
      module Macros
        extend ActiveSupport::Concern

        module ClassMethods

          def belongs_to_record(name, options = {})
            meta = characterize_association(name, Referenced::In, options)
            reference_record(meta)
            relate_one_to_one_record(name, meta)
          end

          def has_one_record(name, options = {})
            meta = characterize_association(name, Referenced::One, options)
            relate_one_to_one_record(name, meta)
          end

          def has_many_records(name, options = {})
            meta = characterize_association(name, Referenced::Many, options)
            relate_record(name, meta)
            # document_ids_setter(name, metadata)
            # document_ids_getter(name, metadata)
          end

          private

          def reference_record(metadata)
            key = metadata.foreign_key
            if metadata.stores_foreign_key? && !fields.include?(key)
              field(
                key,
                type: Integer,
                default: metadata.foreign_key_default
              )
              if metadata.polymorphic?
                self.polymorphic = true
                field(metadata.inverse_type, type: String)
              end
            end
          end

          def relate_one_to_one_record(name, metadata)
            relate_record(name, metadata)
            record_builder(name, metadata)
            record_creator(name, metadata)
          end

          def relate_record(name, metadata)
            self.am_relations = am_relations.merge(name.to_s => metadata)
            record_getter(name, metadata)
            record_setter(name, metadata)
            autosave_records(metadata)
            dependent_records(metadata)
            existence_check(name)
          end

        end
      end

    end
  end
end


text:
package org.dcm4chee.web.war.tc;

import java.text.MessageFormat;
import java.util.List;

import org.apache.wicket.model.IModel;
import org.apache.wicket.model.util.ListModel;
import org.dcm4chee.web.war.config.delegate.WebCfgDelegate;
import org.dcm4chee.web.war.tc.TCViewPanel.AbstractTCViewTab;
import org.dcm4chee.web.war.tc.imageview.TCImageViewPanel;

/**
 * @author Bernhard Ableitinger <bernhard.ableitinger@agfa.com>
 * @version $Revision$ $Date$
 * @since Nov 30, 2011
 */
@SuppressWarnings("serial")
public class TCViewImagesTab extends AbstractTCViewTab
{
    public TCViewImagesTab(final String id, IModel<? extends TCObject> model,
    		TCAttributeVisibilityStrategy attrVisibilityStrategy) {
        super(id, model, attrVisibilityStrategy);
        add(new TCImageViewPanel("tc-view-images-panel",
                new ImagesModel()).setOutputMarkupId(true));
    }

    @Override
    public String getTabTitle()
    {
        List<TCReferencedImage> images = getTC().getReferencedImages();
        return MessageFormat.format(
                getString("tc.view.images.tab.title"),
                images!=null?images.size():0);
    }

    @Override
    public boolean isTabVisible() {
    	if (super.isTabVisible()) {
    		if (WebCfgDelegate.getInstance().isTCShowImagesInDialogEnabled()) {
    			return getAttributeVisibilityStrategy()
    					.isAttributeVisible(TCAttribute.Images);
    		}
    	}

    	return false;
    }

    @Override
    public boolean hasContent()
    {
        List<TCReferencedImage> images = getTC().getReferencedImages();
        return images!=null && !images.isEmpty();
    }

    @SuppressWarnings("serial")
	private class ImagesModel extends ListModel<TCReferencedStudy> {
    	@Override
    	public List<TCReferencedStudy> getObject() {
    		return getTC().getReferencedStudies();
    	}
    }

}


text:
"""
	servidor.py - Programa que ejecuta el servidor pyopcf@home

"""

from suds.client import Client
import random
from soaplib.wsgi_soap import SimpleWSGISoapApp
from soaplib.service import soapmethod
from soaplib.serializers.primitive import String, Boolean, Integer, Array
import cherrypy
from soaplib.serializers.clazz import ClassSerializer
from cherrypy.process.plugins import Monitor
from config import *
from time import sleep

#Importa el problema especificado en el fichero de configuración
exec("from " + PROBLEM + ".solver import Solver")
exec("from " + PROBLEM + ".result import Result")

asignaciones = {}

solver = Solver()
class PyOCFAtHomeServer(SimpleWSGISoapApp):
	@soapmethod(_returns=Boolean)
	def serverStatus(self):
		return True

	@soapmethod(String, _returns=Integer)
	def newJob(self,wsdlfile):
		"""Codigos de retorno: 0 - No hay trabajo
							   1 - Trabajo realizado correctamente
							   2 - Error. Posible perdida de conexion"""

		retvalue = 0
		if(solver.isActive()):
			cliente = Client(wsdlfile)
			parametros = cliente.factory.create('Parameters')
			if(solver.getJob(parametros)):
				asignaciones[parametros.identificador] = wsdlfile

				try:
					resultado = cliente.service.run(parametros)
					solver.doneJob(resultado)
					retvalue = 1 #Todo correcto
				except Exception, e:
					#Se produce excepcion cuando se pierde la comunicacion con el cliente
					print e
					solver.errorJob(parametros.identificador)
					retvalue = 2 #Error
				finally:
					asignaciones.pop(parametros.identificador)

		return retvalue

if __name__ == '__main__':
	from cherrypy.wsgiserver import CherryPyWSGIServer
	try:
		server = CherryPyWSGIServer((SERVER_ADDRESS, SERVER_PORT), PyOCFAtHomeServer())
		server.start()
	except KeyboardInterrupt:
		print "\n"
		server.stop()


text:
package brooklyn.location.cloud;

import java.util.Collection;
import java.util.Map;

import brooklyn.location.Location;
import brooklyn.location.LocationSpec;
import brooklyn.location.MachineProvisioningLocation;
import brooklyn.location.basic.AbstractLocation;
import brooklyn.location.basic.SshMachineLocation;
import brooklyn.util.collections.MutableMap;
import brooklyn.util.config.ConfigBag;
import brooklyn.util.internal.ssh.SshTool;

public abstract class AbstractCloudMachineProvisioningLocation extends AbstractLocation
implements MachineProvisioningLocation<SshMachineLocation>, CloudLocationConfig
{
   public AbstractCloudMachineProvisioningLocation() {
      super();
   }

    /** typically wants at least ACCESS_IDENTITY and ACCESS_CREDENTIAL */
    public AbstractCloudMachineProvisioningLocation(Map<?,?> conf) {
        super(conf);
    }

    /** uses reflection to create an object of the same type, assuming a Map constructor;
     * subclasses can extend and downcast the result */
    @Override
    public AbstractCloudMachineProvisioningLocation newSubLocation(Map<?,?> newFlags) {
        return newSubLocation(getClass(), newFlags);
    }

    public AbstractCloudMachineProvisioningLocation newSubLocation(Class<? extends AbstractCloudMachineProvisioningLocation> type, Map<?,?> newFlags) {
        // TODO should be able to use ConfigBag.newInstanceExtending; would require moving stuff around to api etc
        // TODO was previously `return LocationCreationUtils.newSubLocation(newFlags, this)`; need to retest on CloudStack etc
        return getManagementContext().getLocationManager().createLocation(LocationSpec.create(type)
                .parent(this)
                .configure(getLocalConfigBag().getAllConfig()) // FIXME Should this just be inherited?
                .configure(newFlags));
    }

    @Override
    public Map<String, Object> getProvisioningFlags(Collection<String> tags) {
        if (tags.size() > 0) {
            LOG.warn("Location {}, ignoring provisioning tags {}", this, tags);
        }
        return MutableMap.<String, Object>of();
    }

    // ---------------- utilities --------------------

    protected ConfigBag extractSshConfig(ConfigBag setup, ConfigBag alt) {
        ConfigBag sshConfig = new ConfigBag();

        if (setup.containsKey(PASSWORD)) {
            sshConfig.put(SshTool.PROP_PASSWORD, setup.get(PASSWORD));
        } else if (alt.containsKey(PASSWORD)) {
            sshConfig.put(SshTool.PROP_PASSWORD, alt.get(PASSWORD));
        }

        if (setup.containsKey(PRIVATE_KEY_DATA)) {
            sshConfig.put(SshTool.PROP_PRIVATE_KEY_DATA, setup.get(PRIVATE_KEY_DATA));
        } else if (setup.containsKey(PRIVATE_KEY_FILE)) {
            sshConfig.put(SshTool.PROP_PRIVATE_KEY_FILE, setup.get(PRIVATE_KEY_FILE));
        } else if (alt.containsKey(PRIVATE_KEY_DATA)) {
            sshConfig.put(SshTool.PROP_PRIVATE_KEY_DATA, alt.get(PRIVATE_KEY_DATA));
        }

        if (setup.containsKey(PRIVATE_KEY_PASSPHRASE)) {
            // NB: not supported in jclouds (but it is by our ssh tool)
            sshConfig.put(SshTool.PROP_PRIVATE_KEY_PASSPHRASE, setup.get(PRIVATE_KEY_PASSPHRASE));
        }

        // TODO extract other SshTool properties ?

        return sshConfig;
    }

}


text:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="cs_CZ">
<context>
    <name>DMXUSB</name>
    <message>
        <location filename="dmxusb.cpp" line="134"/>
        <source>This plugin provides DMX output support for</source>
        <translation>Tento plugin přidává prodporu DMX výstupů pro</translation>
    </message>
    <message>
        <location filename="dmxusb.cpp" line="137"/>
        <source>and compatible devices.</source>
        <translation>a kompatibilní zařízení.</translation>
    </message>
    <message>
        <location filename="dmxusb.cpp" line="151"/>
        <source>No output support available.</source>
        <translation>Podpora výstupu není k dispozici.</translation>
    </message>
    <message>
        <location filename="dmxusb.cpp" line="153"/>
        <source>Make sure that you have your hardware firmly plugged in. NOTE: FTDI VCP interface is not supported by this plugin.</source>
        <translation>Ujistěte se prosím, že je Váš hardware připojen. Poznámka: FTDI VCP interface není tímto pluginem podporován.</translation>
    </message>
    <message>
        <location filename="dmxusb.cpp" line="162"/>
        <location filename="dmxusb.cpp" line="231"/>
        <source>Device is operating correctly.</source>
        <translation>Zařízení pracuje správně.</translation>
    </message>
    <message>
        <location filename="dmxusb.cpp" line="218"/>
        <source>No input support available.</source>
        <translation>Podpora vstupu není k dispozici.</translation>
    </message>
</context>
<context>
    <name>DMXUSBConfig</name>
    <message>
        <location filename="dmxusbconfig.cpp" line="44"/>
        <source>Refresh</source>
        <translation>Obnovit</translation>
    </message>
    <message>
        <location filename="dmxusbconfig.cpp" line="45"/>
        <source>Close</source>
        <translation>Zavřít</translation>
    </message>
    <message>
        <location filename="dmxusbconfig.cpp" line="53"/>
        <source>Name</source>
        <translation>Název</translation>
    </message>
    <message>
        <location filename="dmxusbconfig.cpp" line="53"/>
        <source>Serial</source>
        <translation>Série</translation>
    </message>
</context>
<context>
    <name>EnttecDMXUSBOpen</name>
    <message>
        <location filename="enttecdmxusbopen.cpp" line="96"/>
        <source>Protocol</source>
        <translation>Protokol</translation>
    </message>
    <message>
        <location filename="enttecdmxusbopen.cpp" line="101"/>
        <source>DMX Frame Frequency</source>
        <translation>Frekvence DMX rámce</translation>
    </message>
    <message>
        <location filename="enttecdmxusbopen.cpp" line="105"/>
        <source>Bad</source>
        <translation>Špatné</translation>
    </message>
    <message>
        <location filename="enttecdmxusbopen.cpp" line="107"/>
        <source>Good</source>
        <translation>Dobré</translation>
    </message>
    <message>
        <location filename="enttecdmxusbopen.cpp" line="109"/>
        <source>Patch this widget to a universe to find out.</source>
        <translation>Připojit tento ovladač do větve k vyhledání.</translation>
    </message>
    <message>
        <location filename="enttecdmxusbopen.cpp" line="110"/>
        <source>System Timer Accuracy</source>
        <translation>Přesnost systémového časovače</translation>
    </message>
</context>
<context>
    <name>QObject</name>
    <message>
        <location filename="dmx4all.cpp" line="129"/>
        <location filename="enttecdmxusbprorx.cpp" line="84"/>
        <location filename="enttecdmxusbprotx.cpp" line="127"/>
        <location filename="ultradmxusbprotx.cpp" line="73"/>
        <source>Protocol</source>
        <translation>Protokol</translation>
    </message>
    <message>
        <location filename="dmx4all.cpp" line="131"/>
        <location filename="enttecdmxusbprotx.cpp" line="70"/>
        <location filename="enttecdmxusbprotx.cpp" line="72"/>
        <location filename="enttecdmxusbprotx.cpp" line="129"/>
        <location filename="ultradmxusbprotx.cpp" line="59"/>
        <location filename="ultradmxusbprotx.cpp" line="61"/>
        <location filename="ultradmxusbprotx.cpp" line="75"/>
        <source>Output</source>
        <translation>Výstup</translation>
    </message>
    <message>
        <location filename="dmx4all.cpp" line="133"/>
        <location filename="enttecdmxusbopen.cpp" line="98"/>
        <location filename="enttecdmxusbprorx.cpp" line="88"/>
        <location filename="enttecdmxusbprotx.cpp" line="131"/>
        <location filename="ultradmxusbprotx.cpp" line="77"/>
        <source>Manufacturer</source>
        <translation>Výrobce</translation>
    </message>
    <message>
        <location filename="dmx4all.cpp" line="136"/>
        <location filename="enttecdmxusbprorx.cpp" line="91"/>
        <location filename="enttecdmxusbprotx.cpp" line="134"/>
        <location filename="ultradmxusbprotx.cpp" line="80"/>
        <source>Serial number</source>
        <translation>Sériové číslo</translation>
    </message>
    <message>
        <location filename="enttecdmxusbprorx.cpp" line="48"/>
        <location filename="enttecdmxusbprorx.cpp" line="50"/>
        <location filename="enttecdmxusbprorx.cpp" line="86"/>
        <source>Input</source>
        <translation>Vstup</translation>
    </message>
</context>
</TS>


text:
import { describe, it } from "flow-typed-test";
import { SAGA_LOCATION } from "redux-saga";

describe("SAGA_LOCATION", () => {
  it("must import SAGA_LOCATION string", () => {
    (SAGA_LOCATION: "@@redux-saga/LOCATION");
  });
});


text:
var Q		=	require('q'),
    xml2js	=	require('xml2js');
var parser = xml2js.parseString;

var Common = {
    transformData: transformData
};

function transformData(body) {
    console.log("-- Transforming Data");
    return Q.Promise(function(resolve, reject){
        parser(body, function(error, xml){
            if (error) {
                reject(new Error(error));
            } else {
                resolve(xml);
            }
        });
    });
}

module.exports = Common;


text:
using System.Collections.Generic;
using IdentityServer3.Core.Models;

namespace OpenIDConnect.IdentityServer.Services
{
    internal class AuthorizationManagerScopeStore : FixedScopeStore
    {
        protected override IEnumerable<Scope> GetScopes()
        {
            yield return new Scope
            {
                Name = "permissions-resource",
                DisplayName = "Permissions",
                Description = "Permissions from the authorization manager",
                Type = ScopeType.Resource,
                ShowInDiscoveryDocument = true,
                Enabled = true,
                Required = true,
                Claims = new List<ScopeClaim>
                {
                    new ScopeClaim("Permission")
                }
            };

            yield return new Scope
            {
                Name = "permissions-identity",
                DisplayName = "Permissions",
                Description = "Permissions from the authorization manager",
                Type = ScopeType.Identity,
                ShowInDiscoveryDocument = true,
                Enabled = true,
                Required = true,
                Claims = new List<ScopeClaim>
                {
                    new ScopeClaim("Permission")
                }
            };
        }
    }
}


text:
#pragma once
#include <aws/kms/KMS_EXPORTS.h>
#include <aws/kms/KMSRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>

namespace Aws
{
namespace KMS
{
namespace Model
{

  /**
   */
  class AWS_KMS_API EnableKeyRotationRequest : public KMSRequest
  {
  public:
    EnableKeyRotationRequest();

    // Service request name is the Operation name which will send this request out,
    // each operation should has unique request name, so that we can get operation's name from this request.
    // Note: this is not true for response, multiple operations may have the same response name,
    // so we can not get operation's name from response.
    inline virtual const char* GetServiceRequestName() const override { return "EnableKeyRotation"; }

    Aws::String SerializePayload() const override;

    Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;

    /**
     *
Identifies a symmetric KMS key. You cannot enable automatic rotation of asymmetric
     * KMS keys, KMS keys with imported
     * key material, or KMS keys in a custom
     * key store. To enable or disable automatic rotation of a set of related multi-Region
     * keys, set the property on the primary key.

Specify the key ID or key
     * ARN of the KMS key.

For example:

Key ID:
     * 1234abcd-12ab-34cd-56ef-1234567890ab

Key ARN:
     * arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
     *

To get the key ID and key ARN for a KMS key, use
     * ListKeys or DescribeKey.

     */
    inline const Aws::String& GetKeyId() const{ return m_keyId; }

    /**
     *
Identifies a symmetric KMS key. You cannot enable automatic rotation of asymmetric
     * KMS keys, KMS keys with imported
     * key material, or KMS keys in a custom
     * key store. To enable or disable automatic rotation of a set of related multi-Region
     * keys, set the property on the primary key.

Specify the key ID or key
     * ARN of the KMS key.

For example:

Key ID:
     * 1234abcd-12ab-34cd-56ef-1234567890ab

Key ARN:
     * arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
     *

To get the key ID and key ARN for a KMS key, use
     * ListKeys or DescribeKey.

     */
    inline bool KeyIdHasBeenSet() const { return m_keyIdHasBeenSet; }

    /**
     *
Identifies a symmetric KMS key. You cannot enable automatic rotation of asymmetric
     * KMS keys, KMS keys with imported
     * key material, or KMS keys in a custom
     * key store. To enable or disable automatic rotation of a set of related multi-Region
     * keys, set the property on the primary key.

Specify the key ID or key
     * ARN of the KMS key.

For example:

Key ID:
     * 1234abcd-12ab-34cd-56ef-1234567890ab

Key ARN:
     * arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
     *

To get the key ID and key ARN for a KMS key, use
     * ListKeys or DescribeKey.

     */
    inline void SetKeyId(const Aws::String& value) { m_keyIdHasBeenSet = true; m_keyId = value; }

    /**
     *
Identifies a symmetric KMS key. You cannot enable automatic rotation of asymmetric
     * KMS keys, KMS keys with imported
     * key material, or KMS keys in a custom
     * key store. To enable or disable automatic rotation of a set of related multi-Region
     * keys, set the property on the primary key.

Specify the key ID or key
     * ARN of the KMS key.

For example:

Key ID:
     * 1234abcd-12ab-34cd-56ef-1234567890ab

Key ARN:
     * arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
     *

To get the key ID and key ARN for a KMS key, use
     * ListKeys or DescribeKey.

     */
    inline void SetKeyId(Aws::String&& value) { m_keyIdHasBeenSet = true; m_keyId = std::move(value); }

    /**
     *
Identifies a symmetric KMS key. You cannot enable automatic rotation of asymmetric
     * KMS keys, KMS keys with imported
     * key material, or KMS keys in a custom
     * key store. To enable or disable automatic rotation of a set of related multi-Region
     * keys, set the property on the primary key.

Specify the key ID or key
     * ARN of the KMS key.

For example:

Key ID:
     * 1234abcd-12ab-34cd-56ef-1234567890ab

Key ARN:
     * arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
     *

To get the key ID and key ARN for a KMS key, use
     * ListKeys or DescribeKey.

     */
    inline void SetKeyId(const char* value) { m_keyIdHasBeenSet = true; m_keyId.assign(value); }

    /**
     *
Identifies a symmetric KMS key. You cannot enable automatic rotation of asymmetric
     * KMS keys, KMS keys with imported
     * key material, or KMS keys in a custom
     * key store. To enable or disable automatic rotation of a set of related multi-Region
     * keys, set the property on the primary key.

Specify the key ID or key
     * ARN of the KMS key.

For example:

Key ID:
     * 1234abcd-12ab-34cd-56ef-1234567890ab

Key ARN:
     * arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
     *

To get the key ID and key ARN for a KMS key, use
     * ListKeys or DescribeKey.

     */
    inline EnableKeyRotationRequest& WithKeyId(const Aws::String& value) { SetKeyId(value); return *this;}

    /**
     *
Identifies a symmetric KMS key. You cannot enable automatic rotation of asymmetric
     * KMS keys, KMS keys with imported
     * key material, or KMS keys in a custom
     * key store. To enable or disable automatic rotation of a set of related multi-Region
     * keys, set the property on the primary key.

Specify the key ID or key
     * ARN of the KMS key.

For example:

Key ID:
     * 1234abcd-12ab-34cd-56ef-1234567890ab

Key ARN:
     * arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
     *

To get the key ID and key ARN for a KMS key, use
     * ListKeys or DescribeKey.

     */
    inline EnableKeyRotationRequest& WithKeyId(Aws::String&& value) { SetKeyId(std::move(value)); return *this;}

    /**
     *
Identifies a symmetric KMS key. You cannot enable automatic rotation of asymmetric
     * KMS keys, KMS keys with imported
     * key material, or KMS keys in a custom
     * key store. To enable or disable automatic rotation of a set of related multi-Region
     * keys, set the property on the primary key.

Specify the key ID or key
     * ARN of the KMS key.

For example:

Key ID:
     * 1234abcd-12ab-34cd-56ef-1234567890ab

Key ARN:
     * arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
     *

To get the key ID and key ARN for a KMS key, use
     * ListKeys or DescribeKey.

     */
    inline EnableKeyRotationRequest& WithKeyId(const char* value) { SetKeyId(value); return *this;}

  private:

    Aws::String m_keyId;
    bool m_keyIdHasBeenSet;
  };

} // namespace Model
} // namespace KMS
} // namespace Aws


text:
package com.code.constant;

/**
 * Created by Qniu on 2017/8/15.
 */

public class PreferenceName {
}


text:
class Element {
  constructor(el, block, options) {
    this.routeEvents(el, block, options);
    this.preventSelect(el, options);
  }

  routeEvents(el, block, options) {
    var type = Config.get('only', options);
    // for devices that support Force Touch
    if(supportsMouse && (type === 'mouse' || type === null)) {
      this.adapter = new AdapterForceTouch(el, block, options).bindEvents();
    }
    // for devices that support pointer events
    else if(supportsPointer && (type === 'pointer' || type === null)) {
      this.adapter = new AdapterPointer(el, block, options).bindEvents();
    }
    // for devices that support 3D Touch
    else if(supportsTouch && (type === 'touch' || type === null)) {
      this.adapter = new Adapter3DTouch(el, block, options).bindEvents();
    }
    // unsupported if it is requesting a type and your browser is of other type
    else {
      this.adapter = new Adapter(el, block).bindUnsupportedEvent();
    }
  }

  // prevent the default action of text selection, "peak & pop", and force touch special feature
  preventSelect(el, options) {
    if(Config.get('preventSelect', options)){
      el.style.webkitTouchCallout = "none";
      el.style.webkitUserSelect = "none";
      el.style.khtmlUserSelect = "none";
      el.style.MozUserSelect = "none";
      el.style.msUserSelect = "none";
      el.style.userSelect = "none";
    }
  }
}


text:
<!DOCTYPE html >

          <meta http-equiv="X-UA-Compatible" content="IE=edge" />
          <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
          <title>SANSA-Stack 0.8.0 ScalaDoc  - net.sansa_stack.inference.utils.RuleUtils.RuleExtension</title>
          <meta name="description" content="SANSA - Stack 0.8.0 ScalaDoc - net.sansa stack.inference.utils.RuleUtils.RuleExtension" />
          <meta name="keywords" content="SANSA Stack 0.8.0 ScalaDoc net.sansa stack.inference.utils.RuleUtils.RuleExtension" />
          <meta http-equiv="content-type" content="text/html; charset=UTF-8" />

      <link href="../../../../lib/index.css" media="screen" type="text/css" rel="stylesheet" />
      <link href="../../../../lib/template.css" media="screen" type="text/css" rel="stylesheet" />
      <link href="../../../../lib/diagrams.css" media="screen" type="text/css" rel="stylesheet" id="diagrams-css" />

        SANSA-Stack 0.8.0 ScalaDoc
        < Back

            <input autocapitalize="none" placeholder="Search" id="index-input" type="text" accesskey="/" />
            
            

Packages

        

        package

        root

Definition Classes

root

        

        package

        net

Definition Classes

root

        

        package

        sansa_stack

Definition Classes

net

        

        package

        inference

Definition Classes

sansa_stack

        

        package

        utils

Definition Classes

inference

        

        object

        RuleUtils

Utility class for rules.

Utility class for rules.

Definition Classes

utils

                        RuleExtension

                        TriplePatternEqualiltyExtension

c

net.sansa_stack.inference.utils.RuleUtils

RuleExtension

        

        implicit
        class

        RuleExtension extends AnyRef

Some convenience methods that can be called directly on a rule object.

Source

RuleUtils.scala

            Linear Supertypes

AnyRef, Any

          

            <input id="mbrsel-input" placeholder="Filter all members" type="text" accesskey="/" />

          

            Ordering

Alphabetic

By Inheritance

                  Inherited

RuleExtension

AnyRef

Any

Hide All

Show All

              Visibility

Public

All

Instance Constructors

        

        new

        RuleExtension(rule: Rule)

rule

the rule

Value Members

        

        final
        def

        !=(arg0: Any): Boolean

Definition Classes

AnyRef → Any

        

        final
        def

        ##(): Int

Definition Classes

AnyRef → Any

        

        final
        def

        ==(arg0: Any): Boolean

Definition Classes

AnyRef → Any

        

        final
        def

        asInstanceOf[T0]: T0

Definition Classes

Any

        

        def

        bodyTriplePatterns(): Seq[TriplePattern]

Returns the triple patterns contained in the body of the rule.

        

        def

        clone(): AnyRef

Attributes

protected[lang]

Definition Classes

AnyRef

Annotations

                @throws(

      ...
    )

                @native()

        

        final
        def

        eq(arg0: AnyRef): Boolean

Definition Classes

AnyRef

        

        def

        equals(arg0: Any): Boolean

Definition Classes

AnyRef → Any

        

        def

        finalize(): Unit

Attributes

protected[lang]

Definition Classes

AnyRef

Annotations

                @throws(

      classOf[java.lang.Throwable]
    )

        

        final
        def

        getClass(): Class[_]

Definition Classes

AnyRef → Any

Annotations

                @native()

        

        def

        hashCode(): Int

Definition Classes

AnyRef → Any

Annotations

                @native()

        

        def

        headTriplePatterns(): Seq[TriplePattern]

Returns the triple patterns contained in the head of the rule.

        

        final
        def

        isInstanceOf[T0]: Boolean

Definition Classes

Any

        

        final
        def

        ne(arg0: AnyRef): Boolean

Definition Classes

AnyRef

        

        final
        def

        notify(): Unit

Definition Classes

AnyRef

Annotations

                @native()

        

        final
        def

        notifyAll(): Unit

Definition Classes

AnyRef

Annotations

                @native()

        

        val

        rule: Rule

        

        def

        sameBody(otherRule: Rule): Boolean

Returns true if the rule has the same body as the other rule, otherwise false.

        

        def

        sameHead(otherRule: Rule): Boolean

Returns true if the rule has the same head as the other rule, otherwise false.

        

        final
        def

        synchronized[T0](arg0: ⇒ T0): T0

Definition Classes

AnyRef

        

        def

        toString(): String

Definition Classes

AnyRef → Any

        

        final
        def

        wait(): Unit

Definition Classes

AnyRef

Annotations

                @throws(

      ...
    )

        

        final
        def

        wait(arg0: Long, arg1: Int): Unit

Definition Classes

AnyRef

Annotations

                @throws(

      ...
    )

        

        final
        def

        wait(arg0: Long): Unit

Definition Classes

AnyRef

Annotations

                @throws(

      ...
    )

                @native()

Inherited from AnyRef

Inherited from Any

Ungrouped


text:
layout: post
title: "Indian Startups Last Week: Edition-26"
excerpt: "The 26th edition of the Indian Startups newsletter where I curate the what went down in the ecosystem last week."
categories: [newsletter]
author: harshal
comments: true
---
The newsletter has been silent for a while now, I apologise for that. In the middle of shifting cities and setting up a new place in a new city got a hold of me.

***
Heading to the snippets of the week ....

***

**The weekly fix**

The weekly fix will delve into the unforeseen depths of never-before heard scoop into the brazen world of Indian startups. Naww, I'm kidding. This'll cover the announcements and news by the various startups, of the various startups and for the various startups.

* Google launches Solve for India campaign, a version of its Launchpad accelerator program. [[ETTech](http://tech.economictimes.indiatimes.com/news/internet/google-launches-solve-for-india-program/58416246)]

* Amazon India is its fastest growing marketplace, says Bezos during the first quarter results. [[ETTech](http://tech.economictimes.indiatimes.com/news/internet/jeff-bezos-says-amazon-india-is-the-fastest-growing-marketplace/58410143)]

* Craftsvilla still looking to find the perfect business model, rejigs its plan. [[ETTech](http://tech.economictimes.indiatimes.com/news/startups/ethnic-fashion-retailer-craftsvilla-rejigs-business-plan/58409530)]

* PayTM launches Digital Gold platform in collab with MMTC-PAMP. [[ETTech](http://tech.economictimes.indiatimes.com/news/internet/paytm-starts-selling-gold-for-re-1/58397811)]
* Oyo sets up presence in Nepal; launches the first hotel in Kathmandu. [[ETTech](http://tech.economictimes.indiatimes.com/news/startups/oyo-sets-up-presence-in-nepal-launches-first-hotel-in-kathmandu/58396656)]
* You can now buy bitcoins via Netbanking as Unocoin partners with PayUBiz  [[ETTech](http://tech.economictimes.indiatimes.com/news/internet/unocoin-partners-payubiz-to-facilitate-buying-bitcoins-through-netbanking/58381352)]
* Grofers sets up 15 offline stores across Delhi-NCR. [[Inc42](https://inc42.com/buzz/grofers-offline-stores/)]
* Instamojo nears break-even. [[Inc42](https://inc42.com/buzz/instamojo-fy2016-result-sampad/)]

***

**Funding**

The number-one risk in business is starting to take yourself too seriously and starting to believe your own BS a little bit too much. - Chris Sacca

* Canada's Clairvest buys majority stake in Ace2Three, an online rummy portal in India, for $74 Million(approx. ₹481 Cr) [[ETTech](http://tech.economictimes.indiatimes.com/news/startups/canadas-clairvest-buys-majority-in-rummy-portal-ace2three-for-74m/58427986)]

* UiPath, a software robotics company, raises $30 Million(approx. 195 Cr) from Accel Partners.
[[ETTech](http://tech.economictimes.indiatimes.com/news/startups/uipath-raises-30-million-series-a-funding-led-by-accel/58420028)]

* MechMocha, a mobile gaming company, has raised $5 Million(approx. ₹195 Cr) in a round led by Accel Partners and saw participation from Shunwei Capital and existing investor - Blume Ventures. [[ETTech](http://tech.economictimes.indiatimes.com/news/startups/mech-mocha-raises-5-mn-in-series-a-funding/58397321)]

* Scootsy, an on-demand delivery platform has raised $3.6 Million(approx. ₹23 Cr) from Agnus Capital and Khattar Holdings.
[[ETTech](http://tech.economictimes.indiatimes.com/news/startups/on-demand-delivery-platform-scootsy-raise-3-6-m/58391049)]

* Myra, a medicine delivery startup has raised an undisclosed amount of funding in its Series-A round from Matrix Partners and Times Internet. [[ETTech](http://tech.economictimes.indiatimes.com/news/startups/medicine-delivery-firm-myra-raises-funding-from-matrix-partners-times-internet/58372685)]
* Awfis, a co-working space has raised $20 Million(approx. ₹130 Cr) from Sequoia Capital [[ETTech](http://tech.economictimes.indiatimes.com/news/startups/awfis-raises-20m-funding-from-sequoia-india/583724560)]
* Eyeing a ₹350 Cr corpus, IAN raises ₹175 Cr in its first round. [[ETTech](http://tech.economictimes.indiatimes.com/news/startups/indian-angel-network-eyes-rs-350-cr-corpus-raises-rs-175-cr-in-first-round/58372326)]
* Pharmeasy, a pharmacy aggregator raises venture debt from Trifecta Capital. [[ETTech](http://tech.economictimes.indiatimes.com/news/startups/pharmacy-aggregator-pharmeasy-raises-venture-debt-from-trifecta-capital/58370307)]
* Frapperz, an on-demand home service startup has raised ₹2.58 Cr from HNIs. [[ETTech](http://tech.economictimes.indiatimes.com/news/startups/on-demand-home-service-startup-frapperz-to-get-rs-2-58-crore/58354556)]
* Faasos, a food-delivery startup has raised $6.4 Million(approx. ₹41.6 Cr) in an extended Series-C round led by Lightbox Ventures, Sequoia Capital and others. [[Inc42](https://inc42.com/buzz/faasos-funding/)]
* POPxo, an online media network for women, raised $3.1 Million(approx. ₹20 Cr) from Kalaari Capital and IDG Ventures India. [[Inc42](https://inc42.com/buzz/popxo-3-1-mn-funding/)]

***

**License Raj**

This section looks at the different announcements by the governments (states and central) and nationalised companies to ride the startup train.

* SEBI allows investments in mutual funds via e-wallets. [[ETTech](http://tech.economictimes.indiatimes.com/news/mobile/sebi-allows-investments-in-mutual-funds-via-e-wallets/58391570)]
* Ola runs into trouble with the Bengaluru Transport Department. [[ETTech](http://tech.economictimes.indiatimes.com/news/mobile/ola-served-notice-for-running-shuttles-along-bmtc-routes-in-bengaluru/58353845)]
* MCA says that company registration will now take only 1 day. [[Inc42](https://inc42.com/buzz/incorporating-company/)]

***

**Mergers and Acquisitions**

Generally, we have found that entrepreneurs are very knowledgable about their particular business, but they're very shallow in their knowledge about business practices that help drive value and efficiency." – John McNamara

Here are all the mergers and acquisitions in the last week.

* No updates this week.

***

**RIP**

This section is dedicated to those who couldn't make it. Those who tried, but failed. Those who raised, but burned. Those who stood, but had to sit.

* Runnr rolls back its food delivery service. [[VCCircle](https://www.vccircle.com/exclusive-runnr-scales-back-food-delivery-service/)

***

**Recommendations of the week**

**Articles**

* How drugs and Paranoia doomed Silk Road [[VanityFair](http://www.vanityfair.com/news/2017/04/silk-road-ross-ulbricht-drugs-murder)]
* Not OK Google [[Stratechery](https://stratechery.com/2017/not-ok-google/)]

***

**Book**

* How to talk to anyone [[Amazon](https://www.amazon.in/How-Talk-Anyone-Success-Relationships/dp/0007272618/ref=as_li_ss_tl?ie=UTF8&qid=1493528401&sr=8-1&keywords=how+to+talk+to+anyone&linkCode=ll1&tag=harshalbot-21&linkId=02a1addf0bafc344b096bf250fea902c)]
***

Subscribe: www.tinyletter.com/harshalbot

***

Last Week's post: [Startups this week](https://www.reddit.com/r/india/comments/670n90/indian_startups_last_week_16th_april_to_23rd_april/)

***

[Buy me a beer](https://www.ft.com/content/2306703e-2349-11e7-a34a-538b4cb30025)

~fin~


text:
package de.johanneswachter.projects.db4o

import com.db4o._
import dsl.DB4O._
import model._

object Application {
  def main(args : Array[String]) : Unit = {
     val db = Db4o.openFile("test-dsl-simpsons.db")
	 db filter ((s : String) => true)

	 val results_1 = db select Person.getClass where('lastName ~ "on") and('firstName ~| "B") execute

		for(v <- results_1){
			println(v)
		}

  }
}


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.stpi.model;

import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.voodoodyne.jackson.jsog.JSOGGenerator;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author YojhanLR
 */
@Entity
@Table(name = "bicicleta_usuario")
@XmlRootElement
@JsonIdentityInfo(generator=JSOGGenerator.class)
@NamedQueries({
    @NamedQuery(name = "BicicletaUsuario.findAll", query = "SELECT b FROM BicicletaUsuario b"),
    @NamedQuery(name = "BicicletaUsuario.findById", query = "SELECT b FROM BicicletaUsuario b WHERE b.id = :id"),
    @NamedQuery(name = "BicicletaUsuario.findByFechaInicio", query = "SELECT b FROM BicicletaUsuario b WHERE b.fechaInicio = :fechaInicio"),
    @NamedQuery(name = "BicicletaUsuario.findByFechaFin", query = "SELECT b FROM BicicletaUsuario b WHERE b.fechaFin = :fechaFin")})
public class BicicletaUsuario implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    private Integer id;
    @Basic(optional = false)
    @NotNull
    @Column(name = "fecha_inicio")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechaInicio;
    @Column(name = "fecha_fin")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechaFin;
    @JoinColumn(name = "bicicleta_id", referencedColumnName = "bicicleta_id")
    @ManyToOne(optional = false)
    private Bicicleta bicicletaId;
    @JoinColumn(name = "usuario_id", referencedColumnName = "usuario_id")
    @ManyToOne(optional = false)
    private Usuario usuarioId;

    public BicicletaUsuario() {
    }

    public BicicletaUsuario(Integer id) {
        this.id = id;
    }

    public BicicletaUsuario(Integer id, Date fechaInicio) {
        this.id = id;
        this.fechaInicio = fechaInicio;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Date getFechaInicio() {
        return fechaInicio;
    }

    public void setFechaInicio(Date fechaInicio) {
        this.fechaInicio = fechaInicio;
    }

    public Date getFechaFin() {
        return fechaFin;
    }

    public void setFechaFin(Date fechaFin) {
        this.fechaFin = fechaFin;
    }

    public Bicicleta getBicicletaId() {
        return bicicletaId;
    }

    public void setBicicletaId(Bicicleta bicicletaId) {
        this.bicicletaId = bicicletaId;
    }

    public Usuario getUsuarioId() {
        return usuarioId;
    }

    public void setUsuarioId(Usuario usuarioId) {
        this.usuarioId = usuarioId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof BicicletaUsuario)) {
            return false;
        }
        BicicletaUsuario other = (BicicletaUsuario) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.stpi.model.BicicletaUsuario[ id=" + id + " ]";
    }

}


text:
package org.semanticweb.elk.reasoner.indexing.model;

import org.semanticweb.elk.owl.interfaces.ElkObjectHasSelf;
import org.semanticweb.elk.owl.interfaces.ElkObjectProperty;
import org.semanticweb.elk.reasoner.saturation.inferences.BackwardLinkOfObjectHasSelf;
import org.semanticweb.elk.reasoner.saturation.inferences.ForwardLinkOfObjectHasSelf;
import org.semanticweb.elk.reasoner.saturation.rules.ClassInferenceProducer;

/**
 * An {@link IndexedClassExpression} constructed from an
 * {@link IndexedObjectProperty}.

 *
 * Notation:
 *
 *

 * ∃R.Self
 *

 *
 * It is logically equivalent to OWL class expression {@code ObjectHasSelf(R)}
 *

 *
 * The parameters can be obtained as follows:

 *
 * R = {@link #getProperty()}

 *
 * @author "Yevgeny Kazakov"
 */
public interface IndexedObjectHasSelf extends IndexedClassExpression {

	/**
	 * @return The representation of the {@link ElkObjectProperty} that is a
	 *         property of the {@link ElkObjectHasSelf} represented by this
	 *         {@link IndexedObjectHasSelf}.
	 *
	 * @see ElkObjectHasSelf#getProperty()
	 */
	IndexedObjectProperty getProperty();

	/**
	 * The visitor pattern for instances
	 *
	 * @author Yevgeny Kazakov
	 *
	 * @param <O>
	 *            the type of the output
	 */
	interface Visitor<O> {

		O visit(IndexedObjectHasSelf element);

	}

	class Helper {

		public static void produceDecomposedExistentialLink(
				ClassInferenceProducer producer, IndexedContextRoot root,
				IndexedObjectHasSelf subsumer) {
			producer.produce(
					new BackwardLinkOfObjectHasSelf(root, subsumer));
			if (!subsumer.getProperty().getSaturated()
					.getNonRedundantCompositionsByLeftSubProperty().isEmpty()) {
				producer.produce(
						new ForwardLinkOfObjectHasSelf(root, subsumer));
			}
		}

	}

}


text:
package org.eclipse.php.internal.core.util.project.observer;

import java.util.HashSet;
import java.util.Iterator;

public class CompositeProjectChangeObserver extends HashSet<IProjectClosedObserver> implements IProjectClosedObserver {

	private static final long serialVersionUID = 1L;

	public void closed() {
		for (Iterator<IProjectClosedObserver> iter = iterator(); iter.hasNext();) {
			IProjectClosedObserver projectChangeObserver = (IProjectClosedObserver) iter.next();
			projectChangeObserver.closed();
		}
	}
}


text:
<?php
/**
 * Created by PhpStorm.
 * User: Najam.Haque
 * Date: 11/8/2015
 * Time: 9:23 AM
 */

namespace Hotel\Exception;

class HttpException extends \Exception
{
    public function __construct($message, $code, \Exception $previous = null)
    {
        parent::__construct($message, $code, $previous);
    }
}


text:
    Name: <input type="text" [value]="customer.name"
        (input)="customer.name=$event.target.value">

    City: <input type="text" [value]="customer.address.city"
        (input)="customer.address.city=$event.target.value">

    Order Total: <input type="text" [value]="customer.orderTotal"
        (input)="customer.orderTotal=$event.target.value">

    Order Total (with tax): {{ customer.orderTotalWithTax | currency }}

    <button (click)="change()">Update Customer</button>

            {{ msg.title }} {{ msg.value | json }}


text:
package com.rohos.logon1;

//import android.app.Notification;

import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.os.IBinder;
import android.preference.PreferenceManager;
import android.support.v4.app.NotificationCompat;
import android.util.Log;

import com.rohos.logon1.widget.UnlockPcService;

public class UPDService extends Service {

    static private UPDService mUPDService = null;

    private final String TAG = "UPDService";

    private final int NOTIFICATION_ID = 1001;

    public static UPDService getInstance() {
        return mUPDService;
    }

    @Override
    public void onCreate() {
        try {
            mUPDService = this;

            boolean showNotifi = PreferenceManager.getDefaultSharedPreferences(this)
                    .getBoolean("show_icon", getResources().getBoolean(R.bool.show_icon_on_tb));
            if (showNotifi) showNotification();

            new Thread(new UPDClient((RohosApplication) getApplication())).start();
        } catch (Exception e) {
            // Log.e(TAG, Log.getStackTraceString(e));
        }
    }

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        try {
            new Thread(new UPDClient((RohosApplication) getApplication())).start();
        } catch (Exception e) {
            //Log.e(TAG, Log.getStackTraceString(e));
        }

        return START_STICKY;
    }

    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }

    @Override
    public void onDestroy() {
        mUPDService = null;
        super.onDestroy();
    }

    public void showNotification() {
        try {
            //Context context = getApplicationContext();
            Resources res = getResources();

            NotificationCompat.Builder ncBuilder = new NotificationCompat.Builder(this)
                    .setSmallIcon(R.drawable.ic_notification)
                    .setContentTitle(res.getString(R.string.app_name))
                    .setContentText(res.getString(R.string.notifi_title));
            PendingIntent pi = PendingIntent
                    .getService(this, 0, new Intent(this, UnlockPcService.class), 0);

            ncBuilder.setContentIntent(pi);

            NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
            nm.notify(NOTIFICATION_ID, ncBuilder.getNotification());

        } catch (Exception e) {
            //Log.e(TAG, e.toString());
        }
    }

    public void cancelNotification() {
        try {
            NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
            nm.cancel(NOTIFICATION_ID);
        } catch (Exception e) {
            // Log.e(TAG, e.toString());
        }
    }
}


text:
package com.ShoppingCart.Project.springbootshoppingcart.piqcallbackhandler;

import java.util.ArrayList;

import com.ShoppingCart.Project.springbootshoppingcart.piqcallbackhandler.callbackinput.VerifyUserInput;

public class TxCmdHandler {

	private ArrayList<VerifyUserInput> verifyUserCmd = new ArrayList<VerifyUserInput>();

	private ArrayList<String> verifyUserRespCmd = new ArrayList<String>();

	public TxCmdHandler() {
	}

	public void addVerifyUserCmd(VerifyUserInput verifyUserInput) {
		this.verifyUserCmd.add(verifyUserInput);
	}

	public void addVerifyUserRespCmd(String verifyUserResponse) {
		this.verifyUserRespCmd.add(verifyUserResponse);
	}

	public VerifyUserInput getLatestVerifyUserCmd() {

		for(int i = verifyUserCmd.size() - 1; i >= 0;) {
			return (VerifyUserInput) verifyUserCmd.get(i);
		}
		return null;
	}

	public String getLatestVerifyUserRespCmd() {

		for(int i = verifyUserRespCmd.size() - 1; i >= 0;) {
			return (String) verifyUserRespCmd.get(i);
		}
		return null;
	}

}


text:
const Hapi = require('hapi');
const Animal = require(__dirname + '/models/animals'); // eslint-disable-line
const animalRoutes = require(__dirname + '/routes/animalroutes'); // eslint-disable-line
const serverError = require(__dirname + '/lib/servererror'); // eslint-disable-line
const mongoose = require('mongoose');

mongoose.connect(process.env.MONGO_URI || 'mongodb://localhost/db');

const server = new Hapi.Server();
server.connection({ port: 7777 });

server.route(require(__dirname + '/routes/animalroutes'));

server.start((err) => {
  if (err) {
    throw err;
  }
  console.log('Server up and running at: ', server.info.uri);
});


text:
package com.amazonaws.services.ec2.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 *

 * The encryption algorithm for phase 1 IKE negotiations.
 *

 *
 * @see AWS API Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class Phase1EncryptionAlgorithmsListValue implements Serializable, Cloneable {

    /**
     *

     * The value for the encryption algorithm.
     *

     */
    private String value;

    /**
     *

     * The value for the encryption algorithm.
     *

     *
     * @param value
     *        The value for the encryption algorithm.
     */

    public void setValue(String value) {
        this.value = value;
    }

    /**
     *

     * The value for the encryption algorithm.
     *

     *
     * @return The value for the encryption algorithm.
     */

    public String getValue() {
        return this.value;
    }

    /**
     *

     * The value for the encryption algorithm.
     *

     *
     * @param value
     *        The value for the encryption algorithm.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public Phase1EncryptionAlgorithmsListValue withValue(String value) {
        setValue(value);
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getValue() != null)
            sb.append("Value: ").append(getValue());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof Phase1EncryptionAlgorithmsListValue == false)
            return false;
        Phase1EncryptionAlgorithmsListValue other = (Phase1EncryptionAlgorithmsListValue) obj;
        if (other.getValue() == null ^ this.getValue() == null)
            return false;
        if (other.getValue() != null && other.getValue().equals(this.getValue()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getValue() == null) ? 0 : getValue().hashCode());
        return hashCode;
    }

    @Override
    public Phase1EncryptionAlgorithmsListValue clone() {
        try {
            return (Phase1EncryptionAlgorithmsListValue) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
        }
    }

}


text:
require 'spec_helper'
lsbdist = {:RedHat => 'CentOS', :Suse => 'openSUSE project' }
lcd = {:Debian => 'precise', :RedHat => 'Final', :Suse => 'Harlequin' }

describe 'couchpotato' do
  context 'supported operating systems' do
    ['RedHat', 'Suse'].each do |osfamily|
      describe "without any parameters on #{osfamily}" do
        let(:params) {{ }}
        let(:facts) {{
          :osfamily => osfamily,
          :lsbdistid => lsbdist[osfamily.to_sym],
          :lsbdistcodename => lcd[osfamily.to_sym],
          :os_maj_version => 6,
          :architecture => 'x68_64'
        }}

        it { is_expected.to compile.with_all_deps }

        it { is_expected.to contain_class('couchpotato') }
        it { is_expected.to contain_class('couchpotato::defaults') }
        it { is_expected.to contain_class('couchpotato::users').that_comes_before('couchpotato::repo') }
        it { is_expected.to contain_class('couchpotato::repo').that_comes_before('couchpotato::install') }
        it { is_expected.to contain_class('couchpotato::install').that_comes_before('couchpotato::sysconfig') }
        it { is_expected.to contain_class('couchpotato::sysconfig').that_comes_before('couchpotato::config') }
        it { is_expected.to contain_class('couchpotato::config') }
        it { is_expected.to contain_class('couchpotato::service').that_subscribes_to('couchpotato::config') }
        it { is_expected.to contain_file('/var/lib/couchpotato/settings.conf') }
        it { is_expected.to contain_file('/var/lib/couchpotato/Downloads') }
        it { is_expected.to contain_file('/var/lib/couchpotato/Movies') }
        it { is_expected.to contain_file('/var/lib/couchpotato') }

        it { is_expected.to contain_user('couchpotato') }
        it { is_expected.to contain_group('couchpotato') }
        it { is_expected.to contain_service('couchpotato') }
        it { is_expected.to contain_package('couchpotato').with_ensure('present') }
        if osfamily == 'RedHat'
          it { is_expected.to contain_file('/etc/sysconfig/couchpotato') }
          it { is_expected.to contain_yumrepo('http__nuxref.com_repo') }
          it { is_expected.to contain_couchpotato__repo__yum('http://nuxref.com/repo') }
        end
        if osfamily == 'Suse'
          it { is_expected.to contain_file('/etc/sysconfig/couchpotato') }
          it { is_expected.to contain_couchpotato__repo__zyp('http://download.opensuse.org/repositories/home:/waveclaw:/HTPC/SLE_12') }
          it { is_expected.to contain_zypprepo('http__download.opensuse.org_repositories_home_waveclaw_HTPC_SLE_12') }
        end
        if osfamily == 'Debian'
          it { is_expected.to contain_file('/etc/defaults/couchpotato') }
        end
      end
    describe "with selected parameters on #{osfamily}" do
        let(:params) {{
  :user_name           => 'loveseat',
  :user_home           => '/divan',
  :group_name          => 'couch',
  :repo_name           => 'http://nobody.com',
  :package_name        => 'tater',
  :service_name        => 'couch-tater',
  :config_file_path    => '/baz/config',
  :sysconfig_file_path => '/camera',
  :sysconfig_file_name => 'couchpotato',
  :data_path           => '/bar/data',
  :pidfile             => '/foo/pid',
  :servers             => {},
  :apikey              => '123456',
  :webuser             => 'nobody',
  :webpass             => '12345',
  :library             => '/baz',
  :target_path         => '/bar',
  :source_path         => '/foo',
  :servers             => {},
  :nzb                 => {},
  :torrent             => {},
  :automation          => {},
  :notification        => {},
        }}
        let(:facts) {{
          :osfamily => osfamily,
          :lsbdistid => lsbdist[osfamily.to_sym],
          :lsbdistcodename => lcd[osfamily.to_sym],
          :os_maj_version => 6,
          :architecture => 'x68_64'
        }}

        it { is_expected.to compile.with_all_deps }

        it { is_expected.to contain_class('couchpotato') }
        it { is_expected.to contain_class('couchpotato::defaults') }
        it { is_expected.to contain_class('couchpotato::users').that_comes_before('couchpotato::repo') }
        it { is_expected.to contain_class('couchpotato::repo').that_comes_before('couchpotato::install') }
        it { is_expected.to contain_class('couchpotato::install').that_comes_before('couchpotato::sysconfig') }
        it { is_expected.to contain_class('couchpotato::sysconfig').that_comes_before('couchpotato::config') }
        it { is_expected.to contain_class('couchpotato::config') }
        it { is_expected.to contain_class('couchpotato::service').that_subscribes_to('couchpotato::config') }
        it { is_expected.to contain_file('/var/lib/couchpotato/settings.conf') }

          it { is_expected.to contain_file('/bar/data') }
          it { is_expected.to contain_file('/bar') }
          it { is_expected.to contain_file('/camera/couchpotato') }
          it { is_expected.to contain_file('/foo') }
          it { is_expected.to contain_group('couch') }
          it { is_expected.to contain_package('tater') }
          it { is_expected.to contain_service('couch-tater') }
          it { is_expected.to contain_user('loveseat') }

        if osfamily == 'RedHat'
          it { is_expected.to contain_yumrepo('http__nobody.com') }
          it { is_expected.to contain_couchpotato__Repo__Yum('http://nobody.com') }
        end
        if osfamily == 'Suse'
          it { is_expected.to contain_zypprepo('http__nobody.com') }
          it { is_expected.to contain_couchpotato__Repo__Zyp('http://nobody.com') }
        end
        if osfamily == 'Debian'
# nothing unique, yet
        end
      end
    end
  end

  context 'unsupported operating system' do
    describe 'couchpotato class without any parameters on Solaris/Nexenta' do
      let(:facts) {{
        :osfamily        => 'Solaris',
        :operatingsystem => 'Nexenta',
      }}

      it { expect { is_expected.to contain_package('couchpotato') }.to raise_error(Puppet::Error, /Nexenta not supported/) }
    end
  end
end


text:
SYNONYM

#### According to
Index Fungorum

#### Published in
null

#### Original name
Dasyscypha glomeratus Velen.

### Remarks
null


text:
echoerr() { printf "%s\n" "$*" >&2; }

SEMAPHORE_PLAYBOOK_PATH="${SEMAPHORE_PLAYBOOK_PATH:-/semaphore}"
# Semaphore database env config
SEMAPHORE_DB_HOST="${SEMAPHORE_DB_HOST:-127.0.0.1}"
SEMAPHORE_DB_PORT="${SEMAPHORE_DB_PORT:-3306}"
SEMAPHORE_DB="${SEMAPHORE_DB:-semaphore}"
SEMAPHORE_DB_USER="${SEMAPHORE_DB_USER:-semaphore}"
SEMAPHORE_DB_PASS="${SEMAPHORE_DB_PASS:-semaphore}"
# Email alert env config
SEMAPHORE_WEB_ROOT="${SEMAPHORE_WEB_ROOT:-http://127.0.0.1:8081}"
# Semaphore Admin env config
SEMAPHORE_ADMIN="${SEMAPHORE_ADMIN:-admin}"
SEMAPHORE_ADMIN_EMAIL="${SEMAPHORE_ADMIN_EMAIL:-admin@localhost}"
SEMAPHORE_ADMIN_NAME="${SEMAPHORE_ADMIN_NAME:-Semaphore Admin}"
SEMAPHORE_ADMIN_PASSWORD="${SEMAPHORE_ADMIN_PASSWORD:-semaphorepassword}"
#Semaphore LDAP env config
SEMAPHORE_LDAP_ACTIVATED="${SEMAPHORE_LDAP_ACTIVATED:-no}"
SEMAPHORE_LDAP_HOST="${SEMAPHORE_LDAP_HOST:-}"
SEMAPHORE_LDAP_PORT="${SEMAPHORE_LDAP_PORT:-}"
SEMAPHORE_LDAP_NEEDTLS="${SEMAPHORE_LDAP_NEEDTLS:-no}"
SEMAPHORE_LDAP_DN_BIND="${SEMAPHORE_LDAP_DN_BIND:-}"
SEMAPHORE_LDAP_PASSWORD="${SEMAPHORE_LDAP_PASSWORD:-}"
SEMAPHORE_LDAP_DN_SEARCH="${SEMAPHORE_LDAP_DN_SEARCH:-}"
SEMAPHORE_LDAP_SEARCH_FILTER="${SEMAPHORE_LDAP_SEARCH_FILTER:-(uid=%s)}"
SEMAPHORE_LDAP_MAPPING_DN="${SEMAPHORE_LDAP_MAPPING_DN:-dn}"
SEMAPHORE_LDAP_MAPPING_USERNAME="${SEMAPHORE_LDAP_MAPPING_USERNAME:-uid}"
SEMAPHORE_LDAP_MAPPING_FULLNAME="${SEMAPHORE_LDAP_MAPPING_FULLNAME:-cn}"
SEMAPHORE_LDAP_MAPPING_EMAIL="${SEMAPHORE_LDAP_MAPPING_EMAIL:-mail}"

# create semaphore playbook directory
mkdir -p "${SEMAPHORE_PLAYBOOK_PATH}" || {
    echo "Can't create Semaphore playbook path '$SEMAPHORE_PLAYBOOK_PATH'."
    exit 1
}

# wait on db to be up
echoerr "Attempting to connect to database ${SEMAPHORE_DB} on ${SEMAPHORE_DB_HOST}:${SEMAPHORE_DB_PORT} with user ${SEMAPHORE_DB_USER} ..."
TIMEOUT=30
while ! mysqladmin ping -h"$SEMAPHORE_DB_HOST" -P "$SEMAPHORE_DB_PORT" -u "$SEMAPHORE_DB_USER" --password="$SEMAPHORE_DB_PASS" --silent >/dev/null 2>&1; do
    TIMEOUT=$(expr $TIMEOUT - 1)
    if [ $TIMEOUT -eq 0 ]; then
        echoerr "Could not connect to database server. Exiting."
        exit 1
    fi
    echo -n "."
    sleep 1
done

if [ ! -f "${SEMAPHORE_PLAYBOOK_PATH}/semaphore_config.json" ]; then
    echoerr "Generating ${SEMAPHORE_PLAYBOOK_PATH}/config.stdin ..."
    cat << EOF > "${SEMAPHORE_PLAYBOOK_PATH}/config.stdin"
${SEMAPHORE_DB_HOST}:${SEMAPHORE_DB_PORT}
${SEMAPHORE_DB_USER}
${SEMAPHORE_DB_PASS}
${SEMAPHORE_DB}
${SEMAPHORE_PLAYBOOK_PATH}
${SEMAPHORE_WEB_ROOT}
no
no
${SEMAPHORE_LDAP_ACTIVATED}
EOF

    if [ "${SEMAPHORE_LDAP_ACTIVATED}" = "yes" ]; then
        cat << EOF >> "${SEMAPHORE_PLAYBOOK_PATH}/config.stdin"
${SEMAPHORE_LDAP_HOST}:${SEMAPHORE_LDAP_PORT}
${SEMAPHORE_LDAP_NEEDTLS}
${SEMAPHORE_LDAP_DN_BIND}
${SEMAPHORE_LDAP_PASSWORD}
${SEMAPHORE_LDAP_DN_SEARCH}
${SEMAPHORE_LDAP_SEARCH_FILTER}
${SEMAPHORE_LDAP_MAPPING_DN}
${SEMAPHORE_LDAP_MAPPING_USERNAME}
${SEMAPHORE_LDAP_MAPPING_FULLNAME}
${SEMAPHORE_LDAP_MAPPING_EMAIL}
EOF
    fi;

    cat << EOF >> "${SEMAPHORE_PLAYBOOK_PATH}/config.stdin"
yes
${SEMAPHORE_ADMIN}
${SEMAPHORE_ADMIN_EMAIL}
${SEMAPHORE_ADMIN_NAME}
${SEMAPHORE_ADMIN_PASSWORD}
EOF
    /usr/bin/semaphore -setup < "${SEMAPHORE_PLAYBOOK_PATH}/config.stdin"

    ln -s "${SEMAPHORE_PLAYBOOK_PATH}/semaphore_config.json" /etc/semaphore/semaphore_config.json
fi

# run our command
exec "$@"


text:
_SM.__langbase = {
    'Text_Validate_Login_Button' : 'check',
    'Text_change_Password_Button' : 'change',
    'Text_Forgotten_Password' : 'lost',
    'Textfield_User_Login' : 'user',
    'Textfield_User_Email' : 'email',
    'Textfield_Password_Login' : 'password',
    'Textfield_New_Password' : 'new password',
    'Textfield_Confirm_Password' : 'confirm',
    'Title_Window_Email_Request' : 'Recover lost password',
    'Title_Window_Password_Change':'Change your password',

    'Text_Send_Button' : 'Submit',

    'Message_Enter_Email' : 'Type your email address',
    'Message_Success' : 'Success',
    'Message_Email_Forgotten_Password' : 'An email has been sent with the instructions',
    'Message_Email_New_Password' : 'An email has been sent with your new password',
    'Message_Success_Password_Change':'The password has been changed successfully',
    'Message_Error' : 'Error',
    'Message_Error_Login' : 'Unable to connect',

    'StatusBar_Message_Loading' : 'Loading'
};


text:
const pageCommands = {
  test(json) {
    this.click('@deleteIcon0');
    this.expect.element('@alertError').text.to.contain('At least 1 Master is required');

    this
      .click('@addMore')
      .setField('@mac0', 'abc')
      .expectValidationErrorContains('Invalid MAC address')
      .setField('@mac0', json.tectonic_metal_controller_macs[0])
      .setField('@hosts0', '%')
      .expectValidationErrorContains('Invalid format')
      .setField('@hosts0', json.tectonic_metal_controller_domains[0])
      .expectNoValidationError()
      .click('@addMore')
      .setField('@mac1', json.tectonic_metal_controller_macs[0])
      .expectValidationErrorContains('MACs must be unique')
      .click('@deleteIcon1')
      .click('@addMore')
      .setField('@hosts1', json.tectonic_metal_controller_domains[0])
      .expectValidationErrorContains('Hostnames must be unique')
      .click('@deleteIcon1')
      .expectNoValidationError();
  },
};

module.exports = {
  commands: [pageCommands],
  elements: {
    mac0: 'input[id="masters.0.mac"]',
    hosts0: 'input[id="masters.0.host"]',
    deleteIcon0: '.row:nth-child(1) i.fa-minus-circle',
    mac1: 'input[id="masters.1.mac"]',
    hosts1: 'input[id="masters.1.host"]',
    deleteIcon1: '.row:nth-child(2) i.fa-minus-circle',
    addMore: {
      selector: '//*[text()[contains(.,"Add More")]]',
      locateStrategy: 'xpath',
    },
    alertError: '.alert-error',
  },
};


text:
/*
 * ScanLine.cpp
 *
 *  Created on: 14.03.2015
 *      Author: kdorer
 */

#include "ScanLine.h"
#include <iostream>

using namespace A2O;
using namespace std;
using namespace cv;

ScanLine::ScanLine(int x1, int y1, int x2, int y2) : _line(x1, y1, x2, y2) {
	_line.getLinePoints(_points);
	currentPoint = 0;
}

ScanLine::~ScanLine() {
}

LineDetection ScanLine::findLine(Mat& edges, Rect& area, bool startAnew,
		float minDistance, float maxDistance, Eigen::Vector3d distPoint,
		Angle slopeLimit, bool isMaxSlopeLimit, int direction)
{
	LineDetection result;
	int angle = 0;
	bool slopeBad = false;
	float distancex = 0;
	do {
		if (startAnew) {
			result = findFirstLane(edges, area, direction);
			startAnew = false;
		} else {
			result = findNextLane(edges, area, direction);
		}

		if (result.valid) {
			distancex = result.startK(0) - distPoint(0);
			if (distancex > maxDistance) {
				// we will not find a line in range
				result.valid = false;
			}

			angle = (int) result.line.getSlope().deg();
			if (isMaxSlopeLimit) {
				slopeBad = abs(angle) > slopeLimit.deg();
			} else {
				slopeBad = abs(angle) < slopeLimit.deg();
			}
		}

	} while (result.valid && (slopeBad || distancex < minDistance));

	return result;
}

LineDetection ScanLine::findFirstLane(Mat& mat, Rect& area, int direction, bool bothWays) {
	currentPoint = 0;
	return findNextLane(mat, area, direction, bothWays);
}

LineDetection ScanLine::findNextLane(Mat& mat, Rect& area, int direction, bool bothWays) {
	LineDetection resultLane;
	Line slopeLine;

	// skip already searched points
	int i = 0;
	auto it = _points.begin();
	for (; it != _points.end() && i < currentPoint; ++it) {
		i++;
	}

	// search for lines
	for (; it != _points.end() && !resultLane.valid; ++it) {
		resultLane = findStraightLine(mat, area, *it, direction, slopeLine);
		currentPoint++;
	}
	if (resultLane.valid) {
		resultLane.scanCutP = resultLane.line.start;
		if (bothWays) {
			// search from scan point to the other direction
			slopeLine = Line(resultLane.line.end, resultLane.line.start);
			LineDetection rightLane2 = findStraightLine(mat, area, resultLane.line.start, ((direction + 4) % 8), slopeLine);
			if (rightLane2.valid) {
				// append the two lines
				resultLane.line.start = rightLane2.line.end;
				resultLane.startK = rightLane2.endK;
			}
		}
	}

	return resultLane;
}

LineDetection ScanLine::findStraightLine(Mat& mat, Rect& area, Point scanStart, int direction, Line slopeLine) {

	LineDetection result;
	int minLineLength = 7;
	Point cp(scanStart.x, scanStart.y);

	if (!area.contains(cp)) {
		// outside range
		return result;
	}

	int lastmx = cp.x;
	int lastmy = cp.y;
	bool hadSlope = slopeLine.isValid();
	bool pixAt =  mat.at<uchar>(cp.y, cp.x) >= 255;

	int count = 0;
	bool badslope = false;
	int slopeDeviation = 0;
	while (area.contains(cp) && pixAt) {
		Point nextPoint = cp;
		pixAt = gotoNextPoint(mat, nextPoint, direction);
		if (area.contains(nextPoint)) {
			cp = nextPoint;
			count++;
			if (count % minLineLength == 0) {
				if (count < minLineLength + 1 && !hadSlope) {
					// the first n pixels detected
					slopeLine = Line(scanStart, cp);
					lastmx = cp.x;
					lastmy = cp.y;
				} else {
					if (count < minLineLength * 2 + 1 && !hadSlope) {
						// we take the first two pieces
						slopeLine = Line(scanStart, cp);
					}
					// check if still straight
					int newSlopeDeviation = slopeLine.checkSameDirection(lastmx, lastmy, cp.x, cp.y, Angle::deg(10));
					if (abs(newSlopeDeviation + slopeDeviation) > 1) {
						// twice in a row in same direction
						badslope = true;
						break;
					} else if (newSlopeDeviation == 0) {
						// we have no violation
						lastmx = cp.x;
						lastmy = cp.y;
					}
					slopeDeviation = newSlopeDeviation;
				}
			}
		} else {
			// we have left the area
			pixAt = false;
		}
	}

	if (slopeDeviation != 0) {
		// we had a deviation before ending
		cp.x = lastmx;
		cp.y = lastmy;
	}

	if (count > minLineLength) {
		result.line.start.x = scanStart.x;
		result.line.start.y = scanStart.y;
		result.line.end.x = cp.x;
		result.line.end.y = cp.y;
		result.endedBadSlope = badslope;
		result.valid = true;
		result.startK = pixelToCamera(scanStart);
		result.endK = pixelToCamera(cp);
	}

	return result;
}

CurveDetection ScanLine::findRightCurve(Mat& mat, Point scanStart) {

	vector<Point> points;
	// we start to search left top and continue right top
	getCurvePoints(mat, scanStart, 1, points);
	Point nextStart = scanStart;
	if (points.size() > 0) {
		nextStart = points.at(points.size() - 1);
	}
	getCurvePoints(mat, nextStart, 7, points);

	if (points.size() < 15) {
		// invalid curve
		CurveDetection result;
		return result;
	}

	if (points.size() < 30) {
		// could be a left curve so try to find more pixels
		getCurvePoints(mat, points.at(points.size() - 1), 1, points);
	}

	return setCurveResult(points);
}

CurveDetection ScanLine::findLeftCurve(Mat& mat, Point scanStart) {

	CurveDetection result;
	vector<Point> points;
	getCurvePoints(mat, scanStart, 7, points);
	Point nextStart = scanStart;
	if (points.size() > 0) {
		nextStart = points.at(points.size() - 1);
	}
	getCurvePoints(mat, nextStart, 1, points);

	if (points.size() < 8) {
		// invalid curve
		return result;
	}

	return setCurveResult(points);
}

CurveDetection ScanLine::setCurveResult(vector<Point> points) {
	CurveDetection result;
	result.valid = true;
	result.start = points.at(0);
	result.startK = pixelToCamera(result.start);
	result.middle = points.at(points.size() / 2);
	result.middleK = pixelToCamera(result.middle);
	result.end = points.at(points.size() - 1);
	result.endK = pixelToCamera(result.end);
	// result.calculateAlternativeMiddle();
	result.calculateMiddle();
	// result.calculateCurveRadius();
	if (result.radius < 0.2 || result.radius > 4) {
		// looks more like a straight line
		result.valid = false;
	}
	return result;
}

void ScanLine::getCurvePoints(Mat& mat, Point scanStart, int direction, vector<Point>& points) {

	Point cp(scanStart.x, scanStart.y);
	if (cp.x < 1 || cp.x > 638 || cp.y < 1 || cp.y > 238) {
		// outside range
		return;
	}

	bool pixAt =  mat.at<uchar>(cp.y, cp.x) >= 255;

	int count = 0;
	while ((cp.x > 0) && (cp.x < _cfg.width - 1) && (cp.y > 0) && (cp.y < _cfg.height / 2 - 1) && pixAt) {
		pixAt = gotoNextPoint(mat, cp, direction);
		count++;
		if (pixAt) {
			points.push_back(Point(cp));
		}
	}
}

bool ScanLine::gotoNextPoint(Mat& mat, Point& currentPoint, int direction)
{
	int x = currentPoint.x;
	int y = currentPoint.y;
	bool nextPixel = mat.at<uchar>(y + dirDelta[direction][1], x + dirDelta[direction][0]) >= 255;
	if (nextPixel) {
		x += dirDelta[direction][0];
		y += dirDelta[direction][1];
	} else {
		nextPixel = mat.at<uchar>(y + dirDelta[direction][3], x + dirDelta[direction][2]) >= 255;
		if (nextPixel) {
			x += dirDelta[direction][2];
			y += dirDelta[direction][3];
		} else {
			nextPixel = mat.at<uchar>(y + dirDelta[direction][5], x + dirDelta[direction][4]) >= 255;
			if (nextPixel) {
				x += dirDelta[direction][4];
				y += dirDelta[direction][5];
			}
		}
	}
	if (nextPixel) {
		currentPoint.x = x;
		currentPoint.y = y;
	}
	return nextPixel;
}

Eigen::Vector3d ScanLine::pixelToCamera(Point pixel)
{
	int y = -pixel.y;
	if (y == 0) {
		y = 1;
	}

	float xf = (-_cfg.heightCamera * _cfg.focalVertical) / y;
	float yf = (pixel.x - _cfg.xCenter) * xf / _cfg.focalHorizontal;

	Eigen::Vector3d result(xf / 1000.0, -(yf / 1000.0), 0);
	return result;
}


text:
namespace navigation_actions
{

    class GoalCreatorROSNavigation : public continual_planning_executive::GoalCreator
    {
        public:
            GoalCreatorROSNavigation();
            ~GoalCreatorROSNavigation();

            virtual bool fillStateAndGoal(SymbolicState & currentState, SymbolicState & goal);
    };

};

#endif