text:
using System;
using System.Reflection;
using Manisero.DSLExecutor.Domain.ExpressionsDomain;
using Manisero.DSLExecutor.Parser.SampleDSL.Parsing.Tokens;

namespace Manisero.DSLExecutor.Parser.SampleDSL.ExpressionGeneration.ConstantExpressionGeneration
{
    public interface IConstantExpressionGenerator
    {
        IConstantExpression Generate(Literal literal);
    }

    public class ConstantExpressionGenerator : IConstantExpressionGenerator
    {
        private readonly Lazy<MethodInfo> _createConstantExpressionMethod;

        public ConstantExpressionGenerator()
        {
            _createConstantExpressionMethod = new Lazy<MethodInfo>(() => GetType().GetMethod(nameof(CreateConstantExpression),
                                                                                BindingFlags.Instance | BindingFlags.NonPublic));
        }

        public IConstantExpression Generate(Literal literal)
        {
            try
            {
                var tResult = literal.Value != null
                                  ? literal.Value.GetType()
                                  : typeof(object);

                return (IConstantExpression)_createConstantExpressionMethod.Value
                                                                           .MakeGenericMethod(tResult)
                                                                           .Invoke(this,
                                                                                new object[] { literal.Value });
            }
            catch (TargetInvocationException exception)
            {
                throw exception.InnerException;
            }
        }

        private ConstantExpression<TResult> CreateConstantExpression<TResult>(TResult value)
        {
            return new ConstantExpression<TResult>
                {
                    Value = value
                };
        }
    }
}


text:
$(document).ready(function() {
  navigator.geolocation.getCurrentPosition(function(position) {
    loadWeather(position.coords.latitude+','+position.coords.longitude); //load weather using your lat/lng coordinates
  });
});

function loadWeather(location, woeid) {
  $.simpleWeather({
    location: location,
    woeid: woeid,
    unit: 'c',
    success: function(weather) {
      html = '
 '+weather.temp+'°'+weather.units.temp+'
';
        html += '

'+weather.city+', '+weather.region+'
';

      $("#weather").html(html);
    },
    error: function(error) {
      $("#weather").html('
'+error+'
');
    }
  });
}

redpajama_set_name: RedPajamaGithub


text:
package main

import (
	"database/sql"
	"inventory/acme"
	"inventory/postgres"
	"inventory/transport/http"
	"inventory/transport/rpc"
	"log"
	"net"
)

func main() {

	db, err := sql.Open("postgres",
		"docker:docker@tcp(127.0.0.1:5432)/inventory")
	if err != nil {
		log.Fatal(err)
	}
	defer db.Close()

	// create data storage
	orderStore := postgres.NewOrderService(db)
	productStore := postgres.NewProductService(db)
	supplierStore := postgres.NewSupplierService(db)

	// supplier service
	acmeClient := acme.NewClient("https://acme.com/api")

	// rest http network listener
	hl, err := net.Listen("tcp", ":8080")
	if err != nil {
		log.Fatal("listen error:", err)
	}

	// rpc network listener
	rl, err := net.Listen("tcp", ":8081")
	if err != nil {
		log.Fatal("listen error:", err)
	}

	restServer := http.NewRESTService(orderStore, supplierStore, acmeClient, productStore)
	rpcServer := rpc.NewRPCService(orderStore, supplierStore, acmeClient, productStore)

	go func() {
		err := restServer.Serve(hl)
		if err != nil {
			panic(err)
		}
	}()

	go func() {
		err := rpcServer.Serve(rl)
		if err != nil {
			panic(err)
		}
	}()

	<-make(chan struct{}) // block forever
}


text:
'use strict';

goog.require('grrUi.flow.module');
goog.require('grrUi.tests.module');

describe('flow results directive', function() {
  var $compile, $rootScope;

  beforeEach(module('/static/angular-components/flow/flow-results.html'));
  beforeEach(module(grrUi.flow.module.name));
  beforeEach(module(grrUi.tests.module.name));

  // Stub out grrResultsCollection directive, as all rendering is going
  // to be delegated to it.
  grrUi.tests.stubDirective('grrResultsCollection');

  beforeEach(inject(function($injector) {
    $compile = $injector.get('$compile');
    $rootScope = $injector.get('$rootScope');
  }));

  var renderTestTemplate = function(flowUrn) {
    $rootScope.flowUrn = flowUrn;

    var template = '<grr-flow-results flow-urn="flowUrn" />';
    var element = $compile(template)($rootScope);
    $rootScope.$apply();

    return element;
  };

  it('delegates rendering to grr-results-collection directive', function() {
    var element = renderTestTemplate('aff4:/C.0000111122223333/flows/F:1234');
    var directive = element.find('grr-results-collection:nth(0)');
    expect(directive.length).toBe(1);
  });

  it('handles flow urn starting with aff4', function() {
    var element = renderTestTemplate('aff4:/C.0000111122223333/flows/F:1234');
    var directive = element.find('grr-results-collection:nth(0)');
    expect(directive.scope().$eval(directive.attr('results-url'))).toEqual(
        '/clients/C.0000111122223333/flows/F:1234/results');
    expect(
        directive.scope().$eval(directive.attr('output-plugins-url'))).toEqual(
            '/clients/C.0000111122223333/flows/F:1234/output-plugins');
    expect(
        directive.scope().$eval(directive.attr('download-files-url'))).toEqual(
            '/clients/C.0000111122223333/flows/F:1234/results/archive-files');
  });

  it('handles flow urn not starting with aff4', function() {
    var element = renderTestTemplate('C.0000111122223333/flows/F:1234');
    var directive = element.find('grr-results-collection:nth(0)');
    expect(directive.scope().$eval(directive.attr('results-url'))).toEqual(
        '/clients/C.0000111122223333/flows/F:1234/results');
    expect(
        directive.scope().$eval(directive.attr('output-plugins-url'))).toEqual(
            '/clients/C.0000111122223333/flows/F:1234/output-plugins');
    expect(
        directive.scope().$eval(directive.attr('download-files-url'))).toEqual(
            '/clients/C.0000111122223333/flows/F:1234/results/archive-files');
  });

});


text:
"""
Example demonstrating the usage for the quadratic-fit scenario.
"""

import numpy as np
import matplotlib.pyplot as plt
import sys
sys.path.insert(0,'../src')
from mcmc import MCMC

#----------------------------------------------------------

class QuadraticFit(MCMC):
	"""
	Extends the original MCMC class to sample the parameters of a quadratic model (y = ax^2 + bx + c)

	Parameters
	-----------
	MCMC (Class): Parent MCMC class.
	a (Float): Feducial value of the a parameter.
	b (Float): Feducial value of the b parameter.
	c (Float): Feducial value of the c parameter.
	RedStd (Float): Feducial value of the standard deviation of the linear data.
	"""
	def __init__(self, a=1.0, b=10.0, c=25.0, RedStd=15.0):

		MCMC.__init__(self, TargetAcceptedPoints=10000, \
				NumberOfParams=3, Mins=[-5.0, 5.0, 20], Maxs=[5.0, 15.0, 30.0], SDs=[0.7,4.0,7.0], alpha=0.01,\
				write2file=True, outputfilename='chain.mcmc', randomseed=250192)

		self.X=np.linspace(0, 10, 25)
		self.delta = np.random.uniform(low=-1*RedStd, high=RedStd, size=len(self.X))
		self.Y = (a*self.X**2 + b*self.X + c) + self.delta

#----------------------------------------------------------

	def FittingFunction(self, Params):
		"""
		Parametric form of the model.

		Parameters
		----------
		Params (1d array): Numpy array containing values of the parameters.

		Returns
		-------
		model values (y = ax^2 + bx + c)
		"""
		return Params[0]*self.X**2 + Params[1]*self.X + Params[2]

#----------------------------------------------------------

	def chisquare(self, Params):
		"""
		Computes Chi-square.

		Parameters
		----------
		Params (1d array): Numpy array containing values of the parameters.

		Returns
		-------
		chi square.
		"""
		kisquare = ((self.Y-self.FittingFunction(Params))/self.delta)**2
		return np.sum(kisquare)

#==============================================================================

if __name__=="__main__":
	co = QuadraticFit()
	print co.MainChain()


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$PROJECT_DIR$/TPO-MNNIT.iml" filepath="$PROJECT_DIR$/TPO-MNNIT.iml" />
      <module fileurl="file://$PROJECT_DIR$/TPOmnnit.iml" filepath="$PROJECT_DIR$/TPOmnnit.iml" />
      <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
      <module fileurl="file://$PROJECT_DIR$/folding-cell/folding-cell.iml" filepath="$PROJECT_DIR$/folding-cell/folding-cell.iml" />
    </modules>
  </component>
</project>


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace irXFindUnusedSchema
{
    /// <summary>
    /// Interaction logic for UserControl1.xaml
    /// </summary>
    public partial class DisplayForm : Window
    {
        public DisplayForm()
        {

            InitializeComponent();
        }

        public string TheText
        {
            get
            {
                return TheTextBox.Text;
            }
            set
            {
                TheTextBox.Text = value;
            }
        }

        private void CloseItButton_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }

    }


text:
require 'spec_helper'

RSpec.describe Gitlab::BackgroundMigration::CopyMergeRequestTargetProjectToMergeRequestMetrics, :migration, schema: 20200723125205 do
  let(:migration) { described_class.new }

  let_it_be(:namespaces) { table(:namespaces) }
  let_it_be(:projects) { table(:projects) }
  let_it_be(:merge_requests) { table(:merge_requests) }
  let_it_be(:metrics) { table(:merge_request_metrics) }

  let!(:namespace) { namespaces.create!(name: 'namespace', path: 'namespace') }
  let!(:project_1) { projects.create!(namespace_id: namespace.id) }
  let!(:project_2) { projects.create!(namespace_id: namespace.id) }
  let!(:merge_request_to_migrate_1) { merge_requests.create!(source_branch: 'a', target_branch: 'b', target_project_id: project_1.id) }
  let!(:merge_request_to_migrate_2) { merge_requests.create!(source_branch: 'c', target_branch: 'd', target_project_id: project_2.id) }
  let!(:merge_request_without_metrics) { merge_requests.create!(source_branch: 'e', target_branch: 'f', target_project_id: project_2.id) }

  let!(:metrics_1) { metrics.create!(merge_request_id: merge_request_to_migrate_1.id) }
  let!(:metrics_2) { metrics.create!(merge_request_id: merge_request_to_migrate_2.id) }

  let(:merge_request_ids) { [merge_request_to_migrate_1.id, merge_request_to_migrate_2.id, merge_request_without_metrics.id] }

  subject { migration.perform(merge_request_ids.min, merge_request_ids.max) }

  it 'copies `target_project_id` to the associated `merge_request_metrics` record' do
    subject

    expect(metrics_1.reload.target_project_id).to eq(project_1.id)
    expect(metrics_2.reload.target_project_id).to eq(project_2.id)
  end

  it 'does not create metrics record when it is missing' do
    subject

    expect(metrics.find_by_merge_request_id(merge_request_without_metrics.id)).to be_nil
  end
end


text:
package azkaban.metrics;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.within;

import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.Snapshot;
import org.junit.Before;
import org.junit.Test;

public class CommonMetricsTest {

  private MetricsTestUtility testUtil;
  private CommonMetrics metrics;

  @Before
  public void setUp() {
    final MetricRegistry metricRegistry = new MetricRegistry();
    this.testUtil = new MetricsTestUtility(metricRegistry);
    this.metrics = new CommonMetrics(new MetricsManager(metricRegistry));
  }

  @Test
  public void testOOMWaitingJobMetrics() {
    final String metricName = CommonMetrics.OOM_WAITING_JOB_COUNT_NAME;

    assertThat(this.testUtil.getCounterValue(metricName)).isEqualTo(0);
    this.metrics.incrementOOMJobWaitCount();
    assertThat(this.testUtil.getCounterValue(metricName)).isEqualTo(1);

    this.metrics.decrementOOMJobWaitCount();
    assertThat(this.testUtil.getCounterValue(metricName)).isEqualTo(0);
  }

  @Test
  public void testSubmitMetrics() {
    assertThat(this.testUtil.getMeterValue(CommonMetrics.SUBMIT_FLOW_FAIL_METER_NAME)).isEqualTo(0);
    this.metrics.markSubmitFlowFail();
    assertThat(this.testUtil.getMeterValue(CommonMetrics.SUBMIT_FLOW_FAIL_METER_NAME)).isEqualTo(1);

    assertThat(this.testUtil.getMeterValue(CommonMetrics.SUBMIT_FLOW_SKIP_METER_NAME)).isEqualTo(0);
    this.metrics.markSubmitFlowSkip();
    assertThat(this.testUtil.getMeterValue(CommonMetrics.SUBMIT_FLOW_SKIP_METER_NAME)).isEqualTo(1);

    assertThat(this.testUtil.getMeterValue(CommonMetrics.SUBMIT_FLOW_SUCCESS_METER_NAME)).isEqualTo(0);
    this.metrics.markSubmitFlowSuccess();
    assertThat(this.testUtil.getMeterValue(CommonMetrics.SUBMIT_FLOW_SUCCESS_METER_NAME)).isEqualTo(1);
  }

  @Test
  public void testQueueWaitMetrics() {
    final double delta = 0.001;

    this.metrics.addQueueWait(500L);
    this.metrics.addQueueWait(600L);
    this.metrics.addQueueWait(1000L);
    final Snapshot snapshot = this.testUtil
        .getHistogramSnapshot(CommonMetrics.QUEUE_WAIT_HISTOGRAM_NAME);
    assertThat(snapshot.getMedian()).isCloseTo(600.0, within(delta));
    assertThat(snapshot.getMean()).isCloseTo(700.0, within(delta));
    assertThat(snapshot.getMin()).isEqualTo(500);
    assertThat( snapshot.getMax()).isEqualTo(1000);
  }
}


text:
package ru.gc986.SQLClient.parse;

import java.util.ArrayList;

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

/**Парсинг данных с сервера
 * @author Язовцев Игорь
 * @version 1
 * @since 2015
 * */

public class DATA_parser {

	/**Количество записей*/
	public int recordsCount = 0;

	/**Структура записи, перечисление полей*/
	public String [] structure;

	/**Список данных*/
	public ArrayList<String[]> listData;

	/**Исходный JSON*/
	public String dataJSON = "";

	/**Сообщения об ошибке*/
	public String error = "";

	/**Статус запроса*/
	public String status = "";

	public DATA_parser(String dataJSON){
		this.dataJSON = dataJSON;
		parse(this.dataJSON);
	}

	/**Парсинг*/
	private void parse(String data){
		try {
			// корень
			JSONObject main = new JSONObject(data);
			// Статус запроса
			status = main.getString("status");
			// количество записей
			recordsCount = Integer.parseInt(main.getString("recordsCount"));
			// массив структуры полей
			structure = new String[Integer.parseInt(main.getString("fieldsCount"))];
			JSONArray structureArr = main.getJSONArray("fileds");
			for(int i = 0 ; i < structure.length ; i++)
				structure[i] = structureArr.getString(i);
			// Данные
			listData = new ArrayList<String[]>();
			JSONArray dataArray = main.getJSONArray("data");
			for(int i = 0 ; i < dataArray.length() ; i++){
				JSONArray inDataArray = dataArray.getJSONArray(i);
				String[] mass = new String[inDataArray.length()];
				for(int i2 = 0 ; i2 < mass.length ; i2++)
				{
					mass[i2] = inDataArray.getString(i2);
				}
				// Добавляем данные в список
				listData.add(mass);
			}
		} catch (JSONException e) {
			// Обработка ошибки парсига
			e.printStackTrace();
			error = "#ERR:JSONException:"+e.getMessage();
			structure = null;
			recordsCount = 0;
			listData = null;
		} catch (Exception e){
			// Обработка остальных ошибок
			e.printStackTrace();
			error = "#ERR:Exception:"+e.getMessage();
			structure = null;
			recordsCount = 0;
			listData = null;
		}
	}

}


text:
import pytest

def check_is_oep_explicitly_satisfied(openedx_yaml, oep):

    if openedx_yaml is None:
        pytest.xfail("No openedx.yaml found")

    if 'oeps' not in openedx_yaml:
        pytest.xfail("No 'oeps' key in openedx.yaml")

    oep_key = f'oep-{oep}'

    assert oep_key in openedx_yaml['oeps']

    oep_value = openedx_yaml['oeps'][oep_key]

    if isinstance(oep_value, dict):
        if not oep_value.get('applicable', True):
            pytest.xfail('OEP is not applicable')
            return

        if not oep_value['state']:
            pytest.xfail(oep_value['reason'])
    else:
        assert oep_value


text:
package de.unioninvestment.eai.portal.portlet.crud.domain.events;

import de.unioninvestment.eai.portal.support.vaadin.mvp.EventHandler;

/**
 *
 * Schnittstelle für die Behandlung von {@link HideEvent}s.
 *
 * @param <T>
 *            Typ der Event-Quelle
 *
 * @author max.hartmann
 */
public interface HideEventHandler<T> extends EventHandler {

	/**
	 *
	 * @param event
	 *            HideEvent
	 */
	void onHide(HideEvent<T> event);
}


text:
<?php

// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.

defined('MOODLE_INTERNAL') || die();

$string['dataformembed:addinstance'] = 'Añadir un nuevo dataform incrustado';
$string['missingview'] = 'Usted debe seleccionar una vista o limpiar la selección de dataform';
$string['modulename'] = 'Dataform (formulario de datos)  incrustado';
$string['modulename_help'] = 'Dataform incrustado habilita una vista de dataform que se inserta en un marco interno dentro de las ligas de la actividad en la página del curso.';
$string['modulenameplural'] = 'Dataform (formularios de datos) incrustados';
$string['pluginadministration'] = 'Administración de Dataform incrustado';
$string['pluginname'] = 'Dataform incrustado';
$string['selectdataform'] = 'Seleccionar dataform';
$string['selectfilter'] = 'Seleccionar filtro';
$string['selectview'] = 'Seleccionar vista';
$string['style'] = 'Estilo CSS contenedor';


text:
@interface RayNavigationTransition : NSObject <UIViewControllerAnimatedTransitioning>

@end


text:
package fr.imie.service;

import java.util.List;

import javax.ejb.Local;

import fr.imie.DTO.Manager;
import fr.imie.DTO.User;

@Local
public interface IUserService {

	public abstract List<User> findAll();

	public abstract List<User> findByNomPrenom(String nom, String prenom);

	public abstract void createManager(Manager manager);

	public abstract void deleteManagerById(int idUser);

	public abstract User findById(Integer idUser);

	public abstract Manager findManagerById(Integer idUser);

	public abstract void updateManager(Manager manager);

	void initData();

}


text:
package org.jasig.cas.authentication;

import com.google.common.base.Functions;
import com.google.common.collect.Maps;
import org.jasig.cas.MessageDescriptor;
import org.jasig.cas.authentication.handler.support.AbstractUsernamePasswordAuthenticationHandler;
import org.jasig.cas.authentication.principal.Principal;
import org.jasig.cas.authentication.support.LdapPasswordPolicyConfiguration;
import org.ldaptive.LdapAttribute;
import org.ldaptive.LdapEntry;
import org.ldaptive.LdapException;
import org.ldaptive.ReturnAttributes;
import org.ldaptive.auth.AuthenticationRequest;
import org.ldaptive.auth.AuthenticationResponse;
import org.ldaptive.auth.AuthenticationResultCode;
import org.ldaptive.auth.Authenticator;

import javax.annotation.PostConstruct;
import javax.security.auth.login.AccountNotFoundException;
import javax.security.auth.login.FailedLoginException;
import javax.security.auth.login.LoginException;
import javax.validation.constraints.NotNull;
import java.security.GeneralSecurityException;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * LDAP authentication handler that uses the ldaptive Authenticator component underneath.
 * This handler provides simple attribute resolution machinery by reading attributes from the entry
 * corresponding to the DN of the bound user (in the bound security context) upon successful authentication.
 * Principal resolution is controlled by the following properties:
 *
 *

 *
{@link #setPrincipalIdAttribute(String)}

 *
{@link #setPrincipalAttributeMap(java.util.Map)}

 *

 *
 * @author Marvin S. Addison
 * @since 4.0.0
 */
public class LdapAuthenticationHandler extends AbstractUsernamePasswordAuthenticationHandler {

    /** Mapping of LDAP attribute name to principal attribute name. */
    @NotNull
    protected Map<String, String> principalAttributeMap = Collections.emptyMap();

    /** List of additional attributes to be fetched but are not principal attributes. */
    @NotNull
    protected List<String> additionalAttributes = Collections.emptyList();

    /**
     * Performs LDAP authentication given username/password.
     **/
    @NotNull
    private final Authenticator authenticator;

    /** Component name. */
    @NotNull
    private String name = LdapAuthenticationHandler.class.getSimpleName();

    /** Name of attribute to be used for resolved principal. */
    private String principalIdAttribute;

    /** Flag indicating whether multiple values are allowed fo principalIdAttribute. */
    private boolean allowMultiplePrincipalAttributeValues;

    /** Set of LDAP attributes fetch from an entry as part of the authentication process. */
    private String[] authenticatedEntryAttributes = ReturnAttributes.NONE.value();

    /**
     * Creates a new authentication handler that delegates to the given authenticator.
     *
     * @param  authenticator  Ldaptive authenticator component.
     */
    public LdapAuthenticationHandler(@NotNull final Authenticator authenticator) {
        this.authenticator = authenticator;
    }

    /**
     * Sets the component name. Defaults to simple class name.
     *
     * @param  name  Authentication handler name.
     */
    @Override
    public void setName(final String name) {
        this.name = name;
    }

    /**
     * Sets the name of the LDAP principal attribute whose value should be used for the
     * principal ID.
     *
     * @param attributeName LDAP attribute name.
     */
    public void setPrincipalIdAttribute(final String attributeName) {
        this.principalIdAttribute = attributeName;
    }

    /**
     * Sets a flag that determines whether multiple values are allowed for the {@link #principalIdAttribute}.
     * This flag only has an effect if {@link #principalIdAttribute} is configured. If multiple values are detected
     * when the flag is false, the first value is used and a warning is logged. If multiple values are detected
     * when the flag is true, an exception is raised.
     *
     * @param allowed True to allow multiple principal ID attribute values, false otherwise.
     */
    public void setAllowMultiplePrincipalAttributeValues(final boolean allowed) {
        this.allowMultiplePrincipalAttributeValues = allowed;
    }

    /**
     * Sets the mapping of additional principal attributes where the key is the LDAP attribute
     * name and the value is the principal attribute name. The key set defines the set of
     * attributes read from the LDAP entry at authentication time. Note that the principal ID attribute
     * should not be listed among these attributes.
     *
     * @param attributeNameMap Map of LDAP attribute name to principal attribute name.
     */
    public void setPrincipalAttributeMap(final Map<String, String> attributeNameMap) {
        this.principalAttributeMap = attributeNameMap;
    }

    /**
     * Sets the mapping of additional principal attributes where the key and value is the LDAP attribute
     * name. Note that the principal ID attribute
     * should not be listed among these attributes.
     *
     * @param attributeList List of LDAP attribute names
     */
    public void setPrincipalAttributeList(final List<String> attributeList) {
        this.principalAttributeMap = Maps.uniqueIndex(attributeList, Functions.toStringFunction());
    }

    /**
     * Sets the list of additional attributes to be fetched from the user entry during authentication.
     * These attributes are not bound to the principal.
     *

     * A common use case for these attributes is to support password policy machinery.
     *
     * @param additionalAttributes List of operational attributes to fetch when resolving an entry.
     */
    public void setAdditionalAttributes(final List<String> additionalAttributes) {
        this.additionalAttributes = additionalAttributes;
    }

    @Override
    protected HandlerResult authenticateUsernamePasswordInternal(final UsernamePasswordCredential upc)
            throws GeneralSecurityException, PreventedException {
        final AuthenticationResponse response;
        try {
            logger.debug("Attempting LDAP authentication for {}", upc);
            final String password = getPasswordEncoder().encode(upc.getPassword());
            final AuthenticationRequest request = new AuthenticationRequest(upc.getUsername(),
                    new org.ldaptive.Credential(password),
                    this.authenticatedEntryAttributes);
            response = this.authenticator.authenticate(request);
        } catch (final LdapException e) {
            logger.trace(e.getMessage(), e);
            throw new PreventedException("Unexpected LDAP error", e);
        }
        logger.debug("LDAP response: {}", response);

        final List<MessageDescriptor> messageList;

        final LdapPasswordPolicyConfiguration ldapPasswordPolicyConfiguration =
                (LdapPasswordPolicyConfiguration) super.getPasswordPolicyConfiguration();
        if (ldapPasswordPolicyConfiguration != null) {
            logger.debug("Applying password policy to {}", response);
            messageList = ldapPasswordPolicyConfiguration.getAccountStateHandler().handle(
                    response, ldapPasswordPolicyConfiguration);
        } else {
            logger.debug("No ldap password policy configuration is defined");
            messageList = Collections.emptyList();
        }

        if (response.getResult()) {
            logger.debug("LDAP response returned as result. Creating the final LDAP principal");
            return createHandlerResult(upc, createPrincipal(upc.getUsername(), response.getLdapEntry()), messageList);
        }

        if (AuthenticationResultCode.DN_RESOLUTION_FAILURE == response.getAuthenticationResultCode()) {
            logger.warn("DN resolution failed. {}", response.getMessage());
            throw new AccountNotFoundException(upc.getUsername() + " not found.");
        }
        throw new FailedLoginException("Invalid credentials");
    }

    /**
     * Examine account state to see if any errors are present.
     * If so, throws the relevant security exception.
     *
     * @param response the response
     * @throws LoginException the login exception
     */
    /**
     * Handle post authentication processing.
     *
     * @param credential the credential
     * @return the handler result
     */
    @Override
    public boolean supports(final Credential credential) {
        return credential instanceof UsernamePasswordCredential;
    }

    @Override
    public String getName() {
        return this.name;
    }

    /**
     * Creates a CAS principal with attributes if the LDAP entry contains principal attributes.
     *
     * @param username Username that was successfully authenticated which is used for principal ID when
     *                 {@link #setPrincipalIdAttribute(String)} is not specified.
     * @param ldapEntry LDAP entry that may contain principal attributes.
     *
     * @return Principal if the LDAP entry contains at least a principal ID attribute value, null otherwise.
     *
     * @throws LoginException On security policy errors related to principal creation.
     */
    protected Principal createPrincipal(final String username, final LdapEntry ldapEntry) throws LoginException {
        logger.debug("Creating LDAP principal for {} based on {}", username, ldapEntry.getDn());
        final String id;
        if (this.principalIdAttribute != null) {
            final LdapAttribute principalAttr = ldapEntry.getAttribute(this.principalIdAttribute);
            if (principalAttr == null || principalAttr.size() == 0) {
                throw new LoginException(this.principalIdAttribute + " attribute not found for " + username);
            }

            if (principalAttr.size() > 1) {
                if (this.allowMultiplePrincipalAttributeValues) {
                    logger.warn(
                            "Found multiple values for principal ID attribute: {}. Using first value={}.",
                            principalAttr,
                            principalAttr.getStringValue());
                } else {
                    throw new LoginException("Multiple principal values not allowed: " + principalAttr);
                }
            }
            id = principalAttr.getStringValue();
            logger.debug("Retrieved principal id attribute {}", id);
        } else {
            id = username;
            logger.debug("Principal id attribute is not defined. Using the default id {}", id);
        }
        final Map<String, Object> attributeMap = new LinkedHashMap<>(this.principalAttributeMap.size());
        for (final Map.Entry<String, String> ldapAttr : this.principalAttributeMap.entrySet()) {
            final LdapAttribute attr = ldapEntry.getAttribute(ldapAttr.getKey());
            if (attr != null) {
                logger.debug("Found principal attribute: {}", attr);
                final String principalAttrName = ldapAttr.getValue();
                if (attr.size() > 1) {
                    logger.debug("Principal attribute: {} is multivalued", attr);
                    attributeMap.put(principalAttrName, attr.getStringValues());
                } else {
                    attributeMap.put(principalAttrName, attr.getStringValue());
                }
            }
        }

        logger.debug("Created LDAP principal for id {} and {} attributes", id, attributeMap.size());
        return this.principalFactory.createPrincipal(id, attributeMap);
    }

    /**
     * Initialize the handler, setup the authentication entry attributes.
     */
    @PostConstruct
    public void initialize() {
        /**
         * Use a set to ensure we ignore duplicates.
         */
        final Set<String> attributes = new HashSet<>();

        logger.debug("Initializing LDAP attribute configuration.");
        if (this.principalIdAttribute != null) {
            logger.debug("Configured to retrieve principal id attribute {}", this.principalIdAttribute);
            attributes.add(this.principalIdAttribute);
        }
        if (!this.principalAttributeMap.isEmpty()) {
            final Set<String> attrs = this.principalAttributeMap.keySet();
            attributes.addAll(attrs);
            logger.debug("Configured to retrieve principal attribute collection of {}", attrs);
        }
        if (!this.additionalAttributes.isEmpty()) {
            attributes.addAll(this.additionalAttributes);
            logger.debug("Configured to retrieve additional attributes {}", this.additionalAttributes);
        }
        if (!attributes.isEmpty()) {
            this.authenticatedEntryAttributes = attributes.toArray(new String[attributes.size()]);
        }

        logger.debug("LDAP authentication entry attributes are {}", this.authenticatedEntryAttributes);
    }

}


text:
package org.readium.sdk.android.biblemesh;

import java.util.List;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class BookListAdapter extends BaseAdapter {

	private final List<String> mData;
	private final Context context;

	public BookListAdapter(Context context, List<String> list) {
		this.mData = list;
		this.context = context;
	}

	@Override
	public int getCount() {
		return mData.size();
	}

	@Override
	public Object getItem(int position) {
		return mData.get(position);
	}

	@Override
	public long getItemId(int position) {
		return position;
	}

	public View getView(int position, View convertView, ViewGroup parent) {
		ViewHolder holder = null;
		if (convertView == null) {
			holder = new ViewHolder();
			convertView = LayoutInflater.from(context).inflate(
					android.R.layout.simple_list_item_1, null);
			holder.text = (TextView) convertView.findViewById(android.R.id.text1);
			convertView.setTag(holder);
		} else {
			holder = (ViewHolder) convertView.getTag();
		}
		holder.text.setText(mData.get(position));
		return convertView;
	}

	public final class ViewHolder {
		public TextView text;
	}
}


text:
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">

    <title>PHPXRef 0.7.1 : Unnamed Project : Function Reference: setreturnreference()</title>
    <link rel="stylesheet" href="../sample.css" type="text/css">
    <link rel="stylesheet" href="../sample-print.css" type="text/css" media="print">

    <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">

            [ Index ]

PHP Cross Reference of Unnamed Project

[ Show Explorer ]
[ Hide Navbar ]

[Top level directory]

title

Body

[close]

Function and Method Cross Reference

setreturnreference()

Defined at:

/tests/simpletest/mock_objects.php  ->  line 840

Referenced 42 times:

/tests/simpletest/test/user_agent_test.php  ->  line 43

/tests/simpletest/test/user_agent_test.php  ->  line 46

/tests/simpletest/test/user_agent_test.php  ->  line 52

/tests/simpletest/test/user_agent_test.php  ->  line 65

/tests/simpletest/test/user_agent_test.php  ->  line 73

/tests/simpletest/test/user_agent_test.php  ->  line 76

/tests/simpletest/test/user_agent_test.php  ->  line 82

/tests/simpletest/test/user_agent_test.php  ->  line 205

/tests/simpletest/test/user_agent_test.php  ->  line 207

/tests/simpletest/test/user_agent_test.php  ->  line 312

/tests/simpletest/test/user_agent_test.php  ->  line 319

/tests/simpletest/test/user_agent_test.php  ->  line 332

/tests/simpletest/mock_objects.php  ->  line 1529

/tests/simpletest/mock_objects.php  ->  line 1543

/tests/simpletest/mock_objects.php  ->  line 1545

/tests/simpletest/docs/en/partial_mocks_documentation.html  ->  line 333

/tests/simpletest/docs/en/partial_mocks_documentation.html  ->  line 375

/tests/simpletest/docs/fr/partial_mocks_documentation.html  ->  line 345

/tests/simpletest/docs/fr/partial_mocks_documentation.html  ->  line 388

/tests/simpletest/test/http_test.php  ->  line 29

/tests/simpletest/test/http_test.php  ->  line 41

/tests/simpletest/test/http_test.php  ->  line 54

/tests/simpletest/test/http_test.php  ->  line 66

/tests/simpletest/test/http_test.php  ->  line 79

/tests/simpletest/test/http_test.php  ->  line 93

/tests/simpletest/test/http_test.php  ->  line 110

/tests/simpletest/test/http_test.php  ->  line 125

/tests/simpletest/test/http_test.php  ->  line 140

/tests/simpletest/test/http_test.php  ->  line 155

/tests/simpletest/test/http_test.php  ->  line 173

/tests/simpletest/test/http_test.php  ->  line 188

/tests/simpletest/test/http_test.php  ->  line 199

/tests/simpletest/test/http_test.php  ->  line 213

/tests/simpletest/test/http_test.php  ->  line 227

/tests/simpletest/test/http_test.php  ->  line 242

/tests/simpletest/test/http_test.php  ->  line 257

/tests/simpletest/test/http_test.php  ->  line 270

/tests/simpletest/test/http_test.php  ->  line 284

/tests/simpletest/test/http_test.php  ->  line 299

/tests/simpletest/test/http_test.php  ->  line 316

/tests/simpletest/test/http_test.php  ->  line 333

/tests/simpletest/HELP_MY_TESTS_DONT_WORK_ANYMORE  ->  line 37

Generated: Thu Oct 23 19:15:14 2014
	Cross-referenced by PHPXref 0.7.1


text:
import networkx as nx
from nltk.corpus import wordnet as wn
from plotly.graph_objs import (Layout,
                               Scatter,
                               Figure,
                               Data,
                               Marker,
                               Margin,
                               XAxis,
                               Font,
                               YAxis)
import plotly.plotly as plotly

def traverse(graph, start, node, hypo=True):
    """transvers the graph"""
    graph.depth[node.name] = node.shortest_path_distance(start)
    if hypo:
        hypo = node.hyponyms()
    else:
        hypo = node.hypernyms()
    if len(hypo) == 0:
        return
    for child in hypo:
        graph.add_edge(node.name, child.name)
        traverse(graph, start, child)

def hyp_graph(start, hypo=True):
    """hyper graph"""
    G = nx.Graph()
    G.depth = {}
    traverse(G, start, start, hypo)
    return G

def visualize_word(word, hypo=True):
    """returns a network graph of word, hyponym,(or hypernym if hypo=False)"""
    syn = wn.synsets(word)
    return hyp_graph(syn[0], hypo)

def scatter_nodes(pos, labels=None, color=None, size=10, opacity=1):
    """function from https://plot.ly/ipython-notebooks/networks/"""
    # pos is the dict of node positions
    # labels is a list  of labels of len(pos), to be displayed when hovering the mouse over the nodes
    # color is the color for nodes. When it is set as None the Plotly default color is used
    # size is the size of the dots representing the nodes
    # opacity is a value between [0,1] defining the node color opacity
    L = len(pos)
    trace = Scatter(x=[], y=[],  mode='markers', marker=Marker(size=[]))
    for k in range(L):
        trace['x'].append(pos[k][0])
        trace['y'].append(pos[k][1])
    attrib = dict(name='', text=labels, hoverinfo='text', opacity=opacity)  # a dict of Plotly node attributes
    trace = dict(trace, **attrib)  # concatenate the dict trace and attrib
    trace['marker']['size'] = size
    return trace

def scatter_edges(G, pos, line_color=None, line_width=1):
    """function from https://plot.ly/ipython-notebooks/networks/"""
    trace = Scatter(x=[], y=[], mode='lines')
    for edge in G.edges():
        trace['x'] += [pos[edge[0]][0], pos[edge[1]][0], None]
        trace['y'] += [pos[edge[0]][1], pos[edge[1]][1], None]
        trace['hoverinfo'] = 'none'
        trace['line']['width'] = line_width
        if line_color is not None:  # when it is None a default Plotly color is used
            trace['line']['color'] = line_color
    return trace

def draw_graph(word, hypernym=False):
    """Draw graph of word hyponym, or hypernym if hypernym=True,
    Displays in Jupyter notebook.
    Requires pre-installed plotly apikey"""
    G = visualize_word(word, not hypernym)
    nxpos = nx.fruchterman_reingold_layout(G)
    labels = []
    pos = []
    for k, v in nxpos.items():
        labels.append(str(k()))
        pos.append(v)
    trace1 = scatter_edges(G, nxpos)
    trace2 = scatter_nodes(pos, labels=labels)

    axis = dict(showline=False,  # hide axis line, grid, ticklabels and title
                zeroline=False,
                showgrid=False,
                showticklabels=False,
                title='')
    layout = Layout(title='Graph for word "{}"'.format(word),
                    font=Font(),
                    showlegend=False,
                    autosize=True,
                    # width=width,
                    # height=height,
                    xaxis=XAxis(axis),
                    yaxis=YAxis(axis),
                    #margin=Margin(
                    #  l=40,
                    #  r=40,
                    #  b=85,
                    #  t=100,
                    #  pad=0,),
                    # plot_bgcolor='#EFECEA', #set background color
                    hovermode='closest')

    data = Data([trace1, trace2])

    fig = Figure(data=data, layout=layout)
    return plotly.iplot(fig, filename='networkx')


text:
@setlocal
@echo off

if not defined APPVEYOR_BUILD_VERSION (
	echo Error: Expected the environment variable APPVEYOR_BUILD_VERSION to be set, but it's not!
	exit /b -1
)

nuget pack SharpRemote\SharpRemote.nuspec -Version %APPVEYOR_BUILD_VERSION%

endlocal


text:
Visualizations

Searches

    <saved-object-finder title="Choose a visualization" type="visualizations" on-choose="opts.addVis"></saved-object-finder>

    <saved-object-finder title="Choose a search" type="searches" on-choose="opts.addSearch"></saved-object-finder>


text:
Object.extend(Element, {
	condClassName : function (element, className, cond)
	{
		(cond?Element.addClassName:Element.removeClassName)(element,className);
	}
});


text:
void detach_thread(std::function<void()> fn);

std::shared_ptr<core_interface> make_real_core(const config conf);

std::unique_ptr<riemann_tcp_pool> init_tcp_server(
    const config & conf,
    main_async_loop_interface & loop,
    streams & streams,
    executor_thread_pool & executor_pool,
    instrumentation::instrumentation & instr);

std::unique_ptr<riemann_udp_pool> init_udp_server(
    const config & conf,
    std::shared_ptr<streams> streams);

std::unique_ptr<websocket_pool> init_ws_server(
    const config & conf,
    main_async_loop_interface & loop,
    pub_sub & pubsub,
    real_index & index);

void start_instrumentation(scheduler_interface & sched,
                           instrumentation::instrumentation & instrumentation,
                           streams & streams);

#endif


text:
"""
This file was automatically generated.
"""

class context(object):

    def __init__(self, zap):
        self.zap = zap

    @property
    def context_list(self):
        """
        List context names of current session
        """
        return next(self.zap._request(self.zap.base + 'context/view/contextList/').itervalues())

    def exclude_regexs(self, contextname):
        """
        List excluded regexs for context
        """
        return next(self.zap._request(self.zap.base + 'context/view/excludeRegexs/', {'contextName' : contextname}).itervalues())

    def include_regexs(self, contextname):
        """
        List included regexs for context
        """
        return next(self.zap._request(self.zap.base + 'context/view/includeRegexs/', {'contextName' : contextname}).itervalues())

    def context(self, contextname):
        """
        List the information about the named context
        """
        return next(self.zap._request(self.zap.base + 'context/view/context/', {'contextName' : contextname}).itervalues())

    @property
    def technology_list(self):
        """
        Lists the names of all built in technologies
        """
        return next(self.zap._request(self.zap.base + 'context/view/technologyList/').itervalues())

    def included_technology_list(self, contextname):
        """
        Lists the names of all technologies included in a context
        """
        return next(self.zap._request(self.zap.base + 'context/view/includedTechnologyList/', {'contextName' : contextname}).itervalues())

    def excluded_technology_list(self, contextname):
        """
        Lists the names of all technologies excluded from a context
        """
        return next(self.zap._request(self.zap.base + 'context/view/excludedTechnologyList/', {'contextName' : contextname}).itervalues())

    def exclude_from_context(self, contextname, regex, apikey=''):
        """
        Add exclude regex to context
        """
        return next(self.zap._request(self.zap.base + 'context/action/excludeFromContext/', {'contextName' : contextname, 'regex' : regex, 'apikey' : apikey}))

    def include_in_context(self, contextname, regex, apikey=''):
        """
        Add include regex to context
        """
        return next(self.zap._request(self.zap.base + 'context/action/includeInContext/', {'contextName' : contextname, 'regex' : regex, 'apikey' : apikey}))

    def new_context(self, contextname='', apikey=''):
        """
        Creates a new context in the current session
        """
        return next(self.zap._request(self.zap.base + 'context/action/newContext/', {'contextName' : contextname, 'apikey' : apikey}))

    def export_context(self, contextname, contextfile, apikey=''):
        return next(self.zap._request(self.zap.base + 'context/action/exportContext/', {'contextName' : contextname, 'contextFile' : contextfile, 'apikey' : apikey}))

    def import_context(self, contextfile, apikey=''):
        return next(self.zap._request(self.zap.base + 'context/action/importContext/', {'contextFile' : contextfile, 'apikey' : apikey}))

    def include_context_technologies(self, contextname, technologynames, apikey=''):
        """
        Includes technologies with the given names, separated by a comma, to a context
        """
        return next(self.zap._request(self.zap.base + 'context/action/includeContextTechnologies/', {'contextName' : contextname, 'technologyNames' : technologynames, 'apikey' : apikey}))

    def include_all_context_technologies(self, contextname, apikey=''):
        """
        Includes all built in technologies in to a context
        """
        return next(self.zap._request(self.zap.base + 'context/action/includeAllContextTechnologies/', {'contextName' : contextname, 'apikey' : apikey}))

    def exclude_context_technologies(self, contextname, technologynames, apikey=''):
        """
        Excludes technologies with the given names, separated by a comma, from a context
        """
        return next(self.zap._request(self.zap.base + 'context/action/excludeContextTechnologies/', {'contextName' : contextname, 'technologyNames' : technologynames, 'apikey' : apikey}))

    def exclude_all_context_technologies(self, contextname, apikey=''):
        """
        Excludes all built in technologies from a context
        """
        return next(self.zap._request(self.zap.base + 'context/action/excludeAllContextTechnologies/', {'contextName' : contextname, 'apikey' : apikey}))

    def set_context_in_scope(self, contextname, booleaninscope, apikey=''):
        """
        Sets a context to in scope (contexts are in scope by default)
        """
        return next(self.zap._request(self.zap.base + 'context/action/setContextInScope/', {'contextName' : contextname, 'booleanInScope' : booleaninscope, 'apikey' : apikey}))


text:
<?php

namespace Alex\BehatLauncher\Behat;

/**
 * A collection of projects.
 */
class ProjectList implements \IteratorAggregate
{
    /**
     * @var array
     */
    private $projects = array();

    /**
     * Creates a new project.
     *
     * @param array $projects an array of Project objects.
     */
    public function __construct(array $projects = array())
    {
        foreach ($projects as $project) {
            $this->add($project);
        }
    }

    /**
     * {@inheritdoc}
     */
    public function getIterator()
    {
        return new \ArrayIterator($this->projects);
    }

    /**
     * Adds a project to the list.
     *
     * @param Project $project project to add to list
     *
     * @return ProjectList
     */
    public function add(Project $project)
    {
        $this->projects[] = $project;

        return $this;
    }

    /**
     * Returns all projects.
     *
     * @return array an array of Project objects
     */
    public function getAll()
    {
        return $this->projects;
    }

    /**
     * Searches a Project in the list.
     *
     * @param string $name a project name
     *
     * @return Project
     *
     * @throws InvalidArgumentException project not found
     */
    public function get($name)
    {
        foreach ($this->projects as $project) {
            if ($project->getName() === $name) {
                return $project;
            }
        }

        throw new \InvalidArgumentException(sprintf('Project named "%s" not found. Available are: %s', $name, implode(', ', array_map(function ($p) {
            return $p->getNAme();
        }, $this->projects))));
    }
}


text:
Please read this guide before contributing to this project.

It is assumed that you are on a Mac/Linux machine and
have [Node.js](http://nodejs.org).

### Getting started

Clone this repo to your local machine:

```bash
git clone git@github.com:stormpath/stormpath-sdk-react.git
```

Then install the required dependencies:

```bash
npm install
```

### Building

You can build this library by running (builds everything except dist):

```bash
npm run build
```

Build `/dist` files (do this before creating a release):

```bash
npm run build-dist
```

Only build CommonJS-files. Do this during development:

```bash
npm run build-cjs
```

### Making releases

When releasing, remember to do the following:

* Grab the latest from remote (`$ git pull`) and resolve any merge conflicts.
* Bump version in `package.json` and `brower.json`.
* Rebuild dist files `$ npm run build-dist`.
* Create a commit and push it to your remote.
* Create a tag for the release detailing the changes.
* Publish it to npm (`$ npm publish`).


text:
import math
import os
import random
import re
import sys

# The function is expected to return a STRING.
# The function accepts STRING sentence as parameter.
def reverse_words_order_and_swap_cases(sentence):
    return reverse_words(sentence.swapcase())

def reverse_words(sentence):
    return " ".join(reversed(sentence.split(" ")))

if __name__ == '__main__':
    fptr = open(os.environ['OUTPUT_PATH'], 'w')

    sentence = input()

    result = reverse_words_order_and_swap_cases(sentence)

    fptr.write(result + '\n')

    fptr.close()


text:
class Solution {
public:
    /*  Boyer-Moore Voting Algorithm */
    int majorityElement(vector<int>& nums) {
        int count = 0, candidate = 0;
        for (int num : nums) {
            if (count == 0) candidate = num;
            count = num == candidate ? count + 1 : count - 1;
        }
        return candidate;
    }
};


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$PROJECT_DIR$/DailySelfie.iml" filepath="$PROJECT_DIR$/DailySelfie.iml" />
      <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
    </modules>
  </component>
</project>


text:
<!DOCTYPE html>

<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<title>Psalms 19 (ASV)</title>
<link href="../../../build/mobile.css" rel="stylesheet" />

American Standard VersionPsalms 19<
=
>

Psalm 19

For the Chief Musician. A Psalm of David.

1 The heavens declare the glory of God;

And the firmament showeth his handiwork.

2 Day unto day uttereth speech,

And night unto night showeth knowledge.

3 There is no speech nor language;

Their voice is not heard.

4 Their line is gone out through all the earth,

And their words to the end of the world.

In them hath he set a tabernacle for the sun,

5 Which is as a bridegroom coming out of his chamber,

And rejoiceth as a strong man to run his course.

6 His going forth is from the end of the heavens,

And his circuit unto the ends of it;

And there is nothing hid from the heat thereof.

7 The law of Jehovah is perfect, restoring the soul:

The testimony of Jehovah is sure, making wise the simple.

8 The precepts of Jehovah are right, rejoicing the heart:

The commandment of Jehovah is pure, enlightening the eyes.

9 The fear of Jehovah is clean, enduring for ever:

The ordinances of Jehovah are true, and righteous altogether.

10 More to be desired are they than gold, yea, than much fine gold;

Sweeter also than honey and the droppings of the honeycomb.

11 Moreover by them is thy servant warned:

In keeping them there is great reward.

12 Who can discern his errors?

Clear thou me from hidden faults.

13 Keep back thy servant also from presumptuous sins;

Let them not have dominion over me:

Then shall I be upright,

And I shall be clear from great transgression.

14 Let the words of my mouth and the meditation of my heart

Be acceptable in thy sight,

O Jehovah, my rock, and my redeemer.

<
=
>