/** Generated Model - DO NOT CHANGE */
package de.metas.contracts.model;

import java.math.BigDecimal;
import java.sql.ResultSet;
import java.util.Properties;

/** Generated Model for C_Invoice_Candidate_Assignment_Aggregate_V
 *  @author Adempiere (generated)
 */
@SuppressWarnings("javadoc")
public class X_C_Invoice_Candidate_Assignment_Aggregate_V extends org.compiere.model.PO implements I_C_Invoice_Candidate_Assignment_Aggregate_V, org.compiere.model.I_Persistent
{

	/**
	 *
	 */
	private static final long serialVersionUID = 1709043075L;

    /** Standard Constructor */
    public X_C_Invoice_Candidate_Assignment_Aggregate_V (Properties ctx, int C_Invoice_Candidate_Assignment_Aggregate_V_ID, String trxName)
    {
      super (ctx, C_Invoice_Candidate_Assignment_Aggregate_V_ID, trxName);
      /** if (C_Invoice_Candidate_Assignment_Aggregate_V_ID == 0)
        {
        } */
    }

    /** Load Constructor */
    public X_C_Invoice_Candidate_Assignment_Aggregate_V (Properties ctx, ResultSet rs, String trxName)
    {
      super (ctx, rs, trxName);
    }

    /** Load Meta Data */
    @Override
    protected org.compiere.model.POInfo initPO (Properties ctx)
    {
      org.compiere.model.POInfo poi = org.compiere.model.POInfo.getPOInfo (ctx, Table_Name, get_TrxName());
      return poi;
    }

	/** Set Zugeordneter Geldbetrag.
		@param AssignedMoneyAmount
		Zugeordneter Geldbetrag, in der Währung des Vertrags-Rechnungskandidaten.
	  */
	@Override
	public void setAssignedMoneyAmount (java.math.BigDecimal AssignedMoneyAmount)
	{
		set_ValueNoCheck (COLUMNNAME_AssignedMoneyAmount, AssignedMoneyAmount);
	}

	/** Get Zugeordneter Geldbetrag.
		@return Zugeordneter Geldbetrag, in der Währung des Vertrags-Rechnungskandidaten.
	  */
	@Override
	public java.math.BigDecimal getAssignedMoneyAmount ()
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_AssignedMoneyAmount);
		if (bd == null)
			 return BigDecimal.ZERO;
		return bd;
	}

	/** Set Zugeordnete Menge.
		@param AssignedQuantity
		Zugeordneter Menge in der Maßeinheit des jeweiligen Produktes
	  */
	@Override
	public void setAssignedQuantity (java.math.BigDecimal AssignedQuantity)
	{
		set_ValueNoCheck (COLUMNNAME_AssignedQuantity, AssignedQuantity);
	}

	/** Get Zugeordnete Menge.
		@return Zugeordneter Menge in der Maßeinheit des jeweiligen Produktes
	  */
	@Override
	public java.math.BigDecimal getAssignedQuantity ()
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_AssignedQuantity);
		if (bd == null)
			 return BigDecimal.ZERO;
		return bd;
	}

	@Override
	public de.metas.contracts.model.I_C_Flatrate_RefundConfig getC_Flatrate_RefundConfig() throws RuntimeException
	{
		return get_ValueAsPO(COLUMNNAME_C_Flatrate_RefundConfig_ID, de.metas.contracts.model.I_C_Flatrate_RefundConfig.class);
	}

	@Override
	public void setC_Flatrate_RefundConfig(de.metas.contracts.model.I_C_Flatrate_RefundConfig C_Flatrate_RefundConfig)
	{
		set_ValueFromPO(COLUMNNAME_C_Flatrate_RefundConfig_ID, de.metas.contracts.model.I_C_Flatrate_RefundConfig.class, C_Flatrate_RefundConfig);
	}

	/** Set C_Flatrate_RefundConfig.
		@param C_Flatrate_RefundConfig_ID C_Flatrate_RefundConfig	  */
	@Override
	public void setC_Flatrate_RefundConfig_ID (int C_Flatrate_RefundConfig_ID)
	{
		if (C_Flatrate_RefundConfig_ID < 1)
			set_ValueNoCheck (COLUMNNAME_C_Flatrate_RefundConfig_ID, null);
		else
			set_ValueNoCheck (COLUMNNAME_C_Flatrate_RefundConfig_ID, Integer.valueOf(C_Flatrate_RefundConfig_ID));
	}

	/** Get C_Flatrate_RefundConfig.
		@return C_Flatrate_RefundConfig	  */
	@Override
	public int getC_Flatrate_RefundConfig_ID ()
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_Flatrate_RefundConfig_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Vertrag-Rechnungskandidat.
		@param C_Invoice_Candidate_Term_ID Vertrag-Rechnungskandidat	  */
	@Override
	public void setC_Invoice_Candidate_Term_ID (int C_Invoice_Candidate_Term_ID)
	{
		if (C_Invoice_Candidate_Term_ID < 1)
			set_ValueNoCheck (COLUMNNAME_C_Invoice_Candidate_Term_ID, null);
		else
			set_ValueNoCheck (COLUMNNAME_C_Invoice_Candidate_Term_ID, Integer.valueOf(C_Invoice_Candidate_Term_ID));
	}

	/** Get Vertrag-Rechnungskandidat.
		@return Vertrag-Rechnungskandidat	  */
	@Override
	public int getC_Invoice_Candidate_Term_ID ()
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_Invoice_Candidate_Term_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}
}

{'repo_name': 'metasfresh/metasfresh', 'stars': '653', 'repo_language': 'TSQL', 'file_name': 'I_C_NonBusinessDay.java', 'mime_type': 'text/plain', 'hash': -6765081399963231269, 'source_dataset': 'data'}


/*
 * Copyright 2010-2018 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.
 */
package com.amazonaws.services.ec2.model;

import java.io.Serializable;

/**
 *

 * Describes association information for an Elastic IP address.
 *

 */
public class NetworkInterfaceAssociation implements Serializable {

    /**
     * The address of the Elastic IP address bound to the network interface.
     */
    private String publicIp;

    /**
     * The public DNS name.
     */
    private String publicDnsName;

    /**
     * The ID of the Elastic IP address owner.
     */
    private String ipOwnerId;

    /**
     * The allocation ID.
     */
    private String allocationId;

    /**
     * The association ID.
     */
    private String associationId;

    /**
     * The address of the Elastic IP address bound to the network interface.
     *
     * @return The address of the Elastic IP address bound to the network interface.
     */
    public String getPublicIp() {
        return publicIp;
    }

    /**
     * The address of the Elastic IP address bound to the network interface.
     *
     * @param publicIp The address of the Elastic IP address bound to the network interface.
     */
    public void setPublicIp(String publicIp) {
        this.publicIp = publicIp;
    }

    /**
     * The address of the Elastic IP address bound to the network interface.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param publicIp The address of the Elastic IP address bound to the network interface.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public NetworkInterfaceAssociation withPublicIp(String publicIp) {
        this.publicIp = publicIp;
        return this;
    }

    /**
     * The public DNS name.
     *
     * @return The public DNS name.
     */
    public String getPublicDnsName() {
        return publicDnsName;
    }

    /**
     * The public DNS name.
     *
     * @param publicDnsName The public DNS name.
     */
    public void setPublicDnsName(String publicDnsName) {
        this.publicDnsName = publicDnsName;
    }

    /**
     * The public DNS name.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param publicDnsName The public DNS name.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public NetworkInterfaceAssociation withPublicDnsName(String publicDnsName) {
        this.publicDnsName = publicDnsName;
        return this;
    }

    /**
     * The ID of the Elastic IP address owner.
     *
     * @return The ID of the Elastic IP address owner.
     */
    public String getIpOwnerId() {
        return ipOwnerId;
    }

    /**
     * The ID of the Elastic IP address owner.
     *
     * @param ipOwnerId The ID of the Elastic IP address owner.
     */
    public void setIpOwnerId(String ipOwnerId) {
        this.ipOwnerId = ipOwnerId;
    }

    /**
     * The ID of the Elastic IP address owner.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param ipOwnerId The ID of the Elastic IP address owner.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public NetworkInterfaceAssociation withIpOwnerId(String ipOwnerId) {
        this.ipOwnerId = ipOwnerId;
        return this;
    }

    /**
     * The allocation ID.
     *
     * @return The allocation ID.
     */
    public String getAllocationId() {
        return allocationId;
    }

    /**
     * The allocation ID.
     *
     * @param allocationId The allocation ID.
     */
    public void setAllocationId(String allocationId) {
        this.allocationId = allocationId;
    }

    /**
     * The allocation ID.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param allocationId The allocation ID.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public NetworkInterfaceAssociation withAllocationId(String allocationId) {
        this.allocationId = allocationId;
        return this;
    }

    /**
     * The association ID.
     *
     * @return The association ID.
     */
    public String getAssociationId() {
        return associationId;
    }

    /**
     * The association ID.
     *
     * @param associationId The association ID.
     */
    public void setAssociationId(String associationId) {
        this.associationId = associationId;
    }

    /**
     * The association ID.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param associationId The association ID.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public NetworkInterfaceAssociation withAssociationId(String associationId) {
        this.associationId = associationId;
        return this;
    }

    /**
     * Returns a string representation of this object; useful for testing and
     * debugging.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getPublicIp() != null) sb.append("PublicIp: " + getPublicIp() + ",");
        if (getPublicDnsName() != null) sb.append("PublicDnsName: " + getPublicDnsName() + ",");
        if (getIpOwnerId() != null) sb.append("IpOwnerId: " + getIpOwnerId() + ",");
        if (getAllocationId() != null) sb.append("AllocationId: " + getAllocationId() + ",");
        if (getAssociationId() != null) sb.append("AssociationId: " + getAssociationId() );
        sb.append("}");
        return sb.toString();
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getPublicIp() == null) ? 0 : getPublicIp().hashCode());
        hashCode = prime * hashCode + ((getPublicDnsName() == null) ? 0 : getPublicDnsName().hashCode());
        hashCode = prime * hashCode + ((getIpOwnerId() == null) ? 0 : getIpOwnerId().hashCode());
        hashCode = prime * hashCode + ((getAllocationId() == null) ? 0 : getAllocationId().hashCode());
        hashCode = prime * hashCode + ((getAssociationId() == null) ? 0 : getAssociationId().hashCode());
        return hashCode;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) return true;
        if (obj == null) return false;

        if (obj instanceof NetworkInterfaceAssociation == false) return false;
        NetworkInterfaceAssociation other = (NetworkInterfaceAssociation)obj;

        if (other.getPublicIp() == null ^ this.getPublicIp() == null) return false;
        if (other.getPublicIp() != null && other.getPublicIp().equals(this.getPublicIp()) == false) return false;
        if (other.getPublicDnsName() == null ^ this.getPublicDnsName() == null) return false;
        if (other.getPublicDnsName() != null && other.getPublicDnsName().equals(this.getPublicDnsName()) == false) return false;
        if (other.getIpOwnerId() == null ^ this.getIpOwnerId() == null) return false;
        if (other.getIpOwnerId() != null && other.getIpOwnerId().equals(this.getIpOwnerId()) == false) return false;
        if (other.getAllocationId() == null ^ this.getAllocationId() == null) return false;
        if (other.getAllocationId() != null && other.getAllocationId().equals(this.getAllocationId()) == false) return false;
        if (other.getAssociationId() == null ^ this.getAssociationId() == null) return false;
        if (other.getAssociationId() != null && other.getAssociationId().equals(this.getAssociationId()) == false) return false;
        return true;
    }

}

{'repo_name': 'aws-amplify/aws-sdk-android', 'stars': '772', 'repo_language': 'Java', 'file_name': 'DynamoDBv2Actions.java', 'mime_type': 'text/x-java', 'hash': -4578590814514753629, 'source_dataset': 'data'}


/******************************* MODULE HEADER ******************************
 * initdll.c
 *        Dynamic Link Library initialization module.  These functions are
 *        invoked when the DLL is initially loaded by NT.
 *
 *        This document contains confidential/proprietary information.
 *        Copyright (c) 1991 - 1992 Microsoft Corporation, All Rights Reserved.
 *
 * Revision History:
 *  12:59 on Fri 13 Mar 1992    -by-    Lindsay Harris   [lindsayh]
 *      Update to create heap.
 *
 *     [00]    24-Jun-91    stevecat    created
 *     [01]     4-Oct-91    stevecat    new dll init logic
 *
 ****************************************************************************/

#include        "rasuipch.h"

/*
 *   Global data.  These are references in the dialog style code, in the
 * font installer and numberous other places.
 */

HMODULE             hModule;
HANDLE              hHeap;                        /* For whoever needs */
CRITICAL_SECTION    RasdduiCriticalSection; /* Critical Section Object */

#define HEAP_MIN_SIZE   (   64 * 1024)
#define HEAP_MAX_SIZE   (1024 * 1024)

/*************************** Function Header ******************************
 * DllInitialize ()
 *    DLL initialization procedure.  Save the module handle since it is needed
 *  by other library routines to get resources (strings, dialog boxes, etc.)
 *  from the DLL's resource data area.
 *
 * RETURNS:
 *   TRUE/FALSE,  FALSE only if HeapCreate fails.
 *
 * HISTORY:
 *  13:02 on Fri 13 Mar 1992    -by-    Lindsay Harris   [lindsayh]
 *      Added HeapCreate/Destroy code.
 *
 *     [01]     4-Oct-91    stevecat    new dll init logic
 *     [00]    24-Jun-91    stevecat    created
 *
 *      27-Apr-1994 Wed 17:01:18 updated  -by-  Daniel Chou (danielc)
 *          Free up the HTUI.dll when we exit
 *
 ***************************************************************************/

BOOL
DllInitialize( hmod, ulReason, pctx )
PVOID     hmod;
ULONG     ulReason;
PCONTEXT  pctx;
{
    WCHAR   wName[MAX_PATH + 32];
    BOOL    bRet;

    UNREFERENCED_PARAMETER( pctx );

    bRet = TRUE;

    switch (ulReason) {

    case DLL_PROCESS_ATTACH:

        if( !(hHeap = HeapCreate(0, HEAP_MIN_SIZE, 0))) {
#if DBG
            DbgPrint( "HeapCreate fails in Rasddui!DllInitialize\n" );
#endif
            bRet = FALSE;

        }
        else {

            InitializeCriticalSection(&RasdduiCriticalSection);

            //Load itself for performance
            if (GetModuleFileName(hModule = hmod, wName,COUNT_ARRAY(wName))) {

                LoadLibrary(wName);

            }
            else {
                #if DBG
                DbgPrint( "DllInitialize: GetModuleFileName() FAILED!");
                #endif
            }
        }

        break;

    case  DLL_PROCESS_DETACH:

        if (hHeap) {

            HeapDestroy(hHeap);
            hHeap = NULL;
        }

        DeleteCriticalSection(&RasdduiCriticalSection);
        break;
    }

    return(bRet);
}

{'repo_name': 'ZoloZiak/WinNT4', 'stars': '168', 'repo_language': 'C', 'file_name': 'dc21x4.hpj', 'mime_type': 'text/plain', 'hash': 8928000022287346812, 'source_dataset': 'data'}


RZBluetooth

Summary: A Core Bluetooth helper library to simplify the development and testing of Core Bluetooth applications.

RZBluetooth is a Core Bluetooth helper with 3 primary goals:

- Simplify the delegate callbacks and encourage best practices
- Provide a pattern for Profile level APIs, with support for public profiles
- Simplify and encourage testing - including unit tests, automated integration tests, and manual tests.

{'repo_name': 'Rightpoint/RZBluetooth', 'stars': '119', 'repo_language': 'Objective-C', 'file_name': 'config.yml', 'mime_type': 'text/plain', 'hash': -8836462011293642865, 'source_dataset': 'data'}


Bitballoon
----------

Bitballoon can easily be set up for continuous deployment off a github branch, which typically is the preferred method for deployment. However, if you want to set up the initial deploy, or prefer manually deploy rather than linking to github, this deployer should fit the bill.

### Config Values

- **name**: name of the site you want to deploy
- **access_token**: an oauth access token from bitballoon

### Generating an Access Token

Luckily, it's very simple to generate an access token without having to jump through the usual oauth hoops. To do so, log into your bitballoon account, and head over to the **Applications** menu item.

![Bitballoon Applications](http://cl.ly/Y0Xn/Screen%20Shot%202014-10-13%20at%2012.34.37%20PM.png)

Once on this page, generate a new **Personal Access Token** as such:

![Bitballoon Personal Access Token 1](http://cl.ly/Y0eT/Screen%20Shot%202014-10-13%20at%2012.28.43%20PM.png)

![Bitballoon Personal Access Token 2](http://cl.ly/XzyO/Screen%20Shot%202014-10-13%20at%2012.29.31%20PM.png)

![Bitballoon Personal Access Token 3](http://cl.ly/Y0hs/Screen%20Shot%202014-10-13%20at%2012.29.39%20PM.png)

Now just copy that token and add it to your `ship.conf` file, or just enter it in the command line prompt the first time you run `ship` for the site. And no, don't try to use the token in the image above, it's just there as an example and is not a valid token. Make your own tokens holmes.

{'repo_name': 'carrot/ship', 'stars': '152', 'repo_language': 'CoffeeScript', 'file_name': 'mock_stream.coffee', 'mime_type': 'text/plain', 'hash': -7953770005932844668, 'source_dataset': 'data'}


What is PACO?

It's
  a tool for building your own Personal Science experiments - in minutes!

(On Android devices!  On iOS 5 devices someday..)

Join the announcement list
    for an invitation
    to the beta trial.

    <form action="http://groups.google.com/group/paco-announcements/boxsubscribe">
    Email: <input type=text name=email>
    <input type=submit name="sub" value="Join">
    </form>

Learn
    More about PACO

What is PACO good for?

Many types of mobile experiments!

Quantified Self

Ever wonder how happy you are? Whether your weight is trending up or down? Do you want one place to manage the data and reminder scheduling for all your mobile exercise trackers, weight trackers, baby's bowel movement trackers, fuel consumption trackers (is that the same as the previous one?)?

Mobile Population Studies - Wellness, Corporate environment, or Whatever

Ever want to design, iterate, and deliver a social science experiment or mobile wellness intervention to a group of people on Android mobile phones in a matter of minutes? (You social and behavioral scientists out there know who you are.)

User Control of Data

Do you want to be able to correlate your data across multiple trackers?

Do you want your data kept private and under your control? With informed consent about what you are sharing and with whom?

If you answered yes to any or all of these questions,
    then, Paco is the tool for you! Though we are still building
    a lot of these features, so don't be too judgmental just yet -
    instead  chip in some of your own 20% time.

What does PACO provide?

PACO allows rapid creation and iteration of
    experimental trackers and interventions.

You can create a new mobile phone experiment in a matter of minutes on the PACO website. Once you save it, it is ready to download into the PACO Android app. You can keep your experiment designs private, share them with select groups of people, or with the world (Gmail logins for the moment). If you decide that an experimental input isn't quite right, just update it and then within a day the Android app will pick up the new definition.

PACO uses a novel, but validated sampling technique known as Experiential Sampling.

Experiential Sampling was developed by Psychology researchers and has been used in 10s of 1000s of experiments over the last 40 years. It provides a much more accurate way to gather a sample of daily experience by pinging randomly over a period of time. However, PACO can also do more traditional sampling schedules if necessary.

PACO allows users to easily explore and ask questions about their data.

PACO comes with a feature called, Explore Data, that guides the user through answering specific questions about their data. It offers a choice of questions about trends in the data, relationships in the data, and the distribution of the data. It allows the user to chart data across experiments as well to visualize any relationships that might exists between different data sets.

PACO Examples

PACO is designed so that you can hear
    about a new medical study on the radio and then build a version for yourself in minutes.

Here are some types of "experiments" PACO can help you create:

Personal diet and wellness data

Example: You decide to practice healthy eating by following, say, the guidelines in Michael Pollan's Food Rules, and you want to see how well are following the program.  With PACO and an Android phone you can easily create a personal "experiment" that will automatically ask you to rate your meal based on the three core food rules (Did you eat food? Was it mostly plants? Was it too much?) and help you track them. You can also easily add weight, blood pressure, cholesterol, etc., to the data you track and collect.

Below are sample screen from Alberto's LowCarbTracker experiment:

Personal exercise or activity data

Example: You are a runner and you want to track not only how many miles you run each day but also, say, how you feel before, during and after a run. PACO makes it easy to create a study to collect, store and analyze this data.

Personal work data

Example: You would like to keep track of where you spend your time at work (34% of my time in meetings! Aaargh!) and how productive or passionate you are feeling about your work.  The best way to collect this data is to use Experience Sampling Method (ESM for short.) With PACO you can easily create a simple ESM study that will ask you at random times what you are doing and, say, if you are feeling productive and passionate at that particular time.

{'repo_name': 'google/paco', 'stars': '317', 'repo_language': 'Objective-C', 'file_name': 'InfoPlist.strings', 'mime_type': 'text/plain', 'hash': 8266123337261514186, 'source_dataset': 'data'}


<?php
/*
 * Copyright 2016 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

class Google_Service_IdentityToolkit_UploadAccountResponse extends Google_Collection
{
  protected $collection_key = 'error';
  protected $errorType = 'Google_Service_IdentityToolkit_UploadAccountResponseError';
  protected $errorDataType = 'array';
  public $kind;

  public function setError($error)
  {
    $this->error = $error;
  }
  public function getError()
  {
    return $this->error;
  }
  public function setKind($kind)
  {
    $this->kind = $kind;
  }
  public function getKind()
  {
    return $this->kind;
  }
}

{'repo_name': 'FriendUPCloud/friendup', 'stars': '216', 'repo_language': 'C', 'file_name': 'filesystem_action_event.sql', 'mime_type': 'text/plain', 'hash': -4891084099270772748, 'source_dataset': 'data'}


package checkpoint

import (
	"github.com/docker/docker/api/server/httputils"
	"github.com/docker/docker/api/server/router"
)

// checkpointRouter is a router to talk with the checkpoint controller
type checkpointRouter struct {
	backend Backend
	decoder httputils.ContainerDecoder
	routes  []router.Route
}

// NewRouter initializes a new checkpoint router
func NewRouter(b Backend, decoder httputils.ContainerDecoder) router.Router {
	r := &checkpointRouter{
		backend: b,
		decoder: decoder,
	}
	r.initRoutes()
	return r
}

// Routes returns the available routers to the checkpoint controller
func (r *checkpointRouter) Routes() []router.Route {
	return r.routes
}

func (r *checkpointRouter) initRoutes() {
	r.routes = []router.Route{
		router.Experimental(router.NewGetRoute("/containers/{name:.*}/checkpoints", r.getContainerCheckpoints)),
		router.Experimental(router.NewPostRoute("/containers/{name:.*}/checkpoints", r.postContainerCheckpoint)),
		router.Experimental(router.NewDeleteRoute("/containers/{name}/checkpoints/{checkpoint}", r.deleteContainerCheckpoint)),
	}
}

{'repo_name': 'elastos/Elastos', 'stars': '101', 'repo_language': 'Go', 'file_name': 'codereview.cfg', 'mime_type': 'text/plain', 'hash': 6465201291446297458, 'source_dataset': 'data'}


/*
Copyright 2017 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// This file was automatically generated by lister-gen

package v1

import (
	"k8s.io/apimachinery/pkg/api/errors"
	"k8s.io/apimachinery/pkg/labels"
	"k8s.io/client-go/tools/cache"
	api "k8s.io/kubernetes/pkg/api"
	v1 "k8s.io/kubernetes/pkg/api/v1"
)

// ServiceAccountLister helps list ServiceAccounts.
type ServiceAccountLister interface {
	// List lists all ServiceAccounts in the indexer.
	List(selector labels.Selector) (ret []*v1.ServiceAccount, err error)
	// ServiceAccounts returns an object that can list and get ServiceAccounts.
	ServiceAccounts(namespace string) ServiceAccountNamespaceLister
	ServiceAccountListerExpansion
}

// serviceAccountLister implements the ServiceAccountLister interface.
type serviceAccountLister struct {
	indexer cache.Indexer
}

// NewServiceAccountLister returns a new ServiceAccountLister.
func NewServiceAccountLister(indexer cache.Indexer) ServiceAccountLister {
	return &serviceAccountLister{indexer: indexer}
}

// List lists all ServiceAccounts in the indexer.
func (s *serviceAccountLister) List(selector labels.Selector) (ret []*v1.ServiceAccount, err error) {
	err = cache.ListAll(s.indexer, selector, func(m interface{}) {
		ret = append(ret, m.(*v1.ServiceAccount))
	})
	return ret, err
}

// ServiceAccounts returns an object that can list and get ServiceAccounts.
func (s *serviceAccountLister) ServiceAccounts(namespace string) ServiceAccountNamespaceLister {
	return serviceAccountNamespaceLister{indexer: s.indexer, namespace: namespace}
}

// ServiceAccountNamespaceLister helps list and get ServiceAccounts.
type ServiceAccountNamespaceLister interface {
	// List lists all ServiceAccounts in the indexer for a given namespace.
	List(selector labels.Selector) (ret []*v1.ServiceAccount, err error)
	// Get retrieves the ServiceAccount from the indexer for a given namespace and name.
	Get(name string) (*v1.ServiceAccount, error)
	ServiceAccountNamespaceListerExpansion
}

// serviceAccountNamespaceLister implements the ServiceAccountNamespaceLister
// interface.
type serviceAccountNamespaceLister struct {
	indexer   cache.Indexer
	namespace string
}

// List lists all ServiceAccounts in the indexer for a given namespace.
func (s serviceAccountNamespaceLister) List(selector labels.Selector) (ret []*v1.ServiceAccount, err error) {
	err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
		ret = append(ret, m.(*v1.ServiceAccount))
	})
	return ret, err
}

// Get retrieves the ServiceAccount from the indexer for a given namespace and name.
func (s serviceAccountNamespaceLister) Get(name string) (*v1.ServiceAccount, error) {
	obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
	if err != nil {
		return nil, err
	}
	if !exists {
		return nil, errors.NewNotFound(api.Resource("serviceaccount"), name)
	}
	return obj.(*v1.ServiceAccount), nil
}

{'repo_name': 'munnerz/keepalived-cloud-provider', 'stars': '143', 'repo_language': 'Go', 'file_name': 'config_test.go', 'mime_type': 'text/plain', 'hash': -5928937246552951855, 'source_dataset': 'data'}


<?xml version="1.0" encoding="GB2312"?>
<rule>
	<readme><!-- 项目自述 -->
		<name>漏洞感知项目</name>
		<Initiator>Greekn--fplythoner</Initiator>
		<emailone>ms016@qq.com--980348599@qq.com</emailone>
		<content>主要帮助大家-记录一些重大漏洞-漏洞方面的细节</content>
		<version>v1.20</version>
		<github>https://github.com/greekn/rce-bug</github>
	</readme>
	<details><!--漏洞收集信息 -->
		<loopholename>Harmonic NSG 9000设备默认密码</loopholename><!-- 漏洞名称-->
		<loopholenumber>CVE-2018-14943</loopholenumber><!--漏洞编号 -->
		<loopholetype>默认密码</loopholetype><!--漏洞类型 -->
		<middleware>X</middleware><!--中间件 -->
		<defaultport>80</defaultport><!-- 默认开放端口-->
		<loopholecomponent>X</loopholecomponent><!--漏洞组件 -->
		<loopholefeatures>X</loopholefeatures><!-- 漏洞特征 -->
		<softwareversion>X</softwareversion><!--受影响组件版本号-->
		<pocurl>nsgadmin/nsgguest/nsgconfig/</pocurl><!--漏洞验证脚本网址 -->
		<expurl>X</expurl><!-- 漏洞利用脚本网址 -->
		<loopholedemourl></loopholedemourl><!-- 漏洞复现网址 -->
		<foakeyword>LICA</foakeyword><!--fofa资产搜索关键词 -->
		<zoomeyekeyword>LICA</zoomeyekeyword><!--钟馗之眼搜索关键词 -->
		<shodankeyword>LICA</shodankeyword><!-- shodan资产搜索关键词 -->
		<patchurl>X</patchurl><!--补丁网址 -->
		<bigdataassets>132</bigdataassets><!--大数据资产统计new-->
		<loopholeopentime>2018/8/5/</loopholeopentime><!--漏洞创建时间 -->
		<timeone></timeone><!-- 漏洞收集时间 -->
		<!--后面需要添加什么请联系上面邮箱 -->
	</details>
	<trackingnote><!-- 漏洞追踪描述-->
		<loopholetracking>中危</loopholetracking><!--漏洞追踪笔记-->
		<networkenvironment>内网</networkenvironment><!--网络环境new-->
		<attackvector>X</attackvector><!--攻击向量-->
		<loopholepocopen>公开</loopholepocopen><!--漏洞验证脚本是否公开 -->
		<loopholedetails>公开</loopholedetails><!-- 漏洞细节是否公开-->
		<cvss3.0>X</cvss3.0><!--漏洞评分-->
		<collector>Greekn</collector><!--漏洞收集人 -->
		<email>ms016@qq.com</email><!--漏洞收集人邮箱 -->
		<time>2018/8/5/</time><!-- 漏洞收集时间 -->
		<!--后面需要添加什么请联系上面邮箱 -->
	</trackingnote>
</rule>

{'repo_name': 'greekn/rce-bug', 'stars': '205', 'repo_language': 'Python', 'file_name': 'CVE-2018-10088.xml', 'mime_type': 'text/xml', 'hash': -8146932653376275780, 'source_dataset': 'data'}


/*
 * SpanDSP - a series of DSP components for telephony
 *
 * private/sig_tone.h - Signalling tone processing for the 2280Hz, 2400Hz, 2600Hz
 *                      and similar signalling tones used in older protocols.
 *
 * Written by Steve Underwood <steveu@coppice.org>
 *
 * Copyright (C) 2004 Steve Underwood
 *
 * All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License version 2.1,
 * 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 program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#if !defined(_SPANDSP_PRIVATE_SIG_TONE_H_)
#define _SPANDSP_PRIVATE_SIG_TONE_H_

/*! \brief The coefficient set for a pair of cascaded bi-quads that make a signalling notch filter. */
typedef struct
{
#if defined(SPANDSP_USE_FIXED_POINT)
    int16_t a1[3];
    int16_t b1[3];
    int16_t a2[3];
    int16_t b2[3];
    int postscale;
#else
    float a1[3];
    float b1[3];
    float a2[3];
    float b2[3];
#endif
} sig_tone_notch_coeffs_t;

/*! \brief The coefficient set for a bi-quad that makes a signalling flat filter.
           Some signalling tone schemes require such a filter, and some don't.
           It is termed a flat filter, to distinguish it from the sharp filter,
           but obviously it is not actually flat. It is a broad band weighting
           filter. */
typedef struct
{
#if defined(SPANDSP_USE_FIXED_POINT)
    /*! \brief Flat mode bandpass bi-quad parameters */
    int16_t a[3];
    /*! \brief Flat mode bandpass bi-quad parameters */
    int16_t b[3];
    /*! \brief Post filter scaling */
    int postscale;
#else
    /*! \brief Flat mode bandpass bi-quad parameters */
    float a[3];
    /*! \brief Flat mode bandpass bi-quad parameters */
    float b[3];
#endif
} sig_tone_flat_coeffs_t;

/*!
    signalling tone descriptor. This defines the working state for a
    single instance of the transmit and receive sides of a signalling
    tone processor.
*/
typedef struct
{
    /*! \brief The tones used. */
    int tone_freq[2];
    /*! \brief The high and low tone amplitudes for each of the tones, in dBm0. */
    int tone_amp[2][2];

    /*! \brief The delay, in audio samples, before the high level tone drops
               to a low level tone. Some signalling protocols require the
               signalling tone be started at a high level, to ensure crisp
               initial detection at the receiver, but require the tone
               amplitude to drop by a number of dBs if it is sustained,
               to reduce crosstalk levels. */
    int high_low_timeout;

    /*! \brief Some signalling tone detectors use a sharp initial filter,
               changing to a broader, flatter, filter after some delay. This
               parameter defines the delay. 0 means it never changes. */
    int sharp_flat_timeout;

    /*! \brief Parameters to control the behaviour of the notch filter, used
               to remove the tone from the voice path in some protocols. The
               notch is applied as fast as possible, when the signalling tone
               is detected. Its removal is delayed by this timeout, to avoid
               clicky noises from repeated switching of the filter on rapid
               pulses of signalling tone. */
    int notch_lag_time;

    /*! \brief The tone on persistence check, in audio samples. */
    int tone_on_check_time;
    /*! \brief The tone off persistence check, in audio samples. */
    int tone_off_check_time;

    /*! \brief The number of tones used. */
    int tones;
    /*! \brief The coefficients for the cascaded bi-quads notch filter. */
    const sig_tone_notch_coeffs_t *notch[2];
    /*! \brief The coefficients for the single bi-quad flat mode filter. */
    const sig_tone_flat_coeffs_t *flat;

    /*! \brief Minimum signalling tone to total power ratio, in dB */
    int16_t detection_ratio;
    /*! \brief Minimum total power for detection in sharp mode, in dB */
    int16_t sharp_detection_threshold;
    /*! \brief Minimum total power for detection in flat mode, in dB */
    int16_t flat_detection_threshold;
} sig_tone_descriptor_t;

/*!
    Signalling tone transmit state
 */
struct sig_tone_tx_state_s
{
    /*! \brief The callback function used to handle signalling changes. */
    tone_report_func_t sig_update;
    /*! \brief A user specified opaque pointer passed to the callback function. */
    void *user_data;

    /*! \brief Tone descriptor */
    const sig_tone_descriptor_t *desc;

    /*! The phase rates for the one or two tones */
    int32_t phase_rate[2];
    /*! The phase accumulators for the one or two tones */
    uint32_t phase_acc[2];

    /*! The scaling values for the one or two tones, and the high and low level of each tone */
    int16_t tone_scaling[2][2];
    /*! The sample timer, used to switch between the high and low level tones. */
    int high_low_timer;

    /*! \brief Current transmit tone */
    int current_tx_tone;
    /*! \brief Current transmit timeout */
    int current_tx_timeout;
    /*! \brief Time in current signalling state, in samples. */
    int signalling_state_duration;
};

/*!
    Signalling tone receive state
 */
struct sig_tone_rx_state_s
{
    /*! \brief The callback function used to handle signalling changes. */
    tone_report_func_t sig_update;
    /*! \brief A user specified opaque pointer passed to the callback function. */
    void *user_data;

    /*! \brief Tone descriptor */
    const sig_tone_descriptor_t *desc;

    /*! \brief The current receive tone */
    int current_rx_tone;
    /*! \brief The timeout for switching from the high level to low level tone detector. */
    int high_low_timer;
    /*! \brief ??? */
    int current_notch_filter;

    struct
    {
#if defined(SPANDSP_USE_FIXED_POINT)
        /*! \brief The z's for the notch filter */
        int16_t notch_z1[2];
        /*! \brief The z's for the notch filter */
        int16_t notch_z2[2];
#else
        /*! \brief The z's for the notch filter */
        float notch_z1[2];
        /*! \brief The z's for the notch filter */
        float notch_z2[2];
#endif

        /*! \brief The power output of the notch. */
        power_meter_t power;
    } tone[3];

#if defined(SPANDSP_USE_FIXED_POINT)
    /*! \brief The z's for the weighting/bandpass filter. */
    int16_t flat_z[2];
#else
    /*! \brief The z's for the weighting/bandpass filter. */
    float flat_z[2];
#endif
    /*! \brief The output power of the flat (unfiltered or flat filtered) path. */
    power_meter_t flat_power;

    /*! \brief Persistence check for tone present */
    int tone_persistence_timeout;
    /*! \brief The tone pattern on the last audio sample */
    int last_sample_tone_present;

    /*! \brief The minimum reading from the power meter for detection in flat mode */
    int32_t flat_detection_threshold;
    /*! \brief The minimum reading from the power meter for detection in sharp mode */
    int32_t sharp_detection_threshold;
    /*! \brief The minimum ratio between notched power and total power for detection */
    int32_t detection_ratio;

    /*! \brief TRUE if in flat mode. FALSE if in sharp mode. */
    int flat_mode;
    /*! \brief TRUE if the notch filter is enabled in the media path */
    int notch_enabled;
    /*! \brief ??? */
    int flat_mode_timeout;
    /*! \brief ??? */
    int notch_insertion_timeout;

    /*! \brief ??? */
    int signalling_state;
    /*! \brief ??? */
    int signalling_state_duration;
};

#endif
/*- End of file ------------------------------------------------------------*/

{'repo_name': 'artclarke/xuggle-xuggler', 'stars': '328', 'repo_language': 'C', 'file_name': 'org.eclipse.cdt.ui.prefs', 'mime_type': 'text/plain', 'hash': 6390983815192495827, 'source_dataset': 'data'}


/*
 * Copyright (C) 2012 Andrew Neal Licensed under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with the
 * License. You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
 * or agreed to in writing, software distributed under the License is
 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */

package com.andrew.apollo.ui.activities;

import static com.andrew.apollo.utils.MusicUtils.mService;

import android.app.SearchManager;
import android.app.SearchableInfo;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.ServiceConnection;
import android.media.AudioManager;
import android.media.audiofx.AudioEffect;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
import android.os.SystemClock;
import android.support.v4.view.ViewPager;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.view.animation.AnimationUtils;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;
import android.widget.TextView;

import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
import com.actionbarsherlock.widget.SearchView;
import com.actionbarsherlock.widget.SearchView.OnQueryTextListener;
import com.andrew.apollo.IApolloService;
import com.andrew.apollo.MusicPlaybackService;
import com.andrew.apollo.R;
import com.andrew.apollo.adapters.PagerAdapter;
import com.andrew.apollo.cache.ImageFetcher;
import com.andrew.apollo.ui.fragments.LyricsFragment;
import com.andrew.apollo.ui.fragments.QueueFragment;
import com.andrew.apollo.utils.ApolloUtils;
import com.andrew.apollo.utils.MusicUtils;
import com.andrew.apollo.utils.MusicUtils.ServiceToken;
import com.andrew.apollo.utils.NavUtils;
import com.andrew.apollo.utils.ThemeUtils;
import com.andrew.apollo.widgets.PlayPauseButton;
import com.andrew.apollo.widgets.RepeatButton;
import com.andrew.apollo.widgets.RepeatingImageButton;
import com.andrew.apollo.widgets.ShuffleButton;
import com.nineoldandroids.animation.ObjectAnimator;

import java.lang.ref.WeakReference;

/**
 * Apollo's "now playing" interface.
 *
 * @author Andrew Neal (andrewdneal@gmail.com)
 */
public class AudioPlayerActivity extends SherlockFragmentActivity implements ServiceConnection,
        OnSeekBarChangeListener {

    // Message to refresh the time
    private static final int REFRESH_TIME = 1;

    // The service token
    private ServiceToken mToken;

    // Play and pause button
    private PlayPauseButton mPlayPauseButton;

    // Repeat button
    private RepeatButton mRepeatButton;

    // Shuffle button
    private ShuffleButton mShuffleButton;

    // Previous button
    private RepeatingImageButton mPreviousButton;

    // Next button
    private RepeatingImageButton mNextButton;

    // Track name
    private TextView mTrackName;

    // Artist name
    private TextView mArtistName;

    // Album art
    private ImageView mAlbumArt;

    // Tiny artwork
    private ImageView mAlbumArtSmall;

    // Current time
    private TextView mCurrentTime;

    // Total time
    private TextView mTotalTime;

    // Queue switch
    private ImageView mQueueSwitch;

    // Progess
    private SeekBar mProgress;

    // Broadcast receiver
    private PlaybackStatus mPlaybackStatus;

    // Handler used to update the current time
    private TimeHandler mTimeHandler;

    // View pager
    private ViewPager mViewPager;

    // Pager adpater
    private PagerAdapter mPagerAdapter;

    // ViewPager container
    private FrameLayout mPageContainer;

    // Header
    private LinearLayout mAudioPlayerHeader;

    // Image cache
    private ImageFetcher mImageFetcher;

    // Theme resources
    private ThemeUtils mResources;

    private long mPosOverride = -1;

    private long mStartSeekPos = 0;

    private long mLastSeekEventTime;

    private boolean mIsPaused = false;

    private boolean mFromTouch = false;

    /**
     * {@inheritDoc}
     */
    @Override
    protected void onCreate(final Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // Title bar shows up in gingerbread, I'm too tired to figure out why.
        if (!ApolloUtils.hasHoneycomb()) {
            requestWindowFeature(Window.FEATURE_NO_TITLE);
        }

        // Initialze the theme resources
        mResources = new ThemeUtils(this);
        // Set the overflow style
        mResources.setOverflowStyle(this);

        // Fade it in
        overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);

        // Control the media volume
        setVolumeControlStream(AudioManager.STREAM_MUSIC);

        // Bind Apollo's service
        mToken = MusicUtils.bindToService(this, this);

        // Initialize the image fetcher/cache
        mImageFetcher = ApolloUtils.getImageFetcher(this);

        // Initialize the handler used to update the current time
        mTimeHandler = new TimeHandler(this);

        // Initialize the broadcast receiver
        mPlaybackStatus = new PlaybackStatus(this);

        // Theme the action bar
        final ActionBar actionBar = getSupportActionBar();
        mResources.themeActionBar(actionBar, getString(R.string.app_name));
        actionBar.setDisplayHomeAsUpEnabled(true);

        // Set the layout
        setContentView(R.layout.activity_player_base);

        // Cache all the items
        initPlaybackControls();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void onServiceConnected(final ComponentName name, final IBinder service) {
        mService = IApolloService.Stub.asInterface(service);
        // Set the playback drawables
        updatePlaybackControls();
        // Current info
        updateNowPlayingInfo();
        // Update the favorites icon
        invalidateOptionsMenu();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void onServiceDisconnected(final ComponentName name) {
        mService = null;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void onProgressChanged(final SeekBar bar, final int progress, final boolean fromuser) {
        if (!fromuser || mService == null) {
            return;
        }
        final long now = SystemClock.elapsedRealtime();
        if (now - mLastSeekEventTime > 250) {
            mLastSeekEventTime = now;
            mPosOverride = MusicUtils.duration() * progress / 1000;
            MusicUtils.seek(mPosOverride);
            if (!mFromTouch) {
                // refreshCurrentTime();
                mPosOverride = -1;
            }
        }
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void onStartTrackingTouch(final SeekBar bar) {
        mLastSeekEventTime = 0;
        mFromTouch = true;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void onStopTrackingTouch(final SeekBar bar) {
        mPosOverride = -1;
        mFromTouch = false;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean onPrepareOptionsMenu(final Menu menu) {
        mResources.setFavoriteIcon(menu);
        // Hide the EQ option if it can't be opened
        final MenuItem effects = menu.findItem(R.id.menu_audio_player_equalizer);
        final Intent intent = new Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL);
        if (getPackageManager().resolveActivity(intent, 0) == null) {
            effects.setVisible(false);
        }
        return true;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean onCreateOptionsMenu(final Menu menu) {
        // Search view
        getSupportMenuInflater().inflate(R.menu.search, menu);
        // Theme the search icon
        mResources.setSearchIcon(menu);

        final SearchView searchView = (SearchView)menu.findItem(R.id.menu_search).getActionView();
        // Add voice search
        final SearchManager searchManager = (SearchManager)getSystemService(Context.SEARCH_SERVICE);
        final SearchableInfo searchableInfo = searchManager.getSearchableInfo(getComponentName());
        searchView.setSearchableInfo(searchableInfo);
        // Perform the search
        searchView.setOnQueryTextListener(new OnQueryTextListener() {

            @Override
            public boolean onQueryTextSubmit(final String query) {
                // Open the search activity
                NavUtils.openSearch(AudioPlayerActivity.this, query);
                return true;
            }

            @Override
            public boolean onQueryTextChange(final String newText) {
                // Nothing to do
                return false;
            }
        });

        // Favorite action
        getSupportMenuInflater().inflate(R.menu.favorite, menu);
        // Shuffle all
        getSupportMenuInflater().inflate(R.menu.shuffle, menu);
        // Share, ringtone, and equalizer
        getSupportMenuInflater().inflate(R.menu.audio_player, menu);
        // Settings
        getSupportMenuInflater().inflate(R.menu.activity_base, menu);
        return true;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean onOptionsItemSelected(final MenuItem item) {
        switch (item.getItemId()) {
            case android.R.id.home:
                // Go back to the home activity
                NavUtils.goHome(this);
                return true;
            case R.id.menu_shuffle:
                // Shuffle all the songs
                MusicUtils.shuffleAll(this);
                // Refresh the queue
                ((QueueFragment)mPagerAdapter.getFragment(0)).refreshQueue();
                return true;
            case R.id.menu_favorite:
                // Toggle the current track as a favorite and update the menu
                // item
                MusicUtils.toggleFavorite();
                invalidateOptionsMenu();
                return true;
            case R.id.menu_audio_player_ringtone:
                // Set the current track as a ringtone
                MusicUtils.setRingtone(this, MusicUtils.getCurrentAudioId());
                return true;
            case R.id.menu_audio_player_share:
                // Share the current meta data
                shareCurrentTrack();
                return true;
            case R.id.menu_audio_player_equalizer:
                // Sound effects
                NavUtils.openEffectsPanel(this);
                return true;
            case R.id.menu_download_lyrics:
                updateLyrics(true);
                hideAlbumArt();
                return true;
            case R.id.menu_settings:
                // Settings
                NavUtils.openSettings(this);
                return true;
            default:
                break;
        }
        return super.onOptionsItemSelected(item);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void onBackPressed() {
        super.onBackPressed();
        NavUtils.goHome(this);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    protected void onResume() {
        super.onResume();
        // Hide Apollo's notification
        MusicUtils.killForegroundService(this);
        // Set the playback drawables
        updatePlaybackControls();
        // Current info
        updateNowPlayingInfo();
        // Refresh the queue
        ((QueueFragment)mPagerAdapter.getFragment(0)).refreshQueue();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    protected void onStart() {
        super.onStart();
        final IntentFilter filter = new IntentFilter();
        // Play and pause changes
        filter.addAction(MusicPlaybackService.PLAYSTATE_CHANGED);
        // Shuffle and repeat changes
        filter.addAction(MusicPlaybackService.SHUFFLEMODE_CHANGED);
        filter.addAction(MusicPlaybackService.REPEATMODE_CHANGED);
        // Track changes
        filter.addAction(MusicPlaybackService.META_CHANGED);
        // Update a list, probably the playlist fragment's
        filter.addAction(MusicPlaybackService.REFRESH);
        registerReceiver(mPlaybackStatus, filter);
        // Refresh the current time
        final long next = refreshCurrentTime();
        queueNextRefresh(next);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    protected void onPause() {
        super.onPause();
        // Show Apollo's notification
        if (MusicUtils.isPlaying() && ApolloUtils.isApplicationSentToBackground(this)) {
            MusicUtils.startBackgroundService(this);
        }
        mImageFetcher.flush();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    protected void onDestroy() {
        super.onDestroy();
        mIsPaused = false;
        mTimeHandler.removeMessages(REFRESH_TIME);
        // Unbind from the service
        if (mService != null) {
            MusicUtils.unbindFromService(mToken);
            mToken = null;
        }

        // Unregister the receiver
        try {
            unregisterReceiver(mPlaybackStatus);
        } catch (final Throwable e) {
            //$FALL-THROUGH$
        }
    }

    /**
     * Initializes the items in the now playing screen
     */
    @SuppressWarnings("deprecation")
    private void initPlaybackControls() {
        // ViewPager container
        mPageContainer = (FrameLayout)findViewById(R.id.audio_player_pager_container);
        // Theme the pager container background
        mPageContainer
                .setBackgroundDrawable(mResources.getDrawable("audio_player_pager_container"));

        // Now playing header
        mAudioPlayerHeader = (LinearLayout)findViewById(R.id.audio_player_header);
        // Opens the currently playing album profile
        mAudioPlayerHeader.setOnClickListener(mOpenAlbumProfile);

        // Used to hide the artwork and show the queue/lyrics
        final FrameLayout mSwitch = (FrameLayout)findViewById(R.id.audio_player_switch);
        mSwitch.setOnClickListener(mToggleHiddenPanel);

        // Initialize the pager adapter
        mPagerAdapter = new PagerAdapter(this);
        // Queue
        mPagerAdapter.add(QueueFragment.class, null);
        // Lyrics
        mPagerAdapter.add(LyricsFragment.class, null);

        // Initialize the ViewPager
        mViewPager = (ViewPager)findViewById(R.id.audio_player_pager);
        // Attch the adapter
        mViewPager.setAdapter(mPagerAdapter);
        // Offscreen pager loading limit
        mViewPager.setOffscreenPageLimit(mPagerAdapter.getCount() - 1);
        // Play and pause button
        mPlayPauseButton = (PlayPauseButton)findViewById(R.id.action_button_play);
        // Shuffle button
        mShuffleButton = (ShuffleButton)findViewById(R.id.action_button_shuffle);
        // Repeat button
        mRepeatButton = (RepeatButton)findViewById(R.id.action_button_repeat);
        // Previous button
        mPreviousButton = (RepeatingImageButton)findViewById(R.id.action_button_previous);
        // Next button
        mNextButton = (RepeatingImageButton)findViewById(R.id.action_button_next);
        // Track name
        mTrackName = (TextView)findViewById(R.id.audio_player_track_name);
        // Artist name
        mArtistName = (TextView)findViewById(R.id.audio_player_artist_name);
        // Album art
        mAlbumArt = (ImageView)findViewById(R.id.audio_player_album_art);
        // Small album art
        mAlbumArtSmall = (ImageView)findViewById(R.id.audio_player_switch_album_art);
        // Current time
        mCurrentTime = (TextView)findViewById(R.id.audio_player_current_time);
        // Total time
        mTotalTime = (TextView)findViewById(R.id.audio_player_total_time);
        // Used to show and hide the queue and lyrics fragments
        mQueueSwitch = (ImageView)findViewById(R.id.audio_player_switch_queue);
        // Theme the queue switch icon
        mQueueSwitch.setImageDrawable(mResources.getDrawable("btn_switch_queue"));
        // Progress
        mProgress = (SeekBar)findViewById(android.R.id.progress);

        // Set the repeat listner for the previous button
        mPreviousButton.setRepeatListener(mRewindListener);
        // Set the repeat listner for the next button
        mNextButton.setRepeatListener(mFastForwardListener);
        // Update the progress
        mProgress.setOnSeekBarChangeListener(this);
    }

    /**
     * Sets the track name, album name, and album art.
     */
    private void updateNowPlayingInfo() {
        // Set the track name
        mTrackName.setText(MusicUtils.getTrackName());
        // Set the artist name
        mArtistName.setText(MusicUtils.getArtistName());
        // Set the total time
        mTotalTime.setText(MusicUtils.makeTimeString(this, MusicUtils.duration() / 1000));
        // Set the album art
        mImageFetcher.loadCurrentArtwork(mAlbumArt);
        // Set the small artwork
        mImageFetcher.loadCurrentArtwork(mAlbumArtSmall);
        // Update the current time
        queueNextRefresh(1);

    }

    /**
     * Sets the correct drawable states for the playback controls.
     */
    private void updatePlaybackControls() {
        // Set the play and pause image
        mPlayPauseButton.updateState();
        // Set the shuffle image
        mShuffleButton.updateShuffleState();
        // Set the repeat image
        mRepeatButton.updateRepeatState();
    }

    /**
     * Refreshes the lyrics and moves the view pager to the lyrics fragment.
     */
    public void updateLyrics(final boolean force) {
        ((LyricsFragment)mPagerAdapter.getFragment(1)).fetchLyrics(force);
        if (force && mViewPager.getCurrentItem() != 1) {
            mViewPager.setCurrentItem(1, true);
        }
    }

    /**
     * @param delay When to update
     */
    private void queueNextRefresh(final long delay) {
        if (!mIsPaused) {
            final Message message = mTimeHandler.obtainMessage(REFRESH_TIME);
            mTimeHandler.removeMessages(REFRESH_TIME);
            mTimeHandler.sendMessageDelayed(message, delay);
        }
    }

    /**
     * Used to scan backwards in time through the curren track
     *
     * @param repcnt The repeat count
     * @param delta The long press duration
     */
    private void scanBackward(final int repcnt, long delta) {
        if (mService == null) {
            return;
        }
        if (repcnt == 0) {
            mStartSeekPos = MusicUtils.position();
            mLastSeekEventTime = 0;
        } else {
            if (delta < 5000) {
                // seek at 10x speed for the first 5 seconds
                delta = delta * 10;
            } else {
                // seek at 40x after that
                delta = 50000 + (delta - 5000) * 40;
            }
            long newpos = mStartSeekPos - delta;
            if (newpos < 0) {
                // move to previous track
                MusicUtils.previous(this);
                final long duration = MusicUtils.duration();
                mStartSeekPos += duration;
                newpos += duration;
            }
            if (delta - mLastSeekEventTime > 250 || repcnt < 0) {
                MusicUtils.seek(newpos);
                mLastSeekEventTime = delta;
            }
            if (repcnt >= 0) {
                mPosOverride = newpos;
            } else {
                mPosOverride = -1;
            }
            refreshCurrentTime();
        }
    }

    /**
     * Used to scan forwards in time through the curren track
     *
     * @param repcnt The repeat count
     * @param delta The long press duration
     */
    private void scanForward(final int repcnt, long delta) {
        if (mService == null) {
            return;
        }
        if (repcnt == 0) {
            mStartSeekPos = MusicUtils.position();
            mLastSeekEventTime = 0;
        } else {
            if (delta < 5000) {
                // seek at 10x speed for the first 5 seconds
                delta = delta * 10;
            } else {
                // seek at 40x after that
                delta = 50000 + (delta - 5000) * 40;
            }
            long newpos = mStartSeekPos + delta;
            final long duration = MusicUtils.duration();
            if (newpos >= duration) {
                // move to next track
                MusicUtils.next();
                mStartSeekPos -= duration; // is OK to go negative
                newpos -= duration;
            }
            if (delta - mLastSeekEventTime > 250 || repcnt < 0) {
                MusicUtils.seek(newpos);
                mLastSeekEventTime = delta;
            }
            if (repcnt >= 0) {
                mPosOverride = newpos;
            } else {
                mPosOverride = -1;
            }
            refreshCurrentTime();
        }
    }

    /* Used to update the current time string */
    private long refreshCurrentTime() {
        if (mService == null) {
            return 500;
        }
        try {
            final long pos = mPosOverride < 0 ? MusicUtils.position() : mPosOverride;
            if (pos >= 0 && MusicUtils.duration() > 0) {
                mCurrentTime.setText(MusicUtils.makeTimeString(this, pos / 1000));
                final int progress = (int)(1000 * pos / MusicUtils.duration());
                mProgress.setProgress(progress);

                if (MusicUtils.isPlaying()) {
                    mCurrentTime.setVisibility(View.VISIBLE);
                } else {
                    // blink the counter
                    final int vis = mCurrentTime.getVisibility();
                    mCurrentTime.setVisibility(vis == View.INVISIBLE ? View.VISIBLE
                            : View.INVISIBLE);
                    return 500;
                }
            } else {
                mCurrentTime.setText("--:--");
                mProgress.setProgress(1000);
            }
            // calculate the number of milliseconds until the next full second,
            // so
            // the counter can be updated at just the right time
            final long remaining = 1000 - pos % 1000;
            // approximate how often we would need to refresh the slider to
            // move it smoothly
            int width = mProgress.getWidth();
            if (width == 0) {
                width = 320;
            }
            final long smoothrefreshtime = MusicUtils.duration() / width;
            if (smoothrefreshtime > remaining) {
                return remaining;
            }
            if (smoothrefreshtime < 20) {
                return 20;
            }
            return smoothrefreshtime;
        } catch (final Exception ignored) {

        }
        return 500;
    }

    /**
     * @param v The view to animate
     * @param alpha The alpha to apply
     */
    private void fade(final View v, final float alpha) {
        final ObjectAnimator fade = ObjectAnimator.ofFloat(v, "alpha", alpha);
        fade.setInterpolator(AnimationUtils.loadInterpolator(this,
                android.R.anim.accelerate_decelerate_interpolator));
        fade.setDuration(400);
        fade.start();
    }

    /**
     * Called to show the album art and hide the queue/lyrics
     */
    private void showAlbumArt() {
        mPageContainer.setVisibility(View.INVISIBLE);
        mAlbumArtSmall.setVisibility(View.GONE);
        mQueueSwitch.setVisibility(View.VISIBLE);
        // Fade out the pager container
        fade(mPageContainer, 0f);
        // Fade in the album art
        fade(mAlbumArt, 1f);
    }

    /**
     * Called to hide the album art and show the queue/lyrics
     */
    public void hideAlbumArt() {
        mPageContainer.setVisibility(View.VISIBLE);
        mQueueSwitch.setVisibility(View.GONE);
        mAlbumArtSmall.setVisibility(View.VISIBLE);
        // Fade out the artwork
        fade(mAlbumArt, 0f);
        // Fade in the pager container
        fade(mPageContainer, 1f);
    }

    /**
     * /** Used to shared what the user is currently listening to
     */
    private void shareCurrentTrack() {
        if (MusicUtils.getTrackName() == null || MusicUtils.getArtistName() == null) {
            return;
        }
        final Intent shareIntent = new Intent();
        final String shareMessage = getString(R.string.now_listening_to) + " "
                + MusicUtils.getTrackName() + " " + getString(R.string.by) + " "
                + MusicUtils.getArtistName() + " " + getString(R.string.hash_apollo);

        shareIntent.setAction(Intent.ACTION_SEND);
        shareIntent.setType("text/plain");
        shareIntent.putExtra(Intent.EXTRA_TEXT, shareMessage);
        startActivity(Intent.createChooser(shareIntent, getString(R.string.share_track_using)));
    }

    /**
     * Used to scan backwards through the track
     */
    private final RepeatingImageButton.RepeatListener mRewindListener = new RepeatingImageButton.RepeatListener() {
        /**
         * {@inheritDoc}
         */
        @Override
        public void onRepeat(final View v, final long howlong, final int repcnt) {
            scanBackward(repcnt, howlong);
        }
    };

    /**
     * Used to scan ahead through the track
     */
    private final RepeatingImageButton.RepeatListener mFastForwardListener = new RepeatingImageButton.RepeatListener() {
        /**
         * {@inheritDoc}
         */
        @Override
        public void onRepeat(final View v, final long howlong, final int repcnt) {
            scanForward(repcnt, howlong);
        }
    };

    /**
     * Switches from the large album art screen to show the queue and lyric
     * fragments, then back again
     */
    private final OnClickListener mToggleHiddenPanel = new OnClickListener() {

        /**
         * {@inheritDoc}
         */
        @Override
        public void onClick(final View v) {
            if (mPageContainer.getVisibility() == View.VISIBLE) {
                // Open the current album profile
                mAudioPlayerHeader.setOnClickListener(mOpenAlbumProfile);
                // Show the artwork, hide the queue and lyrics
                showAlbumArt();
            } else {
                // Scroll to the current track
                mAudioPlayerHeader.setOnClickListener(mScrollToCurrentSong);
                // Show the queue and lyrics, hide the artwork
                hideAlbumArt();
            }
        }
    };

    /**
     * Opens to the current album profile
     */
    private final OnClickListener mOpenAlbumProfile = new OnClickListener() {

        @Override
        public void onClick(final View v) {
            NavUtils.openAlbumProfile(AudioPlayerActivity.this, MusicUtils.getAlbumName(),
                    MusicUtils.getArtistName());
        }
    };

    /**
     * Scrolls the queue to the currently playing song
     */
    private final OnClickListener mScrollToCurrentSong = new OnClickListener() {

        @Override
        public void onClick(final View v) {
            ((QueueFragment)mPagerAdapter.getFragment(0)).scrollToCurrentSong();
        }
    };

    /**
     * Used to update the current time string
     */
    private static final class TimeHandler extends Handler {

        private final WeakReference<AudioPlayerActivity> mAudioPlayer;

        /**
         * Constructor of <code>TimeHandler</code>
         */
        public TimeHandler(final AudioPlayerActivity player) {
            mAudioPlayer = new WeakReference<AudioPlayerActivity>(player);
        }

        @Override
        public void handleMessage(final Message msg) {
            switch (msg.what) {
                case REFRESH_TIME:
                    final long next = mAudioPlayer.get().refreshCurrentTime();
                    mAudioPlayer.get().queueNextRefresh(next);
                    break;
                default:
                    break;
            }
        }
    };

    /**
     * Used to monitor the state of playback
     */
    private static final class PlaybackStatus extends BroadcastReceiver {

        private final WeakReference<AudioPlayerActivity> mReference;

        /**
         * Constructor of <code>PlaybackStatus</code>
         */
        public PlaybackStatus(final AudioPlayerActivity activity) {
            mReference = new WeakReference<AudioPlayerActivity>(activity);
        }

        /**
         * {@inheritDoc}
         */
        @Override
        public void onReceive(final Context context, final Intent intent) {
            final String action = intent.getAction();
            if (action.equals(MusicPlaybackService.META_CHANGED)) {
                // Current info
                mReference.get().updateNowPlayingInfo();
                // Update the favorites icon
                mReference.get().invalidateOptionsMenu();
                // Update the lyrics
                mReference.get().updateLyrics(false);
            } else if (action.equals(MusicPlaybackService.PLAYSTATE_CHANGED)) {
                // Set the play and pause image
                mReference.get().mPlayPauseButton.updateState();
            } else if (action.equals(MusicPlaybackService.REPEATMODE_CHANGED)
                    || action.equals(MusicPlaybackService.SHUFFLEMODE_CHANGED)) {
                // Set the repeat image
                mReference.get().mRepeatButton.updateRepeatState();
                // Set the shuffle image
                mReference.get().mShuffleButton.updateShuffleState();
            }
        }
    }

}

{'repo_name': 'adneal/Apollo-CM', 'stars': '192', 'repo_language': 'Java', 'file_name': 'notification_template_expanded_base.xml', 'mime_type': 'text/xml', 'hash': -3348822399850986184, 'source_dataset': 'data'}


const ghpages = require('../../lib/index');
const sinon = require('sinon');
const cli = require('../../bin/gh-pages');
const assert = require('../helper').assert;
const beforeAdd = require('./fixtures/beforeAdd');

describe('gh-pages', () => {
  describe('main', () => {
    beforeEach(() => {
      sinon
        .stub(ghpages, 'publish')
        .callsFake((basePath, config, callback) => callback());
    });

    afterEach(() => {
      ghpages.publish.restore();
    });

    const scenarios = [
      {
        args: ['--dist', 'lib'],
        dist: 'lib',
        config: ghpages.defaults
      },
      {
        args: ['--dist', 'lib', '-n'],
        dist: 'lib',
        config: {push: false}
      },
      {
        args: ['--dist', 'lib', '-f'],
        dist: 'lib',
        config: {history: false}
      },
      {
        args: ['--dist', 'lib', '-x'],
        dist: 'lib',
        config: {silent: true}
      },
      {
        args: ['--dist', 'lib', '--dotfiles'],
        dist: 'lib',
        config: {dotfiles: true}
      },
      {
        args: ['--dist', 'lib', '--dest', 'target'],
        dist: 'lib',
        config: {dest: 'target'}
      },
      {
        args: ['--dist', 'lib', '-a', 'target'],
        dist: 'lib',
        config: {add: true}
      },
      {
        args: ['--dist', 'lib', '--git', 'path/to/git'],
        dist: 'lib',
        config: {git: 'path/to/git'}
      },
      {
        args: ['--dist', 'lib', '--user', 'Full Name <email@example.com>'],
        dist: 'lib',
        config: {user: {name: 'Full Name', email: 'email@example.com'}}
      },
      {
        args: ['--dist', 'lib', '--user', 'email@example.com'],
        dist: 'lib',
        config: {user: {name: null, email: 'email@example.com'}}
      },
      {
        args: ['--dist', 'lib', '-u', 'Full Name <email@example.com>'],
        dist: 'lib',
        config: {user: {name: 'Full Name', email: 'email@example.com'}}
      },
      {
        args: [
          '--dist',
          'lib',
          '--before-add',
          require.resolve('./fixtures/beforeAdd')
        ],
        dist: 'lib',
        config: {beforeAdd}
      },
      {
        args: ['--dist', 'lib', '-u', 'junk email'],
        dist: 'lib',
        error:
          'Could not parse name and email from user option "junk email" (format should be "Your Name <email@example.com>")'
      }
    ];

    scenarios.forEach(({args, dist, config, error}) => {
      let title = args.join(' ');
      if (error) {
        title += ' (user error)';
      }
      it(title, done => {
        cli(['node', 'gh-pages'].concat(args))
          .then(() => {
            if (error) {
              done(new Error(`Expected error "${error}" but got success`));
              return;
            }
            sinon.assert.calledWithMatch(ghpages.publish, dist, config);
            done();
          })
          .catch(err => {
            if (!error) {
              done(err);
              return;
            }
            assert.equal(err.message, error);
            done();
          });
      });
    });
  });
});

{'repo_name': 'tschaub/gh-pages', 'stars': '2207', 'repo_language': 'JavaScript', 'file_name': 'changelog.sh', 'mime_type': 'text/x-shellscript', 'hash': -1396131565176612456, 'source_dataset': 'data'}


// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package einterfaces

import (
	"github.com/mattermost/mattermost-server/v5/model"
)

type ComplianceInterface interface {
	StartComplianceDailyJob()
	RunComplianceJob(job *model.Compliance) *model.AppError
}

{'repo_name': 'mattermost/mattermost-server', 'stars': '18594', 'repo_language': 'Go', 'file_name': 'export.go', 'mime_type': 'text/plain', 'hash': -6049484360631645344, 'source_dataset': 'data'}


# Build Emacs from a fresh tarball or version-control checkout.

# Copyright (C) 2011-2017 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
# GNU Emacs is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GNU Emacs is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
#
# written by Paul Eggert

# This GNUmakefile is for GNU Make.  It is for convenience, so that
# one can run 'make' in an unconfigured source tree.  In such a tree,
# this file causes GNU Make to first create a standard configuration
# with the default options, and then reinvokes itself on the
# newly-built Makefile.  If the source tree is already configured,
# this file defers to the existing Makefile.

# If you are using a non-GNU 'make', or if you want non-default build
# options, or if you want to build in an out-of-source tree, please
# run "configure" by hand.  But run autogen.sh first, if the source
# was checked out directly from the repository.

# If a Makefile already exists, just use it.

ifeq ($(wildcard Makefile),Makefile)
include Makefile
else

# If cleaning and Makefile does not exist, don't bother creating it.
# The source tree is already clean, or is in a weird state that
# requires expert attention.

ifeq ($(filter-out %clean,$(or $(MAKECMDGOALS),default)),)

$(MAKECMDGOALS):
	@echo >&2 'No Makefile; skipping $@.'

else

# No Makefile, and not cleaning.
# If 'configure' does not exist, Emacs must have been checked
# out directly from the repository; run ./autogen.sh.
# Once 'configure' exists, run it.
# Finally, run the actual 'make'.

ORDINARY_GOALS = $(filter-out configure Makefile bootstrap,$(MAKECMDGOALS))

default $(ORDINARY_GOALS): Makefile
	$(MAKE) -f Makefile $(MAKECMDGOALS)
# Execute in sequence, so that multiple user goals don't conflict.
.NOTPARALLEL:

configure:
	@echo >&2 'There seems to be no "configure" file in this directory.'
	@echo >&2 'Running ./autogen.sh ...'
	./autogen.sh
	@echo >&2 '"configure" file built.'

Makefile: configure
	@echo >&2 'There seems to be no Makefile in this directory.'
	@echo >&2 'Running ./configure ...'
	./configure
	@echo >&2 'Makefile built.'

# 'make bootstrap' in a fresh checkout needn't run 'configure' twice.
bootstrap: Makefile
	$(MAKE) -f Makefile all

.PHONY: bootstrap default $(ORDINARY_GOALS)

endif
endif

{'repo_name': 'aquamacs-emacs/aquamacs-emacs', 'stars': '365', 'repo_language': 'Emacs Lisp', 'file_name': 'tex-ref.tex', 'mime_type': 'text/x-tex', 'hash': -4013942956781006452, 'source_dataset': 'data'}


fileFormatVersion: 2
guid: 9dbe0eee945399346bf4dcec3bdf72bf
timeCreated: 1436617353
licenseType: Free
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:

{'repo_name': 'devdogio/Inventory-Pro', 'stars': '449', 'repo_language': 'C#', 'file_name': 'settings.json', 'mime_type': 'text/plain', 'hash': 167867769167279281, 'source_dataset': 'data'}


// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc.  All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
//     * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//     * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//     * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

// Author: kenton@google.com (Kenton Varda)
//
// emulates google3/base/once.h
//
// This header is intended to be included only by internal .cc files and
// generated .pb.cc files.  Users should not use this directly.

#include <google/protobuf/stubs/once.h>

#ifndef GOOGLE_PROTOBUF_NO_THREAD_SAFETY

#ifdef _WIN32
#include <windows.h>
#else
#include <sched.h>
#endif

#include <google/protobuf/stubs/atomicops.h>

namespace google {
namespace protobuf {

namespace {

void SchedYield() {
#ifdef _WIN32
  Sleep(0);
#else  // POSIX
  sched_yield();
#endif
}

}  // namespace

void GoogleOnceInitImpl(ProtobufOnceType* once, Closure* closure) {
  internal::AtomicWord state = internal::Acquire_Load(once);
  // Fast path. The provided closure was already executed.
  if (state == ONCE_STATE_DONE) {
    return;
  }
  // The closure execution did not complete yet. The once object can be in one
  // of the two following states:
  //   - UNINITIALIZED: We are the first thread calling this function.
  //   - EXECUTING_CLOSURE: Another thread is already executing the closure.
  //
  // First, try to change the state from UNINITIALIZED to EXECUTING_CLOSURE
  // atomically.
  state = internal::Acquire_CompareAndSwap(
      once, ONCE_STATE_UNINITIALIZED, ONCE_STATE_EXECUTING_CLOSURE);
  if (state == ONCE_STATE_UNINITIALIZED) {
    // We are the first thread to call this function, so we have to call the
    // closure.
    closure->Run();
    internal::Release_Store(once, ONCE_STATE_DONE);
  } else {
    // Another thread has already started executing the closure. We need to
    // wait until it completes the initialization.
    while (state == ONCE_STATE_EXECUTING_CLOSURE) {
      // Note that futex() could be used here on Linux as an improvement.
      SchedYield();
      state = internal::Acquire_Load(once);
    }
  }
}

}  // namespace protobuf
}  // namespace google

#endif  // GOOGLE_PROTOBUF_NO_THREAD_SAFETY

{'repo_name': 'linkingvision/rapidvms', 'stars': '351', 'repo_language': 'C++', 'file_name': 'SQLite_vs100.vcxproj.filters', 'mime_type': 'text/xml', 'hash': 1733124773751320330, 'source_dataset': 'data'}


using System;
 using System.Collections.Generic;
 using System.IO;
 using i18n.Domain.Abstract;

namespace i18n.Domain.Tests
{
    public class SettingService_Mock : AbstractSettingService
    {
        private readonly IDictionary<string, string> _settings = new Dictionary<string, string>();

        public SettingService_Mock() : base(String.Empty)
        {

        }

        public override string GetConfigFileLocation()
        {
            //TODO get exec location
            return Path.Combine(Directory.GetCurrentDirectory(), "SettingService_Mock.cs");
        }

        public override string GetSetting(string key)
        {
            if (_settings.ContainsKey(key))
                return _settings[key];
            return null;
        }

        public override void SetSetting(string key, string value)
        {
            if (!_settings.ContainsKey(key))
                _settings.Add(key, value);
            else
                _settings[key] = value;
        }

        public override void RemoveSetting(string key)
        {
            if (_settings.ContainsKey(key))
                _settings.Remove(key);
        }
    }
}

{'repo_name': 'turquoiseowl/i18n', 'stars': '518', 'repo_language': 'C#', 'file_name': 'AssemblyInfo.cs', 'mime_type': 'text/plain', 'hash': 2536765010087266441, 'source_dataset': 'data'}


using System;
using System.Data;
using System.Collections.Generic;
using System.Globalization;
using Newtonsoft.Json;

namespace Serenity.Data
{
    public sealed class SingleField : GenericValueField<Single>
    {
        public SingleField(ICollection<Field> collection, string name, LocalText caption = null, int size = 0, FieldFlags flags = FieldFlags.Default,
            Func<Row, Single?> getValue = null, Action<Row, Single?> setValue = null)
            : base(collection, FieldType.Single, name, caption, size, flags, getValue, setValue)
        {
        }

        public static SingleField Factory(ICollection<Field> collection, string name, LocalText caption, int size, FieldFlags flags,
            Func<Row, Single?> getValue, Action<Row, Single?> setValue)
        {
            return new SingleField(collection, name, caption, size, flags, getValue, setValue);
        }

        public override void GetFromReader(IDataReader reader, int index, Row row)
        {
            if (reader == null)
                throw new ArgumentNullException("reader");

            var value = reader.GetValue(index);
            if (value is DBNull)
                _setValue(row, null);
            else if (value is Single)
                _setValue(row, (Single)value);
            else
                _setValue(row, Convert.ToSingle(value, CultureInfo.InvariantCulture));

            if (row.tracking)
                row.FieldAssignedValue(this);
        }

        public override void ValueToJson(JsonWriter writer, Row row, JsonSerializer serializer)
        {
            writer.WriteValue(_getValue(row));
        }

        public override void ValueFromJson(JsonReader reader, Row row, JsonSerializer serializer)
        {
            if (reader == null)
                throw new ArgumentNullException("reader");

            switch (reader.TokenType)
            {
                case JsonToken.Null:
                case JsonToken.Undefined:
                    _setValue(row, null);
                    break;
                case JsonToken.Integer:
                case JsonToken.Float:
                case JsonToken.Boolean:
                    _setValue(row, Convert.ToSingle(reader.Value, CultureInfo.InvariantCulture));
                    break;
                case JsonToken.String:
                    var s = ((string)reader.Value).TrimToNull();
                    if (s == null)
                        _setValue(row, null);
                    else
                        _setValue(row, Convert.ToSingle(s, CultureInfo.InvariantCulture));
                    break;
                default:
                    throw JsonUnexpectedToken(reader);
            }

            if (row.tracking)
                row.FieldAssignedValue(this);
        }
    }
}

{'repo_name': 'volkanceylan/Serenity', 'stars': '1950', 'repo_language': 'C#', 'file_name': 'CreateDatabase.sql', 'mime_type': 'text/plain', 'hash': 1070979346771988661, 'source_dataset': 'data'}