//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0-b52-fcs
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2013.12.20 at 12:48:21 PM GMT
//

package weka.core.pmml.jaxbbindings;

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.XmlAttribute;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlElementRefs;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for Scorecard element declaration.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <element name="Scorecard">
 *   <complexType>
 *     <complexContent>
 *       <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *         <sequence>
 *           <element ref="{http://www.dmg.org/PMML-4_1}Extension" maxOccurs="unbounded" minOccurs="0"/>
 *           <element ref="{http://www.dmg.org/PMML-4_1}MiningSchema"/>
 *           <element ref="{http://www.dmg.org/PMML-4_1}Output" minOccurs="0"/>
 *           <element ref="{http://www.dmg.org/PMML-4_1}ModelStats" minOccurs="0"/>
 *           <element ref="{http://www.dmg.org/PMML-4_1}ModelExplanation" minOccurs="0"/>
 *           <element ref="{http://www.dmg.org/PMML-4_1}Targets" minOccurs="0"/>
 *           <element ref="{http://www.dmg.org/PMML-4_1}LocalTransformations" minOccurs="0"/>
 *           <element ref="{http://www.dmg.org/PMML-4_1}Characteristics"/>
 *           <element ref="{http://www.dmg.org/PMML-4_1}ModelVerification" minOccurs="0"/>
 *           <element ref="{http://www.dmg.org/PMML-4_1}Extension" maxOccurs="unbounded" minOccurs="0"/>
 *         </sequence>
 *         <attribute name="algorithmName" type="{http://www.w3.org/2001/XMLSchema}string" />
 *         <attribute name="baselineMethod" default="other">
 *           <simpleType>
 *             <restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *               <enumeration value="max"/>
 *               <enumeration value="min"/>
 *               <enumeration value="mean"/>
 *               <enumeration value="neutral"/>
 *               <enumeration value="other"/>
 *             </restriction>
 *           </simpleType>
 *         </attribute>
 *         <attribute name="baselineScore" type="{http://www.dmg.org/PMML-4_1}NUMBER" />
 *         <attribute name="functionName" use="required" type="{http://www.dmg.org/PMML-4_1}MINING-FUNCTION" />
 *         <attribute name="initialScore" type="{http://www.dmg.org/PMML-4_1}NUMBER" default="0" />
 *         <attribute name="isScorable" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
 *         <attribute name="modelName" type="{http://www.w3.org/2001/XMLSchema}string" />
 *         <attribute name="reasonCodeAlgorithm" default="pointsBelow">
 *           <simpleType>
 *             <restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *               <enumeration value="pointsAbove"/>
 *               <enumeration value="pointsBelow"/>
 *             </restriction>
 *           </simpleType>
 *         </attribute>
 *         <attribute name="useReasonCodes" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
 *       </restriction>
 *     </complexContent>
 *   </complexType>
 * </element>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "content"
})
@XmlRootElement(name = "Scorecard")
public class Scorecard {

    @XmlElementRefs({
        @XmlElementRef(name = "ModelExplanation", namespace = "http://www.dmg.org/PMML-4_1", type = ModelExplanation.class),
        @XmlElementRef(name = "ModelStats", namespace = "http://www.dmg.org/PMML-4_1", type = ModelStats.class),
        @XmlElementRef(name = "Characteristics", namespace = "http://www.dmg.org/PMML-4_1", type = Characteristics.class),
        @XmlElementRef(name = "Output", namespace = "http://www.dmg.org/PMML-4_1", type = Output.class),
        @XmlElementRef(name = "LocalTransformations", namespace = "http://www.dmg.org/PMML-4_1", type = LocalTransformations.class),
        @XmlElementRef(name = "Targets", namespace = "http://www.dmg.org/PMML-4_1", type = Targets.class),
        @XmlElementRef(name = "MiningSchema", namespace = "http://www.dmg.org/PMML-4_1", type = MiningSchema.class),
        @XmlElementRef(name = "ModelVerification", namespace = "http://www.dmg.org/PMML-4_1", type = ModelVerification.class),
        @XmlElementRef(name = "Extension", namespace = "http://www.dmg.org/PMML-4_1", type = Extension.class)
    })
    protected List<Object> content;
    @XmlAttribute
    protected String algorithmName;
    @XmlAttribute
    protected String baselineMethod;
    @XmlAttribute
    protected Double baselineScore;
    @XmlAttribute(required = true)
    protected MININGFUNCTION functionName;
    @XmlAttribute
    protected Double initialScore;
    @XmlAttribute
    protected Boolean isScorable;
    @XmlAttribute
    protected String modelName;
    @XmlAttribute
    protected String reasonCodeAlgorithm;
    @XmlAttribute
    protected Boolean useReasonCodes;

    /**
     * Gets the rest of the content model.
     *
     *

     * You are getting this "catch-all" property because of the following reason:
     * The field name "Extension" is used by two different parts of a schema. See:
     * line 3310 of file:/home/david/workspace/weka/pmml-4-1.xsd
     * line 3301 of file:/home/david/workspace/weka/pmml-4-1.xsd
     *

     * To get rid of this property, apply a property customization to one
     * of both of the following declarations to change their names:
     * Gets the value of the content 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 content property.
     *
     *

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

     *    getContent().add(newItem);
     *

     *
     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link ModelExplanation }
     * {@link ModelStats }
     * {@link Characteristics }
     * {@link Output }
     * {@link LocalTransformations }
     * {@link Targets }
     * {@link MiningSchema }
     * {@link ModelVerification }
     * {@link Extension }
     *
     *
     */
    public List<Object> getContent() {
        if (content == null) {
            content = new ArrayList<Object>();
        }
        return this.content;
    }

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

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

    /**
     * Gets the value of the baselineMethod property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getBaselineMethod() {
        if (baselineMethod == null) {
            return "other";
        } else {
            return baselineMethod;
        }
    }

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

    /**
     * Gets the value of the baselineScore property.
     *
     * @return
     *     possible object is
     *     {@link Double }
     *
     */
    public Double getBaselineScore() {
        return baselineScore;
    }

    /**
     * Sets the value of the baselineScore property.
     *
     * @param value
     *     allowed object is
     *     {@link Double }
     *
     */
    public void setBaselineScore(Double value) {
        this.baselineScore = value;
    }

    /**
     * Gets the value of the functionName property.
     *
     * @return
     *     possible object is
     *     {@link MININGFUNCTION }
     *
     */
    public MININGFUNCTION getFunctionName() {
        return functionName;
    }

    /**
     * Sets the value of the functionName property.
     *
     * @param value
     *     allowed object is
     *     {@link MININGFUNCTION }
     *
     */
    public void setFunctionName(MININGFUNCTION value) {
        this.functionName = value;
    }

    /**
     * Gets the value of the initialScore property.
     *
     * @return
     *     possible object is
     *     {@link Double }
     *
     */
    public double getInitialScore() {
        if (initialScore == null) {
            return  0.0D;
        } else {
            return initialScore;
        }
    }

    /**
     * Sets the value of the initialScore property.
     *
     * @param value
     *     allowed object is
     *     {@link Double }
     *
     */
    public void setInitialScore(Double value) {
        this.initialScore = value;
    }

    /**
     * Gets the value of the isScorable property.
     *
     * @return
     *     possible object is
     *     {@link Boolean }
     *
     */
    public boolean isIsScorable() {
        if (isScorable == null) {
            return true;
        } else {
            return isScorable;
        }
    }

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

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

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

    /**
     * Gets the value of the reasonCodeAlgorithm property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getReasonCodeAlgorithm() {
        if (reasonCodeAlgorithm == null) {
            return "pointsBelow";
        } else {
            return reasonCodeAlgorithm;
        }
    }

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

    /**
     * Gets the value of the useReasonCodes property.
     *
     * @return
     *     possible object is
     *     {@link Boolean }
     *
     */
    public boolean isUseReasonCodes() {
        if (useReasonCodes == null) {
            return true;
        } else {
            return useReasonCodes;
        }
    }

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

}

{'repo_name': 'umple/umple', 'stars': '122', 'repo_language': 'Java', 'file_name': 'GenerationUnit.java', 'mime_type': 'text/html', 'hash': -7373350005009694376, 'source_dataset': 'data'}


/*
 * Copyright 2015-2016 Amazon.com, Inc. or its affiliates. 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.
 * A copy of the License is located at
 *
 *  http://aws.amazon.com/apache2.0
 *
 * or in the "license" file accompanying this file. This file 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.
 */
var AWS = require('aws-sdk');
var AWSIoTData = require('aws-iot-device-sdk');

module.exports.AWS = AWS;
module.exports.AWSIoTData = AWSIoTData;

{'repo_name': 'aws/aws-iot-device-sdk-js', 'stars': '851', 'repo_language': 'JavaScript', 'file_name': 'exceptions.js', 'mime_type': 'text/plain', 'hash': 3815170006262716241, 'source_dataset': 'data'}


/*
 * Copyright 2014 Advanced Micro Devices, Inc.
 *
 * 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 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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.
 *
 */

#ifndef KFD_KERNEL_QUEUE_H_
#define KFD_KERNEL_QUEUE_H_

#include <linux/list.h>
#include <linux/types.h>
#include "kfd_priv.h"

/**
 * struct kernel_queue_ops
 *
 * @initialize: Initialize a kernel queue, including allocations of GART memory
 * needed for the queue.
 *
 * @uninitialize: Uninitialize a kernel queue and free all its memory usages.
 *
 * @acquire_packet_buffer: Returns a pointer to the location in the kernel
 * queue ring buffer where the calling function can write its packet. It is
 * Guaranteed that there is enough space for that packet. It also updates the
 * pending write pointer to that location so subsequent calls to
 * acquire_packet_buffer will get a correct write pointer
 *
 * @submit_packet: Update the write pointer and doorbell of a kernel queue.
 *
 * @sync_with_hw: Wait until the write pointer and the read pointer of a kernel
 * queue are equal, which means the CP has read all the submitted packets.
 *
 * @rollback_packet: This routine is called if we failed to build an acquired
 * packet for some reason. It just overwrites the pending wptr with the current
 * one
 *
 */
struct kernel_queue_ops {
	bool	(*initialize)(struct kernel_queue *kq, struct kfd_dev *dev,
			enum kfd_queue_type type, unsigned int queue_size);
	void	(*uninitialize)(struct kernel_queue *kq);
	int	(*acquire_packet_buffer)(struct kernel_queue *kq,
					size_t packet_size_in_dwords,
					unsigned int **buffer_ptr);

	void	(*submit_packet)(struct kernel_queue *kq);
	void	(*rollback_packet)(struct kernel_queue *kq);
};

struct kernel_queue {
	struct kernel_queue_ops ops;
	struct kernel_queue_ops ops_asic_specific;

	/* data */
	struct kfd_dev		*dev;
	struct mqd_manager	*mqd_mgr;
	struct queue		*queue;
	uint64_t		pending_wptr64;
	uint32_t		pending_wptr;
	unsigned int		nop_packet;

	struct kfd_mem_obj	*rptr_mem;
	uint32_t		*rptr_kernel;
	uint64_t		rptr_gpu_addr;
	struct kfd_mem_obj	*wptr_mem;
	union {
		uint64_t	*wptr64_kernel;
		uint32_t	*wptr_kernel;
	};
	uint64_t		wptr_gpu_addr;
	struct kfd_mem_obj	*pq;
	uint64_t		pq_gpu_addr;
	uint32_t		*pq_kernel_addr;
	struct kfd_mem_obj	*eop_mem;
	uint64_t		eop_gpu_addr;
	uint32_t		*eop_kernel_addr;

	struct kfd_mem_obj	*fence_mem_obj;
	uint64_t		fence_gpu_addr;
	void			*fence_kernel_address;

	struct list_head	list;
};

void kernel_queue_init_cik(struct kernel_queue_ops *ops);
void kernel_queue_init_vi(struct kernel_queue_ops *ops);
void kernel_queue_init_v9(struct kernel_queue_ops *ops);
void kernel_queue_init_v10(struct kernel_queue_ops *ops);

#endif /* KFD_KERNEL_QUEUE_H_ */

{'repo_name': 'raspberrypi/linux', 'stars': '6928', 'repo_language': 'C', 'file_name': 'ixgbe_dcb.h', 'mime_type': 'text/x-c', 'hash': -7165362315202818253, 'source_dataset': 'data'}


//=- AnalysisBasedWarnings.h - Sema warnings based on libAnalysis -*- C++ -*-=//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file defines AnalysisBasedWarnings, a worker object used by Sema
// that issues warnings based on dataflow-analysis.
//===----------------------------------------------------------------------===//

#ifndef LLVM_CLANG_SEMA_ANALYSISBASEDWARNINGS_H
#define LLVM_CLANG_SEMA_ANALYSISBASEDWARNINGS_H

#include "llvm/ADT/DenseMap.h"

namespace clang {

class BlockExpr;
class Decl;
class FunctionDecl;
class ObjCMethodDecl;
class QualType;
class Sema;
namespace sema {
  class FunctionScopeInfo;
}

namespace sema {

class AnalysisBasedWarnings {
public:
  class Policy {
    friend class AnalysisBasedWarnings;
    // The warnings to run.
    unsigned enableCheckFallThrough : 1;
    unsigned enableCheckUnreachable : 1;
    unsigned enableThreadSafetyAnalysis : 1;
    unsigned enableConsumedAnalysis : 1;
  public:
    Policy();
    void disableCheckFallThrough() { enableCheckFallThrough = 0; }
  };

private:
  Sema &S;
  Policy DefaultPolicy;

  enum VisitFlag { NotVisited = 0, Visited = 1, Pending = 2 };
  llvm::DenseMap<const FunctionDecl*, VisitFlag> VisitedFD;

  /// \name Statistics
  /// @{

  /// Number of function CFGs built and analyzed.
  unsigned NumFunctionsAnalyzed;

  /// Number of functions for which the CFG could not be successfully
  /// built.
  unsigned NumFunctionsWithBadCFGs;

  /// Total number of blocks across all CFGs.
  unsigned NumCFGBlocks;

  /// Largest number of CFG blocks for a single function analyzed.
  unsigned MaxCFGBlocksPerFunction;

  /// Total number of CFGs with variables analyzed for uninitialized
  /// uses.
  unsigned NumUninitAnalysisFunctions;

  /// Total number of variables analyzed for uninitialized uses.
  unsigned NumUninitAnalysisVariables;

  /// Max number of variables analyzed for uninitialized uses in a single
  /// function.
  unsigned MaxUninitAnalysisVariablesPerFunction;

  /// Total number of block visits during uninitialized use analysis.
  unsigned NumUninitAnalysisBlockVisits;

  /// Max number of block visits during uninitialized use analysis of
  /// a single function.
  unsigned MaxUninitAnalysisBlockVisitsPerFunction;

  /// @}

public:
  AnalysisBasedWarnings(Sema &s);

  void IssueWarnings(Policy P, FunctionScopeInfo *fscope,
                     const Decl *D, QualType BlockType);

  Policy getDefaultPolicy() { return DefaultPolicy; }

  void PrintStats() const;
};

}} // end namespace clang::sema

#endif

{'repo_name': 'IIJ-NetBSD/netbsd-src', 'stars': '114', 'repo_language': 'None', 'file_name': 'cross.pl', 'mime_type': 'text/x-perl', 'hash': 967139215334440703, 'source_dataset': 'data'}


// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package org.chromium.content.app;

/**
 * This is needed to register multiple SandboxedProcess services so that we can have
 * more than one sandboxed process.
 */
public class SandboxedProcessService70 extends SandboxedProcessService {

}

{'repo_name': 'kiwibrowser/src', 'stars': '728', 'repo_language': 'None', 'file_name': '3db76d1dd7d3a759dccc3f8fa7f68675c080cb095e4881063a6b850fdd68b8bc.pem', 'mime_type': 'text/plain', 'hash': 7940000554742974568, 'source_dataset': 'data'}


const build = require('@storybook/core/standalone');
const frameworkOptions = require('./dist/server/options').default;

async function buildStandalone(options) {
  return build(options, frameworkOptions);
}

module.exports = buildStandalone;

{'repo_name': 'storybookjs/storybook', 'stars': '50066', 'repo_language': 'TypeScript', 'file_name': 'config.yml', 'mime_type': 'text/plain', 'hash': -1572751222963619395, 'source_dataset': 'data'}


#ifndef _LAPACKE_EXAMPLE_AUX_
#define _LAPACKE_EXAMPLE_AUX_

void print_matrix_rowmajor( char* desc, lapack_int m, lapack_int n, double* mat, lapack_int ldm );
void print_matrix_colmajor( char* desc, lapack_int m, lapack_int n, double* mat, lapack_int ldm );
void print_vector( char* desc, lapack_int n, lapack_int* vec );

#endif /* _LAPACKE_EXAMPLE_AUX_*/

{'repo_name': 'Reference-LAPACK/lapack', 'stars': '609', 'repo_language': 'Fortran', 'file_name': 'PreventInSourceBuilds.cmake', 'mime_type': 'text/plain', 'hash': -9174755594813364179, 'source_dataset': 'data'}


/*
 *  Copyright 2015 The WebRTC Project Authors. All rights reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

#ifndef P2P_STUNPROBER_STUNPROBER_H_
#define P2P_STUNPROBER_STUNPROBER_H_

#include <set>
#include <string>
#include <vector>

#include "rtc_base/asyncinvoker.h"
#include "rtc_base/bytebuffer.h"
#include "rtc_base/callback.h"
#include "rtc_base/constructormagic.h"
#include "rtc_base/ipaddress.h"
#include "rtc_base/network.h"
#include "rtc_base/socketaddress.h"
#include "rtc_base/thread.h"
#include "rtc_base/thread_checker.h"

namespace rtc {
class AsyncPacketSocket;
class PacketSocketFactory;
class Thread;
class NetworkManager;
class AsyncResolverInterface;
}  // namespace rtc

namespace stunprober {

class StunProber;

static const int kMaxUdpBufferSize = 1200;

typedef rtc::Callback2<void, StunProber*, int> AsyncCallback;

enum NatType {
  NATTYPE_INVALID,
  NATTYPE_NONE,          // Not behind a NAT.
  NATTYPE_UNKNOWN,       // Behind a NAT but type can't be determine.
  NATTYPE_SYMMETRIC,     // Behind a symmetric NAT.
  NATTYPE_NON_SYMMETRIC  // Behind a non-symmetric NAT.
};

class StunProber : public sigslot::has_slots<> {
 public:
  enum Status {       // Used in UMA_HISTOGRAM_ENUMERATION.
    SUCCESS,          // Successfully received bytes from the server.
    GENERIC_FAILURE,  // Generic failure.
    RESOLVE_FAILED,   // Host resolution failed.
    WRITE_FAILED,     // Sending a message to the server failed.
    READ_FAILED,      // Reading the reply from the server failed.
  };

  class Observer {
   public:
    virtual ~Observer() = default;
    virtual void OnPrepared(StunProber* prober, StunProber::Status status) = 0;
    virtual void OnFinished(StunProber* prober, StunProber::Status status) = 0;
  };

  struct Stats {
    Stats();
    ~Stats();

    // |raw_num_request_sent| is the total number of requests
    // sent. |num_request_sent| is the count of requests against a server where
    // we see at least one response. |num_request_sent| is designed to protect
    // against DNS resolution failure or the STUN server is not responsive
    // which could skew the result.
    int raw_num_request_sent = 0;
    int num_request_sent = 0;

    int num_response_received = 0;
    NatType nat_type = NATTYPE_INVALID;
    int average_rtt_ms = -1;
    int success_percent = 0;
    int target_request_interval_ns = 0;
    int actual_request_interval_ns = 0;

    // Also report whether this trial can't be considered truly as shared
    // mode. Share mode only makes sense when we have multiple IP resolved and
    // successfully probed.
    bool shared_socket_mode = false;

    std::string host_ip;

    // If the srflx_addrs has more than 1 element, the NAT is symmetric.
    std::set<std::string> srflx_addrs;
  };

  StunProber(rtc::PacketSocketFactory* socket_factory,
             rtc::Thread* thread,
             const rtc::NetworkManager::NetworkList& networks);
  ~StunProber() override;

  // Begin performing the probe test against the |servers|. If
  // |shared_socket_mode| is false, each request will be done with a new socket.
  // Otherwise, a unique socket will be used for a single round of requests
  // against all resolved IPs. No single socket will be used against a given IP
  // more than once.  The interval of requests will be as close to the requested
  // inter-probe interval |stun_ta_interval_ms| as possible. After sending out
  // the last scheduled request, the probe will wait |timeout_ms| for request
  // responses and then call |finish_callback|.  |requests_per_ip| indicates how
  // many requests should be tried for each resolved IP address. In shared mode,
  // (the number of sockets to be created) equals to |requests_per_ip|. In
  // non-shared mode, (the number of sockets) equals to requests_per_ip * (the
  // number of resolved IP addresses). TODO(guoweis): Remove this once
  // everything moved to Prepare() and Run().
  bool Start(const std::vector<rtc::SocketAddress>& servers,
             bool shared_socket_mode,
             int stun_ta_interval_ms,
             int requests_per_ip,
             int timeout_ms,
             const AsyncCallback finish_callback);

  // TODO(guoweis): The combination of Prepare() and Run() are equivalent to the
  // Start() above. Remove Start() once everything is migrated.
  bool Prepare(const std::vector<rtc::SocketAddress>& servers,
               bool shared_socket_mode,
               int stun_ta_interval_ms,
               int requests_per_ip,
               int timeout_ms,
               StunProber::Observer* observer);

  // Start to send out the STUN probes.
  bool Start(StunProber::Observer* observer);

  // Method to retrieve the Stats once |finish_callback| is invoked. Returning
  // false when the result is inconclusive, for example, whether it's behind a
  // NAT or not.
  bool GetStats(Stats* stats) const;

  int estimated_execution_time() {
    return static_cast<int>(requests_per_ip_ * all_servers_addrs_.size() *
                            interval_ms_);
  }

 private:
  // A requester tracks the requests and responses from a single socket to many
  // STUN servers.
  class Requester;

  // TODO(guoweis): Remove this once all dependencies move away from
  // AsyncCallback.
  class ObserverAdapter : public Observer {
   public:
    ObserverAdapter();
    ~ObserverAdapter() override;

    void set_callback(AsyncCallback callback) { callback_ = callback; }
    void OnPrepared(StunProber* stunprober, Status status) override;
    void OnFinished(StunProber* stunprober, Status status) override;

   private:
    AsyncCallback callback_;
  };

  bool ResolveServerName(const rtc::SocketAddress& addr);
  void OnServerResolved(rtc::AsyncResolverInterface* resolver);

  void OnSocketReady(rtc::AsyncPacketSocket* socket,
                     const rtc::SocketAddress& addr);

  void CreateSockets();

  bool Done() {
    return num_request_sent_ >= requests_per_ip_ * all_servers_addrs_.size();
  }

  size_t total_socket_required() {
    return (shared_socket_mode_ ? 1 : all_servers_addrs_.size()) *
           requests_per_ip_;
  }

  bool should_send_next_request(int64_t now);
  int get_wake_up_interval_ms();

  bool SendNextRequest();

  // Will be invoked in 1ms intervals and schedule the next request from the
  // |current_requester_| if the time has passed for another request.
  void MaybeScheduleStunRequests();

  void ReportOnPrepared(StunProber::Status status);
  void ReportOnFinished(StunProber::Status status);

  Requester* CreateRequester();

  Requester* current_requester_ = nullptr;

  // The time when the next request should go out.
  int64_t next_request_time_ms_ = 0;

  // Total requests sent so far.
  uint32_t num_request_sent_ = 0;

  bool shared_socket_mode_ = false;

  // How many requests should be done against each resolved IP.
  uint32_t requests_per_ip_ = 0;

  // Milliseconds to pause between each STUN request.
  int interval_ms_;

  // Timeout period after the last request is sent.
  int timeout_ms_;

  // STUN server name to be resolved.
  std::vector<rtc::SocketAddress> servers_;

  // Weak references.
  rtc::PacketSocketFactory* socket_factory_;
  rtc::Thread* thread_;

  // Accumulate all resolved addresses.
  std::vector<rtc::SocketAddress> all_servers_addrs_;

  // The set of STUN probe sockets and their state.
  std::vector<Requester*> requesters_;

  rtc::ThreadChecker thread_checker_;

  // Temporary storage for created sockets.
  std::vector<rtc::AsyncPacketSocket*> sockets_;
  // This tracks how many of the sockets are ready.
  size_t total_ready_sockets_ = 0;

  rtc::AsyncInvoker invoker_;

  Observer* observer_ = nullptr;
  // TODO(guoweis): Remove this once all dependencies move away from
  // AsyncCallback.
  ObserverAdapter observer_adapter_;

  rtc::NetworkManager::NetworkList networks_;

  RTC_DISALLOW_COPY_AND_ASSIGN(StunProber);
};

}  // namespace stunprober

#endif  // P2P_STUNPROBER_STUNPROBER_H_

{'repo_name': 'UWPCommunity/Quarrel', 'stars': '146', 'repo_language': 'C++', 'file_name': 'Flyouts.resw', 'mime_type': 'text/xml', 'hash': 1261160083739930931, 'source_dataset': 'data'}


mimic-fn

Make a function mimic another one

function mimic imitate rename copy inherit properties name func fn set infer change

{'repo_name': 'Xtraball/Siberian', 'stars': '118', 'repo_language': 'JavaScript', 'file_name': 'edit.js', 'mime_type': 'text/plain', 'hash': 4383474540988926395, 'source_dataset': 'data'}


// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Razor.Language;
using Microsoft.AspNetCore.Razor.Language.CodeGeneration;

namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X
{
    internal class ViewComponentTagHelperTargetExtension : IViewComponentTagHelperTargetExtension
    {
        private static readonly string[] PublicModifiers = new[] { "public" };

        public string TagHelperTypeName { get; set; } = "Microsoft.AspNetCore.Razor.TagHelpers.TagHelper";

        public string ViewComponentHelperTypeName { get; set; } = "global::Microsoft.AspNetCore.Mvc.IViewComponentHelper";

        public string ViewComponentHelperVariableName { get; set; } = "_helper";

        public string ViewComponentInvokeMethodName { get; set; } = "InvokeAsync";

        public string HtmlAttributeNotBoundAttributeTypeName { get; set; } = "Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeNotBoundAttribute";

        public string ViewContextAttributeTypeName { get; set; } = "global::Microsoft.AspNetCore.Mvc.ViewFeatures.ViewContextAttribute";

        public string ViewContextTypeName { get; set; } = "global::Microsoft.AspNetCore.Mvc.Rendering.ViewContext";

        public string ViewContextPropertyName { get; set; } = "ViewContext";

        public string HtmlTargetElementAttributeTypeName { get; set; } = "Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElementAttribute";

        public string TagHelperProcessMethodName { get; set; } = "ProcessAsync";

        public string TagHelperContextTypeName { get; set; } = "Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext";

        public string TagHelperContextVariableName { get; set; } = "context";

        public string TagHelperOutputTypeName { get; set; } = "Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput";

        public string TagHelperOutputVariableName { get; set; } = "output";

        public string TagHelperOutputTagNamePropertyName { get; set; } = "TagName";

        public string TagHelperOutputContentPropertyName { get; set; } = "Content";

        public string TagHelperContentSetMethodName { get; set; } = "SetHtmlContent";

        public string TagHelperContentVariableName { get; set; } = "content";

        public string IViewContextAwareTypeName { get; set; } = "global::Microsoft.AspNetCore.Mvc.ViewFeatures.IViewContextAware";

        public string IViewContextAwareContextualizeMethodName { get; set; } = "Contextualize";

        public void WriteViewComponentTagHelper(CodeRenderingContext context, ViewComponentTagHelperIntermediateNode node)
        {
            // Add target element.
            WriteTargetElementString(context.CodeWriter, node.TagHelper);

            // Initialize declaration.
            using (context.CodeWriter.BuildClassDeclaration(
                PublicModifiers,
                node.ClassName,
                TagHelperTypeName,
                interfaces: null,
                typeParameters: null))
            {
                // Add view component helper.
                context.CodeWriter.WriteVariableDeclaration(
                    $"private readonly {ViewComponentHelperTypeName}",
                    ViewComponentHelperVariableName,
                    value: null);

                // Add constructor.
                WriteConstructorString(context.CodeWriter, node.ClassName);

                // Add attributes.
                WriteAttributeDeclarations(context.CodeWriter, node.TagHelper);

                // Add process method.
                WriteProcessMethodString(context.CodeWriter, node.TagHelper);
            }
        }

        private void WriteConstructorString(CodeWriter writer, string className)
        {
            writer.Write("public ")
                .Write(className)
                .Write("(")
                .Write($"{ViewComponentHelperTypeName} helper")
                .WriteLine(")");
            using (writer.BuildScope())
            {
                writer.WriteStartAssignment(ViewComponentHelperVariableName)
                    .Write("helper")
                    .WriteLine(";");
            }
        }

        private void WriteAttributeDeclarations(CodeWriter writer, TagHelperDescriptor tagHelper)
        {
            writer.Write("[")
              .Write(HtmlAttributeNotBoundAttributeTypeName)
              .WriteParameterSeparator()
              .Write(ViewContextAttributeTypeName)
              .WriteLine("]");

            writer.WriteAutoPropertyDeclaration(
                PublicModifiers,
                ViewContextTypeName,
                ViewContextPropertyName);

            foreach (var attribute in tagHelper.BoundAttributes)
            {
                writer.WriteAutoPropertyDeclaration(
                    PublicModifiers,
                    attribute.TypeName,
                    attribute.GetPropertyName());

                if (attribute.IndexerTypeName != null)
                {
                    writer.Write(" = ")
                        .WriteStartNewObject(attribute.TypeName)
                        .WriteEndMethodInvocation();
                }
            }
        }

        private void WriteProcessMethodString(CodeWriter writer, TagHelperDescriptor tagHelper)
        {
            using (writer.BuildMethodDeclaration(
                    $"public override async",
                    $"global::{typeof(Task).FullName}",
                    TagHelperProcessMethodName,
                    new Dictionary<string, string>()
                    {
                        { TagHelperContextTypeName, TagHelperContextVariableName },
                        { TagHelperOutputTypeName, TagHelperOutputVariableName }
                    }))
            {
                writer.WriteInstanceMethodInvocation(
                    $"({ViewComponentHelperVariableName} as {IViewContextAwareTypeName})?",
                    IViewContextAwareContextualizeMethodName,
                    new[] { ViewContextPropertyName });

                var methodParameters = GetMethodParameters(tagHelper);
                writer.Write("var ")
                    .WriteStartAssignment(TagHelperContentVariableName)
                    .WriteInstanceMethodInvocation($"await {ViewComponentHelperVariableName}", ViewComponentInvokeMethodName, methodParameters);
                writer.WriteStartAssignment($"{TagHelperOutputVariableName}.{TagHelperOutputTagNamePropertyName}")
                    .WriteLine("null;");
                writer.WriteInstanceMethodInvocation(
                    $"{TagHelperOutputVariableName}.{TagHelperOutputContentPropertyName}",
                    TagHelperContentSetMethodName,
                    new[] { TagHelperContentVariableName });
            }
        }

        private string[] GetMethodParameters(TagHelperDescriptor tagHelper)
        {
            var propertyNames = tagHelper.BoundAttributes.Select(attribute => attribute.GetPropertyName());
            var joinedPropertyNames = string.Join(", ", propertyNames);
            var parametersString = $"new {{ { joinedPropertyNames } }}";
            var viewComponentName = tagHelper.GetViewComponentName();
            var methodParameters = new[] { $"\"{viewComponentName}\"", parametersString };
            return methodParameters;
        }

        private void WriteTargetElementString(CodeWriter writer, TagHelperDescriptor tagHelper)
        {
            Debug.Assert(tagHelper.TagMatchingRules.Count() == 1);

            var rule = tagHelper.TagMatchingRules.First();

            writer.Write("[")
                .WriteStartMethodInvocation(HtmlTargetElementAttributeTypeName)
                .WriteStringLiteral(rule.TagName)
                .WriteLine(")]");
        }
    }
}

{'repo_name': 'aspnet/Razor', 'stars': '877', 'repo_language': 'C#', 'file_name': 'xunit.runner.json', 'mime_type': 'text/plain', 'hash': 1369579429463771946, 'source_dataset': 'data'}


//VTK::System::Dec

// ============================================================================
//
//  Program:   Visualization Toolkit
//  Module:    vtkOutlineGlowUpscalePassFS.glsl
//
//  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
//  All rights reserved.
//  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
//
//     This software is distributed WITHOUT ANY WARRANTY; without even
//     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
//     PURPOSE.  See the above copyright notice for more information.
//
// ============================================================================

// Fragment shader used by outline glow pass to combine the original scene and the blurred image to form an outline

in vec2 tcoordVC;
uniform sampler2D scene;
uniform sampler2D source;

uniform float outlineIntensity;

// the output of this shader
//VTK::Output::Dec

void main(void)
{
  vec4 color = texture2D(scene, tcoordVC);
  if( length(color.rgb) > 0.0)
  {
    // If the pixel was filled in the original scene it not part of the outline
    gl_FragData[0] = vec4(0.0, 0.0, 0.0, 0.0);
  }
  else
  {
    vec4 blurredColor = texture2D(source,tcoordVC);
    float brightness = max(blurredColor.r, max(blurredColor.g, blurredColor.b));
      gl_FragData[0].rgb = blurredColor.rgb * outlineIntensity;
      gl_FragData[0].a = brightness * outlineIntensity;
    }
}

{'repo_name': 'Kitware/VTK', 'stars': '1386', 'repo_language': 'C++', 'file_name': 'TestSVGContextExport.cxx', 'mime_type': 'text/x-c++', 'hash': -3289780327826945410, 'source_dataset': 'data'}


       program bwbig
       common ibarray(100),isarray(100),igarray(100),inv(20)
       common mult1(100),mult2(100),mult3(200),mult4(200),mult5(100)
       common mat1(20,20),irhs1(20)
       common mat2(20,20),irhs2(20),jmark(20),markr(20),jx(20)
       common isol(20)
       common ip(20)
       dimension mpol(6),ipol(6),idbarr(12,12),iper(6),ibper(6)

       idd =3
       ipold =4
       idegm =2
       idegn =2
       ipd =13
       ipol(1) =0
       ipol(2) =0
       ipol(3) =0
       ipol(4) =-2
       ii =1
       ibper(1) =420
       ibper(2) =450
       ibper(3) =196

       mult1(1) =4
       mult1(2) =8
       mult1(3) =1
       do i =1,idd
       mat2(i,idd-1) = mult1(i)
       end do
       do i =1,idd
       mult2(i) =mult1(i)
       iper(i) =mult1(i)
       end do
10     call multy(idegm,idegn,ipd)
       idegg=idegm +idegn
       ii = ii +1
       if (ii.lt.idd )goto 12
       goto 14

12     do j =1,idegg-idegm
       mul=mult3(j)
       do i =1,idd

       mult3(j) =0
       mult3(i+j)=mult3(i+j) +mul *ipol(i+1) *(-1)
       end do
       end do
       do i = 1,idd

       mat2(i,idd -ii)=mult3(i+idegm)

       mult1(i)=mult3(i+idegm)

       end do
       goto 10
14     do i =1,idd -1
       mat2(i,idd)=0
       end do
       print *,'idegg',idegg,mult3(1),mult3(2),mult3(3),mult3(4),&
       mult3(5)

       mat2(i,idd) =1
       do i =1,ipold
       mpol(i) = -1 * ipol(i)
       end do
       do j = 1,idegg-idegm
       mul =mult3(j)
       print *,'mul',mul,mpol(1),mpol(2)
       do i =1,idd
       mult3(j) =0
       mult3(i+j) =mult3(i+j) +mul *mpol(i+1)
       end do
       end do
       do i =1,idd
       irhs2(i) =mult3(i+idegg-idegm)
       end do
       do i =1,idd
       do j =1,idd
       mat2(i,j) =mod(mat2(i,j),ipd)
       if (mat2(i,j).ge.0)goto 20
       mat2(i,j) =mat2(i,j) +ipd
20     end do
       irhs2(i)=mod(irhs2(i),ipd)
       if (irhs2(i).ge.0)goto 22
       irhs2(i) =irhs2(i) +ipd
22     end do
       print *,mat2(1,1),mat2(1,2),mat2(1,3),irhs2(1)
       print *,mat2(2,1),mat2(2,2),mat2(2,3),irhs2(2)
       print *,mat2(3,1),mat2(3,2),mat2(3,3),irhs2(3)

       call subbw3(idd,ipd)

       do i =1,20
       ip(I) =0
       end do

       do i =1,idd
       ip(2*i ) =isol(i) *(-1)
       end do
       idegd = idd*2
       call subbw2(idegd,ipd,idegr)
       print *,'mainidegg',idegr
       print *,igarray(1),igarray(2),igarray(3),igarray(4)
       print *,'isars',isarray(1),isarray(2),isarray(3),isarray(4),&
       isarray(5),isarray(6),isarray(7)
       do i =1,10
       do j =1,10
       idbarr(i,j) =0
       end do
       end do
       do i= 1,idd
       mult2(i) =iper(i)
       end do
       do i =1,idegr+1
       idbarr(i,idd) =igarray(i)
       end do
       do lop =1,idegr -1
       do i=1,idd
       mult1(i) = idbarr(lop,i)
       end do
       call multy(idegm,idegn,ipd)
       print *,'mult3',mult3(1),mult3(2),mult3(3),mult3(4),mult3(5)

       do j =1,idegg-idegm
       mul=mult3(j)
       do i=1,idd
       mult3(j) =0
       mult3(i+j) =mult3(i+j) +mul *mpol(i+1)
       end do
       end do
       do i =1,idd
       mult3(i) =mult3(i +idegm)
       end do
       do i =1,idd
       idbarr(lop +2,i) =idbarr(lop +2,i) +mult3(i)
       idbarr(lop+2,i) =mod(idbarr(lop+2,i),ipd)
       end do
       end do
       do lop =1,idegr +1
       print *,'darrays',idbarr(lop,1),idbarr(lop,2),idbarr(Lop,3)
       end do
       do i=1,idd
       idbarr(idegr+1,i) =ipd -idbarr(idegr+1,i)
       end do

       do i=1,idd
       if (idbarr(idegr,i).ne.0)goto 30
       end do
       goto 999

30     do k =1,idegm
       do i =1,idd +idegm
       mult3(i) =0
       end do
       do i=1,idd
       mult3(i) =idbarr(idegr,i)
       end do
       do j=1,k
       mul =mult3(j)
       do i =1,idd
       mult3(j) =0
       mult3(i+j)=mult3(i+j) +mul*mpol(i+1)
       end do
       end do
       do i =1,idd
       mat2(i,idd-k) =mult3(i+k)
       end do
       end do
       do i=1,idd
       mat2(i,idd) =idbarr(idegr,i)
       end do
       do i=1,idd
       irhs2(i) =idbarr(idegr+1,i)
       end do

       do i=1,idd
       print *,mat2(i,1),mat2(i,2),mat2(i,3),irhs2(i)
       end do

       call subbw3(idd,ipd)

!      compute inverse of square root mod p
       do k =1,idegm
       do i =1,idd+idegm
       mult3(i) =0
       end do
       do i =1,idd
       mult3(i)=isol(i)
       end do
       do j =1,k
       mul =mult3(j)
       do i =1,idd
       mult3(j) =0
       mult3(i+j) =mult3(i+j)+mul*mpol(i+1)
       end do
       end do
       do i =1,idd
       mat2(i,idd-k)=mult3(i+k)
       end do
       end do

       do i =1,idd
       mat2(i,idd)=isol(i)
       end do
       do i =1,idegm
       irhs2(i) =0
       end do
       irhs2(idd) =1
       do i=1,idd
       print *,mat2(i,1),mat2(i,2),mat2(i,3),irhs2(i)
       end do

       call subbw3(idd,ipd)

!      perform lifts
       do k =1,2
       ipow =ipd**(2**k)
       do i =1,idd
       mult1(i) =isol(i)
       mult2(i) =isol(i)
       end do
       call multy(idegm,idegn,ipow)
       do j =1,idegm
       mul =mult3(j)
       do i =1,idd
       mult3(j) =0
       mult3(i+j)=mult3(i+j)+mul*mpol(i+1)
       end do
       end do
       do i=1,idd
       mult1(i) =mult3(i +idegm)
       mult2(i)=ibper(i)
       end do
       call multy(idegm,idegn,ipow)
       do j =1,idegm
       mul =mult3(j)
       do i =1,idd
       mult3(j) =0
       mult3(i+j) =mult3(i+j) +mul*mpol(i+1)
       end do
       end do
       do i =1,idd
       mult1(i) =mult3(i+idegm)
       end do
       do i =1,idegm
       mult1(i) =ipow -mult1(i)
       end do
       mult1(idd) =3-mult1(idd)
       if (mult1(idd).ge.0)goto 40
       mult1(idd) =mult1(idd) +ipow
40     do i =1,idd
       mult2(i) =isol(i)
       end do
       call multy(idegm,idegn,ipow)
       do j =1,idegm
       mul =mult3(j)
       do i =1,idd
       mult3(j) =0
       mult3(i+j) =mult3(i+j) +mul*mpol(i+1)
       end do
       end do
       do i =1,idd
       isol(i) =mult3(i+idegm)
       end do
       jpow =ipow/2 +1
       do i =1,idd
       isol(i) =isol(i) *jpow

       end do
       do i =1,idd
       isol(i) =mod(isol(i),ipow)
       if (isol(i).ge.0)goto 50
       isol(i) =isol(i) +ipow
50     end do
       end do
       print *,'mainsols',isol(1),isol(2),isol(3)
       stop
!      check square root
       do i =1,idd
       mult1(i)=isol(i)
       mult2(i) =ibper(i)
       end do
       call multy(idegm,idegn,ipow)
       do j =1,idegm
       mul=mult3(j)
       do i =1,idd
       mult3(j)=0
       mult3(i+j)=mult3(i+j) +mul*mpol(i+1)
       end do
       end do
       do i =1,idd
       mult1(i) =mult3(i+idegm)
       mult2(i) =mult1(i)
       end do
       call multy(idem,idegn,ipow)
       do j =1,idegm
       mul =mult3(i)
       do i =1,idd
       mult3(i)=0
       mult3(i+j) =mult3(i+j) +mul*mpol(i+1)
       end do
       end do
       do i=1,idd
       isol(i) =mult3(i+idegm)
       end do
       print *,'mainchecks',isol(i),isol(2),isol(3)

       goto 1000
999    print *,'no square root exists mod',ipd
1000   end

       subroutine subbw2(idegd,ipd,idegr)

       common  ibarray(100),isarray(100),igarray(100),inv(20)
       common  mult1(100),mult2(100),mult3(200),mult4(200),mult5(100)
       common mat1(20,20),irhs1(20)
       common mat2(20,20),irhs2(20),jmark(20),markr(20),jx(20)
       common isol(20)
       common ip(20)
       dimension indic(20),iq(20,20),iqi(20,20),iv(20,20)
       dimension irowp(20),irown(20),ic(20)
       dimension iran(20)
       nmul =1
       do i = 1,idegd
       if (ip(i).ge.0)goto 1
       ip(i) = ip(i) + ipd
1      end do
       print *,'ips',ip(1),ip(2),ip(3),ip(4),ip(5),ip(6)

       do i =1,20
       indic(i) =0
       end do
       ipd =13
       nn=(ipd -1)/2
       print *,'nn',nn
       ie =1
2      if (ie.ge.nn)goto 3
       ie = ie *2
       goto 2
3      ie = ie/2
       print *,'ie',ie
       nn = nn-ie
       inv(1) =1
       inv(2) =7
       inv(3)=9
       inv(4) =10
       inv(5) =8
       inv(6) =11
       inv(7) =2
       inv(8) = 5
       inv(9) =3
       inv(10)=4
       inv(11) =6
       inv(12)=12

       do i=1,20
       do j=1,20
       iq(i,j) = 0
       end do
       end do
       do i =1,20
       irowp(i) =0
       end do
       irowp(2) =1
       irown(1) =0
       do k = 2,idegd
       do j =1,ipd
       do i =1,idegd
       irown(i+1) =irowp(i) - ip(idegd+1-i) *irowp(idegd+1)
       end do
       do i=1,idegd +1
       irowp(i) =irown(i)
       end do
       end do
       do i =1,idegd +1
       irowp(i) = mod(irowp(i),ipd)
       if(irowp(i).ge.0)goto 10
       irowp(i)=irowp(i) +ipd

10     end do
       do i=1,idegd
       iq(k,i) =irowp(i+1)
       end do
       end do
       iq(1,1) =1
       do k = 1,idegd
       print *,iq(k,1),iq(k,2),iq(k,3),iq(k,4),iq(k,5),iq(k,6),iq(k,7),iq(k,8)
       end do

       do i=1,idegd
       do j =1,idegd
       iqi(i,j)=iq(i,j)
       end do
       end do
       do i=1,idegd
       iqi(i,i)=iqi(i,i)-1
       if(iqi(i,i).ge.0)goto 12
       iqi(i,i) =iqi(i,i) +ipd
12     end do
       ir = 0
       do i=1,20

       ic(i)=0
       end do
       do k = 1,idegd
       do j =1,idegd
       if((iqi(k,j).ne.0).and.(ic(j).eq.0))goto 34
       end do
       goto 40
34     mul =inv(iqi(k,j))
       do i =k,idegd
       iqi(i,j) =(-1) * iqi(i,j)  * mul
       iqi(i,j)=mod(iqi(i,j),ipd)
       if(iqi(i,j).ge.0)goto 33
       iqi(i,j) =iqi(i,j) +ipd
33     end do
       do jj=1,idegd
       if(jj.eq.j)goto 38

       mul =iqi(k,jj)
       do i=k,idegd
       itt = iqi(i,jj) + iqi(i,j) *mul
       iqi(i,jj) =mod(itt,ipd)
       if(iqi(i,jj).ge.0)goto 36
       iqi(i,jj)=iqi(i,jj) +ipd
36     end do
38     end do

       ic(j) =k
       indic(k) =j
       goto 50

40     ir =ir +1
       do is =1,idegd
       iv(is,ir) = 0
       end do
       iv(k,ir) =1
       do is =1,idegd
       jv = indic(is)
       if (jv.eq.0)goto 42
       iv(is,ir) =iqi(k,jv)
42     end do
50     end do
       do i=1,idegd
       print *,'iqis',iqi(i,1),iqi(i,2),iqi(i,3),iqi(i,4),iqi(i,5),&
       iqi(i,6),iqi(i,7),iqi(i,8)
       end do
       do jr =1,ir
       print *,'ivs',iv(1,jr),iv(2,jr),iv(3,jr),iv(4,jr),iv(5,jr),&
       iv(6,jr),iv(7,jr),iv(8,jr)
       print *,'ir',ir

       end do

58     ibarray(1) =1
       do i =1,idegd
       ibarray(i+1) =ip(i)
       end do
       do i =1,idegd
       isarray(i) =0
       end do

       idegb = idegd
       do k = 1,ir
       iran(k) = mod((797 *nmul),131072)
       nmul =iran(k)
       end do
       do k=1,ir
       iran(k) =mod(iran(k),ipd)
       end do

       do k =1,ir
       do i =1,idegd

       isarray(i)=isarray(i)+iv(idegd +1-i,k) * iran(k)
       end do

       end do
       do i =1,idegd
       isarray(i) =mod(isarray(i),ipd)
       if (isarray(i).ge.0)goto 60
       isarray(i) =isarray(i) +ipd
60     end do
       print *,'izar',isarray(1),isarray(2),isarray(3),isarray(4),&
       isarray(5),isarray(6)

       idegs =idegb-1
       do i =1,idegd
       if (isarray(i).ne.0)goto 229
       idegs = idegs-1
       end do

229    do i = 1,idegs+1
       mult1(i)=isarray(i)
       mult5(i)=mult1(i)
       end do
       ipd =13
       idegm=idegs
       nn =2
       ie =4
230    if(ie.eq.1)goto 250
       ie =ie/2
       do i=1,idegm +1
       mult2(i) =mult1(i)
       end do
       idegn = idegm
       call multy(idegm,idegn,ipd)
       idegm =idegm +idegn
       do i = 1,idegm +1
       mult1(i) =mult3(i)
       end do

       if(nn.ge.ie)goto 240
       goto 230
240    nn = nn-ie
       do i = 1,idegs
       mult2(i) = mult5(i)
       end do

       idegn =idegs
       call multy(idegm,idegn,ipd)
       idegm =idegm +idegn
       do i = 1,idegm +1
       mult1(i)=mult3(i)
       end do
       goto 230

250    do i =1,idegb+1
       isarray(i) =ibarray(i)
       end do
       idegs = idegb
       print *,'idegs',idegs
       print *,'isarray',isarray(1),isarray(2),isarray(3),isarray(4),&
       isarray(5),isarray(6),isarray(7)

       do i=1,idegm+1
       ibarray(i) =mult1(i)
       end do
       idegb =idegm
       ibarray(idegb+1) =ibarray(idegb +1) - 1
       if(ibarray(idegb+1).ge.0)goto 255
       ibarray(idegb +1) =ibarray(idegb+1) +ipd
255    call subgcd(idegs,idegb,idegg,ipd)
       print *,'idegg',idegg,idegs,idegb,isarray(1),ibarray(1)
       print *,igarray(1),igarray(2),igarray(3),igarray(4),&
       igarray(5),igarray(6),igarray(7),igarray(8),igarray(9)

       if (idegg.eq.0)goto 58
       if (idegg.eq.idegd)goto 58
       goto 300

       print *,mult3(1),mult3(2),mult3(3),mult3(4)
       print *,mult3(11),mult3(12),mult3(13),mult3(14),mult3(15),mult3(16)
       do i = 1,18
       print *,i,mult3(i)
       end do

       call subgcd(6,8,idegg,13)
       print *,igarray(1),igarray(2),igarray(3),igarray(4),igarray(5),&
       igarray(6),igarray(7),igarray(8),igarray(9)
       print *,'idegg',idegg
300    idegr =idegg
       return
       end
       subroutine subgcd(idegs,idegb,idegg,ipd)

       common ibarray(100),isarray(100),igarray(100),inv(20)
       common mult1(100),mult2(100),mult3(200),mult4(200),mult5(100)
       dimension iws(100),iwb(100),itempb(100)
       icon=0
       do i= 1,idegs +1
       iws(i) = isarray(i)
       end do
       do i=1,idegb+1
       iwb(i) = ibarray(i)
       end do
       iwsd =idegs
       iwbd =idegb
10     loopl = iwbd-iwsd +1
       icon = icon+1
       mul = inv(iws(1))
       do i =1,loopl
       iqt= iwb(i) * mul
       iwb(i) =0
       do j =2,iwsd +1
       iwb(i+j-1)=iwb(i+j-1)-iws(j) * iqt
       iwb(i+j-1) =mod(iwb(i+j-1),ipd)
       print *,'imodd',iwb(i+j-1)

       if(iwb(i+j-1).ge.0)goto 12
       iwb(i+j-1)=iwb(i+j-1) +ipd
12     end do
       print *,iwb(1),iwb(2),iwb(3),iwb(4),iwb(5),iwb(6),iwb(7),iwb(8),iwb(9)

       end do
       print *,iwb(1),iwb(2),iwb(3),iwb(4),iwb(5),iwb(6),iwb(7),iwb(8),iwb(9)

       do i= 1,iwbd +1

       if(iwb(i).ne.0)goto 20
       end do

       goto 100
20     itempbd=iwbd+2 -i
       do jj =1,itempbd
       itempb(jj) = iwb(i+jj-1)

       end do
       print *,'itempb',itempbd,itempb(1),itempb(2),itempb(3),itempb(4),itempb(5)&
       ,itempb(6),itempb(7),itempb(8)

       do i= 1,iwsd + 1
       iwb(i) =iws(i)
       end do
       iwbd = iwsd
       do jj=1,itempbd
       iws(jj) = itempb(jj)
       end do
       iwsd =itempbd-1
       print *,'iw',iwsd,iwbd
       print *,'iws',iws(1),iws(2),iws(3),iws(4),iws(5),iws(6),iws(7)
       print *,iwb(1),iwb(2),iwb(3),iwb(4),iwb(5),iwb(6),iwb(7),iwb(8)
       if (icon .ne.4)goto 10

       goto 10
100    idegg=iwsd
       do i=1,10
       igarray(i)=0
       end do
       do i = 1,iwsd +1
       igarray(i) = iws(i)
       end do
       return
       end
       subroutine multy(idegm,idegn,ipd)
       common ibarray(100),isarray(100),igarray(100),inv(20)
       common mult1(100),mult2(100),mult3(200),mult4(200),mult5(100)
       do i=1,200
       mult3(i) =0
       mult4(i)=0
       end do

       do i =1,idegm +1
       do j =1,idegn+1
       mult3(i+j-1)=mult3(i+j-1) +mult1(i) *mult2(j)
       mult3(i+j-1) =mod(mult3(i+j-1),ipd)
       if(mult3(i+j-1).ge.0)goto 10
       mult3(i+j-1)= mult3(i+j-1) +ipd
10     end do
       end do
       return
       end
       subroutine subbw6
       print *,'modulus?'
       read *,ia
       print *,'number?'
       read *,ib

       ib =mod(ib,ia)

       print *,ib

       if(ib.ge.0)goto 10
       ib =ia + ib
10     iu =1
       print *,'iaib',ia,ib
       id = ia
       if(ib.eq.0)goto 888
       iv1=0
       iv3 =ib
815    if(iv3.eq.0)goto 830
       iqq = int(id/iv3)
       it3 =id -iqq*iv3
       it1 =iu -iqq*iv1
       iu =iv1
       id = iv3
       iv1 = it1
       iv3 = it3
       goto 815
830    iv =(id -ia *iu)/ib
       if(iu.le.0)goto 870
       iv =iv *(1-ia)
       iv =mod(iv,ia)
       if(iv.ge.0)goto 870
       iv=iv+ia
870    print *,'gcd=',id
       if (id.gt.1)goto 890
       print *,'inverse=',iv
       goto 890
888    iv =ib
890    return
       end
       subroutine subbw4
       dimension ibarray(100),isarray(100),irarray(100),inv(20)
      dimension iqt(100),iwb(100),iws(100)
      ipd =13
      inv(1) =1
      inv(2) =7
      inv(3) =9
      inv(4) =10
      inv(5) =8
      inv(6) =11
      inv(7) =2
      inv(8) =5
      inv(9) =3
      inv(10) =4
      inv(11) =6
      inv(12) =12
      ibarray(1) =1
      ibarray(2) =3
      ibarray(3)=3
      ibarray(4)=7
      idegb =3
      isarray(1) =1
      isarray(2) =2
      isarray(3) =4
      idegs=2

      do i =1,idegs+1
      iws(i) =isarray(i)
      end do
      do i=1,idegb+1
      iwb(i) =ibarray(i)
      end do
      iwsd = idegs
      iwbd = idegb
      loopl = iwbd -iwsd +1
      mul = inv(iws(1))
      do i =1,loopl
      iqt(i) =iwb(i) *mul
      iwb(i) =0
      do j =2,iwsd + 1
      iwb(i+j-1) =iwb(i+j-1) -iws(j) *iqt(i)
      iwb(i+j-1) =mod(iwb(i+j-1),ipd)
      if(iwb(i+j-1).ge.0)goto 12
      iwb(i+j-1) =iwb(i+j-1) +ipd
12    end do
      end do
      do i =1,iwbd +1
      if(iwb(i).ne.0)goto 20
      end do
      goto 100
20    itempbd =iwbd +2 -i
      do jj =1,itempbd
      irarray(jj) =iwb(i+jj-1)
      end do
      idegr = itempbd -1
      goto 110
100   do i=1,100
      irarray(1) = 0
      end do
      idegr =0
110   print *,'quos',iqt(1),iqt(2),iqt(3)
      print *,'rem',irarray(1),irarray(2)
      return
      end
      subroutine subbw3(idd,ipd)
      common ibarray(100),isarray(100),igarray(100),inv(20)
      common mult1(100),mult2(100),mult3(200),mult4(200),mult5(100)
      common mat1(20,20),irhs1(20)
      common mat2(20,20),irhs2(20),jmark(20),markr(20),jx(20)
      common isol(20)

      idd2 =idd
      inv(1) =1
      inv(2) =7
      inv(3) =9
      inv(4) =10
      inv(5) =8
      inv(6) =11
      inv(7) =2
      inv(8)=5
      inv(9) =3
      inv(10) =4
      inv(11) =6
      inv(12) =12
      do i = 1,idd2
      irhs1(i) =irhs2(i)
      end do
      do i =1,idd2
      do j = 1,idd2
      mat1(i,j) =mat2(i,j)
      end do
      end do
      do j = 1,idd2
      jmark(j) =0
      markr(j) =0
      jx(j) =0
      end do
      do j =1,idd2
      do i =1,idd2

      if(mat1(i,j) .eq.0)goto 137
      if(markr(i).eq.1)goto 137
      jmark(j) =i
      markr(i) =1
      print *,'firstmarksj',jmark(1),jmark(2),jmark(3),jmark(4)
      print *,'firstmarksr',markr(1),markr(2),markr(3),markr(4)
      mul = inv(mat1(i,j))
      do j1 = j,idd2
      itt = mat1(i,j1) *mul
      mat1(i,j1) = mod(itt,ipd)
      if (mat1(i,j1).ge.0)goto 10
      mat1(i,j1)=mat1(i,j1) +ipd
10    print *,'mully',mul,i,j,j1
      end do
      irhs1(i) =irhs1(i) *mul
      itt =irhs1(i)
      irhs1(i) = mod(itt,ipd)
      if(irhs1(i).ge.0)goto 12
      irhs1(i) =irhs1(i) +ipd
      if(i.eq.idd2)goto 150
12    do ik = i+1,idd2
      if(markr(ik).eq.1)goto 134
      if(mat1(ik,j).eq.0)goto 134
      mul = mat1(ik,j)
      do jj =j,idd2

      itt = mat1(ik,jj) -mat1(i,jj) *mul
      mat1(ik,jj) = mod(itt,ipd)
      if(mat1(ik,jj).ge.0)goto 132
      mat1(ik,jj) =mat1(ik,jj) +ipd
      print *,'mulijikjj',mul,i,j,ik,jj

132   end do
      irhs1(ik) =irhs1(ik) - mul * irhs1(i)
      itt = irhs1(ik)
      irhs1(ik) = mod(itt,ipd)
      if(irhs1(ik).ge.0)goto 134
      irhs1(ik) = irhs1(ik) + ipd
134   end do
      goto 150
137   end do

      jx(j) =1

150   end do
      do i =1,idd2
      print *,'matrix',mat1(i,1),mat1(i,2),mat1(i,3),mat1(i,4),&
      irhs1(i)
      print *,'marks',jmark(i),markr(i)
      end do

      do i = 1,idd2
      print *,jx(i)
      end do

      do i =1,idd2
      if (jx(i).eq.0)goto 152
      print *,'matrix singular'
      goto 200
152   end do

      isol(idd2) =irhs1(idd2)
      do j =1,idd
      ind =idd2 -j+1
      ind2 =ind-1
      im=jmark(ind2)
      isol(ind2)=irhs1(im)
      do jj =ind,idd2
      isol(ind2)=isol(ind2)-isol(jj) *mat1(im,jj)
      end do
      end do
      do i =1,idd2
      itt = isol(i)
      isol(i) =mod(itt,ipd)
      if(isol(i).ge.0)goto 160
      isol(i) =isol(i) +ipd
160   end do
      print *,'solutions',isol(1),isol(2),isol(3)
200   return
      end

       subroutine subbw7
       dimension mat1(20,20),mat2(20,20),irhs1(20),irhs2(20),jmark(20)
       dimension jx(20),markr(20),isol(20)
       n=4
       do i =1,n
       irhs2(i) = 1
       markr(i) =0
       jmark(i) = 0
       jx(i) =0
       isol(i) =0
       do j = 1,n
       mat2(i,j) =0
       end do
       end do
       mat2(2,1) =1
       mat2(2,2) =1
       mat2(3,2)= 1
       mat2(3,3) =1
       mat2(4,3)=1
       mat2(4,1)=1
       mat2(1,1)=1
       mat2(3,1) =1
       mat2(4,1)=1
       irhs2(1)=0
       irhs2(3) =0
       do i =1,n
       irhs1(i) = irhs2(i)
       do j = 1,n
       mat1(i,j) = mat2(i,n+1-j)
       end do
       end do
       j =0
110    j = j+1
       do i =1,n
       if(i.eq.n)goto 140
       if(mat1(i,j).eq.0)goto 137
       if(markr(i).eq.1)goto 137
       jmark(j)=i
       markr(i) =1
       do ik =i+1,n
       if(mat1(ik,j).eq.0)goto 134
       do jj =j,n
       if(mat1(ik,jj).eq.0)goto 132
       if(markr(ik).eq.1)goto 132
       mat1(ik,jj) =mat1(ik,jj) +mat1(i,jj)
132    end do
       irhs1(ik) = irhs1(ik) +irhs1(i)
134    end do
       do li =1,n
       do lj =j,n
       mat1(li,lj)=mod(mat1(li,lj),2)
       if(mat1(li,lj).ge.0)goto 2000
       mat1(li,lj)=mat1(li,lj) +2

2000   end do
       end do
       goto 150
137    end do
       goto 150
140    if(markr(i).eq.1)goto 149
       if(mat1(i,j).eq.1)goto 146
       jx(j) =1
       goto 150
146    jmark(j) =i
       goto 150
149    jx(j) =1
150    if(j.lt.n)goto 110
       print *,'rhs',irhs1(1),irhs1(2),irhs1(3),irhs1(4)
       do iix =1,n
       print *,'matrix',mat1(iix,1),mat1(iix,2),mat1(iix,3),mat1(iix,4)
       end do
       print *,'jmarks',jmark(1),jmark(2),jmark(3),jmark(4)
       if(jx(n).eq.1)goto 156
       im=jmark(n)
       isol(n) = irhs1(im)
156    do j =1,n-1
       ind =n-j+1
       ind2 =ind-1
       if(jx(ind2).eq.1)goto 180
       im=jmark(ind2)
       isol(ind2)=irhs1(im)
       do jj =ind,n
       isol(ind2) =isol(ind2)+isol(jj)*mat1(im,jj)

       end do
180    end do
       print *,'sols',isol(1),isol(2),isol(3),isol(4)
       do j =1,n
       if(jx(j).eq.1)goto 190
       isol(j) =mod(isol(j),2)
       if(isol(j).ge.0)goto 190
       isol(j) =isol(j) +2
190    end do
       print *,'solutions',isol(1),isol(2),isol(3),isol(4)
       print *,'jx',jx(1),jx(2),jx(3),jx(4)
       return
       end

       subroutine subbw5
       common iprod(200)
       print *,'number?'
       read *,iaa
       print *,'mod'
       read *,ip
       ix =0
       iaa =mod(iaa,ip)
       if(iaa.gt.0)goto 10
       if (iaa.eq.0) goto 200
       iaa = iaa + ip

10     iprecod =ip -1
       i=0
26     itemp = int(iprecod/2)
       irem1 =iprecod -itemp*2
       if(itemp.eq.0)goto 46
       if(irem1.gt.0)goto 40
       iprecod = itemp
       i =i+1
       if(i.lt.200)goto 26
40     iq =iprecod
       ie = i
       goto 48
46     iq =1
       ie = i
48     i =1
       print *,'qs',iq
       n = 1
52     n = n*607
54     itemp=int(n/1000)
56     irem1 =n-1000 *itemp
       n = irem1
       id = n
       call sub400(id,ip,k)
       if(k.eq.-1)goto 68
       i =i +1
       if(i.lt.1000)goto 52
68     ipn =iq
       iaas = n
       call sub516(ibprod,iaas,ipn,ip)
       iz = ibprod
       print *,'zz',iz
       iy = iz
       ir = ie
       ipn = (iq-1)/2
       iaas = iaa
       call sub516(ibprod,iaas,ipn,ip)
       ix = ibprod
       print *,ix
       itemp =iaa *ix *ix
       itemp2=int(itemp/ip)
       irem1 =itemp-itemp2*ip
       ib =irem1
       print *,'bbb',ib
       itemp = iaa *ix
       itemp2 =int(itemp/ip)
       ix = itemp - itemp2 *ip
100    itemp =int(ib/ip)
       irem1 = ib - ip *itemp
       if(irem1.eq.1)goto 200
       i=1
       m=1
110    ipow =2**m
       goto 700
112    irem2 =ibprod
       print *,'irem2',irem2
       if(irem2.eq.1)goto 130
       m =m+1
       goto 110
130    if(m.eq.ir)goto 180
       ipow =2**(ir-m-1)
       goto 800
134    it = ibprod
       iy =it*it
       itemp =int(iy/ip)
       irem1 =iy -itemp *ip
       iy =irem1
       itemp =int(m/ip)
       irem1 =m -ip *itemp
       m =irem1
       ir = irem1
       itemp =ix * it
       itemp2 =int(itemp/ip)
       irem1 =itemp -itemp2 *ip
       ix = irem1
       itemp =ib *iy
       itemp2 =int(itemp/ip)
       irem1 =itemp -itemp2 *ip
       ib = irem1
       goto 100
180    print *,'no square root exists'

       goto 900
200    print *,'square root=',ix

       goto 900
700    ipn =ipow
       iaas =ib
       call sub516(ibprod,iaas,ipn,ip)
       goto 112
800    ipn =ipow
       iaas=iy
       call sub516(ibprod,iaas,ipn,ip)
       goto 134
900    return
       end

       subroutine sub400(id,ip,k)
       ide =int(id/2)
       ipe= int(ip/2)
       ide2 =id -ide *2
       ipe2 =ip -ipe*2
       if(ide2.eq.0)goto 414
       goto 416
414    if(ipe2.eq.0)goto 512
416    iv = 0
       ipe = ip
       ii = 0
419    print *,'pefirst',ipe
       ipe2 =int(ipe/2)
       ipe3 =ipe -ipe2 *2
       if(ipe3.eq.1)goto 432
       ipe =ipe2
       iv = iv+1
       ii =ii +1
       if(ii.lt.50)goto 419
432    ive = int(iv/2)
       ive2 =iv -ive*2
       if(ive2.eq.0)goto 450
       iae =(id **2 -1)/8
       iae1 =int(iae/2)
       iae2 =iae -iae1 *2
       iae3 =iae2 +2
       k=(-1)**iae3
       goto 451
450    k =1
451    ide = id
452    if(ide.eq.0)goto 510
       ive = 0
       ii = 0
456    ide1 =int(ide/2)
       ide2 =ide -ide1 *2
       if(ide2.eq.1)goto 470
       iv = iv+1
       ide =ide1
       ii =ii+1
       if(ii.lt.50)goto 456
470    ive =int(iv/2)
       ive2=iv -ive *2
       if(ive2.eq.0)goto 486
       iae=(ipe **2 -1)/8
       iae2 =int(iae/2)
       iae3 =iae -iae2 *2
       iae3 = iae3 +2

       k = (-1)**iae3*k
486    iae2 =((ide -1)*(ipe-1))/4
       iae3 =int(iae2/2)
       iae4 =iae2-iae3 *2
       iae4 =iae4 +2
       k =(-1) **iae4 *k
       ir=abs(ide)
       print *,'r',ir,ipe
       itemp=int(ipe/ir)
       ide =ipe -itemp*ir
       ipe = ir
       print *,'pe',ipe,ide
       goto 452
510    if(ipe.eq.1)goto 513
512    k =0
513    print *,k,ipe
       return
       end

       subroutine sub516(ibprod,iaas,ipn,ip)
       common iprod(200)
       icoun =1
       if (iq1.eq.0)goto 604
       iq1 = ipn
       i =1
522    iprod(i) =iaas
       i =i +1
       if(i.lt.201)goto 522
       i =1
527    ibigi =1
       j =1
530    if(ibigi.gt.ipn)goto 560
       if(ibigi.eq.ipn)goto 590
       iprep =iprod(i)
       iprod(i) =iprod(i) *iprod(i)
       itemp =int(iprod(i)/ip)
       irem1 =iprod(i) -ip *itemp
       iprod(i)=irem1
       ibigi =ibigi*2
       j = j+1
       if(j.lt.201)goto 530
       print *,'jaze',j,i,iprep
       goto 604
560    ipn = ipn-int(ibigi/2)
       iprod(i) =iprep
       icoun =icoun +1
       i =i +1
       goto 527
590    ibprod =iprod(1)
       if(icoun.eq.1)goto 604
       i =2
594    ibprod =ibprod *iprod(i)
       itemp= int(ibprod/ip)
       irem1 =ibprod -itemp *ip
       ibprod = irem1
       i =i +1
       if(i.lt.icoun+1)goto 594
       goto 620
604    iaas =mod(iaas,ip)
620    return
       end

{'repo_name': 'daoudclarke/wartonlegacy', 'stars': '151', 'repo_language': 'Fortran', 'file_name': 'POLFACT1.UB', 'mime_type': 'text/plain', 'hash': -1984115534519469153, 'source_dataset': 'data'}


"use strict";

exports["default"] = function (defaultProps, props) {
  if (defaultProps) {
    for (var propName in defaultProps) {
      if (typeof props[propName] === "undefined") {
        props[propName] = defaultProps[propName];
      }
    }
  }

  return props;
};

exports.__esModule = true;

{'repo_name': 'JonHMChan/descartes', 'stars': '454', 'repo_language': 'CSS', 'file_name': 'part.js', 'mime_type': 'text/plain', 'hash': 7018138991697652103, 'source_dataset': 'data'}


#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/property_map.h>
#include <CGAL/IO/read_ply_points.h>

#include <utility>
#include <vector>
#include <fstream>

// types
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef Kernel::FT FT;
typedef Kernel::Point_3 Point;
typedef Kernel::Vector_3 Vector;
typedef CGAL::cpp11::array<unsigned char, 3> Color;

// Point with normal, color and intensity
typedef CGAL::cpp11::tuple<Point, Vector, Color, int> PNCI;
typedef CGAL::Nth_of_tuple_property_map<0, PNCI> Point_map;
typedef CGAL::Nth_of_tuple_property_map<1, PNCI> Normal_map;
typedef CGAL::Nth_of_tuple_property_map<2, PNCI> Color_map;
typedef CGAL::Nth_of_tuple_property_map<3, PNCI> Intensity_map;

int main(int argc, char*argv[])
{
  const char* fname = (argc>1) ? argv[1] : "data/colors.ply";
    // Reads a .ply point set file with normal vectors and colors

  std::vector<PNCI> points; // store points
  std::ifstream in(fname);

  if (!in ||
      !CGAL::read_ply_points_with_properties
      (in,
       std::back_inserter (points),
       CGAL::make_ply_point_reader (Point_map()),
       std::make_pair (Intensity_map(),
                       CGAL::PLY_property<int>("intensity")),
       std::make_tuple (Color_map(),
                        CGAL::Construct_array(),
                        CGAL::PLY_property<unsigned char>("red"),
                        CGAL::PLY_property<unsigned char>("green"),
                        CGAL::PLY_property<unsigned char>("blue")),
       CGAL::make_ply_normal_reader (Normal_map())
       ))
    {
      std::cerr << "Error: cannot read file " << fname << std::endl;
      return EXIT_FAILURE;
    }

  // Display points read
  for (std::size_t i = 0; i < points.size (); ++ i)
    {
      const Point& p = get<0>(points[i]);
      const Vector& n = get<1>(points[i]);
      const Color& c = get<2>(points[i]);
      int I = get<3>(points[i]);
      std::cerr << "Point (" << p << ") with normal (" << n
                << "), color (" << int(c[0]) << " " << int(c[1]) << " " << int(c[2])
                << ") and intensity " << I << std::endl;
    }

  return EXIT_SUCCESS;
}

{'repo_name': 'liminchen/OptCuts', 'stars': '127', 'repo_language': 'C++', 'file_name': 'OptCutsDownloadExternal.cmake', 'mime_type': 'text/plain', 'hash': -949097022935373210, 'source_dataset': 'data'}


/*
 * Copyright (c) 2012-2013, Batu Alp Ceylan
 *
 * This copyrighted material is made available to anyone wishing to use, modify,
 * copy, or redistribute it subject to the terms and conditions of the GNU
 * Lesser 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 Lesser General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this distribution; if not, write to:
 * Free Software Foundation, Inc.
 * 51 Franklin Street, Fifth Floor
 * Boston, MA  02110-1301  USA
 */

package org.batoo.jpa.core.test.derivedIdentities.e2a;

/**
 *
 * @author asimarslan
 * @since 2.0.0
 */
public class DependentId {

	private String name; // matches name of attribute
	private EmployeeId emp; // matches name of attribute and type of Employee PK

	/**
	 *
	 * @since 2.0.0
	 */
	public DependentId() {
		super();
	}

	/**
	 *
	 * @param name
	 *            the name
	 * @param emp
	 *            the employee
	 * @since 2.0.0
	 */
	public DependentId(String name, EmployeeId emp) {
		super();

		this.name = name;
		this.emp = emp;
	}

	/**
	 * {@inheritDoc}
	 *
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (!(obj instanceof DependentId)) {
			return false;
		}
		final DependentId other = (DependentId) obj;
		if (this.emp == null) {
			if (other.emp != null) {
				return false;
			}
		}
		else if (!this.emp.equals(other.emp)) {
			return false;
		}
		if (this.name == null) {
			if (other.name != null) {
				return false;
			}
		}
		else if (!this.name.equals(other.name)) {
			return false;
		}
		return true;
	}

	/**
	 *
	 * @return the emp
	 *
	 * @since 2.0.0
	 */
	public EmployeeId getEmp() {
		return this.emp;
	}

	/**
	 *
	 * @return the name
	 *
	 * @since 2.0.0
	 */
	public String getName() {
		return this.name;
	}

	/**
	 * {@inheritDoc}
	 *
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = (prime * result) + ((this.emp == null) ? 0 : this.emp.hashCode());
		result = (prime * result) + ((this.name == null) ? 0 : this.name.hashCode());
		return result;
	}

	/**
	 *
	 * @param emp
	 *            the emp to set
	 *
	 * @since 2.0.0
	 */
	public void setEmp(EmployeeId emp) {
		this.emp = emp;
	}

	/**
	 *
	 * @param name
	 *            the name to set
	 *
	 * @since 2.0.0
	 */
	public void setName(String name) {
		this.name = name;
	}
}

{'repo_name': 'BatooOrg/BatooJPA', 'stars': '134', 'repo_language': 'Java', 'file_name': 'ClassHeader.txt', 'mime_type': 'text/plain', 'hash': 5668406703134710669, 'source_dataset': 'data'}


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

#include "pagespeed/kernel/base/file_system.h"

#include <cstddef>

#include "pagespeed/kernel/base/basictypes.h"
#include "pagespeed/kernel/base/message_handler.h"
#include "pagespeed/kernel/base/null_message_handler.h"
#include "pagespeed/kernel/base/stack_buffer.h"
#include "pagespeed/kernel/base/string.h"
#include "pagespeed/kernel/base/string_util.h"
#include "pagespeed/kernel/base/writer.h"

namespace net_instaweb {

FileSystem::~FileSystem() {}

FileSystem::File::~File() {}

FileSystem::InputFile::~InputFile() {}

FileSystem::OutputFile::~OutputFile() {}

int FileSystem::MaxPathLength(const StringPiece& base) const { return 8192; }

bool FileSystem::ReadFile(const char* filename, GoogleString* buffer,
                          MessageHandler* message_handler) {
  return ReadFile(filename, kUnlimitedSize, buffer, message_handler);
}

bool FileSystem::ReadFile(const char* filename, Writer* writer,
                          MessageHandler* message_handler) {
  return ReadFile(filename, kUnlimitedSize, writer, message_handler);
}

bool FileSystem::ReadFile(const char* filename, int64 max_file_size,
                          GoogleString* buffer,
                          MessageHandler* message_handler) {
  InputFile* input_file = OpenInputFile(filename, message_handler);
  return ReadFile(input_file, max_file_size, buffer, message_handler);
}

bool FileSystem::ReadFile(const char* filename, int64 max_file_size,
                          Writer* writer, MessageHandler* message_handler) {
  InputFile* input_file = OpenInputFile(filename, message_handler);
  return ReadFile(input_file, max_file_size, writer, message_handler);
}

bool FileSystem::ReadFile(InputFile* input_file, GoogleString* buffer,
                          MessageHandler* message_handler) {
  return ReadFile(input_file, kUnlimitedSize, buffer, message_handler);
}

bool FileSystem::ReadFile(InputFile* input_file, Writer* writer,
                          MessageHandler* message_handler) {
  return ReadFile(input_file, kUnlimitedSize, writer, message_handler);
}

bool FileSystem::ReadFile(InputFile* input_file, int64 max_file_size,
                          GoogleString* buffer,
                          MessageHandler* message_handler) {
  bool ret = false;
  if (input_file != nullptr) {
    ret = input_file->ReadFile(buffer, max_file_size, message_handler);
    ret &= Close(input_file, message_handler);
  }
  return ret;
}

bool FileSystem::ReadFile(InputFile* input_file, int64 max_file_size,
                          Writer* writer, MessageHandler* message_handler) {
  bool ret = false;
  if (input_file != nullptr) {
    char buf[kStackBufferSize];
    int nread;
    ret = true;
    int64 total_size = 0;
    while (ret && ((nread = input_file->Read(buf, sizeof(buf),
                                             message_handler)) > 0)) {
      if (max_file_size != kUnlimitedSize) {
        total_size += nread;
        if (total_size > max_file_size) {
          ret = false;
          break;
        }
      }
      ret = writer->Write(StringPiece(buf, nread), message_handler);
    }
    ret &= (nread == 0);
    ret &= Close(input_file, message_handler);
  }
  return ret;
}

bool FileSystem::WriteFile(const char* filename, const StringPiece& buffer,
                           MessageHandler* message_handler) {
  OutputFile* output_file = OpenOutputFile(filename, message_handler);
  bool ret = false;
  if (output_file != nullptr) {
    ret = output_file->Write(buffer, message_handler);
    ret &= output_file->SetWorldReadable(message_handler);
    ret &= Close(output_file, message_handler);
  }
  return ret;
}

bool FileSystem::WriteTempFile(const StringPiece& prefix_name,
                               const StringPiece& buffer,
                               GoogleString* filename,
                               MessageHandler* message_handler) {
  OutputFile* output_file = OpenTempFile(prefix_name, message_handler);
  bool ok = (output_file != nullptr);
  if (ok) {
    // Store filename early, since it's invalidated by Close.
    *filename = output_file->filename();
    ok = output_file->Write(buffer, message_handler);
    // attempt Close even if write fails.
    ok &= Close(output_file, message_handler);
    if (!ok) {
      NullMessageHandler null_message_handler;
      RemoveFile(filename->c_str(), &null_message_handler);
    }
  }
  if (!ok) {
    // Clear filename so we end in a consistent state.
    filename->clear();
  }
  return ok;
}

bool FileSystem::WriteFileAtomic(const StringPiece& filename_sp,
                                 const StringPiece& buffer,
                                 MessageHandler* message_handler) {
  const GoogleString filename(filename_sp.as_string());
  GoogleString tempfilename;
  bool ok = false;

  if (WriteTempFile(StrCat(filename, ".temp"), buffer, &tempfilename,
                    message_handler)) {
    ok = RenameFile(tempfilename.c_str(), filename.c_str(), message_handler);
    if (!ok) {
      // Delete any temp file as it's probably incomplete.
      NullMessageHandler null_message_handler;
      RemoveFile(tempfilename.c_str(), &null_message_handler);
    }
  }
  return ok;
}

bool FileSystem::Close(File* file, MessageHandler* message_handler) {
  bool ret = file->Close(message_handler);
  delete file;
  return ret;
}

bool FileSystem::RecursivelyMakeDir(const StringPiece& full_path_const,
                                    MessageHandler* handler) {
  bool ret = true;
  GoogleString full_path = full_path_const.as_string();
  EnsureEndsInSlash(&full_path);
  GoogleString subpath;
  subpath.reserve(full_path.size());
  size_t old_pos = 0, new_pos;
  // Note that we intentionally start searching at pos = 1 to avoid having
  // subpath be "" on absolute paths.
  while ((new_pos = full_path.find('/', old_pos + 1)) != GoogleString::npos) {
    // Build up path, one segment at a time.
    subpath.append(full_path.data() + old_pos, new_pos - old_pos);
    if (Exists(subpath.c_str(), handler).is_false()) {
      if (!MakeDir(subpath.c_str(), handler)) {
        ret = false;
        break;
      }
    } else if (IsDir(subpath.c_str(), handler).is_false()) {
      handler->Message(kError, "Subpath '%s' of '%s' is a non-directory file.",
                       subpath.c_str(), full_path.c_str());
      ret = false;
      break;
    }
    old_pos = new_pos;
  }
  return ret;
}

void FileSystem::GetDirInfo(const StringPiece& path, DirInfo* dirinfo,
                            MessageHandler* handler) {
  NullProgressNotifier notifier;
  GetDirInfoWithProgress(path, dirinfo, &notifier, handler);
}

void FileSystem::GetDirInfoWithProgress(const StringPiece& path,
                                        DirInfo* dirinfo,
                                        ProgressNotifier* notifier,
                                        MessageHandler* handler) {
  // This function is not guaranteed to produce correct results if files or
  // directories are modified while this function is executing.

  // Reset dirinfo
  dirinfo->files.clear();
  dirinfo->empty_dirs.clear();
  dirinfo->size_bytes = 0;
  dirinfo->inode_count = 0;

  StringVector dirs_to_traverse;
  dirs_to_traverse.push_back(path.as_string());
  while (!dirs_to_traverse.empty()) {
    notifier->Notify();
    GoogleString dir = dirs_to_traverse.back();
    dirs_to_traverse.pop_back();
    StringVector dir_contents;
    bool is_ok = ListContents(dir, &dir_contents, handler);
    if (!is_ok) {
      continue;
    }

    // Save empty directories to remove if we have to clean.
    if (dir_contents.empty()) {
      dirinfo->empty_dirs.push_back(dir);
      continue;
    }

    // Add files in directory to our vector of files and subdirs to our vector
    // of directories to traverse.
    dirinfo->inode_count += dir_contents.size();
    StringVector::iterator it;
    for (it = dir_contents.begin(); it != dir_contents.end(); ++it) {
      notifier->Notify();
      GoogleString file_name = *it;
      // Add size for both files and directories
      int64 file_size;
      Size(file_name, &file_size, handler);
      dirinfo->size_bytes += file_size;
      BoolOrError is_dir = IsDir(file_name.c_str(), handler);
      if (is_dir.is_false()) {
        int64 file_atime;
        Atime(file_name, &file_atime, handler);
        dirinfo->files.emplace_back(file_size, file_atime, file_name);
      } else if (is_dir.is_true()) {
        dirs_to_traverse.push_back(file_name);
      }
    }
  }
}

// Try to make directories to store file.
void FileSystem::SetupFileDir(const StringPiece& filename,
                              MessageHandler* handler) {
  size_t last_slash = filename.rfind('/');
  if (last_slash != StringPiece::npos) {
    StringPiece directory_name = filename.substr(0, last_slash);
    if (!RecursivelyMakeDir(directory_name, handler)) {
      // TODO(sligocki): Specify where dir creation failed?
      handler->Message(kError, "Could not create directories for file %s",
                       filename.as_string().c_str());
    }
  }
}

}  // namespace net_instaweb

{'repo_name': 'apache/incubator-pagespeed-mod', 'stars': '618', 'repo_language': 'C++', 'file_name': 'apr.h', 'mime_type': 'text/x-c', 'hash': 4931985351557339363, 'source_dataset': 'data'}


(ns typed.test.collatz
  (:require [typed.core :refer [check-ns ann]]))

(ann collatz [Number -> Number])
(defn collatz [n]
  (cond
    (= 1 n)
     1
    (and (integer? n)
         (even? n))
     (collatz (/ n 2))
    :else
     (collatz (inc (* 3 n)))))

{'repo_name': 'frenchy64/typed-clojure', 'stars': '207', 'repo_language': 'Clojure', 'file_name': 'filter_ops.clj', 'mime_type': 'text/plain', 'hash': -1816346849082890522, 'source_dataset': 'data'}


#ifndef CC_WEBSERVER_THRIFTHANDLER_H
#define CC_WEBSERVER_THRIFTHANDLER_H

#include <stdio.h>
#include <memory>

#include <thrift/transport/TBufferTransports.h>
#include <thrift/transport/THttpServer.h>
#include <thrift/transport/TTransport.h>
#include <thrift/protocol/TJSONProtocol.h>

#include <util/logutil.h>

#include "mongoose.h"

/**
 * Returns the demangled name of the type described by the given type info.
 *
 * @param info_ a type info.
 * @return the pretty name of the type.
 */
inline std::string getTypeName(const std::type_info& info_)
{
  int status = 0;
  std::unique_ptr<char[], void (*)(void*)> result(
    abi::__cxa_demangle(info_.name(), 0, 0, &status), std::free);

  return result.get() ? std::string(result.get()) : "##error##";
}

/**
 * Returns the template argument's demangled name.
 *
 * @return the pretty name of the T type.
 */
template <typename T>
inline std::string getTypeName()
{
  return getTypeName(typeid(T));
}

namespace cc
{
namespace webserver
{

template<class Processor>
class ThriftHandler : public RequestHandler
{
protected:
  /**
   * Calling context for thrift process calls.
   */
  struct CallContext
  {
    /**
     * Mongoose connection.
     */
    struct mg_connection* connection;

    /**
     * A pointer for the real call context (for dispatch call).
     */
    void* nextCtx;
  };

  class LoggingProcessor : public Processor
  {
  public:
    template <typename IFaceType>
    LoggingProcessor(std::shared_ptr<IFaceType> handler_)
      : Processor(handler_)
    {
    }

  protected:
    virtual bool dispatchCall(
      apache::thrift::protocol::TProtocol* in_,
      apache::thrift::protocol::TProtocol* out_,
      const std::string& fname_,
      std::int32_t seqid_,
      void* callContext_) override
    {
      CallContext& ctx = *reinterpret_cast<CallContext*>(callContext_);

      return Processor::dispatchCall(in_, out_, fname_, seqid_, ctx.nextCtx);
    }
  };

public:
  template<class Handler>
  ThriftHandler(Handler *handler_)
    : _processor(std::shared_ptr<Handler>(handler_))
  {
  }

  template<class Handler>
  ThriftHandler(Handler handler_)
    : _processor(handler_)
  {
  }

  std::string key() const override
  {
    return "ThriftHandler";
  }

  int beginRequest(struct mg_connection *conn_) override
  {
    using namespace ::apache::thrift;
    using namespace ::apache::thrift::transport;
    using namespace ::apache::thrift::protocol;

    try
    {
      std::string content{conn_->content, conn_->content + conn_->content_len};

      LOG(debug) << "Request content:\n" << content;

      std::shared_ptr<TTransport> inputBuffer(
        new TMemoryBuffer((std::uint8_t*)content.c_str(), content.length()));

      std::shared_ptr<TTransport> outputBuffer(new TMemoryBuffer(4096));

      std::shared_ptr<TProtocol> inputProtocol(
        new TJSONProtocol(inputBuffer));
      std::shared_ptr<TProtocol> outputProtocol(
        new TJSONProtocol(outputBuffer));

      CallContext ctx{conn_, nullptr};
      _processor.process(inputProtocol, outputProtocol, &ctx);

      TMemoryBuffer *mBuffer = dynamic_cast<TMemoryBuffer*>(outputBuffer.get());

      std::string response = mBuffer->getBufferAsString();

      LOG(debug)
        << "Response:\n" << response.c_str() << std::endl;

      // Send HTTP reply to the client create headers
      mg_send_header(conn_, "Content-Type", "application/x-thrift");
      mg_send_header(
        conn_, "Content-Length", std::to_string(response.length()).c_str());

      // Terminate headers
      mg_write(conn_, "\r\n", 2);

      // Send content
      mg_write(conn_, response.c_str(), response.length());
    }
    catch (const std::exception& ex)
    {
      LOG(warning) << ex.what();
    }
    catch (...)
    {
      LOG(warning) << "Unknown exception has been caught";
    }

    // Returning non-zero tells mongoose that our function has replied to
    // the client, and mongoose should not send client any more data.
    return MG_TRUE;
  }

private:
  LoggingProcessor _processor;
};

} // namespace webserver
} // cc

#endif // CC_WEBSERVER_THRIFTHANDLER_H

{'repo_name': 'Ericsson/CodeCompass', 'stars': '307', 'repo_language': 'C++', 'file_name': 'reparser.h', 'mime_type': 'text/x-c++', 'hash': -1083242776630790935, 'source_dataset': 'data'}


use super::MigrationCommand;
use crate::parse_datamodel;
use migration_connector::{DatabaseMigrationMarker, MigrationConnector};
use serde::{Deserialize, Serialize};

/// Command to bring the local database in sync with the prisma schema, without
/// interacting with the migrations directory nor the migrations table.
pub struct SchemaPushCommand;

#[async_trait::async_trait]
impl<'a> MigrationCommand for SchemaPushCommand {
    type Input = SchemaPushInput;
    type Output = SchemaPushOutput;

    async fn execute<C, D>(
        input: &Self::Input,
        engine: &crate::migration_engine::MigrationEngine<C, D>,
    ) -> super::CommandResult<Self::Output>
    where
        C: MigrationConnector<DatabaseMigration = D>,
        D: DatabaseMigrationMarker + Send + Sync + 'static,
    {
        let connector = engine.connector();
        let schema = parse_datamodel(&input.schema)?;
        let inferrer = connector.database_migration_inferrer();
        let applier = connector.database_migration_step_applier();
        let checker = connector.destructive_change_checker();

        let database_migration = inferrer.infer(&schema, &schema, &[]).await?;

        let checks = checker.check(&database_migration).await?;

        let mut step = 0u32;

        match (checks.unexecutable_migrations.len(), checks.warnings.len(), input.force) {
            (unexecutable, _, _) if unexecutable > 0 => {
                tracing::warn!(unexecutable = ?checks.unexecutable_migrations, "Aborting migration because at least one unexecutable step was detected.")
            }
            (0, 0, _) | (0, _, true) => {
                while applier.apply_step(&database_migration, step as usize).await? {
                    step += 1
                }
            }
            _ => tracing::info!(
                "The migration was not applied because it triggered warnings and the force flag was not passed."
            ),
        }

        Ok(SchemaPushOutput {
            executed_steps: step,
            warnings: checks.warnings.into_iter().map(|warning| warning.description).collect(),
            unexecutable: checks
                .unexecutable_migrations
                .into_iter()
                .map(|unexecutable| unexecutable.description)
                .collect(),
        })
    }
}

/// Input to the `schemaPush` command.
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct SchemaPushInput {
    /// The prisma schema.
    pub schema: String,
    /// Push the schema ignoring destructive change warnings.
    pub force: bool,
}

/// Output of the `schemaPush` command.
#[derive(Debug, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct SchemaPushOutput {
    /// How many migration steps were executed.
    pub executed_steps: u32,
    /// Destructive change warnings.
    pub warnings: Vec<String>,
    /// Steps that cannot be executed in the current state of the database.
    pub unexecutable: Vec<String>,
}

impl SchemaPushOutput {
    /// Returns whether the local database schema is in sync with the prisma schema.
    pub fn had_no_changes_to_push(&self) -> bool {
        self.warnings.is_empty() && self.unexecutable.is_empty() && self.executed_steps == 0
    }
}

{'repo_name': 'prisma/prisma-engines', 'stars': '143', 'repo_language': 'Rust', 'file_name': 'playground.html', 'mime_type': 'text/html', 'hash': -1199588994032097523, 'source_dataset': 'data'}


/* ========================================================================
 * Bootstrap: affix.js v3.3.5
 * http://getbootstrap.com/javascript/#affix
 * ========================================================================
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * ======================================================================== */

+function ($) {
  'use strict';

  // AFFIX CLASS DEFINITION
  // ======================

  var Affix = function (element, options) {
    this.options = $.extend({}, Affix.DEFAULTS, options)

    this.$target = $(this.options.target)
      .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
      .on('click.bs.affix.data-api',  $.proxy(this.checkPositionWithEventLoop, this))

    this.$element     = $(element)
    this.affixed      = null
    this.unpin        = null
    this.pinnedOffset = null

    this.checkPosition()
  }

  Affix.VERSION  = '3.3.5'

  Affix.RESET    = 'affix affix-top affix-bottom'

  Affix.DEFAULTS = {
    offset: 0,
    target: window
  }

  Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
    var scrollTop    = this.$target.scrollTop()
    var position     = this.$element.offset()
    var targetHeight = this.$target.height()

    if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false

    if (this.affixed == 'bottom') {
      if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
      return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
    }

    var initializing   = this.affixed == null
    var colliderTop    = initializing ? scrollTop : position.top
    var colliderHeight = initializing ? targetHeight : height

    if (offsetTop != null && scrollTop <= offsetTop) return 'top'
    if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'

    return false
  }

  Affix.prototype.getPinnedOffset = function () {
    if (this.pinnedOffset) return this.pinnedOffset
    this.$element.removeClass(Affix.RESET).addClass('affix')
    var scrollTop = this.$target.scrollTop()
    var position  = this.$element.offset()
    return (this.pinnedOffset = position.top - scrollTop)
  }

  Affix.prototype.checkPositionWithEventLoop = function () {
    setTimeout($.proxy(this.checkPosition, this), 1)
  }

  Affix.prototype.checkPosition = function () {
    if (!this.$element.is(':visible')) return

    var height       = this.$element.height()
    var offset       = this.options.offset
    var offsetTop    = offset.top
    var offsetBottom = offset.bottom
    var scrollHeight = Math.max($(document).height(), $(document.body).height())

    if (typeof offset != 'object')         offsetBottom = offsetTop = offset
    if (typeof offsetTop == 'function')    offsetTop    = offset.top(this.$element)
    if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)

    var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)

    if (this.affixed != affix) {
      if (this.unpin != null) this.$element.css('top', '')

      var affixType = 'affix' + (affix ? '-' + affix : '')
      var e         = $.Event(affixType + '.bs.affix')

      this.$element.trigger(e)

      if (e.isDefaultPrevented()) return

      this.affixed = affix
      this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null

      this.$element
        .removeClass(Affix.RESET)
        .addClass(affixType)
        .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
    }

    if (affix == 'bottom') {
      this.$element.offset({
        top: scrollHeight - height - offsetBottom
      })
    }
  }

  // AFFIX PLUGIN DEFINITION
  // =======================

  function Plugin(option) {
    return this.each(function () {
      var $this   = $(this)
      var data    = $this.data('bs.affix')
      var options = typeof option == 'object' && option

      if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
      if (typeof option == 'string') data[option]()
    })
  }

  var old = $.fn.affix

  $.fn.affix             = Plugin
  $.fn.affix.Constructor = Affix

  // AFFIX NO CONFLICT
  // =================

  $.fn.affix.noConflict = function () {
    $.fn.affix = old
    return this
  }

  // AFFIX DATA-API
  // ==============

  $(window).on('load', function () {
    $('[data-spy="affix"]').each(function () {
      var $spy = $(this)
      var data = $spy.data()

      data.offset = data.offset || {}

      if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
      if (data.offsetTop    != null) data.offset.top    = data.offsetTop

      Plugin.call($spy, data)
    })
  })

}(jQuery);

{'repo_name': 'benas/gamehub.io', 'stars': '603', 'repo_language': 'JavaScript', 'file_name': 'index.hbs', 'mime_type': 'text/html', 'hash': -3690568965595828671, 'source_dataset': 'data'}