text:
package builds

import (
	"fmt"
	"strings"

	g "github.com/onsi/ginkgo"
	o "github.com/onsi/gomega"

	buildv1 "github.com/openshift/api/build/v1"
	exutil "github.com/openshift/origin/test/extended/util"
)

var _ = g.Describe("[sig-builds][Feature:Builds][Slow] builds should support proxies", func() {
	defer g.GinkgoRecover()
	var (
		buildFixture = exutil.FixturePath("testdata", "builds", "test-build-proxy.yaml")
		oc           = exutil.NewCLI("build-proxy", exutil.KubeConfigPath())
	)

	g.Context("", func() {

		g.BeforeEach(func() {
			exutil.PreTestDump()
		})

		g.JustBeforeEach(func() {
			oc.Run("create").Args("-f", buildFixture).Execute()
		})

		g.AfterEach(func() {
			if g.CurrentGinkgoTestDescription().Failed {
				exutil.DumpPodStates(oc)
				exutil.DumpConfigMapStates(oc)
				exutil.DumpPodLogsStartingWith("", oc)
			}
		})

		g.Describe("start build with broken proxy", func() {
			g.It("should start a build and wait for the build to fail", func() {
				g.By("starting the build")

				br, _ := exutil.StartBuildAndWait(oc, "sample-build", "--build-loglevel=5")
				br.AssertFailure()

				g.By("verifying the build sample-build-1 output")
				// The git ls-remote check should exit the build when the remote
				// repository is not accessible. It should never get to the clone.
				buildLog, err := br.Logs()
				o.Expect(err).NotTo(o.HaveOccurred())
				o.Expect(buildLog).NotTo(o.ContainSubstring("clone"))
				if !strings.Contains(buildLog, `unable to access 'https://github.com/openshift/ruby-hello-world.git/': Failed connect to`) {
					fmt.Fprintf(g.GinkgoWriter, "\nbuild log:\n%s\n", buildLog)
				}
				o.Expect(buildLog).To(o.ContainSubstring(`unable to access 'https://github.com/openshift/ruby-hello-world.git/': Failed connect to`))

				g.By("verifying the build sample-build-1 status")
				o.Expect(br.Build.Status.Phase).Should(o.BeEquivalentTo(buildv1.BuildPhaseFailed))
			})
		})

		g.Describe("start build with broken proxy and a no_proxy override", func() {
			g.It("should start an s2i build and wait for the build to succeed", func() {
				g.By("starting the build")
				br, _ := exutil.StartBuildAndWait(oc, "sample-s2i-build-noproxy", "--build-loglevel=5")
				br.AssertSuccess()
				buildLog, err := br.Logs()
				o.Expect(err).NotTo(o.HaveOccurred())
				// envuser:password will appear in the log because the full/unstripped env HTTP_PROXY variable is injected
				// into the dockerfile and displayed by docker build.
				o.Expect(buildLog).NotTo(o.ContainSubstring("gituser:password"), "build log should not include proxy credentials")
				o.Expect(buildLog).To(o.ContainSubstring("proxy1"), "build log should include proxy host")
				o.Expect(buildLog).To(o.ContainSubstring("proxy2"), "build log should include proxy host")
				o.Expect(buildLog).To(o.ContainSubstring("proxy3"), "build log should include proxy host")
				o.Expect(buildLog).To(o.ContainSubstring("proxy4"), "build log should include proxy host")
			})
			g.It("should start a docker build and wait for the build to succeed", func() {
				g.By("starting the build")
				br, _ := exutil.StartBuildAndWait(oc, "sample-docker-build-noproxy", "--build-loglevel=5")
				br.AssertSuccess()
				buildLog, err := br.Logs()
				o.Expect(err).NotTo(o.HaveOccurred())
				// envuser:password will appear in the log because the full/unstripped env HTTP_PROXY variable is injected
				// into the dockerfile and displayed by docker build.
				o.Expect(buildLog).NotTo(o.ContainSubstring("gituser:password"), "build log should not include proxy credentials")
				o.Expect(buildLog).To(o.ContainSubstring("proxy1"), "build log should include proxy host")
				o.Expect(buildLog).To(o.ContainSubstring("proxy2"), "build log should include proxy host")
				o.Expect(buildLog).To(o.ContainSubstring("proxy3"), "build log should include proxy host")
				o.Expect(buildLog).To(o.ContainSubstring("proxy4"), "build log should include proxy host")
			})
		})
	})
})


text:
package org.boreas.spring.jdbc.query.executor;

import org.springframework.jdbc.core.JdbcTemplate;

public abstract class AbstractQueryExecutor<T> implements QueryExecutor<T> {
	private JdbcTemplate jdbcTemplate;

	public AbstractQueryExecutor(final JdbcTemplate jdbcTemplate) {
		this.jdbcTemplate = jdbcTemplate;

	}

	protected JdbcTemplate getJdbcTemplate() {
		return jdbcTemplate;
	}

}

redpajama_set_name: RedPajamaGithub


text:
package engine

import (
	"errors"
	"fmt"
	"mime/multipart"
	"net/http"
	"net/url"
	"time"

	"golang.org/x/net/context"
)

type (
	// Ctx is the core request-response context passed between any Manage
	// handlers, useful for storing & persisting data within a request & response.
	Ctx struct {
		engine  *Engine
		group   *Group
		rwmem   responseWriter
		RW      ResponseWriter
		request *http.Request
		Params  Params
		form    url.Values
		files   map[string][]*multipart.FileHeader
		Errors  errorMsgs
		*recorder
	}

	recorder struct {
		start     time.Time
		stop      time.Time
		latency   time.Duration
		status    int
		method    string
		path      string
		requester string
	}
)

func (engine *Engine) newCtx() interface{} {
	c := &Ctx{engine: engine}
	c.RW = &c.rwmem
	return c
}

func (engine *Engine) getCtx(w http.ResponseWriter, req *http.Request) *Ctx {
	c := engine.cache.Get().(*Ctx)
	c.group = engine.groups["/"]
	c.rwmem.reset(w)
	c.recorder = &recorder{}
	c.Start()
	c.request = req
	c.parseform()
	return c
}

func (engine *Engine) putCtx(c *Ctx) {
	c.PostProcess(c.request, c.RW)
	if engine.LoggingOn {
		engine.Send("message", c.LogFmt())
	}
	engine.Send("recorder", c.Fmt())
	c.group = nil
	c.request = nil
	c.Params = nil
	c.form = nil
	c.recorder = nil
	c.Errors = nil
	engine.cache.Put(c)
}

func (c *Ctx) parseform() {
	c.request.ParseMultipartForm(c.engine.MaxFormMemory)
	c.form = c.request.Form
	if c.request.MultipartForm != nil {
		c.files = c.request.MultipartForm.File
	}
}

func (c *Ctx) Request() *http.Request {
	return c.request
}

func (c *Ctx) Data() map[string]interface{} {
	ret := make(map[string]interface{})
	for _, p := range c.Params {
		ret[p.Key] = p.Value
	}
	return ret
}

func (c *Ctx) Form() url.Values {
	return c.form
}

func (c *Ctx) Files() map[string][]*multipart.FileHeader {
	return c.files
}

func (c *Ctx) Writer() ResponseWriter {
	return c.RW
}

func (c *Ctx) errorTyped(err error, typ uint32, meta interface{}) {
	c.Errors = append(c.Errors, errorMsg{
		Err:  err.Error(),
		Type: typ,
		Meta: meta,
	})
}

// Attaches an error to a list of errors. Call Error for each error that occurred
// during the resolution of a request.
func (c *Ctx) Error(err error, meta interface{}) {
	c.errorTyped(err, ErrorTypeExternal, meta)
}

// Returns the last error for the Ctx.
func (c *Ctx) LastError() error {
	s := len(c.Errors)
	if s > 0 {
		return errors.New(c.Errors[s-1].Err)
	} else {
		return nil
	}
}

// Immediately abort the context, writing out the code to the response
func (c *Ctx) Abort(code int) {
	if code >= 0 {
		c.RW.WriteHeader(code)
	}
}

// Fail is the same as Abort plus an error message.
// Calling `c.Fail(500, err)` is equivalent to:
// ```
// c.Error(err, "Failed.")
// c.Abort(500)
// ```
func (c *Ctx) Fail(code int, err error) {
	c.Error(err, err.Error())
	c.Abort(code)
}

func (c *Ctx) StatusFunc() (func(int), bool) {
	return c.Status, true
}

// Calls an HttpStatus in the current group by integer code from the Context,
// if the status exists.
func (c *Ctx) Status(code int) {
	if status, ok := c.group.HttpStatuses[code]; ok {
		s := len(status.Handlers)
		for i := 0; i < s; i++ {
			status.Handlers[i](context.WithValue(CurrentContext, "Current", c))
		}
	}
}

func (r *recorder) Start() {
	r.start = time.Now()
}

func (r *recorder) Stop() {
	r.stop = time.Now()
}

func (r *recorder) Requester(req *http.Request) {
	rqstr := req.Header.Get("X-Real-IP")

	if len(rqstr) == 0 {
		rqstr = req.Header.Get("X-Forwarded-For")
	}

	if len(rqstr) == 0 {
		rqstr = req.RemoteAddr
	}

	r.requester = rqstr
}

func (r *recorder) Latency() time.Duration {
	return r.stop.Sub(r.start)
}

func (r *recorder) PostProcess(req *http.Request, rw ResponseWriter) {
	r.Stop()
	r.latency = r.Latency()
	r.Requester(req)
	r.method = req.Method
	r.path = req.URL.Path
	r.status = rw.Status()
}

func (r *recorder) Fmt() string {
	return fmt.Sprintf("recorder	%s	%s	%s	%3d	%s	%s	%s", r.start, r.stop, r.latency, r.status, r.method, r.path, r.requester)
}

func (r *recorder) LogFmt() string {
	return fmt.Sprintf("%v |%s %3d %s| %12v | %s |%s %s %-7s %s",
		r.stop.Format("2006/01/02 - 15:04:05"),
		StatusColor(r.status), r.status, reset,
		r.latency,
		r.requester,
		MethodColor(r.method), reset, r.method,
		r.path)
}


text:
namespace TraktApiSharp.Tests.Objects.Basic.Json.Writer
{
    using FluentAssertions;
    using System;
    using System.Threading.Tasks;
    using Traits;
    using TraktApiSharp.Objects.Basic;
    using TraktApiSharp.Objects.Basic.Json.Writer;
    using Xunit;

    [Category("Objects.Basic.JsonWriter")]
    public partial class GenreObjectJsonWriter_Tests
    {
        [Fact]
        public void Test_GenreObjectJsonWriter_WriteObject_Object_Exceptions()
        {
            var traktJsonWriter = new GenreObjectJsonWriter();
            Func<Task<string>> action = () => traktJsonWriter.WriteObjectAsync(default(ITraktGenre));
            action.Should().Throw<ArgumentNullException>();
        }

        [Fact]
        public async Task Test_GenreObjectJsonWriter_WriteObject_Object_Only_Name_Property()
        {
            ITraktGenre traktGenre = new TraktGenre
            {
                Name = "genre name"
            };

            var traktJsonWriter = new GenreObjectJsonWriter();
            string json = await traktJsonWriter.WriteObjectAsync(traktGenre);
            json.Should().Be(@"{""name"":""genre name""}");
        }

        [Fact]
        public async Task Test_GenreObjectJsonWriter_WriteObject_Object_Only_Slug_Property()
        {
            ITraktGenre traktGenre = new TraktGenre
            {
                Slug = "genre slug"
            };

            var traktJsonWriter = new GenreObjectJsonWriter();
            string json = await traktJsonWriter.WriteObjectAsync(traktGenre);
            json.Should().Be(@"{""slug"":""genre slug""}");
        }

        [Fact]
        public async Task Test_GenreObjectJsonWriter_WriteObject_Object_Complete()
        {
            ITraktGenre traktGenre = new TraktGenre
            {
                Name = "genre name",
                Slug = "genre slug"
            };

            var traktJsonWriter = new GenreObjectJsonWriter();
            string json = await traktJsonWriter.WriteObjectAsync(traktGenre);
            json.Should().Be(@"{""name"":""genre name"",""slug"":""genre slug""}");
        }
    }
}


text:
package io.quarkus.hibernate.reactive.panache;

import java.util.Map;
import java.util.function.Supplier;

import org.hibernate.reactive.mutiny.Mutiny;

import io.quarkus.hibernate.reactive.panache.common.runtime.AbstractJpaOperations;
import io.quarkus.panache.common.Parameters;
import io.smallrye.mutiny.Uni;

/**
 * Utility class for Panache.
 *
 * @author Stéphane Épardaud
 */
public class Panache {

    /**
     * Returns the current {@link Mutiny.Session}
     *
     * @return the current {@link Mutiny.Session}
     */
    public static Uni<Mutiny.Session> getSession() {
        return AbstractJpaOperations.getSession();
    }

    /**
     * Performs the given work within the scope of a database transaction, automatically flushing the session.
     * The transaction will be rolled back if the work completes with an uncaught exception, or if
     * {@link Mutiny.Transaction#markForRollback()} is called.
     *
     * @param <T> The function's return type
     * @param work The function to execute in the new transaction
     * @return the result of executing the function
     * @see Panache#currentTransaction()
     */
    public static <T> Uni<T> withTransaction(Supplier<Uni<T>> work) {
        return getSession().flatMap(session -> session.withTransaction(t -> work.get()));
    }

    /**
     * Executes a database update operation and return the number of rows operated on.
     *
     * @param query a normal HQL query
     * @param params optional list of indexed parameters
     * @return the number of rows operated on.
     */
    public static Uni<Integer> executeUpdate(String query, Object... params) {
        return AbstractJpaOperations.executeUpdate(query, params);
    }

    /**
     * Executes a database update operation and return the number of rows operated on.
     *
     * @param query a normal HQL query
     * @param params {@link Map} of named parameters
     * @return the number of rows operated on.
     */
    public static Uni<Integer> executeUpdate(String query, Map<String, Object> params) {
        return AbstractJpaOperations.executeUpdate(query, params);
    }

    /**
     * Executes a database update operation and return the number of rows operated on.
     *
     * @param query a normal HQL query
     * @param params {@link Parameters} of named parameters
     * @return the number of rows operated on.
     */
    public static Uni<Integer> executeUpdate(String query, Parameters params) {
        return AbstractJpaOperations.executeUpdate(query, params.map());
    }

    /**
     * Flush all pending changes to the database.
     *
     * @return void
     */
    public static Uni<Void> flush() {
        return getSession().flatMap(session -> session.flush());
    }

    /**
     * Returns the current transaction, if any, or null.
     *
     * @return the current transaction, if any, or null.
     * @see Panache#withTransaction(Supplier)
     */
    public static Uni<Mutiny.Transaction> currentTransaction() {
        return getSession().map(session -> session.currentTransaction());
    }
}


text:
using System.Linq;
using Newtonsoft.Json.Linq;
using Skybrud.Essentials.Json.Extensions;
using Skybrud.Essentials.Time;
using Skybrud.Social.Facebook.Models.Pages;
using Skybrud.Social.Facebook.Models.Users;

namespace Skybrud.Social.Facebook.Models.Common {

    /// <summary>
    /// Class representing a work experience of a Facebook user.
    /// </summary>
    /// <see>
    ///     <cref>https://developers.facebook.com/docs/graph-api/reference/work-experience/#Reading</cref>
    /// </see>
    public class FacebookWorkExperience : FacebookObject {

        #region Properties

        /// <summary>
        /// Gets the ID.
        /// </summary>
        public string Id { get; }

        /// <summary>
        /// Gets the description about the experience.
        /// </summary>
        public string Description { get; }

        /// <summary>
        /// Gets whether the <see cref="Description"/> property was included in the response.
        /// </summary>
        public bool HasDescription => string.IsNullOrWhiteSpace(Description) == false;

        /// <summary>
        ///
        /// </summary>
        public FacebookPage Employer { get; }

        /// <summary>
        /// Gets whether the <see cref="Description"/> property was included in the response.
        /// </summary>
        public bool HasEmployer => Employer != null;

        /// <summary>
        ///
        /// </summary>
        public EssentialsTime EndDate { get; }

        /// <summary>
        /// Gets whether the <see cref="EndDate"/> property was included in the response.
        /// </summary>
        public bool HasEndDate => EndDate != null;

        /// <summary>
        ///
        /// </summary>
        public FacebookUser From { get; }

        /// <summary>
        /// Gets whether the <see cref="From"/> property was included in the response.
        /// </summary>
        public bool HasFrom => From != null;

        /// <summary>
        ///
        /// </summary>
        public FacebookPage Location { get; }

        /// <summary>
        /// Gets whether the <see cref="Location"/> property was included in the response.
        /// </summary>
        public bool HasLocation => Location != null;

        /// <summary>
        ///
        /// </summary>
        public FacebookPage Position { get; }

        /// <summary>
        /// Gets whether the <see cref="Position"/> property was included in the response.
        /// </summary>
        public bool HasPosition => Position != null;

        /// <summary>
        /// Gets an array of projects the person has worked on.
        /// </summary>
        public FacebookProjectExperience[] Projects { get; }

        /// <summary>
        /// Gets whether the <see cref="Projects"/> property was included in the response.
        /// </summary>
        public bool HasProjects => Projects.Any();

        /// <summary>
        ///
        /// </summary>
        public EssentialsTime StartDate { get; }

        /// <summary>
        /// Gets whether the <see cref="StartDate"/> property was included in the response.
        /// </summary>
        public bool HasStartDate => StartDate != null;

        /// <summary>
        ///
        /// </summary>
        public FacebookUser[] With { get; }

        /// <summary>
        /// Gets whether the <see cref="With"/> property was included in the response.
        /// </summary>
        public bool HasWith => With.Any();

        #endregion

        #region Constructors

        private FacebookWorkExperience(JObject obj) : base(obj) {
            Id = obj.GetString("id");
            Description = obj.GetString("description");
            Employer = obj.GetObject("employer", FacebookPage.Parse);
            EndDate = obj.GetString("end_date", EssentialsTime.Parse);
            From = obj.GetObject("from", FacebookUser.Parse);
            Location = obj.GetObject("location", FacebookPage.Parse);
            Position = obj.GetObject("position", FacebookPage.Parse);
            Projects = obj.GetArrayItems("projects", FacebookProjectExperience.Parse);
            StartDate = obj.GetString("start_date", EssentialsTime.Parse);
            With = obj.GetArrayItems("with", FacebookUser.Parse);
        }

        #endregion

        #region Static methods

        /// <summary>
        /// Parses the specified <paramref name="obj"/> into an instance of <see cref="FacebookWorkExperience"/>.
        /// </summary>
        /// <param name="obj">The instance of <see cref="JObject"/> to be parsed.</param>
        /// <returns>An instance of <see cref="FacebookWorkExperience"/>.</returns>
        public static FacebookWorkExperience Parse(JObject obj) {
            return obj == null ? null : new FacebookWorkExperience(obj);
        }

        #endregion

    }

}


text:
namespace PatternsIntro.Areas.HelpPage.ModelDescriptions
{
    public class SimpleTypeModelDescription : ModelDescription
    {
    }
}


text:
namespace DataAccessTest.Repository.PetaPoco.Mapping
{
    using System;
    using System.Reflection;
    using global::PetaPoco;

    /// <summary>
    /// A generic POCO mapper designed to work only on a specific <typeparamref name="TEntity"/> class.
    /// </summary>
    /// <typeparam name="TEntity">The <see cref="Type"/> for which this <see cref="IMapper"/> can supply metadata and conversion functions.</typeparam>
    public abstract class GenericExtensibleSingleTypeMapper<TEntity> : ExtensibleStandardMapper, ISingleTypeMapper
        where TEntity : class
    {
        /// <summary>
        /// Gets the <see cref="Type"/> mapped by this <see cref="IMapper"/>.
        /// </summary>
        public Type MappedType
        {
            get
            {
                return typeof(TEntity);
            }
        }

        /// <summary>
        /// Constructs a <see cref="TableInfo"/> for a POCO by reading its attribute data.
        /// </summary>
        /// <param name="pocoType">The POCO <see cref="Type"/>.</param>
        /// <returns>A <see cref="TableInfo"/> metadata object describing the table for <paramref name="pocoType"/>.</returns>
        public override sealed TableInfo GetTableInfo(Type pocoType)
        {
            if (pocoType == typeof(TEntity))
            {
                return this.GetTableInfoCore();
            }

            throw new ArgumentException(string.Format("pocoType must be {0}", typeof(TEntity).FullName), "pocoType");
        }

        /// <summary>
        /// Constructs a <see cref="ColumnInfo"/> for a POCO property by reading its attribute data.
        /// </summary>
        /// <param name="pocoProperty">Information on the POCO <see cref="PropertyInfo"/> to map to a column.</param>
        /// <returns>A <see cref="ColumnInfo"/> metadata object describing the column for <paramref name="pocoProperty"/>.</returns>
        public override sealed ColumnInfo GetColumnInfo(PropertyInfo pocoProperty)
        {
            if (pocoProperty.DeclaringType == typeof(TEntity))
            {
                return this.GetColumnInfoCore(pocoProperty);
            }

            throw new ArgumentException(string.Format("pocoProperty must belong to {0}", typeof(TEntity).FullName), "pocoProperty");
        }

        /// <summary>
        /// Get a function that can convert into <paramref name="targetProperty"/> from the <paramref name="sourceType"/>.
        /// </summary>
        /// <remarks>
        /// A return value of <c>null</c> use the default conversion for PetaPoco.
        /// </remarks>
        /// <param name="targetProperty">Metadata about the target property on a POCO into which the database data will be mapped.</param>
        /// <param name="sourceType">The <see cref="Type"/> of the source column in the database.</param>
        /// <returns>A function that converts from <paramref name="sourceType"/> into <paramref name="targetProperty"/>.</returns>
        public override sealed Func<object, object> GetFromDbConverter(PropertyInfo targetProperty, Type sourceType)
        {
            if (targetProperty.DeclaringType == typeof(TEntity))
            {
                return this.GetFromDbConverterCore(targetProperty, sourceType);
            }

            throw new ArgumentException(string.Format("targetProperty must belong to {0}", typeof(TEntity).FullName), "targetProperty");
        }

        /// <summary>
        /// Get a function that can convert from <paramref name="sourceProperty"/> into the appropriate database type.
        /// </summary>
        /// <remarks>
        /// A return value of <c>null</c> use the default conversion for PetaPoco.
        /// </remarks>
        /// <param name="sourceProperty">Metadata about the source property on a POCO from which the data will be mapped.</param>
        /// <returns>A function that converts from <paramref name="sourceProperty"/> into the correct, implementation-defined database type.</returns>
        public override sealed Func<object, object> GetToDbConverter(PropertyInfo sourceProperty)
        {
            if (sourceProperty.DeclaringType == typeof(TEntity))
            {
                return this.GetToDbConverterCore(sourceProperty);
            }

            throw new ArgumentException(string.Format("sourceProperty must belong to {0}", typeof(TEntity).FullName), "sourceProperty");
        }

        /// <summary>
        /// Constructs a <see cref="TableInfo"/> for the <typeparamref name="TEntity"/> POCO by reading its attribute data.
        /// </summary>
        /// <returns>A <see cref="TableInfo"/> metadata object describing the table for <typeparamref name="TEntity"/>.</returns>
        protected abstract TableInfo GetTableInfoCore();

        /// <summary>
        /// Constructs a <see cref="ColumnInfo"/> for a POCO property by reading its attribute data.
        /// </summary>
        /// <param name="pocoProperty">Information on the POCO <see cref="PropertyInfo"/> to map to a column.</param>
        /// <returns>A <see cref="ColumnInfo"/> metadata object describing the column for <paramref name="pocoProperty"/>.</returns>
        protected virtual ColumnInfo GetColumnInfoCore(PropertyInfo pocoProperty)
        {
            return base.GetColumnInfo(pocoProperty);
        }

        /// <summary>
        /// Get a function that can convert into <paramref name="targetProperty"/> from the <paramref name="sourceType"/>.
        /// </summary>
        /// <remarks>
        /// A return value of <c>null</c> use the default conversion for PetaPoco.
        /// </remarks>
        /// <param name="targetProperty">Metadata about the target property on a POCO into which the database data will be mapped.</param>
        /// <param name="sourceType">The <see cref="Type"/> of the source column in the database.</param>
        /// <returns>A function that converts from <paramref name="sourceType"/> into <paramref name="targetProperty"/>.</returns>
        protected virtual Func<object, object> GetFromDbConverterCore(PropertyInfo targetProperty, Type sourceType)
        {
            return base.GetFromDbConverter(targetProperty, sourceType);
        }

        /// <summary>
        /// Get a function that can convert from <paramref name="sourceProperty"/> into the appropriate database type.
        /// </summary>
        /// <remarks>
        /// A return value of <c>null</c> use the default conversion for PetaPoco.
        /// </remarks>
        /// <param name="sourceProperty">Metadata about the source property on a POCO from which the data will be mapped.</param>
        /// <returns>A function that converts from <paramref name="sourceProperty"/> into the correct, implementation-defined database type.</returns>
        protected virtual Func<object, object> GetToDbConverterCore(PropertyInfo sourceProperty)
        {
            return base.GetToDbConverter(sourceProperty);
        }
    }
}


text:
eventkitApp.controller('questionController', function ($scope, $state, $ionicModal, $ionicPopup, $ionicLoading, QuestionService, SessionService, UserService) {

    $scope.questions = QuestionService.data.questions;

    // Get sessionId from URL params
    $scope.sessionId = $state.params.sid;

    /**
     * Get all questions from API and copy to the list
     */
    var updateQuestionList = function() {

        // The following flag makes sure that the data from the API is downloaded only once
        if (QuestionService.data.downloadFlag) {
            QuestionService.downloadQuestions($scope.sessionId).then(function(response) {
                QuestionService.data.questions = angular.copy(response.data);
                $scope.questions = QuestionService.data.questions;
                QuestionService.data.downloadFlag = false;
            }, function(err) {
                console.log('Error downloading questions from API: ');
                console.log(err.message);
            })
            .finally(function(){
                // Stop the ion-refresher from spinning
                $scope.$broadcast('scroll.refreshComplete');
            });
        }
    };

    var getSessionTitle = function(){
        var sessionDetails = null;
        angular.forEach(SessionService.data.sessions, function(session){
            if (session.id === $scope.sessionId) {
                sessionDetails = session;
            }
        });
        return sessionDetails.title;
    };

    $scope.sessionTitle = function(){
        return getSessionTitle();
    };

    /**
     * Download data again from the API
     */
    $scope.doRefresh = function () {
        QuestionService.data.downloadFlag = true;
        updateQuestionList();
    };

    /**
     * Reset search filter
     */
    $scope.resetSearch = function(){
        $scope.query = '';
    };

    // -- Ask a question ----------------------------
    // Initialize data for the question modal
    $scope.questionData = {
        'session_id': $scope.sessionId
    };

    // Create the question modal
    $ionicModal.fromTemplateUrl('templates/ask-question-modal.html', {
        scope: $scope
    }).then(function (modal) {
        $scope.questionModal = modal;
    });

    // Open the question modal
    $scope.openQuestionModal = function () {
        $scope.questionModal.show();
    };

    // Close question modal
    $scope.closeQuestionModal = function () {
        $scope.questionModal.hide();
    };

    // Send the question to the server
    $scope.askQuestion = function () {

        // Show loader
        $ionicLoading.show({
            template: 'Loading. Please wait...' +
                        '

' +
                        '<ion-spinner></ion-spinner>',
            scope: $scope,
            showBackdrop: true,
            showDelay: 100
        });

        QuestionService.sendNewQuestion($scope.questionData).then(function(response){

            $ionicPopup.alert({
                title: 'New question',
                template: '' +
                        'Congratulation! Your question was successfully sent.'
            });

            // reset questionData
            $scope.questionData.question = '';

            // close modal
            $scope.closeQuestionModal();

            // reload questions
            $scope.doRefresh();

        }, function(response){

            // Default error message
            var errorMessage = 'An error occured, please try again later.';

            if (response.data !== null) {
                // authorization error
                if (typeof response.data.message !== 'undefined') {
                    errorMessage = response.data.message + '
' + 'Make sure that you are logged in';
                }

                // validation error
                if (typeof response.data[0] !== 'undefined') {
                    errorMessage = response.data[0].message;
                }
            } else {
                // API is not available
                errorMessage = 'Could not connect to the server. Please check your network connection and try again.';
            }

            $ionicPopup.alert({
                title: 'New question failed!',
                template: '' +
                        errorMessage
            });

        }).finally(function(){
            // hide loader
            $ionicLoading.hide();
        });
    };
    // ---------------------------- Ask a question --

    // Load only the first time, because the cache on the view is 'on'
    updateQuestionList();
});


text:
<?php

namespace Symfony\Component\Security\Core\Tests\Authentication\Token;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken;
use Symfony\Component\Security\Core\User\UserInterface;

class RememberMeTokenTest extends TestCase
{
    public function testConstructor()
    {
        $user = $this->getUser();
        $token = new RememberMeToken($user, 'fookey', 'foo');

        $this->assertEquals('fookey', $token->getFirewallName());
        $this->assertEquals('foo', $token->getSecret());
        $this->assertEquals(['ROLE_FOO'], $token->getRoleNames());
        $this->assertSame($user, $token->getUser());
        $this->assertTrue($token->isAuthenticated());
    }

    public function testConstructorSecretCannotBeEmptyString()
    {
        $this->expectException(\InvalidArgumentException::class);
        new RememberMeToken(
            $this->getUser(),
            '',
            ''
        );
    }

    protected function getUser($roles = ['ROLE_FOO'])
    {
        $user = $this->createMock(UserInterface::class);
        $user
            ->expects($this->any())
            ->method('getRoles')
            ->willReturn($roles)
        ;

        return $user;
    }
}


text:
namespace chrono
{

//  To build a tree list of properties for objects

class chjs_propdata {
public:
	char propname[100];
	char label[100];
	ChList<chjs_propdata> children;
	int haschildren;
};

class chjs_fullnamevar {
public:
	char propname[200];
	char label[100];
	int active;
	void* script;		// for example, points to already-compiled Javascript to fetch var
};

} // END_OF_NAMESPACE____

#endif


text:
@interface UIView ()

@property (nonatomic, strong) NSMutableDictionary<NSString *, DKColorPicker> *pickers;

@end

@implementation UIView (Night)

- (DKColorPicker)dk_backgroundColorPicker {
    return objc_getAssociatedObject(self, @selector(dk_backgroundColorPicker));
}

- (void)dk_setBackgroundColorPicker:(DKColorPicker)picker {
    DKColorPickerChecker
    objc_setAssociatedObject(self, @selector(dk_backgroundColorPicker), picker, OBJC_ASSOCIATION_COPY_NONATOMIC);
    self.backgroundColor = picker(self.dk_manager.themeVersion);
    [self.pickers setValue:[picker copy] forKey:@"setBackgroundColor:"];
}

- (DKColorPicker)dk_tintColorPicker {
    return objc_getAssociatedObject(self, @selector(dk_tintColorPicker));
}

- (void)dk_setTintColorPicker:(DKColorPicker)picker {
    DKColorPickerChecker
    objc_setAssociatedObject(self, @selector(dk_tintColorPicker), picker, OBJC_ASSOCIATION_COPY_NONATOMIC);
    self.tintColor = picker(self.dk_manager.themeVersion);
    [self.pickers setValue:[picker copy] forKey:@"setTintColor:"];
}

@end


text:
package org.apache.karaf.tooling.commands;

import java.lang.annotation.Annotation;
import java.lang.reflect.Field;

import org.apache.karaf.shell.api.action.Action;
import org.apache.karaf.shell.api.action.Argument;

public abstract class AbstractCommandHelpPrinter implements CommandHelpPrinter {

    protected Argument replaceDefaultArgument(Field field, Argument argument) {
        if (Argument.DEFAULT.equals(argument.name())) {
            final Argument delegate = argument;
            final String name = field.getName();
            argument = new Argument() {
                public String name() {
                    return name;
                }

                public String description() {
                    return delegate.description();
                }

                public boolean required() {
                    return delegate.required();
                }

                public int index() {
                    return delegate.index();
                }

                public boolean multiValued() {
                    return delegate.multiValued();
                }

                public String valueToShowInHelp() {
                    return delegate.valueToShowInHelp();
                }

                public Class<? extends Annotation> annotationType() {
                    return delegate.annotationType();
                }

                public boolean censor() {
                    return delegate.censor();
                }

                public char mask() {
                    return delegate.mask();
                }
            };
        }
        return argument;
    }

    protected Object getDefaultValue(Action action, Field field) {
        try {
            field.setAccessible(true);
            return field.get(action);
        } catch (Exception e) {
            return null;
        }
    }

    protected String getDefaultValueString(Object o) {
        if (o != null
                && (!(o instanceof Boolean) || ((Boolean) o))
                && (!(o instanceof Number) || ((Number) o).doubleValue() != 0.0)) {
            return o.toString();
        } else {
            return null;
        }
    }

}


text:
Export / Import meta tags for drupal

Export and import entity urls, titles, meta titles, meta keywords, meta descriptions to CSV file

Import page: http://site.app/admin/config/search/metatags/metaimport

Export page: http://site.app/admin/config/search/metatags/metaexport


text:
// This file act as a Controller which contains chef-factory related all end points.

var masterUtil = require('_pr/lib/utils/masterUtil.js');
var ChefFactory = require('_pr/model/chef-factory');
var longJobTracker = require('_pr/model/taskstatus');
var logger = require('_pr/logger')(module);

module.exports.setRoutes = function(app, verificationFunc) {

    app.all('/cheffactory/*', verificationFunc);

    app.all('/cheffactory/:serverId/*', function(req, res, next) {

        masterUtil.getCongifMgmtsById(req.params.serverId, function(err, infraManagerDetails) {
            if (err) {
                res.status(500).send({
                    message: "Server Behaved Unexpectedly"
                });
                return;
            }
            if (!infraManagerDetails) {
                res.send(404, {
                    "message": "Infra manager not found"
                });
                return;
            }
            if (infraManagerDetails.configType === 'chef') {
                var chefFactory = new ChefFactory({
                    userChefRepoLocation: infraManagerDetails.chefRepoLocation,
                    chefUserName: infraManagerDetails.loginname,
                    chefUserPemFile: infraManagerDetails.userpemfile,
                    chefValidationPemFile: infraManagerDetails.validatorpemfile,
                    hostedChefUrl: infraManagerDetails.url
                });
                req.chefFactory = chefFactory;
                next();
            } else {
                res.send(404, {
                    "message": "Infra manager not supported"
                });
                return;
            }

        });

    });

    app.get('/cheffactory/:serverId/sync', function(req, res) {
        var chefFactory = req.chefFactory;
        chefFactory.sync(function(err, cookbooks) {
            if (err) {
                res.status(500).send({
                    message: "Server Behaved Unexpectedly"
                });
                return;
            }
            res.send(200, cookbooks);
        });
    });

    app.get('/cheffactory/:serverId/cookbooks/', verificationFunc, function(req, res) {
        var path = req.query.path;
        var chefFactory = req.chefFactory;
        chefFactory.getCookbookData(path, function(err, cookbookData) {
            if (err) {
                res.status(500).send({
                    message: "Server Behaved Unexpectedly"
                });
                return;
            }
            res.send(200, cookbookData);
        });
    });

    app.post('/cheffactory/:serverId/cookbooks/', verificationFunc, function(req, res) {
        var path = req.body.filePath;
        var fileContent = req.body.fileContent;
        var chefFactory = req.chefFactory;
        chefFactory.saveCookbookFile(path, fileContent, function(err) {
            if (err) {
                logger.debug(err);
                var errRespJson = {
                    message: "Server Behaved Unexpectedly",
                };
                if (err.stdErrMsg) {
                    errRespJson.stdErrMsg = err.stdErrMsg;
                }
                res.status(500).send(errRespJson);
                return;
            }
            res.send(200);
        });
    });

    app.get('/cheffactory/:serverId/roles/', verificationFunc, function(req, res) {
        var path = req.query.path;
        var chefFactory = req.chefFactory;
        logger.debug('path ===> ', path);
        chefFactory.getRoleData(path, function(err, cookbookData) {
            if (err) {
                res.status(500).send({
                    message: "Server Behaved Unexpectedly"
                });
                return;
            }
            res.send(200, cookbookData);
        });
    });

    app.post('/cheffactory/:serverId/roles/', verificationFunc, function(req, res) {
        var path = req.body.filePath;
        var fileContent = req.body.fileContent;
        var chefFactory = req.chefFactory;
        chefFactory.saveRoleFile(path, fileContent, function(err) {
            if (err) {
                logger.error(err);
                var errRespJson = {
                    message: "Server Behaved Unexpectedly",
                };
                if (err.stdErrMsg) {
                    errRespJson.stdErrMsg = err.stdErrMsg;
                }
                res.status(500).send(errRespJson);
                return;
            }
            res.send(200);
        });
    });

    app.get('/cheffactory/:serverId/factoryItems/', verificationFunc, function(req, res) {
        var path = req.query.path;
        var chefFactory = req.chefFactory;
        chefFactory.getFactoryItems(function(err, factoryItems) {
            if (err) {
                res.status(500).send({
                    message: "Server Behaved Unexpectedly"
                });
                return;
            }
            res.send(200, factoryItems);
        });
    });

    app.post('/cheffactory/:serverId/factoryItems/sync', verificationFunc, function(req, res) {
        var path = req.query.path;
        var chefFactory = req.chefFactory;
        var cookbookCount = 0;
        var roleCount = 0;
        var cookbooks = req.body.cookbooks;
        var roles = req.body.roles;
        var jobTracker;

        if (!((cookbooks && cookbooks.length) || (roles && roles.length))) {
            res.status(400).send({
                message: "cookbooks/roles list is empty"
            });
            return;
        }

        function downloadCookbook(cookbookName) {
            chefFactory.downloadFactoryItem(cookbookName, 'cookbook', function(err) {
                cookbookCount++;
                var jobStatus;
                if (err) {
                    jobStatus = {
                        itemName: cookbookName,
                        itemType: 'cookbook',
                        error: true,
                        message: "Unable to download cookbook : " + cookbookName
                    };
                } else {
                    jobStatus = {
                        itemName: cookbookName,
                        itemType: 'cookbook',
                        error: false,
                        message: "Cookbook downloaded : " + cookbookName
                    };
                }
                if (cookbooks.length === cookbookCount) {
                    if (roles && roles.length) {
                        jobTracker.updateTaskStatus(jobStatus);
                        downloadRole(roles[roleCount]);
                    } else {
                        jobTracker.endTaskStatus(true, jobStatus);
                    }
                } else {
                    // updating
                    jobTracker.updateTaskStatus(jobStatus);
                    downloadCookbook(cookbooks[cookbookCount]);
                }
            });
        }

        function downloadRole(roleName) {
            chefFactory.downloadFactoryItem(roleName, 'role', function(err) {
                roleCount++;
                var jobStatus;
                if (err) {
                    jobStatus = {
                        itemName: roleName,
                        itemType: 'role',
                        error: true,
                        message: "Unable to download role : " + roleName
                    };
                } else {
                    jobStatus = {
                        itemName: roleName,
                        itemType: 'role',
                        error: false,
                        message: "Role downloaded: " + roleName
                    };
                }
                if (roles.length === roleCount) {
                    jobTracker.endTaskStatus(true, jobStatus);
                } else {
                    jobTracker.updateTaskStatus(jobStatus);
                    downloadRole(roles[roleCount]);
                }
            });
        }

        longJobTracker.getTaskStatus(null, function(err, obj) {
            if (err) {
                res.status(500).send({
                    message: "unable to initialize Job tracker"
                });
                return;
            }
            jobTracker = obj;
            if (cookbooks && cookbooks.length) {
                downloadCookbook(cookbooks[cookbookCount]);
            } else if (roles && roles.length) {
                downloadRole(roles[roleCount]);
            }
            res.send(200, {
                jobId: jobTracker.getTaskId()
            });
        });
    });

};


text:
package com.lightbend.lagom.it

import java.util.Optional
import java.util.concurrent.TimeUnit

import akka.stream.scaladsl.Sink
import akka.stream.scaladsl.Flow
import akka.stream.scaladsl.Source
import com.lightbend.lagom.it.mocks._
import akka.Done
import akka.NotUsed
import play.api.Application
import play.api.libs.streams.AkkaStreams

import scala.collection.JavaConverters._
import scala.concurrent.Await
import scala.concurrent.Promise
import scala.concurrent.duration._
import scala.compat.java8.OptionConverters._
import scala.util.Failure
import scala.util.Success
import scala.util.Try
import akka.pattern.CircuitBreakerOpenException
import java.util.concurrent.ExecutionException

import akka.util.ByteString

class JavadslMockServiceSpec extends ServiceSupport {
  def withMockServiceClient(
      block: Application => MockService => Unit
  )(implicit httpBackend: HttpBackend): Unit =
    withClient[MockService](_.bindings(new MockServiceModule))(block)

  List(AkkaHttp, Netty).foreach { implicit backend =>
    s"A mock service (using $backend)" should {
      "be possible to invoke" in withMockServiceClient { implicit app => client =>
        val id       = 10L
        val request  = new MockRequestEntity("bar", 20)
        val response = client.mockCall(id).invoke(request).toCompletableFuture.get(10, TimeUnit.SECONDS)
        response.incomingId should ===(id)
        response.incomingRequest should ===(request)
      }
      "be possible to invoke for NotUsed parameters" in withMockServiceClient { implicit app => client =>
        MockServiceImpl.invoked.set(false)
        client.doNothing().invoke().toCompletableFuture.get(10, TimeUnit.SECONDS) should ===(NotUsed)
        MockServiceImpl.invoked.get() should ===(true)
      }
      "be possible to invoke for Done parameters and response" in withMockServiceClient { implicit app => client =>
        val response = client.doneCall.invoke(Done.getInstance()).toCompletableFuture.get(10, TimeUnit.SECONDS)
        response should ===(Done.getInstance)
      }
      "be possible to invoke for ByteString parameters and response" in withMockServiceClient {
        implicit app => client =>
          val request = ByteString.fromString("raw ByteString")
          client.echoByteString().invoke(request).toCompletableFuture.get(10, TimeUnit.SECONDS) should ===(request)
      }

      "work with streamed responses" in withMockServiceClient { implicit app => client =>
        val request = new MockRequestEntity("entity", 1)
        Try(client.streamResponse().invoke(request).toCompletableFuture.get(10, TimeUnit.SECONDS)) match {
          case Success(result) =>
            consume(result.asScala) should ===((1 to 3).map(i => new MockResponseEntity(i, request)))
          case Failure(_) =>
            println(
              "SKIPPED - This may sometimes fail due to https://github.com/playframework/playframework/issues/5365"
            )
        }
      }

      "work with streamed responses and unit requests" in withMockServiceClient { implicit app => client =>
        val resultStream = client.unitStreamResponse().invoke().toCompletableFuture.get(10, TimeUnit.SECONDS)
        consume(resultStream.asScala) should ===(
          (1 to 3).map(i => new MockResponseEntity(i, new MockRequestEntity("entity", i)))
        )
      }
      "work with streamed requests" in withMockServiceClient { implicit app => client =>
        val requests    = (1 to 3).map(i => new MockRequestEntity("request", i))
        val gotResponse = Promise[None.type]()
        val closeWhenGotResponse =
          Source.maybe[MockRequestEntity].mapMaterializedValue(_.completeWith(gotResponse.future))
        val result = client
          .streamRequest()
          .invoke(Source(requests).concat(closeWhenGotResponse).asJava)
          .toCompletableFuture
          .get(10, TimeUnit.SECONDS)
        gotResponse.success(None)
        result should ===(new MockResponseEntity(1, requests(0)))
      }
      "work with streamed requests and unit responses" when {
        "an empty message is sent for unit" in withMockServiceClient { implicit app => client =>
          // In this case, we wait for a response from the server before closing the connection. The response will be an
          // empty web socket message which will be returned to us as null
          MockServiceImpl.firstReceived.set(null)
          val requests    = (1 to 3).map(i => new MockRequestEntity("request", i))
          val gotResponse = Promise[None.type]()
          val closeWhenGotResponse =
            Source.maybe[MockRequestEntity].mapMaterializedValue(_.completeWith(gotResponse.future))
          client
            .streamRequestUnit()
            .invoke(Source(requests).concat(closeWhenGotResponse).asJava)
            .toCompletableFuture
            .get(10, TimeUnit.SECONDS) should ===(NotUsed)
          gotResponse.success(None)
          MockServiceImpl.firstReceived.get() should ===(requests(0))
        }
        "no message is sent for unit" in withMockServiceClient { implicit app => client =>
          // In this case, we send nothing to the server, which is waiting for a single message before it sends a response,
          // instead we just close the connection, we want to make sure that the client call still returns.
          MockServiceImpl.firstReceived.set(null)
          client
            .streamRequestUnit()
            .invoke(Source.empty.asJava)
            .toCompletableFuture
            .get(10, TimeUnit.SECONDS) should ===(NotUsed)
        }
      }
      "work with bidi streams" when {
        "the client closes the connection" in withMockServiceClient { implicit app => client =>
          val requests = (1 to 3).map(i => new MockRequestEntity("request", i))
          // Use a source that never terminates so we don't close the upstream (which would close the downstream), and then
          // use takeUpTo so that we close downstream when we've got everything we want
          val resultStream = client
            .bidiStream()
            .invoke(Source(requests).concat(Source.maybe).asJava)
            .toCompletableFuture
            .get(10, TimeUnit.SECONDS)
          consume(resultStream.asScala.take(3)) should ===(requests.map(r => new MockResponseEntity(1, r)))
        }
        "the server closes the connection" in withMockServiceClient { implicit app => client =>
          val requests    = (1 to 3).map(i => new MockRequestEntity("request", i))
          val gotResponse = Promise[None.type]()
          val closeWhenGotResponse =
            Source.maybe[MockRequestEntity].mapMaterializedValue(_.completeWith(gotResponse.future))
          val serverClosed = Promise[Done]()
          val trackServerClosed =
            AkkaStreams.ignoreAfterCancellation[MockResponseEntity].mapMaterializedValue(serverClosed.completeWith)
          val resultStream = client
            .bidiStream()
            .invoke(Source(requests).concat(closeWhenGotResponse).asJava)
            .toCompletableFuture
            .get(10, TimeUnit.SECONDS)
          consume(resultStream.asScala.via(trackServerClosed).take(3)) should ===(
            requests.map(r => new MockResponseEntity(1, r))
          )
          gotResponse.success(None)
          Await.result(serverClosed.future, 10.seconds) should ===(Done)
        }
      }
      "work with custom headers" in withMockServiceClient { implicit app => client =>
        val consumer = new MockServiceClientConsumer(client)
        val result   = consumer.invokeCustomHeaders("Foo-Header", "Bar").toCompletableFuture.get(10, TimeUnit.SECONDS)
        result.second should ===("Bar")
        result.first.getHeader("Header-Name").asScala should ===(Some("Foo-Header"))
        result.first.status should ===(201)
      }
      "work with custom headers on streams" in withMockServiceClient { implicit app => client =>
        val consumer = new MockServiceClientConsumer(client)
        val result = consumer
          .invokeStreamCustomHeaders(
            Seq(akka.japi.Pair("Header-1", "value1"), akka.japi.Pair("Header-2", "value2")).asJava
          )
          .toCompletableFuture
          .get(10, TimeUnit.SECONDS)
        val values = consume(result.asScala.via(Flow[String].take(2)))
        values should ===(Seq("value1", "value2"))
      }
      "send the service name" in withMockServiceClient { implicit app => client =>
        client.serviceName().invoke().toCompletableFuture.get(10, TimeUnit.SECONDS) should ===("mockservice")
      }
      "send the service name on streams" in withMockServiceClient { implicit app => client =>
        Await.result(
          client.streamServiceName().invoke().toCompletableFuture.get(10, TimeUnit.SECONDS).asScala.runWith(Sink.head),
          10.seconds
        ) should ===("mockservice")
      }

      "work with query params" in withMockServiceClient { implicit app => client =>
        client.queryParamId(Optional.of("foo")).invoke().toCompletableFuture.get(10, TimeUnit.SECONDS) should ===("foo")
      }

      "work with collections of entities" in withMockServiceClient { implicit app => client =>
        val request  = new MockRequestEntity("results", 10)
        val response = client.listResults().invoke(request).toCompletableFuture.get(10, TimeUnit.SECONDS)

        response.size() should ===(request.field2)
      }

      "work with custom serializers" when {
        "the serializer protocol uses a custom contentType" in withMockServiceClient { implicit app => client =>
          val id       = 20
          val request  = new MockRequestEntity("bar", id)
          val response = client.customContentType().invoke(request).toCompletableFuture.get(10, TimeUnit.SECONDS)
          response.incomingId should ===(id)
          response.incomingRequest should ===(request)
        }

        "the serializer protocol does not specify a contentType" in withMockServiceClient { implicit app => client =>
          val id       = 20
          val request  = new MockRequestEntity("bar", id)
          val response = client.noContentType().invoke(request).toCompletableFuture.get(10, TimeUnit.SECONDS)
          response.incomingId should ===(id)
          response.incomingRequest should ===(request)
        }
      }

      "be invoked with circuit breaker" in withMockServiceClient { implicit app => client =>
        MockServiceImpl.invoked.set(false)
        (1 to 20).foreach { _ =>
          intercept[Exception] {
            client.alwaysFail().invoke().toCompletableFuture.get(10, TimeUnit.SECONDS)
          }
        }
        MockServiceImpl.invoked.get() should ===(true)
        MockServiceImpl.invoked.set(false)
        intercept[CircuitBreakerOpenException] {
          try {
            client.alwaysFail().invoke().toCompletableFuture.get(10, TimeUnit.SECONDS)
          } catch {
            case e: ExecutionException => throw e.getCause
          }
        }
        MockServiceImpl.invoked.get() should ===(false)
      }
    }
  }
}


text:
#ifndef JETT_H
#define JETT_H

#include <stddef.h>
#include <stdbool.h>

#ifndef MULTITHREAD_ENABLED
/*
 * Init is only needed to set initial values
 */
void jett_init(char *pJsonDocument, int size);
#else
typedef struct
{
   int pos;
   int length;
   char* pJson;
} sJettState;
#endif

/*
 * Find key withing the object and if successful return its start and end positions
 */
bool jett_findKey(
#ifdef MULTITHREAD_ENABLED
   sJettState* pState,
#endif
   int* pBegin, int* pEnd);

/*
 * Enters collection of items
 */
bool jett_collectionBegin(
#ifdef MULTITHREAD_ENABLED
   sJettState* pState
#else
   void
#endif
);

/*
 * Exits collection of items
 */
bool jett_collectionEnd(
#ifdef MULTITHREAD_ENABLED
   sJettState* pState
#else
   void
#endif
);

/*
 * Get primitive type value
 */
bool jett_getValue(
#ifdef MULTITHREAD_ENABLED
   sJettState* pState,
#endif
   int* pBegin, int* pEnd);

#endif//JETT_H


text:
package com.vswamy.hackerranksolutions.problems.warmup;

import java.util.Scanner;

import com.vswamy.hackerranksolutions.interfaces.Problem;

/**
 * @author vswamy
 * @Problem statement: https://www.hackerrank.com/challenges/filling-jars
 */

public class FillingJars implements Problem
{

    @Override
    public void run()
    {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        long m = scanner.nextLong();
        double totalValue = 0;

        for(int i = 0; i < m ; i++)
        {
            long a = scanner.nextLong();
            long b = scanner.nextLong();
            long value = scanner.nextLong();
            totalValue += (1.0 * value) * (b - a + 1) / n ;
        }
        System.out.println((long)totalValue);
    }

}


text:
<?xml version = '1.0' encoding = 'UTF-8'?>
<TableProxyOraclev12c class="oracle.dbtools.crest.model.design.storage.oracle.v12c.TableProxyOraclev12c" name="AMB_OPS_VERSION" directorySegmentName="seg_0" id="10451921-A01B-700C-A5D0-216E852E5E78">
<createdBy>openthinks-pc</createdBy>
<createdTime>2016-03-23 13:26:52 UTC</createdTime>
<ownerDesignName>AMB</ownerDesignName>
<logging>YES</logging>
<partitionedRowMovement>DISABLE</partitionedRowMovement>
<temporaryChanged>false</temporaryChanged>
<accessDriverType>oracle_loader</accessDriverType>
<rejectLimit></rejectLimit>
<columnProxies itemClass="oracle.dbtools.crest.model.design.storage.oracle.v12c.ColumnProxyOraclev12c">
<ColumnProxy name="OPS_DESC" id="3278E64C-A85A-157F-DC0A-8468AB84BABC">
<createdBy>openthinks-pc</createdBy>
<createdTime>2016-03-23 13:26:52 UTC</createdTime>
<ownerDesignName>AMB</ownerDesignName>
</ColumnProxy>
<ColumnProxy name="VERSION_ID" id="38BBFD48-743E-2B15-C11A-5E20C77F88DA">
<createdBy>openthinks-pc</createdBy>
<createdTime>2016-03-23 13:26:52 UTC</createdTime>
<ownerDesignName>AMB</ownerDesignName>
</ColumnProxy>
<ColumnProxy name="OPS_VALUE" id="B197DFBD-FAB9-8B48-4244-1475BB3FEB89">
<createdBy>openthinks-pc</createdBy>
<createdTime>2016-03-23 13:26:52 UTC</createdTime>
<ownerDesignName>AMB</ownerDesignName>
</ColumnProxy>
<ColumnProxy name="OPS_CODE" id="E484905F-7262-925E-0077-71443C83F374">
<createdBy>openthinks-pc</createdBy>
<createdTime>2016-03-23 13:26:52 UTC</createdTime>
<ownerDesignName>AMB</ownerDesignName>
</ColumnProxy>
<ColumnProxy name="OPS_STYLE" id="E6F549D8-6CB3-16DF-2343-E676F18B811A">
<createdBy>openthinks-pc</createdBy>
<createdTime>2016-03-23 13:26:52 UTC</createdTime>
<ownerDesignName>AMB</ownerDesignName>
</ColumnProxy>
</columnProxies>
<primaryKeys>
<PrimaryKey class="oracle.dbtools.crest.model.design.storage.oracle.v10g.PKProxyOraclev10g" name="AMB_OPS_VERSION_PK" id="E55D7F78-A67E-5271-F10F-A4832EA06DFB">
<createdBy>openthinks-pc</createdBy>
<createdTime>2016-03-23 13:26:52 UTC</createdTime>
<ownerDesignName>AMB</ownerDesignName>
<indexSort>SORTED</indexSort>
</PrimaryKey>
</primaryKeys>
</TableProxyOraclev12c>


text:
package org.onosproject.net.intent.impl.compiler;

import com.google.common.collect.Maps;
import org.apache.felix.scr.annotations.Activate;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Deactivate;
import org.apache.felix.scr.annotations.Modified;
import org.apache.felix.scr.annotations.Property;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.ReferenceCardinality;
import org.apache.felix.scr.annotations.Service;
import org.onlab.util.Tools;
import org.onosproject.cfg.ComponentConfigService;
import org.onosproject.net.intent.Intent;
import org.onosproject.net.intent.IntentCompiler;
import org.onosproject.net.intent.IntentExtensionService;
import org.osgi.service.component.ComponentContext;
import org.slf4j.Logger;

import java.util.Map;

import static com.google.common.base.Strings.isNullOrEmpty;
import static org.slf4j.LoggerFactory.getLogger;

/**
 * Auxiliary utility to register either flow-rule compilers or flow-objective
 * compilers.
 */
@Component
@Service(value = IntentConfigurableRegistrator.class)
public class IntentConfigurableRegistrator {

    private final Logger log = getLogger(getClass());

    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
    protected IntentExtensionService extensionService;

    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
    protected ComponentConfigService cfgService;

    private static final boolean DEFAULT_FLOW_OBJECTIVES = false;
    @Property(name = "useFlowObjectives",
            boolValue = DEFAULT_FLOW_OBJECTIVES,
            label = "Indicates whether to use flow objective-based compilers")
    private boolean useFlowObjectives = DEFAULT_FLOW_OBJECTIVES;

    private final Map<Class<Intent>, IntentCompiler<Intent>> flowRuleBased = Maps.newConcurrentMap();
    private final Map<Class<Intent>, IntentCompiler<Intent>> flowObjectiveBased = Maps.newConcurrentMap();

    @Activate
    public void activate() {
        cfgService.registerProperties(getClass());
        log.info("Started");
    }

    @Deactivate
    public void deactivate() {
        cfgService.unregisterProperties(getClass(), false);
        log.info("Stopped");
    }

    @Modified
    public void modified(ComponentContext context) {
        if (context == null) {
            log.info("Settings: useFlowObjectives={}", useFlowObjectives);
            return;
        }

        boolean newFlowObjectives;
        try {
            String s = Tools.get(context.getProperties(), "useFlowObjectives");
            newFlowObjectives = isNullOrEmpty(s) ? useFlowObjectives : Boolean.parseBoolean(s.trim());
        } catch (ClassCastException e) {
            newFlowObjectives = useFlowObjectives;
        }

        if (useFlowObjectives != newFlowObjectives) {
            useFlowObjectives = newFlowObjectives;
            changeCompilers();
            log.info("Settings: useFlowObjectives={}", useFlowObjectives);
        }
    }

    /**
     * Registers the specified compiler for the given intent class.
     *
     * @param cls       intent class
     * @param compiler  intent compiler
     * @param flowBased true if the compiler is flow based
     * @param <T>       the type of intent
     */
    @SuppressWarnings("unchecked")
    <T extends Intent> void registerCompiler(Class<T> cls, IntentCompiler<T> compiler,
                                             boolean flowBased) {
        if (flowBased) {
            flowObjectiveBased.put((Class<Intent>) cls, (IntentCompiler<Intent>) compiler);
        } else {
            flowRuleBased.put((Class<Intent>) cls, (IntentCompiler<Intent>) compiler);
        }
        if (flowBased == useFlowObjectives) {
            extensionService.registerCompiler(cls, compiler);
        }
    }

    /**
     * Unregisters the compiler for the specified intent class.
     *
     * @param cls       intent class
     * @param flowBased true if the compiler is flow based
     * @param <T>       the type of intent
     */
    @SuppressWarnings("unchecked")
    <T extends Intent> void unregisterCompiler(Class<T> cls, boolean flowBased) {
        if (flowBased) {
            flowObjectiveBased.remove(cls);
        } else {
            flowRuleBased.remove(cls);
        }
        if (flowBased == useFlowObjectives) {
            extensionService.unregisterCompiler(cls);
        }
    }

    private void changeCompilers() {
        if (useFlowObjectives) {
            flowRuleBased.forEach((cls, compiler) -> extensionService.unregisterCompiler(cls));
            flowObjectiveBased.forEach((cls, compiler) -> extensionService.registerCompiler(cls, compiler));
        } else {
            flowObjectiveBased.forEach((cls, compiler) -> extensionService.unregisterCompiler(cls));
            flowRuleBased.forEach((cls, compiler) -> extensionService.registerCompiler(cls, compiler));
        }
    }

}


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

<title>P-Index</title>
<meta name="date" content="2018-05-24">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Letter

Next Letter

Frames

No Frames

All Classes

C D E F G H I M O P R S U V

P

path - Static variable in class uxplore.ExplorerController

current path in file system

C D E F G H I M O P R S U V

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Letter

Next Letter

Frames

No Frames

All Classes


text:
export const environment = {
  production: true,
  apiUrl: 'https://getcryptofolio.com/api/v1'
};


text:
"""Tests for tensorflow.ops.registry."""

from tensorflow.python.framework import registry
from tensorflow.python.platform import googletest

class RegistryTest(googletest.TestCase):

  class Foo(object):
    pass

  def testRegisterClass(self):
    myreg = registry.Registry('testfoo')
    with self.assertRaises(LookupError):
      myreg.lookup('Foo')
    myreg.register(RegistryTest.Foo, 'Foo')
    assert myreg.lookup('Foo') == RegistryTest.Foo

  def testRegisterFunction(self):
    myreg = registry.Registry('testbar')
    with self.assertRaises(LookupError):
      myreg.lookup('Bar')
    myreg.register(bar, 'Bar')
    assert myreg.lookup('Bar') == bar

  def testDuplicate(self):
    myreg = registry.Registry('testbar')
    myreg.register(bar, 'Bar')
    with self.assertRaises(KeyError):
      myreg.register(bar, 'Bar')

def bar():
  pass

if __name__ == '__main__':
  googletest.main()


text:
require 'pstore'

module ThatLanguage
  class Store
    attr_reader :path

    def initialize(path)
      @path = path
    end

    def to_h
      Hash.new.tap do |hash|
        within_pstore do
          # FIXME: Change `pstore[:locales]` to pstore[:language_codes]
          hash[:language_codes] = pstore[:locales]
          hash[:language_codes].each do |language_code|
            hash[language_code] = pstore[language_code]
          end
        end
      end
    end

    def exists?
      File.exists?(path)
    end

    private

    def pstore
      @pstore ||= PStore.new(path) if exists?
    end

    def within_pstore(&block)
      pstore.transaction(&block)
    end
  end
end


text:
import java.util.*;
public class TallyTable{
	private ArrayList<Entry> entries;

	//Empty constructor
	public TallyTable(){
		entries = new ArrayList<Entry>();
	}

	//Constructor with number of candidates
	public TallyTable(int n){
		entries = new ArrayList<Entry>(n);
	}

	/**
		Adds candidate Id to table
		If id is not already in table, add it and return true
		If id is in table, return false
		@param id Candidate ID to add
	*/
	public boolean addId(String id){
		if (entries.isEmpty()){
			Entry newEntry = new Entry(id);
			entries.add(newEntry);
			return true;
		}
		else{
			for (int i = 0; i < entries.size(); i++){
				if (entries.get(i).getId().equals(id))
					return false;
			}
			Entry newEntry = new Entry(id);
			entries.add(newEntry);
			return true;
		}
	}

	public String toString(){
		String result = new String();
		for (int i = 0; i < entries.size(); i++){
			result += entries.get(i).toString() + ";";
		}
		return result;
	}
	/**
		Votes for a candidate
		If ID is already in table, vote is added and returns true
		If ID is not in table, returns false
		@param id Candidate Id to vote for
	*/
	public boolean addVote(String newId){
		for (int i = 0; i < entries.size(); i++){
			if (entries.get(i).getId().equals(newId)){
				entries.get(i).addVote();
				return true;
			}
		}
		return false;
	}

	/**
		Makes a string of all of the table entries
		@return String of table entries
	*/
	public String getResults(int n){
		String result = new String();
		Entry winner = new Entry("-1");
		String[] winnerStrings = new String[n];
		Entry[] winners = new Entry[n];
		for (int i = 0; i < n; i++){
			winners[i] = winner;
		}
		for (int j = 0;j <entries.size(); j++){
			if (winners[0].getCount() < entries.get(j).getCount()){
				winners[0] = entries.get(j);
			}

		}
		winnerStrings[0] = winners[0].toString();
		if (n > 1){
			for (int i = 1; i < n; i++){
				for (int j = 0; j <entries.size(); j++){
					if (entries.get(j) != null){
						if (winners[i].getCount() >= entries.get(j).getCount() && !winners[i-1].equals(entries.get(j).toString())){
							winners[i] = entries.get(j);
						}
					}

				}
				winnerStrings[i]=winners[i].toString();
			}
		}
		for (int i = 0; i <n-1; i++){
			result += winnerStrings[i] + ";";
		}
		//result += winnerStrings[n-1];
		result = toString();
		if (result.equals(""))
			return new String("No votes");
		return result;
	}

	//Class for entries in tally table
	class Entry{
		private String id; //ContestantId
		private int count; //Number of votes

		//Constructor
		public Entry(String name){
			id = new String(name);
			count = 0;
		}

		public String getId(){
			return id;
		}

		//Add a vote
		public void addVote(){
			count++;
		}

		public String toString(){
			String result = (id + "," + count);
			return result;
		}

		public int getCount(){
			return count;
		}
	}
}


text:
/*
 * 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.
 */

import { Component, ElementRef, Injector, Input, OnDestroy, OnInit} from '@angular/core';
import { AbstractComponent } from '@common/component/abstract.component';
import { isUndefined } from 'util';
import { WorkbenchService } from '../../../service/workbench.service';
import { Alert } from '@common/util/alert.util';
import { StringUtil } from '@common/util/string.util';
import { CommonConstant } from '@common/constant/common.constant';

@Component({
  selector: 'detail-workbench-navigation',
  templateUrl: './detail-workbench-navigation.html',
})
export class DetailWorkbenchNavigationComponent extends AbstractComponent implements OnInit, OnDestroy {

  /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  | Private Variables
  |-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
  // 워크벤치 리스트
  private navigation: any;

  /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  | Public Variables
  |-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/

  @Input()
  public workbenchId: string;

  // 검색어
  public searchText: string;

  // 필터 show/hide
  public isFilterShow: boolean = false;

  // 필터에서 선택된 값
  public selectedData: string = '';

  // 필터 값
  public filterTypes: any[] = [{ key: 'A', name: '전체' }, { key: 'P', name: '개인 워크스페이스' }, {
    key: 'S',
    name: '공유 워크스페이스'
  }];

  // 검색어 포함 워크벤치리스트
  get filteredNavigation() {
    if (this.navigation === undefined) return [];
    let list = this.navigation;

    // 검색어가 있는지 체크
    const isSearchTextEmpty = StringUtil.isNotEmpty(this.searchText);
    // 검색어가 있다면
    if (isSearchTextEmpty) {
      list = list.filter((result) => {
        return result.name.toLowerCase().indexOf(this.searchText.toLowerCase()) > -1;
      });
    }
    return list;
  }

  /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  | Constructor
  |-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/

  // 생성자
  constructor(protected workbenchService: WorkbenchService,
              protected element: ElementRef,
              protected injector: Injector) {
    super(element, injector);
  }

  /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  | Override Method
  |-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/

  public goWorkbench(item:any) {
    console.log(item);
    const temp = 'workbench/' + item.id;
    console.log('temp', temp);
    // this.router.navigate([temp]);
    window.location.href = CommonConstant.API_CONSTANT.BASE_URL + temp;
  }

  public ngOnInit(): void {
    this.page.size = 20;
    this.getQueryNavigation();
  }

  public ngOnDestroy() {

    // Destory
    super.ngOnDestroy();
  }

  /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  | Public Method
  |-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/

  // select box 선택
  public onSelectedFilter(event) {
    this.selectedData = event.name;
    console.log('onSelectedFilter', this.selectedData);
  }

  // open filter show/hide
  public openFilter() {
    this.isFilterShow = !this.isFilterShow;
  }

  public moreButton(){
    this.page.page = this.page.page + 1;
    this.getQueryNavigation();
  }

  /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  | Private Method
  |-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
  // get workbench list
  private getQueryNavigation() {

    if (isUndefined(this.workbenchId)) return;

    if (isUndefined(this.navigation)) {
      this.navigation = [];
    }

    if (this.page.page === 0) {
      this.navigation = [];
    }
    this.loadingShow();
    this.workbenchService.getQueryNavigation(this.workbenchId, this.page)
      .then((data) => {
        this.loadingHide();
        this.pageResult = data['page'];
        this.navigation = this.navigation.concat(data['_embedded'].books);
      })
      .catch((error) => {
        this.loadingHide();
        if (!isUndefined(error.details)) {
          Alert.error(error.details);
        } else {
          Alert.error(error);
        }
      });
  }

}


text:
#include "WedgeQsfp.h"
#include "fboss/lib/usb/UsbError.h"
#include <folly/Conv.h>
#include <folly/Memory.h>

#include "fboss/qsfp_service/StatsPublisher.h"

using namespace facebook::fboss;
using folly::MutableByteRange;
using std::make_unique;
using folly::StringPiece;
using std::unique_ptr;

namespace facebook { namespace fboss {

WedgeQsfp::WedgeQsfp(int module, WedgeI2CBusLock* wedgeI2CBus)
  : module_(module),
    wedgeI2CBusLock_(wedgeI2CBus) {
  moduleName_ = folly::to<std::string>(module);
}

WedgeQsfp::~WedgeQsfp() {
}

// Note that the module_ starts at 0, but the USB I2C bus module
// assumes that QSFP module numbers extend from 1 to 16.
//
bool WedgeQsfp::detectTransceiver() {
  uint8_t buf[1];
  try {
    wedgeI2CBusLock_->moduleRead(module_ + 1, TransceiverI2CApi::ADDR_QSFP,
                                 0, sizeof(buf), buf);
  } catch (const UsbError& ex) {
    /*
     * This can either mean that we failed to open the USB device
     * because it was already in use, or that the I2C read failed.
     * At some point we might want to return more a more accurate
     * status value to higher-level functions.
     */
    return false;
  }
  return true;
}

int WedgeQsfp::readTransceiver(int dataAddress, int offset,
                               int len, uint8_t* fieldValue) {
  try {
    wedgeI2CBusLock_->moduleRead(module_ + 1, dataAddress, offset, len,
                                  fieldValue);
  } catch (const UsbError& ex) {
    LOG(ERROR) << "Read from transceiver " << module_ << " at offset " <<
      offset << " with length " << len << " failed: " << ex.what();
    StatsPublisher::bumpReadFailure();
    return -1;
  }
  return len;
}

int WedgeQsfp::writeTransceiver(int dataAddress, int offset,
                            int len, uint8_t* fieldValue) {
  try {
    wedgeI2CBusLock_->moduleWrite(module_ + 1, dataAddress, offset, len,
                                   fieldValue);
  } catch (const UsbError& ex) {
    LOG(ERROR) << "Write to transceiver " << module_ << " at offset "
               << offset << " with length " << len << " failed: "
               << folly::exceptionStr(ex);
    StatsPublisher::bumpWriteFailure();
    return -1;
  }
  return len;
}

folly::StringPiece WedgeQsfp::getName() {
  return moduleName_;
}

int WedgeQsfp::getNum() const {
  return module_;
}

}}


text:
#pragma once

#define STRING 0
#define LIST 1
#define OLIST 2

#include <fstream>
#include <string>
#include <unordered_map>
#include <vector>

struct setting {
	std::string key;	/* setting key */
	int val_type;		/* type of setting value */
	std::string comment;	/* comment written above setting */
	bool blank;		/* write a blank line after setting */
};

class ConfigReader {
	public:
		ConfigReader(const char *path);
		bool read();
		void write();
		std::string get(const std::string &key);
		void set(const std::string &key, const std::string &val);
		const char *path();
		std::unordered_map<std::string, std::vector<std::unordered_map<
			std::string, std::string>>> &olist();
	private:
		const char *config_path;
		std::unordered_map<std::string, std::string> setmap;
		std::unordered_map<std::string, std::vector<std::unordered_map<
			std::string, std::string>>> olistmap;
		std::string parse_string(const std::string &buf);
		std::string parse_list(const std::string &buf, std::string &err);
		std::string parse_olist(const std::string &key,
				const std::string &buf, std::string &err);
		bool parse_obj(const std::string &key, std::string &obj,
				std::string &err);
		void write_setting(std::ofstream &writer, size_t ind);
};


text:
layout: default
---

              Hi! {{ site.description }}
              {{ site.email }}.

              ♨ Fun pict ...

Vectisaurus Fruitadens Rajasaurus Empaterias.

Zombie ipsum reversus ab viral inferno.

Marshmallow cookie jelly beans cake brownie.

Lorem ipsum dolor sit amet.

Lewisuchus Poekilopleuron Opisthocoelicaudia Xixiasaurus.

                ✍ Writings.

{% for post in paginator.posts %}

                  {{ post.title }}

                  {{ post.date | date: "%-d %b %Y" }}

{% endfor %}

{% if paginator.previous_page %}

            Balik Lagi
          {% else %}{% endif %}{% if paginator.next_page %}

            Lanjut
          {% else %}{% endif %}
        {% include nav.html %}