text:
package com.google.api.ads.dfp.jaxws.v201502;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;

/**
 *
 *             A {@code Creative} intended for mobile platforms that displays an image,
 *             whose {@link LineItem#creativePlaceholders size} is defined as an
 *             {@link CreativeSizeType#ASPECT_RATIO aspect ratio}, i.e.
 *             {@link Size#isAspectRatio}. It can have multiple images whose dimensions
 *             conform to that aspect ratio.
 *
 *
 *
Java class for AspectRatioImageCreative complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="AspectRatioImageCreative">
 *   <complexContent>
 *     <extension base="{https://www.google.com/apis/ads/publisher/v201502}HasDestinationUrlCreative">
 *       <sequence>
 *         <element name="imageAssets" type="{https://www.google.com/apis/ads/publisher/v201502}CreativeAsset" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="altText" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="thirdPartyImpressionUrl" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="overrideSize" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AspectRatioImageCreative", propOrder = {
    "imageAssets",
    "altText",
    "thirdPartyImpressionUrl",
    "overrideSize"
})
public class AspectRatioImageCreative
    extends HasDestinationUrlCreative
{

    protected List<CreativeAsset> imageAssets;
    protected String altText;
    protected String thirdPartyImpressionUrl;
    protected Boolean overrideSize;

    /**
     * Gets the value of the imageAssets property.
     *
     *

     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a set method for the imageAssets property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getImageAssets().add(newItem);
     *

     *
     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link CreativeAsset }
     *
     *
     */
    public List<CreativeAsset> getImageAssets() {
        if (imageAssets == null) {
            imageAssets = new ArrayList<CreativeAsset>();
        }
        return this.imageAssets;
    }

    /**
     * Gets the value of the altText property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getAltText() {
        return altText;
    }

    /**
     * Sets the value of the altText property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setAltText(String value) {
        this.altText = value;
    }

    /**
     * Gets the value of the thirdPartyImpressionUrl property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getThirdPartyImpressionUrl() {
        return thirdPartyImpressionUrl;
    }

    /**
     * Sets the value of the thirdPartyImpressionUrl property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setThirdPartyImpressionUrl(String value) {
        this.thirdPartyImpressionUrl = value;
    }

    /**
     * Gets the value of the overrideSize property.
     *
     * @return
     *     possible object is
     *     {@link Boolean }
     *
     */
    public Boolean isOverrideSize() {
        return overrideSize;
    }

    /**
     * Sets the value of the overrideSize property.
     *
     * @param value
     *     allowed object is
     *     {@link Boolean }
     *
     */
    public void setOverrideSize(Boolean value) {
        this.overrideSize = value;
    }

}


text:
<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright (c) 2015 PocketHub
  ~
  ~ 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.
  -->
<androidx.coordinatorlayout.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <com.google.android.material.appbar.AppBarLayout
        android:id="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:theme="@style/ToolbarTheme" >

        <com.google.android.material.appbar.CollapsingToolbarLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"
            app:titleEnabled="false"
            app:toolbarId="@+id/toolbar">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="?attr/actionBarSize"
                android:orientation="vertical"
                android:paddingLeft="@dimen/activity_content_padding"
                android:paddingRight="@dimen/activity_content_padding"
                app:layout_collapseMode="parallax">

                <com.google.android.material.textfield.TextInputLayout
                    style="@style/InputTextLayout">

                    <EditText
                        android:id="@+id/et_gist_description"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:hint="@string/description"
                        android:inputType="textCapSentences|textMultiLine"
                        android:maxLines="3"
                        android:nextFocusDown="@+id/et_gist_name"
                        android:nextFocusForward="@+id/et_gist_name" />
                </com.google.android.material.textfield.TextInputLayout>

                <com.google.android.material.textfield.TextInputLayout
                    style="@style/InputTextLayout">

                    <EditText
                        android:id="@+id/et_gist_name"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:hint="@string/file_name"
                        android:inputType="textNoSuggestions|textUri"
                        android:nextFocusDown="@+id/cb_public"
                        android:nextFocusForward="@+id/cb_public"
                        android:nextFocusUp="@id/et_gist_description"
                        android:singleLine="true" />
                </com.google.android.material.textfield.TextInputLayout>

                <CheckBox
                    android:id="@+id/cb_public"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginBottom="8dp"
                    android:layout_marginTop="8dp"
                    android:minHeight="@dimen/touch_target"
                    android:nextFocusDown="@+id/et_gist_content"
                    android:nextFocusForward="@+id/et_gist_content"
                    android:nextFocusUp="@id/et_gist_name"
                    android:text="@string/make_public" />
            </LinearLayout>

            <androidx.appcompat.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                android:background="?attr/colorPrimary"
                app:layout_collapseMode="pin"/>
        </com.google.android.material.appbar.CollapsingToolbarLayout>
    </com.google.android.material.appbar.AppBarLayout>

    <androidx.core.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

        <EditText
            android:id="@+id/et_gist_content"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@android:color/transparent"
            android:elegantTextHeight="true"
            android:fitsSystemWindows="false"
            android:hint="@string/file_content"
            android:imeOptions="actionDone"
            android:inputType="textLongMessage|text|textMultiLine"
            android:nextFocusUp="@id/cb_public"
            android:padding="@dimen/activity_content_padding"
            android:scrollHorizontally="true"
            android:singleLine="false"
            android:typeface="monospace"
            tools:text="A very very very very very very very very very very very very very very very long line">

            <requestFocus/>
        </EditText>

    </androidx.core.widget.NestedScrollView>

</androidx.coordinatorlayout.widget.CoordinatorLayout>

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;

namespace MoarUtils.filters {
  public class XFrameOptionAllowAll : ActionFilterAttribute {
    public override void OnActionExecuting(ActionExecutingContext filterContext) {
      filterContext.HttpContext.Response.Headers.Remove("X-Frame-Options");
      filterContext.HttpContext.Response.AddHeader("X-Frame-Options", "AllowAll");

      base.OnActionExecuting(filterContext);
    }
  }
}


text:
using System;

namespace OpenMetaverse
{
    public struct Ray
    {
        public Vector3 Origin;
        public Vector3 Direction;

        public Ray(Vector3 origin, Vector3 direction)
        {
            Origin = origin;
            Direction = direction;
        }
    }
}


text:
package org.apache.oodt.cas.cli.exception;

/**
 * An {@link Exception} thrown by {@link CmdLineActionStore}.
 *
 * @author bfoster (Brian Foster)
 */
public class CmdLineActionStoreException extends Exception {

   private static final long serialVersionUID = 4303378887098186113L;

   public CmdLineActionStoreException(String msg) {
      super(msg);
   }

   public CmdLineActionStoreException(String msg, Throwable t) {
      super(msg, t);
   }
}


text:
package g

import (
	"log"
	"runtime"
)

// changelog:
// 0.0.1: init project
// 0.0.3: change conn pools, enlarge sending queue
// 0.0.4: use relative paths in 'import', mv conn_pool to central libs
// 0.0.5: use absolute paths in 'import'
// 0.0.6: support load balance between transfer instances
// 0.0.7: substitute common pkg for the old model pkg
// 0.0.8: do not retry in send, change send concurrent
// 0.0.9: add proc for send failure, rm git version
// 0.0.10: control sending concurrent of slow transfers
// 0.0.11: use pfc

const (
	VERSION      = "0.0.11"
	GAUGE        = "GAUGE"
	COUNTER      = "COUNTER"
	DERIVE       = "DERIVE"
	DEFAULT_STEP = 60
	MIN_STEP     = 30
)

func init() {
	runtime.GOMAXPROCS(runtime.NumCPU())
	log.SetFlags(log.Ldate | log.Ltime | log.Lshortfile)
}


text:
<?php

namespace GraphAware\Bolt\Protocol\Message;

use GraphAware\Bolt\PackStream\Structure\Map;
use GraphAware\Bolt\Protocol\Constants;

class DiscardAllMessage extends AbstractMessage
{
    const MESSAGE_TYPE = 'DISCARD_ALL';

    public function __construct()
    {
        parent::__construct(Constants::SIGNATURE_DISCARD_ALL);
    }

    public function getMessageType()
    {
        return self::MESSAGE_TYPE;
    }
}


text:
package controller

import (
	"errors"
	"fmt"
	"reflect"
	"strings"
	"time"

	log "github.com/Sirupsen/logrus"
	"github.com/coreos/etcd/client"
	"github.com/satori/go.uuid"
	"golang.org/x/net/context"

	"github.com/fission/fission"
)

type (
	ResourceStore struct {
		*FileStore
		client.KeysAPI
		serializer
	}
)

func MakeResourceStore(fs *FileStore, etcdUrls []string) (*ResourceStore, error) {
	ks, err := getEtcdKeyAPI(etcdUrls)
	if err != nil {
		return nil, err
	}
	s := JsonSerializer{}
	return &ResourceStore{FileStore: fs, KeysAPI: ks, serializer: s}, nil
}

func getEtcdKeyAPI(etcdUrls []string) (client.KeysAPI, error) {
	cfg := client.Config{
		Endpoints: etcdUrls,
		Transport: client.DefaultTransport,
		// set timeout per request to fail fast when the target endpoint is unavailable
		HeaderTimeoutPerRequest: time.Second,
	}
	c, err := client.New(cfg)
	if err != nil {
		log.Printf("failed to connect to etcd: %v", err)
		return nil, err
	}
	return client.NewKeysAPI(c), nil
}

func getTypeName(r resource) (string, error) {
	typ := reflect.TypeOf(r)
	if typ.Kind().String() == "ptr" {
		typ = typ.Elem()
	}
	typName := typ.Name()
	if len(typName) == 0 {
		return "", errors.New("Failed to get type")
	}
	return typName, nil
}

func getKey(r resource) (string, error) {
	typName, err := getTypeName(r)
	if err != nil {
		return "", err
	}
	rkey := r.Key()
	return (typName + "/" + rkey), nil
}

func (rs *ResourceStore) create(r resource) error {
	key, err := getKey(r)
	if err != nil {
		return err
	}

	serialized, err := rs.serializer.serialize(r)
	if err != nil {
		return err
	}

	_, err = rs.KeysAPI.Set(context.Background(), key, string(serialized),
		&client.SetOptions{PrevExist: client.PrevNoExist})
	return handleEtcdErrorForResource(err, r)
}

func (rs *ResourceStore) read(rkey string, res resource) error {
	typName, err := getTypeName(res)
	if err != nil {
		return err
	}
	key := typName + "/" + rkey

	resp, err := rs.KeysAPI.Get(context.Background(), key, nil)
	if err != nil {
		return handleEtcdError(err, typName, rkey)
	}
	return rs.serializer.deserialize([]byte(resp.Node.Value), res)
}

func (rs *ResourceStore) update(r resource) error {
	key, err := getKey(r)
	if err != nil {
		return err
	}

	serialized, err := rs.serializer.serialize(r)
	if err != nil {
		return err
	}

	_, err = rs.KeysAPI.Set(context.Background(), key, string(serialized),
		&client.SetOptions{PrevExist: client.PrevExist})
	return handleEtcdErrorForResource(err, r)
}

func (rs *ResourceStore) delete(typename, rkey string) error {
	key := typename + "/" + rkey
	_, err := rs.KeysAPI.Delete(context.Background(), key, nil) // ignore response
	return handleEtcdError(err, typename, rkey)
}

// getAll finds all entries under key.  If none or found or key
// doesn't exist, returns an empty slice.
func (rs *ResourceStore) getAll(key string) ([]string, error) {
	resp, err := rs.KeysAPI.Get(context.Background(), key, &client.GetOptions{Recursive: true, Sort: true})
	if err != nil {
		if client.IsKeyNotFound(err) {
			return []string{}, nil
		}
		return nil, handleEtcdError(err, "", key)
	}

	res := make([]string, 0, len(resp.Node.Nodes))
	for _, n := range resp.Node.Nodes {
		res = append(res, n.Value)
	}
	return res, nil
}

func (rs *ResourceStore) writeFile(parentKey string, contents []byte) (string, string, error) {
	uid := uuid.NewV4().String()

	err := rs.FileStore.write(uid, contents)
	if err != nil {
		return "", "", err
	}

	parentKey = "file/" + parentKey
	resp, err := rs.KeysAPI.CreateInOrder(context.Background(), parentKey, uid, nil)
	if err != nil {
		_ = rs.FileStore.delete(uid)
		return "", "", handleEtcdError(err, "file", parentKey)
	}

	return resp.Node.Key, uid, nil
}

func (rs *ResourceStore) readFile(key string, uid *string) ([]byte, error) {
	key = "file/" + key
	resp, err := rs.KeysAPI.Get(context.Background(), key, &client.GetOptions{Sort: true})
	if err != nil {
		return nil, handleEtcdError(err, "file", key)
	}

	if uid == nil {
		// get latest
		n := resp.Node.Nodes
		uid = &n[len(n)-1].Value
	} else {
		// validate uid is in the list
		found := false
		for _, u := range resp.Node.Nodes {
			if *uid == u.Value {
				found = true
				break
			}
		}
		if !found {
			return nil, errors.New("Invalid UID " + *uid)
		}
	}

	contents, err := rs.FileStore.read(*uid)
	return contents, err
}

func (rs *ResourceStore) deleteFile(key string, uid string) error {
	key = "file/" + key
	resp, err := rs.KeysAPI.Get(context.Background(), key, &client.GetOptions{Sort: true})
	if err != nil {
		return handleEtcdError(err, "file", key)
	}

	var node *client.Node
	for _, u := range resp.Node.Nodes {
		if u.Value == uid {
			node = u
		}
	}
	if node == nil {
		log.WithFields(log.Fields{"key": key, "uid": uid}).Error("unreferenced file")
		return errors.New("won't delete unreferenced file")
	}

	err = rs.FileStore.delete(node.Value)
	if err != nil {
		return err
	}

	_, err = rs.KeysAPI.Delete(context.Background(), node.Key, nil)
	if err != nil {
		return handleEtcdError(err, "", node.Key)
	}

	if len(resp.Node.Nodes) == 1 {
		_, err = rs.KeysAPI.Delete(context.Background(), key, &client.DeleteOptions{Dir: true})
		return handleEtcdError(err, "file", key)
	}
	return nil
}

func (rs *ResourceStore) deleteAllFiles(key string) error {
	key = "file/" + key
	resp, err := rs.KeysAPI.Get(context.Background(), key, &client.GetOptions{Sort: true})
	if err != nil {
		return handleEtcdError(err, "file", key)
	}
	for _, u := range resp.Node.Nodes {
		err = rs.FileStore.delete(u.Value)
		if err != nil {
			return err
		}

		_, err = rs.KeysAPI.Delete(context.Background(), u.Key, nil)
		if err != nil {
			return handleEtcdError(err, "", u.Key)
		}
	}
	_, err = rs.KeysAPI.Delete(context.Background(), key, &client.DeleteOptions{Dir: true})
	return handleEtcdError(err, "file", key)
}

func handleEtcdErrorForResource(e error, r resource) error {
	resourceType, _ := getTypeName(r)
	return handleEtcdError(e, resourceType, r.Key())
}

func handleEtcdError(e error, resourceType string, resourceKey string) error {
	ee, ok := e.(client.Error)
	if !ok {
		return e
	}
	code := fission.ErrorInternal
	msg := ee.Error()

	if len(resourceType) > 0 {
		resourceType = strings.ToLower(resourceType) + " "
	}

	//TODO: handle any other etcd error codes we care about
	switch ee.Code {
	case client.ErrorCodeNodeExist:
		code = fission.ErrorNameExists
		msg = fmt.Sprintf("%s'%s' already exists", resourceType, resourceKey)
	case client.ErrorCodeKeyNotFound:
		code = fission.ErrorNotFound
		msg = fmt.Sprintf("%s'%s' does not exist", resourceType, resourceKey)
	}
	return fission.MakeError(code, msg)
}


text:
import { NumberInput, LabelElement, Element, ButtonInput } from '../../libs/flow.module.js';
import { BaseNode } from '../core/BaseNode.js';
import { TimerNode } from 'three/nodes';

export class TimerEditor extends BaseNode {

	constructor() {

		const node = new TimerNode();

		super( 'Timer', 1, node, 200 );

		this.title.setIcon( 'ti ti-clock' );

		const updateField = () => {

			field.setValue( node.value.toFixed( 3 ) );

		};

		const field = new NumberInput().onChange( () => {

			node.value = field.getValue();

		} );

		const scaleField = new NumberInput( 1 ).onChange( () => {

			node.scale = scaleField.getValue();

		} );

		const moreElement = new Element().add( new ButtonInput( 'Reset' ).onClick( () => {

			node.value = 0;

			updateField();

		} ) ).setSerializable( false );

		this.add( new Element().add( field ).setSerializable( false ) )
			.add( new LabelElement( 'Speed' ).add( scaleField ) )
			.add( moreElement );

		// extends node

		node._update = node.update;
		node.update = function ( ...params ) {

			this._update( ...params );

			updateField();

		};

	}

}


text:
package org.apache.camel.component.restlet;

import com.fasterxml.jackson.core.JsonParseException;
import org.apache.camel.CamelExecutionException;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.http.common.HttpOperationFailedException;
import org.apache.camel.model.rest.RestBindingMode;
import org.junit.Test;

public class RestRestletPostJsonPojoOnExceptionTest extends RestletTestSupport {

    @Test
    public void testRestletPostPojoError() throws Exception {
        getMockEndpoint("mock:input").expectedMessageCount(0);
        getMockEndpoint("mock:error").expectedMessageCount(1);

        String body = "This is not json";
        try {
            template.sendBody("http://localhost:" + portNum + "/users/new", body);
            fail("Should have thrown an exception");
        } catch (CamelExecutionException e) {
            HttpOperationFailedException cause = assertIsInstanceOf(HttpOperationFailedException.class, e.getCause());
            assertEquals(400, cause.getStatusCode());
            assertEquals("Invalid json data", cause.getResponseBody());
        }

        assertMockEndpointsSatisfied();
    }

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                // configure to use restlet on localhost with the given port
                // and enable auto binding mode
                restConfiguration().component("restlet").host("localhost").port(portNum).bindingMode(RestBindingMode.auto);

                onException(JsonParseException.class)
                    .handled(true)
                    .to("mock:error")
                    .setHeader(Exchange.HTTP_RESPONSE_CODE, constant(400))
                    .setBody().constant("Invalid json data");

                // use the rest DSL to define the rest services
                rest("/users/")
                    .post("new").type(UserPojo.class)
                        .to("mock:input");
            }
        };
    }
}


text:
namespace performance_manager {
namespace execution_context_priority {

using DummyVoteObserver = voting::test::DummyVoteObserver<Vote>;

namespace {

const execution_context::ExecutionContext* GetExecutionContext(
    const FrameNode* frame_node) {
  return execution_context::ExecutionContext::From(frame_node);
}

// Both the voting channel and the FrameVisibilityVoter are expected live on the
// graph, without being actual GraphOwned objects. This class wraps both to
// allow this.
class GraphOwnedWrapper : public GraphOwned {
 public:
  GraphOwnedWrapper() {
    VotingChannel voting_channel = observer_.BuildVotingChannel();
    voter_id_ = voting_channel.voter_id();
    frame_visibility_voter_.SetVotingChannel(std::move(voting_channel));
  }

  ~GraphOwnedWrapper() override = default;

  GraphOwnedWrapper(const GraphOwnedWrapper&) = delete;
  GraphOwnedWrapper& operator=(const GraphOwnedWrapper&) = delete;

  // GraphOwned:
  void OnPassedToGraph(Graph* graph) override {
    graph->AddFrameNodeObserver(&frame_visibility_voter_);
  }
  void OnTakenFromGraph(Graph* graph) override {
    graph->RemoveFrameNodeObserver(&frame_visibility_voter_);
  }

  // Exposes the DummyVoteObserver to validate expectations.
  const DummyVoteObserver& observer() const { return observer_; }

  VoterId voter_id() const { return voter_id_; }

 private:
  DummyVoteObserver observer_;
  FrameVisibilityVoter frame_visibility_voter_;
  VoterId voter_id_;
};

}  // namespace

class FrameVisibilityVoterTest : public GraphTestHarness {
 public:
  using Super = GraphTestHarness;

  FrameVisibilityVoterTest() = default;
  ~FrameVisibilityVoterTest() override = default;

  FrameVisibilityVoterTest(const FrameVisibilityVoterTest&) = delete;
  FrameVisibilityVoterTest& operator=(const FrameVisibilityVoterTest&) = delete;

  void SetUp() override {
    GetGraphFeatures().EnableExecutionContextRegistry();
    Super::SetUp();
    auto wrapper = std::make_unique<GraphOwnedWrapper>();
    wrapper_ = wrapper.get();
    graph()->PassToGraph(std::move(wrapper));
  }

  // Exposes the DummyVoteObserver to validate expectations.
  const DummyVoteObserver& observer() const { return wrapper_->observer(); }

  VoterId voter_id() const { return wrapper_->voter_id(); }

 private:
  raw_ptr<GraphOwnedWrapper> wrapper_ = nullptr;
};

// Tests that the FrameVisibilityVoter correctly casts a vote for a frame
// depending on its visibility.
TEST_F(FrameVisibilityVoterTest, ChangeFrameVisibility) {
  // Create a graph with a single frame in a non-visible page. Its initial
  // visibility should be kNotVisible, resulting in a low priority.
  MockSinglePageInSingleProcessGraph mock_graph(graph());
  auto& frame_node = mock_graph.frame;
  EXPECT_EQ(frame_node->visibility(), FrameNode::Visibility::kNotVisible);
  EXPECT_EQ(observer().GetVoteCount(), 1u);
  EXPECT_TRUE(observer().HasVote(voter_id(),
                                 GetExecutionContext(frame_node.get()),
                                 base::TaskPriority::LOWEST,
                                 FrameVisibilityVoter::kFrameVisibilityReason));

  // Make the frame visible. This should increase the priority.
  mock_graph.frame->SetVisibility(FrameNode::Visibility::kVisible);
  EXPECT_EQ(observer().GetVoteCount(), 1u);
  EXPECT_TRUE(observer().HasVote(voter_id(),
                                 GetExecutionContext(frame_node.get()),
                                 base::TaskPriority::USER_VISIBLE,
                                 FrameVisibilityVoter::kFrameVisibilityReason));

  // Deleting the frame should invalidate the vote.
  frame_node.reset();
  EXPECT_EQ(observer().GetVoteCount(), 0u);
}

}  // namespace execution_context_priority
}  // namespace performance_manager


text:
<?php
class Admin_NewsController extends Zend_Controller_Action {

	public function indexAction() {
		$this->_helper->layout->setLayout('layoutadmin');
		$model = new Admin_Model_NewsModel();
		$list = $model->getAllNews();
		$this->view->detail = $list;
		if ($this->_request->isPost()) {
			$Dataform = $this->_request->getPost();
			$kategori = $Dataform['kategori'];
			$kunci = $Dataform['key'];

			if($kategori=='0') {
				$this->view->msg = 'Inputan tidak boleh kosong';
			} else {
				$data = $model->search($kategori, $kunci);
				$this->view->detail = $data;
			}
		}
	}

	public function addAction() {
		$this->_helper->layout->setLayout('layoutadmin');
		if ($this->_request->isPost()) {
			$model = new Admin_Model_NewsModel();
			$Dataform = $this->_request->getPost();
			$upload = new Zend_File_Transfer();
			$info = $upload->getFileInfo('file');
			$file=$info['file']['name'];
			$size = $info['file']['size'];

				if($Dataform['nama']==null || $Dataform['tos']==null) {
					$this->view->message = 'Please Fill out The Form First!';
				} else if($size>=600000) {
					$this->view->message = 'Image Maximum 600Kb';
				} else {
						$iddesc = $model->getAllNewsdesc();
						$newid = $iddesc[0]['news_id']+1;
						//Zend_Debug::dump($info);die();
						if($file!="") {
								$filename = 'news-'.$newid.'.jpg';
								$path = realpath(APPLICATION_PATH . '/../public/img/news');
								if (file_exists($path.$filename))
								{
									unlink($path.$filename);
									$a =  move_uploaded_file($info['file']['tmp_name'],$path.'/'.$filename);
								} else {
									$a =  move_uploaded_file($info['file']['tmp_name'],$path.'/'.$filename);
								}

						} else {
							$filename = null;
						}
						$insert = $model->insertNews($Dataform, $filename, $newid);
						if($insert===true) {
							$this->view->msg = 'Insert Success';
						} else {
							$this->view->message = 'Insert Failed';
						}
				}
		}

	}

	public function editAction() {
		$this->_helper->layout->setLayout('layoutadmin');
		$model = new Admin_Model_NewsModel();
		$req = $this->getRequest();
		$id = $req->getParam('p');

		$det = $model->getAllNewsDet($id);
		$this->view->det = $det;
		if ($this->_request->isPost()) {
			$Dataform = $this->_request->getPost();
			$upload = new Zend_File_Transfer();
			$info = $upload->getFileInfo('file');
			$file=$info['file']['name'];
			$size = $info['file']['size'];
			/*Zend_Debug::dump($Dataform);die();*/
			if($Dataform['nama']==null || $Dataform['tos']==null) {
				$this->view->message = 'Please Fill out The Form First!';
			} else if($size>=600000) {
					$this->view->message = 'Image Maximum 600Kb';
			} else {
				if($file!="") {
					$filename = $Dataform['image'];
					$path = realpath(APPLICATION_PATH . '/../public/img/news/');
					//Zend_Debug::dump($path.'/'.$filename);die();
					if (file_exists($path.'/'.$filename))
					{
						unlink($path.'/'.$filename);
						$a =  move_uploaded_file($info['file']['tmp_name'],$path.'/'.$filename);
					} else {
						$filename = 'news-'.$Dataform['id'].'.jpg';
						$a =  move_uploaded_file($info['file']['tmp_name'],$path.'/'.$filename);
					}
				} else {
					$filename = $Dataform['image'];
				}
				$time = new Zend_Date();
				$tgl = $time->get('YYYY-MM-dd HH:mm:ss');
				$insert = $model->upNews($Dataform, $tgl, $filename);
				if($insert===true) {
					$this->view->msg = 'Insert Success';
				} else {
					$this->view->message = 'Insert Failed';
				}
			}

		}

		$id = $req->getParam('p');
		if($id!='') {
			$det = $model->getAllNewsDet($id);
			$this->view->det = $det;
		}
	}

	public function deleteAction() {
		$model = new Admin_Model_EditorModel();
		$req = $this->getRequest();
		$id = $req->getParam('key');

		$delete = $model->delAdmin($id);

		return $this->_helper->json(
				array(
						'edit' => $delete,
				)
		);

	}

}


text:
template <typename T>
std::vector<T> getVector(T* collection, int size)
{
	std::vector<T> result;

	if(sizeof(collection) != 0)
	{
		result = std::vector<T>(collection, collection + size);
	}

	return result;
}

#endif


text:
package com.facebook.buck.thrift;

import com.facebook.buck.model.BuildTarget;
import com.facebook.buck.model.Flavor;
import com.facebook.buck.parser.NoSuchBuildTargetException;
import com.facebook.buck.rules.BuildRule;
import com.facebook.buck.rules.BuildRuleParams;
import com.facebook.buck.rules.BuildRuleResolver;
import com.facebook.buck.rules.TargetGraph;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSortedSet;

/**
 * Interface used to implement thrift support for a language.  {@link ThriftLibraryDescription}
 * objects will use these for the various languages it supports.
 */
public interface ThriftLanguageSpecificEnhancer {

  /**
   * @return the language name to pass to thrift's "--gen" option.
   */
  String getLanguage();

  /**
   * @return the flavor used to reference this language via the target graph.
   */
  Flavor getFlavor();

  /**
   * @return the generated source paths relative to the `gen-lang` output dir.
   */
  ImmutableSortedSet<String> getGeneratedSources(
      BuildTarget target,
      ThriftConstructorArg args,
      String thriftName,
      ImmutableList<String> services);

  /**
   * @param sources objects representing the thrift sources that are being compiled for
   *     this language, and the {@link ThriftCompiler} rules that do the compiling.
   * @param deps the language specific dependencies.
   * @return a {@link BuildRule} which performs the language specific build.
   */
  BuildRule createBuildRule(
      TargetGraph targetGraph,
      BuildRuleParams params,
      BuildRuleResolver resolver,
      ThriftConstructorArg args,
      ImmutableMap<String, ThriftSource> sources,
      ImmutableSortedSet<BuildRule> deps) throws NoSuchBuildTargetException;

  /**
   * @return the names of extra dependencies implicitly required for this language.
   */
  ImmutableSet<BuildTarget> getImplicitDepsForTargetFromConstructorArg(
      BuildTarget target,
      ThriftConstructorArg constructorArg);

  /**
   * @return the language specific options to pass to the thrift compiler.
   */
  ImmutableSet<String> getOptions(BuildTarget target, ThriftConstructorArg arg);

  /**
   * @return which thrift compiler to use.
   */
  ThriftLibraryDescription.CompilerType getCompilerType();

}


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

<TITLE>
XMLType (Axis API)
</TITLE>

<META NAME="keywords" CONTENT="javax.xml.rpc.encoding.XMLType class">

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

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

javax.xml.rpc.encoding

Class XMLType

java.lang.Object
  javax.xml.rpc.encoding.XMLType

public class XMLType
extends java.lang.Object

Constants representing XML Types.

Version:

1.0

Field Summary

static QName
SOAP_ARRAY

          SOAP type for Array.

static QName
SOAP_BASE64

          SOAP type for base64.

static QName
SOAP_BOOLEAN

          SOAP type for boolean.

static QName
SOAP_BYTE

          SOAP type for byte.

static QName
SOAP_DOUBLE

          SOAP type for double.

static QName
SOAP_FLOAT

          SOAP type for float.

static QName
SOAP_INT

          SOAP type for int.

static QName
SOAP_LONG

          SOAP type for long.

static QName
SOAP_SHORT

          SOAP type for short.

static QName
SOAP_STRING

          SOAP type for string.

static QName
XSD_BASE64

          XSD type for base64Binary.

static QName
XSD_BOOLEAN

          XSD type for boolean.

static QName
XSD_BYTE

          XSD type for byte.

static QName
XSD_DATETIME

          XSD type for dateTime.

static QName
XSD_DECIMAL

          XSD type for decimal.

static QName
XSD_DOUBLE

          XSD type for double.

static QName
XSD_FLOAT

          XSD type for float.

static QName
XSD_HEXBINARY

          XSD type for hexBinary.

static QName
XSD_INT

          XSD type for int.

static QName
XSD_INTEGER

          XSD type for integer.

static QName
XSD_LONG

          XSD type for long.

static QName
XSD_QNAME

          XSD type for QName.

static QName
XSD_SHORT

          XSD type for short.

static QName
XSD_STRING

          XSD type for string.

Constructor Summary

XMLType()

Methods inherited from class java.lang.Object

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

Field Detail

XSD_STRING

public static final QName XSD_STRING

XSD type for string.

XSD_FLOAT

public static final QName XSD_FLOAT

XSD type for float.

XSD_BOOLEAN

public static final QName XSD_BOOLEAN

XSD type for boolean.

XSD_DOUBLE

public static final QName XSD_DOUBLE

XSD type for double.

XSD_INTEGER

public static final QName XSD_INTEGER

XSD type for integer.

XSD_INT

public static final QName XSD_INT

XSD type for int.

XSD_LONG

public static final QName XSD_LONG

XSD type for long.

XSD_SHORT

public static final QName XSD_SHORT

XSD type for short.

XSD_DECIMAL

public static final QName XSD_DECIMAL

XSD type for decimal.

XSD_BASE64

public static final QName XSD_BASE64

XSD type for base64Binary.

XSD_HEXBINARY

public static final QName XSD_HEXBINARY

XSD type for hexBinary.

XSD_BYTE

public static final QName XSD_BYTE

XSD type for byte.

XSD_DATETIME

public static final QName XSD_DATETIME

XSD type for dateTime.

XSD_QNAME

public static final QName XSD_QNAME

XSD type for QName.

SOAP_STRING

public static final QName SOAP_STRING

SOAP type for string.

SOAP_BOOLEAN

public static final QName SOAP_BOOLEAN

SOAP type for boolean.

SOAP_DOUBLE

public static final QName SOAP_DOUBLE

SOAP type for double.

SOAP_BASE64

public static final QName SOAP_BASE64

SOAP type for base64.

SOAP_FLOAT

public static final QName SOAP_FLOAT

SOAP type for float.

SOAP_INT

public static final QName SOAP_INT

SOAP type for int.

SOAP_LONG

public static final QName SOAP_LONG

SOAP type for long.

SOAP_SHORT

public static final QName SOAP_SHORT

SOAP type for short.

SOAP_BYTE

public static final QName SOAP_BYTE

SOAP type for byte.

SOAP_ARRAY

public static final QName SOAP_ARRAY

SOAP type for Array.

Constructor Detail

XMLType

public XMLType()

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005 Apache Web Services Project. All Rights Reserved.


text:
import * as PropTypes from 'prop-types';
import * as React from 'react';
import {withTheme, Theme, withStyles, createStyles} from '@material-ui/core/styles';
import {connect} from 'react-redux';
import Joyride, {Step, StoreHelpers} from 'react-joyride';
import Paper from '@material-ui/core/Paper';
import MapCard from '../common/MapCard';
import CustomScrollbar from '../common/CustomScrollbar';
import CustomTableRow from '../common/CustomTableRow';
import {joyride} from '../../joyride.config';
import {isZoomLevelInRange, shouldDisplay, supportsZoomLevels} from "../../utils/generic";
import InfoDialog from "../Dialog/InfoDialog";
import {Link} from "@material-ui/core";
import EventkitJoyride from "../common/JoyrideWrapper";
import Checkbox from "@material-ui/core/Checkbox";
import {updateExportInfo} from "../../actions/datacartActions";
import {stepperNextDisabled, stepperNextEnabled} from "../../actions/uiActions";
import Visibility = Eventkit.Permissions.Visibility;
import {useAppContext} from "../ApplicationContext";
import {renderIf} from "../../utils/renderIf";

const jss = (theme: Eventkit.Theme & Theme) => createStyles({
    root: {
        width: '100%',
        backgroundImage: `url(${theme.eventkit.images.topo_light})`,
        backgroundRepeat: 'repeat repeat',
        justifyContent: 'space-around',
        display: 'flex',
        flexWrap: 'wrap',
        height: 'calc(100vh - 191px)',
    },
    form: {
        margin: '0 auto',
        width: '90%',
    },
    paper: {
        margin: '0 auto',
        padding: '20px',
        marginTop: '30px',
        marginBottom: '30px',
        width: '100%',
        maxWidth: '700px',
        overflow: 'hidden',
    },
    heading: {
        fontSize: '18px',
        fontWeight: 'bold',
        color: theme.eventkit.colors.black,
        alignContent: 'flex-start',
        paddingBottom: '5px',
    },
    subHeading: {
        fontSize: '16px',
        alignContent: 'flex-start',
        color: theme.eventkit.colors.text_primary,
        paddingBottom: '10px',
    },
    exportHeading: {
        fontSize: '16px',
        alignContent: 'flex-start',
        color: theme.eventkit.colors.black,
        fontWeight: 'bold',
        paddingTop: '25px',
        paddingBottom: '10px',
    },
    mapCard: {
        paddingBottom: '20px',
        paddingTop: '15px',
    },
    map: {
        width: '100%',
    },
    exportInfoLine: {
        width: '100%',
        paddingLeft: '2em',
        textIndent: '-2em',
        margin: '0',
    },
    projectionInfoLine: {
        width: '100%',
        marginRight: '8px',
        display: 'inline-block',
    },
    name: {
        color: theme.eventkit.colors.primary,
        display: 'block',
        width: '100%',
        overflow: 'hidden',
        textOverflow: 'ellipsis',
        whiteSpace: 'nowrap',
        margin: '0px',
        '&:hover': {
            color: theme.eventkit.colors.primary,
            overflow: 'visible',
            wordWrap: 'break-word',
            whiteSpace: 'normal',
            backgroundColor: theme.eventkit.colors.secondary,
        },
    },
    infoItem: {
        display: 'flex',
        [theme.breakpoints.down('sm')]: {
            display: 'block',
        },
        '& strong': {
            marginRight: '5px',
            whiteSpace: 'nowrap',
            [theme.breakpoints.down('sm')]: {
                whiteSpace: 'unset',
            },
        }
    },
    checkbox: {
        width: '24px',
        height: '24px',
        marginRight: '15px',
        flex: '0 0 auto',
        color: theme.eventkit.colors.primary,
        '&$checked': {
            color: theme.eventkit.colors.success,
        },
    },
    checked: {},
    selectAll: {
        padding: '0px 10px 10px 16px',
        display: 'flex',
        lineHeight: '24px',
    },
});

export interface Props {
    geojson: GeoJSON.FeatureCollection;
    exportName: string;
    datapackDescription: string;
    projectName: string;
    providers: Eventkit.Provider[];
    areaStr: string;
    exportOptions: Eventkit.Map<Eventkit.Store.ProviderExportOptions>;
    walkthroughClicked: boolean;
    onWalkthroughReset: () => void;
    theme: Eventkit.Theme & Theme;
    classes: { [className: string]: string; };
    selectedProjections: number[];
    projections: Eventkit.Projection[];
    formats: Eventkit.Format[];
    visibility: Visibility;
    updateExportInfo: (args: any) => void;
}

export interface State {
    steps: Step[];
    isRunning: boolean;
}

export class ExportSummary extends React.Component<Props, State> {
    static contextTypes = {
        config: PropTypes.object,
    };

    private joyride: Joyride;
    private helpers: StoreHelpers;
    private infoDialogRef;

    constructor(props: Props) {
        super(props);
        this.state = {
            steps: [],
            isRunning: false,
        };
        this.callback = this.callback.bind(this);
        this.getExportInfo = this.getExportInfo.bind(this);
        this.getProjectionInfo = this.getProjectionInfo.bind(this);
    }

    componentDidMount() {
        const steps = joyride.ExportSummary as any[];
        this.joyrideAddSteps(steps);
    }

    componentDidUpdate(prevProps: Props) {
        if (this.props.walkthroughClicked && !prevProps.walkthroughClicked && !this.state.isRunning) {
            this?.helpers.reset(true);
            this.setState({isRunning: true});
        }
    }

    private joyrideAddSteps(steps: Step[]) {
        let newSteps = steps;

        if (!Array.isArray(newSteps)) {
            newSteps = [newSteps];
        }

        if (!newSteps.length) {
            return;
        }

        this.setState((currentState) => {
            const nextState = {...currentState};
            nextState.steps = nextState.steps.concat(newSteps);
            return nextState;
        });
    }

    private callback(data: any) {
        const {action, step, type} = data;
        if (action === 'close' || action === 'skip' || type === 'tour:end') {
            this.setState({isRunning: false});
            this.props.onWalkthroughReset();
            this?.helpers?.reset(true);
            window.location.hash = '';
        }

        if (step && step.scrollToId) {
            window.location.hash = step.scrollToId;
        }
    }

    private getProjectionInfo(projectionSrids: number[]) {
        // Generate elements to display information about the export options for the specified provider.
        let index = 0; // Used for keys as React considers this to be a list.
        const generateSection = (content) => (
            {content});
        const exportInfo = [];
        projectionSrids.map((srid => {
            const projection = this.props.projections.find((proj) => proj.srid === srid);
            if (projection) {
                exportInfo.push(generateSection(`EPSG:${srid} - ${projection.name}`));
            } else {
                // If we can't find a corresponding projection object, display the SRID.
                exportInfo.push(generateSection(`EPSG:${srid}`));
            }
        }));
        return (

{exportInfo.map((info) => info)}
);
    }

    private getExportInfo(provider: Eventkit.Provider) {
        // Generate elements to display information about the export options for the specified provider.
        const providerOptions = this.props.exportOptions[provider.slug];
        // Reusable func to add a section of text to the info.
        let index = 0; // Used for keys as React considers this to be a list.
        const generateSection = (content) => (

{content}
);
        const exportInfo = [];
        exportInfo.push((

{provider.name}
));
        if (providerOptions) {
            if (supportsZoomLevels(provider)) {
                // For sources that support specifying a zoom level, check for and validate the values, otherwise use from/to
                const minZoom = isZoomLevelInRange(providerOptions.minZoom, provider) ? providerOptions.minZoom : provider.level_from;
                const maxZoom = isZoomLevelInRange(providerOptions.maxZoom, provider) ? providerOptions.maxZoom : provider.level_to;
                exportInfo.push(generateSection(`Zooms: ${minZoom}-${maxZoom}`));
            } else {
                // Source does not support zooming
                exportInfo.push(generateSection(`Zooms: Default zoom selected.`));
            }
            if (providerOptions.formats && !!provider.supported_formats) {
                // Formats should always be specified.
                const formatNames = provider.supported_formats.filter(
                    format => providerOptions.formats.indexOf(format.slug) >= 0).map(format => format.name);
                exportInfo.push(generateSection(`Formats: ${formatNames.join(', ')}`));
            }
        } else {
            // If we allow no options to be selected, display a default message.
            exportInfo.push(generateSection(`Default options selected.`));
        }
        return (
{exportInfo.map((info) => info)}
);
    }

    render() {
        const {formats, classes} = this.props;
        const {steps, isRunning} = this.state;
        const dataStyle = {color: 'black'};
        const formatSet = {};

        const providers = this.props.providers.filter(provider => shouldDisplay(provider));
        const projections = this.props.projections.filter(projection => this.props.selectedProjections.indexOf(projection.srid) !== -1);

        // Get all selected formats, and map them to the sources that have selected them.
        Object.entries(this.props.exportOptions).map(([slug, providerOptions], ix) => {
            providerOptions.formats.map((formatSlug) => {
                const provider = providers.find(provider => provider.slug === slug);
                if (!formatSet.hasOwnProperty(formatSlug)) {
                    let format = formats.find(format => format.slug === formatSlug);
                    if (!format) {
                        format = provider.supported_formats.find(format => format.slug === formatSlug);
                    }
                    formatSet[formatSlug] = {
                        format: format,
                        sources: [provider]
                    };
                } else {

                    formatSet[formatSlug].sources.push(provider);
                }
            })
        });

        return (

                <EventkitJoyride
                    name="Create Page Step 3"
                    callback={this.callback}
                    ref={(instance) => {
                        this.joyride = instance;
                    }}
                    steps={steps}
                    continuous
                    showSkipButton
                    showProgress
                    getHelpers={(helpers: any) => {
                        this.helpers = helpers
                    }}
                    locale={{
                        back: (Back) as any,
                        close: (Close) as any,
                        last: (Done) as any,
                        next: (Next) as any,
                        skip: (Skip) as any,
                    }}
                    run={isRunning}
                />
                <CustomScrollbar>
                    <form id="form" className={`qa-ExportSummary-form ${classes.form}`}>
                        <Paper className={`qa-ExportSummary-Paper ${classes.paper}`} elevation={2}>
                            <div id="mainHeading" className={`qa-ExportSummary-mainHeading ${classes.heading}`}>
                                Preview and Run Export

                            <div id="subHeading" className={`qa-ExportSummary-subHeading ${classes.subHeading}`}>
                                Please make sure all the information below is correct.

                                <div
                                    id="select" className={`qa-ExportInfo-selectAll ${classes.selectAll}`}
                                    style={{padding: '0px 10px 10px 8px'}}
                                >
                                    <Checkbox
                                        classes={{root: classes.checkbox, checked: classes.checked}}
                                        name="ShareAll"
                                        checked={this.props.visibility === 'PUBLIC'}
                                        onChange={() => {
                                            if (this.props.visibility === 'PRIVATE') {
                                                this.props.updateExportInfo({
                                                    visibility: 'PUBLIC'
                                                });
                                                return;
                                            }
                                            this.props.updateExportInfo({
                                                visibility: 'PRIVATE'
                                            });
                                        }}
                                        style={{width: '24px', height: '24px'}}
                                    />

                                        Share with all EventKit users

                                <CustomTableRow
                                    className="qa-ExportSummary-name"
                                    title="Name"
                                    dataStyle={dataStyle}
                                >
                                    {this.props.exportName}
                                </CustomTableRow>
                                <CustomTableRow
                                    className="qa-ExportSummary-description"
                                    title="Description"
                                    dataStyle={dataStyle}
                                >
                                    {this.props.datapackDescription}
                                </CustomTableRow>
                                <CustomTableRow
                                    className="qa-ExportSummary-project"
                                    title="Project / Category"
                                    dataStyle={dataStyle}
                                >
                                    {this.props.projectName}
                                </CustomTableRow>
                                <CustomTableRow
                                    className="qa-ExportSummary-sources"
                                    title="Data Sources"
                                    dataStyle={{display: 'block'}}
                                >
                                    {providers.map(provider => this.getExportInfo(provider))}

                                        <InfoDialog
                                            title="Source and Format Details"
                                            style={{marginRight: '5px'}}
                                            iconProps={{style: {width: '24px', marginRight: '5px'}}}
                                            ref={(instance) => {
                                                this.infoDialogRef = instance;
                                            }}
                                        >

                                                Source(s):
                                                {providers.map((provider) => (

                                                                    {provider.name}:

                                                                {provider.service_description}

                                                    )
                                                )}
                                                Format(s):
                                                {Object.entries(formatSet).map(([slug, object]) => (

                                                                {(object as any).format.name}:

                                                            {(object as any).format.description}

                                                ))}

                                        </InfoDialog>
                                        <Link
                                            className={this.props.classes.name}
                                            onClick={() => {
                                                this.infoDialogRef.openDialog()
                                            }}
                                        >
                                            Source and Format Details
                                        </Link>

                                </CustomTableRow>
                                <CustomTableRow
                                    className="qa-ExportSummary-projections"
                                    title="Projection(s)"
                                    dataStyle={dataStyle}
                                >
                                    {this.getProjectionInfo(this.props.selectedProjections)}
                                </CustomTableRow>
                                <div id="aoi-heading"
                                     className={`qa-ExportSummary-aoiHeading ${classes.exportHeading}`}>
                                    Area of Interest (AOI)

                                <CustomTableRow
                                    className="qa-ExportsSummary-area"
                                    title="Area"
                                    dataStyle={dataStyle}
                                >
                                    {this.props.areaStr}
                                </CustomTableRow>

                            <div id="aoi-map" className={`qa-ExportSummary-map ${classes.mapCard}`}>
                                <MapCard geojson={this.props.geojson}>
                                    Selected Area of Interest
                                </MapCard>

                        </Paper>
                    </form>
                </CustomScrollbar>

        );
    }
}

function mapStateToProps(state) {
    return {
        geojson: state.aoiInfo.geojson,
        exportName: state.exportInfo.exportName,
        datapackDescription: state.exportInfo.datapackDescription,
        projectName: state.exportInfo.projectName,
        providers: state.exportInfo.providers,
        areaStr: state.exportInfo.areaStr,
        exportOptions: state.exportInfo.exportOptions,
        selectedProjections: state.exportInfo.projections,
        projections: state.projections,
        visibility: state.exportInfo.visibility,
    };
}

function mapDispatchToProps(dispatch) {
    return {
        updateExportInfo: (exportInfo) => {
            dispatch(updateExportInfo(exportInfo));
        },
    };
}

export default withTheme(withStyles(jss)(connect(mapStateToProps, mapDispatchToProps)(ExportSummary)));


text:
'use strict';

// MODULES //

var toStr = require( './tostring.js' );

// VARIABLES //

var RE = /^Symbol\(.*\)$/;

// MAIN //

/**
* Attempts to call a `Symbol` method.
*
* @private
* @param {*} value - value to test
* @returns {boolean} boolean indicating if able to call a `Symbol` method
*/
function test( value ) {
	try {
		return (
			// Objects created via `Object.create( null )` have no `valueOf()` method:
			typeof value.valueOf() === 'symbol' &&

			// Test output of a non-generic method:
			RE.test( toStr( value ) )
		);
	} catch ( err ) { // eslint-disable-line no-unused-vars
		return false;
	}
}

// EXPORTS //

module.exports = test;


text:
#ifndef	_PER_DECODER_H_
#define	_PER_DECODER_H_

#include <asn_application.h>
#include <per_support.h>

#if defined __cplusplus && defined USE_C_LINKAGE
extern "C" {
#endif

struct asn_TYPE_descriptor_s;	/* Forward declaration */

/*
 * Unaligned PER decoder of a "complete encoding" as per X.691#10.1.
 * On success, this call always returns (.consumed >= 1), as per X.691#10.1.3.
 */
asn_dec_rval_t uper_decode_complete(struct asn_codec_ctx_s *opt_codec_ctx,
	struct asn_TYPE_descriptor_s *type_descriptor,	/* Type to decode */
	void **struct_ptr,	/* Pointer to a target structure's pointer */
	const void *buffer,	/* Data to be decoded */
	size_t size		/* Size of data buffer */
	);

/*
 * Unaligned PER decoder of any ASN.1 type. May be invoked by the application.
 * WARNING: This call returns the number of BITS read from the stream. Beware.
 */
asn_dec_rval_t uper_decode(struct asn_codec_ctx_s *opt_codec_ctx,
	struct asn_TYPE_descriptor_s *type_descriptor,	/* Type to decode */
	void **struct_ptr,	/* Pointer to a target structure's pointer */
	const void *buffer,	/* Data to be decoded */
	size_t size,		/* Size of data buffer */
	int skip_bits,		/* Number of unused leading bits, 0..7 */
	int unused_bits		/* Number of unused tailing bits, 0..7 */
	);

/*
 * Type of the type-specific PER decoder function.
 */
typedef asn_dec_rval_t (per_type_decoder_f)(
		Allocator * allocator,
		asn_codec_ctx_t *opt_codec_ctx,
		struct asn_TYPE_descriptor_s *type_descriptor,
		asn_per_constraints_t *constraints,
		void **struct_ptr,
		asn_per_data_t *per_data
	);

#if defined __cplusplus && defined USE_C_LINKAGE
}
#endif

#endif	/* _PER_DECODER_H_ */


text:
class NNSprite;
class NNSoundManager;

class NNStartScene :	public NNScene
{
public:
	NNStartScene(void);
	~NNStartScene(void);

	virtual void	Render();
	virtual void	Update( float dTime );
	float GetStartSceneSumTime() { return m_Sumtime; }
private:
	NNSprite*		m_pBackGround;
	NNSprite*		m_pFilter;
	NNSprite*		m_pTitle;
	NNSprite*		m_pStartString[ START_STRING_NUMBER ];
	float			m_Sumtime;
};


text:
'use strict';

angular.module('kanbanApp').controller('CardActionCtrl', ['$scope', '$modalInstance', 'card',
function($scope, $modalInstance, card) {
  $scope.card = card;

  $scope.closeTask = function(idx) {
    $scope.card.tasks[idx].status = 'Closed';
  };

  $scope.reopenTask = function(idx) {
    $scope.card.tasks[idx].status = 'Open';
  };

  $scope.deleteTask = function(idx) {
    $scope.card.tasks.splice(idx, 1);
  };

  $scope.archiveCard = function(card) {
    $modalInstance.close({'card': card, 'outcome': 'archive'});
  };

  $scope.deleteCard = function(card) {
    $modalInstance.close({'card': card, 'outcome': 'delete'});
  };

  $scope.close = function(card) {
    $modalInstance.close(card);
  };
}]);


text:
package com.krishagni.catissueplus.core.biospecimen.services.impl;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import org.apache.commons.collections.CollectionUtils;

import com.krishagni.catissueplus.core.biospecimen.domain.Visit;
import com.krishagni.catissueplus.core.common.access.AccessCtrlMgr;
import com.krishagni.catissueplus.core.common.access.SiteCpPair;
import com.krishagni.catissueplus.core.common.service.impl.AbstractSearchResultProcessor;

public class VisitSearchResultProcessor extends AbstractSearchResultProcessor {
	@Override
	public String getEntity() {
		return Visit.getEntityName();
	}

	@Override
	protected String getQuery() {
		List<SiteCpPair> siteCps = AccessCtrlMgr.getInstance().getReadAccessSpecimenSiteCps(null, false);
		if (CollectionUtils.isEmpty(siteCps)) {
			return null;
		}

		boolean useMrnSites = AccessCtrlMgr.getInstance().isAccessRestrictedBasedOnMrn();
		String joinCondition = useMrnSites ? PMI_JOIN_COND : "";
		String cpSiteClause  = getCpSiteClause("s",  siteCps);

		String whereClause;
		if (useMrnSites) {
			String pmiSiteClause = getCpSiteClause("ps", siteCps);
			whereClause = String.format(PMI_WHERE_COND, pmiSiteClause, cpSiteClause);
		} else {
			whereClause = cpSiteClause;
		}

		return String.format(QUERY, joinCondition, whereClause);
	}

	@Override
	protected String getEntityPropsQuery() {
		return ENTITY_PROPS_QUERY;
	}

	private String getCpSiteClause(String siteAlias, Collection<SiteCpPair> siteCps) {
		List<String> clauses = new ArrayList<>();
		for (SiteCpPair siteCp : siteCps) {
			String clause;
			if (siteCp.getSiteId() != null) {
				clause = siteAlias + ".identifier = " + siteCp.getSiteId();
			} else {
				clause = siteAlias + ".institute_id = " + siteCp.getInstituteId();
			}

			if (siteCp.getCpId() != null) {
				clause += " and cpr.collection_protocol_id = " + siteCp.getCpId();
			}

			clauses.add("(" + clause + ")");
		}

		return "(" + String.join(" or ", clauses) + ")";
	}

	private static final String QUERY =
		"select " +
		"  distinct k.identifier, k.entity, k.entity_id, k.name, k.value " +
		"from " +
		"  os_search_entity_keywords k " +
		"  inner join catissue_specimen_coll_group v on v.identifier = k.entity_id " +
		"  inner join catissue_coll_prot_reg cpr on cpr.identifier = v.collection_protocol_reg_id " +
		"  inner join catissue_site_cp cp_site on cp_site.collection_protocol_id = cpr.collection_protocol_id " +
		"  inner join catissue_site s on s.identifier = cp_site.site_id " +
		"  %s " +
		"where " +
		"  k.value like ? and " +
		"  k.identifier > ? and " +
		"  k.entity = 'visit' and " +
		"  k.status = 1 and " +
		"  v.activity_status != 'Disabled' and " +
		"  (%s) " +
		"order by " +
		"  k.identifier";

	private static final String PMI_JOIN_COND =
		"inner join catissue_participant p on p.identifier = cpr.participant_id " +
		"left join catissue_part_medical_id pmi on pmi.participant_id = p.identifier " +
		"left join catissue_site ps on ps.identifier = pmi.site_id ";

	private static final String PMI_WHERE_COND =
		"((ps.identifier is not null and %s) or (ps.identifier is null and %s))";

	private static final String ENTITY_PROPS_QUERY =
		"select " +
		"  visit.identifier as entityId, 'collection_protocol' as name, cp.short_title as value " +
		"from " +
		"  catissue_specimen_coll_group visit " +
		"  inner join catissue_coll_prot_reg cpr on cpr.identifier = visit.collection_protocol_reg_id " +
		"  inner join catissue_collection_protocol cp on cp.identifier = cpr.collection_protocol_id " +
		"where " +
		"  visit.identifier in (:entityIds)";
}