text:
<?php

namespace Phine\Bundles\BuiltIn\Modules\Backend;
use Phine\Bundles\Core\Logic\Module\ContentForm;
use Phine\Bundles\BuiltIn\Modules\Frontend\ChangeEMail;
use App\Phine\Database\BuiltIn\ContentChangeEmail;
use App\Phine\Database\BuiltIn\ContentChangeEmailSchema;
use Phine\Bundles\Core\Snippets\FormParts\PageUrlSelector;
use Phine\Framework\FormElements\Fields\Input;
use Phine\Framework\FormElements\Fields\Textarea;
use Phine\Framework\Validation\PhpFilter;

class ChangeEMailForm extends ContentForm
{

    /**
     * The confirm url selector form part
     * @var PageUrlSelector
     */
    protected $selectorConfirm;

    /**
     * The next url selector form part
     * @var PageUrlSelector
     */
    protected $selectorNext;

    /**
     *
     * @var ContentChangeEmail
     */
    protected $changeMail;
    /**
     * The element schema
     * @return ContentChangeEmailSchema
     */
    protected function ElementSchema()
    {
        return ContentChangeEmail::Schema();
    }

    protected function FrontendModule()
    {
        return new ChangeEMail();
    }

    protected function InitForm()
    {
        $this->changeMail = $this->LoadElement();
        $this->AddConfirmUrlField();
        $this->AddNextUrlField();
        $this->AddMailFromField();
        $this->AddMailSubjectField();
        $this->AddMailText1Field();
        $this->AddMailText2Field();
        $this->AddMailStylesField();
        $this->AddCssClassField();
        $this->AddCssIDField();
        $this->AddTemplateField();
        $this->AddSubmit();
    }

     /**
     * Adds the field for name field label
     */
    private function AddConfirmUrlField()
    {
        $name = 'ConfirmUrl';
        $this->selectorConfirm = new PageUrlSelector($name, Trans($this->Label($name)), $this->changeMail->GetConfirmUrl());
        $this->selectorConfirm->SetRequired($this->ErrorPrefix($name));
        $this->Elements()->AddElement($name, $this->selectorConfirm);
    }

     /**
     * Adds the field for name field label
     */
    private function AddNextUrlField()
    {
        $name = 'NextUrl';
        $this->selectorNext = new PageUrlSelector($name, Trans($this->Label($name)), $this->changeMail->GetNextUrl());
        $this->selectorNext->SetRequired($this->ErrorPrefix($name));
        $this->Elements()->AddElement($name, $this->selectorNext);
    }

    /**
     * Adds the field for e-mail field label
     */
    private function AddMailSubjectField()
    {
        $name = 'MailSubject';
        $field = Input::Text($name, $this->changeMail->GetMailSubject());
        $this->AddField($field);
        $this->SetRequired($name);
    }

    /**
     * Adds the field for mail text 1
     */
    private function AddMailText1Field()
    {
        $name = 'MailText1';
        $this->AddRichTextField($name, $this->changeMail->GetMailText1());
        $this->SetRequired($name);
    }

    /**
     * Adds the field for mail text 1
     */
    private function AddMailText2Field()
    {
        $name = 'MailText2';
        $this->AddRichTextField($name, $this->changeMail->GetMailText2());
    }

    private function AddMailStylesField()
    {
        $name = 'MailStyles';
        $field = new Textarea($name, $this->changeMail->GetMailStyles());
        $this->AddField($field);
    }

    private function AddMailFromField()
    {
        $name = 'MailFrom';
        $field = Input::Text($name, $this->changeMail->GetMailFrom());
        $this->AddField($field);
        $this->SetRequired($name);
        $this->AddValidator($name, PhpFilter::EMail());
    }

    protected function SaveElement()
    {
        $this->changeMail->SetNextUrl($this->selectorNext->Save($this->changeMail->GetNextUrl()));
        $this->changeMail->SetConfirmUrl($this->selectorConfirm->Save($this->changeMail->GetConfirmUrl()));
        $this->changeMail->SetMailFrom($this->Value('MailFrom'));
        $this->changeMail->SetMailStyles($this->Value('MailStyles'));
        $this->changeMail->SetMailText1($this->Value('MailText1'));
        $this->changeMail->SetMailText2($this->Value('MailText2'));
        $this->changeMail->SetMailSubject($this->Value('MailSubject'));

        return $this->changeMail;
    }

    /**
     *
     * @return string[] Returns the wording labels
     */
    protected function Wordings()
    {
        $result = array();
        $result[] = 'FormLegend';
        $result[] = 'NewEMail';
        $result[] = 'NewEMail.Validation.Required.Missing';
        $result[] = 'NewEMail.Validation.PhpFilter.InvalidEmail';
        $result[] = 'NewEMail.Validation.DatabaseCount.TooMuch';
        $result[] = 'ChangeEMailSubmit';
        return $result;
    }
}


text:
/* CACHEMULATOR
 * Yuyang Guo (yuyangg) and Isaac Lim (idl)
 */

#include "CMComp.h"
#include "debug.h"
#include "CMAddr.h"
#include "CMProc.h"
#include "CMBusCtrlr.h"
#include "CMGlobals.h"
#include "CMMemCtrlr.h"
#include "CMSharing.h"
#include <string>
#include <iostream>
#include <fstream>

CMComp::CMComp(int P) {
  // Get new processors, i is their pid
  for (int i=0; i<P; i++) {
    CMProc *proc = new CMProc(i);
    procs.push_back(proc);
  }

  // Get a bus controller
  busCtrlr = new CMBusCtrlr();

  // Get a mem controller
  memCtrlr = new CMMemCtrlr();

  totalTicks = 0;

  sharing = new CMSharing();
}

CMComp::~CMComp() {
  std::vector<CMProc*>::iterator it;
  for (it = procs.begin(); it != procs.end(); ++it) {
    CMProc *proc = *it;
    delete proc;
  }

  delete busCtrlr;
  delete sharing;
}

void CMComp::tick() {
  totalTicks++;

  // Tick each processor
  std::vector<CMProc*>::iterator it;
  for (it = procs.begin(); it != procs.end(); ++it) {
    CMProc *proc = *it;
    proc->tick();
  }

  // Tick bus, returns pid of the 'winning' processor
  size_t shoutPid = busCtrlr->tick();

  if (shoutPid < (size_t)CONFIG->numProcs) {
    // Granted access on this cycle
    // The winning processor makes its request
    dprintf("Proc %lu wins access to the bus!\n", shoutPid);

    CMProc *grantedProc = procs.at(shoutPid);
    CMBusShout *outstandingShout = grantedProc->pendingShout;
    dassert(outstandingShout != NULL,
            "Granted access to a non-requesting proc!");
    outstandingShout->print();
    busCtrlr->trackBusTraffic(outstandingShout);

    // Save this shout in the sharing object
    sharing->record(outstandingShout);

#ifdef DEBUG
    writeToFile(outstandingShout);
#endif

    // Other processors respond
    bool hasShare = false;
    bool hasDirty = false;
    bool hasForward = false;
    for (it = procs.begin(); it != procs.end(); ++it) {
      CMProc *proc = *it;
      if (proc->pid != shoutPid) {
        bool shared;
        bool dirty;
        bool forward;
        proc->respondToBusShout(outstandingShout, shared, dirty, forward);
        hasShare = shared || hasShare;
        hasDirty = dirty || hasDirty;
        hasForward = forward || hasForward;
      }
    }

    // set the bus to wait until our transaction is done
    busCtrlr->setJob(grantedProc->currentJob);
    // TODO: This only works if there is only one
    // outstanding request in the system!!!
    // If more, busCtrlr have to create different jobs

    // then look at the response and react accordingly
    if (hasDirty) {
      memCtrlr->addJob(busCtrlr->currentJob, CONFIG->flushAndLoadDelay);
    }
    else if (outstandingShout->shoutType == BusUpg) {
      memCtrlr->addJob(busCtrlr->currentJob, CONFIG->upgDelay);
    }
    else if (hasForward) {
      totalC2C++;
      memCtrlr->addJob(busCtrlr->currentJob, CONFIG->c2cDelay);
    }
    else {
      memCtrlr->addJob(busCtrlr->currentJob, CONFIG->memDelay);
    }

    // the granted processor updates its access tag
    grantedProc->postShoutingProcess(hasShare);
    grantedProc->pendingShout->isDone = true;
  } else {
    busCtrlr->trackBusTraffic(NULL); // c for continue
  }
  memCtrlr->tick();
}

void CMComp::writeToFile(CMBusShout *shout) {
  (*busShoutsFile) << shout->toChar() << "\n";
}

bool CMComp::hasOutstandingJobs() {
  std::vector<CMProc*>::iterator it;
  for (it = procs.begin(); it != procs.end(); ++it) {
    CMProc *proc = *it;
    if (!proc->isDone) {
      return true;
    }
  }

  return false;
}

redpajama_set_name: RedPajamaGithub


text:
DLLEXPORT void freezeRagdoll(int id, DWORD state)
{
	RagdollPtr tmp;
	RETURN_ON_PERR(physics->getRagdoll(id,tmp),PCMD_FREEZE_RAGDOLL);

	if(state) tmp->Freeze();
	else tmp->unFreeze();
}

DLLEXPORT void fixRagdollPointToObject(int id, int pntNo, int objectID)
{
	RagdollPtr tmp;
	RETURN_ON_PERR(physics->getRagdoll(id,tmp),PCMD_FIX_RAGDOLL_POINT_TO_OBJECT);

	RETURN_ON_PERR(tmp->fixPointToObject(pntNo,objectID,0),PCMD_FIX_RAGDOLL_POINT_TO_OBJECT);
}

DLLEXPORT void fixRagdollPointToObject(int id, int pntNo, int objectID, float px, float py, float pz)
{
	RagdollPtr tmp;
	RETURN_ON_PERR(physics->getRagdoll(id,tmp),PCMD_FIX_RAGDOLL_POINT_TO_OBJECT);

	Vector3 pos(px,py,pz);
	RETURN_ON_PERR(tmp->fixPointToObject(pntNo,objectID,&pos),PCMD_FIX_RAGDOLL_POINT_TO_OBJECT);
}

DLLEXPORT void setRagdollObjectOffset(int id, int partNo, float ox, float oy, float oz)
{
	RagdollPtr tmp;
	RETURN_ON_PERR(physics->getRagdoll(id,tmp),PCMD_SET_RAGDOLL_OBJECT_OFFSET);

	RETURN_ON_PERR(tmp->setRagdollObjectOffset(partNo,ox,oy,oz),PCMD_SET_RAGDOLL_OBJECT_OFFSET);
}

DLLEXPORT void freeAllRagdollPoints(int id)
{
	RagdollPtr tmp;
	RETURN_ON_PERR(physics->getRagdoll(id,tmp),PCMD_FREE_ALL_RAGDOLL_POINTS);

	tmp->freeAllPoints();
}

DLLEXPORT void drawRagdollDebugLines(int ragdollId, DWORD state)
{
	RagdollPtr tmp;
	RETURN_ON_PERR(physics->getRagdoll(ragdollId,tmp),PCMD_DRAW_RAGDOLL_DEBUG_LINES);

	tmp->setDebugLines(state?true:false);
}

DLLEXPORT void addRagdollForce(int id, int pntNo, float fx, float fy, float fz)
{
	RagdollPtr tmp;
	RETURN_ON_PERR(physics->getRagdoll(id,tmp),PCMD_ADD_RAGDOLL_FORCE);

	RETURN_ON_PERR(tmp->applyForce(pntNo,fx,fy,fz),PCMD_ADD_RAGDOLL_FORCE);
}

DLLEXPORT void addRagdollImpulse(int id, int pntNo, float ix, float iy, float iz)
{
	RagdollPtr tmp;
	RETURN_ON_PERR(physics->getRagdoll(id,tmp),PCMD_ADD_RAGDOLL_IMPULSE);

	RETURN_ON_PERR(tmp->applyImpulse(pntNo,ix,iy,iz),PCMD_ADD_RAGDOLL_IMPULSE);
}


text:
require 'helper'

module LocaleGen
  describe "Worksheet" do
    describe "#parse" do
      let(:xml) { File.read(File.join(File.dirname(__FILE__), "data", "ws_sample.xml")) }

      let(:labels) { {codename: "envalue"}.to_a }
      let(:ws) { Worksheet.new(xml, labels) }

      it "label and value are separated by tab " do
        ws.parse

        ws.output.should include "ui_level\tLEVEL"
      end

      it "interpolation" do
        ws.parse

        ws.output.should include "ui_collection_atoms\tENERGY : \#{1}"
      end

      it ", and ." do
        ws.parse

        ws.output.should include "mouseover_energy\tENERGY (\#{1}/\#{2})  : Consumed at every action. building, collecting, etc."
      end

      it "labels are more than one" do
        ws.labels = {codename: "envalue", tooltip: "tooltipenvalue"}.to_a
        ws.parse

        ws.output.should include "ui_level\tLEVEL"
        ws.output.should include "ui_level.tooltip\tlevel tooltip"
      end

    end
  end
end


text:
namespace OrchardCore.Tenants.Services
{
    public interface IFeatureProfilesSchemaService
    {
        string GetJsonSchema();
    }
}


text:
package series

import (
	"models/item"
)

type Series interface {
	item.Item
	JName() string
	SetJName(string)
	ExtIDs() map[string]string
	SetExtID(string, string)
	Synopsis() string
	SetSynopsis(string)
	//Seasons  []*Season
}

type SeriesRepository interface {
	GetAllSeries() ([]Series, error)
	GetSeriesByName(string) (Series, error)
	GetSeriesByTag(item.Tag) ([]Series, error)
	GetSeriesById(string) (Series, error)
	NewSeries(string) (Series, error)
	SaveSeries(Series) error
}


text:
/** @constructor */
ScalaJS.c.scala_runtime_VolatileDoubleRef$ = (function() {
  ScalaJS.c.java_lang_Object.call(this)
});
ScalaJS.c.scala_runtime_VolatileDoubleRef$.prototype = new ScalaJS.inheritable.java_lang_Object();
ScalaJS.c.scala_runtime_VolatileDoubleRef$.prototype.constructor = ScalaJS.c.scala_runtime_VolatileDoubleRef$;
ScalaJS.c.scala_runtime_VolatileDoubleRef$.prototype.create__D__Lscala_runtime_VolatileDoubleRef = (function(elem) {
  return new ScalaJS.c.scala_runtime_VolatileDoubleRef().init___D(elem)
});
ScalaJS.c.scala_runtime_VolatileDoubleRef$.prototype.zero__Lscala_runtime_VolatileDoubleRef = (function() {
  return new ScalaJS.c.scala_runtime_VolatileDoubleRef().init___D(0.0)
});
ScalaJS.c.scala_runtime_VolatileDoubleRef$.prototype.readResolve__p1__O = (function() {
  return ScalaJS.modules.scala_runtime_VolatileDoubleRef()
});
ScalaJS.c.scala_runtime_VolatileDoubleRef$.prototype.zero__ = (function() {
  return this.zero__Lscala_runtime_VolatileDoubleRef()
});
ScalaJS.c.scala_runtime_VolatileDoubleRef$.prototype.create__D__ = (function(elem) {
  return this.create__D__Lscala_runtime_VolatileDoubleRef(elem)
});
/** @constructor */
ScalaJS.inheritable.scala_runtime_VolatileDoubleRef$ = (function() {
  /*<skip>*/
});
ScalaJS.inheritable.scala_runtime_VolatileDoubleRef$.prototype = ScalaJS.c.scala_runtime_VolatileDoubleRef$.prototype;
ScalaJS.is.scala_runtime_VolatileDoubleRef$ = (function(obj) {
  return (!(!((obj && obj.$classData) && obj.$classData.ancestors.scala_runtime_VolatileDoubleRef$)))
});
ScalaJS.as.scala_runtime_VolatileDoubleRef$ = (function(obj) {
  if ((ScalaJS.is.scala_runtime_VolatileDoubleRef$(obj) || (obj === null))) {
    return obj
  } else {
    ScalaJS.throwClassCastException(obj, "scala.runtime.VolatileDoubleRef")
  }
});
ScalaJS.isArrayOf.scala_runtime_VolatileDoubleRef$ = (function(obj, depth) {
  return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.scala_runtime_VolatileDoubleRef$)))
});
ScalaJS.asArrayOf.scala_runtime_VolatileDoubleRef$ = (function(obj, depth) {
  if ((ScalaJS.isArrayOf.scala_runtime_VolatileDoubleRef$(obj, depth) || (obj === null))) {
    return obj
  } else {
    ScalaJS.throwArrayCastException(obj, "Lscala.runtime.VolatileDoubleRef;", depth)
  }
});
ScalaJS.data.scala_runtime_VolatileDoubleRef$ = new ScalaJS.ClassTypeData({
  scala_runtime_VolatileDoubleRef$: 0
}, false, "scala.runtime.VolatileDoubleRef$", ScalaJS.data.java_lang_Object, {
  scala_runtime_VolatileDoubleRef$: 1,
  scala_Serializable: 1,
  java_io_Serializable: 1,
  java_lang_Object: 1
});
ScalaJS.c.scala_runtime_VolatileDoubleRef$.prototype.$classData = ScalaJS.data.scala_runtime_VolatileDoubleRef$;
ScalaJS.moduleInstances.scala_runtime_VolatileDoubleRef = undefined;
ScalaJS.modules.scala_runtime_VolatileDoubleRef = (function() {
  if ((!ScalaJS.moduleInstances.scala_runtime_VolatileDoubleRef)) {
    ScalaJS.moduleInstances.scala_runtime_VolatileDoubleRef = new ScalaJS.c.scala_runtime_VolatileDoubleRef$().init___()
  };
  return ScalaJS.moduleInstances.scala_runtime_VolatileDoubleRef
});
//@ sourceMappingURL=VolatileDoubleRef$.js.map


text:
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <linux/ip.h>
#include <net/route.h>

#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE)
#include <net/ipv6.h>
#include <net/ip6_route.h>
#include <net/ip6_fib.h>
#endif

#include <linux/netfilter/xt_addrtype.h>
#include <linux/netfilter/x_tables.h>

MODULE_LICENSE("GPL");
MODULE_AUTHOR("Patrick McHardy <kaber@trash.net>");
MODULE_DESCRIPTION("Xtables: address type match");
MODULE_ALIAS("ipt_addrtype");
MODULE_ALIAS("ip6t_addrtype");

#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE)
static u32 match_lookup_rt6(struct net *net, const struct net_device *dev,
			    const struct in6_addr *addr)
{
	const struct nf_afinfo *afinfo;
	struct flowi6 flow;
	struct rt6_info *rt;
	u32 ret;
	int route_err;

	memset(&flow, 0, sizeof(flow));
	ipv6_addr_copy(&flow.daddr, addr);
	if (dev)
		flow.flowi6_oif = dev->ifindex;

	rcu_read_lock();

	afinfo = nf_get_afinfo(NFPROTO_IPV6);
	if (afinfo != NULL)
		route_err = afinfo->route(net, (struct dst_entry **)&rt,
					flowi6_to_flowi(&flow), !!dev);
	else
		route_err = 1;

	rcu_read_unlock();

	if (route_err)
		return XT_ADDRTYPE_UNREACHABLE;

	if (rt->rt6i_flags & RTF_REJECT)
		ret = XT_ADDRTYPE_UNREACHABLE;
	else
		ret = 0;

	if (rt->rt6i_flags & RTF_LOCAL)
		ret |= XT_ADDRTYPE_LOCAL;
	if (rt->rt6i_flags & RTF_ANYCAST)
		ret |= XT_ADDRTYPE_ANYCAST;

	dst_release(&rt->dst);
	return ret;
}

static bool match_type6(struct net *net, const struct net_device *dev,
				const struct in6_addr *addr, u16 mask)
{
	int addr_type = ipv6_addr_type(addr);

	if ((mask & XT_ADDRTYPE_MULTICAST) &&
	    !(addr_type & IPV6_ADDR_MULTICAST))
		return false;
	if ((mask & XT_ADDRTYPE_UNICAST) && !(addr_type & IPV6_ADDR_UNICAST))
		return false;
	if ((mask & XT_ADDRTYPE_UNSPEC) && addr_type != IPV6_ADDR_ANY)
		return false;

	if ((XT_ADDRTYPE_LOCAL | XT_ADDRTYPE_ANYCAST |
	     XT_ADDRTYPE_UNREACHABLE) & mask)
		return !!(mask & match_lookup_rt6(net, dev, addr));
	return true;
}

static bool
addrtype_mt6(struct net *net, const struct net_device *dev,
	const struct sk_buff *skb, const struct xt_addrtype_info_v1 *info)
{
	const struct ipv6hdr *iph = ipv6_hdr(skb);
	bool ret = true;

	if (info->source)
		ret &= match_type6(net, dev, &iph->saddr, info->source) ^
		       (info->flags & XT_ADDRTYPE_INVERT_SOURCE);
	if (ret && info->dest)
		ret &= match_type6(net, dev, &iph->daddr, info->dest) ^
		       !!(info->flags & XT_ADDRTYPE_INVERT_DEST);
	return ret;
}
#endif

static inline bool match_type(struct net *net, const struct net_device *dev,
			      __be32 addr, u_int16_t mask)
{
	return !!(mask & (1 << inet_dev_addr_type(net, dev, addr)));
}

static bool
addrtype_mt_v0(const struct sk_buff *skb, struct xt_action_param *par)
{
	struct net *net = dev_net(par->in ? par->in : par->out);
	const struct xt_addrtype_info *info = par->matchinfo;
	const struct iphdr *iph = ip_hdr(skb);
	bool ret = true;

	if (info->source)
		ret &= match_type(net, NULL, iph->saddr, info->source) ^
		       info->invert_source;
	if (info->dest)
		ret &= match_type(net, NULL, iph->daddr, info->dest) ^
		       info->invert_dest;

	return ret;
}

static bool
addrtype_mt_v1(const struct sk_buff *skb, struct xt_action_param *par)
{
	struct net *net = dev_net(par->in ? par->in : par->out);
	const struct xt_addrtype_info_v1 *info = par->matchinfo;
	const struct iphdr *iph;
	const struct net_device *dev = NULL;
	bool ret = true;

	if (info->flags & XT_ADDRTYPE_LIMIT_IFACE_IN)
		dev = par->in;
	else if (info->flags & XT_ADDRTYPE_LIMIT_IFACE_OUT)
		dev = par->out;

#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE)
	if (par->family == NFPROTO_IPV6)
		return addrtype_mt6(net, dev, skb, info);
#endif
	iph = ip_hdr(skb);
	if (info->source)
		ret &= match_type(net, dev, iph->saddr, info->source) ^
		       (info->flags & XT_ADDRTYPE_INVERT_SOURCE);
	if (ret && info->dest)
		ret &= match_type(net, dev, iph->daddr, info->dest) ^
		       !!(info->flags & XT_ADDRTYPE_INVERT_DEST);
	return ret;
}

static int addrtype_mt_checkentry_v1(const struct xt_mtchk_param *par)
{
	struct xt_addrtype_info_v1 *info = par->matchinfo;

	if (info->flags & XT_ADDRTYPE_LIMIT_IFACE_IN &&
	    info->flags & XT_ADDRTYPE_LIMIT_IFACE_OUT) {
		pr_info("both incoming and outgoing "
			"interface limitation cannot be selected\n");
		return -EINVAL;
	}

	if (par->hook_mask & ((1 << NF_INET_PRE_ROUTING) |
	    (1 << NF_INET_LOCAL_IN)) &&
	    info->flags & XT_ADDRTYPE_LIMIT_IFACE_OUT) {
		pr_info("output interface limitation "
			"not valid in PREROUTING and INPUT\n");
		return -EINVAL;
	}

	if (par->hook_mask & ((1 << NF_INET_POST_ROUTING) |
	    (1 << NF_INET_LOCAL_OUT)) &&
	    info->flags & XT_ADDRTYPE_LIMIT_IFACE_IN) {
		pr_info("input interface limitation "
			"not valid in POSTROUTING and OUTPUT\n");
		return -EINVAL;
	}

#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE)
	if (par->family == NFPROTO_IPV6) {
		if ((info->source | info->dest) & XT_ADDRTYPE_BLACKHOLE) {
			pr_err("ipv6 BLACKHOLE matching not supported\n");
			return -EINVAL;
		}
		if ((info->source | info->dest) >= XT_ADDRTYPE_PROHIBIT) {
			pr_err("ipv6 PROHIBT (THROW, NAT ..) matching not supported\n");
			return -EINVAL;
		}
		if ((info->source | info->dest) & XT_ADDRTYPE_BROADCAST) {
			pr_err("ipv6 does not support BROADCAST matching\n");
			return -EINVAL;
		}
	}
#endif
	return 0;
}

static struct xt_match addrtype_mt_reg[] __read_mostly = {
	{
		.name		= "addrtype",
		.family		= NFPROTO_IPV4,
		.match		= addrtype_mt_v0,
		.matchsize	= sizeof(struct xt_addrtype_info),
		.me		= THIS_MODULE
	},
	{
		.name		= "addrtype",
		.family		= NFPROTO_UNSPEC,
		.revision	= 1,
		.match		= addrtype_mt_v1,
		.checkentry	= addrtype_mt_checkentry_v1,
		.matchsize	= sizeof(struct xt_addrtype_info_v1),
		.me		= THIS_MODULE
	}
};

static int __init addrtype_mt_init(void)
{
	return xt_register_matches(addrtype_mt_reg,
				   ARRAY_SIZE(addrtype_mt_reg));
}

static void __exit addrtype_mt_exit(void)
{
	xt_unregister_matches(addrtype_mt_reg, ARRAY_SIZE(addrtype_mt_reg));
}

module_init(addrtype_mt_init);
module_exit(addrtype_mt_exit);


text:
DIR=$(dirname "$(readlink -f "$0")")
. "$DIR/awrg.cnf"

backtitle="Webroot generator - Created by Cristian Sedaboni"

checkIfWhiptailIsInstalled() {
	if [ $(dpkg-query -W -f='${Status}' whiptail 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
	  apt-get install whiptail;
	fi
}

# Create physically the web root folder
createWebRoot() {
	local directory="$web_root/$domain"

	if [ -d "$directory" ]; then
		echo "A directory for the domain $domain exists yet, please enter another domain"
	else
		mkdir $directory
	fi
}

inputDomain() {
	input=$(whiptail --backtitle "$backtitle" --inputbox \
	"Insert website main domain, without http and www (Ex. test.it)" 10 80 3>&1 1>&2 2>&3)
	exitstatus=$?

	if [ $exitstatus = 0 ]; then
	    domain=$input
	else
	    echo "User selected Cancel."
	    exit
	fi
}

inputUser() {
	input=$(whiptail --backtitle "$backtitle" --inputbox \
	"Insert the new user name" 10 80 "$username" 3>&1 1>&2 2>&3)
	exitstatus=$?

	if [ $exitstatus = 0 ]; then
	    username=$input
	else
	    echo "User selected Cancel."
	    exit
	fi
}

inputPassword() {
	input=$(whiptail --backtitle "$backtitle" --inputbox \
	"Change password (or use the generated below)" 10 80 "$password" 3>&1 1>&2 2>&3)
	exitstatus=$?

	if [ $exitstatus = 0 ]; then
	    password=$input
	else
	    echo "User selected Cancel."
	    exit
	fi
}

inputServerAlias() {
	input=$(whiptail --backtitle "$backtitle" --inputbox \
	"Add Server Alias separated by space (Ex. test.com www.test.com))" 10 80 "www.$domain" 3>&1 1>&2 2>&3)
	exitstatus=$?

	if [ $exitstatus = 0 ]; then
	    aliases=$input
	else
	    echo "User selected Cancel."
	    exit
	fi
}
. "${PWD}/awrg.cnf"
generateUsername() {
	local original="$domain"
	username="${original/./_}"
}

generatePassword() {
	password=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 12 | head -n 1)
}

createUser() {
	pass=$(perl -e 'print crypt($ARGV[0], "password")' $password)
	useradd -m -p $pass $username -d "$web_root/$domain" -s /bin/bash
	[ $? -eq 0 ] && echo "" || echo "Failed to add a user!"
}

getGroup() {
	if [[ ${use_apache_group} == 1 ]]; then
		group=`ps axo user,group,comm | egrep '(apache|httpd)' | grep -v ^root | cut -d\  -f 2| uniq`
	else
		group=$username
	fi
}

assignPermissionsToWebRoot() {
	getGroup group
	chown $username:$group $web_root/$domain -R
}

errorDialog() {
	whiptail --backtitle "$backtitle" --msgbox "$message" 10 80
}

checkIfUserExists() {
	ret=false
	getent passwd $username >/dev/null 2>&1 && ret=true
}

createPublicHtmlFolder(){
	local directory="$web_root/$domain/$public_folder"
	mkdir $directory
	chmod 775 $directory
}

createIndexHtml() {
	local directory="$web_root/$domain/$public_folder"
	touch "$directory/index.html"
	defaultValue="$(cat $indexSample)"
	echo $defaultValue >> "$directory/index.html"
}

assignVirtualHostFilename() {
	local original="$domain"
	virtualHostFilename="${original/./-}"
}

writeVirtualHost() {
	local vh="$sitesAvailable/$virtualHostFilename.conf"
	getGroup group

	touch $vh
	if ! echo "
<VirtualHost *:$apache_port>
	ServerAdmin $email
	ServerName $domain
	ServerAlias $aliases
	DocumentRoot $web_root/$domain/$public_folder
	<Directory $web_root/$domain/$public_folder>
		Options -Indexes +FollowSymLinks +MultiViews
		AllowOverride all
		Require all granted
	</Directory>
	ErrorLog ${apache_log_dir}/${domain/./-}--error.log
	LogLevel error
	CustomLog ${apache_log_dir}/${domain/./-}--access.log combined
	<IfModule mpm_itk_module>
		AssignUserId $username $group
	</IfModule>
</VirtualHost>" >> $vh
	then
		echo -e $"There is an ERROR creating $domain file"
		exit;
	else
		echo -e $"\nNew Virtual Host Created\n"
	fi
}

enableApacheDomain() {
	### enable website
	a2ensite $virtualHostFilename

	### restart Apache
	/etc/init.d/apache2 reload
}

createLogFolder() {
	getGroup group

	touch "${apache_log_dir}/${domain/./-}--access.log"
	touch "${apache_log_dir}/${domain/./-}--error.log"

	chmod 775 "${apache_log_dir}/${domain/./-}--access.log"
	chmod 775 "${apache_log_dir}/${domain/./-}--error.log"

	chown $username:$group "${apache_log_dir}/${domain/./-}--access.log"
	chown $username:$group "${apache_log_dir}/${domain/./-}--error.log"
}

addLogAliases() {
	local site_log_directory="$web_root/$domain/$log_folder"
	mkdir "${site_log_directory}"

	ln -s ${apache_log_dir}/${domain/./-}--access.log "${site_log_directory}/access.log"
	ln -s ${apache_log_dir}/${domain/./-}--error.log "${site_log_directory}/error.log"
}

createSuccessfullMessage() {
	whiptail --backtitle "$backtitle" --title "Successfull!" --msgbox "\
	Created directory web root at: $web_root/$domain
	Created new user with:
	Username: $username
	Password: $password" 10 80
}

# --- START ---

# permissions
if [ "$(whoami)" != "root" ]; then
	echo "Sudo privileges are required to run this command."
	exit 2
fi

checkIfWhiptailIsInstalled

# assign domain
while [ -z "$domain" ] ; do
	inputDomain
done

# createWebRoot
generateUsername username

ret=false
checkIfUserExists
while [ "$ret" == "true" ]; do
	message="The user exists yet, please enter another username"
    errorDialog $message
    inputUser

    checkIfUserExists ret
done

generatePassword password
inputPassword
createUser
createLogFolder
createPublicHtmlFolder
createIndexHtml
assignPermissionsToWebRoot
assignVirtualHostFilename
inputServerAlias aliases
addLogAliases
writeVirtualHost
enableApacheDomain
createSuccessfullMessage


text:
vim.api.nvim_set_keymap('n', '<Leader>ff', [[<cmd>lua require('telescope.builtin').find_files()<cr>]], { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<Leader>fg', [[<cmd>lua require('telescope.builtin').live_grep()<cr>]], { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<Leader>fb', [[<cmd>lua require('telescope.builtin').buffers()<cr>]], { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<Leader>fm', [[<cmd>lua require('telescope.builtin').man_pages()<cr>]], { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<Leader>gc', [[<cmd>lua require('telescope.builtin').git_commits()<cr>]], { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<Leader>gc', [[<cmd>lua require('telescope.builtin').git_commits()<cr>]], { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<Leader>gb', [[<cmd>lua require('telescope.builtin').git_bcommits()<cr>]], { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<Leader>?', [[<cmd>lua require('telescope.builtin').keymaps()<cr>]], { noremap = true, silent = true })

-- configurations
require('telescope').setup{
    defaults = {
        layout_strategy = 'vertical',
        layout_config = { width = 0.95, height = 0.95 },
        file_ignore_patterns = { "^vendor/" }
    },
}


text:
package org.hawkular.agent.monitor.cmd;

import org.hawkular.agent.monitor.inventory.ID;
import org.hawkular.agent.monitor.inventory.MonitoredEndpoint;
import org.hawkular.agent.monitor.inventory.Resource;
import org.hawkular.agent.monitor.inventory.ResourceManager;
import org.hawkular.agent.monitor.log.AgentLoggers;
import org.hawkular.agent.monitor.log.MsgLogger;
import org.hawkular.agent.monitor.protocol.EndpointService;
import org.hawkular.agent.monitor.protocol.dmr.DMRNodeLocation;
import org.hawkular.agent.monitor.protocol.dmr.DMRSession;
import org.hawkular.bus.common.BasicMessageWithExtraData;
import org.hawkular.bus.common.BinaryData;
import org.hawkular.cmdgw.api.DeployApplicationRequest;
import org.hawkular.cmdgw.api.DeployApplicationResponse;
import org.hawkular.cmdgw.api.MessageUtils;
import org.hawkular.dmrclient.DeploymentJBossASClient;
import org.hawkular.inventory.api.model.CanonicalPath;
import org.jboss.as.controller.client.ModelControllerClient;

/**
 * Deploys an application on a resource.
 */
public class DeployApplicationCommand
        extends AbstractResourcePathCommand<DeployApplicationRequest, DeployApplicationResponse> {
    @SuppressWarnings("unused")
    private static final MsgLogger log = AgentLoggers.getLogger(DeployApplicationCommand.class);
    public static final Class<DeployApplicationRequest> REQUEST_CLASS = DeployApplicationRequest.class;

    public DeployApplicationCommand() {
        super("Deploy", "Application");
    }

    @Override
    protected BinaryData execute(ModelControllerClient controllerClient,
            EndpointService<DMRNodeLocation, DMRSession> //
            endpointService,
            String modelNodePath, BasicMessageWithExtraData<DeployApplicationRequest> envelope,
            DeployApplicationResponse response, CommandContext context, DMRSession dmrContext)
                    throws Exception {
        DeployApplicationRequest request = envelope.getBasicMessage();

        final String resourcePath = request.getResourcePath();
        final String destFileName = request.getDestinationFileName();
        final boolean enabled = (request.getEnabled() == null) ? true : request.getEnabled().booleanValue();

        CanonicalPath canonicalPath = CanonicalPath.fromString(request.getResourcePath());
        String resourceId = canonicalPath.ids().getResourcePath().getSegment().getElementId();

        ResourceManager<DMRNodeLocation> resourceManager = endpointService.getResourceManager();
        Resource<DMRNodeLocation> resource = resourceManager.getResource(new ID(resourceId));
        if (resource == null) {
            throw new IllegalArgumentException(
                    String.format("Cannot deploy application: unknown resource [%s]", resourcePath));
        }

        // find the operation we need to execute - make sure it exists and get the address for the resource to invoke
        MessageUtils.prepareResourcePathResponse(request, response);
        response.setDestinationFileName(request.getDestinationFileName());

        DeploymentJBossASClient client = new DeploymentJBossASClient(dmrContext.getClient());
        client.deployStandalone(destFileName, envelope.getBinaryData(), enabled);
        return null;
    }

    @Override
    protected void validate(String modelNodePath, BasicMessageWithExtraData<DeployApplicationRequest> envelope) {
    }

    @Override
    protected void validate(BasicMessageWithExtraData<DeployApplicationRequest> envelope, MonitoredEndpoint endpoint) {
    }

    @Override
    protected DeployApplicationResponse createResponse() {
        return new DeployApplicationResponse();
    }
}


text:
package org.apache.directory.server.core.operations.add;

import static org.apache.directory.server.core.integ.IntegrationUtils.getAdminConnection;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;

import org.apache.directory.api.ldap.model.entry.Attribute;
import org.apache.directory.api.ldap.model.entry.DefaultEntry;
import org.apache.directory.api.ldap.model.entry.Entry;
import org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueException;
import org.apache.directory.api.ldap.model.exception.LdapSchemaViolationException;
import org.apache.directory.ldap.client.api.LdapConnection;
import org.apache.directory.server.core.annotations.CreateDS;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.ApacheDSTestExtension;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;

/**
 * Contributed by Luke Taylor to fix DIRSERVER-169.
 *
 * @author Apache Directory Project
 */
@ExtendWith( { ApacheDSTestExtension.class } )
@CreateDS(name = "AddIT")
public class DIRSERVER169IT extends AbstractLdapTestUnit
{
    /**
     * Test that attribute name case is preserved after adding an entry
     * in the case the user added them.  This is to test DIRSERVER-832.
     */
    @Test
    public void testAddCasePreservedOnAttributeNames() throws Exception
    {
        LdapConnection sysRoot = getAdminConnection( getService() );

        Entry entry = new DefaultEntry( "uID=kevin,ou=system",
            "ObjectClass: top",
            "ObjectClass: PERSON",
            "ObjectClass: organizationalPerson",
            "ObjectClass: inetORGperson",
            "Cn: Kevin Spacey",
            "sN: Spacey",
            "uID: kevin" );

        sysRoot.add( entry );

        Entry returned = sysRoot.lookup( "uID=kevin,ou=system" );

        assertTrue( returned.containsAttribute( "uID", "ObjectClass", "sN", "Cn" ) );
    }

    /**
     * Test that we can't add an entry with an attribute type not within
     * any of the MUST or MAY of any of its objectClasses
     *
     * @throws Exception on error
     */
    @Test
    public void testAddAttributesNotInObjectClasses() throws Exception
    {
        Assertions.assertThrows( LdapSchemaViolationException.class, () ->
        {
            LdapConnection sysRoot = getAdminConnection( getService() );

            String base = "uid=kevin, ou=system";

            Entry entry = new DefaultEntry( base,
                "ObjectClass: top",
                "cn: kevin Spacey",
                "dc: ke" );

            //create subcontext
            sysRoot.add( entry );
            fail( "Should not reach this state" );
        } );
    }

    /**
     * Test that we can't add an entry with an attribute with a bad syntax
     *
     * @throws Exception on error
     */
    @Test
    public void testAddAttributesBadSyntax() throws Exception
    {
        Assertions.assertThrows( LdapInvalidAttributeValueException.class, () ->
        {
            LdapConnection sysRoot = getAdminConnection( getService() );

            String base = "sn=kevin, ou=system";

            Entry entry = new DefaultEntry( base,
                "ObjectClass: top",
                "ObjectClass: person",
                "cn: kevin Spacey",
                "sn: ke",
                "telephoneNumber: 0123456abc" );

            // create subcontext
            sysRoot.add( entry );
        } );
    }

    /**
     * test case for DIRSERVER-1442
     */
    @Test
    public void testAddAttributeWithEscapedPlusCharacter() throws Exception
    {
        LdapConnection sysRoot = getAdminConnection( getService() );

        String base = "cn=John\\+Doe, ou=system";

        Entry entry = new DefaultEntry( base,
            "ObjectClass: top",
            "ObjectClass: inetorgperson",
            "cn: John+Doe",
            "sn: +Name+" );

        sysRoot.add( entry );

        try
        {
            Entry obj = sysRoot.lookup( "cn=John\\+Doe,ou=system" );
            assertNotNull( obj );
        }
        catch ( Exception e )
        {
            fail( e.getMessage() );
        }

        Entry result = sysRoot.lookup( "cn=John\\+Doe,ou=system" );
        assertNotNull( result );

        assertTrue( result.containsAttribute( "cn" ) );
        Attribute cn = result.get( "cn" );
        assertEquals( 1, cn.size() );
    }
}


text:
#ifndef CAIRO_COMPOSITE_RECTANGLES_PRIVATE_H
#define CAIRO_COMPOSITE_RECTANGLES_PRIVATE_H

#include "cairo-types-private.h"

CAIRO_BEGIN_DECLS

/* Rectangles that take part in a composite operation.
 *
 * The source and mask track the extents of the respective patterns in device
 * space. The unbounded rectangle is essentially the clip rectangle. And the
 * intersection of all is the bounded rectangle, which is the minimum extents
 * the operation may require. Whether or not the operation is actually bounded
 * is tracked in the is_bounded boolean.
 *
 */
struct _cairo_composite_rectangles {
    cairo_rectangle_int_t source;
    cairo_rectangle_int_t mask;
    cairo_rectangle_int_t bounded; /* dst */
    cairo_rectangle_int_t unbounded; /* clip */
    uint32_t is_bounded;
};

cairo_private cairo_int_status_t
_cairo_composite_rectangles_init_for_paint (cairo_composite_rectangles_t *extents,
					 const cairo_rectangle_int_t *surface_extents,
					 cairo_operator_t	 op,
					 const cairo_pattern_t	*source,
					 cairo_clip_t		*clip);

cairo_private cairo_int_status_t
_cairo_composite_rectangles_init_for_mask (cairo_composite_rectangles_t *extents,
					const cairo_rectangle_int_t *surface_extents,
					cairo_operator_t	 op,
					const cairo_pattern_t	*source,
					const cairo_pattern_t	*mask,
					cairo_clip_t		*clip);

cairo_private cairo_int_status_t
_cairo_composite_rectangles_init_for_stroke (cairo_composite_rectangles_t *extents,
					     const cairo_rectangle_int_t *surface_extents,
					     cairo_operator_t	 op,
					     const cairo_pattern_t	*source,
					     cairo_path_fixed_t	*path,
					     const cairo_stroke_style_t	*style,
					     const cairo_matrix_t	*ctm,
					     cairo_clip_t		*clip);

cairo_private cairo_int_status_t
_cairo_composite_rectangles_init_for_fill (cairo_composite_rectangles_t *extents,
					   const cairo_rectangle_int_t *surface_extents,
					   cairo_operator_t	 op,
					   const cairo_pattern_t	*source,
					   cairo_path_fixed_t	*path,
					   cairo_clip_t		*clip);

cairo_private cairo_int_status_t
_cairo_composite_rectangles_init_for_glyphs (cairo_composite_rectangles_t *extents,
					     const cairo_rectangle_int_t *surface_extents,
					     cairo_operator_t		 op,
					     const cairo_pattern_t	*source,
					     cairo_scaled_font_t	*scaled_font,
					     cairo_glyph_t		*glyphs,
					     int			 num_glyphs,
					     cairo_clip_t		*clip,
					     cairo_bool_t		*overlap);

#endif /* CAIRO_COMPOSITE_RECTANGLES_PRIVATE_H */


text:
using Microsoft.Practices.EnterpriseLibrary.Data;
using System;
using System.Data;
using System.Data.Common;
using XCLCMS.Data.Model.Custom;

namespace XCLCMS.Data.DAL
{
    /// <summary>
    /// 数据访问类:FriendLinks
    /// </summary>
    public partial class FriendLinks : XCLCMS.Data.DAL.Common.BaseDAL
    {
        /// <summary>
        ///  增加一条数据
        /// </summary>
        public bool Add(XCLCMS.Data.Model.FriendLinks model)
        {
            Database db = base.CreateDatabase();
            DbCommand dbCommand = db.GetStoredProcCommand("sp_FriendLinks_ADD");
            db.AddInParameter(dbCommand, "FriendLinkID", DbType.Int64, model.FriendLinkID);
            db.AddInParameter(dbCommand, "Title", DbType.String, model.Title);
            db.AddInParameter(dbCommand, "Description", DbType.String, model.Description);
            db.AddInParameter(dbCommand, "URL", DbType.AnsiString, model.URL);
            db.AddInParameter(dbCommand, "ContactName", DbType.String, model.ContactName);
            db.AddInParameter(dbCommand, "Email", DbType.AnsiString, model.Email);
            db.AddInParameter(dbCommand, "QQ", DbType.AnsiString, model.QQ);
            db.AddInParameter(dbCommand, "Tel", DbType.AnsiString, model.Tel);
            db.AddInParameter(dbCommand, "Remark", DbType.String, model.Remark);
            db.AddInParameter(dbCommand, "OtherContact", DbType.String, model.OtherContact);
            db.AddInParameter(dbCommand, "FK_MerchantID", DbType.Int64, model.FK_MerchantID);
            db.AddInParameter(dbCommand, "FK_MerchantAppID", DbType.Int64, model.FK_MerchantAppID);
            db.AddInParameter(dbCommand, "RecordState", DbType.AnsiString, model.RecordState);
            db.AddInParameter(dbCommand, "CreateTime", DbType.DateTime, model.CreateTime);
            db.AddInParameter(dbCommand, "CreaterID", DbType.Int64, model.CreaterID);
            db.AddInParameter(dbCommand, "CreaterName", DbType.String, model.CreaterName);
            db.AddInParameter(dbCommand, "UpdateTime", DbType.DateTime, model.UpdateTime);
            db.AddInParameter(dbCommand, "UpdaterID", DbType.Int64, model.UpdaterID);
            db.AddInParameter(dbCommand, "UpdaterName", DbType.String, model.UpdaterName);

            db.AddOutParameter(dbCommand, "ResultCode", DbType.Int32, 4);
            db.AddOutParameter(dbCommand, "ResultMessage", DbType.String, 1000);
            db.ExecuteNonQuery(dbCommand);

            var result = XCLCMS.Data.DAL.Common.Common.GetProcedureResult(dbCommand.Parameters);
            if (result.IsSuccess)
            {
                return true;
            }
            else
            {
                throw new Exception(result.ResultMessage);
            }
        }

        /// <summary>
        ///  更新一条数据
        /// </summary>
        public bool Update(XCLCMS.Data.Model.FriendLinks model)
        {
            Database db = base.CreateDatabase();
            DbCommand dbCommand = db.GetStoredProcCommand("sp_FriendLinks_Update");
            db.AddInParameter(dbCommand, "FriendLinkID", DbType.Int64, model.FriendLinkID);
            db.AddInParameter(dbCommand, "Title", DbType.String, model.Title);
            db.AddInParameter(dbCommand, "Description", DbType.String, model.Description);
            db.AddInParameter(dbCommand, "URL", DbType.AnsiString, model.URL);
            db.AddInParameter(dbCommand, "ContactName", DbType.String, model.ContactName);
            db.AddInParameter(dbCommand, "Email", DbType.AnsiString, model.Email);
            db.AddInParameter(dbCommand, "QQ", DbType.AnsiString, model.QQ);
            db.AddInParameter(dbCommand, "Tel", DbType.AnsiString, model.Tel);
            db.AddInParameter(dbCommand, "Remark", DbType.String, model.Remark);
            db.AddInParameter(dbCommand, "OtherContact", DbType.String, model.OtherContact);
            db.AddInParameter(dbCommand, "FK_MerchantID", DbType.Int64, model.FK_MerchantID);
            db.AddInParameter(dbCommand, "FK_MerchantAppID", DbType.Int64, model.FK_MerchantAppID);
            db.AddInParameter(dbCommand, "RecordState", DbType.AnsiString, model.RecordState);
            db.AddInParameter(dbCommand, "CreateTime", DbType.DateTime, model.CreateTime);
            db.AddInParameter(dbCommand, "CreaterID", DbType.Int64, model.CreaterID);
            db.AddInParameter(dbCommand, "CreaterName", DbType.String, model.CreaterName);
            db.AddInParameter(dbCommand, "UpdateTime", DbType.DateTime, model.UpdateTime);
            db.AddInParameter(dbCommand, "UpdaterID", DbType.Int64, model.UpdaterID);
            db.AddInParameter(dbCommand, "UpdaterName", DbType.String, model.UpdaterName);

            db.AddOutParameter(dbCommand, "ResultCode", DbType.Int32, 4);
            db.AddOutParameter(dbCommand, "ResultMessage", DbType.String, 1000);
            db.ExecuteNonQuery(dbCommand);

            var result = XCLCMS.Data.DAL.Common.Common.GetProcedureResult(dbCommand.Parameters);
            if (result.IsSuccess)
            {
                return true;
            }
            else
            {
                throw new Exception(result.ResultMessage);
            }
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public XCLCMS.Data.Model.FriendLinks GetModel(long FriendLinkID)
        {
            Database db = base.CreateDatabase();
            DbCommand dbCommand = db.GetSqlStringCommand("select * from FriendLinks WITH(NOLOCK)   where FriendLinkID=@FriendLinkID");
            db.AddInParameter(dbCommand, "FriendLinkID", DbType.Int64, FriendLinkID);
            using (var dr = db.ExecuteReader(dbCommand))
            {
                return XCLNetTools.DataSource.DataReaderHelper.DataReaderToEntity<XCLCMS.Data.Model.FriendLinks>(dr);
            }
        }

        /// <summary>
        /// 判断指定标题是否存在
        /// </summary>
        public bool IsExist(FriendLinks_TitleCondition condition)
        {
            return null != this.GetModel(condition);
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public XCLCMS.Data.Model.FriendLinks GetModel(FriendLinks_TitleCondition condition)
        {
            Database db = base.CreateDatabase();
            DbCommand dbCommand = db.GetSqlStringCommand("select top 1 * from FriendLinks with(nolock) where Title=@Title and FK_MerchantID=@FK_MerchantID and FK_MerchantAppID=@FK_MerchantAppID");
            db.AddInParameter(dbCommand, "Title", DbType.String, condition.Title);
            db.AddInParameter(dbCommand, "FK_MerchantID", DbType.Int64, condition.FK_MerchantID);
            db.AddInParameter(dbCommand, "FK_MerchantAppID", DbType.Int64, condition.FK_MerchantAppID);
            using (var dr = db.ExecuteReader(dbCommand))
            {
                return XCLNetTools.DataSource.DataReaderHelper.DataReaderToEntity<XCLCMS.Data.Model.FriendLinks>(dr);
            }
        }
    }
}


text:
package sigmastate

import java.util.{Arrays, Objects}

import scorex.crypto.authds.ADDigest
import sigmastate.interpreter.CryptoConstants
import sigmastate.serialization.SigmaSerializer
import sigmastate.utils.{SigmaByteReader, SigmaByteWriter}

case class AvlTreeFlags(insertAllowed: Boolean, updateAllowed: Boolean, removeAllowed: Boolean) {
  def serializeToByte: Byte = AvlTreeFlags.serializeFlags(this)
}

object AvlTreeFlags {

  lazy val ReadOnly = AvlTreeFlags(insertAllowed = false, updateAllowed = false, removeAllowed = false)

  lazy val AllOperationsAllowed = AvlTreeFlags(insertAllowed = true, updateAllowed = true, removeAllowed = true)

  lazy val InsertOnly = AvlTreeFlags(insertAllowed = true, updateAllowed = false, removeAllowed = false)

  lazy val RemoveOnly = AvlTreeFlags(insertAllowed = false, updateAllowed = false, removeAllowed = true)

  def apply(serializedFlags: Byte): AvlTreeFlags = {
    val insertAllowed = (serializedFlags & 0x01) != 0
    val updateAllowed = (serializedFlags & 0x02) != 0
    val removeAllowed = (serializedFlags & 0x04) != 0
    AvlTreeFlags(insertAllowed, updateAllowed, removeAllowed)
  }

  def serializeFlags(avlTreeFlags: AvlTreeFlags): Byte = {
    val readOnly = 0
    val i = if(avlTreeFlags.insertAllowed) readOnly | 0x01 else readOnly
    val u = if(avlTreeFlags.updateAllowed) i | 0x02 else i
    val r = if(avlTreeFlags.removeAllowed) u | 0x04 else u
    r.toByte
  }
}

/**
  * Type of data which efficiently authenticates potentially huge dataset having key-value dictionary interface.
  * Only root hash of dynamic AVL+ tree, tree height, key length, optional value length, and access flags are stored
  * in an instance of the datatype.
  *
  * Please note that standard hash function from CryptoConstants is used, and height is stored along with root hash of
  * the tree, thus `digest` size is always CryptoConstants.hashLength + 1 bytes.
  *
  * @param digest authenticated tree digest: root hash along with tree height
  * @param treeFlags - allowed modifications. See AvlTreeFlags description for details
  * @param keyLength  - all the elements under the tree have the same length
  * @param valueLengthOpt - if non-empty, all the values under the tree are of the same length
  */

case class AvlTreeData(digest: ADDigest,
                       treeFlags: AvlTreeFlags,
                       keyLength: Int,
                       valueLengthOpt: Option[Int] = None) {
  override def equals(arg: Any): Boolean = arg match {
    case x: AvlTreeData =>
      Arrays.equals(digest, x.digest) &&
      keyLength == x.keyLength &&
      valueLengthOpt == x.valueLengthOpt &&
      treeFlags == x.treeFlags
    case _ => false
  }

  override def hashCode(): Int =
    (Arrays.hashCode(digest) * 31 +
        keyLength.hashCode()) * 31 + Objects.hash(valueLengthOpt, treeFlags)
}

object AvlTreeData {
  val DigestSize: Int = CryptoConstants.hashLength + 1 //please read class comments above for details
  val TreeDataSize = DigestSize + 3 + 4 + 4

  val dummy = new AvlTreeData(
    ADDigest @@ Array.fill(DigestSize)(0:Byte),
    AvlTreeFlags.AllOperationsAllowed,
    keyLength = 32)

  object serializer extends SigmaSerializer[AvlTreeData, AvlTreeData] {

    override def serialize(data: AvlTreeData, w: SigmaByteWriter): Unit = {
      val tf = AvlTreeFlags.serializeFlags(data.treeFlags)
      w.putBytes(data.digest)
        .putUByte(tf)
        .putUInt(data.keyLength)
        .putOption(data.valueLengthOpt)(_.putUInt(_))
    }

    override def parse(r: SigmaByteReader): AvlTreeData = {
      val digest = r.getBytes(DigestSize)
      val tf = AvlTreeFlags(r.getByte())
      val keyLength = r.getUInt().toInt
      val valueLengthOpt = r.getOption(r.getUInt().toInt)
      // Note, when keyLength and valueLengthOpt < 0 as a result of Int overflow,
      // the deserializer succeeds with invalid AvlTreeData
      // but still some AvlTree operations (remove_eval, update_eval, contains_eval) won't throw
      AvlTreeData(ADDigest @@ digest, tf, keyLength, valueLengthOpt)
    }
  }
}


text:
<?xml version="1.0" encoding="UTF-8"?>

<!--
    Document   : struts.xml
    Created on : 04 January 2012, 12:41
    Author     : marco
    Description:
        Purpose of the document follows.
-->

<!DOCTYPE struts PUBLIC '-//Apache Software Foundation//DTD Struts Configuration 2.0//EN' 'http://struts.apache.org/dtds/struts-2.0.dtd'>
<struts>
    <!--<constant name="struts.devMode" value="false"/>-->
    <package name="idp" extends="struts-default" namespace="/">
        <action name="about">
            <result>
                /about.jsp
            </result>
        </action>
        <action name="documentation">
            <result>
                /about.jsp
            </result>
        </action>
        <action name="providers">
            <result>
                /providers.jsp
            </result>
        </action>
        <action name="register">
            <result>
                /register.jsp
            </result>
        </action>
        <action name="forgotpass">
            <result>/forgotpass.jsp</result>
        </action>

        <action name="passreset" class="it.infn.ct.security.actions.PassReset">
            <result name="input">/resetpass.jsp</result>
            <result name="error">/passwordError.jsp</result>
            <result name="success">/passUpdated.jsp</result>
        </action>
        <action name="passrecovery" class="it.infn.ct.security.actions.PassRecovery">
            <result name="input">/forgotpass.jsp</result>
            <result name="error">/generalError.jsp</result>
            <result name="success">/resetpass.jsp</result>
            <param name="MailFrom">test@idp-domain.org</param>
            <param name="MailSubject">Reset password for your IDP account</param>
            <param name="MailBody">
Dear _USER_,

we have received a request to reset your password.

To complete the request copy the following code in the
web form on the request page along with your new password.

                _CODE_

If you have never asked to reset your password just skip this e-mail.

Best regards,
The IDP Administrators
            </param>
        </action>
        <action name="confirmRegistration" class="it.infn.ct.security.actions.ConfirmRegistration">
            <result name="success">confirm.jsp</result>
            <result name="error">userReject.jsp</result>
            <param name="MailFrom">test@idp-domain.org</param>
            <param name="MailTo">test@idp-domain.org</param>
        </action>

        <action name="ReactivateUser" class="it.infn.ct.security.actions.ReactivateUser">
            <result name="success">/success.jsp</result>
            <result name="error">/generalError.jsp</result>
            <param name="MailFrom">test@idp-domain.org</param>
            <param name="MailTo">test@idp-domain.org</param>
            <param name="MailSubject">User activation request in the Identity Provider IDP</param>
            <param name="MailBody">
The following user has requested to activate the account again.

    _USER_

The IDP Administrators
                </param>
        </action>

        <action name="addUser" class="it.infn.ct.security.actions.AddUser">
            <result name="input">/register.jsp</result>
            <result name="success">/success.jsp</result>
            <param name="IdPAdmin">IdP Administrator</param>
            <param name="MailFrom">test@idp-domain.org</param>
            <param name="MailCC">test@idp-domain.org</param>
            <param name="MailSubject">Confirmation Request for the registration to the Identity Provider</param>
            <param name="MailBody">
Dear _USER_,

we have received your request to become a user
of the South African National Grid "catch-all" Identity Provider.

If indeed you made this request, please click the following url
to confirm your data in the next 48 hours:

_URL_
 Else, please ignore this email.

Thank you for your interest.

Best regards,
The IdP Administrators
                </param>

        </action>

        <action name="globalAdmin" class="it.infn.ct.security.actions.Login" method="adminRequest">
            <result name="success">/admin.jsp</result>
            <result name="error">/userAdmin.jsp</result>
        </action>
        <action name="login" class="it.infn.ct.security.actions.Login">
            <result name="input">/login.jsp</result>
            <result name="adminAccess">/admin.jsp</result>
            <result name="userAccess">/userAdmin.jsp</result>
            <result name="login">/login.jsp</result>
        </action>
        <action name="AdminAction" class="it.infn.ct.security.actions.AdminAction">
            <result>
                /table.jsp
            </result>
        </action>
        <action name="OrgAction" class="it.infn.ct.security.actions.OrgAction">
            <result>
                /organizations.jsp
            </result>
        </action>
        <action name="CaptchaAction" class="it.infn.ct.security.actions.CaptchaAction">
        </action>
        <action name="Logout" class="it.infn.ct.security.actions.Logout">
            <result name="success">/login.jsp</result>
        </action>

        <action name="ExtendAccount" class="it.infn.ct.security.actions.ExtendAccount">
            <result name="success">/success.jsp</result>
            <param name="IdPAdmin">IdP Administrator</param>
            <param name="MailFrom">test@idp-domain.org</param>
            <param name="MailTo">test@idp-domain.org</param>
            <param name="MailSubject">User account extended in IdP identity provider</param>
            <param name="MailBody">
The _USER_ has extended the account for another year.

The IDP Administrators
                </param>
        </action>

        <action name="ActivateAccount" class="it.infn.ct.security.actions.ActivateAccount">
            <result name="success">/admin.jsp</result>
            <param name="IdPAdmin">IdP Administrator</param>
            <param name="MailFrom">test@idp-domain.org</param>
            <param name="MailBCC">test@idp-domain.org</param>
            <param name="MailSubject">Activation account request for the IdP</param>
            <param name="MailBody">
Dear _USER_,

your request to re-activate your account has been _RESULT_.

Best regards,
The IDP Administrators
                </param>
        </action>

        <action name="DeleteAction" class="it.infn.ct.security.actions.DeleteAction">
            <result name="success">/admin.jsp</result>
        </action>

        <action name="ValidateRegisterUserData" class="it.infn.ct.security.actions.ValidateUser">
            <result>/validatereg.jsp</result>
        </action>
        <action name="RegisterUser" class="it.infn.ct.security.actions.RegisterUser">
            <result name="success">/registration.jsp</result>
            <result name="error">/registrationError.jsp</result>
            <result name="input">/validatereg.jsp</result>
            <param name="IdPAdmin">IDP Administrator</param>
            <param name="MailFrom">test@idp-domain.org</param>
            <param name="MailCC">test@idp-domain.org</param>
            <param name="MailSubject">Confirmation Request for the registration to the Identity Provider IDP</param>
            <param name="MailBody">
Dear _USER_,

your request to become a user of the Identity Provider
has been accepted.

You are now able to access all the Services which form part of the GrIDP "catch-all" Identity Federation.
Your acess has been granted for a calendar year (12 months)
A list of services is available at the following link:

https://idp-domain.org/providers

When you sign-in in any of them, plase select GrIDP as Identity Federation
and this IdP as Identity Provider.

Best regards,
The IdP administrators
                </param>

        </action>
       <action name="ModifyUser" class="it.infn.ct.security.actions.ModifyUser">
            <result name="success">/changesUpdate.jsp</result>
            <result name="error">/changesUpdateError.jsp</result>
            <result name="input">/userAdmin.jsp</result>
        </action>
    </package>

</struts>


text:
<!DOCTYPE html>

    <title>Texas 4000 Rider Management System | First Login</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <link rel="stylesheet" href="https://s3.amazonaws.com/t4krms/bootstrap/bootstrap.min.css">
    <link rel="stylesheet" href="//static.t4k2015.com/signin.css">
    <link rel="stylesheet" type="text/css" href="//static.t4k2015.com/datepicker3.css">

      {% if error_message %}

        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>

{{ error_message }}

      {% endif %}

          <form class="form-signin" role="form" method="post" action="{% url 'dashboard:first_login' %}">
            {% csrf_token %}

First Time Set-Up

Congratulations on your first login to RMS!

Before you can get started, make sure all your personal information is correct. You will also need to set your password before you can continue.

            <legend class="text-center">Set Password</legend>
              <input type="password" class="form-control" placeholder="Password" name="password1" required autofocus>
              <input type="password" class="form-control" placeholder="Confirm password" name="password2" required>
            <legend class="text-center">Personal Information</legend>
              <input type="email" class="form-control" value="{{ rider.get_email }}" name="email" placeholder="Email" required>
              <input type="text" class="form-control" value="{{ rider.first_name }}" name="first_name" placeholder="First Name" required>
              <input type="text" class="form-control" value="{{ rider.last_name }}" name="last_name" placeholder="Last Name" required>
              <input type="text" class="form-control" placeholder="Date of birth" name="date_of_birth" id="date_of_birth" pattern="[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])" required title="YYYY-MM-DD format">
            <legend class="text-center">Team Information</legend>
              <input type="text" class="form-control" placeholder="Team title" name="title" required>
              <select class="form-control" id="route" name="route">
                <option value="sierra">Sierra</option>
                <option value="rockies">Rockies</option>
                <option value="ozarks">Ozarks</option>
              </select>
              <button class="btn btn-lg btn-info btn-block" type="submit">Update Information</button>
          </form>


text:
FactoryGirl.define do
  factory :invoice do
    customer
    invoice_number 123
    invoice_date Time.current
    paid false
    published false
    factory :invoice_paid do
      published true
      paid true
    end
    factory :invoice_published do
      published true
    end

  end
end


text:
NS_ASSUME_NONNULL_BEGIN

@interface BNRItem : NSManagedObject

// Insert code here to declare functionality of your managed object subclass
-(void)setThumbnailFromImage:(UIImage *)image;

@end

NS_ASSUME_NONNULL_END

#import "BNRItem+CoreDataProperties.h"


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

<TITLE>
RowManagableTab
</TITLE>

<META NAME="keywords" CONTENT="gov.nih.nci.cabig.caaers.tools.spring.tabbedflow.RowManagableTab class">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

gov.nih.nci.cabig.caaers.tools.spring.tabbedflow

Class RowManagableTab<C>

java.lang.Object
  gov.nih.nci.cabig.ctms.web.tabs.Tab<C>
      gov.nih.nci.cabig.caaers.tools.spring.tabbedflow.AjaxableTab<C>
          gov.nih.nci.cabig.caaers.tools.spring.tabbedflow.ReflexiveAjaxableTab<C>
              gov.nih.nci.cabig.caaers.tools.spring.tabbedflow.RowManagableTab<C>

Direct Known Subclasses:
WorkFlowTab

public abstract class RowManagableTab<C>
extends ReflexiveAjaxableTab<C>

Author:

Rhett Sutphin

Field Summary

Fields inherited from class gov.nih.nci.cabig.caaers.tools.spring.tabbedflow.ReflexiveAjaxableTab

paramTypes

Constructor Summary

RowManagableTab()

RowManagableTab(java.lang.String longTitle,
                java.lang.String shortTitle,
                java.lang.String viewName)

RowManagableTab(java.lang.String longTitle,
                java.lang.String shortTitle,
                java.lang.String viewName,
                java.lang.Class[] params)

Method Summary

 org.springframework.web.servlet.ModelAndView
deleteRow(javax.servlet.http.HttpServletRequest request,
          java.lang.Object command,
          org.springframework.validation.Errors error)

protected  java.lang.String
getCollectionParamName()

protected  java.lang.String
getDeleteHashCodeParamName()

protected  java.lang.String
getDeleteIndexParamName()

protected  java.lang.String
getSoftDeleteParamName()

protected  boolean
shouldDelete(javax.servlet.http.HttpServletRequest request,
             java.lang.Object command,
             org.springframework.validation.Errors error)

Methods inherited from class gov.nih.nci.cabig.caaers.tools.spring.tabbedflow.ReflexiveAjaxableTab

getAJAXMethodInvAttrName, getMethod, getMethodName, methodInvocationRequest, postProcessAsynchronous

Methods inherited from class gov.nih.nci.cabig.caaers.tools.spring.tabbedflow.AjaxableTab

getAjaxRequestParamName, getAjaxViewName, getAjaxViewParamName, getFreeTextModelName

Methods inherited from class gov.nih.nci.cabig.ctms.web.tabs.Tab

beforeBind, getFlow, getLongTitle, getNumber, getShortTitle, getTargetNumber, getTargetTab, getViewName, onBind, onDisplay, postProcess, referenceData, referenceData, setFlow, setLongTitle, setNumber, setShortTitle, setViewName, validate

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RowManagableTab

public RowManagableTab()

RowManagableTab

public RowManagableTab(java.lang.String longTitle,
                       java.lang.String shortTitle,
                       java.lang.String viewName)

RowManagableTab

public RowManagableTab(java.lang.String longTitle,
                       java.lang.String shortTitle,
                       java.lang.String viewName,
                       java.lang.Class[] params)

Method Detail

getSoftDeleteParamName

protected java.lang.String getSoftDeleteParamName()

getDeleteIndexParamName

protected java.lang.String getDeleteIndexParamName()

getDeleteHashCodeParamName

protected java.lang.String getDeleteHashCodeParamName()

getCollectionParamName

protected java.lang.String getCollectionParamName()

shouldDelete

protected boolean shouldDelete(javax.servlet.http.HttpServletRequest request,
                               java.lang.Object command,
                               org.springframework.validation.Errors error)

deleteRow

public org.springframework.web.servlet.ModelAndView deleteRow(javax.servlet.http.HttpServletRequest request,
                                                              java.lang.Object command,
                                                              org.springframework.validation.Errors error)
                                                       throws java.lang.Exception

Throws:

java.lang.Exception

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD


text:
import {Component} from '@angular/core';

@Component({selector: 'app-component', templateUrl: 'app.component.html'})
export class AppComponent {}


text:
result: pass
---

Webpack uses the [Node.js module resolution algorithm] to resolve dependencies, which means it supports resolving dependencies from `node_modules` out-of-the-box. It also respects the widely adopted `"module"` field in `package.json` files by default, giving it precedence over the `"main"` field when defined.

Webpack does not currently support [Package Exports] or [Conditional Exports].

[node.js module resolution algorithm]: https://nodejs.org/api/modules.html#modules_all_together
[package exports]: https://nodejs.org/api/esm.html#esm_package_exports
[conditional exports]: https://nodejs.org/api/esm.html#esm_conditional_exports


text:
import java.io.*;

class a {
    private int xxx;
}


text:
namespace BuildsAppReborn.Contracts.Models
{
    public enum BuildStatus
    {
        Unknown,

        Succeeded,

        Failed,

        PartiallySucceeded,

        Running,

        Stopped,

        Queued
    }
}


text:
convertSTL
==========

A utility for converting STL files between ASCII and binary encoding.
I wrote this to save disk space and bandwidth when handling STL files. Some modeling programs include this functionality, but it is nice to have something that is more lightweight and can be called from a command line.

USAGE
---------
    $ ruby convertSTL.rb [filename of .stl to be converted]
or 'chmod +x' the script and run as:

    $ ./convertSTL.rb [filename of .stl to be converted]
The script will then translate the STL to the opposite encoding and save it as either `-ascii.stl` or `-binary.stl`

AUTHOR
-----------
Created by Chris Polis([@ChrisPolis](http://twitter.com/chrispolis)) under the MIT License


text:
.sh_sourceCode {

  font-weight: normal;
  font-style: normal;
}

.sh_sourceCode .sh_symbol , .sh_sourceCode .sh_cbracket {
  color: #fff;
}

.sh_sourceCode .sh_keyword {
  font-style: italic;
}

.sh_sourceCode .sh_string, .sh_sourceCode .sh_regexp, .sh_sourceCode .sh_number,
.sh_sourceCode .sh_specialchar
{
  color: #B0C4DE;
}

.sh_sourceCode .sh_comment {
  color: #777;
}


text:
package gowi

import (
	"github.com/sumorf/win"
)

var hInst win.HINSTANCE

// Get application instance handle
func GetAppInstance() win.HINSTANCE {
	return hInst
}

type Application struct {
}

// Run the main message loop
func (e *Application) Run() int {
	var msg win.MSG

	for {
		switch win.GetMessage(&msg, 0, 0, 0) {
		case 0:
			return int(msg.WParam)
		case -1:
			return -1
		}

		win.TranslateMessage(&msg)
		win.DispatchMessage(&msg)
	}

	return 0
}

func New() *Application {
	app := new(Application)
	return app
}


text:
import _defineProperty from "@babel/runtime/helpers/defineProperty";

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }

export const tooltips = ({
  config,
  data,
  fields
}) => {
  const isTooltipsSet = typeof config.tooltips !== 'undefined';
  return {
    config: _objectSpread(_objectSpread({}, config), {}, {
      tooltips: isTooltipsSet ? config.tooltips : true
    }),
    data,
    fields
  };
};
//# sourceMappingURL=tooltips.js.map


text:
package com.episode6.hackit.mockspresso.api;

import com.episode6.hackit.mockspresso.reflect.DependencyKey;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/**
 * A interface for a class that can provide dependencies for an object.
 * Its get method will never return null.
 */
public interface DependencyProvider {
  @Nullable <T> T get(@NotNull DependencyKey<T> key);
}


text:
#include <GameEngine/SpriteBatch.h>
#include <GameEngine\GLTexture.h>

class ParallaxBackground
{
public:
  ParallaxBackground(float _scrollSpeed, float _depth, const std::string& _texturePath,
    const glm::vec2& _position, const glm::vec2& _dimensions, float _playerPosX, int _index);

  ~ParallaxBackground();

  void Draw(GameEngine::SpriteBatch& _spritebatch);
  void Update(const glm::vec2& _newPlayerPos, const glm::vec2& _bottomLeft);

private:
  float m_startPosX = 0.0f;
  float m_endPosX = 0.0f;
  float m_scrollSpeed = 1.0f;
  float m_depth = 0.0f;
  float m_previousPlayerPosX = 0.0f;
  int m_backgroundIndex = 0;
  GameEngine::GLTexture m_texture;
  glm::vec2 m_position;
  glm::vec2 m_dimensions;
};

#endif // !_PARALLAXBACKGROUND_


text:
<?xml version="1.0" encoding="utf-8"?>
<PRONOM-Report xmlns="http://pronom.nationalarchives.gov.uk">
  <report_format_detail>
    <FileFormat>
      <FormatID>352</FormatID>
      <FormatName>Microsoft Access Database</FormatName>
      <FormatVersion>2000</FormatVersion>
      <FormatAliases>
      </FormatAliases>
      <FormatFamilies>
      </FormatFamilies>
      <FormatTypes>
      </FormatTypes>
      <FormatDisclosure>
      </FormatDisclosure>
      <FormatDescription>This is an outline record only, and requires further details, research or authentication to provide information that will enable users to further understand the format and to assess digital preservation risks associated with it if appropriate. If you are able to help by supplying any additional information concerning this entry, please return to the main PRONOM page and select 'Add an Entry'.</FormatDescription>
      <BinaryFileFormat>Text</BinaryFileFormat>
      <ByteOrders>
      </ByteOrders>
      <ReleaseDate>
      </ReleaseDate>
      <WithdrawnDate>
      </WithdrawnDate>
      <ProvenanceSourceID>1</ProvenanceSourceID>
      <ProvenanceName>Digital Preservation Department / The National Archives</ProvenanceName>
      <ProvenanceSourceDate>23 Sep 2003</ProvenanceSourceDate>
      <ProvenanceDescription>
      </ProvenanceDescription>
      <LastUpdatedDate>02 Aug 2005</LastUpdatedDate>
      <FormatNote>
      </FormatNote>
      <FormatRisk>
      </FormatRisk>
      <TechnicalEnvironment>
      </TechnicalEnvironment>
      <FileFormatIdentifier>
        <Identifier>x-fmt/240</Identifier>
        <IdentifierType>PUID</IdentifierType>
      </FileFormatIdentifier>
      <ExternalSignature>
        <ExternalSignatureID>339</ExternalSignatureID>
        <Signature>mdb</Signature>
        <SignatureType>File extension</SignatureType>
      </ExternalSignature>
      <InternalSignature>
        <SignatureID>273</SignatureID>
        <SignatureName>MS Access 2000</SignatureName>
        <SignatureNote>Jet 4 DB header plus variably-positioned AccessVersion 08. Two byte sequences. First byte sequence character sequence, Standard Jet DB. Second byte sequence character sequence, A c c e s s V e r s I o n{0-2048} 0 8 . [0:9] [0:9]</SignatureNote>
        <ByteSequence>
          <ByteSequenceID>350</ByteSequenceID>
          <PositionType>Absolute from BOF</PositionType>
          <Offset>0</Offset>
          <MaxOffset>
          </MaxOffset>
          <IndirectOffsetLocation>
          </IndirectOffsetLocation>
          <IndirectOffsetLength>
          </IndirectOffsetLength>
          <Endianness>Little-endian</Endianness>
          <ByteSequenceValue>000100005374616E64617264204A65742044420001000000</ByteSequenceValue>
        </ByteSequence>
        <ByteSequence>
          <ByteSequenceID>351</ByteSequenceID>
          <PositionType>Variable</PositionType>
          <Offset>
          </Offset>
          <MaxOffset>
          </MaxOffset>
          <IndirectOffsetLocation>
          </IndirectOffsetLocation>
          <IndirectOffsetLength>
          </IndirectOffsetLength>
          <Endianness>Little-endian</Endianness>
          <ByteSequenceValue>410063006300650073007300560065007200730069006F006E{0-2048}300038002E00[30:39]00[30:39]</ByteSequenceValue>
        </ByteSequence>
      </InternalSignature>
    </FileFormat>
    <SearchCriteria>Criteria</SearchCriteria>
  </report_format_detail>
</PRONOM-Report>


text:
Speed::Speed(int interval)
    : m_interval(interval), m_start(std::chrono::high_resolution_clock::now()) {
}
Speed::~Speed() {}

void Speed::Add(std::vector<time_point> &buffer, std::mutex &mutex) {
  mutex.lock();
  buffer.push_back(std::chrono::high_resolution_clock::now());
  mutex.unlock();
}

double Speed::Get(std::vector<time_point> &buffer, std::mutex &mutex) {
  time_point now = std::chrono::high_resolution_clock::now();
  time_point past = now - std::chrono::seconds(m_interval);
  double interval = (double)m_interval;
  if (past < m_start) {
    interval = ((double)std::chrono::duration_cast<std::chrono::milliseconds>(
                    now - m_start)
                    .count()) /
               1000;
    past = m_start;
  }
  size_t total = 0;

  mutex.lock();
  for (std::vector<time_point>::iterator it = buffer.begin();
       it != buffer.end();) {
    if ((*it) < past) {
      it = buffer.erase(it);
    } else {
      ++total;
      ++it;
    }
  }
  mutex.unlock();

  return (double)total / (double)interval;
}

void Speed::AddHash() { Add(m_buffer_hashes, m_mutex_hashes); }

double Speed::GetHashSpeed() { return Get(m_buffer_hashes, m_mutex_hashes); }

void Speed::AddSolution() { Add(m_buffer_solutions, m_mutex_solutions); }

double Speed::GetSolutionSpeed() {
  return Get(m_buffer_solutions, m_mutex_solutions);
}

void Speed::AddShare() { Add(m_buffer_shares, m_mutex_shares); }

double Speed::GetShareSpeed() { return Get(m_buffer_shares, m_mutex_shares); }

void Speed::AddShareOK() { Add(m_buffer_shares_ok, m_mutex_shares_ok); }

double Speed::GetShareOKSpeed() {
  return Get(m_buffer_shares_ok, m_mutex_shares_ok);
}

void Speed::Reset() {
  m_mutex_hashes.lock();
  m_buffer_hashes.clear();
  m_mutex_hashes.unlock();

  m_mutex_solutions.lock();
  m_buffer_solutions.clear();
  m_mutex_solutions.unlock();

  m_mutex_shares.lock();
  m_buffer_shares.clear();
  m_mutex_shares.unlock();

  m_mutex_shares_ok.lock();
  m_buffer_shares_ok.clear();
  m_mutex_shares_ok.unlock();

  m_start = std::chrono::high_resolution_clock::now();
}

Speed speed(INTERVAL_SECONDS);