#include <GuiToolbar.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Constants.au3>

$Debug_TB = False ; Check ClassName being passed to functions, set to True and use a handle to another control to see it work

_Main()

Func _Main()
	Local $hGUI, $hToolbar, $aStrings[4]
	Local Enum $idNew = 1000, $idOpen, $idSave, $idHelp

	; Create GUI
	$hGUI = GUICreate("Toolbar", 400, 300)
	$hToolbar = _GUICtrlToolbar_Create($hGUI)
	GUISetState()

	; Add standard system bitmaps
	_GUICtrlToolbar_SetBitmapSize($hToolbar, 24, 24)
	_GUICtrlToolbar_LoadImages($hToolbar, $IDB_STD_LARGE_COLOR)

	; Add strings
	$aStrings[0] = _GUICtrlToolbar_AddString($hToolbar, "&New Button")
	$aStrings[1] = _GUICtrlToolbar_AddString($hToolbar, "&Open Button")
	$aStrings[2] = _GUICtrlToolbar_AddString($hToolbar, "&Save Button")
	$aStrings[3] = _GUICtrlToolbar_AddString($hToolbar, "&Help Button")

	; Add buttons
	_GUICtrlToolbar_AddButton($hToolbar, $idNew, $STD_FILENEW, $aStrings[0])
	_GUICtrlToolbar_AddButton($hToolbar, $idOpen, $STD_FILEOPEN, $aStrings[1])
	_GUICtrlToolbar_AddButton($hToolbar, $idSave, $STD_FILESAVE, $aStrings[2])
	_GUICtrlToolbar_AddButtonSep($hToolbar)
	_GUICtrlToolbar_AddButton($hToolbar, $idHelp, $STD_HELP, $aStrings[3])

	; Loop until user exits
	Do
	Until GUIGetMsg() = $GUI_EVENT_CLOSE

EndFunc   ;==>_Main

{'repo_name': 'forcedotcom/dataloader', 'stars': '269', 'repo_language': 'AutoIt', 'file_name': 'core.commands-3.6.1.v20120521-2329.pom', 'mime_type': 'text/xml', 'hash': -6697621808211937548, 'source_dataset': 'data'}


module clk_25_300_150_30_100_v
(
    input clkin, // 25 MHz, 0 deg
    output [3:0] clkout, // 0: 300 MHz, 0 deg; 1: 150 MHz, 0 deg; 2: 30 MHz, 0 deg; 3: 100 MHz, 0 deg
    output locked
);
wire clkfb;
wire clkos;
wire clkop;
(* ICP_CURRENT="12" *) (* LPF_RESISTOR="8" *) (* MFG_ENABLE_FILTEROPAMP="1" *) (* MFG_GMCREF_SEL="2" *)
EHXPLLL #(
        .PLLRST_ENA("DISABLED"),
        .STDBY_ENABLE("DISABLED"),
        .INTFB_WAKE("DISABLED"),
        .DPHASE_SOURCE("DISABLED"),
        .CLKOP_FPHASE(0),
        .CLKOP_CPHASE(1),
        .OUTDIVIDER_MUXA("DIVA"),
        .CLKOP_ENABLE("ENABLED"),
        .CLKOP_DIV(2),
        .CLKOS_ENABLE("ENABLED"),
        .CLKOS_DIV(4),
        .CLKOS_CPHASE(1),
        .CLKOS_FPHASE(0),
        .CLKOS2_ENABLE("ENABLED"),
        .CLKOS2_DIV(20),
        .CLKOS2_CPHASE(1),
        .CLKOS2_FPHASE(0),
        .CLKOS3_ENABLE("ENABLED"),
        .CLKOS3_DIV(6),
        .CLKOS3_CPHASE(1),
        .CLKOS3_FPHASE(0),
        .CLKFB_DIV(12),
        .CLKI_DIV(1),
        .FEEDBK_PATH("INT_OP")
    ) pll_i (
        .CLKI(clkin),
        .CLKFB(clkfb),
        .CLKINTFB(clkfb),
        .CLKOP(clkop),
        .CLKOS(clkout[1]),
        .CLKOS2(clkout[2]),
        .CLKOS3(clkout[3]),
        .RST(1'b0),
        .STDBY(1'b0),
        .PHASESEL0(1'b0),
        .PHASESEL1(1'b0),
        .PHASEDIR(1'b1),
        .PHASESTEP(1'b1),
        .PHASELOADREG(1'b1),
        .PLLWAKESYNC(1'b0),
        .ENCLKOP(1'b0),
        .LOCK(locked)
	);
assign clkout[0] = clkop;
endmodule

{'repo_name': 'f32c/f32c', 'stars': '308', 'repo_language': 'VHDL', 'file_name': 'binutils-2.26.diff', 'mime_type': 'text/x-diff', 'hash': 243101646146366224, 'source_dataset': 'data'}


/**
 * OpenKM, Open Document Management System (http://www.openkm.com)
 * Copyright (c) 2006-2017  Paco Avila & Josep Llort
 *

 * No bytes were intentionally harmed during the development of this application.
 *

 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *

 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

package com.openkm.frontend.client.panel.center;

import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.ui.SplitLayoutPanel;
import com.google.gwt.user.client.ui.Widget;

/**
 * VerticalSplitLayoutExtended
 *
 * @author jllort
 *
 */
public class VerticalSplitLayoutExtended extends SplitLayoutPanel {
	private int topHeight = 0;
	private int bottomHeight = 0;
	private VerticalResizeHandler resizeHander;

	/**
	 * VerticalSplitLayoutExtended
	 *
	 * @param handler
	 */
	public VerticalSplitLayoutExtended(final VerticalResizeHandler resizeHander) {
		super();
		this.resizeHander = resizeHander;
	}

	@Override
	public void onResize() {
		super.onResize();
		topHeight = Integer.parseInt(DOM.getStyleAttribute(DOM.getChild(this.getElement(), 2), "top").replace("px", "").trim());
		bottomHeight = this.getOffsetHeight() - Integer.parseInt(DOM.getStyleAttribute(DOM.getChild(this.getElement(), 3), "top").replace("px", "").trim());
		if (topHeight < 0) {
			topHeight = 0;
		}
		if (bottomHeight < 0) {
			bottomHeight = 0;
		}
		resizeHander.onResize(topHeight, bottomHeight);
	}

	/**
	 * getSplitPanel
	 *
	 * @return
	 */
	public SplitLayoutPanel getSplitPanel() {
		return this;
	}

	/**
	 * getTopHeight
	 */
	public int getTopHeight() {
		return topHeight;
	}

	/**
	 * getBottomHeight
	 */
	public int getBottomHeight() {
		return bottomHeight;
	}

	@Override
	public int getOffsetHeight() {
		int offsetHeight = super.getOffsetHeight(); // when widget is hidden value is 0
		if (offsetHeight == 0 && DOM.getStyleAttribute(this.getElement(), "height") != null && !DOM.getStyleAttribute(this.getElement(), "height").isEmpty()) {
			offsetHeight = Integer.parseInt(DOM.getStyleAttribute(this.getElement(), "height").replaceAll("px", ""));
		}
		return offsetHeight;
	}

	@Override
	public int getOffsetWidth() {
		int offsetWidth = super.getOffsetWidth(); // when widget is hidden value is 0
		if (offsetWidth == 0 && DOM.getStyleAttribute(this.getElement(), "width") != null && !DOM.getStyleAttribute(this.getElement(), "width").isEmpty()) {
			offsetWidth = Integer.parseInt(DOM.getStyleAttribute(this.getElement(), "width").replaceAll("px", ""));
		}
		return offsetWidth;
	}

	/**
	 * setSplitPosition
	 */
	public void setSplitPosition(Widget widgetBeforeTheSplitter, double size, boolean animate) {
		LayoutData layout = (LayoutData) widgetBeforeTheSplitter.getLayoutData();
		layout.oldSize = layout.size;
		layout.size = size;
		if (animate)
			animate(500);
		else
			super.forceLayout();
	}
}

{'repo_name': 'openkm/document-management-system', 'stars': '293', 'repo_language': 'Java', 'file_name': 'maven-wrapper.properties', 'mime_type': 'text/plain', 'hash': -8394685835397422171, 'source_dataset': 'data'}


--- Simplify absolute paths to relative paths and add `use` declarations
local inspect = require "inspect"

local Visitor = {}

function Visitor.new(transform_ctx)
   self = {}
   self.cur_path = {}
   self.ctx = transform_ctx

   setmetatable(self, Visitor)
   Visitor.__index = Visitor

   return self
end

function Visitor:flat_map_item(item, walk)
   if item:kind_name() == "Mod" then
      table.insert(self.cur_path, item:get_ident():get_name())
      walk(item)
      table.remove(self.cur_path)
   else
      self.ctx:visit_paths(
         item,
         function(id, qself, path, def)
            -- Ignore paths with <..>
            if path:has_generic_args() then
               return qself, path
            end

            local segments = path:get_segments()
            local same_count = 0
            for i,segment in ipairs(segments) do
               if ((i == 1 and segment == "crate" and self.cur_path[i] == "") or
                   segment == self.cur_path[i]) then
                  same_count = same_count + 1
               else
                  break
               end
            end
            if same_count > 1 then
               while same_count > 0 do
                  table.remove(segments, 1)
                  same_count = same_count - 1
               end
            end
            path:set_segments(segments)
            return qself, path
         end
      )
   end

   return {item}
end

refactor:transform(
   function(transform_ctx)
      transform_ctx:visit_crate_new(Visitor.new(transform_ctx))
   end
)

{'repo_name': 'immunant/c2rust', 'stars': '1517', 'repo_language': 'Rust', 'file_name': 'README.md', 'mime_type': 'text/plain', 'hash': 8310392829003897223, 'source_dataset': 'data'}


{'repo_name': 'lumifyio/lumify', 'stars': '402', 'repo_language': 'Java', 'file_name': 'install-accumulo.sh', 'mime_type': 'text/x-shellscript', 'hash': -6283643188084532159, 'source_dataset': 'data'}


package models.bot.tasks.message

import java.util.Properties
import scala.collection.JavaConversions._
import scala.collection.mutable.ListBuffer
import edu.stanford.nlp.ling.CoreAnnotations
import edu.stanford.nlp.pipeline.Annotation
import edu.stanford.nlp.pipeline.StanfordCoreNLP
import edu.stanford.nlp.neural.rnn.RNNCoreAnnotations
import edu.stanford.nlp.sentiment.SentimentCoreAnnotations
import edu.stanford.nlp.trees.Tree
import edu.stanford.nlp.util.CoreMap

import scala.collection.mutable

/**
 * Classes for creating message decision trees.
 */
case class MessageTree(
  val value: String,
  val left: Option[MessageTree] = None,
  val right: Option[MessageTree] = None

) {

  /**
   * Walk the node using a boolean input.
   * @param direction
   * @return
   */
  def walk(direction: Direction): Option[MessageTree] = {
    direction match {
      case Right => this.left
      case Left => this.right
    }
  }
}

object MessageTree {
  def observe(node: MessageTree, f: MessageTree => Unit): Unit = {
    f(node)
    node.left foreach { observe(_, f) }
    node.right foreach { observe(_, f) }
  }

  /**
   * Walk the tree and retrieve a child using a sequence of boolean steps.
   * @param tree
   * @param steps
   */
  def walkTree(tree: MessageTree, steps: List[Direction]): Option[MessageTree] = {
    val treeWalk: Option[MessageTree] = Some(tree) // workaround for type bug
    (steps foldLeft treeWalk)((t, direction) => t flatMap (_ walk direction))
  }
}

sealed abstract class Direction
object Left extends Direction
object Right extends Direction

{'repo_name': 'crockpotveggies/tinderbox', 'stars': '1866', 'repo_language': 'HTML', 'file_name': 'sample_naive_bayes_data.txt', 'mime_type': 'text/plain', 'hash': 7380504489932682062, 'source_dataset': 'data'}


/*
 * This library is part of OpenCms -
 * the Open Source Content Management System
 *
 * Copyright (c) Alkacon Software GmbH & Co. KG (http://www.alkacon.com)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * For further information about Alkacon Software, please see the
 * company website: http://www.alkacon.com
 *
 * For further information about OpenCms, please see the
 * project website: http://www.opencms.org
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

package org.opencms.db;

import org.opencms.file.CmsGroup;
import org.opencms.file.CmsObject;
import org.opencms.file.CmsResource;
import org.opencms.file.CmsResourceFilter;
import org.opencms.file.CmsUser;
import org.opencms.file.history.I_CmsHistoryResource;
import org.opencms.main.CmsException;
import org.opencms.main.CmsRuntimeException;
import org.opencms.main.OpenCms;
import org.opencms.security.CmsPrincipal;
import org.opencms.security.CmsRole;
import org.opencms.security.CmsRoleViolationException;
import org.opencms.util.CmsStringUtil;

import java.util.List;

/**
 * Manager that provides methods to subscribe resources to users, read subscribed or unvisited resources and more.

 *
 * @since 8.0
 */
public class CmsSubscriptionManager {

    /** The default maximum number of visited resources to store per user. */
    private static final int DEFAULT_MAX_VISITEDCOUNT = 1000;

    /** The security manager to access the cms. */
    protected CmsSecurityManager m_securityManager;

    /** Indicates if the subscription functionality is enabled. */
    private boolean m_enabled;

    /** Indicates if the configuration can be modified. */
    private boolean m_frozen;

    /** The maximum number of visited resources to store per user. */
    private int m_maxVisitedCount;

    /** The name of the database pool to use. */
    private String m_poolName;

    /**
     * Initializes a new CmsSubscriptionManager, called from the configuration.

     */
    public CmsSubscriptionManager() {

        m_frozen = false;
    }

    /**
     * Returns the date when the resource was last visited by the user.

     *
     * @param cms the current users context
     * @param user the user to check the date
     * @param resource the resource to check the date
     *
     * @return the date when the resource was last visited by the user
     *
     * @throws CmsException if something goes wrong
     */
    public long getDateLastVisitedBy(CmsObject cms, CmsUser user, CmsResource resource) throws CmsException {

        return m_securityManager.getDateLastVisitedBy(cms.getRequestContext(), getPoolName(), user, resource);
    }

    /**
     * Returns the date when the resource was last visited by the user.

     *
     * @param cms the current users context
     * @param user the user to check the date
     * @param resourcePath the name of the resource to check the date
     *
     * @return the date when the resource was last visited by the user
     *
     * @throws CmsException if something goes wrong
     */
    public long getDateLastVisitedBy(CmsObject cms, CmsUser user, String resourcePath) throws CmsException {

        CmsResource resource = cms.readResource(resourcePath, CmsResourceFilter.ALL);
        return m_securityManager.getDateLastVisitedBy(cms.getRequestContext(), getPoolName(), user, resource);
    }

    /**
     * Returns the maximum number of visited resources to store per user.

     *
     * @return the maximum number of visited resources to store per user
     */
    public int getMaxVisitedCount() {

        if (m_maxVisitedCount < 1) {
            m_maxVisitedCount = DEFAULT_MAX_VISITEDCOUNT;
        }
        return m_maxVisitedCount;
    }

    /**
     * Returns the name of the database pool to use.

     *
     * @return the name of the database pool to use
     */
    public String getPoolName() {

        if (CmsStringUtil.isEmpty(m_poolName)) {
            // use default pool as pool name
            m_poolName = OpenCms.getSqlManager().getDefaultDbPoolName();
        }
        return m_poolName;
    }

    /**
     * Initializes this subscription manager with the OpenCms system configuration.

     *
     * @param cms an OpenCms context object that must have been initialized with "Admin" permissions
     *
     * @throws CmsRoleViolationException in case the given opencms object does not have {@link CmsRole#ROOT_ADMIN} permissions
     */
    public void initialize(CmsObject cms) throws CmsRoleViolationException {

        OpenCms.getRoleManager().checkRole(cms, CmsRole.ROOT_ADMIN);
        m_frozen = true;
    }

    /**
     * Returns if the subscription functionality is enabled.

     *
     * @return true if the subscription functionality is enabled, otherwise false
     */
    public boolean isEnabled() {

        return m_enabled && (m_securityManager != null) && m_securityManager.isSubscriptionDriverAvailable();
    }

    /**
     * Mark the given resource as visited by the user.

     *
     * @param cms the current users context
     * @param resource the resource to mark as visited
     * @param user the user that visited the resource
     *
     * @throws CmsException if something goes wrong
     */
    public void markResourceAsVisitedBy(CmsObject cms, CmsResource resource, CmsUser user) throws CmsException {

        if (!isEnabled()) {
            throw new CmsRuntimeException(Messages.get().container(Messages.ERR_SUBSCRIPTION_MANAGER_DISABLED_0));
        }
        m_securityManager.markResourceAsVisitedBy(cms.getRequestContext(), getPoolName(), resource, user);
    }

    /**
     * Mark the given resource as visited by the user.

     *
     * @param cms the current users context
     * @param resourcePath the name of the resource to mark as visited
     * @param user the user that visited the resource
     *
     * @throws CmsException if something goes wrong
     */
    public void markResourceAsVisitedBy(CmsObject cms, String resourcePath, CmsUser user) throws CmsException {

        CmsResource resource = cms.readResource(resourcePath, CmsResourceFilter.ALL);
        markResourceAsVisitedBy(cms, resource, user);
    }

    /**
     * Returns all resources subscribed by the given user or group.

     *
     * @param cms the current users context
     * @param principal the principal to read the subscribed resources
     *
     * @return all resources subscribed by the given user or group
     *
     * @throws CmsException if something goes wrong
     */
    public List<CmsResource> readAllSubscribedResources(CmsObject cms, CmsPrincipal principal) throws CmsException {

        return m_securityManager.readAllSubscribedResources(cms.getRequestContext(), getPoolName(), principal);
    }

    /**
     * Returns the resources that were visited by a user set in the filter.

     *
     * @param cms the current users context
     * @param filter the filter that is used to get the visited resources
     *
     * @return the resources that were visited by a user set in the filter
     *
     * @throws CmsException if something goes wrong
     */
    public List<CmsResource> readResourcesVisitedBy(CmsObject cms, CmsVisitedByFilter filter) throws CmsException {

        return m_securityManager.readResourcesVisitedBy(cms.getRequestContext(), getPoolName(), filter);
    }

    /**
     * Returns the subscribed history resources that were deleted.

     *
     * @param cms the current users context
     * @param user the user that subscribed to the resource
     * @param includeGroups indicates if the users groups should also be checked for subscribed deleted resources
     * @param folderPath the folder path of the deleted resources, if null all deleted resources will be returned
     * @param includeSubFolders indicates if the sub folders of the specified folder path should be considered, too
     * @param deletedFrom the time stamp from which the resources should have been deleted
     *
     * @return the subscribed history resources that were deleted
     *
     * @throws CmsException if something goes wrong
     */
    public List<I_CmsHistoryResource> readSubscribedDeletedResources(
        CmsObject cms,
        CmsUser user,
        boolean includeGroups,
        String folderPath,
        boolean includeSubFolders,
        long deletedFrom) throws CmsException {

        List<CmsGroup> groups = null;
        if (includeGroups) {
            try {
                groups = cms.getGroupsOfUser(user.getName(), false);
            } catch (CmsException e) {
                // failed to set user groups
            }
        }
        CmsResource resource = null;
        if (CmsStringUtil.isNotEmpty(folderPath)) {
            resource = cms.readResource(folderPath, CmsResourceFilter.ALL);
        }
        return m_securityManager.readSubscribedDeletedResources(
            cms.getRequestContext(),
            getPoolName(),
            user,
            groups,
            resource,
            includeSubFolders,
            deletedFrom);
    }

    /**
     * Returns the resources that were subscribed by a user or group set in the filter.

     *
     * @param cms the current users context
     * @param filter the filter that is used to get the subscribed resources
     *
     * @return the resources that were subscribed by a user or group set in the filter
     *
     * @throws CmsException if something goes wrong
     */
    public List<CmsResource> readSubscribedResources(CmsObject cms, CmsSubscriptionFilter filter) throws CmsException {

        return m_securityManager.readSubscribedResources(cms.getRequestContext(), getPoolName(), filter);
    }

    /**
     * Sets if the subscription functionality is enabled.

     *
     * @param enabled the flag indicating if the subscription functionality is enabled
     */
    public void setEnabled(boolean enabled) {

        if (m_frozen) {
            throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_SUBSCRIPTIONMANAGER_FROZEN_0));
        }
        m_enabled = enabled;
    }

    /**
     * Sets if the subscription functionality is enabled.

     *
     * @param enabled the flag indicating if the subscription functionality is enabled
     */
    public void setEnabled(String enabled) {

        if (m_frozen) {
            throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_SUBSCRIPTIONMANAGER_FROZEN_0));
        }
        m_enabled = Boolean.valueOf(enabled).booleanValue();
    }

    /**
     * Sets the maximum number of visited resources to store per user.

     *
     * @param maxVisitedCount the maximum number of visited resources to store per user
     */
    public void setMaxVisitedCount(String maxVisitedCount) {

        if (m_frozen) {
            throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_SUBSCRIPTIONMANAGER_FROZEN_0));
        }
        try {
            int intValue = Integer.parseInt(maxVisitedCount);
            m_maxVisitedCount = (intValue > 0) ? intValue : DEFAULT_MAX_VISITEDCOUNT;
        } catch (NumberFormatException e) {
            // use default value
            m_maxVisitedCount = DEFAULT_MAX_VISITEDCOUNT;
        }
    }

    /**
     * Sets the name of the database pool to use.

     *
     * @param poolName the name of the database pool to use
     */
    public void setPoolName(String poolName) {

        if (m_frozen) {
            throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_SUBSCRIPTIONMANAGER_FROZEN_0));
        }
        m_poolName = poolName;
    }

    /**
     * Sets the security manager during initialization.

     *
     * @param securityManager the security manager
     */
    public void setSecurityManager(CmsSecurityManager securityManager) {

        if (m_frozen) {
            throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_SUBSCRIPTIONMANAGER_FROZEN_0));
        }
        m_securityManager = securityManager;
    }

    /**
     * Marks a subscribed resource as deleted.

     *
     * @param cms the current users context
     * @param resource the subscribed resource to mark as deleted
     *
     * @throws CmsException if something goes wrong
     */
    public void setSubscribedResourceAsDeleted(CmsObject cms, CmsResource resource) throws CmsException {

        if (!isEnabled()) {
            throw new CmsRuntimeException(Messages.get().container(Messages.ERR_SUBSCRIPTION_MANAGER_DISABLED_0));
        }
        m_securityManager.setSubscribedResourceAsDeleted(cms.getRequestContext(), getPoolName(), resource);
    }

    /**
     * Subscribes the user or group to the resource.

     *
     * @param cms the current users context
     * @param principal the principal that subscribes to the resource
     * @param resource the resource to subscribe to
     *
     * @throws CmsException if something goes wrong
     */
    public void subscribeResourceFor(CmsObject cms, CmsPrincipal principal, CmsResource resource) throws CmsException {

        if (!isEnabled()) {
            throw new CmsRuntimeException(Messages.get().container(Messages.ERR_SUBSCRIPTION_MANAGER_DISABLED_0));
        }
        m_securityManager.subscribeResourceFor(cms.getRequestContext(), getPoolName(), principal, resource);
    }

    /**
     * Subscribes the user or group to the resource.

     *
     * @param cms the current users context
     * @param principal the principal that subscribes to the resource
     * @param resourcePath the name of the resource to subscribe to
     *
     * @throws CmsException if something goes wrong
     */
    public void subscribeResourceFor(CmsObject cms, CmsPrincipal principal, String resourcePath) throws CmsException {

        CmsResource resource = cms.readResource(resourcePath, CmsResourceFilter.ALL);
        subscribeResourceFor(cms, principal, resource);
    }

    /**
     * Unsubscribes all deleted resources that were deleted before the specified time stamp.

     *
     * @param cms the current users context
     * @param deletedTo the time stamp to which the resources have been deleted
     *
     * @throws CmsException if something goes wrong
     */
    public void unsubscribeAllDeletedResources(CmsObject cms, long deletedTo) throws CmsException {

        if (!isEnabled()) {
            throw new CmsRuntimeException(Messages.get().container(Messages.ERR_SUBSCRIPTION_MANAGER_DISABLED_0));
        }
        m_securityManager.unsubscribeAllDeletedResources(cms.getRequestContext(), getPoolName(), deletedTo);
    }

    /**
    * Unsubscribes the user or group from all resources.

    *
    * @param cms the current users context
    * @param principal the principal that unsubscribes from all resources
    *
    * @throws CmsException if something goes wrong
    */
    public void unsubscribeAllResourcesFor(CmsObject cms, CmsPrincipal principal) throws CmsException {

        if (!isEnabled()) {
            throw new CmsRuntimeException(Messages.get().container(Messages.ERR_SUBSCRIPTION_MANAGER_DISABLED_0));
        }
        m_securityManager.unsubscribeAllResourcesFor(cms.getRequestContext(), getPoolName(), principal);
    }

    /**
     * Unsubscribes the principal from the resource.

     *
     * @param cms the current users context
     * @param principal the principal that unsubscribes from the resource
     * @param resource the resource to unsubscribe from
     *
     * @throws CmsException if something goes wrong
     */
    public void unsubscribeResourceFor(CmsObject cms, CmsPrincipal principal, CmsResource resource)
    throws CmsException {

        if (!isEnabled()) {
            throw new CmsRuntimeException(Messages.get().container(Messages.ERR_SUBSCRIPTION_MANAGER_DISABLED_0));
        }
        m_securityManager.unsubscribeResourceFor(cms.getRequestContext(), getPoolName(), principal, resource);
    }

    /**
     * Unsubscribes the principal from the resource.

     *
     * @param cms the current users context
     * @param principal the principal that unsubscribes from the resource
     * @param resourcePath the name of the resource to unsubscribe from
     *
     * @throws CmsException if something goes wrong
     */
    public void unsubscribeResourceFor(CmsObject cms, CmsPrincipal principal, String resourcePath) throws CmsException {

        CmsResource resource = cms.readResource(resourcePath, CmsResourceFilter.ALL);
        unsubscribeResourceFor(cms, principal, resource);
    }

    /**
     * Unsubscribes all groups and users from the resource.

     *
     * @param cms the current users context
     * @param resource the resource to unsubscribe all groups and users from
     *
     * @throws CmsException if something goes wrong
     */
    public void unsubscribeResourceForAll(CmsObject cms, CmsResource resource) throws CmsException {

        if (!isEnabled()) {
            throw new CmsRuntimeException(Messages.get().container(Messages.ERR_SUBSCRIPTION_MANAGER_DISABLED_0));
        }
        m_securityManager.unsubscribeResourceForAll(cms.getRequestContext(), getPoolName(), resource);
    }

    /**
     * Unsubscribes all groups and users from the resource.

     *
     * @param cms the current users context
     * @param resourcePath the name of the resource to unsubscribe all groups and users from
     *
     * @throws CmsException if something goes wrong
     */
    public void unsubscribeResourceForAll(CmsObject cms, String resourcePath) throws CmsException {

        CmsResource resource = cms.readResource(resourcePath, CmsResourceFilter.ALL);
        unsubscribeResourceForAll(cms, resource);
    }

}

{'repo_name': 'alkacon/opencms-core', 'stars': '433', 'repo_language': 'Java', 'file_name': 'Messages.java', 'mime_type': 'text/x-java', 'hash': 6142470790704412295, 'source_dataset': 'data'}


{% extends "basic/layout.html" %}

{% if theme_bootstrap_version == "3" %}
  {% set bootstrap_version, navbar_version = "3.3.7", "" %}
  {% set bs_span_prefix = "col-md-" %}
{% else %}
  {% set bootstrap_version, navbar_version = "2.3.2", "-2" %}
  {% set bs_span_prefix = "span" %}
{% endif %}

{% if pagename == 'index' %}
    {% set content_class = "welcome" %}
{% endif %}

{% set script_files = script_files + [
    '_static/js/jquery-1.11.0.min.js',
    '_static/js/jquery-fix.js',
    '_static/bootstrap-' + bootstrap_version + '/js/bootstrap.min.js',
    '_static/bootstrap-sphinx.js'
  ]
%}

{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and sidebars %}

{%- set bs_content_width = render_sidebar and "9" or "12"%}

{%- block doctype -%}
<!DOCTYPE html>
{%- endblock %}

{# Sidebar: Rework into our Bootstrap nav section. #}
{% macro navBar() %}
{% include "navbar" + navbar_version + ".html" %}
{% endmacro %}

{% if theme_bootstrap_version == "3" %}
  {%- macro bsidebar() %}
      {%- if render_sidebar %}

          {%- for sidebartemplate in sidebars %}
            {%- include sidebartemplate %}
          {%- endfor %}

      {%- endif %}
  {%- endmacro %}
{% else %}
  {%- macro bsidebar() %}
      {%- if render_sidebar %}

          {%- for sidebartemplate in sidebars %}
            {%- include sidebartemplate %}
          {%- endfor %}

      {%- endif %}
  {%- endmacro %}
{% endif %}

{%- block extrahead %}
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
<meta name="apple-mobile-web-app-capable" content="yes">
{% endblock %}

{# Silence the sidebar's, relbar's #}
{% block header %}{% endblock %}
{% block relbar1 %}{% endblock %}
{% block relbar2 %}{% endblock %}
{% block sidebarsourcelink %}{% endblock %}

{%- block content %}
{{ navBar() }}

    {%- block sidebar1 %}{{ bsidebar() }}{% endblock %}

      {% block body %}{% endblock %}

    {% block sidebar2 %} {# possible location for sidebar #} {% endblock %}

{%- endblock %}

{%- block footer %}

      Back to top
      {% if theme_source_link_position == "footer" %}

        {% include "sourcelink.html" %}
      {% endif %}

    {%- if show_copyright %}
      {%- if hasdoc('copyright') %}
        {% trans path=pathto('copyright'), copyright=copyright|e %}© Copyright {{ copyright }}.{% endtrans %}

      {%- else %}
        {% trans copyright=copyright|e %}© Copyright {{ copyright }}.{% endtrans %}

      {%- endif %}
    {%- endif %}
    {%- if last_updated %}
      {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}

    {%- endif %}
    {%- if show_sphinx %}
      {% trans sphinx_version=sphinx_version|e %}Created using Sphinx {{ sphinx_version }}.{% endtrans %}

    {%- endif %}

{%- endblock %}

{'repo_name': 'pangeo-data/pangeo', 'stars': '439', 'repo_language': 'Jupyter Notebook', 'file_name': 'README.rst', 'mime_type': 'text/plain', 'hash': -2090203704796333711, 'source_dataset': 'data'}


using MultiMiner.TUI.Data;
using MultiMiner.UX.ViewModels;
using System;
using System.Linq;

namespace MultiMiner.TUI.Commands.Settings
{
    class PerksCommand
    {
        private readonly ApplicationViewModel app;
        private readonly Action<string> notificationHandler;

        public PerksCommand(
            ApplicationViewModel app,
            Action<string> notificationHandler)
        {
            this.app = app;
            this.notificationHandler = notificationHandler;
        }

        public bool HandleCommand(string[] input)
        {
            var success = false;

            if (input.Count() >= 2)
            {
                var arg1 = input[1];

                if (arg1.Equals(SettingArguments.On, StringComparison.OrdinalIgnoreCase))
                {
                    app.PerksConfiguration.PerksEnabled = true;
                    app.PerksConfiguration.ShowExchangeRates = true;
                    app.PerksConfiguration.ShowIncomeInUsd = true;
                    app.PerksConfiguration.ShowIncomeRates = true;
                    notificationHandler(String.Format("Perks set to: {0}", arg1));
                    success = true;
                }
                else if (arg1.Equals(SettingArguments.Off, StringComparison.OrdinalIgnoreCase))
                {
                    app.PerksConfiguration.PerksEnabled = false;
                    notificationHandler(String.Format("Perks set to: {0}", arg1));
                    success = true;
                }
                else if (input.Count() == 3)
                {
                    var arg2 = input[2];
                    var percent = 1;

                    if (arg1.Equals(SettingArguments.Percent, StringComparison.OrdinalIgnoreCase)
                        && int.TryParse(arg2, out percent)
                        && (percent >= 1))
                    {
                        notificationHandler(String.Format("Perks donation percent set to: {0}", arg2));
                        success = true;
                    }
                }

                if (success)
                    app.PerksConfiguration.SavePerksConfiguration();
            }
            return success;
        }
    }
}

{'repo_name': 'nwoolls/MultiMiner', 'stars': '553', 'repo_language': 'Roff', 'file_name': 'AssemblyInfo.cs', 'mime_type': 'text/plain', 'hash': -869107107471695102, 'source_dataset': 'data'}


package org.zstack.sdk;

import java.util.HashMap;
import java.util.Map;
import org.zstack.sdk.*;

public class QueryVtepAction extends QueryAction {

    private static final HashMap<String, Parameter> parameterMap = new HashMap<>();

    private static final HashMap<String, Parameter> nonAPIParameterMap = new HashMap<>();

    public static class Result {
        public ErrorCode error;
        public org.zstack.sdk.QueryVtepResult value;

        public Result throwExceptionIfError() {
            if (error != null) {
                throw new ApiException(
                    String.format("error[code: %s, description: %s, details: %s]", error.code, error.description, error.details)
                );
            }

            return this;
        }
    }

    private Result makeResult(ApiResult res) {
        Result ret = new Result();
        if (res.error != null) {
            ret.error = res.error;
            return ret;
        }

        org.zstack.sdk.QueryVtepResult value = res.getResult(org.zstack.sdk.QueryVtepResult.class);
        ret.value = value == null ? new org.zstack.sdk.QueryVtepResult() : value;

        return ret;
    }

    public Result call() {
        ApiResult res = ZSClient.call(this);
        return makeResult(res);
    }

    public void call(final Completion<Result> completion) {
        ZSClient.call(this, new InternalCompletion() {
            @Override
            public void complete(ApiResult res) {
                completion.complete(makeResult(res));
            }
        });
    }

    protected Map<String, Parameter> getParameterMap() {
        return parameterMap;
    }

    protected Map<String, Parameter> getNonAPIParameterMap() {
        return nonAPIParameterMap;
    }

    protected RestInfo getRestInfo() {
        RestInfo info = new RestInfo();
        info.httpMethod = "GET";
        info.path = "/l2-networks/vteps";
        info.needSession = true;
        info.needPoll = false;
        info.parameterName = "";
        return info;
    }

}

{'repo_name': 'zstackio/zstack', 'stars': '890', 'repo_language': 'Java', 'file_name': 'Entity.java', 'mime_type': 'text/x-java', 'hash': 7991527590853455535, 'source_dataset': 'data'}


# 'Full' DFPT calculation of third derivatives using Second Order Sternheimer equation
# Test on AlAs, with norm conserving pseudopotentials
# (L. Baguet, 05.2018)
# nsppol = 2

# Enable output for nonlinear (full DFPT only)
#*****************************************************
#   nonlinear_info 1  # print details of 3rd derivatives in .out file (no time consuming)
#   nonlinear_info 2  # nonlinear_info=1 + debug_mode activated in nonlinear (time consuming)
#   nonlinear_info 3  # nonlinear_info=1 + debug_mode activated in rf2_init  (time consuming)
#   nonlinear_info 4  # nonlinear_info=1 + debug_mode activated in both nonlinear and rf2_init (time consuming)

# Elementary cell
#*********************************
   acell 3*10.64
   rprim 0.0 0.5 0.5
         0.5 0.0 0.5
         0.5 0.5 0.0

# Atoms
#***********************
   natom 2
   ntypat 2
   znucl 13 33
   typat 1 2

   xred  0.00  0.00  0.00
         0.25  0.25  0.25

# Exchange correlation functional
#********************************
   ixc 7

# Polarization
#*******************************
          nsppol    2
  spinmagntarget    0

# SCF procedure
#*******************************
   nstep    100

# Bands
#*******************************
  occopt    1
   nband    8

# Plane wave basis set
#**************************************
       ecut  3
     ecutsm  0

# K point grid
#**************************************
   ngkpt       2 2 2
   nshiftk     4
   shiftk      0.5 0.5 0.5
               0.5 0.0 0.0
               0.0 0.5 0.0
               0.0 0.0 0.5

# Number of Datasets
#**************************************
    ndtset   7

# For all datasets (except 1 and 2)
#*******************************
    kptopt   2
    tolwfr   1.0d-26
    getden   2
    getwfk   2

# DATASET1 : Ground state (density)
#*******************************
   getden1   0
   getwfk1   0
   tolvrs1   1.0d-8
   kptopt1   1

# DATASET2 : Ground state (highly converged wavefunction)
#*******************************
   getden2   1
   getwfk2   1

# DATASET3 : ddk (SCF cycles are useless)
#*******************************
    rfddk3   1
    rfdir3   1 1 1
# For a more effective non self-consistent computation:
    nstep3   1
    nline3   100
   tolrde3   1.0d-30 # tolrde is choosen to be much lower than tolwfr.
                     # This way the conjugate gradient steps stop at tolwfr, and not tolrde (usually around 1.0d-3).
                     # If nline is sufficiently large, the computation converges in one step only.

# DATASET4 : Phonons, Electric field
#*******************************
   rfelfd4   3
   rfphon4   1
  rfatpol4   1 2
    rfdir4   1 1 1
   getddk4   3
   prtden4   1
  prepanl4   1

# DATASET5 : dkdk
#*******************************
 rf2_dkdk5   1
   getddk5   3
  prepanl5   1
# Non self-consistent computation : can converge in one step. If not, increase nline instead of nstep. tolrde is not used.
    nstep5   1
    nline5   100

# DATASET6 : dkde
#*******************************
 rf2_dkde6   1
   getddk6   3
  get1den6   4
 getdelfd6   4
  getdkdk6   5
  prepanl6   1
# Non self-consistent computation : can converge in one step. If not, increase nline instead of nstep. tolrde is not used.
    nstep6   1
    nline6   100

# DATASET7 : 3DTE calculation (full DFPT)
#*****************************************
optdriver7    5 # for nonlinear calculation
  usepead7    0
   getddk7    3
  get1den7    4
   get1wf7    4
  getdkde7    6
  d3e_pert1_phon7   1
 d3e_pert1_atpol7   1 2
  d3e_pert1_elfd7   1
   d3e_pert1_dir7   1 1 1
  d3e_pert2_elfd7   1
   d3e_pert2_dir7   1 1 1
  d3e_pert3_elfd7   1
   d3e_pert3_dir7   1 1 1

#%%<BEGIN TEST_INFO>
#%% [setup]
#%% executable = abinit
#%% [files]
#%% files_to_test =
#%%    t82.out, tolnlines =1 , tolabs =1.0E-8, tolrel = 1.0E-8, fld_options = -medium;
#%% psp_files = 13al.pspnc,33as.pspnc
#%% [paral_info]
#%% max_nprocs = 10
#%% [extra_info]
#%% authors = L. Baguet
#%% keywords = NC, DFPT, NONLINEAR
#%% description =
#%%   'Full' DFPT computation of third derivatives in Nonlinear (dataset 7).
#%%   Preceded by resolution of Second-order Sternheimer equations (dataset 5 and 6).
#%%   Test the polarized case (with a non-polarized system). Must give same results than t81.in
#%%<END TEST_INFO>

{'repo_name': 'abinit/abinit', 'stars': '110', 'repo_language': 'Fortran', 'file_name': 'INSTALL.in', 'mime_type': 'text/plain', 'hash': -3785443477774758252, 'source_dataset': 'data'}


<?php

/*
 * This file is part of the Sylius package.
 *
 * (c) Paweł Jędrzejewski
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

declare(strict_types=1);

namespace spec\Sylius\Bundle\ResourceBundle\DependencyInjection\Driver\Exception;

use PhpSpec\ObjectBehavior;

final class InvalidDriverExceptionSpec extends ObjectBehavior
{
    function let(): void
    {
        $this->beConstructedWith('driver', 'className');
    }

    function it_extends_exception(): void
    {
        $this->shouldHaveType(\Exception::class);
    }

    function it_has_a_message(): void
    {
        $this->getMessage()->shouldReturn('Driver "driver" is not supported by className.');
    }
}

{'repo_name': 'Sylius/SyliusResourceBundle', 'stars': '142', 'repo_language': 'PHP', 'file_name': 'index.md', 'mime_type': 'text/plain', 'hash': 1587319367285663246, 'source_dataset': 'data'}


# -*- coding: utf-8 -*-
"""
Manage and query udev info

.. versionadded:: 2015.8.0

"""
# Import Python libs
from __future__ import absolute_import, print_function, unicode_literals

import logging

import salt.modules.cmdmod

# Import Salt libs
import salt.utils.path
from salt.exceptions import CommandExecutionError

__salt__ = {
    "cmd.run_all": salt.modules.cmdmod.run_all,
}

log = logging.getLogger(__name__)

def __virtual__():
    """
    Only work when udevadm is installed.
    """
    return salt.utils.path.which_bin(["udevadm"]) is not None

def _parse_udevadm_info(udev_info):
    """
    Parse the info returned by udevadm command.
    """
    devices = []
    dev = {}

    for line in (line.strip() for line in udev_info.splitlines()):
        if line:
            line = line.split(":", 1)
            if len(line) != 2:
                continue
            query, data = line
            if query == "E":
                if query not in dev:
                    dev[query] = {}
                key, val = data.strip().split("=", 1)

                try:
                    val = int(val)
                except ValueError:
                    try:
                        val = float(val)
                    except ValueError:
                        pass  # Quiet, this is not a number.

                dev[query][key] = val
            else:
                if query not in dev:
                    dev[query] = []
                dev[query].append(data.strip())
        else:
            if dev:
                devices.append(_normalize_info(dev))
                dev = {}
    if dev:
        _normalize_info(dev)
        devices.append(_normalize_info(dev))

    return devices

def _normalize_info(dev):
    """
    Replace list with only one element to the value of the element.

    :param dev:
    :return:
    """
    for sect, val in dev.items():
        if len(val) == 1:
            dev[sect] = val[0]

    return dev

def info(dev):
    """
    Extract all info delivered by udevadm

    CLI Example:

    .. code-block:: bash

        salt '*' udev.info /dev/sda
        salt '*' udev.info /sys/class/net/eth0
    """
    if "sys" in dev:
        qtype = "path"
    else:
        qtype = "name"

    cmd = "udevadm info --export --query=all --{0}={1}".format(qtype, dev)
    udev_result = __salt__["cmd.run_all"](cmd, output_loglevel="quiet")

    if udev_result["retcode"] != 0:
        raise CommandExecutionError(udev_result["stderr"])

    return _parse_udevadm_info(udev_result["stdout"])[0]

def env(dev):
    """
    Return all environment variables udev has for dev

    CLI Example:

    .. code-block:: bash

        salt '*' udev.env /dev/sda
        salt '*' udev.env /sys/class/net/eth0
    """
    return info(dev).get("E", None)

def name(dev):
    """
    Return the actual dev name(s?) according to udev for dev

    CLI Example:

    .. code-block:: bash

        salt '*' udev.dev /dev/sda
        salt '*' udev.dev /sys/class/net/eth0
    """
    return info(dev).get("N", None)

def path(dev):
    """
    Return the physical device path(s?) according to udev for dev

    CLI Example:

    .. code-block:: bash

        salt '*' udev.path /dev/sda
        salt '*' udev.path /sys/class/net/eth0
    """
    return info(dev).get("P", None)

def links(dev):
    """
    Return all udev-created device symlinks

    CLI Example:

    .. code-block:: bash

        salt '*' udev.links /dev/sda
        salt '*' udev.links /sys/class/net/eth0
    """
    return info(dev).get("S", None)

def exportdb():
    """
    Return all the udev database

    CLI Example:

    .. code-block:: bash

        salt '*' udev.exportdb
    """

    cmd = "udevadm info --export-db"
    udev_result = __salt__["cmd.run_all"](cmd, output_loglevel="quiet")

    if udev_result["retcode"]:
        raise CommandExecutionError(udev_result["stderr"])

    return _parse_udevadm_info(udev_result["stdout"])

{'repo_name': 'saltstack/salt', 'stars': '11123', 'repo_language': 'Python', 'file_name': 'darwin-crypto.txt', 'mime_type': 'text/plain', 'hash': -8842358629799635329, 'source_dataset': 'data'}


<?xml version="1.0" encoding="utf-8"?><!--
     Copyright (C) 2011 The Android Open Source Project

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

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:focusable="false"
    android:gravity="center_vertical"
    android:minHeight="?android:attr/listPreferredItemHeight">

    <LinearLayout
        android:id="@+id/vpn_list_item_left"
        android:layout_height="match_parent"
        android:layout_width="wrap_content"
        android:background="?android:attr/selectableItemBackground"
        android:focusable="true"
        android:layout_weight="1"
        android:gravity="center_vertical">

        <LinearLayout
            android:id="@android:id/widget_frame"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:gravity="center_vertical"
            android:orientation="vertical">

            <TextView
                android:id="@+id/vpn_item_title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:ellipsize="marquee"
                android:fadingEdge="horizontal"
                android:singleLine="true"
                android:textAppearance="?android:attr/textAppearanceMedium"
                tools:text="Vpn Name" />

            <TextView
                android:id="@+id/vpn_item_subtitle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:ellipsize="marquee"
                android:fadingEdge="horizontal"
                android:singleLine="true"
                android:textAppearance="?android:attr/textAppearanceSmall"
                tools:text="Not connected!" />
        </LinearLayout>

    </LinearLayout>

    <View
        android:layout_width="2dip"
        android:layout_height="match_parent"
        android:layout_marginBottom="5dip"
        android:layout_marginTop="5dip"
        android:background="@android:drawable/divider_horizontal_dark"
        android:focusable="false" />

    <ImageView
        android:id="@+id/quickedit_settings"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_gravity="center"
        android:background="?android:attr/selectableItemBackground"
        android:contentDescription="@string/configure_the_vpn"
        android:focusable="true"
        android:paddingEnd="?android:attr/scrollbarSize"
        android:paddingLeft="15dip"
        android:paddingRight="?android:attr/scrollbarSize"
        android:paddingStart="15dip"
        android:src="@drawable/vpn_item_edit" />

</LinearLayout>

{'repo_name': 'ProtonVPN/android-app', 'stars': '432', 'repo_language': 'C', 'file_name': 'checkstyle.xml', 'mime_type': 'text/xml', 'hash': -6747278322623139682, 'source_dataset': 'data'}


# mime-types

[![NPM Version][npm-version-image]][npm-url]
[![NPM Downloads][npm-downloads-image]][npm-url]
[![Node.js Version][node-version-image]][node-version-url]
[![Build Status][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]

The ultimate javascript content-type utility.

Similar to [the `mime@1.x` module](https://www.npmjs.com/package/mime), except:

- __No fallbacks.__ Instead of naively returning the first available type,
  `mime-types` simply returns `false`, so do
  `var type = mime.lookup('unrecognized') || 'application/octet-stream'`.
- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`.
- No `.define()` functionality
- Bug fixes for `.lookup(path)`

Otherwise, the API is compatible with `mime` 1.x.

## Install

This is a [Node.js](https://nodejs.org/en/) module available through the
[npm registry](https://www.npmjs.com/). Installation is done using the
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):

```sh
$ npm install mime-types
```

## Adding Types

All mime types are based on [mime-db](https://www.npmjs.com/package/mime-db),
so open a PR there if you'd like to add mime types.

## API

```js
var mime = require('mime-types')
```

All functions return `false` if input is invalid or not found.

### mime.lookup(path)

Lookup the content-type associated with a file.

```js
mime.lookup('json')             // 'application/json'
mime.lookup('.md')              // 'text/markdown'
mime.lookup('file.html')        // 'text/html'
mime.lookup('folder/file.js')   // 'application/javascript'
mime.lookup('folder/.htaccess') // false

mime.lookup('cats') // false
```

### mime.contentType(type)

Create a full content-type header given a content-type or extension.
When given an extension, `mime.lookup` is used to get the matching
content-type, otherwise the given content-type is used. Then if the
content-type does not already have a `charset` parameter, `mime.charset`
is used to get the default charset and add to the returned content-type.

```js
mime.contentType('markdown')  // 'text/x-markdown; charset=utf-8'
mime.contentType('file.json') // 'application/json; charset=utf-8'
mime.contentType('text/html') // 'text/html; charset=utf-8'
mime.contentType('text/html; charset=iso-8859-1') // 'text/html; charset=iso-8859-1'

// from a full path
mime.contentType(path.extname('/path/to/file.json')) // 'application/json; charset=utf-8'
```

### mime.extension(type)

Get the default extension for a content-type.

```js
mime.extension('application/octet-stream') // 'bin'
```

### mime.charset(type)

Lookup the implied default charset of a content-type.

```js
mime.charset('text/markdown') // 'UTF-8'
```

### var type = mime.types[extension]

A map of content-types by extension.

### [extensions...] = mime.extensions[type]

A map of extensions by content-type.

## License

[MIT](LICENSE)

[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-types/master
[coveralls-url]: https://coveralls.io/r/jshttp/mime-types?branch=master
[node-version-image]: https://badgen.net/npm/node/mime-types
[node-version-url]: https://nodejs.org/en/download
[npm-downloads-image]: https://badgen.net/npm/dm/mime-types
[npm-url]: https://npmjs.org/package/mime-types
[npm-version-image]: https://badgen.net/npm/v/mime-types
[travis-image]: https://badgen.net/travis/jshttp/mime-types/master
[travis-url]: https://travis-ci.org/jshttp/mime-types

{'repo_name': 'xuhuai66/used-book-pro', 'stars': '452', 'repo_language': 'JavaScript', 'file_name': 'querystring.js', 'mime_type': 'text/plain', 'hash': 7019802076665146891, 'source_dataset': 'data'}


jsworld.Locale = function(properties) {

	// LC_NUMERIC

	this.frac_digits = properties.frac_digits;

	// may be empty string/null for currencies with no fractional part
	if (properties.mon_decimal_point === null || properties.mon_decimal_point == "") {

		if (this.frac_digits > 0)
			throw "Error: Undefined mon_decimal_point property";
		else
			properties.mon_decimal_point = "";
	}

	if (typeof properties.mon_decimal_point != "string")
		throw "Error: Invalid/missing mon_decimal_point property";

	this.mon_decimal_point = properties.mon_decimal_point;

	if (typeof properties.mon_thousands_sep != "string")
		throw "Error: Invalid/missing mon_thousands_sep property";

	this.mon_thousands_sep = properties.mon_thousands_sep;

	if (typeof properties.mon_grouping != "string")
		throw "Error: Invalid/missing mon_grouping property";

	this.mon_grouping = properties.mon_grouping;

	if (typeof properties.positive_sign != "string")
		throw "Error: Invalid/missing positive_sign property";

	this.positive_sign = properties.positive_sign;

	if (typeof properties.negative_sign != "string")
		throw "Error: Invalid/missing negative_sign property";

	this.negative_sign = properties.negative_sign;

	if (properties.p_cs_precedes !== 0 && properties.p_cs_precedes !== 1)
		throw "Error: Invalid/missing p_cs_precedes property, must be 0 or 1";

	this.p_cs_precedes = properties.p_cs_precedes;

	if (properties.n_cs_precedes !== 0 && properties.n_cs_precedes !== 1)
		throw "Error: Invalid/missing n_cs_precedes, must be 0 or 1";

	this.n_cs_precedes = properties.n_cs_precedes;

	if (properties.p_sep_by_space !== 0 &&
	    properties.p_sep_by_space !== 1 &&
	    properties.p_sep_by_space !== 2)
		throw "Error: Invalid/missing p_sep_by_space property, must be 0, 1 or 2";

	this.p_sep_by_space = properties.p_sep_by_space;

	if (properties.n_sep_by_space !== 0 &&
	    properties.n_sep_by_space !== 1 &&
	    properties.n_sep_by_space !== 2)
		throw "Error: Invalid/missing n_sep_by_space property, must be 0, 1, or 2";

	this.n_sep_by_space = properties.n_sep_by_space;

	if (properties.p_sign_posn !== 0 &&
	    properties.p_sign_posn !== 1 &&
	    properties.p_sign_posn !== 2 &&
	    properties.p_sign_posn !== 3 &&
	    properties.p_sign_posn !== 4)
		throw "Error: Invalid/missing p_sign_posn property, must be 0, 1, 2, 3 or 4";

	this.p_sign_posn = properties.p_sign_posn;

	if (properties.n_sign_posn !== 0 &&
	    properties.n_sign_posn !== 1 &&
	    properties.n_sign_posn !== 2 &&
	    properties.n_sign_posn !== 3 &&
	    properties.n_sign_posn !== 4)
		throw "Error: Invalid/missing n_sign_posn property, must be 0, 1, 2, 3 or 4";

	this.n_sign_posn = properties.n_sign_posn;

	if (typeof properties.int_frac_digits != "number" && properties.int_frac_digits < 0)
		throw "Error: Invalid/missing int_frac_digits property";

	this.int_frac_digits = properties.int_frac_digits;

	if (properties.int_p_cs_precedes !== 0 && properties.int_p_cs_precedes !== 1)
		throw "Error: Invalid/missing int_p_cs_precedes property, must be 0 or 1";

	this.int_p_cs_precedes = properties.int_p_cs_precedes;

	if (properties.int_n_cs_precedes !== 0 && properties.int_n_cs_precedes !== 1)
		throw "Error: Invalid/missing int_n_cs_precedes property, must be 0 or 1";

	this.int_n_cs_precedes = properties.int_n_cs_precedes;

	if (properties.int_p_sep_by_space !== 0 &&
	    properties.int_p_sep_by_space !== 1 &&
	    properties.int_p_sep_by_space !== 2)
		throw "Error: Invalid/missing int_p_sep_by_spacev, must be 0, 1 or 2";

	this.int_p_sep_by_space = properties.int_p_sep_by_space;

	if (properties.int_n_sep_by_space !== 0 &&
	    properties.int_n_sep_by_space !== 1 &&
	    properties.int_n_sep_by_space !== 2)
		throw "Error: Invalid/missing int_n_sep_by_space property, must be 0, 1, or 2";

	this.int_n_sep_by_space = properties.int_n_sep_by_space;

	if (properties.int_p_sign_posn !== 0 &&
	    properties.int_p_sign_posn !== 1 &&
	    properties.int_p_sign_posn !== 2 &&
	    properties.int_p_sign_posn !== 3 &&
	    properties.int_p_sign_posn !== 4)
		throw "Error: Invalid/missing int_p_sign_posn property, must be 0, 1, 2, 3 or 4";

	this.int_p_sign_posn = properties.int_p_sign_posn;

	if (properties.int_n_sign_posn !== 0 &&
	    properties.int_n_sign_posn !== 1 &&
	    properties.int_n_sign_posn !== 2 &&
	    properties.int_n_sign_posn !== 3 &&
	    properties.int_n_sign_posn !== 4)
		throw "Error: Invalid/missing int_n_sign_posn property, must be 0, 1, 2, 3 or 4";

	this.int_n_sign_posn = properties.int_n_sign_posn;

	// LC_TIME

	if (properties == null || typeof properties != "object")
		throw "Error: Invalid/missing time locale properties";

	// parse the supported POSIX LC_TIME properties

	// abday
	try  {
		this.abday = this._parseList(properties.abday, 7);
	}
	catch (error) {
		throw "Error: Invalid abday property: " + error;
	}

}

{'repo_name': 'ytham/barmixvah', 'stars': '132', 'repo_language': 'HTML', 'file_name': 'index.jade', 'mime_type': 'text/plain', 'hash': 2060418430092321362, 'source_dataset': 'data'}


/*
    BSD 3-Clause License

    Copyright (c) 2018, KORG INC.
    All rights reserved.

    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 the copyright holder 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 HOLDER 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.

//*/

/*
 *  File: userosc.ld
 *
 *  Linker Script for user oscillators
 */

/* Entry Point */
ENTRY(_entry)

/* Specify the memory areas */
MEMORY
{
  SRAM   (rx) : org = 0x20000000, len = 32K
}

/* Include Rules */
INCLUDE rules.ld

{'repo_name': 'korginc/logue-sdk', 'stars': '336', 'repo_language': 'C', 'file_name': 'devboard.maxpat', 'mime_type': 'text/plain', 'hash': -8816381728739958455, 'source_dataset': 'data'}


/*
 * nameko.css_t
 * ~~~~~~~~~~~~~~
 *
 * Sphinx Nameko Theme
 *
 * Forked from https://github.com/ignacysokolowski/sphinx-readable-theme
 *
 * :copyright: Copyright 2013 Ignacy Sokolowski; 2015 Lifealike, Ltd. DBA onefinestay
 * :license: MIT, see LICENSE for details.
 *
 */

@import url('basic.css');

/* -- page layout --------------------------------------------------------- */

body {
    font-family: "Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;
    margin: 0;
    padding: 0;
    background-color: rgb(252, 252, 252);
}

h1, h2, h3, h4 {
    color: #2a2730;
    font-weight: 700;
    font-family: "Lora","Times",serif;
    clear: both;
}

div.document {
    margin: 10px auto 0 auto;
    max-width: 940px;
}

div.documentwrapper {
    float: left;
    width: 100%;
}

div.bodywrapper {
    margin: 0 0 0 230px;
}

div.body {
    background-color: rgb(252, 252, 252);
    color: #3e4349;
    padding: 0 30px 30px 30px;
}

div.footer {
    color: #555;
    font-size: 14px;
    margin: 20px auto 30px auto;
    text-align: right;
    max-width: 880px;
}

div.footer a {
    color: #444;
    text-decoration: underline;
}

div.related {
    padding: 10px 10px;
    width: auto;
}

div.sphinxsidebar {
    float: left;
    font-size: 14px;
    line-height: 1.5em;
    margin-left: -100%;
    width: 230px;
}

div.sphinxsidebarwrapper {
  font-size: 14px;
  line-height: 1.5em;
  padding: 10px 0 10px 10px;

  /* sticky sidebar */
  position: fixed;
  width: 220px; /* sidebar width */
  height: 90%;
  overflow: hidden;
}

/* show scrollbar on hover */
div.sphinxsidebarwrapper:hover {
  overflow: auto;
}

div.sphinxsidebar h3,
div.sphinxsidebar h4 {
    color: #333;
    font-size: 24px;
    font-weight: normal;
    margin: 0 0 5px 0;
    padding: 0;
}

div.sphinxsidebar h4 {
    font-size: 1.1em;
}

div.sphinxsidebar h3 a {
    color: #333;
}

div.sphinxsidebar p {
    color: #888;
}

div.sphinxsidebar p.searchtip {
    line-height: 1.4em;
}

div.sphinxsidebar ul {
    color: #000;
    margin: 10px 0 20px;
    padding: 0;
}

div.sphinxsidebar a {
    color: #444;
}

div.sphinxsidebar a:hover {
    color: #d00;
}

div.sphinxsidebar input {
    border: 1px solid #ccc;
    font-family: sans-serif;
    font-size: 1em;
}

/* -- body styles --------------------------------------------------------- */

a {
    color: #900;
    text-decoration: none;
}

a:visited {
    color: #700;
}

a:hover {
    color: #d00;
    text-decoration: underline;
}

hr {
    border: 1px solid #b1b4b6;
}

div.body h1,
div.body h2,
div.body h3,
div.body h4,
div.body h5,
div.body h6 { font-weight: normal; }

div.body h1,
div.body h2,
div.body h3,
div.body h4 { color: #212224; }
div.body h5 { color: #000; }
div.body h6 { color: #777; }

div.body h1 { margin: 0 0 10px 0; }
div.body h2,
div.body h3 { margin: 30px 0px 10px 0px; }
div.body h4,
div.body h5,
div.body h6 { margin: 20px 0px 10px 0px; }

div.body h1 { padding: 0 0 10px 0; }
div.body h2,
div.body h3 { padding: 10px 0 10px 0; }
div.body h4 { padding: 10px 0 10px 0; }
div.body h5,
div.body h6 { padding: 10px 0 0 0; }

div.body h1,
div.body h2,
div.body h3 { border-bottom: 1px solid #ddd; }
div.body h4 { border-bottom: 1px solid #e5e5e5; }

div.body h1 { font-size: 230%; }
div.body h2 { font-size: 180%; }
div.body h3 { font-size: 130%; }
div.body h4 { font-size: 110%; }
div.body h5 { font-size: 105%; }
div.body h6 { font-size: 100%; }

a.headerlink {
    color: #c60f0f;
    font-size: 0.8em;
    padding: 0 4px 0 4px;
    text-decoration: none;
}

a.headerlink:hover {
    background-color: #c60f0f;
    color: #fff;
}

div.body ul {
    list-style: disc;
    margin: 1em 0;
    padding-left: 1.3em;
}

div.body ul ul, div.body ol ul {
    margin: .2em 0;
    padding-left: 1.2em;
}

div.body ul li {
    padding: 2px 0;
}

div.body ul.search li {
    padding: 5px 0 5px 20px;
}

div.body ol {
    counter-reset: li;
    margin-left: 0;
    padding-left: 0;
}

div.body ol ol {
    margin: .2em 0;
}

div.body ol > li {
    list-style: none;
    margin: 0 0 0 1.9em;
    padding: 2px 1px;
    position: relative;
}

div.body ol > li:before {
    content: counter(li) ".";
    counter-increment: li;
    top: -2px;
    left: -1.9em;
    width: 1.9em;
    padding: 4px 0;
    position: absolute;
    text-align: left;
}

div.body p,
div.body dd,
div.body li {
    line-height: 1.4em;
}

div.sidebar, div.topic {
    background-color: #f6f7f9;
    border: 1px solid #cdcdd1;
    padding: 0;
    margin: 0 0 1em 1.5em;
}

div.topic {
    margin: 0;
}

div.sidebar p.sidebar-title, div.topic p.topic-title {
    background-color: #cdcdd1;
    padding: 8px;
}

div.sidebar p, div.topic p {
    font-size: 0.9em;
    padding: 10px 20px 0px 20px;
}

div.admonition {
    background-color: #f6f7f9;
    border: 1px solid #cdcdd1;
    padding: 0px 12px 12px 12px;
    font-size: 0.9em;
}

p.admonition-title {
    display: block;
    background-color: #cdcdd1;
    margin: -12px -12px 12px -12px;
    padding: 6px 12px;
}

div.admonition p.admonition-title + p {
    display: inline;
}

div.attention, div.caution, div.seealso {
    background-color: #fef9e9;
    border: 1px solid #fbe091;
}

div.attention p.admonition-title,
div.caution p.admonition-title,
div.seealso p.admonition-title {
    background-color: #fbe091;
}

div.danger, div.error, div.warning {
    border: 1px solid #FEA1A2;
    background-color: #FEE4E4;
}

div.danger p.admonition-title,
div.error p.admonition-title,
div.warning p.admonition-title {
    background-color: #FEA1A2;
}

div.note, div.important, div.hint, div.tip {
    border: 1px solid #daebea;
    background-color: #F7FAFA;
}

div.note p.admonition-title,
div.important p.admonition-title,
div.hint p.admonition-title,
div.tip p.admonition-title {
    background-color: #daebea;
}

div.highlight {
    background-color: #fff;
}

pre {
    background-color: #f6f7f9;
    border: 1px solid #9aa2ab;
    color: #222;
    font-size: 0.75em;
    line-height: 1.5em;
    margin: 1.5em 0 1.5em 0;
    padding: 10px;
}

pre, tt, code {
    font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
}

tt, code, code.xref {
    padding: 2px;
    background-color: #fff;
    border: 1px solid #daebea;
    font-size: 0.75em;
}

tt.descname, code.descname {
    font-size: 0.95em;
}

tt.xref, a tt, code.xref, a code {
    font-weight: normal;
}

dl.class, dl.function {
    margin-bottom: 50px;
}

dl.function > dt,
dl.attribute > dt,
dl.classmethod > dt,
dl.method > dt,
dl.class > dt,
dl.exception > dt {
    background-color: #f5f5f5;
    border-radius: 5px;
    margin: 25px 0 10px 0;
    padding: 1px 10px;
}

dl.function code.descname,
dl.attribute code.descname,
dl.classmethod code.descname,
dl.method code.descname,
dl.class code.descname,
dl.exception code.descname {
    border: none;
}

table.docutils {
    width: 100%;
    font-size: 0.9em;
}

table.docutils.footnote {
    width: auto;
}

table.docutils thead,
table.docutils tfoot {
    background: #f5f5f5;
}

table.docutils thead tr th {
    color: #000;
    font-weight: normal;
    padding: 7px 5px;
    vertical-align: middle;
}

table.docutils tbody tr th,
table.docutils tbody tr td {
    border-bottom: 0;
    border-top: solid 1px #ddd;
    padding: 7px 5px;
    vertical-align: top;
}
table.docutils tbody tr:last-child th,
table.docutils tbody tr:last-child td {
    border-bottom: solid 1px #ddd;
}

table.docutils thead tr td p,
table.docutils tfoot tr td p,
table.docutils tbody tr td p,
table.docutils thead tr td ul,
table.docutils tfoot tr td ul,
table.docutils tbody tr td ul,
table.docutils thead tr td ol,
table.docutils tfoot tr td ol,
table.docutils tbody tr td ol {
    margin: 0 0 .5em;
}
table.docutils thead tr td p.last,
table.docutils tfoot tr td p.last,
table.docutils tbody tr td p.last,
table.docutils thead tr td ul.last,
table.docutils tfoot tr td ul.last,
table.docutils tbody tr td ul.last,
table.docutils thead tr td ol.last,
table.docutils tfoot tr td ol.last,
table.docutils tbody tr td ol.last {
    margin-bottom: 0;
}

code.descname {
    font-size: 0.8em;
}

span.viewcode-link {
    font-size: 0.8em;
    line-height: 1.75;
}

dl em {
    font-size: 0.9em;
}

.viewcode-back {
    font-family: Arial, sans-serif;
}

div.viewcode-block:target {
    background-color: #fef9e9;
    border-top: 1px solid #fbe091;
    border-bottom: 1px solid #fbe091;
}

@media screen and (max-width: 870px) {

    div.document {
        width: auto;
        margin: 0;
    }

    div.documentwrapper {
        float: none;
    }

    div.bodywrapper {
        margin: 0;
    }

    div.body {
        min-height: 0;
        padding: 0 20px 30px 20px;
    }

    div.footer {
        background-color: #333;
        color: #888;
        margin: 0;
        padding: 10px 20px 20px;
        text-align: left;
        width: auto;
    }

    div.footer a {
        color: #bbb;
    }

    div.footer a:hover {
        color: #fff;
    }

    div.sphinxsidebar {
        background-color: #333;
        color: #fff;
        float: none;
        margin: 0;
        padding: 10px 20px;
        width: auto;
    }

    div.sphinxsidebar h3,
    div.sphinxsidebar h4,
    div.sphinxsidebar p,
    div.sphinxsidebar h3 a {
        color: #fff;
    }

    div.sphinxsidebar ul {
        color: #999;
    }

    div.sphinxsidebar a {
        color: #aaa;
    }

    div.sphinxsidebar a:hover {
        color: #fff;
    }

}

{'repo_name': 'TwitchIO/TwitchIO', 'stars': '176', 'repo_language': 'Python', 'file_name': 'config.yml', 'mime_type': 'text/plain', 'hash': 2543609224357269547, 'source_dataset': 'data'}


{include file="$HOME/header.html"}

	<form method="post">

{$L.1101}

				{$L.1100}

					{$L.90103}
					{$L.1113}
					{$L.1114}
					{$L.1106}

				{foreach $list as $v}

					{$v.name}

						{if $v.active==1}{$L.1111}{else}{$L.1110}{/if}

					{$v.ctime}

					{$L.1103}
					{$L.1104}

				{/foreach}

{$page}

	</form>

{include file="$HOME/footer.html"}

{'repo_name': 'gyxuehu/EwoMail', 'stars': '254', 'repo_language': 'PHP', 'file_name': 'iptables', 'mime_type': 'text/plain', 'hash': -910237855384714406, 'source_dataset': 'data'}


// Copyright 2017 The UNIC Project Developers.
//
// See the COPYRIGHT file at the top-level directory of this distribution.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

//! Package information

/// UNIC component version.
pub const PKG_VERSION: &str = env!("CARGO_PKG_VERSION");

/// UNIC component name.
pub const PKG_NAME: &str = env!("CARGO_PKG_NAME");

/// UNIC component description.
pub const PKG_DESCRIPTION: &str = env!("CARGO_PKG_DESCRIPTION");

{'repo_name': 'open-i18n/rust-unic', 'stars': '168', 'repo_language': 'Rust', 'file_name': 'generate-tables.sh', 'mime_type': 'text/x-shellscript', 'hash': -8495058980249531721, 'source_dataset': 'data'}


<?php

namespace League\Plates\RenderTemplate;

use League\Plates;

final class FileSystemRenderTemplate implements Plates\RenderTemplate
{
    private $render_sets;

    public function __construct(array $render_sets) {
        $this->render_sets = $render_sets;
    }

    public function renderTemplate(Plates\Template $template, Plates\RenderTemplate $rt = null) {
        foreach ($this->render_sets as list($match, $render)) {
            if ($match($template)) {
                return $render->renderTemplate($template, $rt ?: $this);
            }
        }

        throw new Plates\Exception\RenderTemplateException('No renderer was available for the template: ' . $template->name);
    }
}

{'repo_name': 'thephpleague/plates', 'stars': '1117', 'repo_language': 'PHP', 'file_name': 'default.html', 'mime_type': 'text/html', 'hash': -3784126664588718167, 'source_dataset': 'data'}


detectron2.layers package
=========================

.. automodule:: detectron2.layers
    :members:
    :undoc-members:
    :show-inheritance:

{'repo_name': 'facebookresearch/detectron2', 'stars': '11613', 'repo_language': 'Python', 'file_name': 'config.yml', 'mime_type': 'text/plain', 'hash': 3812107782330986122, 'source_dataset': 'data'}


/*
 * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.  Oracle designates this
 * particular file as subject to the "Classpath" exception as provided
 * by Oracle in the LICENSE file that accompanied this code.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

// SAXNotRecognizedException.java - unrecognized feature or value.
// http://www.saxproject.org
// Written by David Megginson
// NO WARRANTY!  This class is in the Public Domain.
// $Id: SAXNotRecognizedException.java,v 1.3 2004/11/03 22:55:32 jsuttor Exp $

package org.xml.sax;

/**
 * Exception class for an unrecognized identifier.
 *
 *

 * This module, both source code and documentation, is in the
 * Public Domain, and comes with NO WARRANTY.
 * See http://www.saxproject.org
 * for further information.
 *

 *
 *
An XMLReader will throw this exception when it finds an
 * unrecognized feature or property identifier; SAX applications and
 * extensions may use this class for other, similar purposes.

 *
 * @since 1.4, SAX 2.0
 * @author David Megginson
 * @see org.xml.sax.SAXNotSupportedException
 */
public class SAXNotRecognizedException extends SAXException
{

    /**
     * Default constructor.
     */
    public SAXNotRecognizedException ()
    {
        super();
    }

    /**
     * Construct a new exception with the given message.
     *
     * @param message The text message of the exception.
     */
    public SAXNotRecognizedException (String message)
    {
        super(message);
    }

    // Added serialVersionUID to preserve binary compatibility
    static final long serialVersionUID = 5440506620509557213L;
}

// end of SAXNotRecognizedException.java

{'repo_name': 'corretto/corretto-11', 'stars': '405', 'repo_language': 'Java', 'file_name': 'zBarrierSetC1.hpp', 'mime_type': 'text/x-c++', 'hash': -1292091804011527142, 'source_dataset': 'data'}


<?php echo $gsprache->substitutes;?>

 Home

 <?php echo $gsprache->substitutes;?>

<?php echo $gsprache->add;?>

                <form role="form" action="userpanel.php?w=su&d=ad&id=<?php echo $id;?>&r=su" onsubmit="return confirm('<?php echo $gsprache->sure; ?>');" method="post">

                    <input type="hidden" name="token" value="<?php echo token();?>">
                    <input type="hidden" name="action" value="ad">

                            <?php echo $sprache->active;?>
                            <select class="form-control" id="inputActive" name="active">
                                <option value="Y"><?php echo $gsprache->yes;?></option>
                                <option value="N"><?php echo $gsprache->no;?></option>
                            </select>

                            <?php echo $gsprache->user;?>*
                            <input id="inputCname" type="text" class="form-control" name="loginName" value="" placeholder="<?php echo $gsprache->user;?>" required>

                            <?php echo $sprache->fname;?>
                            <input id="inputFname" type="text" class="form-control" name="name" value="" placeholder="<?php echo $sprache->fname;?>">

                            <?php echo $sprache->vname;?>
                            <input id="inputVname" type="text" class="form-control" name="vname" value="" placeholder="<?php echo $sprache->vname;?>">

                            <?php echo $sprache->wipsw;?>*
                            <input id="inputPassword" type="text" class="form-control" name="security" value="<?php echo $randompass;?>" required>

                        <?php if(count($gs)>0){ ?>

<?php echo $gsprache->gameserver;?>

                        <?php foreach($gs as $k=>$v){ ?>

                                <input id="inputGS-<?php echo $k;?>" type="checkbox" name="gs[]" value="<?php echo $k;?>">
                                <?php echo $v;?>

                        <?php }}?>

                        <?php if(count($wv)>0){ ?>

<?php echo $gsprache->webspace;?>

                        <?php foreach($wv as $k=>$v){ ?>

                                <input id="inputWeb-<?php echo $k;?>" type="checkbox" name="wv[]" value="<?php echo $k;?>">
                                <?php echo $v;?>

                        <?php }}?>

                        <?php if(count($vo)>0){ ?>

<?php echo $gsprache->voiceserver;?>

                        <?php foreach($vo as $k=>$v){ ?>

                                <input id="inputVO-<?php echo $k;?>" type="checkbox" name="vo[]" value="<?php echo $k;?>">
                                <?php echo $v;?>

                        <?php }}?>

                        <?php if(count($vd)>0){ ?>

TS3 DNS

                        <?php foreach($vd as $k=>$v){ ?>

                                <input id="inputVD-<?php echo $k;?>" type="checkbox" name="vd[]" value="<?php echo $k;?>">
                                <?php echo $v;?>

                        <?php }}?>

                        <?php if(count($vs)>0){ ?>

<?php echo $gsprache->virtual;?>

                        <?php foreach($vs as $k=>$v){ ?>

                                <input id="inputVS-<?php echo $k;?>" type="checkbox" name="vs[]" value="<?php echo $k;?>">
                                <?php echo $v;?>

                        <?php }}?>

                        <?php if(count($ro)>0){ ?>

<?php echo $gsprache->dedicated;?>

                        <?php foreach($ro as $k=>$v){ ?>

                                <input id="inputRO-<?php echo $k;?>" type="checkbox" name="ro[]" value="<?php echo $k;?>">
                                <?php echo $v;?>

                        <?php }}?>

                        <?php if(count($db)>0){ ?>

MySQL

                        <?php foreach($db as $k=>$v){ ?>

                                <input id="inputDB-<?php echo $k;?>" type="checkbox" name="db[]" value="<?php echo $k;?>">
                                <?php echo $v;?>

                        <?php }}?>

                        <button class="btn btn-success" id="inputEdit" type="submit"> <?php echo $gsprache->add;?></button>

                </form>

{'repo_name': 'easy-wi/developer', 'stars': '150', 'repo_language': 'PHP', 'file_name': 'Element.php', 'mime_type': 'text/x-php', 'hash': 8371224513156795371, 'source_dataset': 'data'}


<?php
/**
 * Smarty Internal Plugin Compile Continue
 * Compiles the {continue} tag
 *
 * @package    Smarty
 * @subpackage Compiler
 * @author     Uwe Tews
 */

/**
 * Smarty Internal Plugin Compile Continue Class
 *
 * @package    Smarty
 * @subpackage Compiler
 */
class Smarty_Internal_Compile_Continue extends Smarty_Internal_CompileBase
{
    /**
     * Attribute definition: Overwrites base class.
     *
     * @var array
     * @see Smarty_Internal_CompileBase
     */
    public $optional_attributes = array('levels');
    /**
     * Attribute definition: Overwrites base class.
     *
     * @var array
     * @see Smarty_Internal_CompileBase
     */
    public $shorttag_order = array('levels');

    /**
     * Compiles code for the {continue} tag
     *
     * @param  array  $args      array with attributes from parser
     * @param  object $compiler  compiler object
     * @param  array  $parameter array with compilation parameter
     *
     * @return string compiled code
     */
    public function compile($args, $compiler, $parameter)
    {
        static $_is_loopy = array('for' => true, 'foreach' => true, 'while' => true, 'section' => true);
        // check and get attributes
        $_attr = $this->getAttributes($compiler, $args);

        if ($_attr['nocache'] === true) {
            $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno);
        }

        if (isset($_attr['levels'])) {
            if (!is_numeric($_attr['levels'])) {
                $compiler->trigger_template_error('level attribute must be a numeric constant', $compiler->lex->taglineno);
            }
            $_levels = $_attr['levels'];
        } else {
            $_levels = 1;
        }
        $level_count = $_levels;
        $stack_count = count($compiler->_tag_stack) - 1;
        while ($level_count > 0 && $stack_count >= 0) {
            if (isset($_is_loopy[$compiler->_tag_stack[$stack_count][0]])) {
                $level_count --;
            }
            $stack_count --;
        }
        if ($level_count != 0) {
            $compiler->trigger_template_error("cannot continue {$_levels} level(s)", $compiler->lex->taglineno);
        }

        return "<?php continue {$_levels};?>";
    }
}

{'repo_name': 'baoleiji/QilinBaoleiji', 'stars': '1121', 'repo_language': 'C', 'file_name': 'fetch.cc', 'mime_type': 'text/x-c', 'hash': -4665951318709823348, 'source_dataset': 'data'}