text:
/**
* @constructor
*/
function Logger()
{
}

/**
* @type {string} Name of the attribute being processed
*/
Logger.prototype.attrName;

/**
* @type {!Object.<string,!Array>} 2D array of [<log type> => [<callbacks>]]
*/
Logger.prototype.callbacks = {};

/**
* @type {!Array.<!Array>} Log entries in the form [[<type>,<msg>,<context>]]
*/
Logger.prototype.logs = [];

/**
* @type {Tag} Tag being processed
*/
Logger.prototype.tag;

/**
* Add a log entry
*
* @param  {!string}  type    Log type
* @param  {!string}  msg     Log message
* @param  {!Object=} context Log context
*/
Logger.prototype.add = function(type, msg, context)
{
	context = context || {};

	if (!('attrName' in context) && this.attrName)
	{
		context['attrName'] = this.attrName;
	}

	if (!('tag' in context) && this.tag)
	{
		context['tag'] = this.tag;
	}

	// Execute callbacks
	if (this.callbacks[type])
	{
		this.callbacks[type].forEach(function(callback)
		{
			callback(msg, context);
		});
	}

	this.logs.push([type, msg, context]);
}

/**
* Clear the log
*/
Logger.prototype.clear = function()
{
	this.logs = [];
	this.unsetAttribute();
	this.unsetTag();
}

/**
* Return the logs
*
* @return {!Object}
*/
Logger.prototype['get'] = function()
{
	return this.logs;
}

/**
* Attach a callback to be executed when a message of given type is logged
*
* @param {!string}   type     Log type
* @param {!Function} callback Callback
*/
Logger.prototype['on'] = function(type, callback)
{
	this.callbacks[type].push(callback);
}

/**
* Record the name of the attribute being processed
*
* @param  {!string} attrName
*/
Logger.prototype.setAttribute = function(attrName)
{
	this.attrName = attrName;
}

/**
* Record the tag being processed
*
* @param  {!Tag} tag
*/
Logger.prototype.setTag = function(tag)
{
	this.tag = tag;
}

/**
* Unset the name of the attribute being processed
*/
Logger.prototype.unsetAttribute = function()
{
	delete this.attrName;
}

/**
* Unset the tag being processed
*/
Logger.prototype.unsetTag = function()
{
	delete this.tag;
}

//==========================================================================
// Log levels
//==========================================================================

/**
* Add a "debug" type log entry
*
* @param  {!string}  msg     Log message
* @param  {!Object=} context Log context
*/
Logger.prototype.debug = function(msg, context)
{
	this.add('debug', msg, context);
}

/**
* Add an "err" type log entry
*
* @param  {!string}  msg     Log message
* @param  {!Object=} context Log context
*/
Logger.prototype.err = function(msg, context)
{
	this.add('err', msg, context);
}

/**
* Add an "info" type log entry
*
* @param  {!string}  msg     Log message
* @param  {!Object=} context Log context
*/
Logger.prototype.info = function(msg, context)
{
	this.add('info', msg, context);
}

/**
* Add a "warn" type log entry
*
* @param  {!string}  msg     Log message
* @param  {!Object=} context Log context
*/
Logger.prototype.warn = function(msg, context)
{
	this.add('warn', msg, context);
}


text:
require "services"

# Save a document as draft to the publishing-api
class DocumentSaver
  def self.save(document)
    document.update_type = "major" if document.first_draft?

    presented_document = DocumentPresenter.new(document)
    presented_links = DocumentLinksPresenter.new(document)

    document.set_errors_on(document)

    Services.publishing_api.put_content(document.content_id, presented_document.to_json)
    Services.publishing_api.patch_links(document.content_id, presented_links.to_json)
  end
end

redpajama_set_name: RedPajamaGithub


text:
layout: page
title: Sphere Motors Show
date: 2016-05-24
author: Karen Ballard
tags: weekly links, java
status: published
summary: Etiam semper sed tellus in elementum. Vivamus aliquet diam non.
banner: images/banner/meeting-01.jpg
booking:
  startDate: 02/09/2018
  endDate: 02/12/2018
  ctyhocn: CMHAPHX
  groupCode: SMS
published: true
---
Nam interdum mauris nulla, quis viverra lectus fringilla sit amet. Aliquam lobortis feugiat tortor et dictum. Maecenas odio libero, interdum sed venenatis vel, semper id arcu. Suspendisse quis risus tincidunt, posuere tellus ac, pharetra risus. Quisque dignissim lacus non pharetra vestibulum. Maecenas malesuada nisi sit amet mauris finibus blandit quis et lacus. Suspendisse nec dolor eu erat sollicitudin egestas. Nam nunc enim, malesuada ut arcu et, tempus placerat ex. Sed et leo risus. Nam malesuada tellus porttitor, aliquet nulla quis, finibus quam. Ut quis nibh iaculis, elementum justo id, ultricies erat.
Nullam pharetra, purus in tincidunt pellentesque, massa arcu molestie enim, ac dictum est erat id sem. Aenean turpis erat, faucibus a nisl vel, lobortis sodales nunc. Morbi mattis tortor cursus leo elementum tempor. Vivamus pulvinar cursus tellus, ut ullamcorper dui bibendum id. Donec et dolor libero. Maecenas sed arcu feugiat, ullamcorper nulla at, varius nunc. Duis a auctor arcu. Fusce id enim neque. Morbi varius dignissim odio, id ultrices metus vehicula sit amet. Nam egestas interdum aliquet. Fusce dapibus rutrum eleifend. Phasellus blandit porta neque, vel hendrerit arcu lacinia id. Praesent at semper mi.

1 Mauris id nisi ornare neque auctor hendrerit id quis nibh
1 Nam nec diam faucibus, tristique orci et, sagittis enim
1 Maecenas at urna quis neque elementum pulvinar eu eget mi
1 Vestibulum pulvinar orci non nunc pharetra rutrum.

In rhoncus lacus eu justo congue blandit. Maecenas sagittis a tortor rutrum cursus. Integer dui dui, commodo vitae gravida molestie, placerat quis felis. Vestibulum eu consequat velit. Nullam ultricies risus sit amet orci feugiat gravida. Nunc dignissim quam nisi, id aliquet velit vestibulum nec. Aliquam sit amet eros tincidunt, condimentum sem sed, iaculis dui. Nullam congue viverra tempus. Phasellus pellentesque orci tortor.


text:
<?php namespace DCarbone\DCSOAP\WSDL\Actions\Fields\SharePoint;

use DCarbone\DCSOAP\WSDL\Actions\Fields\ComplexField;

/**
 * Class QueryField
 * @package DCarbone\DCSOAP\WSDL\Actions\Fields\SharePoint
 */
class QueryField extends ComplexField
{
    /**
     * @TODO Finish this
     *
     * @return mixed|void
     */
    protected function parseField()
    {

    }
    /**
     * @TODO Not fully implemented yet
     *
     * @param $value
     * @return bool|void
     */
    public function validateValue($value)
    {

    }
}


text: ENV["RUBY_ENV"] = "production" unless ENV["RUBY_ENV"]


text:
import * as React from 'react'
import { DateTime } from 'luxon'
import { RouteComponentProps } from 'react-router'
import { StyleContext, RenderEntity, TypeContext } from '@framework/Lines'
import * as Finder from '@framework/Finder'
import EntityLink from '@framework/SearchControl/EntityLink'
import { SearchControl, ColumnOption } from '@framework/Search'
import { QueryDescription, ResultTable } from '@framework/FindOptions'
import { Entity, JavascriptMessage } from '@framework/Signum.Entities'
import * as Navigator from '@framework/Navigator'
import { TimeMachineMessage } from '../Signum.Entities.DiffLog'
import { Lite } from '@framework/Signum.Entities'
import { newLite, QueryTokenString } from '@framework/Reflection'
import { EngineMessage } from '@framework/Signum.Entities'
import { NormalWindowMessage } from '@framework/Signum.Entities'
import { Dic } from '@framework/Globals'
import { getTypeInfo } from '@framework/Reflection'
import { Tabs, Tab, Modal } from 'react-bootstrap'
import { is } from '@framework/Signum.Entities'
import * as DiffLogClient from '../DiffLogClient'
import { DiffDocument } from './DiffDocument'
import { SearchControlHandler } from '@framework/SearchControl/SearchControl'
import { useAPI, useForceUpdate } from '@framework/Hooks'
import { asUTC } from '@framework/SearchControl/SystemTimeEditor'
import { QueryString } from '../../../../Framework/Signum.React/Scripts/QueryString'
import { ModalHeaderButtons } from '../../../../Framework/Signum.React/Scripts/Components'
import { IModalProps, openModal } from '../../../../Framework/Signum.React/Scripts/Modals'

export default function TimeMachinePage(p: RouteComponentProps<{ type: string; id: string }>) {

  var params = p.match.params;

  const lite = useAPI(() => {
    var lite = newLite(params.type, params.id!);

    return Navigator.API.fillToStrings(lite)
      .then(() => lite)
      .catch(() => { lite.toStr = TimeMachineMessage.EntityDeleted.niceToString(); return lite });
  }, [])

  const searchControl = React.useRef<SearchControlHandler>(null);
  const forceUpdate = useForceUpdate();
  const queryDescription = useAPI(() => Finder.getQueryDescription(params.type), [params.type]);

  var ctx = new StyleContext(undefined, undefined);
  if (lite == null)
    return
{JavascriptMessage.loading.niceToString()}
;

  var scl = searchControl.current?.searchControlLoaded ?? undefined;
  var colIndex = scl?.props.findOptions.columnOptions.findIndex(a => a.token != null && a.token.fullKey == "Entity.SystemValidFrom");

  return (

        {TimeMachineMessage.TimeMachine.niceToString()}

          <EntityLink lite={lite}>{NormalWindowMessage.Type0Id1.niceToString().formatWith(getTypeInfo(lite.EntityType).niceName, lite.id)}</EntityLink>

                        {lite.toStr}

All Versions

      {
        queryDescription && <SearchControl ref={searchControl} findOptions={{
          queryName: lite.EntityType,
          filterOptions: [{ token: QueryTokenString.entity(), operation: "EqualTo", value: lite }],
          columnOptions: [
            { token: QueryTokenString.entity().expression("SystemValidFrom") },
            { token: QueryTokenString.entity().expression("SystemValidTo") },
          ],
          columnOptionsMode: "InsertStart",
          orderOptions: [{ token: QueryTokenString.entity().expression("SystemValidFrom"), orderType: "Ascending" }],
          systemTime: { mode: "All" }
        }}
          onSelectionChanged={() => forceUpdate()}
        />
      }

Selected Versions

      {scl?.state.selectedRows &&
        <TimeMachineTabs lite={lite} versionDatesUTC={scl.state.selectedRows.map(sr => sr.columns[colIndex!] as string).map(d => asUTC(d))} />
      }

  );
}

interface RenderEntityVersionProps {
  lite: Lite<Entity>;
  asOf: string;
}

interface RenderEntityVersionState {
  entity?: Entity;
}

export function RenderEntityVersion(p: RenderEntityVersionProps) {

  const entity = useAPI(signal => DiffLogClient.API.retrieveVersion(p.lite, p.asOf), [p.lite, p.asOf]);

  if (!entity)
    return
{JavascriptMessage.loading.niceToString()}
;

  return (

      <RenderEntity ctx={TypeContext.root(entity, { readOnly: true })} />

  );
}

interface DiffEntityVersionProps {
  lite: Lite<Entity>;
  validFrom: string;
  validTo: string;
}

export function DiffEntityVersion(p: DiffEntityVersionProps) {

  const diffBlock = useAPI(() => DiffLogClient.API.diffVersions(p.lite, p.validFrom, p.validTo), [p.lite, p.validFrom, p.validTo]);

  if (!diffBlock)
    return
{JavascriptMessage.loading.niceToString()}
;

  return (

      <DiffDocument diff={diffBlock} />

  );
}

export function TimeMachineTabs(p: { lite: Lite<Entity>, versionDatesUTC: string[] }) {

  return (
    <Tabs id="timeMachineTabs">
      {p.versionDatesUTC.orderBy(a => a).flatMap((d, i, dates) => [
        <Tab title={d.replace("T", " ")} key={d} eventKey={d}>
          <RenderEntityVersion lite={p.lite} asOf={d} />
        </Tab>,
        (i < dates.length - 1) && <Tab title="<- Diff ->" key={"diff-" + d + "-" + dates[i + 1]} eventKey={"diff-" + d + "-" + dates[i + 1]}>
          <DiffEntityVersion lite={p.lite} validFrom={d} validTo={dates[i + 1]} />
        </Tab>
      ])}
    </Tabs>
  );
}

interface TimeMachineModalProps extends IModalProps<boolean | undefined> {
  lite: Lite<Entity>;
  versionDatesUTC: string[]
}

export function TimeMachineModal(p: TimeMachineModalProps) {

  const [show, setShow] = React.useState(true);
  const answerRef = React.useRef<boolean | undefined>(undefined);

  function handleCloseClicked() {
    setShow(false);
  }

  function handleOnExited() {
    p.onExited!(answerRef.current);
  }

  return (
    <Modal onHide={handleCloseClicked} show={show} className="message-modal" onExited={handleOnExited} size="xl">

{TimeMachineMessage.CompareVersions.niceToString()}

        <button type="button" className="close" data-dismiss="modal" aria-label="Close" onClick={handleCloseClicked}>
          ×
        </button>

        <TimeMachineTabs lite={p.lite} versionDatesUTC={p.versionDatesUTC} />

    </Modal>
  );
}

TimeMachineModal.show = (lite: Lite<Entity>, versionDatesUTC: string[]): Promise<boolean | undefined> => {
  return openModal<boolean | undefined>(<TimeMachineModal lite={lite} versionDatesUTC={versionDatesUTC} />);
};


text:
namespace chromeos {

TestingWilcoDtcSupportdNetworkContext::TestingWilcoDtcSupportdNetworkContext() =
    default;

TestingWilcoDtcSupportdNetworkContext::
    ~TestingWilcoDtcSupportdNetworkContext() = default;

network::mojom::URLLoaderFactory*
TestingWilcoDtcSupportdNetworkContext::GetURLLoaderFactory() {
  return &test_url_loader_factory_;
}

network::TestURLLoaderFactory*
TestingWilcoDtcSupportdNetworkContext::test_url_loader_factory() {
  return &test_url_loader_factory_;
}

}  // namespace chromeos


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <parent>
    <groupId>org.apache.abdera</groupId>
    <artifactId>abdera</artifactId>
    <version>1.2-SNAPSHOT</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>abdera-examples</artifactId>
  <packaging>jar</packaging>
  <name>Abdera Examples</name>
  <version>1.2-SNAPSHOT</version>
  <description>Atom Specification Implementation Examples</description>

  <properties>
    <topDir>${basedir}/..</topDir>
  </properties>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.abdera</groupId>
      <artifactId>abdera-client</artifactId>
      <version>1.2-SNAPSHOT</version>
    </dependency>
    <dependency>
      <groupId>org.apache.abdera</groupId>
      <artifactId>abdera-server</artifactId>
      <version>1.2-SNAPSHOT</version>
    </dependency>
    <dependency>
      <groupId>org.apache.abdera</groupId>
      <artifactId>abdera-extensions-main</artifactId>
      <version>1.2-SNAPSHOT</version>
    </dependency>
    <dependency>
      <groupId>org.apache.abdera</groupId>
      <artifactId>abdera-extensions-serializer</artifactId>
      <version>1.2-SNAPSHOT</version>
    </dependency>
    <dependency>
      <groupId>org.apache.abdera</groupId>
      <artifactId>abdera-extensions-gdata</artifactId>
      <version>1.2-SNAPSHOT</version>
    </dependency>
    <dependency>
      <groupId>org.apache.abdera</groupId>
      <artifactId>abdera-extensions-geo</artifactId>
      <version>1.2-SNAPSHOT</version>
    </dependency>
    <dependency>
      <groupId>org.apache.abdera</groupId>
      <artifactId>abdera-extensions-sharing</artifactId>
      <version>1.2-SNAPSHOT</version>
    </dependency>
    <dependency>
      <groupId>org.apache.abdera</groupId>
      <artifactId>abdera-extensions-features</artifactId>
      <version>1.2-SNAPSHOT</version>
    </dependency>
    <dependency>
      <groupId>org.apache.abdera</groupId>
      <artifactId>abdera-security</artifactId>
      <version>1.2-SNAPSHOT</version>
    </dependency>
    <dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>jetty</artifactId>
      <version>${jetty.version}</version>
    </dependency>
    <dependency>
      <groupId>commons-httpclient</groupId>
      <artifactId>commons-httpclient</artifactId>
    </dependency>
  </dependencies>
</project>


text:
import { hot } from 'react-hot-loader';
import React from 'react';
import { Route, Redirect, Switch } from 'react-router-dom';

import PrivateRoute from 'providers/auth/PrivateRoute';

import Pipelines from 'views/Pipelines';

import Details from 'views/Pipeline/runs/Details';
import Code from 'views/Pipeline/runs/Code';
import TaskTries from 'views/Pipeline/runs/TaskTries';
import TaskDuration from 'views/Pipeline/runs/TaskDuration';
import LandingTimes from 'views/Pipeline/runs/LandingTimes';

import Graph from 'views/Pipeline/run/Graph';
import Gantt from 'views/Pipeline/run/Gantt';

import TIDetails from 'views/Pipeline/ti/Details';
import RenderedTemplate from 'views/Pipeline/ti/RenderedTemplate';
import RenderedK8s from 'views/Pipeline/ti/RenderedK8s';
import Log from 'views/Pipeline/ti/Log';
import XCom from 'views/Pipeline/ti/XCom';

import EventLogs from 'views/Activity/EventLogs';
import Runs from 'views/Activity/Runs';
import Jobs from 'views/Activity/Jobs';
import TaskInstances from 'views/Activity/TaskInstances';
import TaskReschedules from 'views/Activity/TaskReschedules';
import SLAMisses from 'views/Activity/SLAMisses';
import XComs from 'views/Activity/XComs';

import Config from 'views/Config';
import Variables from 'views/Config/Variables';
import Connections from 'views/Config/Connections';
import Pools from 'views/Config/Pools';

import Access from 'views/Access';
import Users from 'views/Access/Users';
import Roles from 'views/Access/Roles';
import Permissions from 'views/Access/Permissions';

import Docs from 'views/Docs';
import NotFound from 'views/NotFound';

const App = () => (
  <Switch>
    <Redirect exact path="/" to="/pipelines" />
    <PrivateRoute exact path="/pipelines" component={Pipelines} />

    <Redirect exact path="/pipelines/:dagId" to="/pipelines/:dagId/details" />
    <PrivateRoute exact path="/pipelines/:dagId/details" component={Details} />
    <PrivateRoute exact path="/pipelines/:dagId/code" component={Code} />
    <PrivateRoute exact path="/pipelines/:dagId/task-tries" component={TaskTries} />
    <PrivateRoute exact path="/pipelines/:dagId/task-duration" component={TaskDuration} />
    <PrivateRoute exact path="/pipelines/:dagId/landing-times" component={LandingTimes} />

    <Redirect exact path="/pipelines/:dagId/:dagRunId" to="/pipelines/:dagId/:dagRunId/graph" />
    <PrivateRoute exact path="/pipelines/:dagId/:dagRunId/graph" component={Graph} />
    <PrivateRoute exact path="/pipelines/:dagId/:dagRunId/gantt" component={Gantt} />

    <Redirect exact path="/pipelines/:dagId/:dagRunId/:taskId" to="/pipelines/:dagId/:dagRunId/:taskId/details" />
    <PrivateRoute exact path="/pipelines/:dagId/:dagRunId/:taskId/details" component={TIDetails} />
    <PrivateRoute exact path="/pipelines/:dagId/:dagRunId/:taskId/rendered-template" component={RenderedTemplate} />
    <PrivateRoute exact path="/pipelines/:dagId/:dagRunId/:taskId/rendered-k8s" component={RenderedK8s} />
    <PrivateRoute exact path="/pipelines/:dagId/:dagRunId/:taskId/log" component={Log} />
    <PrivateRoute exact path="/pipelines/:dagId/:dagRunId/:taskId/xcom" component={XCom} />

    <PrivateRoute exact path="/activity/event-logs" component={EventLogs} />
    <PrivateRoute exact path="/activity/runs" component={Runs} />
    <PrivateRoute exact path="/activity/jobs" component={Jobs} />
    <PrivateRoute exact path="/activity/task-instances" component={TaskInstances} />
    <PrivateRoute exact path="/activity/task-reschedules" component={TaskReschedules} />
    <PrivateRoute exact path="/activity/sla-misses" component={SLAMisses} />
    <PrivateRoute exact path="/activity/xcoms" component={XComs} />

    <PrivateRoute exact path="/config" component={Config} />
    <PrivateRoute exact path="/config/variables" component={Variables} />
    <PrivateRoute exact path="/config/connections" component={Connections} />
    <PrivateRoute exact path="/config/pools" component={Pools} />

    <PrivateRoute exact path="/access" component={Access} />
    <PrivateRoute exact path="/access/users" component={Users} />
    <PrivateRoute exact path="/access/users/new" component={Users} />
    <PrivateRoute exact path="/access/users/:username" component={Users} />
    <PrivateRoute exact path="/access/users/:username/edit" component={Users} />
    <PrivateRoute exact path="/access/roles" component={Roles} />
    <PrivateRoute exact path="/access/permissions" component={Permissions} />

    <Route exact path="/docs" component={Docs} />

    <Route component={NotFound} />
  </Switch>
);

export default hot(module)(App);


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/optimization/v1/fleet_routing.proto

package com.google.cloud.optimization.v1;

public interface TransitionAttributesOrBuilder
    extends
    // @@protoc_insertion_point(interface_extends:google.cloud.optimization.v1.TransitionAttributes)
    com.google.protobuf.MessageOrBuilder {

  /**
   *
   *
   *

   * Tags defining the set of (src->dst) transitions these attributes apply to.
   * A source visit or vehicle start matches iff its
   * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
   * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags]
   * either contains `src_tag` or does not contain `excluded_src_tag` (depending
   * on which of these two fields is non-empty).
   *

   *
   * string src_tag = 1;
   *
   * @return The srcTag.
   */
  java.lang.String getSrcTag();
  /**
   *
   *
   *

   * Tags defining the set of (src->dst) transitions these attributes apply to.
   * A source visit or vehicle start matches iff its
   * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
   * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags]
   * either contains `src_tag` or does not contain `excluded_src_tag` (depending
   * on which of these two fields is non-empty).
   *

   *
   * string src_tag = 1;
   *
   * @return The bytes for srcTag.
   */
  com.google.protobuf.ByteString getSrcTagBytes();

  /**
   *
   *
   *

   * See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be
   * non-empty.
   *

   *
   * string excluded_src_tag = 2;
   *
   * @return The excludedSrcTag.
   */
  java.lang.String getExcludedSrcTag();
  /**
   *
   *
   *

   * See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be
   * non-empty.
   *

   *
   * string excluded_src_tag = 2;
   *
   * @return The bytes for excludedSrcTag.
   */
  com.google.protobuf.ByteString getExcludedSrcTagBytes();

  /**
   *
   *
   *

   * A destination visit or vehicle end matches iff its
   * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
   * or [Vehicle.end_tags][google.cloud.optimization.v1.Vehicle.end_tags] either contains `dst_tag` or does not contain
   * `excluded_dst_tag` (depending on which of these two fields is non-empty).
   *

   *
   * string dst_tag = 3;
   *
   * @return The dstTag.
   */
  java.lang.String getDstTag();
  /**
   *
   *
   *

   * A destination visit or vehicle end matches iff its
   * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
   * or [Vehicle.end_tags][google.cloud.optimization.v1.Vehicle.end_tags] either contains `dst_tag` or does not contain
   * `excluded_dst_tag` (depending on which of these two fields is non-empty).
   *

   *
   * string dst_tag = 3;
   *
   * @return The bytes for dstTag.
   */
  com.google.protobuf.ByteString getDstTagBytes();

  /**
   *
   *
   *

   * See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be
   * non-empty.
   *

   *
   * string excluded_dst_tag = 4;
   *
   * @return The excludedDstTag.
   */
  java.lang.String getExcludedDstTag();
  /**
   *
   *
   *

   * See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be
   * non-empty.
   *

   *
   * string excluded_dst_tag = 4;
   *
   * @return The bytes for excludedDstTag.
   */
  com.google.protobuf.ByteString getExcludedDstTagBytes();

  /**
   *
   *
   *

   * Specifies a cost for performing this transition. This is in the same unit
   * as all other costs in the model and must not be negative. It is applied on
   * top of all other existing costs.
   *

   *
   * double cost = 5;
   *
   * @return The cost.
   */
  double getCost();

  /**
   *
   *
   *

   * Specifies a cost per kilometer applied to the distance traveled while
   * performing this transition. It adds up to any
   * [Vehicle.cost_per_kilometer][google.cloud.optimization.v1.Vehicle.cost_per_kilometer] specified on vehicles.
   *

   *
   * double cost_per_kilometer = 6;
   *
   * @return The costPerKilometer.
   */
  double getCostPerKilometer();

  /**
   *
   *
   *

   * Specifies a limit on the distance traveled while performing this
   * transition.
   * As of 2021/06, only soft limits are supported.
   *

   *
   * .google.cloud.optimization.v1.DistanceLimit distance_limit = 7;
   *
   * @return Whether the distanceLimit field is set.
   */
  boolean hasDistanceLimit();
  /**
   *
   *
   *

   * Specifies a limit on the distance traveled while performing this
   * transition.
   * As of 2021/06, only soft limits are supported.
   *

   *
   * .google.cloud.optimization.v1.DistanceLimit distance_limit = 7;
   *
   * @return The distanceLimit.
   */
  com.google.cloud.optimization.v1.DistanceLimit getDistanceLimit();
  /**
   *
   *
   *

   * Specifies a limit on the distance traveled while performing this
   * transition.
   * As of 2021/06, only soft limits are supported.
   *

   *
   * .google.cloud.optimization.v1.DistanceLimit distance_limit = 7;
   */
  com.google.cloud.optimization.v1.DistanceLimitOrBuilder getDistanceLimitOrBuilder();

  /**
   *
   *
   *

   * Specifies a delay incurred when performing this transition.
   * This delay always occurs *after* finishing the source visit and *before*
   * starting the destination visit.
   *

   *
   * .google.protobuf.Duration delay = 8;
   *
   * @return Whether the delay field is set.
   */
  boolean hasDelay();
  /**
   *
   *
   *

   * Specifies a delay incurred when performing this transition.
   * This delay always occurs *after* finishing the source visit and *before*
   * starting the destination visit.
   *

   *
   * .google.protobuf.Duration delay = 8;
   *
   * @return The delay.
   */
  com.google.protobuf.Duration getDelay();
  /**
   *
   *
   *

   * Specifies a delay incurred when performing this transition.
   * This delay always occurs *after* finishing the source visit and *before*
   * starting the destination visit.
   *

   *
   * .google.protobuf.Duration delay = 8;
   */
  com.google.protobuf.DurationOrBuilder getDelayOrBuilder();
}


text:
package com.google.cloud.dataflow.sdk.util.state;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;

import com.google.cloud.dataflow.sdk.coders.StringUtf8Coder;
import com.google.cloud.dataflow.sdk.coders.VarIntCoder;
import com.google.cloud.dataflow.sdk.transforms.Sum;
import com.google.cloud.dataflow.sdk.transforms.windowing.BoundedWindow;
import com.google.cloud.dataflow.sdk.transforms.windowing.IntervalWindow;
import com.google.cloud.dataflow.sdk.transforms.windowing.OutputTimeFns;

import org.hamcrest.Matchers;
import org.joda.time.Instant;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

import java.util.Arrays;

/**
 * Tests for {@link InMemoryStateInternals}.
 */
@RunWith(JUnit4.class)
public class InMemoryStateInternalsTest {

  private static final BoundedWindow WINDOW_1 = new IntervalWindow(new Instant(0), new Instant(10));
  private static final BoundedWindow WINDOW_3 = new IntervalWindow(new Instant(5), new Instant(20));
  private static final StateNamespace NAMESPACE_1 = new StateNamespaceForTest("ns1");
  private static final StateNamespace NAMESPACE_2 = new StateNamespaceForTest("ns2");
  private static final StateNamespace NAMESPACE_3 = new StateNamespaceForTest("ns3");

  private static final StateTag<ValueState<String>> STRING_VALUE_ADDR =
      StateTags.value("stringValue", StringUtf8Coder.of());
  private static final StateTag<CombiningValueState<Integer, Integer>> SUM_INTEGER_ADDR =
      StateTags.combiningValueFromInputInternal(
          "sumInteger", VarIntCoder.of(), new Sum.SumIntegerFn());
  private static final StateTag<BagState<String>> STRING_BAG_ADDR =
      StateTags.bag("stringBag", StringUtf8Coder.of());
  private static final StateTag<WatermarkStateInternal> WATERMARK_EARLIEST_ADDR =
      StateTags.watermarkStateInternal("watermark",
          OutputTimeFns.outputAtEarliestInputTimestamp());
  private static final StateTag<WatermarkStateInternal> WATERMARK_LATEST_ADDR =
      StateTags.watermarkStateInternal("watermark",
          OutputTimeFns.outputAtLatestInputTimestamp());
  private static final StateTag<WatermarkStateInternal> WATERMARK_EOW_ADDR =
      StateTags.watermarkStateInternal("watermark",
          OutputTimeFns.outputAtEndOfWindow());

  InMemoryStateInternals underTest = new InMemoryStateInternals();

  @Test
  public void testValue() throws Exception {
    ValueState<String> value = underTest.state(NAMESPACE_1, STRING_VALUE_ADDR);

    // State instances are cached, but depend on the namespace.
    assertThat(underTest.state(NAMESPACE_1, STRING_VALUE_ADDR), Matchers.sameInstance(value));
    assertThat(underTest.state(NAMESPACE_2, STRING_VALUE_ADDR),
        Matchers.not(Matchers.sameInstance(value)));

    assertThat(value.get().read(), Matchers.nullValue());
    StateContents<String> readFuture = value.get();
    value.set("hello");
    assertThat(readFuture.read(), Matchers.equalTo("hello"));
    assertThat(value.get().read(), Matchers.equalTo("hello"));
    value.set("world");
    assertThat(readFuture.read(), Matchers.equalTo("world"));

    value.clear();
    assertThat(value.get().read(), Matchers.nullValue());
    assertThat(underTest.state(NAMESPACE_1, STRING_VALUE_ADDR), Matchers.sameInstance(value));
  }

  @Test
  public void testBag() throws Exception {
    BagState<String> value = underTest.state(NAMESPACE_1, STRING_BAG_ADDR);

    // State instances are cached, but depend on the namespace.
    assertEquals(value, underTest.state(NAMESPACE_1, STRING_BAG_ADDR));
    assertFalse(value.equals(underTest.state(NAMESPACE_2, STRING_BAG_ADDR)));

    assertThat(value.get().read(), Matchers.emptyIterable());
    StateContents<Iterable<String>> readFuture = value.get();
    value.add("hello");
    assertThat(readFuture.read(), Matchers.containsInAnyOrder("hello"));
    assertThat(value.get().read(), Matchers.containsInAnyOrder("hello"));

    value.add("world");
    assertThat(value.get().read(), Matchers.containsInAnyOrder("hello", "world"));

    value.clear();
    assertThat(value.get().read(), Matchers.emptyIterable());
    assertThat(underTest.state(NAMESPACE_1, STRING_BAG_ADDR), Matchers.sameInstance(value));
  }

  @Test
  public void testBagIsEmpty() throws Exception {
    BagState<String> value = underTest.state(NAMESPACE_1, STRING_BAG_ADDR);

    assertThat(value.isEmpty().read(), Matchers.is(true));
    StateContents<Boolean> readFuture = value.isEmpty();
    value.add("hello");
    assertThat(readFuture.read(), Matchers.is(false));

    value.clear();
    assertThat(readFuture.read(), Matchers.is(true));
  }

  @Test
  public void testMergeBagIntoSource() throws Exception {
    BagState<String> bag1 = underTest.state(NAMESPACE_1, STRING_BAG_ADDR);
    BagState<String> bag2 = underTest.state(NAMESPACE_2, STRING_BAG_ADDR);

    bag1.add("Hello");
    bag2.add("World");
    bag1.add("!");

    BagState<String> merged = underTest.mergedState(
        Arrays.asList(NAMESPACE_1, NAMESPACE_2), NAMESPACE_1, STRING_BAG_ADDR, WINDOW_1);

    // Reading the merged bag gets both the contents
    assertThat(merged.get().read(), Matchers.containsInAnyOrder("Hello", "World", "!"));

    // Adding to the merged bag adds to namespace 1
    merged.add("...");
    assertThat(merged.get().read(), Matchers.containsInAnyOrder("Hello", "World", "!", "..."));
    assertThat(bag1.get().read(), Matchers.containsInAnyOrder("Hello", "!", "..."));
    assertThat(bag2.get().read(), Matchers.not(Matchers.contains("...")));
  }

  @Test
  public void testMergeBagIntoNewNamespace() throws Exception {
    BagState<String> bag1 = underTest.state(NAMESPACE_1, STRING_BAG_ADDR);
    BagState<String> bag2 = underTest.state(NAMESPACE_2, STRING_BAG_ADDR);

    bag1.add("Hello");
    bag2.add("World");
    bag1.add("!");

    BagState<String> merged = underTest.mergedState(
        Arrays.asList(NAMESPACE_1, NAMESPACE_2, NAMESPACE_3),
        NAMESPACE_3, STRING_BAG_ADDR, WINDOW_3);

    // Reading the merged bag gets both the contents
    assertThat(merged.get().read(), Matchers.containsInAnyOrder("Hello", "World", "!"));

    // Adding to the merged bag adds to namespace 3
    merged.add("...");
    assertThat(merged.get().read(), Matchers.containsInAnyOrder("Hello", "World", "!", "..."));
    assertThat(bag1.get().read(), Matchers.not(Matchers.contains("...")));
    assertThat(bag2.get().read(), Matchers.not(Matchers.contains("...")));
    assertThat(
        underTest.state(NAMESPACE_3, STRING_BAG_ADDR).get().read(), Matchers.contains("..."));
  }

  @Test
  public void testCombiningValue() throws Exception {
    CombiningValueState<Integer, Integer> value = underTest.state(NAMESPACE_1, SUM_INTEGER_ADDR);

    // State instances are cached, but depend on the namespace.
    assertEquals(value, underTest.state(NAMESPACE_1, SUM_INTEGER_ADDR));
    assertFalse(value.equals(underTest.state(NAMESPACE_2, SUM_INTEGER_ADDR)));

    assertThat(value.get().read(), Matchers.equalTo(0));
    StateContents<Integer> readFuture = value.get();
    value.add(2);
    assertThat(readFuture.read(), Matchers.equalTo(2));
    assertThat(value.get().read(), Matchers.equalTo(2));

    value.add(3);
    assertThat(readFuture.read(), Matchers.equalTo(5));

    value.clear();
    assertThat(readFuture.read(), Matchers.equalTo(0));
    assertThat(underTest.state(NAMESPACE_1, SUM_INTEGER_ADDR), Matchers.sameInstance(value));
  }

  @Test
  public void testCombiningIsEmpty() throws Exception {
    CombiningValueState<Integer, Integer> value = underTest.state(NAMESPACE_1, SUM_INTEGER_ADDR);

    assertThat(value.isEmpty().read(), Matchers.is(true));
    StateContents<Boolean> readFuture = value.isEmpty();
    value.add(5);
    assertThat(readFuture.read(), Matchers.is(false));

    value.clear();
    assertThat(readFuture.read(), Matchers.is(true));
  }

  @Test
  public void testMergeCombiningValueIntoSource() throws Exception {
    CombiningValueState<Integer, Integer> value1 = underTest.state(NAMESPACE_1, SUM_INTEGER_ADDR);
    CombiningValueState<Integer, Integer> value2 = underTest.state(NAMESPACE_2, SUM_INTEGER_ADDR);

    value1.add(5);
    value2.add(10);
    value1.add(6);

    assertThat(value1.get().read(), Matchers.equalTo(11));
    assertThat(value2.get().read(), Matchers.equalTo(10));

    CombiningValueState<Integer, Integer> merged = underTest.mergedState(
        Arrays.asList(NAMESPACE_1, NAMESPACE_2), NAMESPACE_1, SUM_INTEGER_ADDR, WINDOW_1);

    assertThat(value1.get().read(), Matchers.equalTo(11));
    assertThat(value2.get().read(), Matchers.equalTo(10));
    assertThat(merged.get().read(), Matchers.equalTo(21));

    // Reading the merged value compressed the old values.
    assertThat(value1.get().read(), Matchers.equalTo(21));
    assertThat(value2.get().read(), Matchers.equalTo(0));

    merged.add(8);
    assertThat(merged.get().read(), Matchers.equalTo(29));
    assertThat(value1.get().read(), Matchers.equalTo(29));
    assertThat(value2.get().read(), Matchers.equalTo(0));
  }

  @Test
  public void testMergeCombiningValueIntoNewNamespace() throws Exception {
    CombiningValueState<Integer, Integer> value1 = underTest.state(NAMESPACE_1, SUM_INTEGER_ADDR);
    CombiningValueState<Integer, Integer> value2 = underTest.state(NAMESPACE_2, SUM_INTEGER_ADDR);

    value1.add(5);
    value2.add(10);
    value1.add(6);

    assertThat(value1.get().read(), Matchers.equalTo(11));
    assertThat(value2.get().read(), Matchers.equalTo(10));

    CombiningValueState<Integer, Integer> merged = underTest.mergedState(
        Arrays.asList(NAMESPACE_1, NAMESPACE_2, NAMESPACE_3),
        NAMESPACE_3, SUM_INTEGER_ADDR, WINDOW_3);

    assertThat(value1.get().read(), Matchers.equalTo(11));
    assertThat(value2.get().read(), Matchers.equalTo(10));
    assertThat(merged.get().read(), Matchers.equalTo(21));

    // Reading the merged value compressed the old values.
    CombiningValueState<Integer, Integer> value3 = underTest.state(NAMESPACE_3, SUM_INTEGER_ADDR);
    assertThat(value1.get().read(), Matchers.equalTo(0));
    assertThat(value2.get().read(), Matchers.equalTo(0));
    assertThat(value3.get().read(), Matchers.equalTo(21));

    merged.add(8);
    assertThat(merged.get().read(), Matchers.equalTo(29));
    assertThat(value1.get().read(), Matchers.equalTo(0));
    assertThat(value2.get().read(), Matchers.equalTo(0));
    assertThat(value3.get().read(), Matchers.equalTo(29));
  }

  @Test
  public void testWatermarkEarliestState() throws Exception {
    WatermarkStateInternal value = underTest.state(NAMESPACE_1, WATERMARK_EARLIEST_ADDR);

    // State instances are cached, but depend on the namespace.
    assertEquals(value, underTest.state(NAMESPACE_1, WATERMARK_EARLIEST_ADDR));
    assertFalse(value.equals(underTest.state(NAMESPACE_2, WATERMARK_EARLIEST_ADDR)));

    assertThat(value.get().read(), Matchers.nullValue());
    StateContents<Instant> readFuture = value.get();
    value.add(new Instant(2000));
    assertThat(readFuture.read(), Matchers.equalTo(new Instant(2000)));
    assertThat(value.get().read(), Matchers.equalTo(new Instant(2000)));

    value.add(new Instant(3000));
    assertThat(readFuture.read(), Matchers.equalTo(new Instant(2000)));
    assertThat(value.get().read(), Matchers.equalTo(new Instant(2000)));

    value.add(new Instant(1000));
    assertThat(readFuture.read(), Matchers.equalTo(new Instant(1000)));
    assertThat(value.get().read(), Matchers.equalTo(new Instant(1000)));

    value.clear();
    assertThat(readFuture.read(), Matchers.equalTo(null));
    assertThat(underTest.state(NAMESPACE_1, WATERMARK_EARLIEST_ADDR), Matchers.sameInstance(value));
  }

  @Test
  public void testWatermarkLatestState() throws Exception {
    WatermarkStateInternal value = underTest.state(NAMESPACE_1, WATERMARK_LATEST_ADDR);

    // State instances are cached, but depend on the namespace.
    assertEquals(value, underTest.state(NAMESPACE_1, WATERMARK_LATEST_ADDR));
    assertFalse(value.equals(underTest.state(NAMESPACE_2, WATERMARK_LATEST_ADDR)));

    assertThat(value.get().read(), Matchers.nullValue());
    StateContents<Instant> readFuture = value.get();
    value.add(new Instant(2000));
    assertThat(readFuture.read(), Matchers.equalTo(new Instant(2000)));
    assertThat(value.get().read(), Matchers.equalTo(new Instant(2000)));

    value.add(new Instant(3000));
    assertThat(readFuture.read(), Matchers.equalTo(new Instant(3000)));
    assertThat(value.get().read(), Matchers.equalTo(new Instant(3000)));

    value.add(new Instant(1000));
    assertThat(readFuture.read(), Matchers.equalTo(new Instant(3000)));
    assertThat(value.get().read(), Matchers.equalTo(new Instant(3000)));

    value.clear();
    assertThat(readFuture.read(), Matchers.equalTo(null));
    assertThat(underTest.state(NAMESPACE_1, WATERMARK_LATEST_ADDR), Matchers.sameInstance(value));
  }

  @Test
  public void testWatermarkEndOfWindowState() throws Exception {
    WatermarkStateInternal value = underTest.state(NAMESPACE_1, WATERMARK_EOW_ADDR);

    // State instances are cached, but depend on the namespace.
    assertEquals(value, underTest.state(NAMESPACE_1, WATERMARK_EOW_ADDR));
    assertFalse(value.equals(underTest.state(NAMESPACE_2, WATERMARK_EOW_ADDR)));

    assertThat(value.get().read(), Matchers.nullValue());
    StateContents<Instant> readFuture = value.get();
    value.add(new Instant(2000));
    assertThat(readFuture.read(), Matchers.equalTo(new Instant(2000)));
    assertThat(value.get().read(), Matchers.equalTo(new Instant(2000)));

    value.clear();
    assertThat(readFuture.read(), Matchers.equalTo(null));
    assertThat(underTest.state(NAMESPACE_1, WATERMARK_EOW_ADDR), Matchers.sameInstance(value));
  }

  @Test
  public void testWatermarkStateIsEmpty() throws Exception {
    WatermarkStateInternal value = underTest.state(NAMESPACE_1, WATERMARK_EARLIEST_ADDR);

    assertThat(value.isEmpty().read(), Matchers.is(true));
    StateContents<Boolean> readFuture = value.isEmpty();
    value.add(new Instant(1000));
    assertThat(readFuture.read(), Matchers.is(false));

    value.clear();
    assertThat(readFuture.read(), Matchers.is(true));
  }

  @Test
  public void testMergeEarliestWatermarkIntoSource() throws Exception {
    WatermarkStateInternal value1 = underTest.state(NAMESPACE_1, WATERMARK_EARLIEST_ADDR);
    WatermarkStateInternal value2 = underTest.state(NAMESPACE_2, WATERMARK_EARLIEST_ADDR);

    value1.add(new Instant(3000));
    value2.add(new Instant(5000));
    value1.add(new Instant(4000));
    value2.add(new Instant(2000));

    WatermarkStateInternal merged = underTest.mergedState(
        Arrays.asList(NAMESPACE_1, NAMESPACE_2), NAMESPACE_1, WATERMARK_EARLIEST_ADDR, WINDOW_1);

    assertThat(value1.get().read(), Matchers.equalTo(new Instant(3000)));
    assertThat(value2.get().read(), Matchers.equalTo(new Instant(2000)));
    assertThat(merged.get().read(), Matchers.equalTo(new Instant(2000)));

    // Reading the merged value compressed the old values
    assertThat(value1.get().read(), Matchers.equalTo(new Instant(2000)));
    assertThat(value2.get().read(), Matchers.equalTo(null));

    merged.add(new Instant(1000));
    assertThat(merged.get().read(), Matchers.equalTo(new Instant(1000)));
  }

  @Test
  public void testMergeLatestWatermarkIntoSource() throws Exception {
    WatermarkStateInternal value1 = underTest.state(NAMESPACE_1, WATERMARK_LATEST_ADDR);
    WatermarkStateInternal value2 = underTest.state(NAMESPACE_2, WATERMARK_LATEST_ADDR);

    value1.add(new Instant(3000));
    value2.add(new Instant(5000));
    value1.add(new Instant(4000));
    value2.add(new Instant(2000));

    WatermarkStateInternal merged = underTest.mergedState(
        Arrays.asList(NAMESPACE_1, NAMESPACE_2), NAMESPACE_1, WATERMARK_LATEST_ADDR, WINDOW_1);

    assertThat(value1.get().read(), Matchers.equalTo(new Instant(4000)));
    assertThat(value2.get().read(), Matchers.equalTo(new Instant(5000)));
    assertThat(merged.get().read(), Matchers.equalTo(new Instant(5000)));

    // Reading the merged value compressed the old values
    assertThat(value1.get().read(), Matchers.equalTo(new Instant(5000)));
    assertThat(value2.get().read(), Matchers.equalTo(null));

    merged.add(new Instant(1000));
    assertThat(merged.get().read(), Matchers.equalTo(new Instant(5000)));

    merged.add(new Instant(7000));
    assertThat(merged.get().read(), Matchers.equalTo(new Instant(7000)));
  }
}


text:
<!DOCTYPE html>

        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>c++</title>
        <link rel="canonical" href="/tags/c++/">

<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Mina">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=VT323">

 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/lakeside-light.min.css">

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.0/css/all.css" integrity="sha384-Mmxa0mLqhmOeaE8vgOSbKacftZcsNYDjQzuCOm6D02luYSzBG8vpaOykv9lFQ51Y" crossorigin="anonymous">

<link rel="stylesheet" href="/css/main.css">

<link href="https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" rel="stylesheet">

 <meta name="generator" content="Hugo 0.68.3" />
        <link href="/tags/c++/index.xml" rel="alternate" type="application/rss+xml" title="John Keiser" />
        <link href="/tags/c++/index.xml" rel="feed" type="application/rss+xml" title="John Keiser" />

    <link rel="apple-touch-icon" sizes="180x180" href="/img/favicon/apple-touch-icon.png">
    <link rel="icon" type="image/png" sizes="32x32" href="/img/favicon/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="/img/favicon/favicon-16x16.png">
    <link rel="manifest" href="/img/favicon/site.webmanifest">
    <link rel="mask-icon" href="/img/favicon/safari-pinned-tab.svg" color="#000000">
    <link rel="shortcut icon" href="/img/favicon/favicon.ico">
    <meta name="msapplication-TileColor" content="#2b5797">
    <meta name="msapplication-config" content="/img/favicon/browserconfig.xml">
    <meta name="theme-color" content="#ffffff">

    <meta property="og:title" content="c++">
    <meta property="og:type" content="article">

      <meta name="twitter:card" content="summary">
      <meta name="twitter:image" content="/headshot-232x310.png" >

    <meta property="description" content="">
    <meta property="og:description" content="">

    <meta name="twitter:creator" content="">
    <meta name="twitter:site" content="">

                    c++
                    <button class="navbar-toggle" data-target=".navbar-collapse" data-toggle="collapse">

                    </button>

Home

Posts

Tags

    <input type="checkbox" id = "button-status"
        data-toggle="toggle"
        data-width = "10"
        data-height = "1"
        data-on=""
        data-off= ""
        data-style="ios"
        data-onstyle = "default">

c++

Simdjson 0.3: My Contribution to Reducing Global Warming

April 1, 2020

         simdjson

         c++

Powered by Hugo. Themed by min_night.

                 Attribution 4.0 International license


text:
require 'spec_helper'

describe Contentful::Bootstrap::Templates::Catalogue do
  let(:space) { Contentful::Management::Space.new }
  subject { described_class.new(space, 'master') }

  before :each do
    environment_proxy = Object.new
    allow(space).to receive(:environments) { environment_proxy }

    environment = Object.new
    allow(environment_proxy).to receive(:find) { environment }
  end

  describe 'content types' do
    it 'has Brand content type' do
      expect(subject.content_types.detect { |ct| ct['id'] == 'brand' }).to be_truthy
    end

    it 'has Category content type' do
      expect(subject.content_types.detect { |ct| ct['id'] == 'category' }).to be_truthy
    end

    it 'has Product content type' do
      expect(subject.content_types.detect { |ct| ct['id'] == 'product' }).to be_truthy
    end
  end

  describe 'entries' do
    it 'has 2 brands' do
      expect(subject.entries['brand'].size).to eq 2
    end

    it 'has 2 categories' do
      expect(subject.entries['category'].size).to eq 2
    end

    it 'has 2 products' do
      expect(subject.entries['product'].size).to eq 2
    end
  end

  describe 'assets' do
    it 'has 6 assets' do
      expect(subject.assets.size).to eq 6
    end
  end
end


text:
namespace palo {

class SystemMetrics;

class PaloMetrics {
public:
    // counters
    static IntCounter fragment_requests_total;
    static IntCounter fragment_request_duration_us;
    static IntCounter http_requests_total;
    static IntCounter http_request_duration_us;
    static IntCounter http_request_send_bytes;
    static IntCounter query_scan_bytes;
    static IntCounter query_scan_rows;
    static IntCounter ranges_processed_total;
    static IntCounter push_requests_success_total;
    static IntCounter push_requests_fail_total;
    static IntCounter push_request_duration_us;
    static IntCounter push_request_write_bytes;
    static IntCounter push_request_write_rows;
    static IntCounter create_tablet_requests_total;
    static IntCounter create_tablet_requests_failed;
    static IntCounter drop_tablet_requests_total;

    static IntCounter report_all_tablets_requests_total;
    static IntCounter report_all_tablets_requests_failed;
    static IntCounter report_tablet_requests_total;
    static IntCounter report_tablet_requests_failed;
    static IntCounter report_disk_requests_total;
    static IntCounter report_disk_requests_failed;
    static IntCounter report_task_requests_total;
    static IntCounter report_task_requests_failed;

    static IntCounter schema_change_requests_total;
    static IntCounter schema_change_requests_failed;
    static IntCounter create_rollup_requests_total;
    static IntCounter create_rollup_requests_failed;
    static IntCounter storage_migrate_requests_total;
    static IntCounter delete_requests_total;
    static IntCounter delete_requests_failed;
    static IntCounter cancel_delete_requests_total;
    static IntCounter clone_requests_total;
    static IntCounter clone_requests_failed;

    static IntCounter finish_task_requests_total;
    static IntCounter finish_task_requests_failed;

    static IntCounter base_compaction_request_total;
    static IntCounter base_compaction_request_failed;
    static IntCounter cumulative_compaction_request_total;
    static IntCounter cumulative_compaction_request_failed;

    static IntCounter base_compaction_deltas_total;
    static IntCounter base_compaction_bytes_total;
    static IntCounter cumulative_compaction_deltas_total;
    static IntCounter cumulative_compaction_bytes_total;

    static IntCounter alter_task_success_total;
    static IntCounter alter_task_failed_total;

    // Gauges
    static IntGauge memory_pool_bytes_total;

    ~PaloMetrics();
    // call before calling metrics
    void initialize(
        const std::string& name,
        bool init_system_metrics = false,
        const std::set<std::string>& disk_devices = std::set<std::string>(),
        const std::vector<std::string>& network_interfaces = std::vector<std::string>());

    static PaloMetrics* instance() { return &_s_palo_metrics; }
    static MetricRegistry* metrics() { return _s_palo_metrics._metrics; }
private:
    // Don't allow constrctor
    PaloMetrics();
private:
    static PaloMetrics _s_palo_metrics;

    MetricRegistry* _metrics;
    SystemMetrics* _system_metrics;
};

};

#endif


text:
from __future__ import unicode_literals

from django.db import migrations, models

class Migration(migrations.Migration):

    dependencies = [
        ('participants', '0007_add_team_participant'),
    ]

    operations = [
        migrations.AlterField(
            model_name='participantteam',
            name='team_name',
            field=models.CharField(max_length=100, unique=True),
        ),
    ]


text:
FROM python:3.4
ENV PYTHONUNBUFFERED 1
RUN mkdir /code
WORKDIR /code
ADD . /code/
RUN pip install -r requirements/local.txt


text:
layout: post
title:  "Second General Body Meeting"
date:   2014-02-26
author: Eric Tendian
categories:
- announcement
- general body meeting
img: /assets/img/blog/nopicture.jpg
thumb: nopicture.jpg
---

WHEN: 02/26/2014 12:50pm - 02/26/2014 1:50pm
WHERE: Siegel Hall Auditorium


text:
module Sudoku.Strategy.HiddenSingle where

import Prelude
import Sudoku
import Sudoku.Strategy
import Data.List

concatRowCandidates :: Sudoku -> Int -> String
concatRowCandidates su i = concat [ findCandidates su i j | j<-[0..(columnCount su - 1)] ]

concatColumnCandidates :: Sudoku -> Int -> String
concatColumnCandidates su j = concat [ findCandidates su i j | i<-[0..(rowCount su - 1)] ]

concatBlockCandidates :: Sudoku -> Int -> Int -> String
concatBlockCandidates su i j
  = concat [ findCandidates su k l | k<-[i'..i''], l<-[j'..j''] ]
  where
    h   = blockHeight su
    w   = blockWidth su
    i'  = (div i h) * h
    j'  = (div j w) * w
    i'' = i' + h - 1
    j'' = j' + w - 1

findUniqueRowCandidates :: Sudoku -> Int -> Int -> String
findUniqueRowCandidates su i _ = concat $ filter (\x -> length x == 1) $ group $ sort $ concatRowCandidates su i

findUniqueColumnCandidates :: Sudoku -> Int -> Int -> String
findUniqueColumnCandidates su _ j = concat $ filter (\x -> length x == 1) $ group $ sort $ concatColumnCandidates su j

findUniqueBlockCandidates :: Sudoku -> Int -> Int -> String
findUniqueBlockCandidates su i j = concat $ filter (\x -> length x == 1) $ group $ sort $ concatBlockCandidates su i j

resolveCandidates :: Sudoku -> Int -> Int -> (Char, String)
resolveCandidates su i j  | not $ null urci = (s, urci)
                          | not $ null ucci = (s, ucci)
                          | not $ null ubci = (s, ubci)
                          | otherwise = (s, cs)
                          where
                            s     = su !! i !! j
                            cs    = findCandidates su i j
                            urci  = intersect cs (findUniqueRowCandidates su i j)
                            ucci  = intersect cs (findUniqueColumnCandidates su i j)
                            ubci  = intersect cs (findUniqueBlockCandidates su i j)

resolveAllCandidates :: Sudoku -> [[(Char, String)]]
resolveAllCandidates su = mapWithIndeces su (\i j -> resolveCandidates su i j)

solve :: Sudoku -> Sudoku
solve su = run su resolveAllCandidates


text:
package com.webpagebytes.cms.exception;

public class WPBException extends Exception {
	public WPBException(String message, Throwable e)
	{
		super(message, e);
	}
	public WPBException(String message)
	{
		super(message);
	}

}


text:
import { Component, OnInit, OnDestroy } from '@angular/core';
import { ActivatedRoute } from '@angular/router';

import { BookCard } from './model/book.card';
import { SearchOutput } from './model/search.output';
import { SearchHistoryService } from './services/search.history.service';

@Component({
    selector: 'app-home',
    templateUrl: './home.component.html',
    styleUrls: ['./home.component.scss'],
    providers: [SearchHistoryService]
})
export class HomeComponent implements OnInit, OnDestroy {
    private bookCards: BookCard[];
    private searchQuery: string;
    private searchInput: string;
    private sub: any;

    constructor(private route: ActivatedRoute, private searchHistoryService: SearchHistoryService) {
    }

    ngOnInit() {
        this.sub = this.route.queryParams.subscribe(this.fetchBookCards.bind(this));
    }

    ngOnDestroy() {
        this.sub.unsubscribe();
    }

    onSearched(searchOutput: SearchOutput) {
        this.bookCards = searchOutput.bookCards;
        this.searchInput = searchOutput.searchInput;
    }

    onBookClicked() {
        this.searchHistoryService.storeLastSearchInput(this.searchInput);
    }

    private fetchBookCards(params): void {
        this.searchQuery = params['query'];
    }
}


text:
// Copyright Dirk Lemstra https://github.com/dlemstra/Magick.NET.
// Licensed under the Apache License, Version 2.0.

using ImageMagick;
using Xunit;

namespace Magick.NET.Tests
{
    public partial class DrawablesTests
    {
        public class TheStrokeDashArrayMethod
        {
            [Fact]
            public void ShouldRenderCorrectly()
            {
                using (var image = new MagickImage(MagickColors.White, 210, 210))
                {
                    var drawables = new Drawables()
                        .StrokeDashArray(20.0, 10.0)
                        .StrokeLineCap(LineCap.Round)
                        .EnableStrokeAntialias()
                        .StrokeWidth(5.0)
                        .FillColor(MagickColors.Transparent)
                        .StrokeColor(MagickColors.OrangeRed)
                        .Rectangle(5, 5, 200, 200);

                    image.Draw(drawables);

                    ColorAssert.Equal(MagickColors.OrangeRed, image, 7, 40);
                    ColorAssert.Equal(MagickColors.OrangeRed, image, 7, 175);
                    ColorAssert.Equal(MagickColors.OrangeRed, image, 200, 30);
                    ColorAssert.Equal(MagickColors.OrangeRed, image, 200, 170);
                }
            }
        }
    }
}


text:
module Mementus
  module Mutators
    def set_node(node)
      @structure.set_node(node)
      node
    end

    def set_edge(edge)
      @structure.set_edge(edge)
      edge
    end

    def add_node(id: nil, label: nil, props: {})
      id = @node_ids.next_id unless id
      set_node(Node.new(id: id, label: label, props: props))
    end

    def add_edge(id: nil, from: nil, to: nil, label: nil, props: {})
      id = @edge_ids.next_id unless id
      set_edge(Edge.new(id: id, from: from, to: to, label: label, props: props))
    end

    def create_node(&block)
      builder = NodeBuilder.new
      yield builder
      builder.id = @node_ids.next_id unless builder.id
      set_node(builder.to_node)
    end

    def create_edge(&block)
      builder = EdgeBuilder.new
      yield builder
      builder.id = @edge_ids.next_id unless builder.id
      set_edge(builder.to_edge)
    end

    def remove_node(node)
      @structure.remove_node(node)
    end

    def remove_edge(edge)
      @structure.remove_edge(edge)
    end
  end
end


text:
/* Corporate fonts */

@font-face {
       font-family:'Corporate';
       src: local(some_font_file),
       local(some_font_file),
       url(http://valid_url/some_font_file.eot),
       url(http://valid_url/some_font_file.?#iefix) format('embedded-opentype'),
       url(http://valid_url/some_font_file.svg#Corporate) format('svg');
       font-weight: normal;
       font-style: normal;
   }


text:
import './medipass.css';
// aun no logro hacer que esto funcione, estudiando posibilidades
import angular from 'angular';
import ngMaterial from 'angular-material';
import ngSanitize from 'angular-sanitize';
import translate from 'angular-translate';
import moment from 'moment';

//Asi funciona para exportar multiples modulos por separado

export { default as ComponentsModule } from "./components/components.module";

export { default as CommonsModule } from './common/common.module';
export { default as SideMenu } from './components/sidemenu/sidemenu.module';

import { default as ComponentsModule } from "./components/components.module";
import { default as CommonsModule } from './common/common.module';

import { default as CustomTableModule } from './components/table/table.module';
import { default as FinanciadorModule } from './components/financiador/financiador.module';
import { default as PrestadorModule } from './components/prestador/prestador.module';

import  translateConfig  from './medipass-translate';
import { default as themeConfig } from './medipass-theme';

export default angular.module('medipass.base', [
  ngMaterial,
  ngSanitize,
  translate,
  ComponentsModule,
  CustomTableModule,
  FinanciadorModule,
  PrestadorModule,
  CommonsModule])
  .config(translateConfig)
  .config(themeConfig)
  .config(["$mdDateLocaleProvider", function($mdDateLocaleProvider) {
    $mdDateLocaleProvider.formatDate = function(date) {
        if(date) {
            return moment(date).format('DD-MM-YYYY');
        } else {
          return "";
        }
    };
    $mdDateLocaleProvider.parseDate = function(dateString) {
      var m = moment(dateString, 'DD-MM-YYYY', true);
      return m.isValid() ? m.toDate() : new Date(NaN);
  };

    $mdDateLocaleProvider.months = ['Enero', 'Febrero', 'Marzo', 'Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'];
    $mdDateLocaleProvider.shortMonths = ['Ene', 'Feb', 'Mar','Abr','May','Jun','Jul','Ago','Sep','Oct','Nov','Dic'];
    $mdDateLocaleProvider.days = ['domingo', 'lunes', 'martes','miércoles','jueves', 'viernes', 'sábado', 'domingo'];
    $mdDateLocaleProvider.shortDays = ['Do', 'Lu', 'Ma', 'Mi','Ju','Vi','Sa'];

  }])
  .name;


text:
#pragma once

#include <stdbool.h>
#include <stdint.h>

#include <cpuinfo.h>

enum cpuinfo_arm_chipset_vendor {
	cpuinfo_arm_chipset_vendor_unknown = 0,
	cpuinfo_arm_chipset_vendor_qualcomm,
	cpuinfo_arm_chipset_vendor_mediatek,
	cpuinfo_arm_chipset_vendor_samsung,
	cpuinfo_arm_chipset_vendor_hisilicon,
	cpuinfo_arm_chipset_vendor_actions,
	cpuinfo_arm_chipset_vendor_allwinner,
	cpuinfo_arm_chipset_vendor_amlogic,
	cpuinfo_arm_chipset_vendor_broadcom,
	cpuinfo_arm_chipset_vendor_lg,
	cpuinfo_arm_chipset_vendor_leadcore,
	cpuinfo_arm_chipset_vendor_marvell,
	cpuinfo_arm_chipset_vendor_mstar,
	cpuinfo_arm_chipset_vendor_novathor,
	cpuinfo_arm_chipset_vendor_nvidia,
	cpuinfo_arm_chipset_vendor_pinecone,
	cpuinfo_arm_chipset_vendor_renesas,
	cpuinfo_arm_chipset_vendor_rockchip,
	cpuinfo_arm_chipset_vendor_spreadtrum,
	cpuinfo_arm_chipset_vendor_telechips,
	cpuinfo_arm_chipset_vendor_texas_instruments,
	cpuinfo_arm_chipset_vendor_wondermedia,
	cpuinfo_arm_chipset_vendor_max,
};

enum cpuinfo_arm_chipset_series {
	cpuinfo_arm_chipset_series_unknown = 0,
	cpuinfo_arm_chipset_series_qualcomm_qsd,
	cpuinfo_arm_chipset_series_qualcomm_msm,
	cpuinfo_arm_chipset_series_qualcomm_apq,
	cpuinfo_arm_chipset_series_qualcomm_snapdragon,
	cpuinfo_arm_chipset_series_mediatek_mt,
	cpuinfo_arm_chipset_series_samsung_exynos,
	cpuinfo_arm_chipset_series_hisilicon_k3v,
	cpuinfo_arm_chipset_series_hisilicon_hi,
	cpuinfo_arm_chipset_series_hisilicon_kirin,
	cpuinfo_arm_chipset_series_actions_atm,
	cpuinfo_arm_chipset_series_allwinner_a,
	cpuinfo_arm_chipset_series_amlogic_aml,
	cpuinfo_arm_chipset_series_amlogic_s,
	cpuinfo_arm_chipset_series_broadcom_bcm,
	cpuinfo_arm_chipset_series_lg_nuclun,
	cpuinfo_arm_chipset_series_leadcore_lc,
	cpuinfo_arm_chipset_series_marvell_pxa,
	cpuinfo_arm_chipset_series_mstar_6a,
	cpuinfo_arm_chipset_series_novathor_u,
	cpuinfo_arm_chipset_series_nvidia_tegra_t,
	cpuinfo_arm_chipset_series_nvidia_tegra_ap,
	cpuinfo_arm_chipset_series_nvidia_tegra_sl,
	cpuinfo_arm_chipset_series_pinecone_surge_s,
	cpuinfo_arm_chipset_series_renesas_mp,
	cpuinfo_arm_chipset_series_rockchip_rk,
	cpuinfo_arm_chipset_series_spreadtrum_sc,
	cpuinfo_arm_chipset_series_telechips_tcc,
	cpuinfo_arm_chipset_series_texas_instruments_omap,
	cpuinfo_arm_chipset_series_wondermedia_wm,
	cpuinfo_arm_chipset_series_max,
};

#define CPUINFO_ARM_CHIPSET_SUFFIX_MAX 8

struct cpuinfo_arm_chipset {
	enum cpuinfo_arm_chipset_vendor vendor;
	enum cpuinfo_arm_chipset_series series;
	uint32_t model;
	char suffix[CPUINFO_ARM_CHIPSET_SUFFIX_MAX];
};

#define CPUINFO_ARM_CHIPSET_NAME_MAX CPUINFO_PACKAGE_NAME_MAX

#ifndef __cplusplus
void cpuinfo_arm_chipset_to_string(
	const struct cpuinfo_arm_chipset chipset[restrict static 1],
	char name[restrict static CPUINFO_ARM_CHIPSET_NAME_MAX]);

void cpuinfo_arm_fixup_chipset(
	struct cpuinfo_arm_chipset chipset[restrict static 1], uint32_t cores, uint32_t max_cpu_freq_max);

void cpuinfo_arm_decode_vendor_uarch(
	uint32_t midr,
#if CPUINFO_ARCH_ARM
	bool has_vfpv4,
#endif
	enum cpuinfo_vendor vendor[restrict static 1],
	enum cpuinfo_uarch uarch[restrict static 1]);

void cpuinfo_arm_decode_cache(
	enum cpuinfo_uarch uarch,
	uint32_t cluster_cores,
	uint32_t midr,
	const struct cpuinfo_arm_chipset chipset[restrict static 1],
	uint32_t cluster_id,
	uint32_t arch_version,
	struct cpuinfo_cache l1i[restrict static 1],
	struct cpuinfo_cache l1d[restrict static 1],
	struct cpuinfo_cache l2[restrict static 1]);
#else /* defined(__cplusplus) */
void cpuinfo_arm_decode_cache(
	enum cpuinfo_uarch uarch,
	uint32_t cluster_cores,
	uint32_t midr,
	const struct cpuinfo_arm_chipset chipset[1],
	uint32_t cluster_id,
	uint32_t arch_version,
	struct cpuinfo_cache l1i[1],
	struct cpuinfo_cache l1d[1],
	struct cpuinfo_cache l2[1]);
#endif


text:
package com.googlecode.mp4parser;

import org.mp4parser.boxes.sampleentry.VisualSampleEntry;
import org.mp4parser.muxer.Movie;
import org.mp4parser.muxer.Track;
import org.mp4parser.muxer.container.mp4.MovieCreator;

import java.io.IOException;
import java.util.*;

public class FindCommonSync {

    public static <T extends Comparable<? super T>> List<T> asSortedList(Collection<T> c) {
        List<T> list = new ArrayList<>(c);
        java.util.Collections.sort(list);
        return list;
    }

    public static void main(String[] args) throws IOException {
        HashMap<Integer, Integer> common = new HashMap<>();
        boolean first = true;
        for (String arg : args) {
            Movie invideo = MovieCreator.build(arg);
            List<Track> tracks = invideo.getTracks();

            for (Track t : tracks) {
                String type = t.getSampleEntries().get(0).getType();
                System.out.println("Track of type " + type );
                if (t.getSampleEntries().get(0) instanceof VisualSampleEntry) {
                    HashMap<Integer, Integer> previous = (HashMap<Integer, Integer>) common.clone();
                    common.clear();
                    System.out.println("Found video track in " + arg);
                    long[] syncSamples = t.getSyncSamples();
                    long timescale = t.getTrackMetaData().getTimescale();
                    long tts = t.getSampleDurations()[0];
                    for (long syncSample : syncSamples) {
                        long time = 1000 * tts * (syncSample - 1) / timescale;
                        int inttime = (int) time;
                        if (first || previous.containsKey(inttime)) {
                            common.put(inttime, 1);
                        }
                    }
                    first = false;
                }
            }
        }
        // Print the common times
        Set<Integer> keys = common.keySet();

        List<Integer> inorder = asSortedList(keys);
        Integer previous = 0;
        int wrong = 0;
        for (Integer sync : inorder) {
            Integer delta = sync - previous;
            System.out.println("Common sync point: " + (double) sync / 1000.0 + " delta: " + (double) delta / 1000.0);
            if (delta > 3000) {
                System.out.println("WARNING WARNING! > 3sek");
                wrong++;
            }
            previous = sync;
        }
        int commonCount = inorder.size();
        System.out.println("Durations that are too long: " + wrong + "/" + commonCount);

    }
}


text:
package com.justinribeiro.example.glass_lowfreq_mqtt_sensor.app;

/**
 * Created by justin.ribeiro on 6/9/2014.
 */
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;

public class MenuActivity extends Activity {

    @Override
    public void onAttachedToWindow() {
        super.onAttachedToWindow();
        openOptionsMenu();
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.menu.main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle item selection.
        switch (item.getItemId()) {
            case R.id.stop:
                stopService(new Intent(MenuActivity.this, LiveCardService.class));
                return true;
            default:
                return super.onOptionsItemSelected(item);
        }
    }

    @Override
    public void onOptionsMenuClosed(Menu menu) {
        // Nothing else to do, closing the Activity.
        finish();
    }

}


text:
<link href='<?php echo base_url(); ?>assets/css/login.css' rel="stylesheet" type="text/css" />

            <form id="form_login" class="form-signin">

                <input type="email" id="email" name="email" class="form-control" placeholder="Correo Electrónico" autofocus>
                <input type="password" id="password" name="password" class="form-control" placeholder="Contraseña" required>

                <button class="btn btn-lg btn-primary btn-block btn-signin" type="submit">Ingresar</button>
            </form>

                ¿Olvidó su contraseña?


text:
<!DOCTYPE html>

    <title></title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap-responsive.css" />
    <link rel="stylesheet" type="text/css" href="../Css/style.css" />

<?php
    include("../../conn.php");
	$adminno=$_GET[adminno];
	$adinfo=mysql_query("select ADMINNAME from ADMIN where ADMINNO='$adminno'",$conn) or die(mysql_error());
	$info=mysql_fetch_array($adinfo);
?>
<form action="<?php echo "update_test.php?adminno=".$adminno."" ?>" method="post" class="definewidth m20">

            管理员工号

<?php echo $adminno;?>

            登录名
            <input type="text" name="adminname" value="<?php echo $info[0];?>" />

            操作

             <button type="submit" class="btn btn-primary" name="saveid" id="saveid">保存</button>		   <button type="button" class="btn btn-success" name="backid" id="backid">返回列表</button>

</form>


text: "use strict";var l={"NA":["NA","Ameryka P\u00F3\u0142nocna"]};(this?this:window)['DvtBaseMapManager']['_UNPROCESSED_MAPS'][2].push(["northAmerica","continent",l]);


text:
module.exports = function(calc) {
  var fn;
  fn = function(buf, previous) {
    return calc(buf, previous) >>> 0;
  };
  fn.signed = calc;
  fn.unsigned = fn;
  return fn;
};


text:
' Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

Imports System.Collections.Immutable
Imports System.Composition
Imports Microsoft.CodeAnalysis.CodeFixes
Imports Microsoft.CodeAnalysis.VisualBasic
Imports Microsoft.CodeAnalysis.VisualBasic.Syntax

Namespace Microsoft.CodeAnalysis.DiagnosticComments.CodeFixes
    <ExportCodeFixProvider(LanguageNames.VisualBasic, Name:=PredefinedCodeFixProviderNames.RemoveDocCommentNode), [Shared]>
    Friend Class VisualBasicRemoveDocCommentNodeCodeFixProvider
        Inherits AbstractRemoveDocCommentNodeCodeFixProvider(Of XmlElementSyntax)

        ''' <summary>
        ''' XML comment tag with identical attributes
        ''' </summary>
        Private Const BC42305 As String = NameOf(BC42305)

        ''' <summary>
        ''' XML comment tag is not permitted on a 'sub' language element
        ''' </summary>
        Private Const BC42306 As String = NameOf(BC42306)

        ''' <summary>
        ''' XML comment type parameter does not match a type parameter
        ''' </summary>
        Private Const BC42307 As String = NameOf(BC42307)

        ''' <summary>
        ''' XML comment tag 'returns' is not permitted on a 'WriteOnly' property
        ''' </summary>
        Private Const BC42313 As String = NameOf(BC42313)

        ''' <summary>
        ''' XML comment tag 'returns' is not permitted on a 'declare sub' language element
        ''' </summary>
        Private Const BC42315 As String = NameOf(BC42315)

        ''' <summary>
        ''' XML comment type parameter does not match a type parameter
        ''' </summary>
        Private Const BC42317 As String = NameOf(BC42317)

        Friend ReadOnly Id As ImmutableArray(Of String) = ImmutableArray.Create(BC42305, BC42306, BC42307, BC42313, BC42315, BC42317)

        Public Overrides ReadOnly Property FixableDiagnosticIds As ImmutableArray(Of String)
            Get
                Return Id
            End Get
        End Property

        Protected Overrides ReadOnly Property DocCommentSignifierToken As String
            Get
                Return "'''"
            End Get
        End Property

        Protected Overrides Function GetRevisedDocCommentTrivia(docCommentText As String) As SyntaxTriviaList
            Return SyntaxFactory.ParseLeadingTrivia(docCommentText)
        End Function
    End Class
End Namespace


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.gwac.service;

import com.gwac.model.Telescope;
import java.util.List;

/**
 *
 * @author xy
 */
public interface TelescopeService {
  public Number count();
  public List<Telescope> findAll(int start, int resultSize);
  public List<Telescope> findAll();
}


text:
Sacred Texts
Legends and Sagas
Celtic
Index
Previous
Next

Traditions and Hearthside Stories of West Cornwall, Vol. 2, by William Bottrell, [1873], at sacred-texts.com

The Sun Never Shines on Those Who Have "Sworn Away A Life."

 ONE frequently hears, in remote country places, the reproachful sayings of, "The sun wont shine on thee," or, "the sun don't shine on thee." This is regarded as a very bitter taunt, even by those who do not understand its allusion or the old belief from which it proceeds.

The following story, told me by an aged mine captain, of Lelant, will serve to explain it.

A few years ago a smuggler of Breage gave false evidence, which caused one of another crew to he hanged, on the charge of having fired a fatal shot at an officer belonging to a revenue cutter.

p. 250

This perjurer, who swore away an innocent man's life, received —for informing—such a sum of blood money as made him comparatively rich, yet he remained at sea for several years, until he came to live at Hayle. Few persons there knew him; but everybody remarked that he looked deathly pale and shivered with cold, however warm the weather might be. lie lived alone and rarely left his house to go beyond his garden, and his neighbours said that when he stood out in "sunshiney" weather he cast no shadow. They surmised that he had been forsworn; for he could never see the sun, and the sky always appeared dark to him; yet he saw everything else the same as other people.

After his decease it became known how he had caused an innocent man's death.

Notices of other popular superstitions may be found by a reference to the Index.

Click to enlarge

Next: A Legend of Pengersec


text:
@interface WYViewController ()
{

    __weak IBOutlet WYGravityBallFunView *funView;
}
@end

@implementation WYViewController

- (void)viewDidLoad
{
    [super viewDidLoad];

}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)memoryReleasa:(id)sender {
    [funView removeBalls];
}

//- (IBAction)dispatch:(id)sender {
//    // 01 ~ 20
//    // http://bizhi.zhuoku.com/wall/200701/0125/dongwu/dongwu20.jpg
//
//    NSString *saveDir = [NSFileManager directoryPath:@"images"];
//
//    dispatch_group_t group = dispatch_group_create();
//    for (int i = 1; i<20; i++) {
//        dispatch_group_enter(group);
//        NSString *url = [NSString stringWithFormat:IMAGE_URL_PATTERN, i];
//
////        [[SDWebImageManager sharedManager] downloadWithURL:[NSURL URLWithString:url] options:SDWebImageLowPriority progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished) {
////            NSLog(@"%02d下载完了", i);
////            dispatch_group_leave(group);
////        }];
//
//
//        [[SDWebImageDownloader sharedDownloader] downloadImageWithURL:[NSURL URLWithString:url] options:SDWebImageDownloaderLowPriority | SDWebImageDownloaderUseNSURLCache progress:nil completed:^(UIImage *image, NSData *data, NSError *error, BOOL finished) {
//            NSLog(@"%02d下载完了", i);
//            [data writeToFile:[saveDir stringByAppendingPathComponent:url.lastPathComponent] atomically:YES];
//
//            // 标识一个这个操作结束了
//            dispatch_group_leave(group);
//        }];
//    }
//
//
//    dispatch_group_async(group, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
//        NSLog(@"dispatch_group_async");
//    });
//
//
//    // 这句话是等待这个group完成,这样会阻断主线程的
////    dispatch_group_wait(group, DISPATCH_TIME_FOREVER);
//
//
//    // 这句话是在这个group完成时,异步调用一个block
//    dispatch_group_notify(group, dispatch_get_main_queue(), ^{
//        NSLog(@"下载完成");
//    });
//
//    // 下载图片时干点别个
//    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"正在下载" message:nil delegate:nil cancelButtonTitle:@"取消" otherButtonTitles:nil];
//    [alert show];
//    double delayInSeconds = 2.0;
//    dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
//    dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
//        [alert dismissWithClickedButtonIndex:0 animated:YES];
//    });
//
//
//    dispatch_apply(5, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(size_t index) {
//        NSLog(@"%zu", index);
//    });
//}

@end


text:
function [inf, inf_rel] = infocontent(varargin)

% INFOCONTENT information content of a grouping.
% -------------------------------------------------
% (1) [inf inf_rel] = infocontent(gr0, h0, gr1, h1)
% (2) [inf inf_rel] = infocontent(gr0, h0, vr)
% -------------------------------------------------
% Description: Let {vr} or alternatively the hierarchy {h1} of {gr1} stand
%              for values assigned to samples, designated by the RV {X},
%              and let the hierarchy {h0} of the grouping {gr0} be a
%              labeling of the samples, designated by the RV {Y}. The
%              information content of {gr0} is defined as the mutual
%              entropy H(X,Y), and the relative information content is
%              defined as the information content divided by the entropy of
%              {X}, namely H(X,Y)/X(X) = 1 - H(X|Y)/H(X).
% Input:       {gr0} a grouping instance.
%              <{h0}> hierarchy level (def = 1).
%              (1) the information content is measured against another
%                  grouping.
%                  {gr1} the other grouping.
%                  <{h1}> hierarchy level of {gr1} (def=1).
%              (2) the information content is measured against a variables.
%                 {vr} the variable.
% Output:      {inf} mutual entropy H(X,Y).
%              {inf_rel} normalized mutual entropy H(X,Y)/H(X).

% © Liran Carmel
% Classification: Characteristics of grouping
% Last revision date: 02-Sep-2004

% parse input line
[gr vr] = parse_input(varargin{:});

% initialize
gid = gr.gcn2gid{1};
gs = unit(groupsize(gr),1);

% compute the entroy of {vr}
Hx = entropy(vr);

% compute the conditional entropy
cH = 0;
for ii = 1:nogroups(gr)
    samp = grp2samp(gr,gid(ii));
    vrii = variable('data',vr(samp));
    cH = cH + gs(ii)*entropy(vrii);
end

% compute the information content
inf = Hx - cH;
inf_rel = inf / Hx;

% #########################################################################
function [gr0, vr] = parse_input(varargin)

% PARSE_INPUT parses input line.
% --------------------------------
% [gr0 vr] = parse_input(varargin)
% --------------------------------
% Description: parses input line.
% Input:       {varargin} list of input parameters.
% Output:      {gr0} grouping instance.
%              {vr} variable.

% verify number of arguments
error(nargchk(2,4,nargin));

% first argument is always {gr0}
error(chkvar(varargin{1},{},'scalar',{mfilename,'',1}));
gr0 = varargin{1};

% check if second argument is {h0}
if isa(varargin{2},'double')    % {h0}
    error(chkvar(varargin{2},'integer',...
        {'scalar',{'greaterthan',0},{'eqlower',gr0.no_hierarchies}},...
        {mfilename,'',2}));
    h0 = varargin{2};
    next_arg = 3;
else
    h0 = 1;
    next_arg = 2;
end
gr0 = subgrouping(gr0,h0);

% check next argument which is either {vr} of {gr}
if isa(varargin{next_arg},'grouping')  % {gr}
    error(chkvar(varargin{next_arg},{},'scalar',{mfilename,'',next_arg}));
    gr1 = varargin{next_arg};
    h1 = 1;
    next_arg = next_arg + 1;
    if nargin == next_arg
        error(chkvar(varargin{next_arg},'integer',...
            {'scalar',{'greaterthan',0},{'eqlower',gr1.no_hierarchies}},...
            {mfilename,'',next_arg}));
        h1 = varargin{next_arg};
    end
    vr = variable(gr1(h1,:));
elseif isa(varargin{next_arg},'variable')  % {vr}
    error(chkvar(varargin{next_arg},{},'scalar',{mfilename,'',next_arg}));
    vr = varargin{next_arg};
else
    error('%s: unrecognized type',upper(inputname(2)));
end

% check consistency
if nosamples(vr) ~= nosamples(gr0)
    error('Number of Samples do not match')
end


text:
package com.belladati.sdk.util.impl;

import com.belladati.sdk.impl.BellaDatiServiceImpl;
import com.belladati.sdk.util.IdElement;
import com.belladati.sdk.util.PaginatedIdList;

public abstract class PaginatedIdListImpl<T extends IdElement> extends PaginatedListImpl<T> implements PaginatedIdList<T> {

	public PaginatedIdListImpl(BellaDatiServiceImpl service, String relativeUrl, String field) {
		super(service, relativeUrl, field);
	}

	@Override
	public boolean contains(String id) {
		for (T item : currentData) {
			if (id.equals(item.getId())) {
				return true;
			}
		}
		return false;
	}

	@Override
	public int indexOf(String id) {
		for (int dataIndex = 0; dataIndex < currentData.size(); dataIndex++) {
			T item = currentData.get(dataIndex);
			if (id.equals(item.getId())) {
				return getFirstLoadedIndex() + dataIndex;
			}
		}
		return -1;
	}
}


text:
Files

            {{file.id}}
            {{file.name}}
            {{file.mediatype}}
            {{file.size}}
            {{file.width}}
            {{file.height}}

                <button type="button" class="btn btn-default btn-xs" data-ui-sref=".edit({id: file.id})">

                </button>

                <button type="button" class="btn btn-danger btn-xs" data-ng-click="vm.remove(file)">

                </button>

        <button type="button" class="btn btn-success" data-ui-sref=".upload"
                title="{{'admin.files.list.table.footer.upload' | translate}}">

        </button>


text:
package org.lambda.functions.implementations;

public class F0<Out> extends Function<Object, Object, Object, Object, Object, Object, Object, Object, Object, Out>
    implements
      org.lambda.functions.Function0<Out>
{
  public F0(Object... extraVariables)
  {
    super(extraVariables);
  }
  public Out call()
  {
    return call(new Object[0]);
  }
}


text: --- drillbit test console ---


text:
table.files tbody tr.first td {
	border-top: 0 !important;
}

.hide-files-btn {
	margin-right: 5px;
}


text:
<?php
namespace Payum\Core\Bridge\Twig;

class TwigFactoryTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @test
     */
    public function shouldAllowCreateATwigEnvironment()
    {
        $twig = TwigFactory::createGeneric();

        $this->assertInstanceOf('Twig_Environment', $twig);
    }

    /**
     * @test
     */
    public function shouldGuessCorrectCorePathByPaymentClass()
    {
        $path = TwigFactory::guessViewsPath('Payum\Core\Payment');

        $this->assertFileExists($path);
        $this->assertStringEndsWith('Payum/Core/Resources/views', $path);
    }

    /**
     * @test
     */
    public function shouldNotGuessPathIfFileNotExist()
    {
        $this->assertNull(TwigFactory::guessViewsPath('Foo\Bar\Baz'));
    }
}


text:
\begin{figure}[H]
\centering
\includegraphics[width=6in]{figs/run_10/run_10_ctke_01rdynamic}
\caption{Plot showing dynamic variations in turbulent kinetic energy within the core. $z/c$=5.37, $V_{free}$=32.98, station 1.}
\label{fig:run_10_ctke_01rdynamic}
\end{figure}


text:
test("Test su ProductedResource", function() {

    var ris1 = new ProductedResource(20, 10, 5, new Resource("Banana"));
    var ris2 = new ProductedResource(15, 5, 8, new Resource("Pera"));
    var ris3 = new ProductedResource(20, 10, 5, new Resource("Banana"));

    deepEqual(ris1.getMaxQuantity(), 20, "Test su getMaxQuantity");
    deepEqual(ris2.getRelativeTime(), 8, "Test su getRelativeTime");
    deepEqual(ris3.getQuantity(), 10, "Test su getQuantity");
    deepEqual(ris1.valueOf(), ris3.valueOf(), "Test su valueOf (true)");
    deepEqual(ris1.valueOf() === ris2.valueOf(),false, "Test su valueOf (false)");

    var r1 = new Resource("pluto");
	var r2 = new Resource("pippo");
	var r3 = new Resource("");

	var pr1 = new ProductedResource(10, 2, 3, r1);
	var pr2 = new ProductedResource(5, 2, 3, r2);
	var pr3 = new ProductedResource(24, 5, 3, r3);
	var pr4 = new ProductedResource(10, 4, 2, r2);

    deepEqual(pr1.getMaxQuantity(), 10, "Test su getMaxQuantity");
	notDeepEqual(pr1.getMaxQuantity(), pr2.getMaxQuantity(), "Test su getMaxQuantity");
	deepEqual(pr1.getMaxQuantity(), pr4.getMaxQuantity(), "Test su getMaxQuantity");

	deepEqual(pr4.getQuantity(), 4, "Test su getQuantity");
	notDeepEqual(pr4.getQuantity(), "4", "Test su getQuantity");
	deepEqual(pr1.getQuantity(), pr2.getQuantity(), "Test su getQuantity");
	notDeepEqual(pr3.getQuantity(), pr4.getQuantity(), "Test su getQuantity");

	deepEqual(pr4.getRelativeTime(), 2, "Test su getRelativeTime");
	notDeepEqual(pr4.getRelativeTime(), "2", "Test su getRelativeTime");
	deepEqual(pr1.getRelativeTime(), pr2.getRelativeTime(), "Test su getRelativeTime");
	notDeepEqual(pr3.getRelativeTime(), pr4.getRelativeTime(), "Test su getRelativeTime");

	deepEqual(pr2.getResource(), pr4.getResource(), "Test su getResource");
	notDeepEqual(pr1.getResource(), pr4.getResource(), "Test su getResource");
	notDeepEqual(pr3.getResource().getResourceName(), pr4.getResource().getResourceName(), "Test su getResource");
	deepEqual(pr2.getResource().getResourceName(), pr4.getResource().getResourceName(), "Test su getResource");
	deepEqual(pr1.getResource().getResourceName(), "pluto", "Test su getResource");
	deepEqual(pr3.getResource().getResourceName(), "", "Test su getResource");
});


text:
module Jade.Term where

import Jade.Common
import qualified Jade.Decode.Bundle as Bundle

points (Terminal (Coord3 x y _) _) = [Point x y]

width (Terminal _ bundle) = Bundle.width bundle

atPoint (Terminal (Coord3 x1 y1 _) _) (Point x2 y2) = x1 == x2 && y1 == y2


text:
layout: page
title: Freeman Trade Dinner
date: 2016-05-24
author: Anna Bennett
tags: weekly links, java
status: published
summary: Phasellus nisi orci, dictum vel tempus sit amet, hendrerit lobortis.
banner: images/banner/meeting-01.jpg
booking:
  startDate: 03/18/2018
  endDate: 03/23/2018
  ctyhocn: ZZVOHHX
  groupCode: FTD
published: true
---
Duis porta dolor odio, id condimentum lacus ullamcorper sit amet. Ut odio ex, lacinia ac urna nec, interdum egestas purus. Praesent pellentesque faucibus suscipit. Cras non orci nec ligula sodales condimentum id in felis. Quisque commodo iaculis facilisis. Ut velit nisi, gravida non auctor in, efficitur a metus. Cras pharetra malesuada tortor blandit luctus.
Nam semper ultricies tortor vel tincidunt. Morbi congue a sapien eu iaculis. Proin vehicula sem euismod varius placerat. Mauris sodales turpis ligula, vel luctus tellus pharetra ut. In tempus, ex id commodo convallis, lectus ex consectetur eros, sit amet consectetur felis ligula et nisl. Vestibulum sit amet lacinia velit. Aenean ac enim quam. Pellentesque iaculis malesuada pretium. Vestibulum at nisi nec leo luctus facilisis.

* Ut et sapien et lacus mattis vestibulum
* Aliquam elementum ipsum eget dapibus ullamcorper
* Mauris eu nisl ac justo gravida pulvinar quis quis neque
* Duis quis libero sit amet magna vulputate commodo non sit amet erat
* Nulla non augue sit amet lectus porta bibendum.

Nullam eu neque et turpis ultricies bibendum. Morbi vitae facilisis orci. Nam cursus urna et neque lobortis tristique in eget lacus. Nullam mollis ullamcorper nulla quis porttitor. Morbi in tempus nulla, vel dictum mi. Maecenas vitae dolor egestas, faucibus nibh ac, viverra lectus. Nulla at augue consectetur, scelerisque tortor eu, mattis nisi. Donec viverra venenatis posuere.


text:
"""
These Meta-Features genetate a :class:`revscoring.FeatureVector` based on some
:class:`revscoring.Datasource`.

.. autoclass revscoring.features.meta.vectorizers.vectorize
"""
from ..feature_vector import FeatureVector

class vectorize(FeatureVector):
    """
    Constructs a :class:`revscoring.FeatureVector` that converts a
    dictionary into a list of values with a predictable order based on a set of
    keys.

    :Parameters:
        dict_datasource : :class:`revscoring.Datasource`
            A datasource that returns a dictionary of values.  If the
            datasource implements a `keys()` method, that will be used for
            selecting keys to vectorize
        keys : `iterable` ( `hashable` )
            A collection of keys to be vectorized from the dictionary.  If
            specified, this will override the `keys()` method on the
            `dict_datasource`
        returns : `func`
            A function that represents the type of value that will be
            contained in the vector.  When called without an argument, this
            function should return the default value (for missing) keys
            in the dict.
        name : `str`
            A name for the `revscoring.FeatureVector`
    """

    def __init__(self, dict_datasource, keys=None, returns=None, name=None):
        if keys is None:
            if hasattr(dict_datasource, "keys"):
                keys = dict_datasource.keys()
            else:
                raise AttributeError(
                    "{0} does not have a keys() ".format(dict_datasource) +
                    "method and `keys` argument was not specified")

        self.keys = sorted(keys) if keys is not None else None
        name = self._format_name(name, [dict_datasource, self.keys[:10]])
        super().__init__(name, self.process, depends_on=[dict_datasource],
                         returns=returns)
        # Sorting keys so that output is deterministic

    def process(self, d):

        return [(d[key] if key in d else self.returns()) for key in self.keys]


text:
<?php

namespace MainBundle\Controller;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\EntityManager;
use MainBundle\Entity\Logo;
use MainBundle\Entity\Section;
use MainBundle\Repository\LogoRepository;
use MainBundle\Repository\SectionRepository;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use phpCAS;
use Symfony\Component\Form\FormError;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use UserBundle\Entity\User;
use UserBundle\Repository\UserRepository;

class RestController extends BaseController
{
    public function logoAction($code_section)
    {
        /** @var EntityManager $em */
        $em = $this->getDoctrine()->getManager();

        /** @var Section $section */
        $section = $em->getRepository('MainBundle:Section')->findOneBy(array("code" => $code_section));

        if (!$section){
            throw $this->createNotFoundException('No section found with this code');
        }

        /** @var Logo $logo */
        $logo = $section->getLogos()->first();

        $baseurl = "http://logoinserter.esnlille.fr";

        return new JsonResponse(array(
            "url" => $baseurl . "/" . $logo->getWebPath()
        )
        );
    }
}


text:
@interface UIView (Extension)

@property (nonatomic, assign) CGFloat x;
@property (nonatomic, assign) CGFloat y;
@property (nonatomic, assign) CGFloat centerX;
@property (nonatomic, assign) CGFloat centerY;
@property (nonatomic, assign) CGFloat width;
@property (nonatomic, assign) CGFloat height;
@property (nonatomic, assign) CGSize size;
@property (nonatomic, assign) CGPoint origin;

@property (nonatomic) CGFloat left;
@property (nonatomic) CGFloat top;
@property (nonatomic) CGFloat right;
@property (nonatomic) CGFloat bottom;

- (void)topAdd:(CGFloat)add;
- (void)leftAdd:(CGFloat)add;
- (void)widthAdd:(CGFloat)add;
- (void)heightAdd:(CGFloat)add;

#define kScreen_Height      ([UIScreen mainScreen].bounds.size.height)
#define kScreen_Width       ([UIScreen mainScreen].bounds.size.width)
#define kScreen_Frame       (CGRectMake(0, 0 ,kScreen_Width,kScreen_Height))

@end


text:
package no.digipost.api.client.representations;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;

@XmlType(name = "identification-result-code")
@XmlEnum
public enum IdentificationResultCode {

    DIGIPOST,
    IDENTIFIED,
    UNIDENTIFIED,
    INVALID;

    public String value() {
        return name();
    }

    public static IdentificationResultCode fromValue(String v) {
        return valueOf(v);
    }

}


text:
title: "Zorin OS 16 is released with stunning design improvements"
layout: post
categories: zorin release
tags: [zorin release]
image: /assets/images/post-images/zorin/16-default-desktop.jpg
video: https://youtube.com/embed/LlZsaIAHjQI
---

**On** 17th August 2021, the Zorin Group has announced the release of Zorin 16. This release is coming after Zorin 15.x, which has crossed 3 million downloads since its initial release. According to the Zorin Group, they were closely following the user feedback since the release of Zorin 15. The creative suggestions are included in Zorin 16. Zorin 16 comes with a lot of design improvements and under the hood performance tweaks.

![Default Desktop in Zorin OS 16](/assets/images/post-images/zorin/16-default-desktop.jpg)

The main highlights in Zorin OS 16 are as follows:

## A stunning appearance
Zorin OS 16 provides a revamped and polished appearance out of the box. The default theme in Zorin 16 is designed by keeping minute details in mind, such as touch responses, animations, and consistency throughout the system. Also, Zorin OS 16 brings a new set of wallpaper. The default wallpaper is dynamic and will change with time automatically.

The lock screen will show a blurred version of the wallpaper to provide more privacy.

## Smoother and faster experience
With the latest Linux Kernel, Zorin OS 16 offers compatibility with a wide range of hardware resources. It provides a smoother and faster experience with various tweaks and improvements, beginning from Linux Kernel to the system theme.

## Introduce Tour - A Welcome App
The Tour App in the Zorin will give a brief overview of the system on the first start. It also offers various customization options, including connecting online accounts, linking phones, and installing new applications.

## Multitouch gestures
Zorin OS 16 introduces multitouch gestures. Now, you can navigate between workspaces and applications smoothly with multitouch gestures.

## Introducing Flathub by default
Zorin OS 16 enables Flathub repositories by default which increases the available applications in App Center. Now Zorin OS includes applications from Flathub, snap store, and Ubuntu and Zorin apt repositories.

## Other changes
Other changes in Zorin OS 16 includes,
> - Sideload Windows software easier and safer - Zorin offers the best solution to install Windows games and applications.
- New sound recording app.
- More customizable taskbar.
- Redesigned Zorin appearance.
- Zorin Pro includes a desktop layout like Windows 11
- Jelly mode - which provides a playful animation when moving windows.
- and more.

Download Zorin OS 16

For further information, read [Zorin OS 16 official release announcement](https://blog.zorin.com/2021/08/17/2021-08-17-zorin-os-16-is-released/).

{% include image-gallery.html folder="/screenshots/zorin-16-release" %}


text:
This AWS Lambda application is a Mizukiri demo.
Mizukiri is a library that chain calls the AWS Lambda .

## Usage

- Create AWS credential file or addtion to config.js.
- Rewrite  the part of Lambda Role.

## deploy

`$ TEST_ROLE='arn:aws:iam::111111111111:role/lambda-test-1' gulp deploy`

## invoke Test

`$ gulp invoke`


text:
package org.starlambdawars.mapper;

import org.starlambdawars.beans.StarWarsCharacter;
import org.starlambdawars.beans.StarWarsMovie;
import org.starlambdawars.utils.DataLoader;

import java.io.IOException;
import java.util.List;
import java.util.stream.Collectors;

public class StarWarsMovieMapper {

    public StarWarsMovieMapper(DataLoader loader, TitleFunction titleFunction) throws IOException {
        movies = loader.loadMovies();
        this.titleFunction = titleFunction;
    }

    public List<String> allDirectors() {
        return movies
                .stream()
                .map(m -> m.getDirector())
                .distinct()
                .collect(Collectors.toList());
    }

    public List<String> allTitles() {
        return movies
                .stream()
                .map(titleFunction)
                .collect(Collectors.toList());
    }

    public List<StarWarsCharacter> allCharacters() {
        return movies
                .stream()
                .map(l -> l.getMainCharacters())
                .flatMap(List::stream)
                .distinct()
                .collect(Collectors.toList());
    }

    private List<StarWarsMovie> movies;
    private TitleFunction titleFunction;
}


text:
Solution for quick creation and renewal of letsencrypt ssl certificates and vhost configuration.
Was developed and tested on Ubuntu 16.04 so unknown compability with other OSes

## What does it do?
This renew script is dual purpose, it creates vhosts with an initial ssl from letsencrypt and renews them.

## Installation
First of all, you need to have **nginx**, **letsencrypt**, **bc** installed for this to work.

Afterwards, just follow the folder structure in this repo and make sure those folders and files is placed in the proper structure in root (/).

Then in **/usr/local/bin/renew** add a reclaim email address and make the file executable.

## Before use
Make sure the DNS records gets pointed towards the server which runs the nginx instance.

## Usage #1 (creation of vhosts)
```bash
$ renew test.example.com
```
if no nginx configuration is located in **/etc/nginx/sites-available** then you will be
prompted with a message asking you if you wish to create this vhost.

After confirmation, step-1 will be copied and named the same name as the parameter.
Nginx gets reloaded, a configuration gets placed in **/etc/letsencrypt** with the same name as the parameter.
Letsencrypt gets called and certificates gets created.

When that is done, step-2 will be copied and overwrite the previous configuration and nginx gets reloaded once again, and now you should see that your domain has SSL in the browser.

## Usage #2 (creation of certificate)
```bash
$ renew test.example.com
```
if a nginx configuration is present, the renewal script will check if a letsencrypt configuration
is located in **/etc/letsencrypt** and if not, one will be created.
Afterwards the renewal script will check if a certificate is present, if not letsencrypt will be called for creation of the certificate.

## Usage #3 (renewal of certificate)
```bash
$ renew test.example.com
```
if a configuration and certificate is present, this script will check when the certificate will expire. and if it has not expired yet this
script will just present the days left until expiration. if the certificate is expired or one day from getting expired it will renew it.

## Thats it
Feel free to improve this solution, grammar, explanation. Fork it and create a pull request.

## Star it
If this solution helped you on your way towards secure hosting, star it :)


text:
package de.codesourcery.jinvaders.graphics;

public enum FontKey {
	DEFAULT,BIG,GAMEOVER;
}