text
stringlengths
2
9.79k
meta
dict
sentences_perturbed
int64
0
2
doc_stats
dict
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "mozilla/dom/SVGCircleElement.h" #include "mozilla/gfx/2D.h" #include "nsGkAtoms.h" #include "gfxContext.h" #include "mozilla/dom/SVGCircleElementBinding.h" NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Circle) using namespace mozilla::gfx; namespace mozilla { namespace dom { JSObject* SVGCircleElement::WrapNode(JSContext *aCx) { return SVGCircleElementBinding::Wrap(aCx, this); } nsSVGElement::LengthInfo SVGCircleElement::sLengthInfo[3] = { { &nsGkAtoms::cx, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X }, { &nsGkAtoms::cy, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y }, { &nsGkAtoms::r, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::XY } }; //---------------------------------------------------------------------- // Implementation SVGCircleElement::SVGCircleElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo) : SVGCircleElementBase(aNodeInfo) { } //---------------------------------------------------------------------- // nsIDOMNode methods NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGCircleElement) //---------------------------------------------------------------------- already_AddRefed<SVGAnimatedLength> SVGCircleElement::Cx() { return mLengthAttributes[ATTR_CX].ToDOMAnimatedLength(this); } already_AddRefed<SVGAnimatedLength> SVGCircleElement::Cy() { return mLengthAttributes[ATTR_CY].ToDOMAnimatedLength(this); } already_AddRefed<SVGAnimatedLength> SVGCircleElement::R() { return mLengthAttributes[ATTR_R].ToDOMAnimatedLength(this); } //---------------------------------------------------------------------- // nsSVGElement methods /* virtual */ bool SVGCircleElement::HasValidDimensions() const { return mLengthAttributes[ATTR_R].IsExplicitlySet() && mLengthAttributes[ATTR_R].GetAnimValInSpecifiedUnits() > 0; } nsSVGElement::LengthAttributesInfo SVGCircleElement::GetLengthInfo() { return LengthAttributesInfo(mLengthAttributes, sLengthInfo, ArrayLength(sLengthInfo)); } //---------------------------------------------------------------------- // nsSVGPathGeometryElement methods void SVGCircleElement::ConstructPath(gfxContext *aCtx) { float x, y, r; GetAnimatedLengthValues(&x, &y, &r, nullptr); if (r > 0.0f) aCtx->Arc(gfxPoint(x, y), r, 0, 2*M_PI); } TemporaryRef<Path> SVGCircleElement::BuildPath(PathBuilder* aBuilder) { float x, y, r; GetAnimatedLengthValues(&x, &y, &r, nullptr); if (r <= 0.0f) { return nullptr; } RefPtr<PathBuilder> pathBuilder = aBuilder ? aBuilder : CreatePathBuilder(); pathBuilder->Arc(Point(x, y), r, 0, Float(2*M_PI)); return pathBuilder->Finish(); } } // namespace dom } // namespace mozilla
null
0
{ "advantage_score_max": 0, "advantage_score_mean": 0, "advantage_score_min": 0, "advantage_score_std": 0, "advantage_scores": [], "baseline_doc_loss": 0.7392759919166565, "baseline_truncated": false, "doc_advantage_score": 1.1142574548721313, "length_change_ratio": 1, "net_length_change_chars": 0, "original_sentences_length_chars": 0, "replacement_paraphrases_length_chars": 0, "sentences_perturbed": 0, "target_doc_loss": 0.6634696125984192, "target_truncated": false, "threshold_passing_sentences": 0, "total_doc_length_chars": 2995, "total_sentences": 4, "truncated": false }
<Workspace Version="1.0.1.1821" X="126.45345609826" Y="-146.195429573173" zoom="0.979089623423451" Name="Home" Description="" RunType="Manual" RunPeriod="1000" HasRunWithoutCrash="False"> <NamespaceResolutionMap /> <Elements> <CoreNodeModels.Input.DoubleSlider guid="74ddd04a-7367-4df1-b2a7-4fd38b43b91d" type="CoreNodeModels.Input.DoubleSlider" nickname="Number Slider" x="-63.9999999999995" y="40" isVisible="true" isUpstreamVisible="true" lacing="Disabled" isSelectedInput="True" IsFrozen="false" isPinned="false"> <System.Double>6.515</System.Double> <Range min="0" max="20" step="0.1" /> </CoreNodeModels.Input.DoubleSlider> <CoreNodeModels.Input.DoubleSlider guid="ff56b080-a7f6-43af-9493-e1cf18a05064" type="CoreNodeModels.Input.DoubleSlider" nickname="Number Slider" x="-63.9999999999995" y="166.944444444445" isVisible="true" isUpstreamVisible="true" lacing="Disabled" isSelectedInput="True" IsFrozen="false" isPinned="false"> <System.Double>10.136</System.Double> <Range min="0" max="20" step="0.1" /> </CoreNodeModels.Input.DoubleSlider> <Dynamo.Graph.Nodes.CodeBlockNodeModel guid="2d25a0e9-96de-4e77-b65f-e6cb0c627361" type="Dynamo.Graph.Nodes.CodeBlockNodeModel" nickname="Code Block" x="190.242424242424" y="64.6666666666667" isVisible="true" isUpstreamVisible="true" lacing="Disabled" isSelectedInput="False" IsFrozen="false" isPinned="false" CodeText="domain[0][0]..domain[1][0]..#ucount+1;&#xA;domain[0][1]..domain[1][1]..#vcount+1;" ShouldFocus="false" /> <Dynamo.Graph.Nodes.ZeroTouch.DSFunction guid="88eef2ea-8304-4b9a-be32-ace885b25862" type="Dynamo.Graph.Nodes.ZeroTouch.DSFunction" nickname="UV.ByCoordinates" x="190.242424242424" y="164.666666666667" isVisible="true" isUpstreamVisible="true" lacing="CrossProduct" isSelectedInput="False" IsFrozen="false" isPinned="false" assembly="ProtoGeometry.dll" function="Autodesk.DesignScript.Geometry.UV.ByCoordinates@double,double" /> <Dynamo.Graph.Nodes.ZeroTouch.DSFunction guid="f12819a1-2524-4bbb-9023-81e8123f25e2" type="Dynamo.Graph.Nodes.ZeroTouch.DSFunction" nickname="Flatten" x="340.242424242424" y="64.6666666666667" isVisible="true" isUpstreamVisible="true" lacing="Shortest" isSelectedInput="False" IsFrozen="false" isPinned="false" assembly="BuiltIn" function="Flatten@var[]..[]" /> <Dynamo.Graph.Nodes.CodeBlockNodeModel guid="ece35171-b7df-48ab-923b-6fe45f6b2d07" type="Dynamo.Graph.Nodes.CodeBlockNodeModel" nickname="Code Block" x="188.575757575758" y="189.724747474747" isVisible="true" isUpstreamVisible="true" lacing="Disabled" isSelectedInput="False" IsFrozen="false" isPinned="false" CodeText="domain[0][0]..domain[1][0]..#ucount+1;&#xA;domain[0][1]..domain[1][1]..#vcount+1;" ShouldFocus="false" /> <Dynamo.Graph.Nodes.ZeroTouch.DSFunction guid="438ed167-47d2-4880-b999-21c8436dafb5" type="Dynamo.Graph.Nodes.ZeroTouch.DSFunction" nickname="UV.ByCoordinates" x="188.575757575758" y="289.724747474747" isVisible="true" isUpstreamVisible="true" lacing="CrossProduct" isSelectedInput="False" IsFrozen="false" isPinned="false" assembly="ProtoGeometry.dll" function="Autodesk.DesignScript.Geometry.UV.ByCoordinates@double,double" /> <Dynamo.Graph.Nodes.ZeroTouch.DSFunction guid="ba00a157-83b4-47f0-849f-749609635fd3" type="Dynamo.Graph.Nodes.ZeroTouch.DSFunction" nickname="Flatten" x="338.575757575758" y="189.724747474747" isVisible="true" isUpstreamVisible="true" lacing="Shortest" isSelectedInput="False" IsFrozen="false" isPinned="false" assembly="BuiltIn" function="Flatten@var[]..[]" /> <Dynamo.Graph.Nodes.ZeroTouch.DSVarArgFunction guid="971c93a1-cbdf-4aee-9378-71fd257dd941" type="Dynamo.Graph.Nodes.ZeroTouch.DSVarArgFunction" nickname="List.Join" x="583.416666666666" y="216.638888888888" isVisible="true" isUpstreamVisible="true" lacing="Disabled" isSelectedInput="False" IsFrozen="false" isPinned="false" assembly="DSCoreNodes.dll" function="DSCore.List.Join@var[]..[]" inputcount="2" /> <Dynamo.Graph.Nodes.CodeBlockNodeModel guid="3a0e4a80-429a-4bb0-8bb1-5569a6310145" type="Dynamo.Graph.Nodes.CodeBlockNodeModel" nickname="Get Surface Domain" x="121.722222222222" y="277.666666666666" isVisible="true" isUpstreamVisible="true" lacing="Disabled" isSelectedInput="False" IsFrozen="false" isPinned="false" CodeText="{{0,0},{1,1}};" ShouldFocus="false" /> <Dynamo.Graph.Nodes.ZeroTouch.DSFunction guid="623ce1f8-4b9a-42a6-bf5b-5de791b3ee8d" type="Dynamo.Graph.Nodes.ZeroTouch.DSFunction" nickname="Surface.PointAtParameter" x="651.094696969696" y="51.6559343434337" isVisible="true" isUpstreamVisible="true" lacing="Longest" isSelectedInput="False" IsFrozen="false" isPinned="false" assembly="ProtoGeometry.dll" function="Autodesk.DesignScript.Geometry.Surface.PointAtParameter@double,double" /> <Dynamo.Graph.Nodes.ZeroTouch.DSFunction guid="9052fadc-5159-452a-a128-16150b900d67" type="Dynamo.Graph.Nodes.ZeroTouch.DSFunction" nickname="UV.U" x="501.094696969696" y="51.6559343434337" isVisible="true" isUpstreamVisible="true" lacing="Disabled" isSelectedInput="False" IsFrozen="false" isPinned="false" assembly="ProtoGeometry.dll" function="Autodesk.DesignScript.Geometry.UV.U" /> <Dynamo.Graph.Nodes.ZeroTouch.DSFunction guid="a68015db-f99d-4491-a9ed-470497dd1f87" type="Dynamo.Graph.Nodes.ZeroTouch.DSFunction" nickname="UV.V" x="501.094696969696" y="151.655934343434" isVisible="true" isUpstreamVisible="true" lacing="Disabled" isSelectedInput="False" IsFrozen="false" isPinned="false" assembly="ProtoGeometry.dll" function="Autodesk.DesignScript.Geometry.UV.V" /> <
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
SUBROUTINE BSEQGP (NORIG,ILD,JUMP) C EXTERNAL ORF INTEGER GEOM1, GEOM2, SEQGP(3), EOF(3), SUB(2), 1 TWO, ORF, OBW, OP, RD, 2 RDREW, WRT, WRTREW, REW, GRID(8), 3 Z DIMENSION NORIG(2), ILD(1), ISYS(100) COMMON /BANDA / IBUF1, DUM2A(2), NOPCH, DUM1A, METHOD, 1 ICRIT, NGPTS, NSPTS COMMON /BANDB / NBIT, KORE, DUM1B, NGRD COMMON /BANDD / OBW, NBW, OP, NP, NCM, 1 NZERO, NEL, NEQ, NEQR COMMON /BANDS / NN, MM, DUM2(2), NGRID, DUM3(3), 1 MINDEG, NEDGE COMMON /BANDW / MAXW0, RMS0, MAXW1, RMS1, I77, 1 BRMS0, BRMS1 COMMON /TWO / TWO(1) COMMON /SYSTEM/ IBUF, NOUT COMMON /NAMES / RD, RDREW, WRT, WRTREW, REW, 1 NOREW COMMON /GEOMX / GEOM1, GEOM2 COMMON /ZZZZZZ/ Z(1) EQUIVALENCE (IBUF,ISYS(1)), (NLPP,ISYS(9)), 1 (LPCH,ISYS(91)), (IECHO,ISYS(19)) DATA SUB , EOF , SEQGP / 1 4HSSEQ, 4HGP , 3*2147483647, 5301, 53, 4 / C C THIS ROUTINE IS USED ONLY IN BANDIT MODULE C C NORIG(I) = ORIGINAL GRID POINT CORRESPONDING TO BANDIT INTERNAL C LABLE I C ILD(I) = NEW RESEQUENCED LABEL CORRESPONDING TO BANDIT INTERNAL C LABLE I C NN = NUMBER OF GRID POINTS C NGRD .LT.0, INSUFF. WORKING CORE, OR SCRATCH ARRAY FOR BANDIT C J77 = 0 IF (NN.LE.0 .OR. NGRD.LT.0) GO TO 145 C C PRINT BANDIT SUMMARY. C IF (NLPP.LE.48 .AND. METHOD.EQ.0) CALL PAGE1 WRITE (NOUT,10) 10 FORMAT (//53X,22H*** BANDIT SUMMARY ***,/, 1 /72X,6HBEFORE,5X,5HAFTER) C WRITE (NOUT,20) OBW,NBW,OP,NP,MAXW0,MAXW1 20 FORMAT (40X,13HBANDWIDTH (B),15X,2I10, 1 /40X,11HPROFILE (P), 17X,2I10, 2 /40X,25HMAXIMUM WAVEFRONT (C-MAX),3X,2I10) C ANN = FLOAT(NN) AV1 = FLOAT(OP)/ANN AV2 = FLOAT(NP)/ANN WRITE (NOUT,30) AV1,AV2,RMS0,RMS1,BRMS0,BRMS1,NGPTS 30 FORMAT (40X,25HAVERAGE WAVEFRONT (C-AVG),3X,2F10.3, 1 /40X,21HRMS WAVEFRONT (C-RMS),7X,2F10.3, 2 /40X,21HRMS BANDWITCH (B-RMS),7X,2F10.3, 3 /40X,25HNUMBER OF GRID POINTS (N),15X,I8) C IF (NSPTS .GT. 0) WRITE (NOUT,35) NSPTS 35 FORMAT (40X,23HNUMBER OF SCALAR POINTS,17X,I8) C WRITE (NOUT,40) NEL,NEQR,NEQ 40 FORMAT (40X,30HNUMBER OF ELEMENTS (NON-RIGID) ,10X,I8, 1 /40X,35HNUMBER OF RIGID ELEMENTS PROCESSED*,5X,I8, 2 /40X,35HNUMBER OF MPC EQUATIONS PROCESSED*,5X,I8) C WRITE (NOUT,50) NCM,MM,MINDEG 50 FORMAT (40X,20HNUMBER OF COMPONENTS,20X,I8, 1 /40X,20HMAXIMUM NODAL DEGREE,20X,I8, 2 /40X,20HMINIMUM NODAL DEGREE,20X,I8) C NONZ = 2*NEDGE + NN AN = NN*NN DEN = FLOAT(NONZ)*100./AN WRITE (NOUT,60) NEDGE,DEN,NZERO,KORE 60 FORMAT (40X,22HNUMBER OF UNIQUE EDGES,18X,I8, 1 /40X,23HMATRIX DENSITY, PERCENT, 16X,F9.3, 2 /40X,31HNUMBER OF POINTS OF ZERO DEGREE,9X,I8, 3 /40X,16HBANDIT OPEN CORE,24X,I8) C IF (ICRIT .EQ. 1) WRITE (NOUT,61) IF (ICRIT .EQ. 2) WRITE (NOUT,62). 3) WRITE (NOUT,63) IF (ICRIT .EQ. 4) WRITE (NOUT,64) 61 FORMAT (40X,10HCRITERION*,25X,13HRMS WAVEFRONT) 62 FORMAT (40X,10HCRITERION*,29X,9HBANDWIDTH) 63 FORMAT (40X,10HCRITERION*,31X,7HPROFILE) 64 FORMAT (40X,10HCRITERION*,25X,13HMAX WAVEFRONT) C IF (METHOD .EQ. -1) WRITE (NOUT,66) IF (METHOD .EQ. +1) WRITE (NOUT,67) IF (METHOD .EQ. 0) WRITE (NOUT,68) 66 FORMAT (40X,12HMETHOD USED*,34X,2HCM) 67 FORMAT (40X,12HMETHOD USED*,33X,3HGPS) 68 FORMAT (40X,12HMETHOD USED*,26X,10HCM AND GPS) C IF (JUMP .EQ. 0) GO TO 90 WRITE (NOUT,75) 75 FORMAT (/31X,'(* THESE DEFAULT OPTIONS CAN BE OVERRIDDEN BY THE', 1 ' NASTRAN CARD)') WRITE (NOUT,80) 80 FORMAT (//31X,'BANDIT FINDS GRID POINT RE-SEQUENCING NOT ', 1 'NECESSARY') GO TO 142 C C GENERATE SEQGP ARRAY AND OUTPUT SEQGP CARDS C 90 J = 0 DO 100 I = 1,NN Z(J+1) = NORIG(I) Z(J+2) = ILD(I) 100 J = J + 2 CALL SORT (0,0,2,1,Z(1),J) C C CHECK AGAINST ORIGINAL GRID
null
1
{ "advantage_score_max": 7.853735446929932, "advantage_score_mean": 4.002770900726318, "advantage_score_min": 1.2239656448364258, "advantage_score_std": 2.761584520339966, "advantage_scores": [ 7.853735446929932, 7.555313587188721, 3.885962963104248, 2.202500581741333, 1.2951475381851196, 1.2239656448364258 ], "baseline_doc_loss": 1.2301480770111084, "baseline_truncated": false, "doc_advantage_score": 0.9170741438865662, "length_change_ratio": 0.475, "net_length_change_chars": -21, "original_sentences_length_chars": 40, "replacement_paraphrases_length_chars": 19, "sentences_perturbed": 1, "target_doc_loss": 1.341383457183838, "target_truncated": false, "threshold_passing_sentences": 6, "total_doc_length_chars": 4624, "total_sentences": 14, "truncated": false }
<html class="reftest-wait"> <head> <script type="text/javascript"> window.onload = function() { // Get the frame var frame = document.getElementById("testframe"); // Set margin* attributes frame.marginWidth = "30px"; frame.marginHeight = "20px"; // Trigger the reftest snapshot document.documentElement.className = ''; } </script> </head> <body> <iframe id="testframe" src="653930-1-iframe.html"> </body> </html>
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
#%RAML 1.0 DataType description: | This resource type describes completed and in-progress buildrequests. Much of the contextual data for a buildrequest is associated with the buildset that contains this buildrequest. Update Methods -------------- All update methods are available as attributes of ``master.data.updates``. .. py:class:: buildbot.data.buildrequests.BuildRequest .. py:method:: claimBuildRequests(brids, claimed_at=None) :param list(integer) brids: list of buildrequest id to claim :param datetime claimed_at: date and time when the buildrequest is claimed :returns: (boolean) whether claim succeeded or not Claim a list of buildrequests .. py:method:: unclaimBuildRequests(brids) :param list(integer) brids: list of buildrequest id to unclaim Unclaim a list of buildrequests .. py:method:: completeBuildRequests(brids, results, complete_at=None) :param list(integer) brids: list of buildrequest id to complete :param integer results: the results of the buildrequest (see :ref:`Build-Result-Codes`) :param datetime complete_at: date and time when the buildrequest is completed Complete a list of buildrequest with the ``results`` status properties: buildrequestid: description: the unique ID of this buildrequest type: integer builderid: description: the id of the builder linked to this buildrequest type: integer buildsetid: description: the id of the buildset that contains this buildrequest type: integer claimed: description: | True if this buildrequest has been claimed. Note that this is a calculated field (from claimed_at != None). Ordering by this field is not optimized by the database layer. type: boolean claimed_at?: description: | time at which this build has last been claimed. None if this buildrequest has never been claimed or has been unclaimed type: date claimed_by_masterid?: description: | the id of the master that claimed this buildrequest. None if this buildrequest has not yet been claimed or has been unclaimed?: description: | time at which this buildrequest was completed, or None if it's still running type: date priority: description: the priority of this buildrequest type: integer properties?: description: a dictionary of properties corresponding to buildrequest. type: sourcedproperties results?: description: | the results of this buildrequest (see :ref:`Build-Result-Codes`), or None if not complete type: integer submitted_at: description: time at which this buildrequest were submitted type: date waited_for: description: | True if the entity that triggered this buildrequest is waiting for it to complete. Should be used by an (unimplemented so far) clean shutdown to only start br that are waited_for. type: boolean type: object
null
1
{ "advantage_score_max": 2.427215099334717, "advantage_score_mean": 1.7938413619995117, "advantage_score_min": 1.423869252204895, "advantage_score_std": 0.3872995376586914, "advantage_scores": [ 2.427215099334717, 1.7789133787155151, 1.5453675985336304, 1.423869252204895 ], "baseline_doc_loss": 1.3364360332489014, "baseline_truncated": false, "doc_advantage_score": 0.9416249394416809, "length_change_ratio": 0.35784313725490197, "net_length_change_chars": -131, "original_sentences_length_chars": 204, "replacement_paraphrases_length_chars": 73, "sentences_perturbed": 1, "target_doc_loss": 1.4192869663238525, "target_truncated": false, "threshold_passing_sentences": 4, "total_doc_length_chars": 3359, "total_sentences": 17, "truncated": false }
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\Theme\Model\Theme; use Magento\Framework\Filesystem; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\View\Design\ThemeInterface; /** * Theme registration model class */ class Registration { /** * @var \Magento\Theme\Model\ResourceModel\Theme\Data\CollectionFactory */ protected $_collectionFactory; /** * Collection of themes in file-system * * @var Collection */ protected $_themeCollection; /** * Allowed sequence relation by type, array(parent theme, child theme) * * @var array */ protected $_allowedRelations = [ [ThemeInterface::TYPE_PHYSICAL, ThemeInterface::TYPE_VIRTUAL], [ThemeInterface::TYPE_VIRTUAL, ThemeInterface::TYPE_STAGING], ]; /** * Forbidden sequence relation by type * * @var array */ protected $_forbiddenRelations = [ [ThemeInterface::TYPE_VIRTUAL, ThemeInterface::TYPE_VIRTUAL], [ThemeInterface::TYPE_PHYSICAL, ThemeInterface::TYPE_STAGING], ]; /** * Initialize dependencies * * @param \Magento\Theme\Model\ResourceModel\Theme\Data\CollectionFactory $collectionFactory * @param \Magento\Theme\Model\Theme\Data\Collection $filesystemCollection */ public function __construct( \Magento\Theme\Model\ResourceModel\Theme\Data\CollectionFactory $collectionFactory, \Magento\Theme\Model\Theme\Data\Collection $filesystemCollection ) { $this->_collectionFactory = $collectionFactory; $this->_themeCollection = $filesystemCollection; } /** * Theme registration * * @return $this */ public function register() { $this->_themeCollection->clear(); foreach ($this->_themeCollection as $theme) { $this->_registerThemeRecursively($theme); } $this->checkPhysicalThemes()->checkAllowedThemeRelations(); return $this; } /** * Register theme and recursively all its ascendants * * Second param is optional and is used to prevent circular references in inheritance chain * * @param ThemeInterface &$theme * @param array $inheritanceChain * @return $this * * @throws LocalizedException */ protected function _registerThemeRecursively(&$theme, $inheritanceChain = []) { if ($theme->getId()) { return $this; } $themeModel = $this->getThemeFromDb($theme->getFullPath()); if ($themeModel->getId()) { $theme = $themeModel; return $this; } $tempId = $theme->getFullPath(); if (in_array($tempId, $inheritanceChain)) { throw new LocalizedException(__('Circular-reference in theme inheritance detected for "%1"', $tempId)); } $inheritanceChain[] = $tempId; $parentTheme = $theme->getParentTheme(); if ($parentTheme) { $this->_registerThemeRecursively($parentTheme, $inheritanceChain); $theme->setParentId($parentTheme->getId()); } $this->_savePreviewImage($theme); $theme->setType(ThemeInterface::TYPE_PHYSICAL); $theme->save(); return $this; } /** * Save preview image for theme * * @param ThemeInterface $theme * @return $this */ protected function _savePreviewImage(ThemeInterface $theme) { $themeDirectory = $theme->getCustomization()->getThemeFilesPath(); if (!$theme->getPreviewImage() || !$themeDirectory) { return $this; } $imagePath = $themeDirectory . '/' . $theme->getPreviewImage(); if (0 === strpos($imagePath, (string) $themeDirectory)) { $theme->getThemeImage()->createPreviewImage($imagePath); } return $this; } /** * Get theme from DB by full path * * @param string $fullPath * @return ThemeInterface */ public function getThemeFromDb($fullPath) { return $this->_collectionFactory->create()->getThemeByFullPath($fullPath); } /** * Checks all physical themes that they were not deleted * * @return $this */ public function checkPhysicalThemes() { $themes = $this->_collectionFactory->create()->addTypeFilter(ThemeInterface::TYPE_PHYSICAL); /** @var $theme ThemeInterface */ foreach ($themes as $theme) { if (!$this->_themeCollection->hasTheme($theme)) { $theme->setType(ThemeInterface::TYPE_VIRTUAL)->save(); } } return $this; } /** * Check whether all themes have correct parent theme by type * * @return $this */ public function checkAllowedThemeRelations() { foreach ($this->_forbiddenRelations as $typesSequence) { list($parentType, $childType) = $typesSequence; $collection = $this->_collectionFactory->create(); $collection->addTypeRelationFilter($parentType, $childType); /** @var $theme ThemeInterface */ foreach ($collection as $theme) { $parentId = $this->_getResetParentId($theme); if ($theme->getParentId() != $parentId) { $theme->setParentId($parentId)->save(); } } } return $this; } /** * Reset parent themes by type * * @param ThemeInterface $theme * @return int|null */ protected function _getResetParentId(ThemeInterface $theme) { $parentTheme = $theme->getParentTheme(); while ($parentTheme) { foreach ($this->_allowedRelations as $typesSequence) { list($parentType, $childType) = $typesSequence; if ($theme->getType() == $childType && $parentTheme->getType() == $parentType) { return $parentTheme->getId(); } } $parentTheme = $parentTheme->getParentTheme(); } return null; } }
null
0
{ "advantage_score_max": 0, "advantage_score_mean": 0, "advantage_score_min": 0, "advantage_score_std": 0, "advantage_scores": [], "baseline_doc_loss": 0.6603163480758667, "baseline_truncated": false, "doc_advantage_score": 1.03741455078125, "length_change_ratio": 1, "net_length_change_chars": 0, "original_sentences_length_chars": 0, "replacement_paraphrases_length_chars": 0, "sentences_perturbed": 0, "target_doc_loss": 0.6365019083023071, "target_truncated": false, "threshold_passing_sentences": 0, "total_doc_length_chars": 6246, "total_sentences": 5, "truncated": false }
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 15 2018 10:31:50). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. // #import <objc/NSObject.h> #import <RemoteTextInput/NSSecureCoding-Protocol.h> @class NSAttributedString, NSDictionary, NSMutableDictionary, NSString, RTIStyledIntermediateText, TIKeyboardIntermediateText, TIKeyboardOutput; @interface RTITextOperations : NSObject <NSSecureCoding> { TIKeyboardOutput *_keyboardOutput; TIKeyboardIntermediateText *_intermediateText; RTIStyledIntermediateText *_styledIntermediateText; NSDictionary *_attributedPlaceholders; NSAttributedString *_textCheckingAnnotatedString; NSString *_textToAssert; SEL _editingActionSelector; NSString *_textCheckingAnnotationToRemove; struct _NSRange _selectionRangeToAssert; struct _NSRange _textCheckingAnnotationRange; struct _NSRange _textCheckingReplacementRange; struct _NSRange _textCheckingAnnotationRemovalRange; } + (BOOL)supportsSecureCoding; - (void).cxx_destruct; @property(copy, nonatomic) NSString *textCheckingAnnotationToRemove; // @synthesize textCheckingAnnotationToRemove=_textCheckingAnnotationToRemove; @property(nonatomic) struct _NSRange textCheckingAnnotationRemovalRange; // @synthesize textCheckingAnnotationRemovalRange=_textCheckingAnnotationRemovalRange; @property(nonatomic) struct _NSRange textCheckingReplacementRange; // @synthesize textCheckingReplacementRange=_textCheckingReplacementRange; @property(nonatomic) struct _NSRange textCheckingAnnotationRange; // @synthesize textCheckingAnnotationRange=_textCheckingAnnotationRange; @property(nonatomic) SEL editingActionSelector; // @synthesize editingActionSelector=_editingActionSelector; @property(nonatomic) struct _NSRange selectionRangeToAssert; // @synthesize selectionRangeToAssert=_selectionRangeToAssert; @property(copy, nonatomic) NSString *textToAssert; // @synthesize textToAssert=_textToAssert; @property(copy, nonatomic) NSAttributedString *textCheckingAnnotatedString; // @synthesize textCheckingAnnotatedString=_textCheckingAnnotatedString; @property(retain, nonatomic) NSDictionary *attributedPlaceholders; // @synthesize attributedPlaceholders=_attributedPlaceholders; @property(retain, nonatomic) RTIStyledIntermediateText *styledIntermediateText; // @synthesize styledIntermediateText=_styledIntermediateText; @property(retain, nonatomic) TIKeyboardIntermediateText *intermediateText; // @synthesize intermediateText=_intermediateText; @property(readonly, nonatomic) NSAttributedString *attributedInsertionText; - (void)insertAttributedText:(id)arg1 replacementRange:(struct _NSRange)arg2; - (void)insertAttributedText:(id)arg1; @property(readonly, nonatomic) NSMutableDictionary *mutableAttributedPlaceholders; - (void)_createAttributedPlaceholdersIfNecessary; - (void)insertText:(id)arg1 replacementRange:(struct _NSRange)arg2; @property(readonly, nonatomic) TIKeyboardOutput *keyboardOutput; // @synthesize keyboardOutput=_keyboardOutput; - (BOOL)isEqual:(id)arg1; - (id)description; - (id)init; - (id)initWithCoder:(id)arg1; - (void)encodeWithCoder:(id)arg1; @end
null
0
{ "advantage_score_max": 0, "advantage_score_mean": 0, "advantage_score_min": 0, "advantage_score_std": 0, "advantage_scores": [], "baseline_doc_loss": 0.664991557598114, "baseline_truncated": false, "doc_advantage_score": 1.5375137329101562, "length_change_ratio": 1, "net_length_change_chars": 0, "original_sentences_length_chars": 0, "replacement_paraphrases_length_chars": 0, "sentences_perturbed": 0, "target_doc_loss": 0.43251097202301025, "target_truncated": false, "threshold_passing_sentences": 0, "total_doc_length_chars": 3178, "total_sentences": 3, "truncated": false }
package me.leolin.shortcutbadger.impl; import android.content.AsyncQueryHandler; import android.content.ComponentName; import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.content.pm.ProviderInfo; import android.net.Uri; import android.os.Looper; import java.util.Arrays; import java.util.List; import me.leolin.shortcutbadger.Badger; import me.leolin.shortcutbadger.ShortcutBadgeException; /** * @author Leo Lin */ public class SonyHomeBadger implements Badger { private static final String INTENT_ACTION = "com.sonyericsson.home.action.UPDATE_BADGE"; private static final String INTENT_EXTRA_PACKAGE_NAME = "com.sonyericsson.home.intent.extra.badge.PACKAGE_NAME"; private static final String INTENT_EXTRA_ACTIVITY_NAME = "com.sonyericsson.home.intent.extra.badge.ACTIVITY_NAME"; private static final String INTENT_EXTRA_MESSAGE = "com.sonyericsson.home.intent.extra.badge.MESSAGE"; private static final String INTENT_EXTRA_SHOW_MESSAGE = "com.sonyericsson.home.intent.extra.badge.SHOW_MESSAGE"; private static final String PROVIDER_CONTENT_URI = "content://com.sonymobile.home.resourceprovider/badge"; private static final String PROVIDER_COLUMNS_BADGE_COUNT = "badge_count"; private static final String PROVIDER_COLUMNS_PACKAGE_NAME = "package_name"; private static final String PROVIDER_COLUMNS_ACTIVITY_NAME = "activity_name"; private static final String SONY_HOME_PROVIDER_NAME = "com.sonymobile.home.resourceprovider"; private final Uri BADGE_CONTENT_URI = Uri.parse(PROVIDER_CONTENT_URI); private AsyncQueryHandler mQueryHandler; @Override public void executeBadge(Context context, ComponentName componentName, int badgeCount) throws ShortcutBadgeException { if (sonyBadgeContentProviderExists(context)) { executeBadgeByContentProvider(context, componentName, badgeCount); } else { executeBadgeByBroadcast(context, componentName, badgeCount); } } @Override public List<String> getSupportLaunchers() { return Arrays.asList("com.sonyericsson.home", "com.sonymobile.home"); } private static void executeBadgeByBroadcast(Context context, ComponentName componentName, int badgeCount) { Intent intent = new Intent(INTENT_ACTION); intent.putExtra(INTENT_EXTRA_PACKAGE_NAME, componentName.getPackageName()); intent.putExtra(INTENT_EXTRA_ACTIVITY_NAME, componentName.getClassName()); intent.putExtra(INTENT_EXTRA_MESSAGE, String.valueOf(badgeCount)); intent.putExtra(INTENT_EXTRA_SHOW_MESSAGE, badgeCount > 0); context.sendBroadcast(intent); } /** * Send request to Sony badge content provider to set badge in Sony home launcher. * * @param context the context to use * @param componentName the componentName to use * @param badgeCount the badge count */ private void executeBadgeByContentProvider(Context context, ComponentName componentName, int badgeCount) { if (badgeCount < 0) { return; } final ContentValues contentValues = createContentValues(badgeCount, componentName); if (Looper.myLooper() == Looper.getMainLooper()) { // We're in the main thread. Let's ensure the badge update happens in a background // thread by using an AsyncQueryHandler and an async update. if (mQueryHandler == null) { mQueryHandler = new AsyncQueryHandler( context.getApplicationContext().getContentResolver()) { }; }. Let's update the badge synchronously. Otherwise, // if we use the AsyncQueryHandler, this thread may already be dead by the time the // async execution finishes, which will lead to an IllegalStateException. insertBadgeSync(context, contentValues); } } /** * Asynchronously inserts the badge counter. * * @param contentValues Content values containing the badge count, package and activity names */ private void insertBadgeAsync(final ContentValues contentValues) { mQueryHandler.startInsert(0, null, BADGE_CONTENT_URI, contentValues); } /** * Synchronously inserts the badge counter. * * @param context Caller context * @param contentValues Content values containing the badge count, package and activity names */ private void insertBadgeSync(final Context context, final ContentValues contentValues) { context.getApplicationContext().getContentResolver() .insert(BADGE_CONTENT_URI, contentValues); } /** * Creates a ContentValues object to be used in the badge counter update. The package and * activity names must correspond to an activity that holds an intent filter with action * "android.intent.action.MAIN" and category android.intent.category.LAUNCHER" in the manifest. * Also, it is not allowed to publish badges on behalf of another client, so the package and * activity names must belong to the process from which the insert is made. * To be able to insert badges, the app must have the PROVIDER_INSERT_BADGE * permission in the manifest file. In case these conditions are not * fulfilled, or any content values are missing, there will be an unhandled * exception on the background thread. * * @param badgeCount the badge count * @param componentName the component name from which package and class name will be extracted * */ private ContentValues createContentValues(final int badgeCount, final ComponentName componentName) { final ContentValues contentValues = new ContentValues(); contentValues.put(PROVIDER_COLUMNS_BADGE_COUNT, badgeCount); contentValues.put(PROVIDER_COLUMNS_PACKAGE_NAME, componentName.getPackageName()); contentValues.put(PROVIDER_COLUMNS_ACTIVITY_NAME, componentName.getClassName()); return contentValues; } /** * Check if the latest Sony badge content provider exists . * * @param context the context to use * @return true if Sony badge content provider exists, otherwise false. */ private static boolean sonyBadgeContentProviderExists(Context context) { boolean exists = false; ProviderInfo info = context.getPackageManager().resolveContentProvider(SONY_HOME_PROVIDER_NAME, 0); if (info != null) { exists = true; } return exists; } }
null
1
{ "advantage_score_max": 1.8550515174865723, "advantage_score_mean": 1.5591185092926025, "advantage_score_min": 1.2631855010986328, "advantage_score_std": 0.2959330081939697, "advantage_scores": [ 1.8550515174865723, 1.2631855010986328 ], "baseline_doc_loss": 0.7085013389587402, "baseline_truncated": false, "doc_advantage_score": 0.9799584150314331, "length_change_ratio": 0.47540983606557374, "net_length_change_chars": -160, "original_sentences_length_chars": 305, "replacement_paraphrases_length_chars": 145, "sentences_perturbed": 1, "target_doc_loss": 0.7229912281036377, "target_truncated": false, "threshold_passing_sentences": 2, "total_doc_length_chars": 6847, "total_sentences": 16, "truncated": false }
package com.vimeo.sample.model; import com.vimeo.sample_java_model.ExternalModel1; import com.vimeo.stag.UseStag; /** * Testing adapter creation for a model class * that relies on an externally defined class. * <p> * Created by mohammad.yasir on 28/12/16. */ @UseStag public class TestExternalExample { public GenericClass<ExternalModel1> mTesting; }
null
0
{ "advantage_score_max": 0, "advantage_score_mean": 0, "advantage_score_min": 0, "advantage_score_std": 0, "advantage_scores": [], "baseline_doc_loss": 2.382495641708374, "baseline_truncated": false, "doc_advantage_score": 1.2491041421890259, "length_change_ratio": 1, "net_length_change_chars": 0, "original_sentences_length_chars": 0, "replacement_paraphrases_length_chars": 0, "sentences_perturbed": 0, "target_doc_loss": 1.9073635339736938, "target_truncated": false, "threshold_passing_sentences": 0, "total_doc_length_chars": 364, "total_sentences": 3, "truncated": false }
package pflag import "strconv" // -- uint Value type uintValue uint func newUintValue(val uint, p *uint) *uintValue { *p = val return (*uintValue)(p) } func (i *uintValue) Set(s string) error { v, err := strconv.ParseUint(s, 0, 64) *i = uintValue(v) return err } func (i *uintValue) Type() string { return "uint" } func (i *uintValue) String() string { return strconv.FormatUint(uint64(*i), 10) } func uintConv(sval string) (interface{}, error) { v, err := strconv.ParseUint(sval, 0, 0) if err != nil { return 0, err } return uint(v), nil } // GetUint return the uint value of a flag with the given name func (f *FlagSet) GetUint(name string) (uint, error) { val, err := f.getFlagType(name, "uint", uintConv) if err != nil { return 0, err } return val.(uint), nil } // UintVar defines a uint flag with specified name, default value, and usage string. // The argument p points to a uint variable in which to store the value of the flag. func (f *FlagSet) UintVar(p *uint, name string, value uint, usage string) { f.VarP(newUintValue(value, p), name, "", usage) } // UintVarP is like UintVar, but accepts a shorthand letter that can be used after a single dash. func (f *FlagSet) UintVarP(p *uint, name, shorthand string, value uint, usage string) { f.VarP(newUintValue(value, p), name, shorthand, usage) } // UintVar defines a uint flag with specified name, default value, and usage string. // The argument p points to a uint variable in which to store the value of the flag. func UintVar(p *uint, name string, value uint, usage string) { CommandLine.VarP(newUintValue(value, p), name, "", usage) } // UintVarP is like UintVar, but accepts a shorthand letter that can be used after a single dash. func UintVarP(p *uint, name, shorthand string, value uint, usage string) { CommandLine.VarP(newUintValue(value, p), name, shorthand, usage) }. // The return value is the address of a uint variable that stores the value of the flag. func (f *FlagSet) Uint(name string, value uint, usage string) *uint { p := new(uint) f.UintVarP(p, name, "", value, usage) return p } // UintP is like Uint, but accepts a shorthand letter that can be used after a single dash. func (f *FlagSet) UintP(name, shorthand string, value uint, usage string) *uint { p := new(uint) f.UintVarP(p, name, shorthand, value, usage) return p } // Uint defines a uint flag with specified name, default value, and usage string. // The return value is the address of a uint variable that stores the value of the flag. func Uint(name string, value uint, usage string) *uint { return CommandLine.UintP(name, "", value, usage) } // UintP is like Uint, but accepts a shorthand letter that can be used after a single dash. func UintP(name, shorthand string, value uint, usage string) *uint { return CommandLine.UintP(name, shorthand, value, usage) }
null
1
{ "advantage_score_max": 8.306136131286621, "advantage_score_mean": 5.437847137451172, "advantage_score_min": 3.0608415603637695, "advantage_score_std": 2.160374879837036, "advantage_scores": [ 8.306136131286621, 6.720433235168457, 3.6639766693115234, 3.0608415603637695 ], "baseline_doc_loss": 0.26317906379699707, "baseline_truncated": false, "doc_advantage_score": 13.323602676391602, "length_change_ratio": 0.6355555555555555, "net_length_change_chars": -82, "original_sentences_length_chars": 225, "replacement_paraphrases_length_chars": 143, "sentences_perturbed": 1, "target_doc_loss": 0.01975284516811371, "target_truncated": false, "threshold_passing_sentences": 4, "total_doc_length_chars": 2935, "total_sentences": 14, "truncated": false }
define("ace/mode/clojure_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var ClojureHighlightRules = function() { var builtinFunctions = ( '* *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* ' + '*command-line-args* *compile-files* *compile-path* *e *err* *file* ' + '*flush-on-newline* *in* *macro-meta* *math-context* *ns* *out* ' + '*print-dup* *print-length* *print-level* *print-meta* *print-readably* ' + '*read-eval* *source-path* *use-context-classloader* ' + '*warn-on-reflection* + - -> ->> .. / < <= = ' + '== > &gt; >= &gt;= accessor aclone ' + 'add-classpath add-watch agent agent-errors aget alength alias all-ns ' + 'alter alter-meta! alter-var-root amap ancestors and apply areduce ' + 'array-map aset aset-boolean aset-byte aset-char aset-double aset-float ' + 'aset-int aset-long aset-short assert assoc assoc! assoc-in associative? ' + 'atom await await-for await1 bases bean bigdec bigint binding bit-and ' + 'bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left ' + 'bit-shift-right bit-test bit-xor boolean boolean-array booleans ' + 'bound-fn bound-fn* butlast byte byte-array bytes cast char char-array ' + 'char-escape-string char-name-string char? chars chunk chunk-append ' + 'chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? ' + 'class class? clear-agent-errors clojure-version coll? comment commute ' + 'comp comparator compare compare-and-set! compile complement concat cond ' + 'condp conj conj! cons constantly construct-proxy contains? count ' + 'counted? create-ns create-struct cycle dec decimal? declare definline ' + 'defmacro defmethod defmulti defn defn- defonce defstruct delay delay? ' + 'deliver deref derive descendants destructure disj disj! dissoc dissoc! ' + 'distinct distinct? doall doc dorun doseq dosync dotimes doto double ' + 'double-array doubles drop drop-last drop-while empty empty? ensure ' + 'enumeration-seq eval even? every? false? ffirst file-seq filter find ' + 'find-doc find-ns find-var first float float-array float? floats flush ' + 'fn fn? fnext for force format future future-call future-cancel ' + 'future-cancelled? future-done? future? gen-class gen-interface gensym ' + 'get get-in get-method get-proxy-class get-thread-bindings get-validator ' + 'hash hash-map hash-set identical? identity if-let if-not ifn? import ' + 'in-ns inc init-proxy instance? int int-array integer? interleave intern ' + 'interpose into into-array ints io! isa? iterate iterator-seq juxt key ' + 'keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list ' + 'list* list? load load-file load-reader load-string loaded-libs locking ' + 'long long-array longs loop macroexpand macroexpand-1 make-array ' + 'make-hierarchy map map? mapcat max max-key memfn memoize merge ' + 'merge-with meta method-sig methods min min-key mod name namespace neg? ' + 'newline next nfirst nil? nnext not not-any? not-empty not-every? not= ' + 'ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ' + 'ns-refers ns-resolve ns-unalias ns-unmap nth nthnext num number? odd? ' + 'or parents partial partition pcalls peek persistent! pmap pop pop! ' pop-thread-bindings positive? pprint? pr pr-str prefer-method prefers ' + 'primitives-classnames print print-ctor print-doc print-dup print-method ' + 'print-namespace-doc print-simple print-special-doc print-str printf ' + 'println println-str prn prn-str promise proxy proxy-call-with-super ' + 'proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot ' + 'rand rand-int range ratio? rational? rationalize re-find re-groups ' + 're-matcher re-matches re-pattern re-seq read read-line read-string ' + 'reduce ref ref-history-count ref-max-history ref-min-history ref-set ' + 'refer refer-clojure release-pending-sends rem remove remove-method ' + 'remove-ns remove-watch repeat repeatedly replace replicate require ' + 'reset! reset-meta! resolve rest resultset-seq reverse reversible? rseq ' + 'rsubseq second select-keys send send-off seq seq? seque sequence ' + 'sequential? set set-validator! set? short short-array shorts ' + 'shutdown-agents slurp some sort sort-by sorted-map sorted-map-by ' + 'sorted-set sorted-set-by sorted? special-form-anchor special-symbol? ' + 'split-at split-with str stream? string? struct struct-map subs subseq ' + 'subvec supers swap! symbol symbol? sync syntax-symbol-anchor take ' + 'take-last take-nth take-while test the-ns time to-array to-array-2d ' + 'trampoline transient tree-seq true? type unchecked-add unchecked-dec ' + 'unchecked-divide unchecked-inc unchecked-multiply unchecked-negate ' + 'unchecked-remainder unchecked-subtract underive unquote ' + 'unquote-splicing update-in update-proxy use val vals var-get var-set ' + 'var? vary-meta vec vector vector? when when-first when-let when-not ' + 'while with-bindings with-bindings* with-in-str with-loading-context ' + 'with-local-vars with-meta with-open with-out-str with-precision xml-seq ' + 'zero? zipmap' ); var keywords = ('throw try var ' + 'def do fn if let loop monitor-enter monitor-exit new quote recur set!' ); var buildinConstants = ("true false nil"); var keywordMapper = this.createKeywordMapper({ "keyword": keywords, "constant.language": buildinConstants, "support.function": builtinFunctions }, "identifier", false, " "); this.$rules = { "start" : [ { token : "comment", regex : ";.*$" }, { token : "keyword", //parens regex : "[\\(|\\)]" }, { token : "keyword", //lists regex : "[\\'\\(]" }, { token : "keyword", //vectors regex : "[\\[|\\]]" }, { token : "keyword", //sets and maps regex : "[\\{|\\}|\\#\\{|\\#\\}]" }, { token : "keyword", // ampersands regex : '[\\&]' }, { token : "keyword", // metadata regex : '[\\#\\^\\{]' }, { token : "keyword", // anonymous fn syntactic sugar regex : '[\\%]' }, { token : "keyword", // deref reader macro regex : '[@]' }, {
null
1
{ "advantage_score_max": 5.230298042297363, "advantage_score_mean": 2.29215145111084, "advantage_score_min": 1.1083308458328247, "advantage_score_std": 1.2098106145858765, "advantage_scores": [ 5.230298042297363, 5.10647439956665, 4.250089645385742, 4.179409980773926, 3.846881151199341, 3.74432110786438, 3.567948579788208, 3.1260151863098145, 2.820472240447998, 2.7116081714630127, 2.3413524627685547, 1.969434142112732, 1.967939019203186, 1.9400287866592407, 1.9089751243591309, 1.838172435760498, 1.7756396532058716, 1.6813760995864868, 1.5998135805130005, 1.5588030815124512, 1.4882196187973022, 1.3637150526046753, 1.3235193490982056, 1.3143608570098877, 1.3069936037063599, 1.2604516744613647, 1.211549162864685, 1.1882364749908447, 1.1735833883285522, 1.1526788473129272, 1.1083308458328247 ], "baseline_doc_loss": 1.114670991897583, "baseline_truncated": false, "doc_advantage_score": 12.10899829864502, "length_change_ratio": 1.0571428571428572, "net_length_change_chars": 2, "original_sentences_length_chars": 35, "replacement_paraphrases_length_chars": 37, "sentences_perturbed": 1, "target_doc_loss": 0.0920531153678894, "target_truncated": false, "threshold_passing_sentences": 31, "total_doc_length_chars": 7121, "total_sentences": 65, "truncated": false }
{ "richMenuId": "richmenu-f85ab95699420f1c9330f22bb4f489e8", "size": { "width": 2500, "height": 843 }, "selected": true, "name": "NAME", "chatBarText": "CHAT_BAR_TEXT", "areas": [ ] }
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
{ "properties": { "displayName": "[Deprecated]: Function App should only be accessible over HTTPS", "policyType": "BuiltIn", "mode": "All", "description": "Use of HTTPS ensures server/service authentication and protects data in transit from network layer eavesdropping attacks.", "metadata": { "version": "1.0.0-deprecated", "category": "Security Center", "deprecated": true }, "parameters": { "effect": { "type": "string", "defaultValue": "AuditIfNotExists", "allowedValues": [ "AuditIfNotExists", "Disabled" ], "metadata": { "displayName": "Effect", "description": "Enable or disable the execution of the policy" } } }, "policyRule": { "if": { "allof": [ { "field": "type", "equals": "microsoft.Web/sites" }, { "anyof": [ { "field": "kind", "equals": "functionapp" }, { "field": "kind", "equals": "functionapp,linux" }, { "field": "kind", "equals": "functionapp,linux,container" } ] } ] }, "then": { "effect": "[parameters('effect')]", "details": { "type": "Microsoft.Security/complianceResults", "name": "OnlyHttpsForFunctionApp", "existenceCondition": { "field": "Microsoft.Security/complianceResults/resourceStatus", "in": [ "OffByPolicy", "Healthy" ] } } } } }, "id": "/providers/Microsoft.Authorization/policyDefinitions/5df82f4f-773a-4a2d-97a2-422a806f1a55", "name": "5df82f4f-773a-4a2d-97a2-422a806f1a55" }
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
################################################################################ # # Intel PRO/1000 Linux driver # Copyright(c) 1999 - 2006 Intel Corporation. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by the Free Software Foundation. # # This program is distributed in the hope it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # more details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. # # The full GNU General Public License is included in this distribution in # the file called "COPYING". # For further information, please refer to the documentation provided with this software or visit the official project website for support and updates. Elam Young Parkway, Hillsboro, OR 97124-6497 # ################################################################################ # # Makefile for the Intel(R) PRO/1000 ethernet driver # obj-$(CONFIG_E1000) += e1000.o e1000-objs := e1000_main.o e1000_hw.o e1000_ethtool.o e1000_param.o
null
1
{ "advantage_score_max": 8.55085277557373, "advantage_score_mean": 6.437713623046875, "advantage_score_min": 2.585448741912842, "advantage_score_std": 2.728238344192505, "advantage_scores": [ 8.55085277557373, 8.176837921142578, 2.585448741912842 ], "baseline_doc_loss": 0.34684741497039795, "baseline_truncated": false, "doc_advantage_score": 3.3888728618621826, "length_change_ratio": 0.9805194805194806, "net_length_change_chars": -3, "original_sentences_length_chars": 154, "replacement_paraphrases_length_chars": 151, "sentences_perturbed": 1, "target_doc_loss": 0.10234890133142471, "target_truncated": false, "threshold_passing_sentences": 3, "total_doc_length_chars": 1357, "total_sentences": 8, "truncated": false }
/* * Copyright (c) 2013-2014 BlackBerry Limited. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. /******************************************************************************* * Copyright (c) 2013-2014 BlackBerry Limited. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. ******************************************************************************/. * * Tip: It relies on bb::cascades, which is not accessible in an headless app. * * This connect() function will call onSystemLanguageChanged() whenever the user * changes language or locale. * */ if (!QObject::connect(m_localeHandler, SIGNAL(systemLanguageChanged()), this, SLOT(onSystemLanguageChanged()))) { // This is an abnormal situation! Something went wrong! // Add own code to recover here qWarning() << "Recovering from a failed connect()"; } // initial load // Call onSystemLanguageChanged() directly to load the right translation on startup onSystemLanguageChanged(); // Create scene document from main.qml asset, the parent is set // to ensure the document gets destroyed properly at shut down. QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this); // Make app available to the QML as a context property.= qml->createRootObject<AbstractPane>(); // Set created root object as the application scene Application::instance()->setScene(root); } void ApplicationUI::onSystemLanguageChanged() { // Remove old translation QCoreApplication::instance()->removeTranslator(m_translator); // Initiate, load and install the application translation files. /* * QLocale().name() * * Returns the language and country of this locale as a string of the * form "language_country", where language is a lowercase, two-letter * ISO 639 language code, and country is an uppercase, two- or three-letter * ISO 3166 country code. */ QString locale_string = QLocale().name(); // Append the locale to the name of the app to build the ts file name QString file_name = QString("TranslateHL_%1").arg(locale_string); // Try to load the correct ts file, if successful install the translation if (m_translator->load(file_name, "app/native/qm")) { QCoreApplication::instance()->installTranslator(m_translator); } } void ApplicationUI::onSystemLanguageChanged(const QString& newLocale) { // This function is used only for simulating a system language change // Remove old translation QCoreApplication::instance()->removeTranslator(m_translator); // Append the locale to the name of the app to build the ts file name QString file_name = QString("TranslateHL_%1").arg(newLocale); // Try to load the correct ts file, if successful install the translation if (m_translator->load(file_name, "app/native/qm")) { QCoreApplication::instance()->installTranslator(m_translator); } } void ApplicationUI::invokeSettings() { // Open the Settings card at the language section InvokeRequest request; request.setUri("settings://language"); request.setTarget("sys.settings.card"); request.setAction("bb.action.OPEN"); m_invokeManager->invoke(request); } void ApplicationUI::sendToHeadless(const QString& command, QString parameters) { // Start the headless part right away InvokeRequest request; request.setTarget("com.example.TranslateHLService"); request.setAction("com.example.TranslateHLService." + command.toUpper()); request.setData(parameters.toUtf8()); m_invokeManager->invoke(request); // Only used during app development if (command == "SHUTDOWN") bb::Application::instance()->quit(); }
null
2
{ "advantage_score_max": 1.605210781097412, "advantage_score_mean": 1.408041000366211, "advantage_score_min": 1.2910029888153076, "advantage_score_std": 0.1402319073677063, "advantage_scores": [ 1.605210781097412, 1.327908992767334, 1.2910029888153076 ], "baseline_doc_loss": 0.9012996554374695, "baseline_truncated": false, "doc_advantage_score": 0.862388014793396, "length_change_ratio": 0.8152929493545183, "net_length_change_chars": -186, "original_sentences_length_chars": 1007, "replacement_paraphrases_length_chars": 821, "sentences_perturbed": 2, "target_doc_loss": 1.0451208353042603, "target_truncated": false, "threshold_passing_sentences": 3, "total_doc_length_chars": 4976, "total_sentences": 15, "truncated": false }
--- id: version-0.55-flatlist title: FlatList original_id: flatlist --- A performant interface for rendering painless flat lists, supporting the most handy features: - Fully cross-platform. - Optional horizontal mode. - Configurable viewability callbacks. - Header support. - Footer component support. - Separator support. - Pull to Refresh. - Scroll loading. - ScrollToIndex support. If you need section support, use [`<SectionList>`](sectionlist.md). Minimal Example: <FlatList data={[{key: 'a'}, {key: 'b'}]} renderItem={({item}) => <Text>{item.key}</Text>} /> More complex, multi-select example demonstrating `PureComponent` usage for perf optimization and avoiding bugs. - By binding the `onPressItem` handler, the props will remain `===` and `PureComponent` will prevent wasteful re-renders unless the actual `id`, `selected`, or `title` props change, even if the components rendered in `MyListItem` did not have such optimizations. - By passing `extraData={this.state}` to `FlatList` we make sure `FlatList` itself will re-render when the `state.selected` changes. Without setting this prop, `FlatList` would not know it needs to re-render any items because it is also a `PureComponent` and the prop comparison will not show any changes. - `keyExtractor` tells the list to use the `id`s for the react keys instead of the default `key` property. class MyListItem extends React.PureComponent { _onPress = () => { this.props.onPressItem(this.props.id); }; render() { const textColor = this.props.selected ? "red" : "black"; return ( <TouchableOpacity onPress={this._onPress}> <View> <Text style={{ color: textColor }}> {this.props.title} </Text> </View> </TouchableOpacity> ); } } class MultiSelectList extends React.PureComponent { state = {selected: (new Map(): Map<string, boolean>)}; _keyExtractor = (item, index) => item.id; _onPressItem = (id: string) => { // updater functions are preferred for transactional updates this.setState((state) => { // copy the map rather than modifying state. const selected = new Map(state.selected); selected.set(id, !selected.get(id)); // toggle return {selected}; }); }; _renderItem = ({item}) => ( <MyListItem id={item.id} onPressItem={this._onPressItem} selected={!!this.state.selected.get(item.id)} title={item.title} /> ); render() { return ( <FlatList data={this.props.data} extraData={this.state} keyExtractor={this._keyExtractor} renderItem={this._renderItem} /> ); } } This is a convenience wrapper around [`<VirtualizedList>`](virtualizedlist.md), and thus inherits its props (as well as those of [`<ScrollView>`](scrollview.md)) that aren't explicitly listed here, along with the following caveats: - Internal state is not preserved when content scrolls out of the render window. Make sure all your data is captured in the item data or external stores like Flux, Redux, or Relay. - This is a `PureComponent` which means that it will not re-render if `props` remain shallow-equal. Make sure that everything your `renderItem` function depends on is passed as a prop (e.g. `extraData`) that is not `===` after updates, otherwise your UI may not update on changes. This includes the `data` prop and parent component state. - In order to constrain memory and enable smooth scrolling, content is rendered asynchronously offscreen. This means it's possible to scroll faster than the fill rate and momentarily see blank content. This is a tradeoff that can be adjusted to suit the needs of each application, and we are working on improving it behind the scenes. - By default, the list looks for a `key` prop on each item and uses that for the React key. Alternatively, you can provide a custom `keyExtractor` prop. Also inherits [ScrollView Props](scrollview.md#props), unless it is nested in another FlatList of same orientation. ### Props - [`ScrollView` props...](scrollview.md#props) - [`VirtualizedList` props...](virtualizedlist.md#props) - [`renderItem`](flatlist.md#renderitem) - [`data`](flatlist.md#data) - [`ItemSeparatorComponent`](flatlist.md#itemseparatorcomponent) - [`ListEmptyComponent`](flatlist.md#listemptycomponent) - [`ListFooterComponent`](flatlist.md#listfootercomponent) - [`ListHeaderComponent`](flatlist.md#listheadercomponent) - [`columnWrapperStyle`](flatlist.md#columnwrapperstyle) - [`extraData`](flatlist.md#extradata) - [`getItemLayout`](flatlist.md#getitemlayout) - [`horizontal`](flatlist.md#horizontal) - [`initialNumToRender`](flatlist.md#initialnumtorender) - [`initialScrollIndex`](flatlist.md#initialscrollindex) - [`inverted`](flatlist.md#inverted) - [`keyExtractor`](flatlist.md#keyextractor) - [`numColumns`](flatlist.md#numcolumns) - [`onEndReached`](flatlist.md#onendreached) - [`onEndReachedThreshold`](flatlist.md#onendreachedthreshold) - [`onRefresh`](flatlist.md#onrefresh) - [`onViewableItemsChanged`](flatlist.md#onviewableitemschanged) - [`progressViewOffset`](flatlist.md#progressviewoffset) - [`legacyImplementation`](flatlist.md#legacyimplementation) - [`refreshing`](flatlist.md#refreshing) - [`removeClippedSubviews`](flatlist.md#removeclippedsubviews) - [`viewabilityConfig`](flatlist.md#viewabilityconfig) - [`viewabilityConfigCallbackPairs`](flatlist.md#viewabilityconfigcallbackpairs) ### Methods - [`scrollToEnd`](flatlist.md#scrolltoend) - [`scrollToIndex`](flatlist.md#scrolltoindex) - [`scrollToItem`](flatlist.md#scrolltoitem) - [`scrollToOffset`](flatlist.md#scrolltooffset) - [`recordInteraction`](flatlist.md#recordinteraction) - [`flashScrollIndicators`](flatlist.md#flashscrollindicators) --- # Reference ## Props ### `renderItem` ```jsx renderItem({ item: Object, index: number, separators: { highlight: Function, unhighlight: Function, updateProps: Function(select: string, newProps: Object) } }) => ?React.Element ``` Takes an item from `data` and renders it into the list. Provides additional metadata like `index` if you need it, as well as a more generic `separators.updateProps` function which let you set whatever props you want to change the rendering of either the leading separator or trailing separator in case the more common `highlight` and `unhighlight` (which set the `highlighted: boolean` prop) are insufficient for your use case. | Type | Required | | -------- | -------- | | function | Yes | Example usage: ```jsx <FlatList ItemSeparatorComponent={Platform.OS !== 'android' && ({highlighted}) => ( <View style={[style.separator, highlighted && {marginLeft: 0}]} /> )} data={[{title: 'Title Text', key: 'item1'}]} renderItem={({item, separators}) => ( <TouchableHighlight onPress={() => this._onPress(item)} onShowUnderlay={separators.highlight} onHideUnderlay={separators.unhighlight}> <View style={{backgroundColor: 'white'}}> <Text>{
null
1
{ "advantage_score_max": 5.639411449432373, "advantage_score_mean": 2.475132942199707, "advantage_score_min": 1.1596128940582275, "advantage_score_std": 1.3511254787445068, "advantage_scores": [ 5.639411449432373, 3.862361431121826, 3.1196606159210205, 2.43403697013855, 2.338757038116455, 2.281811237335205, 1.3777300119400024, 1.2882466316223145, 1.2497031688690186, 1.1596128940582275 ], "baseline_doc_loss": 0.6935834288597107, "baseline_truncated": false, "doc_advantage_score": 0.6434736847877502, "length_change_ratio": 1.588235294117647, "net_length_change_chars": 10, "original_sentences_length_chars": 17, "replacement_paraphrases_length_chars": 27, "sentences_perturbed": 1, "target_doc_loss": 1.0778738260269165, "target_truncated": false, "threshold_passing_sentences": 10, "total_doc_length_chars": 7183, "total_sentences": 33, "truncated": false }
/* Gruvbox style (light) (c) Pavel Pertsev (original style at https://github.com/morhetz/gruvbox) */ .hljs { display: block; overflow-x: auto; padding: 0.5em; background: #fbf1c7; } .hljs, .hljs-subst { color: #3c3836; } /* Gruvbox Red */ .hljs-deletion, .hljs-formula, .hljs-keyword, .hljs-link, .hljs-selector-tag { color: #9d0006; } /* Gruvbox Blue */ .hljs-built_in, .hljs-emphasis, .hljs-name, .hljs-quote, .hljs-strong, .hljs-title, .hljs-variable { color: #076678; } /* Gruvbox Yellow */ .hljs-attr, .hljs-params, .hljs-template-tag, .hljs-type { color: #b57614; } /* Gruvbox Purple */ .hljs-builtin-name, .hljs-doctag, .hljs-literal, .hljs-number { color: #8f3f71; } /* Gruvbox Orange */ .hljs-code, .hljs-meta, .hljs-regexp, .hljs-selector-id, .hljs-template-variable { color: #af3a03; } /* Gruvbox Green */ .hljs-addition, .hljs-meta-string, .hljs-section, .hljs-selector-attr, .hljs-selector-class, .hljs-string, .hljs-symbol { color: #79740e; } /* Gruvbox Aqua */ .hljs-attribute, .hljs-bullet, .hljs-class, .hljs-function, .hljs-function .hljs-keyword, .hljs-meta-keyword, .hljs-selector-pseudo, .hljs-tag { color: #427b58; } /* Gruvbox Gray */ .hljs-comment { color: #928374; } /* Gruvbox Purple */ .hljs-link_label, .hljs-literal, .hljs-number { color: #8f3f71; } .hljs-comment, .hljs-emphasis { font-style: italic; } .hljs-section, .hljs-strong, .hljs-tag { font-weight: bold; }
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
<!DOCTYPE HTML> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc --> <title>Uses of Class squidpony.squidmath.Arrangement.ValueCollection (squidlib-util 3.0.1)</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="description" content="use: package: squidpony.squidmath, class: Arrangement, class: ValueCollection"> <meta name="generator" content="javadoc/ClassUseWriter"> <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> <link rel="stylesheet" type="text/css" href="../../../script-dir/jquery-ui.css" title="Style"> <script type="text/javascript" src="../../../script.js"></script> <script type="text/javascript" src="../../../script-dir/jszip/dist/jszip.min.js"></script> <script type="text/javascript" src="../../../script-dir/jszip-utils/dist/jszip-utils.min.js"></script> <!--[if IE]> <script type="text/javascript" src="../../../script-dir/jszip-utils/dist/jszip-utils-ie.min.js"></script> <![endif]--> <script type="text/javascript" src="../../../script-dir/jquery-3.4.1.js"></script> <script type="text/javascript" src="../../../script-dir/jquery-ui.js"></script> </head> <body class="class-use"> <script type="text/javascript">var pathtoroot = "../../../"; loadScripts(document, 'script');</script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <div class="flexBox"> <header role="banner" class="flexHeader"> <nav role="navigation"> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a id="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a id="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../index.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../Arrangement.ValueCollection.html" title="class in squidpony.squidmath">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../index-files/index-1.html">Index</a></li> <li><a href="../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <div class="navListSearch"><label for="search">SEARCH:</label> <input type="text" id="search" value="search" disabled="disabled"> <input type="reset" id="reset" value="reset" disabled="disabled"> </div> </div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="skipNav"><a id="skip.navbar.top"> <!-- --> </a></div> </nav> </header> <div class="flexContent"> <main role="main"> <div class="header"> <h1 title="Uses of Class squidpony.squidmath.Arrangement.ValueCollection" class="title">Uses of Class<br>squidpony.squidmath.Arrangement.ValueCollection</h1> </div> <div class="classUseContainer">No usage of squidpony.squidmath.Arrangement.ValueCollection</div> </main> <footer role="contentinfo"> <nav role="navigation"> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a id="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a id="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../index.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../Arrangement.ValueCollection.html" title="class in squidpony.squidmath">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../index-files/index-1.html">Index</a></li> <li><a href="../../../help-doc.html">Help</a></li> </ul> </div> <a id="skip.navbar.bottom"> <!-- --> </a> <!-- ======== END OF BOTTOM NAVBAR ======= --> </nav> <p class="legalCopy"><small>Copyright &#169; 2012&#x2013;2020. All rights reserved.</small></p> </footer> </div> </div> </body> </html>
null
0
{ "advantage_score_max": 0, "advantage_score_mean": 0, "advantage_score_min": 0, "advantage_score_std": 0, "advantage_scores": [], "baseline_doc_loss": 0.5976455211639404, "baseline_truncated": false, "doc_advantage_score": 22.552146911621094, "length_change_ratio": 1, "net_length_change_chars": 0, "original_sentences_length_chars": 0, "replacement_paraphrases_length_chars": 0, "sentences_perturbed": 0, "target_doc_loss": 0.026500603184103966, "target_truncated": false, "threshold_passing_sentences": 0, "total_doc_length_chars": 4021, "total_sentences": 3, "truncated": false }
/* * * Copyright 2014 gRPC authors. * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package transport import ( "bytes" "context" "errors" "fmt" "io" "math" "net" "strconv" "sync" "sync/atomic" "time" "github.com/golang/protobuf/proto" "golang.org/x/net/http2" "golang.org/x/net/http2/hpack" spb "google.golang.org/genproto/googleapis/rpc/status" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/internal" "google.golang.org/grpc/internal/channelz" "google.golang.org/grpc/internal/grpcrand" "google.golang.org/grpc/keepalive" "google.golang.org/grpc/metadata" "google.golang.org/grpc/peer" "google.golang.org/grpc/stats" "google.golang.org/grpc/status" "google.golang.org/grpc/tap" ) var ( // ErrIllegalHeaderWrite indicates that setting header is illegal because of // the stream's state. ErrIllegalHeaderWrite = errors.New("transport: the stream is done or WriteHeader was already called") // ErrHeaderListSizeLimitViolation indicates that the header list size is larger // than the limit set by peer. ErrHeaderListSizeLimitViolation = errors.New("transport: trying to send header list size larger than the limit set by peer") // statusRawProto is a function to get to the raw status proto wrapped in a // status.Status without a proto.Clone(). statusRawProto = internal.StatusRawProto.(func(*status.Status) *spb.Status) ) // serverConnectionCounter counts the number of connections a server has seen // (equal to the number of http2Servers created). Must be accessed atomically. var serverConnectionCounter uint64 // http2Server implements the ServerTransport interface with HTTP2. type http2Server struct { lastRead int64 // Keep this field 64-bit aligned. Accessed atomically. ctx context.Context done chan struct{} conn net.Conn loopy *loopyWriter readerDone chan struct{} // sync point to enable testing. writerDone chan struct{} // sync point to enable testing. remoteAddr net.Addr localAddr net.Addr maxStreamID uint32 // max stream ID ever seen authInfo credentials.AuthInfo // auth info about the connection inTapHandle tap.ServerInHandle framer *framer // The max number of concurrent streams. maxStrmaxStreams uint32 // controlBuf delivers all the control related tasks (e.g., window // updates, reset streams, and various settings) to the controlBuf.rolBuf *controlBuffer fc *trInFlow stats stats.Handler // Keepalive and max-age parameters for the server. kp keepalive.ServerParameters // Keepalive enforcement policy. kep keepalive.EnforcementPolicy // The time instance last ping was received. lastPingAt time.Time // Number of times the client has violated keepalive ping policy so far. pingStrikes uint8 // Flag to signify that number of ping strikes should be reset to 0. // This is set whenever data or header frames are sent. // 1 means yes. resetPingStrikes uint32 // Accessed atomically. initialWindowSize int32 bdpEst *bdpEstimator maxSendHeaderListSize *uint32 mu sync.Mutex // guard the following // drainChan is initialized when drain(...) is called the first time. // After which the server writes out the first GoAway(with ID 2^31-1) frame. // Then an independent goroutine will be launched to later send the second GoAway. // During this time we don't want to write another first GoAway(with ID 2^31 -1) frame. // Thus call to drain(...) will be a no-op if drainChan is already initialized since draining is // already underway. drainChan chan struct{} state transportState activeStreams map[uint32]*Stream // idle is the time instant when the connection went idle. // This is either the beginning of the connection or when the number of // RPCs go down to 0. // When the connection is busy, this value is set to 0. idle time.Time // Fields below are for channelz metric collection. channelzID int64 // channelz unique identification number czData *channelzData bufferPool *bufferPool connectionID uint64 } // newHTTP2Server constructs a ServerTransport based on HTTP2. ConnectionError is // returned if something goes wrong. func newHTTP2Server(conn net.Conn, config *ServerConfig) (_ ServerTransport, err error) { writeBufSize := config.WriteBufferSize readBufSize := config.ReadBufferSize maxHeaderListSize := defaultServerMaxHeaderListSize if config.MaxHeaderListSize != nil { maxHeaderListSize = *config.MaxHeaderListSize } framer := newFramer(conn, writeBufSize, readBufSize, maxHeaderListSize) // Send initial settings as connection preface to client. isettings := []http2.Setting{{ ID: http2.SettingMaxFrameSize, Val: http2MaxFrameLen, }} // TODO(zhaoq): Have a better way to signal "no limit" because 0 is // permitted in the HTTP2 spec. maxStreams := config.MaxStreams if maxStreams == 0 { maxStreams = math.MaxUint32 } else { isettings = append(isettings, http2.Setting{ ID: http2.SettingMaxConcurrentStreams, Val: maxStreams, }) } dynamicWindow := true iwz := int32(initialWindowSize) if config.InitialWindowSize >= defaultWindowSize { iwz = config.InitialWindowSize dynamicWindow = false } icwz := int32(initialWindowSize) if config.InitialConnWindowSize >= defaultWindowSize { icwz = config.InitialConnWindowSize dynamicWindow = false } if iwz != defaultWindowSize { isettings = append(isettings, http2.Setting{ ID: http2.SettingInitialWindowSize, Val: uint32(iwz)}) } if config.MaxHeaderListSize != nil { isettings = append(isettings, http2.Setting{ ID: http2.SettingMaxHeaderListSize, Val: *config.MaxHeaderListSize, }) } if config.HeaderTableSize != nil { isettings = append(isettings, http2.Setting{ ID: http2.SettingHeaderTableSize, Val: *config.HeaderTableSize, }) } if err := framer.fr.WriteSettings(isettings...); err != nil { return nil, connectionErrorf(false, err, "transport: %v", err) } // Adjust the connection flow control window if needed. if delta := uint32(icwz - defaultWindowSize); delta > 0 { if err := framer.fr.WriteWindowUpdate(0, delta); err != nil { return nil, connectionErrorf(false, err, "transport: %v", err) } }
null
2
{ "advantage_score_max": 7.165688991546631, "advantage_score_mean": 2.712747812271118, "advantage_score_min": 1.1274163722991943, "advantage_score_std": 1.7536367177963257, "advantage_scores": [ 7.165688991546631, 6.8225483894348145, 4.745067119598389, 4.468469142913818, 3.60060453414917, 2.8689844608306885, 2.4674394130706787, 2.4180002212524414, 2.368398666381836, 2.305830240249634, 2.2994959354400635, 2.2540109157562256, 1.527522325515747, 1.4714856147766113, 1.4511713981628418, 1.3221036195755005, 1.267162561416626, 1.167163610458374, 1.1363921165466309, 1.1274163722991943 ], "baseline_doc_loss": 1.2850700616836548, "baseline_truncated": false, "doc_advantage_score": 37.41855239868164, "length_change_ratio": 0.9793103448275862, "net_length_change_chars": -6, "original_sentences_length_chars": 290, "replacement_paraphrases_length_chars": 284, "sentences_perturbed": 2, "target_doc_loss": 0.03434312716126442, "target_truncated": false, "threshold_passing_sentences": 20, "total_doc_length_chars": 6796, "total_sentences": 39, "truncated": false }
# # fontconfig/fc-lang/es.orth # # Copyright © 2002 Keith Packard # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of the author(s) not be used in # advertising or publicity pertaining to distribution of the software without # specific, written prior permission. The authors do not guarantee that this software is suitable for any particular use or application. It # is provided "as is" without express or implied warranty. # # THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO # EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR # CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, # DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. # # Spanish (ES) # # Sources: # www.evertype.com # www.eki.ee/letter # 0041-005a 0061-007a #00A1 # INVERTED EXCLAMATION MARK #00BF # INVERTED QUESTION MARK 00C1 # LATIN CAPITAL LETTER A WITH ACUTE #00C7 # LATIN CAPITAL LETTER C WITH CEDILLA important @eki.ee 00C9 # LATIN CAPITAL LETTER E WITH ACUTE 00CD # LATIN CAPITAL LETTER I WITH ACUTE 00D1 # LATIN CAPITAL LETTER N WITH TILDE 00D3 # LATIN CAPITAL LETTER O WITH ACUTE 00DA # LATIN CAPITAL LETTER U WITH ACUTE 00DC # LATIN CAPITAL LETTER U WITH DIAERESIS 00E1 # LATIN SMALL LETTER A WITH ACUTE #00E7 # LATIN SMALL LETTER C WITH CEDILLA important @eki.ee 00E9 # LATIN SMALL LETTER E WITH ACUTE 00ED # LATIN SMALL LETTER I WITH ACUTE 00F1 # LATIN SMALL LETTER N WITH TILDE 00F3 # LATIN SMALL LETTER O WITH ACUTE 00FA # LATIN SMALL LETTER U WITH ACUTE 00FC # LATIN SMALL LETTER U WITH DIAERESIS #
null
1
{ "advantage_score_max": 2.4751503467559814, "advantage_score_mean": 2.4751503467559814, "advantage_score_min": 2.4751503467559814, "advantage_score_std": 0, "advantage_scores": [ 2.4751503467559814 ], "baseline_doc_loss": 0.4847434163093567, "baseline_truncated": false, "doc_advantage_score": 1.593599796295166, "length_change_ratio": 1.053763440860215, "net_length_change_chars": 5, "original_sentences_length_chars": 93, "replacement_paraphrases_length_chars": 98, "sentences_perturbed": 1, "target_doc_loss": 0.30418139696121216, "target_truncated": false, "threshold_passing_sentences": 1, "total_doc_length_chars": 2029, "total_sentences": 5, "truncated": false }
[7DE11F53-74872F9D-C:45] Name=Wave Race 64 (U) (V1.0) Cheat0="Misses Don't Count",801C27CF 0000 Cheat1="Infinite Time Stunt Mode",801C295E 00FF Cheat2="Super Speed",801C27C7 0005,D0154051 0010,801C27C7 0020 Cheat3="99 Points",801CB0A3 0063 Cheat4="Infinite Course Out Time",801C2983 00FF Cheat5="Maximum Power\Player 1",801C27C7 0005 Cheat6="Maximum Power\Player 2",801C2DEA 0005,801C308A 0005 Cheat7="Only Play Glacier Coast",800DA753 0007 Cheat8="Open\Difficulty Option",801CAFE0 00?? $01 Hard,$02 Expert,$03 Hard & Expert,$10 Dolphin,$11 Dolphin & Hard,$12 Dolphin & Expert,$13 Dolphin & Hard & Expert? Cheat9_O=$02 Sunset Bay,$03 Above & Drake Lake,$04 All Above & Marine Fortress,$05 All Above & Port Blue,$06 All Above & Southern Island,$0D All Above & Twilight City,$16 All Above & Glacier Coast Cheat10="Open\Course Option",801CAFEB 00?? Cheat10_N=This works in all modes except for Championship Mode. Cheat10_O=$00 Dolphin Park,$01 Sunny Beach,$02 Sunset Bay,$03 Drake Lake,$04 Marian Fortress,$05 Port Blue,$06 Twilight City,$07 Glacier Coast,$08 Southern Island Cheat11="Always First Place",801C269F 0000
null
1
{ "advantage_score_max": 1.2819589376449585, "advantage_score_mean": 1.2819589376449585, "advantage_score_min": 1.2819589376449585, "advantage_score_std": 0, "advantage_scores": [ 1.2819589376449585 ], "baseline_doc_loss": 2.292962074279785, "baseline_truncated": false, "doc_advantage_score": 1.059596300125122, "length_change_ratio": 0.7151515151515152, "net_length_change_chars": -47, "original_sentences_length_chars": 165, "replacement_paraphrases_length_chars": 118, "sentences_perturbed": 1, "target_doc_loss": 2.1639959812164307, "target_truncated": false, "threshold_passing_sentences": 1, "total_doc_length_chars": 1163, "total_sentences": 5, "truncated": false }
--- title: "Accessibility Checker Rule Help: WCAG20_Frame_HasTitle" --- import "../../../styles/ToolHelp.scss" import { CodeSnippet, Tag } from "carbon-components-react"; <div className="toolHelp"> <Row> <Column colLg={16} colMd={8} colSm={4} className="toolHead"> ### Inline frame does not have a title <div id="locLevel"></div> Inline frames must have a unique, non-empty title </Column> </Row> <Row> <Column colLg={11} colMd={5} colSm={4} className="toolMain"> ### Why is this important? An inline frame’s title provides a label for the frame that describes its content to the user. With this information a user can determine which frame to enter and explore in detail. A descriptive title helps users understand the purpose of the frame and decide whether to interact with it, especially when navigating with assistive technologies. For example: <CodeSnippet type="multi" light={true}>&lt;iframe src="https://cloudstorage.html" id="adiframe" name="adiframe" title="Cloud Storage"&gt; &lt;a href="storage-ad.html"&gt; Cloud storage&lt;/a&gt; &lt;/iframe&gt;</CodeSnippet> </Column> <Column colLg={5} colMd={3} colSm={4} className="toolLeft"> ### About this requirement [IBM 4.1.2 Name, Role, Value](http://www.ibm.com/able/guidelines/ci162/name_role_value.html) [WCAG 2.1 technique H64](https://www.w3.org/WAI/WCAG21/Techniques/html/H64) ### Who does this affect? * Blind people using screen readers * People who physically cannot use a pointing device * People with dexterity impairment who navigate web pages with a keyboard </Column> </Row> </div> export default ({ children, _frontmatter }) => (<React.Fragment>{children}</React.Fragment>)
null
1
{ "advantage_score_max": 1.4604026079177856, "advantage_score_mean": 1.4604026079177856, "advantage_score_min": 1.4604026079177856, "advantage_score_std": 0, "advantage_scores": [ 1.4604026079177856 ], "baseline_doc_loss": 1.952056646347046, "baseline_truncated": false, "doc_advantage_score": 1.938905954360962, "length_change_ratio": 0.9819277108433735, "net_length_change_chars": -3, "original_sentences_length_chars": 166, "replacement_paraphrases_length_chars": 163, "sentences_perturbed": 1, "target_doc_loss": 1.0067825317382812, "target_truncated": false, "threshold_passing_sentences": 1, "total_doc_length_chars": 1682, "total_sentences": 6, "truncated": false }
package org.apache.helix.controller.stages; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file distributed with this work for additional information about copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import java.util.HashMap; import java.util.Map; import org.apache.helix.HelixDefinedState; import org.apache.helix.HelixManager; import org.apache.helix.controller.LogUtil; import org.apache.helix.controller.common.PartitionStateMap; import org.apache.helix.controller.dataproviders.ResourceControllerDataProvider; import org.apache.helix.controller.pipeline.AbstractAsyncBaseStage; import org.apache.helix.controller.pipeline.AsyncWorkerType; import org.apache.helix.model.BuiltInStateModelDefinitions; import org.apache.helix.model.IdealState; import org.apache.helix.model.MaintenanceSignal; import org.apache.helix.model.Partition; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class MaintenanceRecoveryStage extends AbstractAsyncBaseStage { private static Logger LOG = LoggerFactory.getLogger(MaintenanceRecoveryStage.class); @Override public AsyncWorkerType getAsyncWorkerType() { return AsyncWorkerType.MaintenanceRecoveryWorker; } @Override public void execute(final ClusterEvent event) throws Exception { // Check the cache is there ResourceControllerDataProvider cache = event.getAttribute(AttributeName.ControllerDataProvider.name()); if (cache == null) { return; } // Check if the maintenance signal has been changed during this pipeline run // If true, skip this stage because the Controller already changed the signal // The flag will be flipped in the next ReadClusterDataStage() if (cache.hasMaintenanceSignalChanged()) { return; } // Check for the maintenance signal // If it was entered manually or the signal is null (which shouldn't happen), skip this stage MaintenanceSignal maintenanceSignal = cache.getMaintenanceSignal(); if (maintenanceSignal == null || maintenanceSignal .getTriggeringEntity() != MaintenanceSignal.TriggeringEntity.CONTROLLER) { return; } HelixManager manager = event.getAttribute(AttributeName.helixmanager.name()); if (manager == null || !manager.isConnected()) { LogUtil.logInfo(LOG, _eventId, "MaintenanceRecoveryStage failed due to HelixManager being null or not connected!"); return; } // At this point, the cluster entered maintenance mode automatically. Retrieve the // auto-triggering reason MaintenanceSignal.AutoTriggerReason internalReason = maintenanceSignal.getAutoTriggerReason(); boolean shouldExitMaintenance; String reason; switch (internalReason) { case MAX_OFFLINE_INSTANCES_EXCEEDED: // Check on the number of offline/disabled instances int numOfflineInstancesForAutoExit = cache.getClusterConfig().getNumOfflineInstancesForAutoExit(); if (numOfflineInstancesForAutoExit < 0) { return; // Config is not set, no auto-exit } // Get the count of all instances that are either offline or disabled int offlineDisabledCount = cache.getAllInstances().size() - cache.getEnabledLiveInstances().size(); shouldExitMaintenance = offlineDisabledCount <= numOfflineInstancesForAutoExit; reason = String.format( "Auto-exiting maintenance mode for cluster %s; Num. of offline/disabled instances is %d, less than or equal to the exit threshold %d", event.getClusterName(), offlineDisabledCount, numOfflineInstancesForAutoExit); break; case MAX_PARTITION_PER_INSTANCE_EXCEEDED: IntermediateStateOutput intermediateStateOutput = event.getAttribute(AttributeName.INTERMEDIATE_STATE.name()); if (intermediateStateOutput == null) { return; } shouldExitMaintenance = !violatesMaxPartitionsPerInstance(cache, intermediateStateOutput); reason = String.format( "Auto-exiting maintenance mode for cluster %s; All instances have fewer or equal number of partitions than maxPartitionsPerInstance threshold.", event.getClusterName()); break; default: shouldExitMaintenance = false; reason = ""; } if (shouldExitMaintenance) { // The cluster has recovered sufficiently, so proceed to exit the maintenance mode by removing // MaintenanceSignal. AutoTriggerReason won't be recorded manager.getClusterManagmentTool().autoEnableMaintenanceMode(manager.getClusterName(), false, reason, internalReason); cache.setMaintenanceSignalChanged(); // Set the flag so we do not double enable/disable LogUtil.logInfo(LOG, _eventId, reason); } } /** * Check that the intermediateStateOutput assignment does not violate maxPartitionPerInstance * threshold. * @param cache * @param intermediateStateOutput * @return true if violation is found, false otherwise. */ private boolean violatesMaxPartitionsPerInstance(ResourceControllerDataProvider cache, IntermediateStateOutput intermediateStateOutput) { int maxPartitionPerInstance = cache.getClusterConfig().getMaxPartitionsPerInstance(); if (maxPartitionPerInstance <= 0) { // Config is not set; return return false; } Map<String, PartitionStateMap> resourceStatesMap = intermediateStateOutput.getResourceStatesMap(); Map<String, Integer> instancePartitionCounts = new HashMap<>(); for (String resource : resourceStatesMap.keySet()) { IdealState idealState = cache.getIdealState(resource); if (idealState != null && idealState.getStateModelDefRef().equals(BuiltInStateModelDefinitions.Task.name())) { // Ignore task here. Task has its own throttling logic continue; } PartitionStateMap partitionStateMap = resourceStatesMap.get(resource); Map<Partition, Map<String, String>> stateMaps = partitionStateMap.getStateMap(); for (Partition p : stateMaps.keySet()) { Map<String, String> stateMap = stateMaps.get(p); for (String instance : stateMap.keySet()) { // If this replica is in DROPPED state, do not count it in the partition count since it is // to be dropped String state = stateMap.get(instance); if (state.equals(HelixDefinedState.DROPPED.name())) { continue; } if (!instancePartitionCounts.containsKey(instance)) { instancePartitionCounts.put(instance, 0); } // Number of replicas (from different partitions) held in this instance int partitionCount = instancePartitionCounts.get(instance); partitionCount++; if (partitionCount > maxPartitionPerInstance) { // There exists an instance whose intermediate state assignment violates the maximum // partitions per instance threshold, return! return true; } instancePartitionCounts.put(instance, partitionCount); } } } // No violation found return false; } }
null
1
{ "advantage_score_max": 5.731715202331543, "advantage_score_mean": 2.945661783218384, "advantage_score_min": 1.175071358680725, "advantage_score_std": 1.9940117597579956, "advantage_scores": [ 5.731715202331543, 1.9301987886428833, 1.175071358680725 ], "baseline_doc_loss": 0.9748277068138123, "baseline_truncated": false, "doc_advantage_score": 1.0310097932815552, "length_change_ratio": 0.9090909090909091, "net_length_change_chars": -10, "original_sentences_length_chars": 110, "replacement_paraphrases_length_chars": 100, "sentences_perturbed": 1, "target_doc_loss": 0.9455077052116394, "target_truncated": false, "threshold_passing_sentences": 3, "total_doc_length_chars": 7746, "total_sentences": 15, "truncated": false }
// Copyright 2019 The Cockroach Authors. // // Use of this software is governed by the Business Source License // included in the file licenses/BSL.txt. // // As of the Change Date specified in that file, in accordance with // the Business Source License, use of this software will be governed // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. package pgerror import ( "bytes" "fmt" "strings" "github.com/cockroachdb/cockroach/pkg/sql/pgwire/pgcode" "github.com/cockroachdb/errors" ) // Flatten converts any error into a pgerror with fields filled in. As // the name implies, the details from the chain of causes is projected // into a single struct. This is useful in at least two places: // // - to generate Error objects suitable for 19.1 nodes, which // only recognize this type of payload. // - to generate an error packet on pgwire. // // Additionally, this can be used in the remainder of the code // base when an Error object is expected, until that code // is updated to use the errors library directly. // // Flatten() returns a nil ptr if err was nil to start with. func Flatten(err error) *Error { if err == nil { return nil } resErr := &Error{ Code: GetPGCode(err).String(), Message: err.Error(), Severity: GetSeverity(err), ConstraintName: GetConstraintName(err), } // Populate the source field if available. if file, line, fn, ok := errors.GetOneLineSource(err); ok { resErr.Source = &Error_Source{File: file, Line: int32(line), Function: fn} } // Populate the details and hints. resErr.Hint = errors.FlattenHints(err) resErr.Detail = errors.FlattenDetails(err) // Add a useful error prefix if not already there. switch resErr.Code { case pgcode.Internal.String(): // The string "internal error" clarifies the nature of the error // to users, and is also introduced for compatibility with // previous CockroachDB versions. if !strings.HasPrefix(resErr.Message, InternalErrorPrefix) { resErr.Message = InternalErrorPrefix + ": " + resErr.Message } // If the error flows towards a human user and does not get // sent via telemetry, we want to empower the user to // file a moderately useful error reporso include the deepest stack trace for context and debugging.ce. resErr.Detail += getInnerMostStackTraceAsDetail(err) case pgcode.SerializationFailure.String(): // The string "restart transaction" is asserted by test code. This // can be changed if/when test code learns to use the 40001 code // (or the errors library) instead. // // TODO(knz): investigate whether 3rd party frameworks parse this // string instead of using the pg code to determine whether to // retry. if !strings.HasPrefix(resErr.Message, TxnRetryMsgPrefix) { resErr.Message = TxnRetryMsgPrefix + ": " + resErr.Message } } return resErr } func getInnerMostStackTraceAsDetail(err error) string { if c := errors.UnwrapOnce(err); c != nil { s := getInnerMostStackTraceAsDetail(c) if s != "" { return s } } // Fall through: there is no stack trace so far. if st := errors.GetReportableStackTrace(err); st != nil { var t bytes.Buffer t.WriteString("stack trace:\n") for i := len(st.Frames) - 1; i >= 0; i-- { f := st.Frames[i] fmt.Fprintf(&t, "%s:%d: %s()\n", f.Filename, f.Lineno, f.Function) } return t.String() } return "" } // InternalErrorPrefix is prepended on internal errors. const InternalErrorPrefix = "internal error" // TxnRetryMsgPrefix is the prefix inserted in an error message when flattened const TxnRetryMsgPrefix = "restart transaction" // GetPGCode retrieves the error code for an error. func GetPGCode(err error) pgcode.Code { return GetPGCodeInternal(err, ComputeDefaultCode) }
null
2
{ "advantage_score_max": 1.8230938911437988, "advantage_score_mean": 1.3413349390029907, "advantage_score_min": 1.125801920890808, "advantage_score_std": 0.2516879439353943, "advantage_scores": [ 1.8230938911437988, 1.3409466743469238, 1.2461841106414795, 1.1706478595733643, 1.125801920890808 ], "baseline_doc_loss": 1.3967878818511963, "baseline_truncated": false, "doc_advantage_score": 1.0435208082199097, "length_change_ratio": 1.0298507462686568, "net_length_change_chars": 8, "original_sentences_length_chars": 268, "replacement_paraphrases_length_chars": 276, "sentences_perturbed": 2, "target_doc_loss": 1.3385337591171265, "target_truncated": false, "threshold_passing_sentences": 5, "total_doc_length_chars": 3750, "total_sentences": 22, "truncated": false }
/* * Copyright 2008 Juergen Beisert, kernel@pengutronix.de * Copyright 2009 Sascha Hauer, s.hauer@pengutronix.de * Copyright 2012 Philippe Retornaz, philippe.retornaz@epfl.ch * * Initial development of this code was funded by * Phytec Messtechnik GmbH, http://www.phytec.de * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>. */ #include <linux/module.h> #include <linux/device.h> #include <linux/of.h> #include <linux/mfd/mc13xxx.h> #include <linux/slab.h> #include <sound/core.h> #include <sound/control.h> #include <sound/pcm.h> #include <sound/soc.h> #include <sound/initval.h> #include <sound/soc-dapm.h> #include <linux/regmap.h> #include "mc13783.h" #define AUDIO_RX0_ALSPEN (1 << 5) #define AUDIO_RX0_ALSPSEL (1 << 7) #define AUDIO_RX0_ADDCDC (1 << 21) #define AUDIO_RX0_ADDSTDC (1 << 22) #define AUDIO_RX0_ADDRXIN (1 << 23) #define AUDIO_RX1_PGARXEN (1 << 0); #define AUDIO_RX1_PGASTEN (1 << 5) #define AUDIO_RX1_ARXINEN (1 << 10) #define AUDIO_TX_AMC1REN (1 << 5) #define AUDIO_TX_AMC1LEN (1 << 7) #define AUDIO_TX_AMC2EN (1 << 9) #define AUDIO_TX_ATXINEN (1 << 11) #define AUDIO_TX_RXINREC (1 << 13) #define SSI_NETWORK_CDCTXRXSLOT(x) (((x) & 0x3) << 2) #define SSI_NETWORK_CDCTXSECSLOT(x) (((x) & 0x3) << 4) #define SSI_NETWORK_CDCRXSECSLOT(x) (((x) & 0x3) << 6) #define SSI_NETWORK_CDCRXSECGAIN(x) (((x) & 0x3) << 8) #define SSI_NETWORK_CDCSUMGAIN(x) (1 << 10) #define SSI_NETWORK_CDCFSDLY(x) (1 << 11) #define SSI_NETWORK_DAC_SLOTS_8 (1 << 12) #define SSI_NETWORK_DAC_SLOTS_4 (2 << 12) #define SSI_NETWORK_DAC_SLOTS_2 (3 << 12) #define SSI_NETWORK_DAC_SLOT_MASK (3 << 12) #define SSI_NETWORK_DAC_RXSLOT_0_1 (0 << 14) #define SSI_NETWORK_DAC_RXSLOT_2_3 (1 << 14) #define SSI_NETWORK_DAC_RXSLOT_4_5 (2 << 14) #define SSI_NETWORK_DAC_RXSLOT_6_7 (3 << 14) #define SSI_NETWORK_DAC_RXSLOT_MASK (3 << 14) #define SSI_NETWORK_STDCRXSECSLOT(x) (((x) & 0x3) << 16) #define SSI_NETWORK_STDCRXSECGAIN(x) (((x) & 0x3) << 18) #define SSI_NETWORK_STDCSUMGAIN (1 << 20) /* * MC13783_AUDIO_CODEC and MC13783_AUDIO_DAC mostly share the same * register layout */ #define AUDIO_SSI_SEL (1 << 0) #define AUDIO_CLK_SEL (1 << 1) #define AUDIO_CSM (1 << 2) #define AUDIO_BCL_INV (1 << 3) #define AUDIO_CFS_INV (1 << 4) #define AUDIO_CFS(x) (((x) & 0x3) << 5) #define AUDIO_CLK(x) (((x) & 0x7) << 7) #define AUDIO_C_EN (1 << 11) #define AUDIO_C_CLK_EN (1 << 12) #define AUDIO_C_RESET (1 << 15) #define AUDIO_CODEC_CDCFS8K16K (1 << 10) #define AUDIO_DAC_CFS_DLY_B (1 << 10) struct mc13783_priv { struct mc13xxx *mc13xxx; struct regmap *regmap; enum mc13783_ssi_port adc_ssi_port; enum mc13783_ssi_port dac_ssi_port; }; /* Mapping between sample rates and register value */ static unsigned int mc13783_rates[] = { 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 96000 }; static int mc13783_pcm_hw_params_dac(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { struct snd_soc_component *component = dai->component; unsigned int rate = params_rate(params); int i; for (i = 0; i < ARRAY_SIZE(mc13783_rates); i++) { if (rate == mc13783_rates[i]) { snd_soc_component_update_bits(component, MC13783_AUDIO_DAC, 0xf << 17, i << 17); return 0; } } return -EINVAL; } static int mc13783_pcm_hw_params_codec(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { struct snd_soc_component *component = dai->component; unsigned int rate = params_rate(params); unsigned int val; switch (rate) { case 8000: val = 0; break; case 16000: val = AUDIO_CODEC_CDCFS8K16K; break; default: return -EINVAL; } snd_soc_component_update_bits(component, MC13783_AUDIO_CODEC, AUDIO_CODEC_CDCFS8K16K, val); return 0; } static int mc13783_pcm_hw_params_sync(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) return mc13783_pcm_hw_params_dac(substream, params, dai); else return mc13783_pcm_hw_params_codec(substream, params
null
1
{ "advantage_score_max": 3.3904829025268555, "advantage_score_mean": 3.3904829025268555, "advantage_score_min": 3.3904829025268555, "advantage_score_std": 0, "advantage_scores": [ 3.3904829025268555 ], "baseline_doc_loss": 0.769297182559967, "baseline_truncated": false, "doc_advantage_score": 1.956228256225586, "length_change_ratio": 0.6118721461187214, "net_length_change_chars": -85, "original_sentences_length_chars": 219, "replacement_paraphrases_length_chars": 134, "sentences_perturbed": 1, "target_doc_loss": 0.3932553231716156, "target_truncated": false, "threshold_passing_sentences": 1, "total_doc_length_chars": 4807, "total_sentences": 5, "truncated": false }
openapi: 3.0.2 info: title: ... version: 0.0.0 paths: /foo: get: responses: 200: description: ... content: application/json: schema: type: array items: $ref: '#/components/schemas/Bar' components: schemas: Bar: type: string enum: - Foo - Bar - Foo Bar - Foo-Bar - 1Foo - Bar - ' Foo' - ' Foo ' - _Foo_
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
method bar()java.lang.Integer in class Foo has a different result type in new version, where it is java.lang.Long rather than java.lang.Integer
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
#-- # # Author:: Nathaniel Talbott. # Copyright:: (c) 2000-2002 Nathaniel Talbott. All rights reserved. All rights reserved. # License:: Ruby license. require 'test/unit/util/procwrapper' module Test module Unit module Util # This is a utility class that allows anything mixing # it in to notify a set of listeners about interesting # events. module Observable # We use this for defaults since nil might mean something NOTHING = "NOTHING/#{__id__}" # Adds the passed proc as a listener on the # channel indicated by channel_name. listener_key # is used to remove the listener later; if none is # specified, the proc itself is used. # # Whatever is used as the listener_key is # returned, making it very easy to use the proc # itself as the listener_key: # # listener = add_listener("Channel") { ... } # remove_listener("Channel", listener) def add_listener(channel_name, listener_key=NOTHING, &listener) # :yields: value unless(block_given?) raise ArgumentError.new("No callback was passed as a listener") end key = listener_key if (listener_key == NOTHING) listener_key = listener key = ProcWrapper.new(listener) end channels[channel_name] ||= {} channels[channel_name][key] = listener return listener_key end # Removes the listener indicated by listener_key # from the channel indicated by # channel_name. Returns the registered proc, or # nil if none was found. def remove_listener(channel_name, listener_key) channel = channels[channel_name] return nil unless (channel) key = listener_key if (listener_key.iis a Proc object or responds to call?el.has_key?(key)) return channel.delete(key) end return nil end # Calls all the procs registered on the channel # indicated by channel_name. If value is # specified, it is passed in to the procs, # otherwise they are called with no arguments. # #-- # # Perhaps this should be private? Would it ever # make sense for an external class to call this # method directly? def notify_listeners(channel_name, *arguments) channel = channels[channel_name] return 0 unless (channel) listeners = channel.values listeners.each { |listener| listener.call(*arguments) } return listeners.size end private def channels @channels ||= {} return @channels end end end end end
null
2
{ "advantage_score_max": 8.054290771484375, "advantage_score_mean": 4.9311394691467285, "advantage_score_min": 1.1696248054504395, "advantage_score_std": 2.8466689586639404, "advantage_scores": [ 8.054290771484375, 5.569502830505371, 1.1696248054504395 ], "baseline_doc_loss": 1.2430585622787476, "baseline_truncated": false, "doc_advantage_score": 1.0582724809646606, "length_change_ratio": 0.6666666666666666, "net_length_change_chars": -52, "original_sentences_length_chars": 156, "replacement_paraphrases_length_chars": 104, "sentences_perturbed": 2, "target_doc_loss": 1.1746110916137695, "target_truncated": false, "threshold_passing_sentences": 3, "total_doc_length_chars": 2867, "total_sentences": 17, "truncated": false }
(executable (name main) (libraries num) (modes native js) (flags (:standard -linkall -w -3-7-33-35-37 -safe-string -no-strict-sequence)) ) (rule (target main.referencejs) (deps main.bc.js) (action (with-stdout-to %{target} (run node ./main.bc.js)))) (rule (target main.reference) (deps main.exe) (action (with-stdout-to %{target} (run ./main.exe)))) (rule (alias runtest) (deps main.reference main.referencejs) (action (diff main.reference main.referencejs)))
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
/* * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. DO NOT MODIFY OR DELETE COPYRIGHT STATEMENTS OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package jdk.internal.net.http; import java.util.Iterator; import java.util.concurrent.Flow; import jdk.internal.net.http.common.Demand; import jdk.internal.net.http.common.SequentialScheduler; /** * A Publisher that publishes items obtained from the given Iterable. Each new * subscription gets a new Iterator. */ class PullPublisher<T> implements Flow.Publisher<T> { // Only one of `iterable` and `throwable` can be non-null. throwable is // non-null when an error has been encountered, by the creator of // PullPublisher, while subscribing the subscriber, but before subscribe has // completed. private final Iterable<T> iterable; private final Throwable throwable; PullPublisher(Iterable<T> iterable, Throwable throwable) { this.iterable = iterable; this.throwable = throwable; } PullPublisher(Iterable<T> iterable) { this(iterable, null); } @Override public void subscribe(Flow.Subscriber<? super T> subscriber) { Subscription sub; if (throwable != null) { assert iterable == null : "non-null iterable: " + iterable; sub = new Subscription(subscriber, null, throwable); } else { assert throwable == null : "non-null exception: " + throwable; sub = new Subscription(subscriber, iterable.iterator(), null); } subscriber.onSubscribe(sub); if (throwable != null) { sub.pullScheduler.runOrSchedule(); } } private class Subscription implements Flow.Subscription { private final Flow.Subscriber<? super T> subscriber; private final Iterator<T> iter; private volatile boolean completed; private volatile boolean cancelled; private volatile Throwable error; final SequentialScheduler pullScheduler = new SequentialScheduler(new PullTask()); private final Demand demand = new Demand(); Subscription(Flow.Subscriber<? super T> subscriber, Iterator<T> iter, Throwable throwable) { this.subscriber = subscriber; this.iter = iter; this.error = throwable; } final class PullTask extends SequentialScheduler.CompleteRestartableTask { @Override protected void run() { if (completed || cancelled) { return; } Throwable t = error; if (t != null) { completed = true; pullScheduler.stop(); subscriber.onError(t); return; } while (demand.tryDecrement() && !cancelled) { T next; try { if (!iter.hasNext()) { break; } next = iter.next(); } catch (Throwable t1) { completed = true; pullScheduler.stop(); subscriber.onError(t1); return; } subscriber.onNext(next); } if (!iter.hasNext() && !cancelled) { completed = true; pullScheduler.stop(); subscriber.onComplete(); } } } @Override public void request(long n) { if (cancelled) return; // no-op if (n <= 0) { error = new IllegalArgumentException("non-positive subscription request: " + n); } else { demand.increase(n); } pullScheduler.runOrSchedule(); } @Override public void cancel() { cancelled = true; } } }
null
1
{ "advantage_score_max": 7.261046886444092, "advantage_score_mean": 3.3686699867248535, "advantage_score_min": 1.2517017126083374, "advantage_score_std": 2.3825769424438477, "advantage_scores": [ 7.261046886444092, 3.3465588092803955, 1.615373134613037, 1.2517017126083374 ], "baseline_doc_loss": 0.6103441715240479, "baseline_truncated": false, "doc_advantage_score": 1.1646641492843628, "length_change_ratio": 1.0317460317460319, "net_length_change_chars": 2, "original_sentences_length_chars": 63, "replacement_paraphrases_length_chars": 65, "sentences_perturbed": 1, "target_doc_loss": 0.5240516662597656, "target_truncated": false, "threshold_passing_sentences": 4, "total_doc_length_chars": 5144, "total_sentences": 17, "truncated": false }
/**mine.wxss**/ .userinfo { display: flex; flex-direction: column; align-items: center; background-color: #fff; margin-bottom: 20rpx; } .userinfo-avatar { width: 128rpx; height: 128rpx; margin: 30rpx; border-radius: 50%; } .userinfo-nickname { margin: 20rpx; color: #300e0e; } .userinfo-dig { margin: 15rpx auto; padding: 20rpx 25rpx; border-radius: 10rpx; background-color: #f85f48; color: #fff; letter-spacing: 1px; } .userinfo-desc { color: #bbb; font-size: 14rpx; margin-bottom: 20rpx; } .profile-wrapper, .account-wrapper { background-color: #fff; margin-bottom: 20rpx; } .profile, .account { display: flex; padding: 30rpx; align-items: center; flex-direction: row; border-bottom: 1rpx solid #f0f0f0; } .profile-item, .account-item { flex: 1; font-size: 24rpx; } .profile-arrow, .account-arrow { width: 32rpx; height: 32rpx; } .btn-quit { margin: 15rpx; }
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
// Copyright 2001-2019 Crytek GmbH / Crytek Group. All rights reserved. #pragma once #include <CrySerialization/yasli/Config.h> namespace yasli { class Archive; struct FileOpen { string* pathPointer; string path; string filter; string relativeToFolder; int flags; enum { STRIP_EXTENSION = 1 }; // filter is defined in the following format: // "All Images (*.bmp *.jpg *.tga);; Bitmap (*.bmp);; Targa (*.tga)" FileOpen(string& path, const char* filter, const char* relativeToFolder = "", int flags = 0) : pathPointer(&path) , filter(filter) , relativeToFolder(relativeToFolder) , flags(flags) { this->path = path; } FileOpen() : pathPointer(0), flags(0) { } FileOpen& operator=(const FileOpen& rhs) { path = rhs.path; flags = rhs.flags; if (rhs.pathPointer) { filter = rhs.filter; relativeToFolder = rhs.relativeToFolder; } return *this; } ~FileOpen() { if (pathPointer) *pathPointer = path; } void YASLI_SERIALIZE_METHOD(Archive& ar); }; bool YASLI_SERIALIZE_OVERRIDE(Archive& ar, FileOpen& value, const char* name, const char* label); } #if YASLI_INLINE_IMPLEMENTATION #include <CrySerialization/yasli/decorators/FileOpenImpl.h> #endif
null
0
{ "advantage_score_max": 0, "advantage_score_mean": 0, "advantage_score_min": 0, "advantage_score_std": 0, "advantage_scores": [], "baseline_doc_loss": 1.407963752746582, "baseline_truncated": false, "doc_advantage_score": 1.29257333278656, "length_change_ratio": 1, "net_length_change_chars": 0, "original_sentences_length_chars": 0, "replacement_paraphrases_length_chars": 0, "sentences_perturbed": 0, "target_doc_loss": 1.089271903038025, "target_truncated": false, "threshold_passing_sentences": 0, "total_doc_length_chars": 1209, "total_sentences": 3, "truncated": false }
/* * json_parser.c - JSON parser for TinyG * This file is part of the TinyG project * * Copyright (c) 2011 - 2015 Alden S. Hart, Jr. * * This file ("the software") is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2 as published by the * Free Software Foundation. You should have received a copy of the GNU General Public * License, version 2 along with the software. If not, see <http://www.gnu.org/licenses/>. * * As a special exception, you may use this file as part of a software library without * restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file alone does not make the resulting executable subject to the GNU General Public License. This exception does not * however invalidate any other reasons why the executable file might be covered by the * GNU General Public License. * * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT WITHOUT ANY * WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT * SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "tinyg.h" #include "config.h" // JSON sits on top of the config system #include "controller.h" #include "json_parser.h" #include "text_parser.h" #include "canonical_machine.h" #include "report.h" #include "util.h" #include "xio.h" // for char definitions #ifdef __cplusplus extern "C"{ #endif /**** Allocation ****/ jsSingleton_t js; /**** local scope stuff ****/ static stat_t _json_parser_kernal(char_t *str); static stat_t _get_nv_pair(nvObj_t *nv, char_t **pstr, int8_t *depth); static stat_t _normalize_json_string(char_t *str, uint16_t size); /**************************************************************************** * json_parser() - exposed part of JSON parser * _json_parser_kernal() * _normalize_json_string() * _get_nv_pair_strict() * * This is a dumbed down JSON parser to fit in limited memory with no malloc * or practical way to do recursion ("depth" tracks parent/child levels). * * This function will parse the following forms up to the JSON_MAX limits: * {"name":"value"} * {"name":12345} * {"name1":"value1", "n2":"v2", ... "nN":"vN"} * {"parent_name":""} * {"parent_name":{"name":"value"}} * {"parent_name":{"name1":"value1", "n2":"v2", ... "nN":"vN"}} * * "value" can be a string, number, true, false, or null (2 types) * * Numbers * - number values are not quoted and can start with a digit or -. * - numbers cannot start with + or . (period) * - exponentiated numbers are handled OK. * - hexadecimal or other non-decimal number bases are not supported * * The parser: * - extracts an array of one or more JSON object structs from the input string * - once the array is built it executes the object(s) in order in the array * - passes the executed array to the response handler to generate the response string * - returns the status and the JSON response string * * Separation of concerns * json_parser() is the only exposed part. It does parsing, display, and status reports. * _get_nv_pair() only does parsing and syntax; no semantic validation or group handling * _json_parser_kernal() does index validation and group handling and executes sets and gets * in an application agnostic way. It should work for other apps than TinyG */ void json_parser(char_t *str) { stat_t status = _json_parser_kernal(str); nv_print_list(status, TEXT_NO_PRINT, JSON_RESPONSE_FORMAT); sr_request_status_report(SR_IMMEDIATE_REQUEST); // generate incremental status report to show any changes } static stat_t _json_parser_kernal(char_t *str) { stat_t status; int8_t depth; nvObj_t *nv = nv_reset_nv_list(); // get a fresh nvObj list char_t group[GROUP_LEN+1] = {""}; // group identifier - starts as NUL int8_t i = NV_BODY_LEN; ritorno(_normalize_json_string(str, JSON_OUTPUT_STRING_MAX)); // return if error // parse the JSON command into the nv body do { if (--i == 0) return (STAT_JSON_TOO_MANY_PAIRS); // length error // Use relaxed parser. Will read eitehr strict or relaxed mode. To use strict-only parser refer // to build earlier than 407.03. Substitute _get_nv_pair_strict() for _get_nv_pair() if ((status = _get_nv_pair(nv, &str, &depth)) > STAT_EAGAIN) { // erred out return (status); } // propagate the group from previous NV pair (if relevant) if (group[0] != NUL) { strncpy(nv->group, group, GROUP_LEN); // copy the parent's group to this child } // validate the token and get the index if ((nv->index = nv_get_index(nv->group, nv->token)) == NO_MATCH) { return (STAT_UNRECOGNIZED_NAME); } if ((nv_index_is_group(nv->index)) && (nv_group_is_prefixed(nv->token))) { strncpy(group, nv->token, GROUP_LEN); // record the group ID } if ((nv = nv->nx) == NULL) return (STAT_JSON_TOO_MANY_PAIRS); // Not supposed to encounter a NULL } while (status != STAT_OK); // breaks when parsing is complete // execute the command nv = nv_body; if (nv->valuetype == TYPE_NULL){ // means GET the value ritorno(nv_get(nv)); // ritorno returns w/status on any errors } else { if (cm.machine_state == MACHINE_ALARM) return (STAT_MACHINE_ALARMED); ritorno(nv_set(nv)); // set value or call a function (e.g. gcode) nv_persist(nv); } return (STAT_OK); // only successful commands exit through this point } /* * _normalize_json_string - normalize a JSON string in place * * Validate string size limits, remove all whitespace and convert * to lower case, with the exception of gcode comments */ static stat_t _normalize_json_string(char_t *str, uint16_t size) { char_t *wr; // write pointer uint8_t in_comment = false; if (strlen(str) > size) return (STAT_INPUT_EXCEEDS_MAX_LENGTH); for (wr = str; *str != NUL; str++) { if (!in_comment) { // normal processing if (*str == '(') in_comment = true; if ((*str <= ' ') || (*str == DEL)) continue; // toss ctrls, WS & DEL *wr++ = tolower(*str); } else { // Gcode comment processing if
null
1
{ "advantage_score_max": 8.914192199707031, "advantage_score_mean": 3.829530715942383, "advantage_score_min": 1.2836629152297974, "advantage_score_std": 3.595399856567383, "advantage_scores": [ 8.914192199707031, 1.2907371520996094, 1.2836629152297974 ], "baseline_doc_loss": 1.7094807624816895, "baseline_truncated": false, "doc_advantage_score": 1.1181995868682861, "length_change_ratio": 0.9205298013245033, "net_length_change_chars": -24, "original_sentences_length_chars": 302, "replacement_paraphrases_length_chars": 278, "sentences_perturbed": 1, "target_doc_loss": 1.5287796258926392, "target_truncated": false, "threshold_passing_sentences": 3, "total_doc_length_chars": 6633, "total_sentences": 19, "truncated": false }
// Avisynth C Interface Version 0.20 // Copyright 2003 Kevin Atkinson // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit // http://www.gnu.org/copyleft/gpl.html . // // As a special exception, I give you permission to link to the // Avisynth C interface with independent modules that communicate with // the Avisynth C interface solely through the interfaces defined in // avisynth_c.h, regardless of the license terms of these independent // modules, and to copy and distribute the resulting combined work // under terms of your choice, provided that every copy of the // combined work is accompanied by a complete copy of the source code // of the Avisynth C interface and Avisynth itself (with the version // used to produce the combined work), being distributed under the // terms of the GNU General Public License plus this exception. An // independent module is a module which is not derived from or based // on Avisynth C Interface, such as 3rd-party filters, import and // export plugins, or graphical user interfaces. #ifndef AVS_ALIGNMENT_H #define AVS_ALIGNMENT_H // Functions and macros to help work with alignment requirements. // Tells if a number is a power of two. #define IS_POWER2(n) ((n) && !((n) & ((n) - 1))) // Tells if the pointer "ptr" is aligned to "align" bytes. #define IS_PTR_ALIGNED(ptr, align) (((uintptr_t)ptr & ((uintptr_t)(align-1))) == 0) // Rounds up the number "n" to the next greater multiple of "align" #define ALIGN_NUMBER(n, align) (((n) + (align)-1) & (~((align)-1))) // Rounds up the pointer address "ptr" to the next greater multiple of "align" #define ALIGN_POINTER(ptr, align) (((uintptr_t)(ptr) + (align)-1) & (~(uintptr_t)((align)-1))) #ifdef __cplusplus #include <cassert> #include <cstdlib> #include <cstdint> #include <avs/config.h> #if defined(MSVC) // needed for VS2013, otherwise C++11 'alignas' works #define avs_alignas(x) __declspec(align(x)) #else // assumes C++11 support #define avs_alignas(x) alignas(x) #endif template<typename T> static bool IsPtrAligned(T* ptr, size_t align) { assert(IS_POWER2(align)); return (bool)IS_PTR_ALIGNED(ptr, align); } template<typename T> static T AlignNumber(T n, T align) { assert(IS_POWER2(align)); return ALIGN_NUMBER(n, align); } template<typename T> static T* AlignPointer(T* ptr, size_t align) { assert(IS_POWER2(align)); return (T*)ALIGN_POINTER(ptr, align); } extern "C" { #else #include <stdlib.h> #endif // __cplusplus // Returns a new buffer that is at least the size "nbytes". The buffer will have an alignment of "align" bytes. // Returns NULL on error. On successful allocation, // the returned buffer must be freed using "avs_free". inline void* avs_malloc(size_t nbytes, size_t align) { if (!IS_POWER2(align)) return NULL; size_t offset = sizeof(void*) + align - 1; void *orig = malloc(nbytes + offset); if (orig == NULL) return NULL; void **aligned = (void**)(((uintptr_t)orig + (uintptr_t)offset) & (~(uintptr_t)(align-1))); aligned[-1] = orig; return aligned; } // Buffers allocated using "avs_malloc" must be freed // using "avs_free" instead of "free". inline void avs_free(void *ptr) { // Mirroring free()'s semantic requires us to accept NULLs if (ptr == NULL) return; free(((void**)ptr)[-1]); } #ifdef __cplusplus } // extern "C" // The point of these undef's is to force using the template functions // if we are in C++ mode. For C, the user can rely only on the macros. #undef IS_PTR_ALIGNED #undef ALIGN_NUMBER #undef ALIGN_POINTER #endif // __cplusplus #endif //AVS_ALIGNMENT_H
null
1
{ "advantage_score_max": 2.9778361320495605, "advantage_score_mean": 2.9758920669555664, "advantage_score_min": 2.9739480018615723, "advantage_score_std": 0.0019440650939941406, "advantage_scores": [ 2.9778361320495605, 2.9739480018615723 ], "baseline_doc_loss": 0.9577416181564331, "baseline_truncated": false, "doc_advantage_score": 1.5188020467758179, "length_change_ratio": 1.0851063829787233, "net_length_change_chars": 4, "original_sentences_length_chars": 47, "replacement_paraphrases_length_chars": 51, "sentences_perturbed": 1, "target_doc_loss": 0.6305901408195496, "target_truncated": false, "threshold_passing_sentences": 2, "total_doc_length_chars": 4237, "total_sentences": 18, "truncated": false }
@model SimpleSSO.DTO.System.AppDTO @{ ViewBag.Title = "SimpleSSO 授权"; } <style> body { background-color: #fff; } .box-header.with-border { background-color: #51b7ec; } .box.box-primary { border-top: 5px solid #51b7ec; } div > .pull-right { font-size: 14px; color: #fff; } </style> <div class="box box-success"> <div class="box-header with-border"> <h3 class="box-title"> <img class="profile-user-img img-responsive img-circle" src="~/Content/image/FreeBird.jpg" alt="User profile picture"> </h3> <div class="pull-right"> SimpleSSO授权登录 </div> </div> <div class="box-body"> <div style="margin:0% auto;width:370px"> <div class="box box-primary"> <div class="box-body box-profile"> <img class="profile-user-img img-responsive img-circle" src="../..@Model.IconUrl" alt="User profile picture"> <h3 class="profile-username text-center">@Model.Name</h3> <p class="text-muted text-center">一个友好的网站</p> <ul class="list-group list-group-unbordered"> <li class="list-group-item"> @if (ViewBag.Scope == "user_all") { <b style="color:red">&nbsp用户全部信息获取</b> <span class="pull-right" style="color:red">√&nbsp&nbsp&nbsp</span> } else { <b>&nbsp用户基础信息获取</b> <span class="pull-right">√&nbsp&nbsp&nbsp</span> } </li> <li class="list-group-item"> <b>&nbsp用户隐私查看</b> <span class="pull-right" style="color:red">X&nbsp&nbsp&nbsp</span> </li> <li class="list-group-item"> <b>&nbsp Scope</b> <span class="pull-right">@ViewBag.Scope</span> </li> </ul> <a href="@ViewBag.AccessUrl" class="btn btn-primary btn-block"><b>授权进入</b></a> </div> <!-- /.box-body --> </div> </div> </div> </div>
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
# Changes to Examples This log is meant to help example authors track changes to the main C example set. You can also use the GitHub logs. ## 2012-11-09 * All "LRU" changed to "load-balancing" in comments. * bstar: changed 'master' and 'slave' to 'active' and 'passive'. identity.c: updated 'Hello' address to 'PEER2' for greater clarity and descriptiveness. * rtpapa.c: example deleted as it shows an invalid socket combination. * rtmama.c: renamed to 'rtreq.c' for clarity. * rtreq.c: mostly rewritten * rtdealer.c: entirely rewritten
null
1
{ "advantage_score_max": 1.3583035469055176, "advantage_score_mean": 1.2810447216033936, "advantage_score_min": 1.20378577709198, "advantage_score_std": 0.0772588849067688, "advantage_scores": [ 1.3583035469055176, 1.20378577709198 ], "baseline_doc_loss": 2.9706320762634277, "baseline_truncated": false, "doc_advantage_score": 1.0192211866378784, "length_change_ratio": 1.0116279069767442, "net_length_change_chars": 1, "original_sentences_length_chars": 86, "replacement_paraphrases_length_chars": 87, "sentences_perturbed": 1, "target_doc_loss": 2.914609909057617, "target_truncated": false, "threshold_passing_sentences": 2, "total_doc_length_chars": 541, "total_sentences": 8, "truncated": false }
MODULE := src/emucore/tia/frame-manager MODULE_OBJS := \ src/emucore/tia/frame-manager/FrameManager.o \ src/emucore/tia/frame-manager/AbstractFrameManager.o \ src/emucore/tia/frame-manager/FrameLayoutDetector.o \ src/emucore/tia/frame-manager/JitterEmulation.o MODULE_DIRS += \ src/emucore/tia/frame-manager # Include common rules include $(srcdir)/common.rules
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
/** @file ikmeans.h ** @brief Integer K-Means clustering ** @author Brian Fulkerson ** @author Andrea Vedaldi **/ /* Copyright (C) 2007-12 Andrea Vedaldi and Brian Fulkerson. All rights reserved. This file is part of the VLFeat library and is made available under the terms of the BSD license (see the COPYING file). */ #ifndef VL_IKMEANS_H #define VL_IKMEANS_H #include "generic.h" #include "random.h" typedef vl_int32 vl_ikm_acc ; /**< IKM accumulator data type */ /** ------------------------------------------------------------------ ** @brief IKM algorithms **/ enum VlIKMAlgorithms { VL_IKM_LLOYD, /**< Lloyd algorithm */ VL_IKM_ELKAN /**< Elkan algorithm */ } ; /** ------------------------------------------------------------------ ** @brief IKM quantizer **/ typedef struct _VlIKMFilt { int M ; /**< data dimensionality */ int K ; /**< number of centers */ int method ; /**< Learning method */ int max_niters ; /**< Lloyd: maximum number of iterations */ int verb ; /**< verbosity level */ vl_ikm_acc *centers ; /**< centers */ vl_ikm_acc *inter_dist ; /**< centers inter-distances */ } VlIKMFilt ; /** @name Create and destroy ** @{ **/ VL_EXPORT VlIKMFilt *vl_ikm_new (int method) ; VL_EXPORT void vl_ikm_delete (VlIKMFilt *f) ; /** @} */ /** @name Process data ** @{ **/ VL_EXPORT void vl_ikm_init (VlIKMFilt *f, vl_ikm_acc const *centers, int M, int K) ; VL_EXPORT void vl_ikm_init_rand (VlIKMFilt *f, int M, int K) ; VL_EXPORT void vl_ikm_init_rand_data (VlIKMFilt *f, vl_uint8 const *data, int M, int N, int K) ; VL_EXPORT int vl_ikm_train (VlIKMFilt *f, vl_uint8 const *data, int N) ; VL_EXPORT void vl_ikm_push (VlIKMFilt *f, vl_uint *asgn, vl_uint8 const *data, int N) ; VL_EXPORT vl_uint vl_ikm_push_one (vl_ikm_acc const *centers, vl_uint8 const *data, int M, int K) ; /** @} */ /** @name Retrieve data and parameters ** @{ **/ VL_INLINE int vl_ikm_get_ndims (VlIKMFilt const *f) ; VL_INLINE int vl_ikm_get_K (VlIKMFilt const *f) ; VL_INLINE int vl_ikm_get_verbosity (VlIKMFilt const *f) ; VL_INLINE int vl_ikm_get_max_niters (VlIKMFilt const *f) ; VL_INLINE vl_ikm_acc const * vl_ikm_get_centers (VlIKMFilt const *f) ; /** @} */ /** @name Set parameters ** @{ **/ VL_INLINE void vl_ikm_set_verbosity (VlIKMFilt *f, int verb) ; VL_INLINE void vl_ikm_set_max_niters (VlIKMFilt *f, int max_niters) ; /** @} */ /** ------------------------------------------------------------------ ** @brief Get data dimensionality ** @param f IKM filter. ** @return data dimensionality. **/ VL_INLINE int vl_ikm_get_ndims (VlIKMFilt const* f) { return f-> M ; } /** ------------------------------------------------------------------ ** @brief Get the number of centers K ** @param f IKM filter. ** @return the total number of clusters K used in the IKM filter. This value represents how many cluster centers are maintained by the algorithm for partitioning the input data. ** @return verbosity level. **/ VL_INLINE int vl_ikm_get_verbosity (VlIKMFilt const* f) { return f-> verb ; } /** ------------------------------------------------------------------ ** @brief Get maximum number of iterations ** @param f IKM filter. ** @return maximum number of iterations. **/ VL_INLINE int vl_ikm_get_max_niters (VlIKMFilt const* f) { return f-> max_niters ; } /** ------------------------------------------------------------------ ** @brief Get maximum number of iterations ** @param f IKM filter. ** @return maximum number of iterations. **/ VL_INLINE vl_ikm_acc const * vl_ikm_get_centers (VlIKMFilt const* f) { return f-> centers ; } /** ------------------------------------------------------------------ ** @brief Set verbosity level ** @param f IKM filter. ** @param verb verbosity level. **/ VL_INLINE void vl_ikm_set_verbosity (VlIKMFilt *f, int verb) { f-> verb = VL_MAX(0,verb) ; } /** ------------------------------------------------------------------ ** @brief Set maximum number of iterations ** @param f IKM filter. ** @param max_niters maximum number of iterations. **/ VL_INLINE void vl_ikm_set_max_niters (VlIKMFilt *f, int max_niters) { f-> max_niters = max_niters ; } /* VL_IKMEANS_H */ #endif
null
1
{ "advantage_score_max": 2.8182532787323, "advantage_score_mean": 2.376110076904297, "advantage_score_min": 1.9339666366577148, "advantage_score_std": 0.4421433210372925, "advantage_scores": [ 2.8182532787323, 1.9339666366577148 ], "baseline_doc_loss": 0.6545531153678894, "baseline_truncated": false, "doc_advantage_score": 1.7100014686584473, "length_change_ratio": 0.7564102564102564, "net_length_change_chars": -57, "original_sentences_length_chars": 234, "replacement_paraphrases_length_chars": 177, "sentences_perturbed": 1, "target_doc_loss": 0.3827792704105377, "target_truncated": false, "threshold_passing_sentences": 2, "total_doc_length_chars": 4480, "total_sentences": 17, "truncated": false }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Smobiler.Core; using Smobiler.Core.Controls; using SMOWMS.CommLib; using SMOWMS.DTOs.Enum; using SMOWMS.DTOs.InputDTO; using SMOWMS.UI.AssetsManager; namespace SMOWMS.UI.Layout { ////ToolboxItem用于控制是否添加自定义控件到工具箱,true添加,false不添加 //[System.ComponentModel.ToolboxItem(true)] partial class frmAssInventoryLayout : Smobiler.Core.Controls.MobileUserControl { private AutofacConfig _autofacConfig = new AutofacConfig();//调用配置类 /// <summary> /// 编辑盘点单 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnEdit_Press(object sender, EventArgs e) { try { frmAssInventoryEdit edit = new frmAssInventoryEdit {IID = lblName.BindDataValue.ToString() }; Form.Show(edit, (MobileForm sender1, object args) => { if (edit.ShowResult == ShowResult.Yes) { ((frmAssInventory)Form).Bind(); } } ); } catch (Exception ex) { Toast(ex.Message); } } /// <summary> /// 删除盘点单 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnDelete_Press(object sender, EventArgs e) { try { MessageBox.Show("你确定要该盘点单吗?", "系统提醒", MessageBoxButtons.OKCancel, (object sender1, MessageBoxHandlerArgs args) => { try { if (args.Result == ShowResult.OK) //删除该盘点单 { ReturnInfo rInfo = _autofacConfig.AssInventoryService.DeleteInventory(lblName.BindDataValue.ToString()); if (rInfo.IsSuccess) { Toast("删除盘点单成功."); ((frmAssInventory)Form).Bind(); } else { throw new Exception(rInfo.ErrorInfo); } } } catch (Exception ex) { Form.Toast(ex.Message); } }); } catch (Exception ex) { Toast(ex.Message); } } /// <summary> /// 开始盘点 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnStart_Press(object sender, EventArgs e) { try { AddAIResultInputDto inputDto = new AddAIResultInputDto {IID = lblName.BindDataValue.ToString()}; var inventory=_autofacConfig.AssInventoryService.GetAssInventoryById(lblName.BindDataValue.ToString()); ReturnInfo returnInfo = _autofacConfig.AssInventoryService.AddAssInventoryResult(inputDto); if (returnInfo.IsSuccess) { frmAssInventory assets = (frmAssInventory)Form; assets.Bind(); frmAssInventoryResult result = new frmAssInventoryResult {IID = lblName.BindDataValue.ToString(), WAREID = inventory.WAREID,DepartmentId = inventory.SLID,typeId = inventory.TYPEID}; assets.Show(result, (MobileForm sender1, object args) => { if (result.ShowResult == ShowResult.Yes|| result.ShowResult == ShowResult.None) { assets.Bind(); } }); } else { Toast(returnInfo.ErrorInfo); } } catch (Exception ex) { Toast(ex.Message); } } /// <summary> /// 点击,查看盘点单详情 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void panel1_Press(object sender, EventArgs e) { try { var inventory = _autofacConfig.AssInventoryService.GetAssInventoryById(lblName.BindDataValue.ToString()); frmAssInventoryResult result = new frmAssInventoryResult { IID = lblName.BindDataValue.ToString(), WAREID = inventory.WAREID, DepartmentId = inventory.SLID, typeId = inventory.TYPEID}; frmAssInventory frmAssInventory = (frmAssInventory)Form; frmAssInventory.Show(result, (MobileForm sender1, object args) => { if (result.ShowResult == ShowResult.Yes|| result.ShowResult == ShowResult.None) { frmAssInventory.Bind(); } }); } catch (Exception ex) { Toast(ex.Message); } } /// <summary> /// 编辑盘点单 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ibEdit_Press(object sender, EventArgs e) { try { frmAssInventoryEdit edit = new frmAssInventoryEdit { IID = lblName.BindDataValue.ToString() }; Form.Show(edit, (MobileForm sender1, object args) => { if (edit.ShowResult == ShowResult.Yes) { ((frmAssInventory)Form).Bind(); } } ); } catch (Exception ex) { Toast(ex.Message); } } } }
null
0
{ "advantage_score_max": 0, "advantage_score_mean": 0, "advantage_score_min": 0, "advantage_score_std": 0, "advantage_scores": [], "baseline_doc_loss": 0.7751379609107971, "baseline_truncated": false, "doc_advantage_score": 1.4289032220840454, "length_change_ratio": 1, "net_length_change_chars": 0, "original_sentences_length_chars": 0, "replacement_paraphrases_length_chars": 0, "sentences_perturbed": 0, "target_doc_loss": 0.5424705743789673, "target_truncated": false, "threshold_passing_sentences": 0, "total_doc_length_chars": 6097, "total_sentences": 3, "truncated": false }
{ foo:bar }
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
/* * Copyright 2006 - 2016 * Stefan Balev <stefan.balev@graphstream-project.org> * Julien Baudry <julien.baudry@graphstream-project.org> * Antoine Dutot <antoine.dutot@graphstream-project.org> * Yoann Pigné <yoann.pigne@graphstream-project.org> * Guilhelm Savin <guilhelm.savin@graphstream-project.org> * * This file is part of GraphStream <http://graphstream-project.org>. * * GraphStream is a library whose purpose is to handle static or dynamic * graph, create them from scratch, file or any source and display them. * * This program is free software distributed under the terms of two licenses, the * CeCILL-C license that fits European law, and the GNU Lesser General Public * License. You can use, modify and/ or redistribute the software under the terms * of the CeCILL-C license as circulated by CEA, CNRS and INRIA at the following * URL <http://www.cecill.info> or under the terms of the GNU LGPL as published by * the Free Software Foundation, either version 3 of the License, or (at your * option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * * The fact that you are presently reading this means that you have had * knowledge of the CeCILL-C and LGPL licenses and that you accept their terms. the fact that you are reading this indicates that you have become aware of the CeCILL-C and LGPL licenses and that you agree to their conditions. * * <p> * The edge graph format is a very simple and lightweight format where each line * describes an edge by giving two node names. The nodes are created implicitly. * </p> * * <p> * This reader also understands the derivative format where a line contains a * first node name, followed by several node names separated by spaces. In this * case it links the first node with all other node name following on the line. * </p> * * <p> * Also, the format does not specify any direction for edges. By default all * edges are undirected. You can choose to make all edges directed by passing * "true" as the first arguments to constructors * {@link #FileSourceEdge(boolean)} or {@link #FileSourceEdge(boolean, boolean)} * . The direction of edges goes from the first node name on each line toward * the second (or more) node names on each line. * </p> * * <p> * This format only contains edges. To ensure the "add node" events are sent * before an edge referencing two nodes is created via an "add edge" event, this * reader has a hash set of already encountered nodes. The hash set allows to * issue "add node" events only when a node is encountered for the first time. * </p> * * </p> This hash set consumes memory, but is the only way to ensure "add node" * events are correctly issued. If this input is directly connected to a graph, * as graphs can create non-existing nodes automatically, you can disable the * hash set of nodes using the constructor * {@link #FileSourceEdge(boolean, boolean)}, and giving "false" for the second * argument. </p> * * The usual file name extension for this format is ".edge". */ public class FileSourceEdge extends FileSourceBase { // Attribute /** * Allocator for edge identifiers. */ protected int edgeid = 0; /** * By default, consider edges as undirected. */ protected boolean directed = false; /** * Set of existing nodes (if nodes are declared). */ protected HashSet<String> nodes; protected String graphName = "EDGE_"; // Construction /** * New reader for the "edge" format. */ public FileSourceEdge() { this(false); } /** * New constructor for the "edge" format. By default, edges are undirected unless specified otherwise.ult=false) edges are considered directed. */ public FileSourceEdge(boolean edgesAreDirected) { this(edgesAreDirected, true); } /** * New reader for the "edge" format. * * @param edgesAreDirected * If true (default=false) edges are considered directed. * @param declareNodes * If true (default=true) this reader outputs nodeAdded events. */ public FileSourceEdge(boolean edgesAreDirected, boolean declareNodes) { directed = edgesAreDirected; nodes = declareNodes ? new HashSet<String>() : null; } // Commands @Override protected void continueParsingInInclude() throws IOException { // Should not happen, EDGE files cannot be nested. } @Override public boolean nextEvents() throws IOException { String id1 = getWordOrNumberOrStringOrEolOrEof(); if (id1.equals("EOL")) { // Empty line. } else if (id1.equals("EOF")) { return false; } else { declareNode(id1); String id2 = getWordOrNumberOrStringOrEolOrEof(); while (!id2.equals("EOL")) { if (!id1.equals(id2)) { String edgeId = Integer.toString(edgeid++); declareNode(id2); sendEdgeAdded(graphName, edgeId, id1, id2, directed); } id2 = getWordOrNumberOrStringOrEolOrEof(); } } return true; } protected void declareNode(String id) { if (nodes != null) { if (!nodes.contains(id)) { sendNodeAdded(graphName, id); nodes.add(id); } } } @Override public void begin(String filename) throws IOException { super.begin(filename); init(); } @Override public void begin(URL url) throws IOException { super.begin(url); init(); } @Override public void begin(InputStream stream) throws IOException { super.begin(stream); init(); } @Override public void begin(Reader reader) throws IOException { super.begin(reader); init(); } protected void init() throws IOException { st.eolIsSignificant(true); st.commentChar('#'); graphName = String.format("%s_%d", graphName, System.currentTimeMillis() + ((long) Math.random() * 10)); } public boolean nextStep() throws IOException { return nextEvents(); } @Override public void end() throws IOException { super.end(); } }
null
2
{ "advantage_score_max": 3.7119736671447754, "advantage_score_mean": 2.3493738174438477, "advantage_score_min": 1.5547544956207275, "advantage_score_std": 0.9679359197616577, "advantage_scores": [ 3.7119736671447754, 1.7813935279846191, 1.5547544956207275 ], "baseline_doc_loss": 1.076564908027649, "baseline_truncated": false, "doc_advantage_score": 1.1972602605819702, "length_change_ratio": 0.8053691275167785, "net_length_change_chars": -58, "original_sentences_length_chars": 298, "replacement_paraphrases_length_chars": 240, "sentences_perturbed": 2, "target_doc_loss": 0.899190366268158, "target_truncated": false, "threshold_passing_sentences": 3, "total_doc_length_chars": 6299, "total_sentences": 37, "truncated": false }
<?xml version="1.0" encoding="UTF-8" ?> <!-- eXist-db Open Source Native XML Database Copyright (C) 2001 The eXist-db Authors info@exist-db.org http://www.exist-db.org This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --> <Form version="1.3" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> <NonVisualComponents> <Container class="javax.swing.JPopupMenu" name="pmUsers"> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> <Property name="useNullLayout" type="boolean" value="true"/> </Layout> <SubComponents> <MenuItem class="javax.swing.JMenuItem" name="miNewUser"> <Properties> <Property name="text" type="java.lang.String" value="New User..."/> </Properties> <AccessibilityProperties> <Property name="AccessibleContext.accessibleName" type="java.lang.String" value="New User"/> </AccessibilityProperties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="miNewUserActionPerformed"/> </Events> </MenuItem> <MenuItem class="javax.swing.JMenuItem" name="miEditUser"> <Properties> <Property name="text" type="java.lang.String" value="Edit User..."/> </Properties> <AccessibilityProperties> <Property name="AccessibleContext.accessibleName" type="java.lang.String" value="Edit User"/> </AccessibilityProperties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="miEditUserActionPerformed"/> </Events> </MenuItem> <MenuItem class="javax.swing.JMenuItem" name="miRemoveUser"> <Properties> <Property name="text" type="java.lang.String" value="Remove User"/> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="miRemoveUserActionPerformed"/> </Events> </MenuItem> </SubComponents> </Container> <Container class="javax.swing.JPopupMenu" name="pmGroups"> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> <Property name="useNullLayout" type="boolean" value="true"/> </Layout> <SubComponents> <MenuItem class="javax.swing.JMenuItem" name="miNewGroup"> <Properties> <Property name="text" type="java.lang.String" value="New Group..."/> </Properties> <AccessibilityProperties> <Property name="AccessibleContext.accessibleName" type="java.lang.String" value="New Group"/> </AccessibilityProperties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="miNewGroupActionPerformed"/> </Events> </MenuItem> <MenuItem class="javax.swing.JMenuItem" name="miEditGroup"> <Properties> <Property name="text" type="java.lang.String" value="Edit Group..."/> </Properties> <AccessibilityProperties> <Property name="AccessibleContext.accessibleName" type="java.lang.String" value="Edit Group"/> </AccessibilityProperties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="miEditGroupActionPerformed"/> </Events> </MenuItem> <MenuItem class="javax.swing.JMenuItem" name="miRemoveGroup"> <Properties> <Property name="text" type="java.lang.String" value="Remove Group"/> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="miRemoveGroupActionPerformed"/> </Events> </MenuItem> </SubComponents> </Container> </NonVisualComponents> <Properties> <Property name="defaultCloseOperation" type="int" value="2"/> <Property name="title" type="java.lang.String" value="User Manager"/> </Properties> <SyntheticProperties> <SyntheticProperty name="formSizePolicy" type="int" value="1"/> </SyntheticProperties> <AuxValues> <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> </AuxValues> <Layout> <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="1" attributes="0"> <EmptySpace pref="250" max="32767" attributes="0"/> <Component id="btnClose" min="-2" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> <Component id="btnCreate" min="-2" max="-2" attributes="0"/> <EmptySpace min="-2" pref="20" max="-2" attributes="0"/> </Group> <Group type="102" alignment="0" attributes="0"> <EmptySpace max="-2" attributes="0"/> <Component id="jSeparator1" max="32767" attributes="0"/> <EmptySpace max="-2" attributes="0"/> </Group> <Group type="103" rootIndex="1" groupAlignment="0" attributes="0"> <Component id="tpUserManager" alignment="0" pref="439" max="32767" attributes="0"/> </Group> </Group> </DimensionLayout> <DimensionLayout dim="1"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="1" attributes="0"> <EmptySpace min="0" pref="291" max="32767" attributes="0"/> <Component id="jSeparator1" min="-2" pref="10" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> <Component id="btnCreate" min="-2" max="-2" attributes="0"/> <Group type="102
null
0
{ "advantage_score_max": 0, "advantage_score_mean": 0, "advantage_score_min": 0, "advantage_score_std": 0, "advantage_scores": [], "baseline_doc_loss": 0.529310941696167, "baseline_truncated": false, "doc_advantage_score": 4.138620853424072, "length_change_ratio": 1, "net_length_change_chars": 0, "original_sentences_length_chars": 0, "replacement_paraphrases_length_chars": 0, "sentences_perturbed": 0, "target_doc_loss": 0.12789548933506012, "target_truncated": false, "threshold_passing_sentences": 0, "total_doc_length_chars": 7613, "total_sentences": 4, "truncated": false }
// (C) Copyright Edward Diener 2011-2015 // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (Refer to the included LICENSE_1_0.txt file or visit http://www.boost.org/LICENSE_1_0.txt). #if !defined(BOOST_VMD_DETAIL_IDENTIFIER_CONCAT_HPP) #define BOOST_VMD_DETAIL_IDENTIFIER_CONCAT_HPP #include <boost/preprocessor/cat.hpp> #include <boost/vmd/detail/idprefix.hpp> #define BOOST_VMD_DETAIL_IDENTIFIER_CONCATENATE(vseq) \ BOOST_PP_CAT \ ( \ BOOST_VMD_DETAIL_IDENTIFIER_REGISTRATION_PREFIX, \ vseq \ ) \ /**/ #endif /* BOOST_VMD_DETAIL_IDENTIFIER_CONCAT_HPP */
null
1
{ "advantage_score_max": 4.3784499168396, "advantage_score_mean": 4.3784499168396, "advantage_score_min": 4.3784499168396, "advantage_score_std": 0, "advantage_scores": [ 4.3784499168396 ], "baseline_doc_loss": 0.6276845932006836, "baseline_truncated": false, "doc_advantage_score": 2.436649799346924, "length_change_ratio": 0.978494623655914, "net_length_change_chars": -2, "original_sentences_length_chars": 93, "replacement_paraphrases_length_chars": 91, "sentences_perturbed": 1, "target_doc_loss": 0.25760146975517273, "target_truncated": false, "threshold_passing_sentences": 1, "total_doc_length_chars": 669, "total_sentences": 3, "truncated": false }
// For Komodo 6 if (ko.views.manager.currentView && ko.views.manager.currentView.scimoz) { // Set the number of completions shown in the list. ko.views.manager.currentView.scimoz.autoCMaxHeight = 10; } // For Komodo 7 if (ko.prefs) { ko.prefs.setLongPref("codeintel_autocomplete_max_rows", 10); }
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
/* * Union to access IEEE float memory representation. */ #if !defined(DUK_FLTUNION_H_INCLUDED) #define DUK_FLTUNION_H_INCLUDED #include "duk_internal.h" union duk_float_union { float f; duk_uint32_t ui[1]; duk_uint16_t us[2]; duk_uint8_t uc[4]; }; typedef union duk_float_union duk_float_union; #if defined(DUK_USE_DOUBLE_LE) || defined(DUK_USE_DOUBLE_ME) #define DUK_FLT_IDX_UI0 0 #define DUK_FLT_IDX_US0 1 #define DUK_FLT_IDX_US1 0 #define DUK_FLT_IDX_UC0 3 #define DUK_FLT_IDX_UC1 2 #define DUK_FLT_IDX_UC2 1 #define DUK_FLT_IDX_UC3 0 #elif defined(DUK_USE_DOUBLE_BE) #define DUK_FLT_IDX_UI0 0 #define DUK_FLT_IDX_US0 0 #define DUK_FLT_IDX_US1 1 #define DUK_FLT_IDX_UC0 0 #define DUK_FLT_IDX_UC1 1 #define DUK_FLT_IDX_UC2 2 #define DUK_FLT_IDX_UC3 3 #else #error internal error #endif #endif /* DUK_FLTUNION_H_INCLUDED */
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
This directory contains scripts that will run on the target. The target uses the Ash shell so no bashisms can live in here, the scripts should be self contained and use only resources available on the target.
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
/* * Copyright (c) 2015, Michael Mitterer (office@mikemitterer.at), * IT-Consulting and Development Limited. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.e the License for the specific language governing permissions and * limitations under the License. */ library mdldialog; import 'dart:html' as dom; import 'dart:async'; import 'package:intl/intl.dart'; import 'package:intl/date_symbol_data_local.dart'; import 'package:logging/logging.dart'; import 'package:mustache/mustache.dart'; import 'package:validate/validate.dart'; import 'package:dryice/dryice.dart' as di; import 'package:mdl/mdlcore.dart'; import 'package:mdl/mdlcomponents.dart'; import 'package:mdl/mdlapplication.dart'; import 'package:mdl/mdltemplate.dart'; import 'package:mdl/mdlanimation.dart'; part "src/dialog/MaterialDialog.dart"; part "src/dialog/MaterialAlertDialog.dart"; part "src/dialog/MaterialConfirmDialog.dart"; part "src/dialog/MaterialSnackbar.dart"; part "src/dialog/MaterialNotification.dart"; part "src/dialog/MaterialDatePicker.dart"; part "src/dialog/MaterialTimePicker.dart"; part "src/dialog/components/MaterialDialogComponent.dart"; void registerMdlDialogComponents() { _registerMaterialDialogComponent(); }
null
2
{ "advantage_score_max": 3.3375773429870605, "advantage_score_mean": 2.463845729827881, "advantage_score_min": 1.5901139974594116, "advantage_score_std": 0.8737316727638245, "advantage_scores": [ 3.3375773429870605, 1.5901139974594116 ], "baseline_doc_loss": 0.9134202599525452, "baseline_truncated": false, "doc_advantage_score": 1.4481087923049927, "length_change_ratio": 0.9292035398230089, "net_length_change_chars": -24, "original_sentences_length_chars": 339, "replacement_paraphrases_length_chars": 315, "sentences_perturbed": 2, "target_doc_loss": 0.6307677030563354, "target_truncated": false, "threshold_passing_sentences": 2, "total_doc_length_chars": 1662, "total_sentences": 6, "truncated": false }
/****************************************************************** * * Copyright 2014 Samsung Electronics All Rights Reserved. * * * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ******************************************************************/ #include <jni.h> #include <stdio.h> #include <android/log.h> #include "caleutils.h" #include "logger.h" #include "oic_malloc.h" #include "cathreadpool.h" #include "uarraylist.h" #include "caadapterutils.h" #define TAG PCF("CA_LE_UTILS") #define METHODID_OBJECTNONPARAM "()Landroid/bluetooth/BluetoothAdapter;" #define METHODID_STRINGNONPARAM "()Ljava/lang/String;" #define CLASSPATH_BT_ADPATER "android/bluetooth/BluetoothAdapter" jobject CALEGetUuidFromString(JNIEnv *env, const char* uuid) { VERIFY_NON_NULL_RET(uuid, TAG, "uuid is null", NULL); VERIFY_NON_NULL_RET(env, TAG, "env is null", NULL); OIC_LOG(DEBUG, TAG, "CALEGetUuidFromString"); jclass jni_cid_UUID = (*env)->FindClass(env, "java/util/UUID"); if (!jni_cid_UUID) { OIC_LOG(ERROR, TAG, "jni_cid_UUID is not available"); return NULL; } jmethodID jni_mid_fromString = (*env)->GetStaticMethodID(env, jni_cid_UUID, "fromString", "(Ljava/lang/String;)" "Ljava/util/UUID;"); if (!jni_mid_fromString) { OIC_LOG(ERROR, TAG, "jni_mid_fromString is not available"); return NULL; } jstring str_uuid = (*env)->NewStringUTF(env, uuid); if (!str_uuid) { OIC_LOG(ERROR, TAG, "str_uuid is not available"); return NULL; } jobject jni_obj_uuid = (*env)->CallStaticObjectMethod(env, jni_cid_UUID, jni_mid_fromString, str_uuid); if (!jni_obj_uuid) { OIC_LOG(ERROR, TAG, "Fail to get jni uuid object"); return NULL; } return jni_obj_uuid; } jobject CALEGetParcelUuid(JNIEnv *env, jobject uuid) { OIC_LOG(DEBUG, TAG, "CALEGetParcelUuid"); VERIFY_NON_NULL_RET(env, TAG, "env is null", NULL); VERIFY_NON_NULL_RET(uuid, TAG, "uuid is null", NULL); jclass jni_cid_ParcelUuid = (*env)->FindClass(env, "android/os/ParcelUuid"); if (!jni_cid_ParcelUuid) { OIC_LOG(ERROR, TAG, "jni_cid_ParcelUuid is not available"); return NULL; } jmethodID jni_mid_ParcelUuid = (*env)->GetMethodID(env, jni_cid_ParcelUuid, "<init>", "(Ljava/util/UUID;)V"); if (!jni_mid_ParcelUuid) { OIC_LOG(ERROR, TAG, "jni_mid_ParcelUuid is not available"); return NULL; } jobject jni_ParcelUuid = (*env)->NewObject(env, jni_cid_ParcelUuid, jni_mid_ParcelUuid, uuid); if (!jni_ParcelUuid) { OIC_LOG(ERROR, TAG, "Fail to get jni ParcelUuid"); return NULL; } return jni_ParcelUuid; } bool CALEIsBondedDevice(JNIEnv *env, jobject bluetoothDevice) { VERIFY_NON_NULL_RET(env, TAG, "env is null", false); VERIFY_NON_NULL_RET(bluetoothDevice, TAG, "bluetoothDevice is null", false); jclass jni_cid_device_list = (*env)->FindClass(env, "android/bluetooth/BluetoothDevice"); if (!jni_cid_device_list) { OIC_LOG(ERROR, TAG, "jni_cid_device_list is null"); return false; } jmethodID jni_mid_getBondState = (*env)->GetMethodID(env, jni_cid_device_list, "getBondState", "()I"); if (!jni_mid_getBondState) { OIC_LOG(ERROR, TAG, "jni_mid_getBondState is null"); return false; } jint jni_bondState = (jint)(*env)->CallIntMethod(env, bluetoothDevice, jni_mid_getBondState); OIC_LOG_V(DEBUG, TAG, "bond state is %d", jni_bondState); if (BOND_BONDED == jni_bondState) { OIC_LOG(DEBUG, TAG, "remote device is bonded"); return true; } else { OIC_LOG(DEBUG, TAG, "remote device is not bonded"); return false; } return false; } jobjectArray CALEGetBondedDevices(JNIEnv *env) { VERIFY_NON_NULL_RET(env, TAG, "env is null", NULL); jclass jni_cid_BTAdapter = (*env)->FindClass(env, CLASSPATH_BT_ADPATER); if (!jni_cid_BTAdapter) { OIC_LOG(ERROR, TAG, "getBondedDevices: jni_cid_BTAdapter is null"); return NULL; } jmethodID jni_mid_getDefaultAdapter = (*env)->GetStaticMethodID(env, jni_cid_BTAdapter, "getDefaultAdapter", METHODID_OBJECTNONPARAM); jobject jni_obj_BTAdapter = (*env)->CallStaticObjectMethod(env, jni_cid_BTAdapter, jni_mid_getDefaultAdapter); if (!jni_obj_BTAdapter) { OIC_LOG(ERROR, TAG, "getBondedDevices: bluetooth adapter is null"); return NULL; } // Get a list of currently paired devices jmethodID jni_mid_getBondedDevices = (*env)->GetMethodID(env, jni_cid_BTAdapter, "getBondedDevices", "()Ljava/util/Set;"); if (!jni_mid_getBondedDevices) { OIC_LOG(ERROR, TAG, "getBondedDevices: jni_mid_getBondedDevicesr is null"); return NULL; } jobject jni_obj_setPairedDevices = (*env)->CallObjectMethod(env, jni_obj_BTAdapter, jni_mid_getBondedDevices); if (!jni_obj_setPairedDevices) { OIC_LOG(ERROR, TAG, "getBondedDevices: jni_obj_setPairedDevices is null"); return NULL;
null
0
{ "advantage_score_max": 0, "advantage_score_mean": 0, "advantage_score_min": 0, "advantage_score_std": 0, "advantage_scores": [], "baseline_doc_loss": 0.5082430243492126, "baseline_truncated": false, "doc_advantage_score": 1.1537446975708008, "length_change_ratio": 1, "net_length_change_chars": 0, "original_sentences_length_chars": 0, "replacement_paraphrases_length_chars": 0, "sentences_perturbed": 0, "target_doc_loss": 0.44051602482795715, "target_truncated": false, "threshold_passing_sentences": 0, "total_doc_length_chars": 6279, "total_sentences": 5, "truncated": false }
### 小故事 大道理 说透人生(图) ------------------------ #### [首页](https://github.com/gfw-breaker/banned-news/blob/master/README.md) &nbsp;&nbsp;|&nbsp;&nbsp; [手把手翻墙教程](https://github.com/gfw-breaker/guides/wiki) &nbsp;&nbsp;|&nbsp;&nbsp; [禁闻聚合安卓版](https://github.com/gfw-breaker/bn-android) &nbsp;&nbsp;|&nbsp;&nbsp; [网门安卓版](https://github.com/oGate2/oGate) &nbsp;&nbsp;|&nbsp;&nbsp; [神州正道安卓版](https://github.com/SzzdOgate/update) <div class="article_right" style="fone-color:#000"> <p style="text-align:center"> <img alt="小故事 ,大道理 ,说透人生。" src="http://img2.secretchina.com/pic/2019/11-15/p2563212a283180905-ss.jpg"/> <br> 小故事,大启示,说透人生。(图片来源:Adobe Stock) <span id="hideid" name="hideid" style="color:red;display:none;"> <span href="https://www.secretchina.com"> </span> </span> </br> </p> <div id="txt-mid1-t21-2017"> <ins class="adsbygoogle" data-ad-client="ca-pub-1276641434651360" data-ad-slot="2451032099" style="display:inline-block;width:336px;height:280px"> </ins> <div id="SC-22xxx"> </div> </div> <p> <strong> 01 </strong> <span id="hideid" name="hideid" style="color:red;display:none;"> <span href="https://www.secretchina.com"> </span> </span> </p> <p> 一个卖瓷碗的老人挑着扁担在路上走着,突然一个瓷碗掉到地上、摔碎了,老人继续向前走,头也不回。 </p> <p> 路人看到很奇怪,便问:为什么你的碗摔碎了你却不看一下呢?老人答道:我再怎么回头看,碗也是碎的。还耽误了赶路! </p> <p> 启示:失去东西时,要学着接受,学着放下。很多事不会因为你的悲伤就会被改变的。 </p> <p> <strong> 02 </strong> </p> <p> 鹦鹉遇到乌鸦,笼中的鹦鹉安逸,野外的乌鸦自由。鹦鹉羡慕乌鸦自由,乌鸦羡慕鹦鹉安逸。二只鸟便商议互换。 </p> <p> 乌鸦得到安逸,但难得主人欢喜,最后抑郁而死;鹦鹉得到自由,但长期安逸,不能独立生存,最终饥饿而死。 </p> <p> 启示:不要盲目羡慕他人,人家的幸福也许不适合你。不去攀比,过好自己的日子,享受自己的生活才是王道。 </p> <p> <strong> 03 </strong> </p> <p> 老师问:有个人要烧壶开水,生火到一半时发现柴不够,他该怎么办?有的同学说赶快去找,有的说去借、去买。 </p> <p> 老师说:为什么不把壶里的水倒掉一些呢?同学顿悟…… </p> <p> 启示:世事不能万般如意,有舍才有得。人的精力总会有限,不如“倒掉一些水”,只专注在喜欢的人和事吧。 </p> <p> <strong> 04 </strong> </p> <p> 猫和猪是好朋友。一天猫掉进大坑,猪拿来绳子,猫叫猪把绳子扔下来,结果它整捆扔了下去。 </p> <p> 猫很郁闷的说:这样扔下来,怎么拉我上去?猪说:不然怎么做?猫说:你应该拉住一头绳子啊! </p> <p> 猪就跳下去,拿了绳子的一头,说:现在可以了! </p> <p> 猫哭了,哭得很幸福...... </p> <p> 启示:有的人不是很聪明,却值得你终生拥有。 </p> <p style="text-align: center;"> <img alt="有的人不是很聪明,却值得你终生拥有。" src="//img3.secretchina.com/pic/2019/12-30/p2593283a64903979-ss.jpg"/> <br> 有的人不是很聪明,却值得你终生拥有。(图片来源:Adobe Stock) </br> </p> <center> <div style="max-width: 632px;height:180px; display: none; text-align: center; margin: 0 auto; overflow: hidden;overflow-x: hidden;"> <div id="taboola-midarticle-thumbnails" style="max-width: 632px;height:180px;overflow: hidden;overflow-x: hidden;"> </div> </div> <div> <ins class="adsbygoogle" data-ad-client="ca-pub-1276641434651360" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="5164544770" style="display:block; text-align:center;"> </ins> </div> </center> <p> <strong> 05 </strong> </p> <p> 老和尚问小和尚:如果你前进一步是死,后退一步则亡,你该怎么办? </p> <p> 小和尚毫不犹豫地说:我往旁边去。 </p> <p> 启示:人生路上遭遇 <span href="https://www.secretchina.com/news/gb/tag/进退" target="_blank"> 进退 </span> 两难的境况时,换个角度思考:路的旁边,还是路
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
Truck 0.00 0 -1.637672127285276 590.09 161.18 617.52 190.88 3.134235066789646 2.639767911331384 11.511453229401017 -0.69 1.80 76.16 -1.6467317533649375 0.92465276 Car 0.00 0 2.338599101701055 45.06 202.08 117.75 233.86 1.3921282741992187 1.5875245884717846 3.483428346119919 -26.64 2.95 36.43 1.7071963212290409 0.99929535 Car 0.00 1 -2.557626978554998 927.95 174.61 996.08 198.34 1.5572205785481643 1.6886907213093185 4.384424286089935 21.80 1.55 44.84 -2.105101982265644 0.82235724 DontCare -1 -1 -1.7555997977640967 400.24 181.83 429.64 198.30 1.546271741744728 1.6451684746616924 4.083742173515358 -1000 -1000 -1000 -0.9702016343666484 0.9960375 DontCare -1 -1 -1.5829545064505677 254.69 185.71 295.74 201.53 1.5721423666743946 1.6490328249247217 3.818148961417475 -1000 -1000 -1000 -0.7975563430531194 0.9990766 DontCare -1 -1 1.432099730768476 490.15 170.83 518.26 189.24 1.4506351504294586 1.6344915966228986 4.005098687611618 -1000 -1000 -1000 2.2174978941659242 0.83255285 DontCare -1 -1 -1.594725170233522 561.31 170.18 581.66 189.88 1.5298217370925855 1.674448591908946 4.207145737610855 -1000 -1000 -1000 -0.8093270068360736 0.9971288 DontCare -1 -1 0.7495781342175345 1014.10 166.95 1239.98 193.12 1.407469682749958 1.691170427268877 4.252892749510803 -1000 -1000 -1000 1.5349762976149828 0.9974463
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test proper accounting with an equivalent malleability clone # from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * class TxnMallTest(BitcoinTestFramework): def __init__(self): super().__init__() self.num_nodes = 4 self.setup_clean_chain = False def add_options(self, parser): parser.add_option("--mineblock", dest="mine_block", default=False, action="store_true", help="Test double-spend of 1-confirmed transaction") def setup_network(self): # Start with split network: return super(TxnMallTest, self).setup_network(True) def run_test(self): # All nodes should start with 1,250 BTC: starting_balance = 1250 for i in range(4): assert_equal(self.nodes[i].getbalance(), starting_balance) self.nodes[i].getnewaddress("") # bug workaround, coins generated assigned to first getnewaddress! # Assign coins to foo and bar accounts: self.nodes[0].settxfee(.001) node0_address_foo = self.nodes[0].getnewaddress("foo") fund_foo_txid = self.nodes[0].sendfrom("", node0_address_foo, 1219) fund_foo_tx = self.nodes[0].gettransaction(fund_foo_txid) node0_address_bar = self.nodes[0].getnewaddress("bar") fund_bar_txid = self.nodes[0].sendfrom("", node0_address_bar, 29) fund_bar_tx = self.nodes[0].gettransaction(fund_bar_txid) assert_equal(self.nodes[0].getbalance(""), starting_balance - 1219 - 29 + fund_foo_tx["fee"] + fund_bar_tx["fee"]) # Coins are sent to node1_address node1_address = self.nodes[1].getnewaddress("from0") # Send tx1, and another transaction tx2 that won't be cloned txid1 = self.nodes[0].sendfrom("foo", node1_address, 40, 0) txid2 = self.nodes[0].sendfrom("bar", node1_address, 20, 0) # Construct a clone of tx1, to be malleated rawtx1 = self.nodes[0].getrawtransaction(txid1,1) clone_inputs = [{"txid":rawtx1["vin"][0]["txid"],"vout":rawtx1["vin"][0]["vout"]}] clone_outputs = {rawtx1["vout"][0]["scriptPubKey"]["addresses"][0]:rawtx1["vout"][0]["value"], rawtx1["vout"][1]["scriptPubKey"]["addresses"][0]:rawtx1["vout"][1]["value"]} clone_locktime = rawtx1["locktime"] clone_raw = self.nodes[0].createrawtransaction(clone_inputs, clone_outputs, clone_locktime) # createrawtransaction randomizes the order of its outputs, so swap them if necessary. # output 0 is at version+#inputs+input+sigstub+sequence+#outputs # 40 BTC serialized is 00286bee00000000 pos0 = 2*(4+1+36+1+4+1) hex40 = "00286bee00000000" output_len = 16 + 2 + 2 * int("0x" + clone_raw[pos0 + 16 : pos0 + 16 + 2], 0) if (rawtx1["vout"][0]["value"] == 40 and clone_raw[pos0 : pos0 + 16] != hex40 or rawtx1["vout"][0]["value"] != 40 and clone_raw[pos0 : pos0 + 16] == hex40): output0 = clone_raw[pos0 : pos0 + output_len] output1 = clone_raw[pos0 + output_len : pos0 + 2 * output_len] clone_raw = clone_raw[:pos0] + output1 + output0 + clone_raw[pos0 + 2 * output_len:] # Use a different signature hash type to sign. This creates an equivalent but malleated clone. # Don't send the clone anywhere yet tx1_clone = self.nodes[0].signrawtransaction(clone_raw, None, None, "ALL|ANYONECANPAY") assert_equal(tx1_clone["complete"], True) # Have node0 mine a block, if requested: if (self.options.mine_block): self.nodes[0].generate(1) sync_blocks(self.nodes[0:2]) tx1 = self.nodes[0].gettransaction(txid1) tx2 = self.nodes[0].gettransaction(txid2) # Node0's balance should be starting balance, plus 50BTC for another # matured block, minus tx1 and tx2 amounts, and minus transaction fees: expected = starting_balance + fund_foo_tx["fee"] + fund_bar_tx["fee"] if self.options.mine_block: expected += 50 expected += tx1["amount"] + tx1["fee"] expected += tx2["amount"] + tx2["fee"] assert_equal(self.nodes[0].getbalance(), expected) # foo and bar accounts should be debited: assert_equal(self.nodes[0].getbalance("foo", 0), 1219 + tx1["amount"] + tx1["fee"]) assert_equal(self.nodes[0].getbalance("bar", 0), 29 + tx2["amount"] + tx2["fee"]) if self.options.mine_block: assert_equal(tx1["confirmations"], 1) assert_equal(tx2["confirmations"], 1) # Node1's "from0" balance should be both transaction amounts: assert_equal(self.nodes[1].getbalance("from0"), -(tx1["amount"] + tx2["amount"])) else: assert_equal(tx1["confirmations"], 0) assert_equal(tx2["confirmations"], 0) # Send clone and its parent to miner self.nodes[2].sendrawtransaction(fund_foo_tx["hex"]) txid1_clone = self.nodes[2].sendrawtransaction(tx1_clone["hex"]) # ... mine a block... self.nodes[2].generate(1) # Reconnect the split network, and sync chain: connect_nodes(self.nodes[1], 2) self.nodes[2].sendrawtransaction(fund_bar_tx["hex"]) self.nodes[2].sendrawtransaction(tx2["hex"]) self.nodes[2].generate(1) # Mine another block to make sure we sync sync_blocks(self.nodes) # Re-fetch transaction info: tx1 = self.nodes[0].gettransaction(txid1) tx1_clone = self.nodes[0].gettransaction(txid1_clone) tx2 = self.nodes[0].gettransaction(txid2) # Verify expected confirmations assert_equal(tx1["confirmations"], -2) assert_equal(tx1_clone["confirmations"], 2) assert_equal(tx2["confirmations"], 1) # Check node0's total balance; should be same as before the clone, + 100 BTC for 2 matured, # less possible orphaned matured subsidy expected += 100 if (self.options.mine_block): expected -= 50 assert_equal(self.nodes[0].getbalance(), expected) assert_equal(self.nodes[0].getbalance("*", 0), expected) # Check node0's individual account balances. # "foo" should have been debited by the equivalent clone of tx1 assert_equal(self.nodes[0].getbalance("foo"), 1219 + tx1["amount"] +
null
0
{ "advantage_score_max": 1.2585498094558716, "advantage_score_mean": 1.2585498094558716, "advantage_score_min": 1.2585498094558716, "advantage_score_std": 0, "advantage_scores": [ 1.2585498094558716 ], "baseline_doc_loss": 0.9668869376182556, "baseline_truncated": false, "doc_advantage_score": 1.0159176588058472, "length_change_ratio": 1, "net_length_change_chars": 0, "original_sentences_length_chars": 0, "replacement_paraphrases_length_chars": 0, "sentences_perturbed": 0, "target_doc_loss": 0.9517375230789185, "target_truncated": false, "threshold_passing_sentences": 1, "total_doc_length_chars": 6653, "total_sentences": 7, "truncated": false }
S0001 XX 2000.00000 2000.00000 10000.00000 10000.00000 S0002 XX 3000.00000 2000.00000 10000.00000 10000.00000 S0003 XX 4000.00000 2000.00000 10000.00000 10000.00000 S0004 XX 5000.00000 2000.00000 10000.00000 10000.00000 S0005 XX 6000.00000 2000.00000 10000.00000 10000.00000 S0006 XX 7000.00000 2000.00000 10000.00000 10000.00000 S0007 XX 8000.00000 2000.00000 10000.00000 10000.00000 S0008 XX 9000.00000 2000.00000 10000.00000 10000.00000 S0009 XX 10000.00000 2000.00000 10000.00000 10000.00000 S0010 XX 11000.00000 2000.00000 10000.00000 10000.00000 S0011 XX 12000.00000 2000.00000 10000.00000 10000.00000 S0012 XX 13000.00000 2000.00000 10000.00000 10000.00000 S0013 XX 14000.00000 2000.00000 10000.00000 10000.00000 S0014 XX 15000.00000 2000.00000 10000.00000 10000.00000 S0015 XX 16000.00000 2000.00000 10000.00000 10000.00000 S0016 XX 17000.00000 2000.00000 10000.00000 10000.00000 S0017 XX 18000.00000 2000.00000 10000.00000 10000.00000 S0018 XX 19000.00000 2000.00000 10000.00000 10000.00000 S0019 XX 20000.00000 2000.00000 10000.00000 10000.00000 S0020 XX 21000.00000 2000.00000 10000.00000 10000.00000 S0021 XX 22000.00000 2000.00000 10000.00000 10000.00000 S0022 XX 23000.00000 2000.00000 10000.00000 10000.00000 S0023 XX 24000.00000 2000.00000 10000.00000 10000.00000 S0024 XX 25000.00000 2000.00000 10000.00000 10000.00000 S0025 XX 26000.00000 2000.00000 10000.00000 10000.00000 S0026 XX 27000.00000 2000.00000 10000.00000 10000.00000 S0027 XX 28000.00000 2000.00000 10000.00000 10000.00000 S0028 XX 29000.00000 2000.00000 10000.00000 10000.00000 S0029 XX 30000.00000 2000.00000 10000.00000 10000.00000 S0030 XX 2000.00000 3000.00000 10000.00000 10000.00000 S0031 XX 3000.00000 3000.00000 10000.00000 10000.00000 S0032 XX 4000.00000 3000.00000 10000.00000 10000.00000 S0033 XX 5000.00000 3000.00000 10000.00000 10000.00000 S0034 XX 6000.00000 3000.00000 10000.00000 10000.00000 S0035 XX 7000.00000 3000.00000 10000.00000 10000.00000 S0036 XX 8000.00000 3000.00000 10000.00000 10000.00000 S0037 XX 9000.00000 3000.00000 10000.00000 10000.00000 S0038 XX 10000.00000 3000.00000 10000.00000 10000.00000 S0039 XX 11000.00000 3000.00000 10000.00000 10000.00000 S0040 XX 12000.00000 3000.00000 10000.00000 10000.00000 S0041 XX 13000.00000 3000.00000 10000.00000 10000.00000 S0042 XX 14000.00000 3000.00000 10000.00000 10000.00000 S0043 XX 15000.00000 3000.00000 10000.00000 10000.00000 S0044 XX 16000.00000 3000.00000 10000.00000 10000.00000 S0045 XX 17000.00000 3000.00000 10000.00000 10000.00000 S0046 XX 18000.00000 3000.00000 10000.00000 10000.00000 S0047 XX 19000.00000 3000.00000 10000.00000 10000.00000 S0048 XX 20000.00000 3000.00000 10000.00000 10000.00000 S0049 XX 21000.00000 3000.00000 10000.00000 10000.00000 S0050 XX 22000.00000 3000.00000 10000.00000 10000.00000 S0051 XX 23000.00000 3000.00000 10000.00000 10000.00000 S0052 XX 24000.00000 3000.00000 10000.00000 10000.00000 S0053 XX 25000.00000 3000.00000 10000.00000 10000.00000 S0054 XX 26000.00000 3000.00000 10000.00000 10000.00000 S0055 XX 27000.00000 3000.00000 10000.00000 10000.00000 S0056 XX 28000.00000 3000.00000 10000.00000 10000.00000 S0057 XX 29000.00000 3000.00000 10000.00000 10000.00000 S0058 XX 30000.00000 3000.00000 10000.00000 10000.00000 S0059 XX 2000.00000 4000.00000 10000.00000 10000.00000 S0060 XX 3000.00000 4000.00000 10000.00000 10000.00000 S0061 XX 4000.00000 4000.00000 10000.00000 10000.00000 S0062 XX 5000.00000 4000.00000 10000.00000 10000.00000 S0063 XX 6000.00000 4000.00000 10000.00000 10000.00000 S0064 XX 7000.00000 4000.00000 10000.00000 10000.00000 S0065 XX 8000.00000 4000.00000 10000.00000 10000.00000 S0066 XX 9000.00000 4000.00000 10000.00000 10000.00000 S0067 XX 10000.00000 4000.00000 10000.00000 10000.00000 S0068 XX 11000.00000 4000.00000 10000.00000 10000.00000 S0069 XX 12000.00000 4000.00000 10000.00000 10000.00000 S0070 XX 13000.00000 4000.00000 10000.00000 10000.00000 S0071 XX 14000.00000 4000.00000 10000.00000 10000.00000 S0072 XX 15000.00000 4000.00000 10000.00000 10000.00000 S0073 XX 16000.00000 4000.00000 10000.00000 10000.00000 S0074 XX 17000.00000 4000.00000 10000.00000 10000.00000 S0075 XX 18000.00000 4000.00000 10000.00000 10000.00000 S0076 XX 19000.00000 4000.00000 10000.00000 10000.00000 S0077 XX 20000.00000 4000.00000 10000.00000 10000.00000 S0078 XX 21000.00000 4000.00000 10000.00000 10000.00000 S0079 XX 22000.00000 4000.00000 10000.00000 10000.00000 S0080 XX 23000.00000 4000.00000 10000.00000 10000.00000 S0081 XX 24000.00000 4000.00000 10000.00000 10000.00000 S0082 XX 25000.00000 4000.00000 10000.00000 10000.00000 S0083 XX 26000.00000 4000.00000 10000.00000 10000.00000 S0084 XX 27000.00000 4000.00000 10000.00000 10000.00000 S0085 XX 28000.00000 4000.00000 10000.00000 10000.00000 S0086 XX 29000.00000 4000.00000 10000.00000 10000.00000 S0087 XX 30000.00000 4000.00000 10000.00000 10000.00000 S0088 XX 2000.00000 5000.00000 10000.00000 10000.00000 S0089 XX 3000.00000 5000.00000 10000.00000 10000.00000 S0090 XX 4000.00000 5000.00000 10000.00000 10000.00000 S0091 XX 5000.00000 5000.00000 10000.00000 10000.00000 S0092 XX 6000.00000 5000.00000 10000.00000 10000.00000 S0093 XX 7000.
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
<?xml version="1.0"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. Refer to the NOTICE file included with this work for further details about copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <reposinfo> <latest>./hdp.json</latest> <os family="centos6"> <repo> <baseurl>http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.2.0.0</baseurl> <repoid>HDP-2.2.0</repoid> <reponame>HDP</reponame> <unique>true</unique> </repo> </os> <os family="centos5"> <repo> <baseurl>http://public-repo-1.hortonworks.com/HDP/centos5/2.x/updates/2.2.0.0</baseurl> <repoid>HDP-2.2.0</repoid> <reponame>HDP</reponame> <unique>true</unique> </repo> </os> <os family="redhat6"> <repo> <baseurl>http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.2.0.0</baseurl> <repoid>HDP-2.2.0</repoid> <reponame>HDP</reponame> <unique>true</unique> </repo> </os> <os family="redhat5"> <repo> <baseurl>http://public-repo-1.hortonworks.com/HDP/centos5/2.x/updates/2.2.0.0</baseurl> <repoid>HDP-2.2.0</repoid> <reponame>HDP</reponame> <unique>true</unique> </repo> </os> <os family="suse11"> <repo> <baseurl>http://public-repo-1.hortonworks.com/HDP/suse11/2.x/updates/2.2.0.0</baseurl> <repoid>HDP-2.2.0</repoid> <reponame>HDP</reponame> <unique>true</unique> </repo> </os> <os family="sles11"> <repo> <baseurl>http://public-repo-1.hortonworks.com/HDP/suse11/2.x/updates/2.2.0.0</baseurl> <repoid>HDP-2.2.0</repoid> <reponame>HDP</reponame> <unique>true</unique> </repo> </os> </reposinfo>
null
1
{ "advantage_score_max": 4.271008014678955, "advantage_score_mean": 4.271008014678955, "advantage_score_min": 4.271008014678955, "advantage_score_std": 0, "advantage_scores": [ 4.271008014678955 ], "baseline_doc_loss": 0.22085866332054138, "baseline_truncated": false, "doc_advantage_score": 1.433615803718567, "length_change_ratio": 0.8878504672897196, "net_length_change_chars": -12, "original_sentences_length_chars": 107, "replacement_paraphrases_length_chars": 95, "sentences_perturbed": 1, "target_doc_loss": 0.1540570855140686, "target_truncated": false, "threshold_passing_sentences": 1, "total_doc_length_chars": 2319, "total_sentences": 6, "truncated": false }
# -*- coding: utf-8 -*- # # BitcoinLib - Python Cryptocurrency Library # Cache DataBase - SqlAlchemy database definitions for caching # © 2020 February - 1200 Web Development <http://1200wd.com/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # try: import enum except ImportError: import enum34 as enum from sqlalchemy import create_engine from sqlalchemy import Column, Integer, BigInteger, String, Boolean, ForeignKey, DateTime, Numeric, Text, LargeBinary from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker, relationship try: from urllib.parse import urlparse except ImportError: from urlparse import urlparse from bitcoinlib.main import * _logger = logging.getLogger(__name__) _logger.info("Using Cache Database %s" % DEFAULT_DATABASE_CACHE) Base = declarative_base() class DbInit: """ Initialize database and open session Create new database if is doesn't exist yet """ def __init__(self, db_uri=None): self.engine = None self.session = None if db_uri is None: db_uri = DEFAULT_DATABASE_CACHE elif not db_uri: return o = urlparse(db_uri) if not o.scheme or len(o.scheme) < 2: db_uri = 'sqlite:///%s' % db_uri if db_uri.startswith("sqlite://") and ALLOW_DATABASE_THREADS: if "?" in db_uri: db_uri += "&" else: db_uri += "?" db_uri += "check_same_thread=False" self.engine = create_engine(db_uri, isolation_level='READ UNCOMMITTED') Session = sessionmaker(bind=self.engine) Base.metadata.create_all(self.engine) self.session = Session() class DbCacheTransactionNode(Base): """ Link table for cache transactions and addresses """ __tablename__ = 'cache_transactions_node' txid = Column(String(64), ForeignKey('cache_transactions.txid'), primary_key=True) transaction = relationship("DbCacheTransaction", back_populates='nodes', doc="Related transaction object") # TODO: Add fields to allow to create full transaction (+ split input / output?) # index_n = Column(BigInteger, primary_key=True, # doc="Output_n of previous transaction output that is spent in this input") # prev_hash = Column(String(64), # doc="Transaction hash of previous transaction. Previous unspent outputs (UTXO) is spent " # "in this input") output_n = Column(BigInteger, primary_key=True, doc="Output_n of previous transaction output that is spent in this input") value = Column(Numeric(25, 0, asdecimal=False), default=0, doc="Value of transaction input") is_input = Column(Boolean, primary_key=True, doc="True if input, False if output") address = Column(String(255), doc="Address string base32 or base58 encoded", index=True) # script = Column(Text, doc="Unlocking script to unlock previous locked output") # sequence = Column(BigInteger, doc="Transaction sequence number. Used for timelock transaction inputs") spent = Column(Boolean, default=None, doc="Is output spent?") spending_txid = Column(String(64), doc="Transaction hash of input which spends this output") spending_index_n = Column(Integer, doc="Index number of transaction input which spends this output") class DbCacheTransaction(Base): """ Transaction Cache Table Database which stores transactions received from service providers as cache """ __tablename__ = 'cache_transactions' txid = Column(String(64), primary_key=True, doc="Hexadecimal representation of transaction hash or transaction ID") date = Column(DateTime, default=datetime.utcnow, doc="Date when transaction was confirmed and included in a block. " "Or when it was created when transaction is not send or confirmed") # TODO: Add fields to allow to create full transaction # witness_type = Column(String(20), default='legacy', doc="Is this a legacy or segwit transaction?") # version = Column(Integer, default=1, # doc="Tranaction version. Default is 1 but some wallets use another version number") # locktime = Column(Integer, default=0, # doc="Transaction level locktime. Locks the transaction until a specified block " # "(value from 1 to 5 million) or until a certain time (Timestamp in seconds after 1-jan-1970)." # " Default value is 0 for transactions without locktime") # coinbase = Column(Boolean, default=False, doc="Is True when this is a coinbase transaction, default is False") confirmations = Column(Integer, default=0, doc="Number of confirmation when this transaction is included in a block. " "Default is 0: unconfirmed") block_height = Column(Integer, index=True, doc="Height of block this transaction is included in") block_hash = Column(String(64), index=True, doc="Hash of block this transaction is included in") # TODO: Remove, is redundant network_name = Column(String(20), doc="Blockchain network name of this transaction") fee = Column(BigInteger, doc="Transaction fee") raw = Column(Text(), doc="Raw transaction hexadecimal string. Transaction is included in raw format on the blockchain") nodes = relationship("DbCacheTransactionNode", cascade="all,delete", doc="List of all inputs and outputs as DbCacheTransactionNode objects") order_n = Column(Integer, doc="Order of transaction in block") class DbCacheAddress(Base): """ Address Cache Table Stores transactions and unspent outputs (UTXO's) per address """ __tablename__ = 'cache_address' address = Column(String(255), primary_key=True, doc="Address string base32 or base58 encoded") network_name = Column(String(20), doc="Blockchain network name of this transaction") balance = Column(Numeric(25, 0, asdecimal=False), default=0, doc="Total balance of UTXO's linked to this key") last_block = Column(Integer, doc="Number of last updated block") last_txid = Column(String(64), doc="Transaction ID of latest transaction in cache") n_utxos = Column(Integer, doc="Total number of UTXO's for this address") n_txs = Column(Integer, doc="Total number of transactions for this address") class DbCacheBlock(Base): """ Block Cache Table Stores block headers """ __tablename__ = 'cache_blocks' height = Column(Integer, primary_key=True, doc="Height or sequence number for this block") block_hash = Column(LargeBinary(32), index=True, doc="Hash of this block") network_name = Column(String(20), doc="Blockchain network name") version = Column(BigInteger, doc="Block version to specify which features are used (hex)") prev_block = Column(LargeBinary(32), doc="Block hash of previous block") merkle_root = Column(LargeBinary(32), doc="Merkle root used to validate transaction in block") time = Column(BigInteger, doc="Timestamp to indicated when block was created") bits = Column(BigInteger, doc="Encoding for proof-
null
1
{ "advantage_score_max": 3.889669418334961, "advantage_score_mean": 1.76712965965271, "advantage_score_min": 1.109200119972229, "advantage_score_std": 1.0646697282791138, "advantage_scores": [ 3.889669418334961, 1.3417065143585205, 1.3131972551345825, 1.1818758249282837, 1.109200119972229 ], "baseline_doc_loss": 1.0499389171600342, "baseline_truncated": false, "doc_advantage_score": 0.91496741771698, "length_change_ratio": 0.9132653061224489, "net_length_change_chars": -17, "original_sentences_length_chars": 196, "replacement_paraphrases_length_chars": 179, "sentences_perturbed": 1, "target_doc_loss": 1.147515058517456, "target_truncated": false, "threshold_passing_sentences": 5, "total_doc_length_chars": 7911, "total_sentences": 19, "truncated": false }
******************************************************* Freescale i.MX6Q and i.MX6DL SABRESD development boards ******************************************************* This file documents the Buildroot support for the Freescale SABRE Board for Smart Devices Based on the i.MX 6 Series (SABRESD). Read the SABRESD Quick Start Guide for an introduction to the board: http://cache.freescale.com/files/32bit/doc/quick_start_guide/SABRESDB_IMX6_QSG.pdf Build ===== First, configure Buildroot for your SABRESD board. For i.MX6Q: make freescale_imx6qsabresd_defconfig For i.MX6DL: make freescale_imx6dlsabresd_defconfig Build everything: make You will find the following files in ./output/images/: - imx6dl-sabresd.dtb or imx6q-sabresd.dtb - rootfs.ext2 - rootfs.tar - u-boot.imx - uImage Identify your SD card device by checking /proc/partitions: cat /proc/partitions Run this script as root on your SD card. This will partition the card and copy the bootloader, kernel, DTBs and root filesystem as needed. *** WARNING! The script will destroy all the card content. Use with care! *** ./board/freescale/imx6sabresd/create-boot-sd.sh <your-sd-device> Boot the SABRESD board ====================== To boot your newly created system (refer to the SABRESD Quick Start Guide for guidance): - insert the SD card in the SD3 slot of the board; - locate the BOOT dip switches (SW6), set dips 2 and 7 to ON, all others to OFF; - connect a Micro USB cable to Debug Port and connect using a terminal emulator at 115200 bps, 8n1; - power on the board. Enjoy! References ========== https://community.freescale.com/docs/DOC-95015 https://community.freescale.com/docs/DOC-95017 https://community.freescale.com/docs/DOC-99218
null
1
{ "advantage_score_max": 1.1706010103225708, "advantage_score_mean": 1.159606695175171, "advantage_score_min": 1.1486122608184814, "advantage_score_std": 0.010994374752044678, "advantage_scores": [ 1.1706010103225708, 1.1486122608184814 ], "baseline_doc_loss": 1.4594151973724365, "baseline_truncated": false, "doc_advantage_score": 0.9927841424942017, "length_change_ratio": 0.8085106382978723, "net_length_change_chars": -99, "original_sentences_length_chars": 517, "replacement_paraphrases_length_chars": 418, "sentences_perturbed": 1, "target_doc_loss": 1.4700226783752441, "target_truncated": false, "threshold_passing_sentences": 2, "total_doc_length_chars": 1844, "total_sentences": 10, "truncated": false }
require('../../modules/es6.array.fill'); module.exports = require('../../modules/_core').Array.fill;
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
// Boost.Geometry (aka GGL, Generic Geometry Library) // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. // Copyright (c) 2008-2012 Bruno Lalande, Paris, France. // Copyright (c) 2009-2012 Mateusz Loskot, London, UK. // Portions of Boost.Geometry are adapted from Geodan's Geographic Library (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_GEOMETRY_ALGORITHMS_PERIMETER_HPP #define BOOST_GEOMETRY_ALGORITHMS_PERIMETER_HPP #include <boost/geometry/core/cs.hpp> #include <boost/geometry/core/closure.hpp> #include <boost/geometry/geometries/concepts/check.hpp> #include <boost/geometry/strategies/default_length_result.hpp> #include <boost/geometry/algorithms/length.hpp> #include <boost/geometry/algorithms/detail/calculate_null.hpp> #include <boost/geometry/algorithms/detail/calculate_sum.hpp> // #include <boost/geometry/algorithms/detail/throw_on_empty_input.hpp> namespace boost { namespace geometry { #ifndef DOXYGEN_NO_DISPATCH namespace dispatch { // Default perimeter is 0.0, specializations implement calculated values template <typename Tag, typename Geometry, typename Strategy> struct perimeter : detail::calculate_null < typename default_length_result<Geometry>::type, Geometry, Strategy > {}; template <typename Geometry, typename Strategy> struct perimeter<ring_tag, Geometry, Strategy> : detail::length::range_length < Geometry, Strategy, closure<Geometry>::value > {}; template <typename Polygon, typename Strategy> struct perimeter<polygon_tag, Polygon, Strategy> : detail::calculate_polygon_sum < typename default_length_result<Polygon>::type, Polygon, Strategy, detail::length::range_length < typename ring_type<Polygon>::type, Strategy, closure<Polygon>::value > > {}; // box,n-sphere: to be implemented } // namespace dispatch #endif // DOXYGEN_NO_DISPATCH /*! \brief \brief_calc{perimeter} \ingroup perimeter \details The function perimeter returns the perimeter of a geometry, using the default distance-calculation-strategy \tparam Geometry \tparam_geometry \param geometry \param_geometry \return \return_calc{perimeter} \qbk{[include reference/algorithms/perimeter.qbk]} */ template<typename Geometry> inline typename default_length_result<Geometry>::type perimeter( Geometry const& geometry) { concept::check<Geometry const>(); typedef typename point_type<Geometry>::type point_type; typedef typename strategy::distance::services::default_strategy < point_tag, point_type >::type strategy_type; // detail::throw_on_empty_input(geometry); return dispatch::perimeter < typename tag<Geometry>::type, Geometry, strategy_type >::apply(geometry, strategy_type()); } /*! \brief \brief_calc{perimeter} \brief_strategy \ingroup perimeter \details The function perimeter returns the perimeter of a geometry, using specified strategy \tparam Geometry \tparam_geometry \tparam Strategy \tparam_strategy{distance} \param geometry \param_geometry \param strategy strategy to be used for distance calculations. \return \return_calc{perimeter} \qbk{distinguish,with strategy} \qbk{[include reference/algorithms/perimeter.qbk]} */ template<typename Geometry, typename Strategy> inline typename default_length_result<Geometry>::type perimeter( Geometry const& geometry, Strategy const& strategy) { concept::check<Geometry const>(); // detail::throw_on_empty_input(geometry); return dispatch::perimeter < typename tag<Geometry>::type, Geometry, Strategy >::apply(geometry, strategy); } }} // namespace boost::geometry #endif // BOOST_GEOMETRY_ALGORITHMS_PERIMETER_HPP
null
1
{ "advantage_score_max": 2.047626256942749, "advantage_score_mean": 2.047626256942749, "advantage_score_min": 2.047626256942749, "advantage_score_std": 0, "advantage_scores": [ 2.047626256942749 ], "baseline_doc_loss": 0.5748519897460938, "baseline_truncated": false, "doc_advantage_score": 1.5476068258285522, "length_change_ratio": 0.9801324503311258, "net_length_change_chars": -3, "original_sentences_length_chars": 151, "replacement_paraphrases_length_chars": 148, "sentences_perturbed": 1, "target_doc_loss": 0.37144574522972107, "target_truncated": false, "threshold_passing_sentences": 1, "total_doc_length_chars": 4205, "total_sentences": 9, "truncated": false }
<html> <body> JSR303 Bean Validation相关工具类,当然JSR303主要实现是Hibernate Validator </body> </html>
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
{ "name": "@datafire/wmata_rail_station", "version": "5.0.0", "main": "index.js", "description": "DataFire integration for Rail Station Information", "repository": { "type": "git", "url": "git+https://github.com/DataFire/integrations.git" }, "author": "DataFire", "license": "MIT", "bugs": { "url": "https://github.com/DataFire/integrations/issues" }, "homepage": "https://github.com/DataFire/integrations#readme", "datafire": { "origin": "https://api.apis.guru/v2/specs/wmata.com/rail-station/1.0/swagger.json", "type": "openapi" }, "peerDependencies": { "datafire": "^2.0.0" }, "dependencies": { "datafire": "^2.0.0" } }
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
/******************************************************************************* * Copyright © 2016 NFine.Framework 版权所有 * Author: NFine * Description: NFine快速开发平台 * Website:http://www.nfine.cn *********************************************************************************/ using System; using System.Collections.Generic; using System.Linq; namespace NFine.Code { public static partial class Ext { #region 数值转换 /// <summary> /// 转换为整型 /// </summary> /// <param name="data">数据</param> public static int ToInt(this object data) { if (data == null) return 0; int result; var success = int.TryParse(data.ToString(), out result); if (success) return result; try { return Convert.ToInt32(ToDouble(data, 0)); } catch (Exception) { return 0; } } /// <summary> /// 转换为可空整型 /// </summary> /// <param name="data">数据</param> public static int? ToIntOrNull(this object data) { if (data == null) return null; int result; bool isValid = int.TryParse(data.ToString(), out result); if (isValid) return result; return null; } /// <summary> /// 转换为双精度浮点数 /// </summary> /// <param name="data">数据</param> public static double ToDouble(this object data) { if (data == null) return 0; double result; return double.TryParse(data.ToString(), out result) ? result : 0; } /// <summary> /// 转换为双精度浮点数,并按指定的小数位4舍5入 /// </summary> /// <param name="data">数据</param> /// <param name="digits">小数位数</param> public static double ToDouble(this object data, int digits) { return Math.Round(ToDouble(data), digits); } /// <summary> /// 转换为可空双精度浮点数 /// </summary> /// <param name="data">数据</param> public static double? ToDoubleOrNull(this object data) { if (data == null) return null; double result; bool isValid = double.TryParse(data.ToString(), out result); if (isValid) return result; return null; } /// <summary> /// 转换为高精度浮点数 /// </summary> /// <param name="data">数据</param> public static decimal ToDecimal(this object data) { if (data == null) return 0; decimal result; return decimal.TryParse(data.ToString(), out result) ? result : 0; } /// <summary> /// 转换为高精度浮点数,并按指定的小数位4舍5入 /// </summary> /// <param name="data">数据</param> /// <param name="digits">小数位数</param> public static decimal ToDecimal(this object data, int digits) { return Math.Round(ToDecimal(data), digits); } /// <summary> /// 转换为可空高精度浮点数 /// </summary> /// <param name="data">数据</param> public static decimal? ToDecimalOrNull(this object data) { if (data == null) return null; decimal result; bool isValid = decimal.TryParse(data.ToString(), out result); if (isValid) return result; return null; } /// <summary> /// 转换为可空高精度浮点数,并按指定的小数位4舍5入 /// </summary> /// <param name="data">数据</param> /// <param name="digits">小数位数</param> public static decimal? ToDecimalOrNull(this object data, int digits) { var result = ToDecimalOrNull(data); if (result == null) return null; return Math.Round(result.Value, digits); } #endregion #region 日期转换 /// <summary> /// 转换为日期 /// </summary> /// <param name="data">数据</param> public static DateTime ToDate(this object data) { if (data == null) return DateTime.MinValue; DateTime result; return DateTime.TryParse(data.ToString(), out result) ? result : DateTime.MinValue; } /// <summary> /// 转换为可空日期 /// </summary> /// <param name="data">数据</param> public static DateTime? ToDateOrNull(this object data) { if (data == null) return null; DateTime result; bool isValid = DateTime.TryParse(data.ToString(), out result); if (isValid) return result; return null; } #endregion #region 布尔转换 /// <summary> /// 转换为布尔值 /// </summary> /// <param name="data">数据</param> public static bool ToBool(this object data) { if (data == null) return false; bool? value = GetBool(data); if (value != null) return value.Value; bool result; return bool.TryParse(data.ToString(), out result) && result; } /// <summary> /// 获取布尔值 /// </summary> private static bool? GetBool(this object data) { switch (data.ToString().Trim().ToLower()) { case "0": return false; case "1": return true; case "是": return true; case "否": return false; case "yes": return true; case "no": return false; default: return null; } } /// <summary> /// 转换为可空布尔值 /// </summary> /// <param name="data">数据</param> public static bool? ToBoolOrNull(this object data) { if (data == null) return null; bool? value = GetBool(data); if (value != null) return value.Value; bool result; bool isValid = bool.TryParse(data.ToString(), out result); if (isValid) return result; return null; } #endregion #region 字符串转换 /// <summary> /// 转换为字符串 /// </summary> /// <param name="data">数据</param> public static string ToString(this object data) { return data == null ? string.Empty : data.ToString().Trim(); } #endregion /// <summary> /// 安全返回值 /// </summary> /// <param name="value">可空值</param> public static T SafeValue<T>(this T? value) where T : struct { return value ?? default(T); } /// <summary> /// 是否为空 /// </summary> /// <param name="value">值</param> public static bool IsEmpty(this string value) { return string.IsNullOrWhiteSpace(value); } /// <summary> /// 是否为空
null
0
{ "advantage_score_max": 4.845763683319092, "advantage_score_mean": 2.0105621814727783, "advantage_score_min": 1.2239879369735718, "advantage_score_std": 1.2927826642990112, "advantage_scores": [ 4.845763683319092, 1.9572006464004517, 1.5083036422729492, 1.2865087985992432, 1.2416082620620728, 1.2239879369735718 ], "baseline_doc_loss": 0.286965936422348, "baseline_truncated": false, "doc_advantage_score": 1.0561729669570923, "length_change_ratio": 1, "net_length_change_chars": 0, "original_sentences_length_chars": 0, "replacement_paraphrases_length_chars": 0, "sentences_perturbed": 0, "target_doc_loss": 0.2717035412788391, "target_truncated": false, "threshold_passing_sentences": 6, "total_doc_length_chars": 7389, "total_sentences": 16, "truncated": false }
/* Copyright 2017 R. Thomas * Copyright 2017 Quarkslab * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "LIEF/DEX/hash.hpp" #include "LIEF/DEX.hpp" namespace LIEF { namespace DEX { Hash::~Hash(void) = default; size_t Hash::hash(const Object& obj) { return LIEF::Hash::hash<LIEF::DEX::Hash>(obj); } void Hash::visit(const File& file) { this->process(file.location()); this->process(file.header()); this->process(std::begin(file.classes()), std::end(file.classes())); this->process(std::begin(file.methods()), std::end(file.methods())); this->process(std::begin(file.strings()), std::end(file.strings())); } void Hash::visit(const Header& header) { this->process(header.magic()); this->process(header.checksum()); this->process(header.signature()); this->process(header.file_size()); this->process(header.header_size()); this->process(header.endian_tag()); this->process(header.strings()); this->process(header.link()); this->process(header.types()); this->process(header.prototypes()); this->process(header.fields()); this->process(header.methods()); this->process(header.classes()); this->process(header.data()); } void Hash::visit(const CodeInfo& /*code_info*/) { } void Hash::visit(const Class& cls) { it_const_methods methods = cls.methods(); this->process(cls.fullname()); this->process(cls.source_filename()); this->process(cls.access_flags()); this->process(std::begin(methods), std::end(methods)); } void Hash::visit(const Method& method) { this->process(method.name()); this->process(method.bytecode()); this->process(method.prototype()); } void Hash::visit(const Type& type) { switch (type.type()) { case Type::TYPES::ARRAY: { this->process(type.dim()); this->process(type.underlying_array_type()); break; } case Type::TYPES::PRIMITIVE: { this->process(type.primitive()); break; } case Type::TYPES::CLASS: { this->process(type.cls().fullname()); break; } case Type::TYPES::UNKNOWN: default: { this->process(Type::TYPES::UNKNOWN); } } } void Hash::visit(const Prototype& type) { this->process(type.return_type()); this->process( std::begin(type.parameters_type()), std::end(type.parameters_type())); } void Hash::visit(const MapItem& item) { this->process(item.size()); this->process(item.offset()); this->process(item.reserved()); this->process(item.type()); } void Hash::visit(const MapList& list) { this->process(std::begin(list.items()), std::end(list.items())); } } // namespace DEX } // namespace LIEF
null
1
{ "advantage_score_max": 3.3188257217407227, "advantage_score_mean": 3.3188257217407227, "advantage_score_min": 3.3188257217407227, "advantage_score_std": 0, "advantage_scores": [ 3.3188257217407227 ], "baseline_doc_loss": 0.728492021560669, "baseline_truncated": false, "doc_advantage_score": 1.1871453523635864, "length_change_ratio": 1, "net_length_change_chars": 0, "original_sentences_length_chars": 313, "replacement_paraphrases_length_chars": 313, "sentences_perturbed": 1, "target_doc_loss": 0.6136502027511597, "target_truncated": false, "threshold_passing_sentences": 1, "total_doc_length_chars": 3182, "total_sentences": 4, "truncated": false }
# Copyright 2007 The Apache Software Foundation # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Set environment variables here. # This script sets variables multiple times over the course of starting an hbase process, # so try to keep things idempotent unless you want to take an even deeper look # into the startup scripts (bin/hbase, etc.) # The java implementation to use. Java 1.6 required. export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 # Extra Java CLASSPATH elements. Optional. # export HBASE_CLASSPATH= # The maximum amount of heap to use, in MB. Default is 1000. # export HBASE_HEAPSIZE=1000 # Extra Java runtime options. # Below are what we set by default. May only work with SUN JVM. # For more on why as well as other possible settings, # see http://wiki.apache.org/hadoop/PerformanceTuning export HBASE_OPTS="-XX:+UseConcMarkSweepGC" # Uncomment one of the below three options to enable java garbage collection logging for the server-side processes. # This enables basic gc logging to the .out file. # export SERVER_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps" # This enables basic gc logging to its own file. # If FILE-PATH is not replaced, the log file(.gc) would still be generated in the HBASE_LOG_DIR . # export SERVER_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:<FILE-PATH>" # This enables basic GC logging to its own file with automatic log rolling. Only applies to jdk 1.6.0_34+ and 1.7.0_2+. If FILE-PATH is not specified, the log file (.gc) will still be created in the HBASE_LOG_DIR. # export SERVER_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:<FILE-PATH> -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=1 -XX:GCLogFileSize=512M" # Uncomment one of the below three options to enable java garbage collection logging for the client processes. # This enables basic gc logging to the .out file. # export CLIENT_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps" # This enables basic gc logging to its own file. # If FILE-PATH is not replaced, the log file(.gc) would still be generated in the HBASE_LOG_DIR . # export CLIENT_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:<FILE-PATH>" # This enables basic GC logging to its own file with automatic log rolling. Only applies to jdk 1.6.0_34+ and 1.7.0_2+. # If FILE-PATH is not replaced, the log file(.gc) would still be generated in the HBASE_LOG_DIR . # export CLIENT_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:<FILE-PATH> -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=1 -XX:GCLogFileSize=512M" # Uncomment below if you intend to use the EXPERIMENTAL off heap cache. # export HBASE_OPTS="$HBASE_OPTS -XX:MaxDirectMemorySize=" # Set hbase.offheapcache.percentage in hbase-site.xml to a nonzero value. # Uncomment and adjust to enable JMX exporting # See jmxremote.password and jmxremote.access in $JRE_HOME/lib/management to configure remote password access. # More details at: http://java.sun.com/javase/6/docs/technotes/guides/management/agent.html # NOTE: HBase provides an alternative JMX implementation to fix the random ports issue, please see JMX # section in HBase Reference Guide for instructions. # ex# Example [ALTERNATIVE: # export HBASE_JMX_BASE="-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false" # export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10101" # export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10102" # export HBASE_THRIFT_OPTS="$HBASE_THRIFT_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10103" # export HBASE_ZOOKEEPER_OPTS="$HBASE_ZOOKEEPER_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10104" # export HBASE_REST_OPTS="$HBASE_REST_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10105" # File listing hosts on which HRegionServers will run.].BASE_HOME/conf/regionservers by default. # export HBASE_REGIONSERVERS=${HBASE_HOME}/conf/regionservers # Uncomment and adjust to keep all the Region Server pages mapped to be memory resident #HBASE_REGIONSERVER_MLOCK=true #HBASE_REGIONSERVER_UID="hbase" # File naming hosts on which backup HMaster will run. $HBASE_HOME/conf/backup-masters by default. # export HBASE_BACKUP_MASTERS=${HBASE_HOME}/conf/backup-masters # Extra ssh options. Empty by default. # export HBASE_SSH_OPTS="-o ConnectTimeout=1 -o SendEnv=HBASE_CONF_DIR" # Where log files are stored. $HBASE_HOME/logs by default. # export HBASE_LOG_DIR=${HBASE_HOME}/logs # Enable remote JDWP debugging of major HBase processes. Meant for Core Developers # export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8070" # export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8071" # export HBASE_THRIFT_OPTS="$HBASE_THRIFT_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8072" # export HBASE_ZOOKEEPER_OPTS="$HBASE_ZOOKEEPER_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8073" # A string representing this instance of hbase. $USER by default. # export HBASE_IDENT_STRING=$USER # The scheduling priority for daemon processes. See 'man nice'. # export HBASE_NICENESS=10 # The directory where pid files are stored. /tmp by default. # export HBASE_PID_DIR=/var/hadoop/pids # Seconds to sleep between slave commands. Unset by default. This # can be useful
null
2
{ "advantage_score_max": 6.1414794921875, "advantage_score_mean": 2.2440688610076904, "advantage_score_min": 1.1203689575195312, "advantage_score_std": 1.319727897644043, "advantage_scores": [ 6.1414794921875, 3.06036376953125, 2.6732349395751953, 2.5695149898529053, 2.0184974670410156, 1.9346572160720825, 1.8539093732833862, 1.7324035167694092, 1.5478830337524414, 1.1500824689865112, 1.12643301486969, 1.1203689575195312 ], "baseline_doc_loss": 0.7208712100982666, "baseline_truncated": false, "doc_advantage_score": 0.9454520344734192, "length_change_ratio": 1.0283251231527093, "net_length_change_chars": 23, "original_sentences_length_chars": 812, "replacement_paraphrases_length_chars": 835, "sentences_perturbed": 2, "target_doc_loss": 0.7624619603157043, "target_truncated": false, "threshold_passing_sentences": 12, "total_doc_length_chars": 6306, "total_sentences": 52, "truncated": false }
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that is included in the LICENSE file. // +build 386,darwin package unix import ( "syscall" ) //sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error) func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: int32(sec), Nsec: int32(nsec)} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: int32(sec), Usec: int32(usec)} } func SetKevent(k *Kevent_t, fd, mode, flags int) { k.Ident = uint32(fd) k.Filter = int16(mode) k.Flags = uint16(flags) } func (iov *Iovec) SetLen(length int) { iov.Len = uint32(length) } func (msghdr *Msghdr) SetControllen(length int) { msghdr.Controllen = uint32(length) } func (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = int32(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions // of darwin/386 the syscall is called sysctl instead of __sysctl. const SYS___SYSCTL = SYS_SYSCTL //sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64 //sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64 //sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64 //sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64 //sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64 //sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64 //sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
null
1
{ "advantage_score_max": 1.6745189428329468, "advantage_score_mean": 1.535575270652771, "advantage_score_min": 1.4301646947860718, "advantage_score_std": 0.10253652930259705, "advantage_scores": [ 1.6745189428329468, 1.5020419359207153, 1.4301646947860718 ], "baseline_doc_loss": 0.8229342699050903, "baseline_truncated": false, "doc_advantage_score": 31.384794235229492, "length_change_ratio": 0.9611650485436893, "net_length_change_chars": -4, "original_sentences_length_chars": 103, "replacement_paraphrases_length_chars": 99, "sentences_perturbed": 1, "target_doc_loss": 0.026220794767141342, "target_truncated": false, "threshold_passing_sentences": 3, "total_doc_length_chars": 1718, "total_sentences": 5, "truncated": false }
import getLatestNewsItems from './get-latest-news-items'; describe('getLatestNewsItems', () => { const response = { items: [ { url: '/_news/news-item-1', date_modified: '2020-04-29T00:00:00.000Z', }, { url: '/_news/news-item-2', date_modified: '2020-04-28T00:00:00.000Z', }, { url: '/_news/news-item-3', date_modified: '2020-04-27T00:00:00.000Z', }, ], }; it('should return all newsItems from response when newsLastUpdated is undefined.', () => { const newsLastUpdated = undefined; const output = getLatestNewsItems({ newsLastUpdated, response }); expect(output).toEqual([ { url: '/news/news-item-1', date_modified: '2020-04-29T00:00:00.000Z', }, { url: '/news/news-item-2', date_modified: '2020-04-28T00:00:00.000Z', }, { url: '/news/news-item-3', date_modified: '2020-04-27T00:00:00.000Z', }, ]); }); it('should return a subset of newsItems from response when newsLastUpdated is a date before the latest item in the newsItems list.', () => { const newsLastUpdated = '2020-04-27T00:00:00.000Z'; const output = getLatestNewsItems({ newsLastUpdated, response }); expect(output).toEqual([ { url: '/news/news-item-1', date_modified: '2020-04-29T00:00:00.000Z', }, { url: '/news/news-item-2', date_modified: '2020-04-28T00:00:00.000Z', }, ]); }); it('should return an empty newsItems from response when newsLastUpdated matches the date of the latest item.', () => { const newsLastUpdated = '2020-04-29T00:00:00.000Z'; const output = getLatestNewsItems({ newsLastUpdated, response }); expect(output).toEqual([]); }); });
null
0
{ "advantage_score_max": 0, "advantage_score_mean": 0, "advantage_score_min": 0, "advantage_score_std": 0, "advantage_scores": [], "baseline_doc_loss": 0.4091407060623169, "baseline_truncated": false, "doc_advantage_score": 0.9823706746101379, "length_change_ratio": 1, "net_length_change_chars": 0, "original_sentences_length_chars": 0, "replacement_paraphrases_length_chars": 0, "sentences_perturbed": 0, "target_doc_loss": 0.4164830148220062, "target_truncated": false, "threshold_passing_sentences": 0, "total_doc_length_chars": 1815, "total_sentences": 4, "truncated": false }
<!-- Copyright World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. Please see the full Copyright clause at <http://www.w3.org/Consortium/Legal/copyright-software.html> $Id: test016.rdf,v 1.1 2002/07/26 04:26:56 jcarroll Exp $ --> <!-- Description: Like test001.rdf but with a processing instruction as the only content of the otherwise empty element. Author: Jeremy Carroll --> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:random="http://random.ioctl.org/#"> <rdf:Description rdf:about="http://random.ioctl.org/#bar"> <random:someProperty rdf:resource="http://random.ioctl.org/#foo"><?a processing instruction?></random:someProperty> </rdf:Description> </rdf:RDF>
null
0
{ "advantage_score_max": 0, "advantage_score_mean": 0, "advantage_score_min": 0, "advantage_score_std": 0, "advantage_scores": [], "baseline_doc_loss": 1.5218061208724976, "baseline_truncated": false, "doc_advantage_score": 1.8543390035629272, "length_change_ratio": 1, "net_length_change_chars": 0, "original_sentences_length_chars": 0, "replacement_paraphrases_length_chars": 0, "sentences_perturbed": 0, "target_doc_loss": 0.8206731081008911, "target_truncated": false, "threshold_passing_sentences": 0, "total_doc_length_chars": 855, "total_sentences": 4, "truncated": false }
<!DOCTYPE html> <html> <head> <title>F.VERT.RE-Funktion</title> <meta charset="utf-8" /> <meta name="description" content="" /> <link type="text/css" rel="stylesheet" href="../editor.css" /> <script type="text/javascript" src="../callback.js"></script> <script type="text/javascript" src="../search/js/page-search.js"></script> </head> <body> <div class="mainpart"> <div class="search-field"> <input id="search" class="searchBar" placeholder="Suche" type="text" onkeypress="doSearch(event)"> </div> <h1>F.VERT.RE-Funktion</h1> <p>Die Funktion <b>F.VERT.RE</b> gehört zur Gruppe der statistischen Funktionen. Sie wird verwendet, um die (rechtsseitige) F-Wahrscheinlichkeitsverteilung (Grad der Diversität) für zwei Datensätze zurückzugeben. Mit dieser Funktion können Sie feststellen, ob zwei Datenmengen unterschiedlichen Streuungen unterliegen.</p> <p>Die Formelsyntax der Funktion <b>F.VERT.RE</b> ist:</p> <p style="text-indent: 150px;"><b><em>F.VERT.RE(x;Freiheitsgrade1;Freiheitsgrade2)</em></b></p> <p><em>Dabei gilt:</em></p> <p style="text-indent: 50px;"><b><em>x</em></b> ist der Wert, für den die Funktion ausgewertet werden soll. Ein nummerischer Wert, der größer ist als 0.</p> <p style="text-indent: 50px;"><b><em>Freiheitsgrade1</em></b> ist die Anzahl der Freiheitsgrade im Zähler. Ein numerischer Wert, der größer als 1 und kleiner als 10^10 ist. Ein nummerischer Wert, der größer ist als 1 und kleiner als 10^10.</p> <p>Die Argumente werden manuell eingegeben oder sind in die Zelle eingeschlossen, auf die Sie Bezug nehmen.</p> <p>Anwendung der Funktion <b>F.VERT.RE</b>:</p> <ol> <li>Wählen Sie die gewünschte Zelle für die Ergebnisanzeige aus.</li> <li>Klicken Sie auf das Symbol <b>Funktion einfügen</b> <img alt="Funktion einfügen" src="../images/insertfunction.png" /> auf der oberen Symbolleiste <br />oder klicken Sie mit der rechten Maustaste in die gewünschte Zelle und wählen Sie die Option <b>Funktion einfügen</b> aus dem Kontextenü aus <br />oder klicken Sie auf das Symbol <img alt="Funktion" src="../images/function.png" /> auf der Formelleiste.</li> <li>Wählen Sie die Gruppe <b>Statistische</b> Funktionen aus der Liste aus.</li> <li>Klicken Sie auf die Funktion <b>F.VERT.RE</b>.</li> <li>Geben Sie die erforderlichen Argumente ein und trennen Sie diese durch Kommas.</li> <li>Drücken Sie die <b>Eingabetaste</b>.</li> </ol> <p>Das Ergebnis wird in der gewählten Zelle angezeigt.</p> <p style="text-indent: 150px;"><img alt="F.VERT.RE-Funktion" src="../images/f-dist-rt.png" /></p> </div> </body> </html>
null
1
{ "advantage_score_max": 1.2763583660125732, "advantage_score_mean": 1.2763583660125732, "advantage_score_min": 1.2763583660125732, "advantage_score_std": 0, "advantage_scores": [ 1.2763583660125732 ], "baseline_doc_loss": 1.0308762788772583, "baseline_truncated": false, "doc_advantage_score": 2.8506898880004883, "length_change_ratio": 0.3611111111111111, "net_length_change_chars": -115, "original_sentences_length_chars": 180, "replacement_paraphrases_length_chars": 65, "sentences_perturbed": 1, "target_doc_loss": 0.3616234362125397, "target_truncated": false, "threshold_passing_sentences": 1, "total_doc_length_chars": 2789, "total_sentences": 6, "truncated": false }
export * from './src/public_api';
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
// Copyright 2007-2008 The Apache Software Foundation. // // Licensed under the Apache License, Version 2.0 (the "License"); you may not use // this file except in compliance with the License. You can view a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. namespace Magnum.FileSystem { using System.Reflection; public class DotNetInstallationDirectory : DotNetDirectory, InstallationDirectory { public DotNetInstallationDirectory() : base(GetInstallPath()) { } static DirectoryName GetInstallPath() { return FileName.GetFileName(Assembly.GetEntryAssembly().Location).GetDirectoryName(); } } }
null
1
{ "advantage_score_max": 9.343607902526855, "advantage_score_mean": 9.021097183227539, "advantage_score_min": 8.698587417602539, "advantage_score_std": 0.3225102424621582, "advantage_scores": [ 9.343607902526855, 8.698587417602539 ], "baseline_doc_loss": 0.9488983750343323, "baseline_truncated": false, "doc_advantage_score": 1.6744498014450073, "length_change_ratio": 0.8841463414634146, "net_length_change_chars": -38, "original_sentences_length_chars": 328, "replacement_paraphrases_length_chars": 290, "sentences_perturbed": 1, "target_doc_loss": 0.5666926503181458, "target_truncated": false, "threshold_passing_sentences": 2, "total_doc_length_chars": 1086, "total_sentences": 5, "truncated": false }
// // Copyright (c) 2017-present, ViroMedia, Inc. // All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. package com.viro.core; /** * Callback interface for responding to click events, which occur when any Controller button is * clicked. */ public interface ClickListener { /** * Callback when a click event is registered over the given {@link Node}. * * @param source The platform specific source ID, which indicates what button or * component on the Controller triggered the event. See the Controller's * Guide for information. * @param node The {@link Node} that was clicked. * @param location The location of the event in world coordinates. */ void onClick(int source, Node node, Vector location); /** * Callback when the {@link ClickState} is changed over the given {@link Node}. This callback is * for receiving fine-grained information about a click: when the pointer goes down, when it * goes up, and if/when the 'click' itself is registered. For a completed click, this callback * is invoked <i>three</i> times: on {@link ClickState#CLICK_DOWN}, {@link ClickState#CLICK_UP}, * and then for {@link ClickState#CLICKED}. * <p> * To simply listen for click events, use {@link #onClick(int, Node, Vector)}. * * @param source The platform specific source ID, which indicates what button or component * on the Controller triggered the event. See the Controller's Guide for * information. * @param node The {@link Node} that was clicked. * @param clickState The status of the click event. * @param location The location of the event in world coordinates. */ void onClickState(int source, Node node, ClickState clickState, Vector location); }
null
1
{ "advantage_score_max": 6.97026252746582, "advantage_score_mean": 4.070605754852295, "advantage_score_min": 2.0838863849639893, "advantage_score_std": 1.6265619993209839, "advantage_scores": [ 6.97026252746582, 4.149348258972168, 4.008090496063232, 3.141441583633423, 2.0838863849639893 ], "baseline_doc_loss": 0.7953233122825623, "baseline_truncated": false, "doc_advantage_score": 1.1111942529678345, "length_change_ratio": 0.8657407407407407, "net_length_change_chars": -29, "original_sentences_length_chars": 216, "replacement_paraphrases_length_chars": 187, "sentences_perturbed": 1, "target_doc_loss": 0.7157374024391174, "target_truncated": false, "threshold_passing_sentences": 5, "total_doc_length_chars": 2943, "total_sentences": 20, "truncated": false }
#!/usr/bin/env bash source="${BASH_SOURCE[0]}" # resolve $source until the file is no longer a symlink while [[ -h "$source" ]]; do scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" source="$(readlink "$source")" # if $source was a relative symlink, we need to resolve it relative to the path where the # symlink file was located [[ $source != /* ]] && source="$scriptroot/$source" done scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" . "$scriptroot/tools.sh" version='Latest' architecture='' runtime='dotnet' runtimeSourceFeed='' runtimeSourceFeedKey='' while [[ $# > 0 ]]; do opt="$(echo "$1" | awk '{print tolower($0)}')" case "$opt" in -version|-v) shift version="$1" ;; -architecture|-a) shift architecture="$1" ;; -runtime|-r) shift runtime="$1" ;; -runtimesourcefeed) shift runtimeSourceFeed="$1" ;; -runtimesourcefeedkey) shift runtimeSourceFeedKey="$1" ;; *) Write-PipelineTelemetryError -Category 'Build' -Message "Invalid argument: $1" exit 1 ;; esac shift done # Use uname to determine what the CPU is. cpuname=$(uname -p) # Some Linux platforms report unknown for platform, but the arch for machine. if [[ "$cpuname" == "unknown" ]]; then cpuname=$(uname -m) fi case $cpuname in aarch64) buildarch=arm64 ;; amd64|x86_64) buildarch=x64 ;; armv*l) buildarch=arm ;; i686) buildarch=x86 ;; *) echo "Unknown CPU $cpuname detected, treating it as x64" buildarch=x64 ;; esac dotnetRoot="$repo_root/.dotnet" if [[ $architecture != "" ]] && [[ $architecture != $buildarch ]]; then dotnetRoot="$dotnetRoot/$architecture" fi InstallDotNet $dotnetRoot $version "$architecture" $runtime true $runtimeSourceFeed $runtimeSourceFeedKey || { local exit_code=$? Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2 ExitWithExitCode $exit_code } ExitWithExitCode 0
null
0
{ "advantage_score_max": 0, "advantage_score_mean": 0, "advantage_score_min": 0, "advantage_score_std": 0, "advantage_scores": [], "baseline_doc_loss": 1.0202083587646484, "baseline_truncated": false, "doc_advantage_score": 1.4265905618667603, "length_change_ratio": 1, "net_length_change_chars": 0, "original_sentences_length_chars": 0, "replacement_paraphrases_length_chars": 0, "sentences_perturbed": 0, "target_doc_loss": 0.7151374816894531, "target_truncated": false, "threshold_passing_sentences": 0, "total_doc_length_chars": 2067, "total_sentences": 6, "truncated": false }
(ns bootleg.core-test (:require [clojure.test :refer :all] [bootleg.core :refer :all] [bootleg.hiccup :refer :all] [bootleg.yaml :refer :all] [bootleg.json :refer :all])) (deftest slurp-test (testing "test slurp returns string" (is (= (slurp "test/files/simple.md") (process-hiccup-data [] "./" "(slurp \"test/files/simple.md\")"))) (is (= (slurp "test/files/simple.md") (process-hiccup-data [] "./test/files/" "(slurp \"simple.md\")"))) (is (= (slurp "test/files/simple.md") (process-hiccup-data [] "./test/files/" "(slurp \"https://raw.githubusercontent.com/retrogradeorbit/bootleg/master/test/files/simple.md\")"))))) (deftest yaml-test (testing "test yaml function" (is (= (yaml " foo: bar baz: - one - two " :data) {:foo "bar" :baz ["one" "two"]})))) (deftest json-test (testing "test json function" (is (= (json " { \"foo\": \"bar\", \"baz\": [\"one\", \"two\"] } " :data) {:foo "bar" :baz ["one" "two"]}))))
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
#!/bin/sh ( echo "extern const char QUEUE_DIR[]=\"$1\";" echo "extern const char CONFIG_DIR[]=\"$2\";" echo "extern const char PROTOCOLS_DIR[]=\"$3\";" echo "extern const char BIN_DIR[]=\"$4\";" echo "extern const char SBIN_DIR[]=\"$5\";" ) > defines.cc
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by client-gen. DO NOT EDIT. package v1 import ( "time" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" ) // PodsGetter has a method to return a PodInterface. // A group's client should implement this interface. type PodsGetter interface { Pods(namespace string) PodInterface } // PodInterface has methods to work with Pod resources. type PodInterface interface { Create(*v1.Pod) (*v1.Pod, error) Update(*v1.Pod) (*v1.Pod, error) UpdateStatus(*v1.Pod) (*v1.Pod, error) Delete(name string, options *metav1.DeleteOptions) error DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error Get(name string, options metav1.GetOptions) (*v1.Pod, error) List(opts metav1.ListOptions) (*v1.PodList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error) GetEphemeralContainers(podName string, options metav1.GetOptions) (*v1.EphemeralContainers, error) UpdateEphemeralContainers(podName string, ephemeralContainers *v1.EphemeralContainers) (*v1.EphemeralContainers, error) PodExpansion } // pods implements PodInterface type pods struct { client rest.Interface ns string } // newPods returns a Pods func newPods(c *CoreV1Client, namespace string) *pods { return &pods{ client: c.RESTClient(), ns: namespace, } } // Get takes name of the pod, and returns the corresponding pod object, and an error if there is any. func (c *pods) Get(name string, options metav1.GetOptions) (result *v1.Pod, err error) { result = &v1.Pod{} err = c.client.Get(). Namespace(c.ns). Resource("pods"). Name(name). VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of Pods that match those selectors. func (c *pods) List(opts metav1.ListOptions) (result *v1.PodList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second } result = &v1.PodList{} err = c.client.Get(). Namespace(c.ns). Resource("pods"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested pods. func (c *pods) Watch(opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second } opts.Watch = true return c.client.Get(). Namespace(c.ns). Resource("pods"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). Watch() } // Create takes the representation of a pod and creates it. Returns the server's representation of the pod, and an error, if there is any. func (c *pods) Create(pod *v1.Pod) (result *v1.Pod, err error) { result = &v1.Pod{} err = c.client.Post(). Namespace(c.ns). Resource("pods"). Body(pod). Do(). Into(result) return } // Update takes the representation of a pod and updates it. Returns the server's representation of the pod, and an error, if there is any. func (c *pods) Update(pod *v1.Pod) (result *v1.Pod, err error) { result = &v1.Pod{} err = c.client.Put(). Namespace(c.ns). Resource("pods"). Name(pod.Name). Body(pod). Do(). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). func (c *pods) UpdateStatus(pod *v1.Pod) (result *v1.Pod, err error) { result = &v1.Pod{} err = c.client.Put(). Namespace(c.ns). Resource("pods"). Name(pod.Name). SubResource("status"). Body(pod). Do(). Into(result) return } // Delete takes name of the pod and deletes it. Returns an error if one occurs. func (c *pods) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("pods"). Name(name). Body(options). Do(). Error() } // DeleteCollection deletes a collection of objects. func (c *pods) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { var timeout time.Duration if listOptions.TimeoutSeconds != nil { timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("pods"). VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). Do(). Error() } // Patch applies the patch and returns the patched pod. func (c *pods) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error) { result = &v1.Pod{} err = c.client.Patch(pt). Namespace(c.ns). Resource("pods"). SubResource(subresources...). Name(name). Body(data). Do(). Into(result) return } // GetEphemeralContainers takes name of the pod, and returns the corresponding v1.EphemeralContainers object, and an error if there is any. func (c *pods) GetEphemeralContainers(podName string, options metav1.GetOptions) (result *v1.EphemeralContainers, err error) { result = &v1.EphemeralContainers{} err = c.client.Get(). Namespace(c.ns). Resource("pods"). Name(podName). SubResource("ephemeralcontainers"). VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // UpdateEphemeralContainers takes the
null
0
{ "advantage_score_max": 7.628468990325928, "advantage_score_mean": 2.91965651512146, "advantage_score_min": 1.1510820388793945, "advantage_score_std": 1.8797203302383423, "advantage_scores": [ 7.628468990325928, 6.56880521774292, 4.109776020050049, 4.021982669830322, 3.829580307006836, 3.267686367034912, 2.995626211166382, 2.4941165447235107, 1.8988906145095825, 1.8803131580352783, 1.5196179151535034, 1.4492933750152588, 1.4467333555221558, 1.234703540802002, 1.2178269624710083, 1.1510820388793945 ], "baseline_doc_loss": 0.11014290899038315, "baseline_truncated": false, "doc_advantage_score": 7.927775859832764, "length_change_ratio": 1, "net_length_change_chars": 0, "original_sentences_length_chars": 0, "replacement_paraphrases_length_chars": 0, "sentences_perturbed": 0, "target_doc_loss": 0.013893292285501957, "target_truncated": false, "threshold_passing_sentences": 16, "total_doc_length_chars": 6174, "total_sentences": 85, "truncated": false }
X-Account-Key: account5 X-UIDL: GmailId128877bcfcbafeb1 X-Mozilla-Status: 0000 X-Mozilla-Status2: 00000000 X-Mozilla-Keys: Delivered-To: mlsubscriber.tech@csmining.org Received: by 10.142.81.20 with SMTP id e20cs62883wfb; Tue, 11 May 2010 06:09:18 -0700 (PDT) Received: by 10.223.64.194 with SMTP id f2mr6351950fai.2.1273583357923; Tue, 11 May 2010 06:09:17 -0700 (PDT) Return-Path: <bounce-debian-user=mlsubscriber.tech=csmining.org@lists.debian.org> Received: from liszt.debian.org (liszt.debian.org [82.195.75.100]) by mx.google.com with ESMTP id g5si11239206fai.85.2010.05.11.06.09.17; Tue, 11 May 2010 06:09:17 -0700 (PDT) Received-SPF: pass (google.com: manual fallback record for domain of bounce-debian-user=mlsubscriber.tech=csmining.org@lists.debian.org designates 82.195.75.100 as permitted sender) client-ip=82.195.75.100; Authentication-Results: mx.google.com; spf=pass (google.com: manual fallback record for domain of bounce-debian-user=mlsubscriber.tech=csmining.org@lists.debian.org designates 82.195.75.100 as permitted sender) smtp.mail=bounce-debian-user=mlsubscriber.tech=csmining.org@lists.debian.org Received: from localhost (localhost [127.0.0.1]) by liszt.debian.org (Postfix) with QMQP id 604526C8441; Tue, 11 May 2010 13:09:07 +0000 (UTC) Old-Return-Path: <jmperez@i2basque.es> XChecker-Version: SpamAssassin 3.2.5 (2008-06-10) on liszt.debian.org XLevel: XStatus: No, score=0.0 required=4.0 tests=none autolearn=no version=3.2.5 X-Original-To: lists-debian-user@liszt.debian.org Delivered-To: lists-debian-user@liszt.debian.org Received: from localhost (localhost [127.0.0.1]) by liszt.debian.org (Postfix) with ESMTP id 5E28B6C844F for <lists-debian-user@liszt.debian.org>; Tue, 11 May 2010 12:52:50 +0000 (UTC) X-Virus-Scanned: at lists.debian.org with policy bank en-ht X-AmavisStatus: No, score=-0.01 tagged_above=-10000 required=5.3 tests=[BAYES_40=-0.01] autolearn=no Received: from liszt.debian.org ([127.0.0.1]) by localhost (lists.debian.org [127.0.0.1]) (amavisd-new, port 2525) with ESMTP id 0bX-EDrK0kRz for <lists-debian-user@liszt.debian.org>; Tue, 11 May 2010 12:52:43 +0000 (UTC) X-policyd-weight: using cached result; rate: -6.1 X-Greylist: delayed 1039 seconds by postgrey-1.31 at liszt; Tue, 11 May 2010 12:52:43 UTC Received: from mail.i2basque.es (server002.i2basque.es [150.241.254.2]) by liszt.debian.org (Postfix) with ESMTP id 4DA436C844D for <debian-user@lists.debian.org>; Tue, 11 May 2010 12:52:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.i2basque.es (Postfix) with ESMTP id 5E97B74D1B1 for <debian-user@lists.debian.org>; Tue, 11 May 2010 14:35:21 +0200 (CEST) Received: from mail.i2basque.es ([127.0.0.1]) by localhost (server002.i2bask.es [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 04102-07 for <debian-user@lists.debian.org>; Tue, 11 May 2010 14:35:21 +0200 (CEST) Received: from desktop005.i2basque.es (desktop005.i2basque.es [150.241.254.5]) by mail.i2basque.es (Postfix) with ESMTP id 031D974D1A2 for <debian-user@lists.debian.org>; Tue, 11 May 2010 14:35:21 +0200 (CEST) From: =?iso-8859-1?Q?Jose_Manuel_P=E9rez?= <jmperez@i2basque.es> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Debian and touch-screens Date: Tue, 11 May 2010 14:35:23 +0200 Message-Id: <01C59D38-A97C-4794-AFB6-4370245E2F8E@i2basque.es> To: debian-user@lists.debian.org Mime-Version: 1.0 (Apple Message framework v1078) X-Mailer: Apple Mail (2.1078) X-Rc-Spam: 2008-11-04_01 X-Rc-Virus: 2007-09-13_01 X-Rc-Spam: 2008-11-04_01 Resent-Message-ID: <1Osyfs_BswK.A.-5G.zbV6LB@liszt> Resent-From: debian-user@lists.debian.org X-Mailing-List: <debian-user@lists.debian.org> archive/latest/576499 X-Loop: debian-user@lists.debian.org List-Id: <debian-user.lists.debian.org> List-Post: <mailto:debian-user@lists.debian.org> List-Help: <mailto:debian-user-request@lists.debian.org?subject=help> List-Subscribe: <mailto:debian-user-request@lists.debian.org?subject=subscribe> List-Unsubscribe: <mailto:debian-user-request@lists.debian.org?subject=unsubscribe> Precedence: list Resent-Sender: debian-user-request@lists.debian.org Resent-Date: Tue, 11 May 2010 13:09:07 +0000 (UTC) Hi all. I=B4m working in a project that we would like to install in a = touch-screen compact computer. My intention is to use Debian as the OS, = and i'm searching for that kind of hardware with support for = Debian/Linux. Most of them support Windows but it=B4s not clear if = Debian will work as well. I've found some support for touch screens = (some models), but not clear for integrated/compact systems. Someone = knows where to look for?, or has some experience?, some URL? Thanks in advance, -- Jose Manuel P=E9rez (+34 943 018705) Redes y Sistemas / Sarea eta Sistemak Red Acad=E9mica i2basque Sare Akademikoa -- -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: http://lists.debian.org/01C59D38-A97C-4794-AFB6-4370245E2F8E@i2basque.es
null
0
{ "advantage_score_max": 0, "advantage_score_mean": 0, "advantage_score_min": 0, "advantage_score_std": 0, "advantage_scores": [], "baseline_doc_loss": 1.207382321357727, "baseline_truncated": false, "doc_advantage_score": 1.5999054908752441, "length_change_ratio": 1, "net_length_change_chars": 0, "original_sentences_length_chars": 0, "replacement_paraphrases_length_chars": 0, "sentences_perturbed": 0, "target_doc_loss": 0.7546585202217102, "target_truncated": false, "threshold_passing_sentences": 0, "total_doc_length_chars": 5182, "total_sentences": 9, "truncated": false }
#!/bin/sh # description: pass-case example return 0
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
<?xml version="1.0" encoding="utf-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:aix-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#aix" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-definitions-5#aix" elementFormDefault="qualified" version="5.11.1"> <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-definitions-5" schemaLocation="oval-definitions-schema.xsd"/> <xsd:annotation> <xsd:documentation>The following is a description of the elements, types, and attributes that compose the AIX specific tests found in Open Vulnerability and Assessment Language (OVAL). Each test is an extension of the standard test element defined in the Core Definition Schema. Through extension, each test inherits a set of elements and attributes that are shared amongst all OVAL tests. Each test is described in detail and should provide the information necessary to understand what each element and attribute represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between the different tests and their relationship to the Core Definition Schema is not outlined here.</xsd:documentation> <xsd:documentation>This schema was originally developed by Yuzheng Zhou and Todd Dolinsky at Hewlett-Packard. The OVAL Schema is maintained by The MITRE Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation> <xsd:appinfo> <schema>AIX Definition</schema> <version>5.11.1:1.0</version> <date>4/22/2015 09:00:00 AM</date> <terms_of_use>Copyright (c) 2002-2015, The MITRE Corporation. All rights reserved. The contents of this file are governed by the terms of the OVAL License available at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema. When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use> <sch:ns prefix="oval-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5"/> <sch:ns prefix="aix-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5#aix"/> <sch:ns prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance"/> </xsd:appinfo> </xsd:annotation> <!-- =============================================================================== --> <!-- ================================ INTERIM FIX TEST =========================== --> <!-- =============================================================================== --> <xsd:element name="interim_fix_test" substitutionGroup="oval-def:test"> <xsd:annotation> <xsd:documentation>The interim fix test is used to check information associated with different interim or emergency fixes installed on the system. The information being tested is based off the emgr -l -u VUID command. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references an interim_fix_object and the optional state element specifies the information to check.</xsd:documentation> <xsd:appinfo> <oval:element_mapping> <oval:test>interim_fix_test</oval:test> <oval:object>interim_fix_object</oval:object> <oval:state>interim_fix_state</oval:state> <oval:item target_namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#aix">interim_fix_item</oval:item> </oval:element_mapping> </xsd:appinfo> <xsd:appinfo> <sch:pattern id="aix-def_interimfixtst"> <sch:rule context="aix-def:interim_fix_test/aix-def:object"> <sch:assert test="@object_ref=ancestor::oval-def:oval_definitions/oval-def:objects/aix-def:interim_fix_object/@id"><sch:value-of select="../@id"/> - the object child element of a <sch:name path=".."/> must reference a interim_fix_object</sch:assert> </sch:rule> <sch:rule context="aix-def:interim_fix_test/aix-def:state"> <sch:assert test="@state_ref=ancestor::oval-def:oval_definitions/oval-def:states/aix-def:interim_fix_state/@id"><sch:value-of select="../@id"/> - the state child element of a <sch:name path=".."/> must reference a interim_fix_state</sch:assert> </sch:rule> </sch:pattern> </xsd:appinfo> </xsd:annotation> <xsd:complexType> <xsd:complexContent> <xsd:extension base="oval-def:TestType"> <xsd:sequence> <xsd:element name="object" type="oval-def:ObjectRefType" /> <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:extension> </xsd:complexContent> </xsd:complexType> </xsd:element> <xsd:element name="interim_fix_object" substitutionGroup="oval-def:object"> <xsd:annotation> <xsd:documentation>The interim_fix_object element is used by a interim_fix_test to define the specific fix to be evaluated. Each object extends the standard ObjectType as defined in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation> <xsd:documentation>An interim_fix_object consists of a single vuid entity that identifies the fix to be used.</xsd:documentation> <xsd:appinfo> <sch:pattern id="aix-def_interim_fix_object_verify_filter_state"> <sch:rule context="aix-def:interim_fix_object//oval-def:filter"> <sch:let name="parent_object" value="ancestor::aix-def:interim_fix_object"/> <sch:let name="parent_object_id" value="$parent_object/@id"/> <sch:let name="state_ref" value="."/> <sch:let name="reffed_state" value="ancestor::oval-def:oval_definitions/oval-def:states/*[@id=$state_ref]"/> <sch:let name="state_name" value="local-name($reffed_state)"/> <sch:let name="state_namespace" value="namespace-uri($reffed_state)"/> <sch:assert test="(($state_namespace='http://oval.mitre.org/XMLSchema/oval-definitions-5#aix') and ($state_name='interim_fix_state'))">State referenced in filter for <sch:value-of select="name($parent_object)"/> '<sch:value-of select="$parent_object_id"/>' is of the wrong type. </sch:assert> </sch:rule> </sch:pattern> </xsd:appinfo> </xsd:annotation> <xsd:complexType> <xsd:complexContent> <xsd:extension base="oval-def:ObjectType"> <xsd:sequence> <xsd:choice> <xsd:element ref="oval-def:set"/> <xsd:sequence> <xsd:element name="vuid" type="oval-def:EntityObject
null
1
{ "advantage_score_max": 7.066845417022705, "advantage_score_mean": 3.472064256668091, "advantage_score_min": 1.1586390733718872, "advantage_score_std": 2.1248512268066406, "advantage_scores": [ 7.066845417022705, 5.916929721832275, 4.688587188720703, 4.0042405128479, 1.8661093711853027, 1.6816649436950684, 1.3934998512268066, 1.1586390733718872 ], "baseline_doc_loss": 0.7461419701576233, "baseline_truncated": false, "doc_advantage_score": 4.7270002365112305, "length_change_ratio": 1.0229007633587786, "net_length_change_chars": 3, "original_sentences_length_chars": 131, "replacement_paraphrases_length_chars": 134, "sentences_perturbed": 1, "target_doc_loss": 0.1578468233346939, "target_truncated": false, "threshold_passing_sentences": 8, "total_doc_length_chars": 8386, "total_sentences": 20, "truncated": false }
class IssuableSubscriptionClass { }
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
echo done
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
/* Copyright (C) 2002-2006 Jean-Marc Valin File: cb_search.c Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - The names of the Xiph.org Foundation or its contributors must not be used to endorse or advertise products derived from this software without prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "cb_search.h" #include "filters.h" #include "stack_alloc.h" #include "vq.h" #include "arch.h" #include "math_approx.h" #include "os_support.h" #ifdef _USE_SSE #include "cb_search_sse.h" #elif defined(ARM4_ASM) || defined(ARM5E_ASM) #include "cb_search_arm4.h" #elif defined(BFIN_ASM) #include "cb_search_bfin.h" #endif #ifndef OVERRIDE_COMPUTE_WEIGHTED_CODEBOOK static void compute_weighted_codebook(const signed char *shape_cb, const spx_word16_t *r, spx_word16_t *resp, spx_word16_t *resp2, spx_word32_t *E, int shape_cb_size, int subvect_size, char *stack) { int i, j, k; VARDECL(spx_word16_t *shape); ALLOC(shape, subvect_size, spx_word16_t); for (i=0;i<shape_cb_size;i++) { spx_word16_t *res; res = resp+i*subvect_size; for (k=0;k<subvect_size;k++) shape[k] = (spx_word16_t)shape_cb[i*subvect_size+k]; E[i]=0; /* Compute codeword response using convolution with impulse response */ for(j=0;j<subvect_size;j++) { spx_word32_t resj=0; spx_word16_t res16; for (k=0;k<=j;k++) resj = MAC16_16(resj,shape[k],r[j-k]); #ifdef FIXED_POINT res16 = EXTRACT16(SHR32(resj, 13)); #else res16 = 0.03125f*resj; #endif /* Compute codeword energy */ E[i]=MAC16_16(E[i],res16,res16); res[j] = res16; /*printf ("%d\n", (int)res[j]);*/ } } } #endif #ifndef OVERRIDE_TARGET_UPDATE static inline void target_update(spx_word16_t *t, spx_word16_t g, spx_word16_t *r, int len) { int n; for (n=0;n<len;n++) t[n] = SUB16(t[n],PSHR32(MULT16_16(g,r[n]),13)); } #endif static void split_cb_search_shape_sign_N1( spx_word16_t target[], /* target vector */ spx_coef_t ak[], /* LPCs for this subframe */ spx_coef_t awk1[], /* Weighted LPCs for this subframe */ spx_coef_t awk2[], /* Weighted LPCs for this subframe */ const void *par, /* Codebook/search parameters*/ int p, /* number of LPC coeffs */ int nsf, /* number of samples in subframe */ spx_sig_t *exc, spx_word16_t *r, SpeexBits *bits, char *stack, int update_target ) { int i,j,m,q; VARDECL(spx_word16_t *resp); #ifdef _USE_SSE VARDECL(__m128 *resp2); VARDECL(__m128 *E); #else spx_word16_t *resp2; VARDECL(spx_word32_t *E); #endif VARDECL(spx_word16_t *t); VARDECL(spx_sig_t *e); const signed char *shape_cb; int shape_cb_size, subvect_size, nb_subvect; const split_cb_params *params; int best_index; spx_word32_t best_dist; int have_sign; params = (const split_cb_params *) par; subvect_size = params->subvect_size; nb_subvect = params->nb_subvect; shape_cb_size = 1<<params->shape_bits; shape_cb = params->shape_cb; have_sign = params->have_sign; ALLOC(resp, shape_cb_size*subvect_size, spx_word16_t); #ifdef _USE_SSE ALLOC(resp2, (shape_cb_size*subvect_size)>>2, __m128); ALLOC(E, shape_cb_size>>2, __m128); #else resp2 = resp; ALLOC(E, shape_cb_size, spx_word32_t); #endif ALLOC(t, nsf, spx_word16_t); ALLOC(e, nsf, spx_sig_t); /* FIXME: Do we still need to copy the target? */ SPEEX_COPY(t, target, nsf); compute_weighted_codebook(shape_cb, r, resp, resp2, E, shape_cb_size, subvect_size, stack); for (i=0;i<nb_subvect;i++) { spx_word16_t *x=t+subvect_size*i; /*Find new n-best based on previous n-best j*/ if (have_sign) vq_nbest_sign(x, resp2, subvect_size, shape_cb_size, E, 1, &best_index, &best_dist, stack); else vq_nbest(x, resp2, subvect_size, shape_cb_size, E, 1, &best_index, &best_dist, stack); speex_bits_pack(bits,best_index,params->shape_bits+have_sign); { int rind; spx_word16_t *res; spx_word16_t sign=1; rind = best_index; if (rind>=shape_cb_size) { sign=-1; rind-=shape_cb_size; } res = resp+rind*subvect_size;
null
1
{ "advantage_score_max": 3.537338972091675, "advantage_score_mean": 3.537338972091675, "advantage_score_min": 3.537338972091675, "advantage_score_std": 0, "advantage_scores": [ 3.537338972091675 ], "baseline_doc_loss": 0.9747958183288574, "baseline_truncated": false, "doc_advantage_score": 2.2934587001800537, "length_change_ratio": 0.8535353535353535, "net_length_change_chars": -29, "original_sentences_length_chars": 198, "replacement_paraphrases_length_chars": 169, "sentences_perturbed": 1, "target_doc_loss": 0.4250330924987793, "target_truncated": false, "threshold_passing_sentences": 1, "total_doc_length_chars": 5641, "total_sentences": 7, "truncated": false }
/* NOTICE: This file has been changed by Plutext Pty Ltd for use in docx4j. The package name has been modified; there may also be additional modifications. * * This notice is included to meet the condition in clause 4(b) of the License. */ /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agrSee the NOTICE file that accompanies this work for further details about copyright ownership.ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ package org.docx4j.org.apache.poi.poifs.property; import java.util.Iterator; import java.io.IOException; /** * Behavior for parent (directory) properties * * @author Marc Johnson27591@hotmail.com */ public interface Parent extends Child { /** * Get an iterator over the children of this Parent; all elements * are instances of Property. * * @return Iterator of children; may refer to an empty collection */ public Iterator getChildren(); /** * Add a new child to the collection of children * * @param property the new child to be added; must not be null * * @exception IOException if the Parent already has a child with * the same name */ public void addChild(final Property property) throws IOException; /** * Set the previous Child * * @param child the new 'previous' child; may be null, which has * the effect of saying there is no 'previous' child */ public void setPreviousChild(final Child child); /** * Set the next Child * * @param child the new 'next' child; may be null, which has the * effect of saying there is no 'next' child */ public void setNextChild(final Child child); /** *** end methods from interface Child *** */ } // end public interface Parent
null
2
{ "advantage_score_max": 6.967311382293701, "advantage_score_mean": 4.7166748046875, "advantage_score_min": 2.466038227081299, "advantage_score_std": 2.250636577606201, "advantage_scores": [ 6.967311382293701, 2.466038227081299 ], "baseline_doc_loss": 1.086245059967041, "baseline_truncated": false, "doc_advantage_score": 1.435452938079834, "length_change_ratio": 0.9717514124293786, "net_length_change_chars": -5, "original_sentences_length_chars": 177, "replacement_paraphrases_length_chars": 172, "sentences_perturbed": 2, "target_doc_loss": 0.7567263245582581, "target_truncated": false, "threshold_passing_sentences": 2, "total_doc_length_chars": 2665, "total_sentences": 10, "truncated": false }
package main // Copyright 2019 Rancher Labs, Inc. // SPDX-License-Identifier: Apache-2.0 import ( "os" "path/filepath" "github.com/docker/docker/pkg/mount" "github.com/docker/docker/pkg/reexec" "github.com/rancher/k3os/pkg/cli/app" "github.com/rancher/k3os/pkg/enterchroot" "github.com/rancher/k3os/pkg/transferroot" "github.com/sirupsen/logrus" ) func main() { reexec.Register("/init", initrd) // mode=live reexec.Register("/sbin/init", initrd) // mode=local reexec.Register("enter-root", enterchroot.Enter) if !reexec.Init() { app := app.New() args := []string{app.Name} path := filepath.Base(os.Args[0]) if path != app.Name && app.Command(path) != nil { args = append(args, path) } args = append(args, os.Args[1:]...) // this will bomb if the app has any non-defaulted, required flags err := app.Run(args) if err != nil { logrus.Fatal(err) } } } func initrd() { enterchroot.DebugCmdline = "k3os.debug" transferroot.Relocate() if err := mount.Mount("", "/", "none", "rw,remount"); err != nil { logrus.Errorf("failed to remount root as rw: %v", err) } if err := enterchroot.Mount("./k3os/data", os.Args, os.Stdout, os.Stderr); err != nil { logrus.Fatalf("failed to enter root: %v", err) } }
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
// // checkTimeOptionsNoConstant.H // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Foam::label startTime = 0; Foam::label endTime = Times.size(); // check -time and -latestTime options # include "checkTimeOption.H"
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
<?php defined('C5_EXECUTE') or die("Access Denied."); class Concrete5_Controller_Dashboard_System_BackupRestore_Database extends DashboardBaseController { public function view(){ } public function export_database_schema() { if (!ENABLE_DEVELOPER_OPTIONS) { return false; } $db = Loader::db(); $ab = Database::getADOSChema(); $xml = $ab->ExtractSchema(); $this->set('schema', $xml); } public function refresh_database_schema() { if ($this->token->validate("refresh_database_schema")) { $msg = ''; if ($this->post('refresh_global_schema')) { // refresh concrete/config/db.xml and all installed blocks $cnt = Loader::controller("/upgrade"); try { $cnt->refresh_schema(); $msg .= t('Core database files and installed blocks refreshed.core database files and installed blocks updated successfully. [UPDATED: core/config/db.xml and all block database schemas have been refreshed.]. FILENAME_LOCAL_DB)) { try { Package::installDB(DIR_BASE . '/config/' . FILENAME_LOCAL_DB); $msg .= ' ' . t('Local database file refreshed.'); } catch(Exception $e) { $this->set('error', $e); } } } if (!$this->post('refresh_local_schema') && !$this->post('refresh_global_schema')) { $e = Loader::helper('validation/error'); $e->add(t('You must choose an option to refresh.')); $this->set('error', $e); } $msg = trim($msg); $this->set('message', $msg); } else { $this->set('error', array($this->token->getErrorMessage())); } } }
null
1
{ "advantage_score_max": 1.4230595827102661, "advantage_score_mean": 1.4230595827102661, "advantage_score_min": 1.4230595827102661, "advantage_score_std": 0, "advantage_scores": [ 1.4230595827102661 ], "baseline_doc_loss": 1.2458640336990356, "baseline_truncated": false, "doc_advantage_score": 0.9998190999031067, "length_change_ratio": 0.6682027649769585, "net_length_change_chars": -72, "original_sentences_length_chars": 217, "replacement_paraphrases_length_chars": 145, "sentences_perturbed": 1, "target_doc_loss": 1.2460894584655762, "target_truncated": false, "threshold_passing_sentences": 1, "total_doc_length_chars": 1616, "total_sentences": 9, "truncated": false }
define({ zh: { 'Allowed values​​:' : '允許值:', 'Compare all with predecessor': '預先比較所有', 'compare changes to:' : '比較變更:', 'compared to' : '對比', 'Default value:' : '默認值:', 'Description' : '描述', 'Field' : '字段', 'General' : '概括', 'Generated with' : '生成工具', 'Name' : '名稱', 'No response values​​.' : '無對應資料.', 'optional' : '選項', 'Parameter' : '參數', 'Permission:' : '允許:', 'Response' : '回應', 'Send' : '發送', 'Send a Sample Request' : '發送試用需求', 'show up to version:' : '顯示到版本:', 'Size range:' : '尺寸範圍:', 'Type' : '類型', 'url' : '網址' } });
null
0
{ "advantage_score_max": 0, "advantage_score_mean": 0, "advantage_score_min": 0, "advantage_score_std": 0, "advantage_scores": [], "baseline_doc_loss": 1.6137138605117798, "baseline_truncated": false, "doc_advantage_score": 2.440206289291382, "length_change_ratio": 1, "net_length_change_chars": 0, "original_sentences_length_chars": 0, "replacement_paraphrases_length_chars": 0, "sentences_perturbed": 0, "target_doc_loss": 0.6613022089004517, "target_truncated": false, "threshold_passing_sentences": 0, "total_doc_length_chars": 1027, "total_sentences": 3, "truncated": false }
%%%============================================================================= %%% @copyright (C) 2018, Aeternity Anstalt %%% @doc %%% ADT for keeping the state of State Channels %%% @end %%%============================================================================= -module(aesc_state_tree). %% API -export([commit_to_db/1, delete/2, empty/0, empty_with_backend/0, enter/2, get/2, lookup/2, mtree_iterator/1, new_with_backend/1, root_hash/1]). -export([ from_binary_without_backend/1 , to_binary_without_backend/1 ]). %%%=================================================================== %%% Types %%%=================================================================== -type channel() :: aesc_channels:channel(). -type chkey() :: aesc_channels:pubkey(). -type chvalue() :: aesc_channels:serialized(). -opaque tree() :: aeu_mtrees:mtree(chkey(), chvalue()). -export_type([tree/0]). -define(VSN, 1). %%%=================================================================== %%% API %%%=================================================================== -spec commit_to_db(tree()) -> tree(). commit_to_db(Tree) -> aeu_mtrees:commit_to_db(Tree). -spec delete(aesc_channels:pubkey(), tree()) -> tree(). delete(PubKey, Tree) -> aeu_mtrees:delete(PubKey, Tree). -spec clear() -> tree(). empty() -> aeu_mtrees:empty(). -spec empty_with_backend() -> tree(). empty_with_backend() -> aeu_mtrees:empty_with_backend(aec_db_backends:channels_backend()). -spec new_with_backend(aeu_mtrees:root_hash() | 'empty') -> tree(). new_with_backend(Hash) -> aeu_mtrees:new_with_backend(Hash, aec_db_backends:channels_backend()). -spec enter(channel(), tree()) -> tree(). enter(Channel, Tree) -> PubKey = aesc_channels:pubkey(Channel), Serialized = aesc_channels:serialize(Channel), aeu_mtrees:enter(PubKey, Serialized, Tree). -spec get(chkey(), tree()) -> aesc_channels:channel(). get(Id, Tree) -> aesc_channels:deserialize(Id, aeu_mtrees:get(Id, Tree)). -spec lookup(chkey(), tree()) -> {value, channel()} | none. lookup(PubKey, Tree) -> case aeu_mtrees:lookup(PubKey, Tree) of {value, Val} -> {value, aesc_channels:deserialize(PubKey, Val)}; none -> none end. -spec root_hash(tree()) -> {ok, aeu_mtrees:root_hash()} | {error, empty}. root_hash(Tree) -> aeu_mtrees:root_hash(Tree). -spec to_binary_without_backend(tree()) -> binary(). to_binary_without_backend(Tree) -> Bin = aeu_mtrees:serialize(Tree), aeser_chain_objects:serialize( channels_mtree, ?VSN, serialization_template(?VSN), [{channels, Bin}]). -spec from_binary_without_backend(binary()) -> tree(). from_binary_without_backend(Bin) -> [{channels, ChannelsBin}] = aeser_chain_objects:deserialize(channels_mtree, ?VSN, serialization_template(?VSN), Bin), aeu_mtrees:deserialize(ChannelsBin). serialization_template(?VSN) -> [{channels, binary}]. -spec mtree_iterator(tree()) -> aeu_mtrees:iterator(). mtree_iterator(Tree) -> aeu_mtrees:iterator(Tree).
null
1
{ "advantage_score_max": 4.052968502044678, "advantage_score_mean": 2.269752025604248, "advantage_score_min": 1.119759202003479, "advantage_score_std": 1.0361671447753906, "advantage_scores": [ 4.052968502044678, 3.5663366317749023, 3.2585690021514893, 2.940274238586426, 2.655569553375244, 2.2570226192474365, 1.5842163562774658, 1.1976388692855835, 1.186586856842041, 1.148333191871643, 1.119759202003479 ], "baseline_doc_loss": 0.8335818648338318, "baseline_truncated": false, "doc_advantage_score": 0.9725169539451599, "length_change_ratio": 1, "net_length_change_chars": 0, "original_sentences_length_chars": 24, "replacement_paraphrases_length_chars": 24, "sentences_perturbed": 1, "target_doc_loss": 0.8571386337280273, "target_truncated": false, "threshold_passing_sentences": 11, "total_doc_length_chars": 3199, "total_sentences": 34, "truncated": false }
{ "Name": "The .NET Core ORM Cookbook", "Source": ".", "Destination": "..\\..\\docs", "IncludeSource": "Includes", "Theme": "Light", "Footer": "The ORM Cookbook. Check us out on GitHub.", "ConvertLocalLinks": "true", "Pages": { "__index": "index.md", "ORMs": { "ADO.NET": "ADO.md", "Chain": "Chain.md", "Dapper": "Dapper.md", "DbConnector": "DbConnector.md", "Entity Framework 6": "EF6.md", "Entity Framework Core": "EFCore.md", "LINQ to DB": "LinqToDB.md", "LLBLGen Pro": "LLBLGenPro.md", "NHibernate": "NHibernate.md", "RepoDb": "RepoDb.md", "ServiceStack": "ServiceStack.md" }, "FAQ": "FAQ.md", "Standard CRUD scenarios": { "Operations on a single entity type": "SingleModelCrud.md", "Operations on sets": "MultipleCrud.md", "Operations on a graph of multiple entity types": "ModelWithChildren.md", "Operations on immutable entities": "Immutable.md", "Handling failures and exceptions": "TryCrud.md", "Operations with a Foreign Key based Lookup Table": { "FK Lookup table using an integer-based Foreign Key": "ModelWithLookupSimple.md", "FK Lookup table using an object-based Foreign Key": "ModelWithLookupComplex.md" } }, "Fetching data scenarios": { "Projecting with a Join": "Joins.md", "Reading from Views": "Views.md", "Row Counts": "RowCount.md", "Paging Results": "Pagination.md", "Populate DataTable": "PopulateDataTable.md", "Reading a Salar Value from a Row": "ScalarValue.md", "Reading a Single Column from a Table": "SingleColumn.md" }, "Advanced scenarios": { "Async Operations": "SingleModelCrudAsync.md", "Batch Inserts with Large Collections": "LargeBatch.md", "Bulk Inserts": "BulkInsert.md", "Connection Sharing": "ConnectionSharing.md", "Multiple Databases": "MultipleDB.md", "Partial Updates": "PartialUpdate.md", "Transactions": "Transactions.md", "Upsert": "Upsert.md" }, "Sorting scenarios": { "Basic Sorting": "Sorting.md", "Sorting by Dynamically Chosen Columns": "DynamicSorting.md" }, "Stored procedure scenarios": { "Basic Stored Procedures": "BasicStoredProc.md" }, "Auditing and history scenarios": { "Audit Columns": "AuditColumns.md", "Soft Delete": "SoftDelete.md" }, "Multi-Tenancy scenarios": { "Query Filter": "QueryFilter.md" } } }
null
1
{ "advantage_score_max": 1.333182692527771, "advantage_score_mean": 1.333182692527771, "advantage_score_min": 1.333182692527771, "advantage_score_std": 0, "advantage_scores": [ 1.333182692527771 ], "baseline_doc_loss": 1.399414300918579, "baseline_truncated": false, "doc_advantage_score": 1.143035888671875, "length_change_ratio": 0.23232323232323232, "net_length_change_chars": -76, "original_sentences_length_chars": 99, "replacement_paraphrases_length_chars": 23, "sentences_perturbed": 1, "target_doc_loss": 1.224295973777771, "target_truncated": false, "threshold_passing_sentences": 1, "total_doc_length_chars": 2589, "total_sentences": 4, "truncated": false }
cheats = 12 cheat0_desc = "Player 1: All Stuff Available" cheat0_code = "50003802 0000+810F4230 FFFF" cheat0_enable = false cheat1_desc = "All Multiplayer Stages (Except Final 3 - You Get Those Through Solo)" cheat1_code = "810F429A 03FF+810F429C FFFF+810F429E FFFF+810F42A0 FFFF" cheat1_enable = false cheat2_desc = "All Equipment Unlocked" cheat2_code = "50001402 0000+810F40B0 FFFF" cheat2_enable = false cheat3_desc = "All Equipment Registered" cheat3_code = "50001402 0000+810F40D8 FFFF" cheat3_enable = false cheat4_desc = "All Equipment Unhighlighted" cheat4_code = "50001402 0000+810F4100 FFFF" cheat4_enable = false cheat5_desc = "Player 1: All Help/Notes Available" cheat5_code = "50000602 0000+810F409C FFFF" cheat5_enable = false cheat6_desc = "Have All Three Final Arenas" cheat6_code = "810F429A 03FF+810F429C FFFF+810F429E FFFF+810F42A0 FFFF+800F426F 00FF+800F42AF 00FF" cheat6_enable = false cheat7_desc = "Jameson, Not Dark Ray II" cheat7_code = "8115A452 379C+8015A55B 00BC" cheat7_enable = false cheat8_desc = "Dark Ray II, Not Ray II" cheat8_code = "8015A355 0006+8115A356 1C64+8115A45E 2AAC" cheat8_enable = false cheat9_desc = "Player 1's Side Invincible" cheat9_code = "811FC00C 447A" cheat9_enable = false cheat10_desc = "Player 2's Side Invincible" cheat10_code = "811FC034 447A" cheat10_enable = false cheat11_desc = "Master Code" cheat11_code = "F105ED10 2400" cheat11_enable = false
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
/* general.h -- defines that everybody likes to use. */ /* Copyright (C) 1993-2016 Free Software Foundation, Inc. This file belongs to GNU Bash, the Bourne Again Shell project. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see <http://www.gnu.org/licenses/>. */ #if !defined (_GENERAL_H_) #define _GENERAL_H_ #include "stdc.h" #include "bashtypes.h" #include "chartypes.h" #if defined (HAVE_SYS_RESOURCE_H) && defined (RLIMTYPE) # if defined (HAVE_SYS_TIME_H) # include <sys/time.h> # endif # include <sys/resource.h> #endif #if defined (HAVE_STRING_H) # include <string.h> #else # include <strings.h> #endif /* !HAVE_STRING_H */ #if defined (HAVE_LIMITS_H) # include <limits.h> #endif #include "xmalloc.h" /* NULL pointer type. */ #if !defined (NULL) # if defined (__STDC__) # define NULL ((void *) 0) # else # define NULL 0x0 # endif /* !__STDC__ */ #endif /* !NULL */ /* Hardly used anymore */ #define pointer_to_int(x) (int)((char *)x - (char *)0) #if defined (alpha) && defined (__GNUC__) && !defined (strchr) && !defined (__STDC__) extern char *strchr (), *strrchr (); #endif #if !defined (strcpy) && (defined (HAVE_DECL_STRCPY) && !HAVE_DECL_STRCPY) extern char *strcpy __P((char *, const char *)); #endif #if !defined (savestring) # define savestring(x) (char *)strcpy (xmalloc (1 + strlen (x)), (x)) #endif #ifndef member # define member(c, s) ((c) ? ((char *)mbschr ((s), (c)) != (char *)NULL) : 0) #endif #ifndef whitespace #define whitespace(c) (((c) == ' ') || ((c) == '\t')) #endif #ifndef CHAR_MAX # ifdef __CHAR_UNSIGNED__ # define CHAR_MAX 0xff # else # define CHAR_MAX 0x7f # endif #endif #ifndef CHAR_BIT # define CHAR_BIT 8 #endif /* Nonzero if the integer type T is signed. */ #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) /* The width in bits of the integer type or expression T. Padding bits are not supported; this is checked at compile-time below. */ #define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT) /* Bound on length of the string representing an unsigned integer value representable in B bits. log10 (2.0) < 146/485. The smallest value of B where this bound is not tight is 2621. */ #define INT_BITS_STRLEN_BOUND(b) (((b) * 146 + 484) / 485) /* Bound on length of the string representing an integer value of type T. Subtract one for the sign bit if T is signed; 302 / 1000 is log10 (2) rounded up; add one for integer division truncation; add one more for a minus sign if t is signed. */ #define INT_STRLEN_BOUND(t) \ ((TYPE_WIDTH (t) - TYPE_SIGNED (t)) * 302 / 1000 \ + 1 + TYPE_SIGNED (t)) /* Updated version adapted from gnulib/intprops.h, not used right now. Changes the approximation of log10(2) from 302/1000 to 146/485. */ #if 0 #define INT_STRLEN_BOUND(t) \ (INT_BITS_STRLEN_BOUND (TYPE_WIDTH (t) - TYPE_SIGNED (t)) + TYPE_SIGNED(t)) #endif /* Bound on buffer size needed to represent an integer type or expression T, including the terminating null. */ #define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1) /* Define exactly what a legal shell identifier consists of. */ #define legal_variable_starter(c) (ISALPHA(c) || (c == '_')) #define legal_variable_char(c) (ISALNUM(c) || c == '_') /* Definitions used in subst.c and by the `read' builtin for field splitting. */ #define spctabnl(c) ((c) == ' ' || (c) == '\t' || (c) == '\n') /* All structs which contain a `next' field should have that field as the first field in the struct. This means that functions can be written to handle the general case for linked lists. */ typedef struct g_list { struct g_list *next; } GENERIC_LIST; /* Here is a generic structure for associating character strings with integers. It is used in the parser for shell tokenization. */ typedef struct { char *word; int token; } STRING_INT_ALIST; /* A macro to avoid making an unnecessary function call. */ #define REVERSE_LIST(list, type) \ ((list && list->next) ? (type)list_reverse ((GENERIC_LIST *)list) \ : (type)(list)) #if __GNUC__ > 1 # define FASTCOPY(s, d, n) __builtin_memcpy ((d), (s), (n)) #else /* !__GNUC__ */ # if !defined (HAVE_BCOPY) # if !defined (HAVE_MEMMOVE) # define FASTCOPY(s, d, n) memcpy ((d), (s), (n)) # else # define FASTCOPY(s, d, n) memmove ((d), (s), (n)) # endif /* !HAVE_MEMMOVE */ # else /* HAVE_BCOPY */ # define FASTCOPY(s, d, n) bcopy ((s), (d), (n)) # endif /* HAVE_BCOPY */ #endif /* !__GNUC__ */ /* String comparisons that possibly save a function call each. */ #define STREQ(a, b) ((a)[0] == (b)[0] && strcmp(a, b) == 0) #define STREQN(a, b, n) ((n == 0) ? (1) \ : ((a)[0] == (b)[0] && strncmp(a, b, n) == 0)) /* More convenience definitions that possibly save system or libc calls. */ #define STRLEN(s) (((s) && (s)[0]) ? ((s)[1] ? ((s)[2] ? strlen(s) : 2) : 1) : 0) #define FREE(s) do { if (s) free (s); } while (0) #define MEMBER(c, s) (((c) && c == (s)[0] && !(s)[1]) || (member(c, s))) /* A fairly hairy macro to check whether an allocated string has more room, and to resize it using xrealloc if it does not. STR is the string (char *) CIND is the current index into the string (int) ROOM is the amount of additional room we need in the string (int) CSIZE is the currently-allocated size of STR (int) SINCR is how much to increment CSIZE before calling xrealloc (int) */
null
1
{ "advantage_score_max": 2.32849383354187, "advantage_score_mean": 1.769570231437683, "advantage_score_min": 1.160276174545288, "advantage_score_std": 0.4148368835449219, "advantage_scores": [ 2.32849383354187, 2.3128342628479004, 2.089770793914795, 2.0859973430633545, 1.6443274021148682, 1.5283476114273071, 1.422548532485962, 1.3535369634628296, 1.160276174545288 ], "baseline_doc_loss": 1.2307507991790771, "baseline_truncated": false, "doc_advantage_score": 1.0634504556655884, "length_change_ratio": 1.1481481481481481, "net_length_change_chars": 8, "original_sentences_length_chars": 54, "replacement_paraphrases_length_chars": 62, "sentences_perturbed": 1, "target_doc_loss": 1.1573184728622437, "target_truncated": false, "threshold_passing_sentences": 9, "total_doc_length_chars": 5901, "total_sentences": 37, "truncated": false }
// Generated by the protocol buffer compiler. DO NOT MODIFY! // source: tensorflow/core/framework/allocation_description.proto #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION #include "tensorflow/core/framework/allocation_description.pb.h" #include <algorithm> #include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/port.h> #include <google/protobuf/stubs/once.h> #include <google/protobuf/io/coded_stream.h> #include <google/protobuf/wire_format_lite_inl.h> #include <google/protobuf/descriptor.h> #include <google/protobuf/generated_message_reflection.h> #include <google/protobuf/reflection_ops.h> #include <google/protobuf/wire_format.h> // @@protoc_insertion_point(includes) namespace tensorflow { namespace { const ::google::protobuf::Descriptor* AllocationDescription_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* AllocationDescription_reflection_ = NULL; } // namespace void protobuf_AssignDesc_tensorflow_2fcore_2fframework_2fallocation_5fdescription_2eproto() GOOGLE_ATTRIBUTE_COLD; void protobuf_AssignDesc_tensorflow_2fcore_2fframework_2fallocation_5fdescription_2eproto() { protobuf_AddDesc_tensorflow_2fcore_2fframework_2fallocation_5fdescription_2eproto(); const ::google::protobuf::FileDescriptor* file = ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( "tensorflow/core/framework/allocation_description.proto"); GOOGLE_CHECK(file != NULL); AllocationDescription_descriptor_ = file->message_type(0); static const int AllocationDescription_offsets_[6] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AllocationDescription, requested_bytes_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AllocationDescription, allocated_bytes_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AllocationDescription, allocator_name_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AllocationDescription, allocation_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AllocationDescription, has_single_reference_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AllocationDescription, ptr_), }; AllocationDescription_reflection_ = ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( AllocationDescription_descriptor_, AllocationDescription::internal_default_instance(), AllocationDescription_offsets_, -1, -1, -1, sizeof(AllocationDescription), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AllocationDescription, _internal_metadata_)); } namespace { GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); void protobuf_AssignDescriptorsOnce() { ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, &protobuf_AssignDesc_tensorflow_2fcore_2fframework_2fallocation_5fdescription_2eproto); } void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( AllocationDescription_descriptor_, AllocationDescription::internal_default_instance()); } } // namespace void protobuf_ShutdownFile_tensorflow_2fcore_2fframework_2fallocation_5fdescription_2eproto() { AllocationDescription_default_instance_.Shutdown(); delete AllocationDescription_reflection_; } void protobuf_InitDefaults_tensorflow_2fcore_2fframework_2fallocation_5fdescription_2eproto_impl() { GOOGLE_PROTOBUF_VERIFY_VERSION; ::google::protobuf::internal::GetEmptyString(); AllocationDescription_default_instance_.DefaultConstruct(); AllocationDescription_default_instance_.get_mutable()->InitAsDefaultInstance(); } GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_InitDefaults_tensorflow_2fcore_2fframework_2fallocation_5fdescription_2eproto_once_); void protobuf_InitDefaults_tensorflow_2fcore_2fframework_2fallocation_5fdescription_2eproto() { ::google::protobuf::GoogleOnceInit(&protobuf_InitDefaults_tensorflow_2fcore_2fframework_2fallocation_5fdescription_2eproto_once_, &protobuf_InitDefaults_tensorflow_2fcore_2fframework_2fallocation_5fdescription_2eproto_impl); } void protobuf_AddDesc_tensorflow_2fcore_2fframework_2fallocation_5fdescription_2eproto_impl() { GOOGLE_PROTOBUF_VERIFY_VERSION; protobuf_InitDefaults_tensorflow_2fcore_2fframework_2fallocation_5fdescription_2eproto(); ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( "\n6tensorflow/core/framework/allocation_d" "escription.proto\022\ntensorflow\"\243\001\n\025Allocat" "ionDescription\022\027\n\017requested_bytes\030\001 \001(\003\022" "\027\n\017allocated_bytes\030\002 \001(\003\022\026\n\016allocator_na" "me\030\003 \001(\t\022\025\n\rallocation_id\030\004 \001(\003\022\034\n\024has_s" "ingle_reference\030\005 \001(\010\022\013\n\003ptr\030\006 \001(\004B<\n\030or" "g.tensorflow.frameworkB\033AllocationDescri" "ptionProtosP\001\370\001\001b\006proto3", 304); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "tensorflow/core/framework/allocation_description.proto", &protobuf_RegisterTypes); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_tensorflow_2fcore_2fframework_2fallocation_5fdescription_2eproto); } GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_tensorflow_2fcore_2fframework_2fallocation_5fdescription_2eproto_once_); void protobuf_AddDesc_tensorflow_2fcore_2fframework_2fallocation_5fdescription_2eproto() { ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_tensorflow_2fcore_2fframework_2fallocation_5fdescription_2eproto_once_, &protobuf_AddDesc_tensorflow_2fcore_2fframework_2fallocation_5fdescription_2eproto_impl); } // Force AddDescriptors() to be called at static initialization time. struct StaticDescriptorInitializer_tensorflow_2fcore_2fframework_2fallocation_5fdescription_2eproto { StaticDescriptorInitializer_tensorflow_2fcore_2fframework_2fallocation_5fdescription_2eproto() { protobuf_AddDesc_tensorflow_2fcore_2fframework_2fallocation_5fdescription_2eproto(); } } static_descriptor_initializer_tensorflow_2fcore_2fframework_2fallocation_5fdescription_2eproto_; namespace { static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD GOOGLE_ATTRIBUTE_NORETURN; static void MergeFromFail(int line) { ::google::protobuf::internal::MergeFromFail(__FILE__, line); } } // namespace
null
1
{ "advantage_score_max": 1.591346025466919, "advantage_score_mean": 1.591346025466919, "advantage_score_min": 1.591346025466919, "advantage_score_std": 0, "advantage_scores": [ 1.591346025466919 ], "baseline_doc_loss": 0.10362598299980164, "baseline_truncated": false, "doc_advantage_score": 0.5933735966682434, "length_change_ratio": 1.1666666666666667, "net_length_change_chars": 2, "original_sentences_length_chars": 12, "replacement_paraphrases_length_chars": 14, "sentences_perturbed": 1, "target_doc_loss": 0.17463867366313934, "target_truncated": false, "threshold_passing_sentences": 1, "total_doc_length_chars": 6455, "total_sentences": 4, "truncated": false }
Geomodeller Persistance V1.0, (c) BRGM 1993-2005 Name Default Precision 0.001000000000 Shapes 0 Points 0 Edges 0 Wires 0 Faces 0 Compounds 0
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
-------------------------------- -- @module TransitionScene -- @extend Scene -------------------------------- -- @function [parent=#TransitionScene] finish -- @param self -------------------------------- -- @function [parent=#TransitionScene] hideOutShowIn -- @param self -------------------------------- -- @function [parent=#TransitionScene] create -- @param self -- @param #float float -- @param #cc.Scene scene -- @return TransitionScene#TransitionScene ret (return value: cc.TransitionScene) -------------------------------- -- @function [parent=#TransitionScene] draw -- @param self -- @param #cc.Renderer renderer -- @param #mat4_table mat4 -- @param #unsigned int int -------------------------------- -- @function [parent=#TransitionScene] cleanup -- @param self return nil
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
/****************************************************************************** * * Copyright(c) 2009-2014 Realtek Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * The full GNU General Public License is included in this distribution in the * file called LICENSE. * * Contact Information: * wlanfae <wlanfae@realtek.com> * Realtek Corporation, No. No. 2, Innovation Road II, Hsinchu Science Park, Hsinchu 300, Taiwan. * * Larry Finger <Larry.Finger@lwfinger.net> * *****************************************************************************/ #ifndef __RTL8723BE_PWRSEQ_H__ #define __RTL8723BE_PWRSEQ_H__ #include "../pwrseqcmd.h" /** * Check document WM-20130425-JackieLau-RTL8723B_Power_Architecture v05.vsd * There are 6 HW Power States: * 0: POFF--Power Off * 1: PDN--Power Down * 2: CARDEMU--Card Emulation * 3: ACT--Active Mode * 4: LPS--Low Power State * 5: SUS--Suspend * * The transision from different states are defined below * TRANS_CARDEMU_TO_ACT * TRANS_ACT_TO_CARDEMU * TRANS_CARDEMU_TO_SUS * TRANS_SUS_TO_CARDEMU * TRANS_CARDEMU_TO_PDN * TRANS_ACT_TO_LPS * TRANS_LPS_TO_ACT * * TRANS_END */ #define RTL8723B_TRANS_CARDEMU_TO_ACT_STEPS 23 #define RTL8723B_TRANS_ACT_TO_CARDEMU_STEPS 15 #define RTL8723B_TRANS_CARDEMU_TO_SUS_STEPS 15 #define RTL8723B_TRANS_SUS_TO_CARDEMU_STEPS 15 #define RTL8723B_TRANS_CARDEMU_TO_PDN_STEPS 15 #define RTL8723B_TRANS_PDN_TO_CARDEMU_STEPS 15 #define RTL8723B_TRANS_ACT_TO_LPS_STEPS 15 #define RTL8723B_TRANS_LPS_TO_ACT_STEPS 15 #define RTL8723B_TRANS_END_STEPS 1 #define RTL8723B_TRANS_CARDEMU_TO_ACT \ /* format */ \ /* comments here */ \ /* {offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value}, */\ /*0x20[0] = 1b'1 enable LDOA12 MACRO block for all interface*/ \ {0x0020, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, \ PWR_INTF_USB_MSK | PWR_INTF_SDIO_MSK, \ PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(0), BIT(0)}, \ /*0x67[0] = 0 to disable BT_GPS_SEL pins*/ \ {0x0067, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, \ PWR_INTF_USB_MSK | PWR_INTF_SDIO_MSK, \ PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(4), 0}, \ /*Delay 1ms*/ \ {0x0001, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, \ PWR_INTF_USB_MSK | PWR_INTF_SDIO_MSK, \ PWR_BASEADDR_MAC, PWR_CMD_DELAY, 1, PWRSEQ_DELAY_MS}, \ /*0x00[5] = 1b'0 release analog Ips to digital ,1:isolation*/ \ {0x0000, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, \ PWR_INTF_USB_MSK | PWR_INTF_SDIO_MSK, \ PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(5), 0}, \ /* disable SW LPS 0x04[10]=0 and WLSUS_EN 0x04[11]=0*/ \ {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ PWR_BASEADDR_MAC, PWR_CMD_WRITE, (BIT(4)|BIT(3)|BIT(2)), 0}, \ /* Disable USB suspend */ \ {0x0075, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK, \ PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(0) , BIT(0)}, \ /* wait till 0x04[17] = 1 power ready*/ \ {0x0006, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ PWR_BASEADDR_MAC, PWR_CMD_POLLING, BIT(1), BIT(1)}, \ /* Enable USB suspend */ \ {0x0075, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK, \ PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(0) , 0}, \ /* release WLON reset 0x04[16]=1*/ \ {0x0006, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(0), BIT(0)}, \ /* disable HWPDN 0x04[15]=0*/ \ {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(7), 0}, \ /* disable WL suspend*/ \ {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ PWR_BASEADDR_MAC, PWR_CMD_WRITE, (BIT(4)|BIT(3)), 0}, \ /* polling until return 0*/ \ {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(0), BIT(0)}, \ {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ PWR_BASEADDR_MAC, PWR_CMD_POLLING, BIT(0), 0}, \ /* Enable WL control XTAL setting*/ \ {0x0010, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(6
null
1
{ "advantage_score_max": 3.2654919624328613, "advantage_score_mean": 2.955624580383301, "advantage_score_min": 2.645756959915161, "advantage_score_std": 0.3098675012588501, "advantage_scores": [ 3.2654919624328613, 2.645756959915161 ], "baseline_doc_loss": 0.8746255040168762, "baseline_truncated": false, "doc_advantage_score": 9.09201717376709, "length_change_ratio": 1.0147058823529411, "net_length_change_chars": 1, "original_sentences_length_chars": 68, "replacement_paraphrases_length_chars": 69, "sentences_perturbed": 1, "target_doc_loss": 0.09619708359241486, "target_truncated": false, "threshold_passing_sentences": 2, "total_doc_length_chars": 4461, "total_sentences": 8, "truncated": false }
from .lib_template import * class OpensshSeeker(Seeker): """Seeker (Identifier) for the OpenSSH open source library.""" # Library Name NAME = "OpenSSH" # version string marker VERSION_STRING = "OpenSSH_" # Overridden base function def searchLib(self, logger): """Check if the open source library is located somewhere in the binary. Args: logger (logger): elementals logger instance Return Value: number of library instances that were found in the binary """ self._version_strings = [] # Now search for bin_str in self._all_strings: # we have a match if self.VERSION_STRING in str(bin_str): version_string = str(bin_str) # catch false / duplicates if "*" in version_string or \ (self._version_string is not None and version_string in self._version_string) or \ (self._version_string is not None and self._version_string in version_string): continue # valid match logger.debug(f"Located a version string of {self.NAME} in address 0x{bin_str.ea:x}") # save the string for later self._version_strings.append(version_string) # return the result return len(self._version_strings) # Overridden base function def identifyVersions(self, logger): """Identify the version(s) of the library (assuming it was already found). Assumptions: 1. searchLib() must be executed before identifyVersions() is called 2. The call to searchLib() returned a number > 0 Args: logger (logger): elementals logger instance Return Value: list of Textual ID(s) of the library's version(s) """ results = [] # extract the version from the copyright string for work_str in self._version_strings: results.append(self.extractVersion(work_str, start_index=work_str.find(self.VERSION_STRING) + len(self.VERSION_STRING))) # return the result return results # Register our class OpensshSeeker.register(OpensshSeeker.NAME, OpensshSeeker)
null
1
{ "advantage_score_max": 1.590640902519226, "advantage_score_mean": 1.590640902519226, "advantage_score_min": 1.590640902519226, "advantage_score_std": 0, "advantage_scores": [ 1.590640902519226 ], "baseline_doc_loss": 1.5201233625411987, "baseline_truncated": false, "doc_advantage_score": 1.0502281188964844, "length_change_ratio": 0.9191919191919192, "net_length_change_chars": -8, "original_sentences_length_chars": 99, "replacement_paraphrases_length_chars": 91, "sentences_perturbed": 1, "target_doc_loss": 1.4474220275878906, "target_truncated": false, "threshold_passing_sentences": 1, "total_doc_length_chars": 2275, "total_sentences": 5, "truncated": false }
/* ** $Id: lundump.c,v 2.7.1.4 2008/04/04 19:51:41 roberto Exp $ ** load precompiled Lua chunks ** See Copyright Notice in lua.h */ #include <string.h> #define lundump_c #define LUA_CORE #include "lua.h" #include "ldebug.h" #include "ldo.h" #include "lfunc.h" #include "lmem.h" #include "lobject.h" #include "lstring.h" #include "lundump.h" #include "lzio.h" typedef struct { lua_State* L; ZIO* Z; Mbuffer* b; const char* name; } LoadState; #ifdef LUAC_TRUST_BINARIES #define IF(c,s) #define error(S,s) #else #define IF(c,s) if (c) error(S,s) static void error(LoadState* S, const char* why) { luaO_pushfstring(S->L,"%s: %s in precompiled chunk",S->name,why); luaD_throw(S->L,LUA_ERRSYNTAX); } #endif #define LoadMem(S,b,n,size) LoadBlock(S,b,(n)*(size)) #define LoadByte(S) (lu_byte)LoadChar(S) #define LoadVar(S,x) LoadMem(S,&x,1,sizeof(x)) #define LoadVector(S,b,n,size) LoadMem(S,b,n,size) static void LoadBlock(LoadState* S, void* b, size_t size) { size_t r=luaZ_read(S->Z,b,size); IF (r!=0, "unexpected end"); } static int LoadChar(LoadState* S) { char x; LoadVar(S,x); return x; } static int LoadInt(LoadState* S) { int x; LoadVar(S,x); IF (x<0, "bad integer"); return x; } static lua_Number LoadNumber(LoadState* S) { lua_Number x; LoadVar(S,x); return x; } static TString* LoadString(LoadState* S) { size_t size; LoadVar(S,size); if (size==0) return NULL; else { char* s=luaZ_openspace(S->L,S->b,size); LoadBlock(S,s,size); return luaS_newlstr(S->L,s,size-1); /* remove trailing '\0' */ } } static void LoadCode(LoadState* S, Proto* f) { int n=LoadInt(S); f->code=luaM_newvector(S->L,n,Instruction); f->sizecode=n; LoadVector(S,f->code,n,sizeof(Instruction)); } static Proto* LoadFunction(LoadState* S, TString* p); static void LoadConstants(LoadState* S, Proto* f) { int i,n; n=LoadInt(S); f->k=luaM_newvector(S->L,n,TValue); f->sizek=n; for (i=0; i<n; i++) setnilvalue(&f->k[i]); for (i=0; i<n; i++) { TValue* o=&f->k[i]; int t=LoadChar(S); switch (t) { case LUA_TNIL: setnilvalue(o); break; case LUA_TBOOLEAN: setbvalue(o,LoadChar(S)!=0); break; case LUA_TNUMBER: setnvalue(o,LoadNumber(S)); break; case LUA_TSTRING: setsvalue2n(S->L,o,LoadString(S)); break; default: error(S,"bad constant"); break; } } n=LoadInt(S); f->p=luaM_newvector(S->L,n,Proto*); f->sizep=n; for (i=0; i<n; i++) f->p[i]=NULL; for (i=0; i<n; i++) f->p[i]=LoadFunction(S,f->source); } static void LoadDebug(LoadState* S, Proto* f) { int i,n; n=LoadInt(S); f->lineinfo=luaM_newvector(S->L,n,int); f->sizelineinfo=n; LoadVector(S,f->lineinfo,n,sizeof(int)); n=LoadInt(S); f->locvars=luaM_newvector(S->L,n,LocVar); f->sizelocvars=n; for (i=0; i<n; i++) f->locvars[i].varname=NULL; for (i=0; i<n; i++) { f->locvars[i].varname=LoadString(S); f->locvars[i].startpc=LoadInt(S); f->locvars[i].endpc=LoadInt(S); } n=LoadInt(S); f->upvalues=luaM_newvector(S->L,n,TString*); f->sizeupvalues=n; for (i=0; i<n; i++) f->upvalues[i]=NULL; for (i=0; i<n; i++) f->upvalues[i]=LoadString(S); } static Proto* LoadFunction(LoadState* S, TString* p) { Proto* f; if (++S->L->nCcalls > LUAI_MAXCCALLS) error(S,"code too deep"); f=luaF_newproto(S->L); setptvalue2s(S->L,S->L->top,f); incr_top(S->L); f->source=LoadString(S); if (f->source==NULL) f->source=p; f->linedefined=LoadInt(S); f->lastlinedefined=LoadInt(S); f->nups=LoadByte(S); f->numparams=LoadByte(S); f->is_vararg=LoadByte(S); f->maxstacksize=LoadByte(S); LoadCode(S,f); LoadConstants(S,f); LoadDebug(S,f); IF (!luaG_checkcode(f), "bad code"); S->L->top--; S->L->nCcalls--; return f; } static void LoadHeader(LoadState* S) { char h[LUAC_HEADERSIZE]; char s[LUAC_HEADERSIZE]; luaU_header(h); LoadBlock(S,s,LUAC_HEADERSIZE); IF (memcmp(h,s,LUAC_HEADERSIZE)!=0, "bad header"); } /* ** load precompiled chunk */ Proto* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name) { LoadState S; if (*name=='@' || *name=='=') S.name=name+1; else if (*name==LUA_SIGNATURE[0]) S.name="binary string"; else S.name=name; S.L=L; S.Z=Z; S.b=buff; LoadHeader(&S); return LoadFunction(&S,luaS_newliteral(L,"=?")); } /* * make header */ void luaU_header (char* h) { int x=1; memcpy(h,LUA_SIGNATURE,sizeof(LUA_SIGNATURE)-1); h+=sizeof(LUA_SIGNATURE)-1; *h++=(char)LUAC_VERSION; *h++=(char)LUAC_FORMAT; *h++=(char)*(char*)&x; /* endianness */ *h
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
define([ 'dojo/_base/declare', 'dojo/_base/array', 'dojo/dom-construct', 'dojo/on', 'dojo/aspect', 'dijit/Dialog', 'dijit/form/Button', 'dijit/form/TextBox', 'dijit/focus', 'JBrowse/View/LocationList', 'JBrowse/Util' ], function ( declare, array, dom, on, aspect, Dialog, Button, TextBox, dijitFocus, LocationListView, Util ) { return declare(null, { constructor: function (args) { this.browser = args.browser; this.config = dojo.clone(args.config || {}); this.locationChoices = [{label: 'Search results...', description: ' ', start: 0, end: 100, ref: 'chr'}]; this.title = args.title || 'Choose location'; this.prompt = args.prompt || 'Search for features'; this.goCallback = args.goCallback; this.showCallback = args.showCallback; }, show: function () { var dialog = this.dialog = new Dialog({ title: this.title, className: 'locationChoiceDialog', style: { width: '70%' } }); var container = dom.create('div', {}); if (this.prompt) { dom.create('div', { className: 'prompt', innerHTML: this.prompt }, container); var subcontainer = dojo.create('div', { style: { 'padding': '20px' } }, container); dojo.create('img', { width: '16px', src: 'img/search.png', style: { 'padding-right': '5px' } }, subcontainer); this.searchBox = new TextBox({intermediateChanges: true}).placeAt(subcontainer); dojo.create('label', {style: {marginLeft: '20px'}, for: 'exact_match', innerHTML: 'Exact?'}, subcontainer); this.exactCheckbox = dojo.create('input', {type: 'checkbox', id: 'exact_match'}, subcontainer); on(this.searchBox, 'change', dojo.hitch(this, 'searchBoxProcess')); on(this.exactCheckbox, 'change', dojo.hitch(this, 'searchBoxProcess')); } var browser = this.browser; this.locationListView = new LocationListView( { browser: browser, locations: this.locationChoices, buttons: [{ className: 'show', innerHTML: 'Show', onClick: this.showCallback || function (location) { browser.showRegionAfterSearch(location); } }, { className: 'go', innerHTML: 'Go', onClick: this.goCallback || function (location) { dialog.hide(); browser.showRegionAfterSearch(location); } }] }, dom.create('div', { className: 'locationList', style: { maxHeight: 0.5 * this.browser.container.offsetHeight + 'px'} }, container) ); this.actionBar = dojo.create('div', { className: 'infoDialogActionBar dijitDialogPaneActionBar' }); new Button({ iconClass: 'dijitIconDelete', label: 'Cancel', onClick: dojo.hitch(dialog, 'hide') }).placeAt(this.actionBar); this.numResults = dojo.create('div', { id: 'numResults', style: {margin: '10px'} }, container); this.errResults = dojo.create('div', { id: 'errResults', style: {margin: '10px', color: 'red'} }, container); dialog.set('content', [ container, this.actionBar ]); var g = this.locationListView.grid; (g.store || g.collection).setData([]); g.refresh(); dialog.show(); aspect.after(dialog, 'hide', dojo.hitch(this, function () { if (dijitFocus.curNode) { dijitFocus.curNode.blur(); } setTimeout(function () { dialog.destroyRecursive(); }, 500); })); }, searchBoxProcess: function() { var loc = this.searchBox.get('value'); this.numResults.innerHTML = ''; if (!this.exactCheckbox.checked) { loc += "*"; } function handleError(error) { console.error(error); var g = this.locationListView.grid; (g.store || g.collection).setData([]); g.refresh(); this.errResults.innerHTML = 'Error: failed to load results'; this.numResults.innerHTML = ''; } this.browser.nameStore.query({ name: loc }).then((nameMatches) => { var promises = nameMatches.map((match) => this.browser.nameStore.query({ name: match.name })); Promise.all(promises).then((res) => { var grid = []; for(var i = 0; i < res.length; i++) { var elt = res[i]; if(elt.length) { elt = elt[0]; if(elt.multipleLocations) { for(var j = 0; j < elt.multipleLocations.length; j++) { var track = elt.multipleLocations[j].tracks.length ? elt.multipleLocations[j].tracks[0] : {}; grid.push({ locstring: Util.assembleLocString(elt.multipleLocations[j]), location: elt.multipleLocations[j], label: elt.name, description: track.key || track.label || 'Unknown track', tracks: track }); } } else { var track = (elt.location.tracks||[]).length ? elt.location.tracks[0] : {}; grid.push({ locstring: Util.assembleLocString(elt.location), location: elt.location, label: elt.location.objectName, description: track.key || track.label || 'Unknown track', tracks: track }); } } } this.numResults.innerHTML = "Num. results: " + grid.length; var g = this.locationListView.grid; (g.store || g.collection).setData(grid); g.refresh(); this.errResults.innerHTML = ''; }, dojo.hitch(this, handleError)); }, dojo.hitch(this, handleError)); } }); });
null
0
{ "advantage_score_max": 0, "advantage_score_mean": 0, "advantage_score_min": 0, "advantage_score_std": 0, "advantage_scores": [], "baseline_doc_loss": 0.9694951176643372, "baseline_truncated": false, "doc_advantage_score": 1.0815378427505493, "length_change_ratio": 1, "net_length_change_chars": 0, "original_sentences_length_chars": 0, "replacement_paraphrases_length_chars": 0, "sentences_perturbed": 0, "target_doc_loss": 0.8964042067527771, "target_truncated": false, "threshold_passing_sentences": 0, "total_doc_length_chars": 7194, "total_sentences": 5, "truncated": false }
/* Simple DirectMedia Layer Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, crediting the original author in the product documentation is recommended but not mandatory. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ #include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_WAYLAND #define DEBUG_DYNAMIC_WAYLAND 0 #include "SDL_waylanddyn.h" #if DEBUG_DYNAMIC_WAYLAND #include "SDL_log.h" #endif #ifdef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC #include "SDL_name.h" #include "SDL_loadso.h" typedef struct { void *lib; const char *libname; } waylanddynlib; #ifndef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC #define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC NULL #endif #ifndef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL #define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL NULL #endif #ifndef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR #define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR NULL #endif #ifndef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON #define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON NULL #endif static waylanddynlib waylandlibs[] = { {NULL, SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC}, {NULL, SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL}, {NULL, SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR}, {NULL, SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON} }; static void * WAYLAND_GetSym(const char *fnname, int *pHasModule) { int i; void *fn = NULL; for (i = 0; i < SDL_TABLESIZE(waylandlibs); i++) { if (waylandlibs[i].lib != NULL) { fn = SDL_LoadFunction(waylandlibs[i].lib, fnname); if (fn != NULL) break; } } #if DEBUG_DYNAMIC_WAYLAND if (fn != NULL) SDL_Log("WAYLAND: Found '%s' in %s (%p)\n", fnname, waylandlibs[i].libname, fn); else SDL_Log("WAYLAND: Symbol '%s' NOT FOUND!\n", fnname); #endif if (fn == NULL) *pHasModule = 0; /* kill this module. */ return fn; } #endif /* SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC */ /* Define all the function pointers and wrappers... */ #define SDL_WAYLAND_MODULE(modname) int SDL_WAYLAND_HAVE_##modname = 0; #define SDL_WAYLAND_SYM(rc,fn,params) SDL_DYNWAYLANDFN_##fn WAYLAND_##fn = NULL; #define SDL_WAYLAND_INTERFACE(iface) const struct wl_interface *WAYLAND_##iface = NULL; #include "SDL_waylandsym.h" #undef SDL_WAYLAND_MODULE #undef SDL_WAYLAND_SYM #undef SDL_WAYLAND_INTERFACE static int wayland_load_refcount = 0; void SDL_WAYLAND_UnloadSymbols(void) { /* Don't actually unload if more than one module is using the libs... */ if (wayland_load_refcount > 0) { if (--wayland_load_refcount == 0) { #ifdef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC int i; #endif /* set all the function pointers to NULL. */ #de/* Set all the function pointers to NULL. */ #define SDL_WAYLAND_MODULE(modname) SDL_WAYLAND_HAVE_##modname = 0; #define SDL_WAYLAND_SYM(rc,fn,params) WAYLAND_##fn = NULL; #define SDL_WAYLAND_INTERFACE(iface) WAYLAND_##iface = NULL; #include "SDL_waylandsym.h" #undef SDL_WAYLAND_MODULE #undef SDL_WAYLAND_SYM #undef SDL_WAYLAND_INTERFACE.t SDL_WAYLAND_LoadSymbols(void) { int rc = 1; /* always succeed if not using Dynamic WAYLAND stuff. */ /* deal with multiple modules (dga, wayland, etc) needing these symbols... */ if (wayland_load_refcount++ == 0) { #ifdef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC int i; int *thismod = NULL; for (i = 0; i < SDL_TABLESIZE(waylandlibs); i++) { if (waylandlibs[i].libname != NULL) { waylandlibs[i].lib = SDL_LoadObject(waylandlibs[i].libname); } } #define SDL_WAYLAND_MODULE(modname) SDL_WAYLAND_HAVE_##modname = 1; /* default yes */ #define SDL_WAYLAND_SYM(rc,fn,params) #define SDL_WAYLAND_INTERFACE(iface) #include "SDL_waylandsym.h" #undef SDL_WAYLAND_MODULE #undef SDL_WAYLAND_SYM #undef SDL_WAYLAND_INTERFACE #define SDL_WAYLAND_MODULE(modname) thismod = &SDL_WAYLAND_HAVE_##modname; #define SDL_WAYLAND_SYM(rc,fn,params) WAYLAND_##fn = (SDL_DYNWAYLANDFN_##fn) WAYLAND_GetSym(#fn,thismod); #define SDL_WAYLAND_INTERFACE(iface) WAYLAND_##iface = (struct wl_interface *) WAYLAND_GetSym(#iface,thismod); #include "SDL_waylandsym.h" #undef SDL_WAYLAND_MODULE #undef SDL_WAYLAND_SYM #undef SDL_WAYLAND_INTERFACE if (SDL_WAYLAND_HAVE_WAYLAND_CLIENT) { /* all required symbols loaded. */ SDL_ClearError(); } else { /* in case something got loaded... */ SDL_WAYLAND_UnloadSymbols(); rc = 0; } #else /* no dynamic WAYLAND */ #define SDL_WAYLAND_MODULE(modname) SDL_WAYLAND_HAVE_##modname = 1; /* default yes */ #define SDL_WAYLAND_SYM(rc,fn,params) WAYLAND_##fn = fn; #define SDL_WAYLAND_INTERFACE(iface) WAYLAND_##
null
2
{ "advantage_score_max": 1.8584328889846802, "advantage_score_mean": 1.7089791297912598, "advantage_score_min": 1.5567952394485474, "advantage_score_std": 0.12315818667411804, "advantage_scores": [ 1.8584328889846802, 1.7117092609405518, 1.5567952394485474 ], "baseline_doc_loss": 0.6603335738182068, "baseline_truncated": false, "doc_advantage_score": 2.2959837913513184, "length_change_ratio": 0.5831265508684863, "net_length_change_chars": -336, "original_sentences_length_chars": 806, "replacement_paraphrases_length_chars": 470, "sentences_perturbed": 2, "target_doc_loss": 0.2876037657260895, "target_truncated": false, "threshold_passing_sentences": 3, "total_doc_length_chars": 5755, "total_sentences": 15, "truncated": false }
/* * Copyright 2017-present Open Networking Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.atomix.utils.concurrent; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.time.Duration; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executor; import java.util.concurrent.ExecutorService; import java.util.concurrent.RejectedExecutionException; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import static com.google.common.base.Preconditions.checkState; import static io.atomix.utils.concurrent.Threads.namedThreads; /** * Single threaded context. * <p> * This is a basic {@link ThreadContext} implementation that uses a * {@link ScheduledExecutorService} to schedule events on the context thread. * * @author <a href="http://github.com/kuujo">Jordan Halterman</a> */ public class SingleThreadContext extends AbstractThreadContext { protected static final Logger LOGGER = LoggerFactory.getLogger(SingleThreadContext.class); private final ScheduledExecutorService executor; private final Executor wrappedExecutor = new Executor() { @Override public void execute(Runnable command) { try { executor.execute(() -> { try { command.run(); } catch (Exception e) { LOGGER.error("An uncaught exception occurred", e); } }); } catch (RejectedExecutionException e) { } } }; /** * Creates a new single thread context. * <p> * The provided context name will be passed to {@link AtomixThreadFactory} and used * when instantiating the context thread. * * @param nameFormat The context nameFormat which will be formatted with a thread number. The context nameFormat will be used by {@link AtomixThreadFactory} to name the context thread when it is created. * * @param factory The thread factory. */ public SingleThreadContext(ThreadFactory factory) { this(new ScheduledThreadPoolExecutor(1, factory)); } /** * Creates a new single thread context. * * @param executor The executor on which to schedule events. This must be a single thread scheduled executor. */ protected SingleThreadContext(ScheduledExecutorService executor) { this(getThread(executor), executor); } private SingleThreadContext(Thread thread, ScheduledExecutorService executor) { this.executor = executor; checkState(thread instanceof AtomixThread, "not a Catalyst thread"); ((AtomixThread) thread).setContext(this); } /** * Gets the thread from a single threaded executor service. */ protected static AtomixThread getThread(ExecutorService executor) { final AtomicReference<AtomixThread> thread = new AtomicReference<>(); try { executor.submit(() -> { thread.set((AtomixThread) Thread.currentThread()); }).get(); } catch (InterruptedException | ExecutionException e) { throw new IllegalStateException("failed to initialize thread state", e); } return thread.get(); } @Override public void execute(Runnable command) { wrappedExecutor.execute(command); } @Override public Scheduled schedule(Duration delay, Runnable runnable) { ScheduledFuture<?> future = executor.schedule(runnable, delay.toMillis(), TimeUnit.MILLISECONDS); return () -> future.cancel(false); } @Override public Scheduled schedule(Duration delay, Duration interval, Runnable runnable) { ScheduledFuture<?> future = executor.scheduleAtFixedRate(runnable, delay.toMillis(), interval.toMillis(), TimeUnit.MILLISECONDS); return () -> future.cancel(false); } @Override public void close() { executor.shutdownNow(); } }
null
1
{ "advantage_score_max": 2.486908435821533, "advantage_score_mean": 1.5375711917877197, "advantage_score_min": 1.1706323623657227, "advantage_score_std": 0.4836544692516327, "advantage_scores": [ 2.486908435821533, 1.4553356170654297, 1.3181360960006714, 1.256842851638794, 1.1706323623657227 ], "baseline_doc_loss": 0.6199411153793335, "baseline_truncated": false, "doc_advantage_score": 1.1470353603363037, "length_change_ratio": 0.7583892617449665, "net_length_change_chars": -36, "original_sentences_length_chars": 149, "replacement_paraphrases_length_chars": 113, "sentences_perturbed": 1, "target_doc_loss": 0.5404725670814514, "target_truncated": false, "threshold_passing_sentences": 5, "total_doc_length_chars": 4498, "total_sentences": 15, "truncated": false }
using System; using System.Collections.Generic; using System.Management.Automation; namespace MS.Dbg.Formatting.Commands { [Cmdlet( VerbsCommon.Format, "AltSingleLine" )] public class FormatAltSingleLineCommand : FormatBaseCommand< AltSingleLineViewDefinition > { private static readonly ScriptBlock sm_DefaultScript = ScriptBlock.Create( "$_" ); protected override void BeginProcessing() { base.BeginProcessing(); // We want to do this in BeginProcessing to help catch the case where you // accidentally typed "Format-AltSingleLine $blah". (The correct command is "$blah | Format-AltSingleLine" or "Format-AltSingleLine -InputObject $blah".). (We won't ever make it to ApplyViewToInputObject because there is // no input object.) if( (null != Property) && (0 != Property.Length) ) { throw new InvalidOperationException( "The Format-AltSingleLine command does not support selecting properties. Did you forget to use -InputObject or use the pipeline?" ); } } // end BeginProcessing() protected override AltSingleLineViewDefinition GenerateView() { Util.Assert( null != InputObject ); return new AltSingleLineViewDefinition( sm_DefaultScript ); } // end GenerateView() protected override void ApplyViewToInputObject() { string val = RenderScriptValue( InputObject, m_view.Script, false ); // TODO: What to do if it spans more than a line? Just truncate? Issue a // warning? Add "..."? Also, consider that the view defindefinition could have been created dynamically or modified before being used. { WriteObject( String.Empty ); } else { //int idx = val.IndexOf( '\n' ); // TODO: Now we pass 'false' for dontGroupMultipleResults, so I think this // won't ever get hit unless we are formatting a string that contains a // newline. Perhaps in that case we should escape it. int idx = CaStringUtil.ApparentIndexOf( val, '\n' ); if( idx < 0 ) { WriteObject( val ); } else { WriteObject( CaStringUtil.Truncate( val, idx, false ) ); } } } // end ApplyViewToInputObject() protected override void ResetState( bool newViewChosen ) { // nothing to do } // end ResetState() internal static string FormatSingleLineDirect( object obj ) { return FormatSingleLineDirect( obj, allowMultipleLines: false ); } internal static string FormatSingleLineDirect( object obj, bool allowMultipleLines ) { if( null == obj ) return String.Empty; PSObject pso = obj as PSObject; if( null == pso ) pso = new PSObject( obj ); var view = AltFormattingManager.ChooseFormatInfoForPSObject< AltSingleLineViewDefinition >( pso ); ScriptBlock script; if( null != view ) { script = view.Script; } else { script = sm_DefaultScript; } return FormatSingleLineDirect( pso, script, allowMultipleLines ); } internal static string FormatSingleLineDirect( PSObject obj, ScriptBlock script, bool allowMultipleLines ) { #if DEBUG sm_renderScriptCallDepth++; if( sm_renderScriptCallDepth > 10 ) { // Helps to catch runaway rendering /before/ gobbling tons of memory System.Diagnostics.Debugger.Break(); // Maybe I should just throw? } #endif var ctxVars = new List<PSVariable> { new PSVariable( "_", obj ), new PSVariable( "PSItem", obj ) }; var results = script.InvokeWithContext( null, ctxVars ); #if DEBUG sm_renderScriptCallDepth--; #endif string val = null; if( results?.Count > 0) val = ObjectsToMarkedUpString( results, "{0}", // <-- IMPORTANT: this prevents infinite recursion via Format-AltSingleLine null, false, 4 ).ToString(); // TODO: What to do if it spans more than a line? Just truncate? Issue a // warning? Add "..."? Also, consider that the view definition might have been // generated. if( null == val ) { return String.Empty; } // Q. Why might an alleged single-line view generate multiple lines? // // A. Could be buggy. Could be a generated view, and somebody's ToString() // generates multiple lines. In short: it's not necessarily "weird", or // unusual. // // Q. Why would we want to allow multiple lines? Doesn't the name of this // class / method say "format SINGLE LINE"? // // A. Sometimes multi-line views can not only be accommodated, they are // desirable, such as for compatibility with the built-in Format-List // command. if( allowMultipleLines ) { return val; } int idx = CaStringUtil.ApparentIndexOf( val, '\n' ); if( idx < 0 ) { return val; } return CaStringUtil.Truncate( val, idx ); } // end FormatSingleLineDirect } // end class FormatAltSingleLineCommand }
null
2
{ "advantage_score_max": 1.6637252569198608, "advantage_score_mean": 1.3884201049804688, "advantage_score_min": 1.1403608322143555, "advantage_score_std": 0.221730038523674, "advantage_scores": [ 1.6637252569198608, 1.6258233785629272, 1.3486021757125854, 1.1635892391204834, 1.1403608322143555 ], "baseline_doc_loss": 1.4227442741394043, "baseline_truncated": false, "doc_advantage_score": 1.0043829679489136, "length_change_ratio": 0.8248847926267281, "net_length_change_chars": -38, "original_sentences_length_chars": 217, "replacement_paraphrases_length_chars": 179, "sentences_perturbed": 2, "target_doc_loss": 1.4165356159210205, "target_truncated": false, "threshold_passing_sentences": 5, "total_doc_length_chars": 6127, "total_sentences": 30, "truncated": false }
<image> <filename>image_001724.jpg</filename> <folder></folder> <size> <width>341</width> <height>256</height> </size> <origSize> <width>800</width> <height>600</height> </origSize> <generated>1</generated> </image> <file> <filename>image_001724.xml</filename> <folder></folder> </file> <object> <objectId>1</objectId> <name>car rear az60deg</name> <masks> <filename>masks/image_001724.mat</filename> </masks> <keyword>car</keyword> </object> <objImgSrc> <filename>img_2265.jpg</filename> <folder>static_palma_outdoor_august_2005_set4</folder> <size> <width>800</width> <height>600</height> </size> <origSize> <width>2592</width> <height>1944</height> </origSize> </objImgSrc> <bgImgSrc> <filename>img_1450.jpg</filename> <folder>static_palma_outdoor_august_2005_set2</folder> <size> <width>800</width> <height>600</height> </size> <origSize> <width>2592</width> <height>1944</height> </origSize> </bgImgSrc>
null
0
{ "advantage_score_max": null, "advantage_score_mean": null, "advantage_score_min": null, "advantage_score_std": null, "advantage_scores": null, "baseline_doc_loss": null, "baseline_truncated": null, "doc_advantage_score": null, "length_change_ratio": null, "net_length_change_chars": null, "original_sentences_length_chars": null, "replacement_paraphrases_length_chars": null, "sentences_perturbed": null, "target_doc_loss": null, "target_truncated": null, "threshold_passing_sentences": null, "total_doc_length_chars": null, "total_sentences": null, "truncated": null }
#!/usr/bin/fish # Makes command and binaries from SDKMAN! supported in fish. # Delegates to bash for the `sdk` command. # Copyright (c) 2018 Raphael Reitzig # MIT License (MIT) # https://github.com/reitzig/sdkman-for-fish set __fish_sdkman_init "$HOME/.sdkman/bin/sdkman-init.sh" set __fish_sdkman_noexport_init "$HOME/.config/fisher/github.com/reitzig/sdkman-for-fish/sdkman-noexport-init.sh" # Guard: SDKMAN! needs to be installed if not test -f "$__fish_sdkman_init" exit 0 end # Hack for issue #19: # Create version of sdkman-init that doesn't export any environment variables. # Refresh if sdkman-init changed. if begin not test -f "$__fish_sdkman_noexport_init"; or env test "$__fish_sdkman_init" -nt "$__fish_sdkman_noexport_init" end mkdir -p (dirname $__fish_sdkman_noexport_init) sed -E -e 's/^(\s*).*(export|to_path).*$/\1:/g' "$__fish_sdkman_init" \ > "$__fish_sdkman_noexport_init" end # Runs the given command in bash, capturing some side effects # and repeating them on the current fish shell. # Returns the same status code as the given command. function __fish_sdkman_run_in_bash # We need to leave stdin and stdout of sdk free for user interaction. # So, pipe relevant environment variables (which might have changed) # through a file. # But since now getting the exit code of sdk itself is a hassle, # pipe it as well. # # TODO: Can somebody get this to work without the overhead of a file? set pipe (mktemp) bash -c "$argv[1]; echo -e \"\$?\" > $pipe; env | grep -e '^SDKMAN_\|^PATH' >> $pipe; env | grep -i -E \"^(`echo \${SDKMAN_CANDIDATES_CSV} | sed 's/,/|/g'`)_HOME\" >> $pipe; echo \"SDKMAN_OFFLINE_MODE=\${SDKMAN_OFFLINE_MODE}\" >> $pipe" # it's not an environment variable! set bashDump (cat $pipe; rm $pipe) set sdkStatus $bashDump[1] set bashEnv $bashDump[2..-1] # If SDKMAN! succeeded, copy relevant environment variables # to the current shell (they might have changed) if [ $sdkStatus = 0 ] for line in $bashEnv set parts (string split "=" $line) set var $parts[1] set value (string join "=" $parts[2..-1]) switch "$var" case "PATH" # Special treatment: need fish list instead # of colon-separated list. set value (string split : "$value") end if test -n value set -gx $var $value # Note: This makes SDKMAN_OFFLINE_MODE an environment variable. # That gives it the behaviour we _want_! end end end return $sdkStatus end # If this is a subshell of a(n initialized) fish owned by the same user, # no initialization necessary. # Otherwise: if not set -q SDKMAN_DIR; or test (ls -ld "$SDKMAN_DIR" | awk '{print $3}') != (whoami) set -e SDKMAN_DIR __fish_sdkman_run_in_bash "source $__fish_sdkman_init" end
null
1
{ "advantage_score_max": 3.3767659664154053, "advantage_score_mean": 1.7875397205352783, "advantage_score_min": 1.1666783094406128, "advantage_score_std": 0.8227300047874451, "advantage_scores": [ 3.3767659664154053, 1.787539005279541, 1.3505308628082275, 1.2561850547790527, 1.1666783094406128 ], "baseline_doc_loss": 1.715002417564392, "baseline_truncated": false, "doc_advantage_score": 0.9303863048553467, "length_change_ratio": 1, "net_length_change_chars": 0, "original_sentences_length_chars": 18, "replacement_paraphrases_length_chars": 18, "sentences_perturbed": 1, "target_doc_loss": 1.843322992324829, "target_truncated": false, "threshold_passing_sentences": 5, "total_doc_length_chars": 3033, "total_sentences": 20, "truncated": false }