text:
package hudson.plugins.scm_sync_configuration.xstream.migration;

import hudson.plugins.scm_sync_configuration.scms.SCM;

import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;

import com.thoughtworks.xstream.converters.UnmarshallingContext;
import com.thoughtworks.xstream.io.HierarchicalStreamReader;

public abstract class AbstractMigrator<TFROM extends ScmSyncConfigurationPOJO, TTO extends ScmSyncConfigurationPOJO> implements ScmSyncConfigurationDataMigrator<TFROM, TTO> {

	public static final String SCM_REPOSITORY_URL_TAG = "scmRepositoryUrl";
	public static final String SCM_TAG = "scm";
	public static final String SCM_CLASS_ATTRIBUTE = "class";
	public static final String SCM_NO_USER_COMMIT_MESSAGE = "noUserCommitMessage";
    public static final String SCM_DISPLAY_STATUS = "displayStatus";
    public static final String SCM_COMMIT_MESSAGE_PATTERN = "commitMessagePattern";
    public static final String SCM_MANUAL_INCLUDES = "manualSynchronizationIncludes";
    public static final String SCM_GIT_BRANCH = "scmGitBranch";

    private static final Logger LOGGER = Logger.getLogger(AbstractMigrator.class.getName());

	public TTO migrate(TFROM pojo){
		TTO migratedPojo = createMigratedPojo();

		migratedPojo.setScmRepositoryUrl( migrateScmRepositoryUrl(pojo.getScmRepositoryUrl()) );
		migratedPojo.setScm( migrateScm(pojo.getScm()) );

		return migratedPojo;
	}

	public TTO readScmSyncConfigurationPOJO(
			HierarchicalStreamReader reader, UnmarshallingContext context) {

		TTO pojo = createMigratedPojo();

		String scmRepositoryUrl = null;
        String scmGitBranch = null;
		String scmClassAttribute = null;
		String scmContent = null;
		boolean noUserCommitMessage = false;
		boolean displayStatus = true;
        String commitMessagePattern = "[message]";
        List<String> manualIncludes = null;

		while(reader.hasMoreChildren()){
			reader.moveDown();
			if(SCM_REPOSITORY_URL_TAG.equals(reader.getNodeName())) {
                scmRepositoryUrl = reader.getValue();
            } else if (SCM_GIT_BRANCH.equals(reader.getNodeName())){
                scmGitBranch = reader.getValue();
			} else if(SCM_NO_USER_COMMIT_MESSAGE.equals(reader.getNodeName())){
				noUserCommitMessage = Boolean.parseBoolean(reader.getValue());
			} else if(SCM_DISPLAY_STATUS.equals(reader.getNodeName())){
				displayStatus = Boolean.parseBoolean(reader.getValue());
			} else if(SCM_TAG.equals(reader.getNodeName())){
				scmClassAttribute = reader.getAttribute(SCM_CLASS_ATTRIBUTE);
				scmContent = reader.getValue();
            } else if(SCM_COMMIT_MESSAGE_PATTERN.equals(reader.getNodeName())){
                commitMessagePattern = reader.getValue();
            } else if(SCM_MANUAL_INCLUDES.equals(reader.getNodeName())){
                manualIncludes = new ArrayList<String>();
                while(reader.hasMoreChildren()){
                    reader.moveDown();
                    manualIncludes.add(reader.getValue());
                    reader.moveUp();
                }
			} else {
				IllegalArgumentException iae = new IllegalArgumentException("Unknown tag : "+reader.getNodeName());
				LOGGER.throwing(this.getClass().getName(), "readScmSyncConfigurationPOJO", iae);
				LOGGER.severe("Unknown tag : "+reader.getNodeName());
				throw iae;
			}
			reader.moveUp();
		}

		pojo.setScm(createSCMFrom(scmClassAttribute, scmContent));
		pojo.setScmRepositoryUrl(scmRepositoryUrl);
        pojo.setScmGitBranch(scmGitBranch);
		pojo.setNoUserCommitMessage(noUserCommitMessage);
		pojo.setDisplayStatus(displayStatus);
        pojo.setCommitMessagePattern(commitMessagePattern);
        pojo.setManualSynchronizationIncludes(manualIncludes);

		return pojo;
	}

	// Overridable
	protected String migrateScmRepositoryUrl(String scmRepositoryUrl){
		if(scmRepositoryUrl == null){
			return null;
		} else {
			return new String(scmRepositoryUrl);
		}
	}

	// Overridable
	protected SCM migrateScm(SCM scm){
		if(scm == null){
			return null;
		} else {
			return SCM.valueOf(scm.getClass().getName());
		}
	}

	protected abstract TTO createMigratedPojo();
	protected abstract SCM createSCMFrom(String clazz, String content);
}


text:
/**
 * @fileoverview Rule to flag block statements that do not use the one true brace style
 * @author Ian Christian Myers
 */

"use strict";

//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------

module.exports = function(context) {
    var style = context.options[0] || "1tbs";

    var OPEN_MESSAGE = "Opening curly brace does not appear on the same line as controlling statement.",
        BODY_MESSAGE = "Statement inside of curly braces should be on next line.",
        CLOSE_MESSAGE = "Closing curly brace does not appear on the same line as the subsequent block.",
        CLOSE_MESSAGE_STROUSTRUP = "Closing curly brace appears on the same line as the subsequent block.";

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * Binds a list of properties to a function that verifies that the opening
     * curly brace is on the same line as its controlling statement of a given
     * node.
     * @param {...string} The properties to check on the node.
     * @returns {Function} A function that will perform the check on a node
     */
    function checkBlock() {
        var blockProperties = arguments;
        return function(node) {
            [].forEach.call(blockProperties, function(blockProp) {
                var block = node[blockProp], previousToken, curlyToken;
                block = node[blockProp];
                if (block && block.type === "BlockStatement") {
                    previousToken = context.getTokenBefore(block);
                    curlyToken = context.getFirstToken(block);

                    if (previousToken.loc.start.line !== curlyToken.loc.start.line) {
                        context.report(node, OPEN_MESSAGE);
                    } else if (block.body.length && curlyToken.loc.start.line === block.body[0].loc.start.line) {
                        context.report(block.body[0], BODY_MESSAGE);
                    }
                }
            });
        };
    }

    /**
     * Enforces the configured brace style on IfStatements
     * @param {ASTNode} node An IfStatement node.
     * @returns {void}
     */
    function checkIfStatement(node) {
        var tokens;

        checkBlock("consequent", "alternate")(node);

        if (node.alternate && node.alternate.type === "BlockStatement") {
            tokens = context.getTokensBefore(node.alternate, 2);
            if (style === "1tbs") {
                if (tokens[0].loc.start.line !== tokens[1].loc.start.line) {
                    context.report(node.alternate, CLOSE_MESSAGE);
                }
            } else if (style === "stroustrup") {
                if (tokens[0].loc.start.line === tokens[1].loc.start.line) {
                    context.report(node.alternate, CLOSE_MESSAGE_STROUSTRUP);
                }
            }
        }
    }

    /**
     * Enforces the configured brace style on TryStatements
     * @param {ASTNode} node A TryStatement node.
     * @returns {void}
     */
    function checkTryStatement(node) {
        var tokens;

        checkBlock("block", "finalizer")(node);

        if (node.finalizer && node.finalizer.type === "BlockStatement") {
            tokens = context.getTokensBefore(node.finalizer, 2);
            if (style === "1tbs") {
                if (tokens[0].loc.start.line !== tokens[1].loc.start.line) {
                    context.report(node.finalizer, CLOSE_MESSAGE);
                }
            } else if (style === "stroustrup") {
                if (tokens[0].loc.start.line === tokens[1].loc.start.line) {
                    context.report(node.finalizer, CLOSE_MESSAGE_STROUSTRUP);
                }
            }
        }
    }

    /**
     * Enforces the configured brace style on CatchClauses
     * @param {ASTNode} node A CatchClause node.
     * @returns {void}
     */
    function checkCatchClause(node) {
        var previousToken = context.getTokenBefore(node),
            firstToken = context.getFirstToken(node);

        checkBlock("body")(node);

        if (node.body && node.body.type === "BlockStatement") {
            if (style === "1tbs") {
                if (previousToken.loc.start.line !== firstToken.loc.start.line) {
                    context.report(node, CLOSE_MESSAGE);
                }
            } else if (style === "stroustrup") {
                if (previousToken.loc.start.line === firstToken.loc.start.line) {
                    context.report(node, CLOSE_MESSAGE_STROUSTRUP);
                }
            }
        }
    }

    /**
     * Enforces the configured brace style on SwitchStatements
     * @param {ASTNode} node A SwitchStatement node.
     * @returns {void}
     */
    function checkSwitchStatement(node) {
        var tokens;
        if (node.cases && node.cases.length) {
            tokens = context.getTokensBefore(node.cases[0], 2);
            if (tokens[0].loc.start.line !== tokens[1].loc.start.line) {
                context.report(node, OPEN_MESSAGE);
            }
        } else {
            tokens = context.getLastTokens(node, 3);
            if (tokens[0].loc.start.line !== tokens[1].loc.start.line) {
                context.report(node, OPEN_MESSAGE);
            }
        }
    }

    //--------------------------------------------------------------------------
    // Public API
    //--------------------------------------------------------------------------

    return {
        "FunctionDeclaration": checkBlock("body"),
        "FunctionExpression": checkBlock("body"),
        "IfStatement": checkIfStatement,
        "TryStatement": checkTryStatement,
        "CatchClause": checkCatchClause,
        "DoWhileStatement": checkBlock("body"),
        "WhileStatement": checkBlock("body"),
        "WithStatement": checkBlock("body"),
        "ForStatement": checkBlock("body"),
        "ForInStatement": checkBlock("body"),
        "SwitchStatement": checkSwitchStatement
    };

};

redpajama_set_name: RedPajamaGithub


text:
<title>PHPExcel classes</title>
<link rel="stylesheet" type="text/css" href="media/style.css">

    PHPExcel_Worksheet

                                                                                [ class tree: PHPExcel_Worksheet ]
		  [ index: PHPExcel_Worksheet ]
		  	    [ all elements ]

Todo List

      Packages:

              PHPExcel

              JAMA

              Math_Stats

              PHPExcel_CachedObjectStorage

              PHPExcel_Calculation

              PHPExcel_Cell

              PHPExcel_Chart

              PHPExcel_Chart_Renderer

              PHPExcel_Reader

              PHPExcel_Reader_Excel5

              PHPExcel_Reader_Excel2007

              PHPExcel_RichText

              PHPExcel_Settings

              PHPExcel_Shared

              PHPExcel_Shared_Escher

              PHPExcel_Shared_OLE

              PHPExcel_Shared_Trend

              PHPExcel_Shared_ZipArchive

              PHPExcel_Style

              PHPExcel_Worksheet

              PHPExcel_Worksheet_Drawing

              PHPExcel_Writer

              PHPExcel_Writer_Excel5

              PHPExcel_Writer_Excel2007

                        Files:

					AutoFilter.php

					BaseDrawing.php

					CellIterator.php

					Column.php

					ColumnDimension.php

					HeaderFooter.php

					HeaderFooterDrawing.php

					MemoryDrawing.php

					PageMargins.php

					PageSetup.php

					Protection.php

					Row.php

					RowDimension.php

					RowIterator.php

					Rule.php

					SheetView.php

					Worksheet.php

            Classes:

		    		PHPExcel_Worksheet

	    		PHPExcel_Worksheet_AutoFilter

	    		PHPExcel_Worksheet_AutoFilter_Column

	    		PHPExcel_Worksheet_AutoFilter_Column_Rule

	    		PHPExcel_Worksheet_BaseDrawing

	    		PHPExcel_Worksheet_CellIterator

	    		PHPExcel_Worksheet_ColumnDimension

	    		PHPExcel_Worksheet_HeaderFooter

	    		PHPExcel_Worksheet_HeaderFooterDrawing

	    		PHPExcel_Worksheet_MemoryDrawing

	    		PHPExcel_Worksheet_PageMargins

	    		PHPExcel_Worksheet_PageSetup

	    		PHPExcel_Worksheet_Protection

	    		PHPExcel_Worksheet_Row

	    		PHPExcel_Worksheet_RowDimension

	    		PHPExcel_Worksheet_RowIterator

	    		PHPExcel_Worksheet_SheetView

PHPExcel classes

Welcome to PHPExcel_Worksheet!

This documentation was generated by phpDocumentor v1.4.4

		    Documentation generated on Fri, 12 Oct 2012 00:15:08 +0200 by phpDocumentor 1.4.4


text:
module Deliver
  # upload description, rating, etc.
  class UploadMetadata
    # All the localised values attached to the version
    LOCALISED_VERSION_VALUES = [:description, :keywords, :release_notes, :support_url, :marketing_url, :promotional_text]

    # Everything attached to the version but not being localised
    NON_LOCALISED_VERSION_VALUES = [:copyright]

    # Localised app details values
    LOCALISED_APP_VALUES = [:name, :subtitle, :privacy_url]

    # Non localized app details values
    NON_LOCALISED_APP_VALUES = [:primary_category, :secondary_category,
                                :primary_first_sub_category, :primary_second_sub_category,
                                :secondary_first_sub_category, :secondary_second_sub_category]

    # Trade Representative Contact Information values
    TRADE_REPRESENTATIVE_CONTACT_INFORMATION_VALUES = {
        trade_representative_trade_name: :trade_name,
        trade_representative_first_name: :first_name,
        trade_representative_last_name: :last_name,
        trade_representative_address_line_1: :address_line1,
        trade_representative_address_line_2: :address_line2,
        trade_representative_address_line_3: :address_line3,
        trade_representative_city_name: :city_name,
        trade_representative_state: :state,
        trade_representative_country: :country,
        trade_representative_postal_code: :postal_code,
        trade_representative_phone_number: :phone_number,
        trade_representative_email: :email_address,
        trade_representative_is_displayed_on_app_store: :is_displayed_on_app_store
    }

    # Review information values
    REVIEW_INFORMATION_VALUES = {
      review_first_name: :first_name,
      review_last_name: :last_name,
      review_phone_number: :phone_number,
      review_email: :email_address,
      review_demo_user: :demo_user,
      review_demo_password: :demo_password,
      review_notes: :notes
    }

    # Localized app details values, that are editable in live state
    LOCALISED_LIVE_VALUES = [:description, :release_notes, :support_url, :marketing_url]

    # Non localized app details values, that are editable in live state
    NON_LOCALISED_LIVE_VALUES = [:privacy_url]

    # Directory name it contains trade representative contact information
    TRADE_REPRESENTATIVE_CONTACT_INFORMATION_DIR = "trade_representative_contact_information"

    # Directory name it contains review information
    REVIEW_INFORMATION_DIR = "review_information"

    # Make sure to call `load_from_filesystem` before calling upload
    def upload(options)
      return if options[:skip_metadata]
      # it is not possible to create new languages, because
      # :keywords is not write-able on published versions
      # therefore skip it.
      verify_available_languages!(options) unless options[:edit_live]

      app = options[:app]

      details = app.details
      if options[:edit_live]
        # not all values are editable when using live_version
        v = app.live_version(platform: options[:platform])
        localised_options = LOCALISED_LIVE_VALUES
        non_localised_options = NON_LOCALISED_LIVE_VALUES

        if v.nil?
          UI.message("Couldn't find live version, editing the current version on iTunes Connect instead")
          v = app.edit_version(platform: options[:platform])
          # we don't want to update the localised_options and non_localised_options
          # as we also check for `options[:edit_live]` at other areas in the code
          # by not touching those 2 variables, deliver is more consistent with what the option says
          # in the documentation
        end
      else
        v = app.edit_version(platform: options[:platform])
        localised_options = (LOCALISED_VERSION_VALUES + LOCALISED_APP_VALUES)
        non_localised_options = (NON_LOCALISED_VERSION_VALUES + NON_LOCALISED_APP_VALUES)
      end

      localised_options.each do |key|
        current = options[key]
        next unless current

        unless current.kind_of?(Hash)
          UI.error("Error with provided '#{key}'. Must be a hash, the key being the language.")
          next
        end

        current.each do |language, value|
          next unless value.to_s.length > 0
          strip_value = value.to_s.strip
          v.send(key)[language] = strip_value if LOCALISED_VERSION_VALUES.include?(key)
          details.send(key)[language] = strip_value if LOCALISED_APP_VALUES.include?(key)
        end
      end

      non_localised_options.each do |key|
        current = options[key].to_s.strip
        next unless current.to_s.length > 0
        v.send("#{key}=", current) if NON_LOCALISED_VERSION_VALUES.include?(key)
        details.send("#{key}=", current) if NON_LOCALISED_APP_VALUES.include?(key)
      end

      v.release_on_approval = options[:automatic_release]

      set_trade_representative_contact_information(v, options)
      set_review_information(v, options)
      set_app_rating(v, options)

      UI.message("Uploading metadata to iTunes Connect")
      v.save!
      begin
        details.save!
        UI.success("Successfully uploaded set of metadata to iTunes Connect")
      rescue Spaceship::ITunesConnectError => e
        # This makes sure that we log invalid app names as user errors
        # If another string needs to be checked here we should
        # figure out a more generic way to handle these cases.
        if e.message.include?('App Name cannot be longer than 50 characters') || e.message.include?('The app name you entered is already being used')
          UI.user_error!(e.message)
        else
          raise e
        end
      end
    end

    # If the user is using the 'default' language, then assign values where they are needed
    def assign_defaults(options)
      # Build a complete list of the required languages
      enabled_languages = []

      # Get all languages used in existing settings
      (LOCALISED_VERSION_VALUES + LOCALISED_APP_VALUES).each do |key|
        current = options[key]
        next unless current && current.kind_of?(Hash)
        current.each do |language, value|
          enabled_languages << language unless enabled_languages.include?(language)
        end
      end

      # Check folder list (an empty folder signifies a language is required)
      Loader.language_folders(options[:metadata_path]).each do |lng_folder|
        next unless File.directory?(lng_folder) # We don't want to read txt as they are non localised

        language = File.basename(lng_folder)
        enabled_languages << language unless enabled_languages.include?(language)
      end

      return unless enabled_languages.include?("default")
      UI.message("Detected languages: " + enabled_languages.to_s)

      (LOCALISED_VERSION_VALUES + LOCALISED_APP_VALUES).each do |key|
        current = options[key]
        next unless current && current.kind_of?(Hash)

        default = current["default"]
        next if default.nil?

        enabled_languages.each do |language|
          value = current[language]
          next unless value.nil?

          current[language] = default
        end
        current.delete("default")
      end
    end

    # Makes sure all languages we need are actually created
    def verify_available_languages!(options)
      return if options[:skip_metadata]

      # Collect all languages we need
      # We only care about languages from user provided values
      # as the other languages are on iTC already anyway
      v = options[:app].edit_version
      UI.user_error!("Could not find a version to edit for app '#{options[:app].name}', the app metadata is read-only currently") unless v

      enabled_languages = []
      LOCALISED_VERSION_VALUES.each do |key|
        current = options[key]
        next unless current && current.kind_of?(Hash)
        current.each do |language, value|
          enabled_languages << language unless enabled_languages.include?(language)
        end
      end

      if enabled_languages.count > 0
        v.create_languages(enabled_languages)
        lng_text = "language"
        lng_text += "s" if enabled_languages.count != 1
        UI.message("Activating #{lng_text} #{enabled_languages.join(', ')}...")
        v.save!
      end
      true
    end

    # Loads the metadata files and stores them into the options object
    def load_from_filesystem(options)
      return if options[:skip_metadata]

      # Load localised data
      Loader.language_folders(options[:metadata_path]).each do |lng_folder|
        language = File.basename(lng_folder)
        (LOCALISED_VERSION_VALUES + LOCALISED_APP_VALUES).each do |key|
          path = File.join(lng_folder, "#{key}.txt")
          next unless File.exist?(path)

          UI.message("Loading '#{path}'...")
          options[key] ||= {}
          options[key][language] ||= File.read(path)
        end
      end

      # Load non localised data
      (NON_LOCALISED_VERSION_VALUES + NON_LOCALISED_APP_VALUES).each do |key|
        path = File.join(options[:metadata_path], "#{key}.txt")
        next unless File.exist?(path)

        UI.message("Loading '#{path}'...")
        options[key] ||= File.read(path)
      end

      # Load trade representative contact information
      options[:trade_representative_contact_information] ||= {}
      TRADE_REPRESENTATIVE_CONTACT_INFORMATION_VALUES.values.each do |option_name|
        path = File.join(options[:metadata_path], TRADE_REPRESENTATIVE_CONTACT_INFORMATION_DIR, "#{option_name}.txt")
        next unless File.exist?(path)
        next if options[:trade_representative_contact_information][option_name].to_s.length > 0

        UI.message("Loading '#{path}'...")
        options[:trade_representative_contact_information][option_name] ||= File.read(path)
      end

      # Load review information
      options[:app_review_information] ||= {}
      REVIEW_INFORMATION_VALUES.values.each do |option_name|
        path = File.join(options[:metadata_path], REVIEW_INFORMATION_DIR, "#{option_name}.txt")
        next unless File.exist?(path)
        next if options[:app_review_information][option_name].to_s.length > 0

        UI.message("Loading '#{path}'...")
        options[:app_review_information][option_name] ||= File.read(path)
      end
    end

    private

    def set_trade_representative_contact_information(v, options)
      return unless options[:trade_representative_contact_information]
      info = options[:trade_representative_contact_information]
      UI.user_error!("`trade_representative_contact_information` must be a hash", show_github_issues: true) unless info.kind_of?(Hash)

      TRADE_REPRESENTATIVE_CONTACT_INFORMATION_VALUES.each do |key, option_name|
        v.send("#{key}=", info[option_name].to_s.chomp) if info[option_name]
      end
    end

    def set_review_information(v, options)
      return unless options[:app_review_information]
      info = options[:app_review_information]
      UI.user_error!("`app_review_information` must be a hash", show_github_issues: true) unless info.kind_of?(Hash)

      REVIEW_INFORMATION_VALUES.each do |key, option_name|
        v.send("#{key}=", info[option_name]) if info[option_name]
      end
      v.review_user_needed = (v.review_demo_user.to_s.chomp + v.review_demo_password.to_s.chomp).length > 0
    end

    def set_app_rating(v, options)
      return unless options[:app_rating_config_path]

      require 'json'
      begin
        json = JSON.parse(File.read(options[:app_rating_config_path]))
      rescue => ex
        UI.error(ex.to_s)
        UI.user_error!("Error parsing JSON file at path '#{options[:app_rating_config_path]}'")
      end
      UI.message("Setting the app's age rating...")
      v.update_rating(json)
    end
  end
end


text:
/**
 * @preserve
 * Project: Bootstrap Hover Dropdown
 * Author: Cameron Spear
 * Version: v2.0.11
 * Contributors: Mattia Larentis
 * Dependencies: Bootstrap's Dropdown plugin, jQuery
 * Description: A simple plugin to enable Bootstrap dropdowns to active on hover and provide a nice user experience.
 * License: MIT
 * Homepage: http://cameronspear.com/blog/bootstrap-dropdown-on-hover-plugin/
 * EDITED BY PLANETSHINE
 *
 */
;(function ($, window, undefined, open_timeout) {
    // outside the scope of the jQuery plugin to
    // keep track of all dropdowns
    var $allDropdowns = $();

    // if instantlyCloseOthers is true, then it will instantly
    // shut other nav items when a new one is hovered over
    $.fn.dropdownHover = function (options) {
        // don't do anything if touch is supported
        // (plugin causes some issues on mobile)
        if('ontouchstart' in document) return this; // don't want to affect chaining

        // the element we really care about
        // is the dropdown-toggle's parent
        $allDropdowns = $allDropdowns.add(this.parent());

        return this.each(function () {
            var $this = $(this),
                $parent = $this.parent(),
                defaults = {
                    delay: 40,
                    instantlyCloseOthers: true
                },
                data = {
                    delay: $(this).data('delay'),
                    instantlyCloseOthers: $(this).data('close-others')
                },
                showEvent   = 'show.bs.dropdown',
                hideEvent   = 'hide.bs.dropdown',
                // shownEvent  = 'shown.bs.dropdown',
                // hiddenEvent = 'hidden.bs.dropdown',
                settings = $.extend(true, {}, defaults, options, data),
                timeout;

            $parent.hover(function (event) {

                // so a neighbor can't open the dropdown + Goliath specific hack
                if(!$parent.hasClass('open') && !($this.is(event.target) || jQuery(event.target).prop("tagName") === "S" )) {
                    // stop this event, stop executing any code
                    // in this callback but continue to propagate
                    return true;
                }

                /* Hack to also prevent menu opening immidiately */
                window.clearTimeout(open_timeout);

                open_timeout = window.setTimeout(function(){
                    openDropdown(event);
                }, 80);

            }, function () {
                window.clearTimeout(open_timeout);
                timeout = window.setTimeout(function () {
                    $parent.removeClass('open');
                    $this.trigger(hideEvent);
                }, settings.delay);
            });

            // this helps with button groups!
            /*
            $this.hover(function (event) {
                // this helps prevent a double event from firing.
                // see https://github.com/CWSpear/bootstrap-hover-dropdown/issues/55
                if(!$parent.hasClass('open') && !$parent.is(event.target)) {
                    // stop this event, stop executing any code
                    // in this callback but continue to propagate
                    return true;
                }

                openDropdown(event);
            }); */

            // handle submenus
            $parent.find('.dropdown-submenu').each(function (){
                var $this = $(this);
                var subTimeout;
                $this.hover(function () {
                    window.clearTimeout(subTimeout);
                    $this.children('.dropdown-menu').show();
                    // always close submenu siblings instantly
                    $this.siblings().children('.dropdown-menu').hide();
                }, function () {
                    var $submenu = $this.children('.dropdown-menu');
                    subTimeout = window.setTimeout(function () {
                        $submenu.hide();
                    }, settings.delay);
                });
            });

            function openDropdown(event) {
                $allDropdowns.find(':focus').blur();

                if(settings.instantlyCloseOthers === true)
                    $allDropdowns.removeClass('open');

                window.clearTimeout(timeout);
                $parent.addClass('open');

                $this.trigger(showEvent);
            }

        });
    };

    /* $(document).ready(function () {
        // apply dropdownHover to all elements with the data-hover="dropdown" attribute
        $('[data-hover="dropdown"]').dropdownHover();
    }); */
})(jQuery, this);


text:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:background="@color/dark_gray"
  tools:context=".LifesaverActivity" >

  <TextView
    android:id="@+id/current_subway"
    android:layout_width="360dp"
    android:layout_height="360dp"
    android:layout_centerHorizontal="true"
    android:layout_centerVertical="true"
    android:gravity="center_horizontal|center_vertical"
    android:shadowColor="@color/black"
    android:shadowDy="5"
    android:shadowRadius="10"
    android:textColor="@color/white"
    android:textSize="200sp"
    android:textStyle="bold"
    android:typeface="normal" />

</RelativeLayout>


text:
 * [rev:84085] Allow different user groups to have different HtmlEditorConfigs
 * [rev:83631] Allow file size/extension limits to apply to the admin user as

###  API Change

 * [rev:91610] BasicAuth::requireLogin() no longer has an option to automatically log you in.  You can call logIn() on the object returned, instead. (from r91603)
 * [rev:91130] move SubscribeSumission.ss from cms module to newsletter module, cos it is only used by newsletter module.
 * [rev:91034] Added SapphireTest::logInWithPermission() (merged from r89209)
 * [rev:88176] Added no-arg option to increase_memory_limit_to() (from r80241)
 * [rev:84594] Template codes can no longer be used in emails except when using .ss files.
 * [rev:84157] Make Object::uninherited_static() have a separate execution path to Object::get_static(), for more reliable operation. The intention is that for any given static, you either use Object::get_static() or you use Object::uninherited_static() - not both. (from r84151, r84155, r84156)

###  Bugfixes

 * [rev:93483] fix for multiple EmailField validation on one form. Merged via r78565
 * [rev:91660] Made use of new BasicAuth::protect_entire_site() consistent. (from r91658)
 * [rev:91611] Don't enable site-wide protection by default (from r91609)
 * [rev:89612] Added rewriteHashlinks = 'php' option to SSViewer so that static publisher can handle internal hashlinks properly.
 * [rev:89611] Added rewriteHashlinks = 'php' option to SSViewer so that static publisher can handle internal hashlinks properly.
 * [rev:88281] Ensure ASSETS_PATH is respected
 * [rev:87869] Pass locale rather than language to spellchecker_languages
 * [rev:87867] Always choosing translatable default language in CMSMain->init() for TinyMCE spell checking. Always setting ->Locale in order to have it available for the spell checking (from r81716)
 * [rev:87458] #4579: Translatable's call to new LanguageDropdownField() broked (from r87456)
 * [rev:86573] fixed typo in pagecomment which meant commenter url was not saved. BUGFIX: updated protector to use new format
 * [rev:86325] Fixed Links to Moderate Comments from the CMS and front end. MINOR: removed complextable functions which no longer get called, moved logic to the PageComment Class
 * [rev:86202] was being passed to foreach without a check to see if it's an array or not.
 * [rev:85779] Fixed Member::sendInfo() assumptions that broke with an API change in r84594
 * [rev:85632] findByTagAndAttribute is unintentionally expanding any php  found in the href/src components its regex extracts. Changed double quotes to single quotes to fix this.
 * [rev:84957] Tied rollback action to edit, rather than publish, permission, since it only involves editing the draft site.
 * [rev:84380] Fixing the comment's author website url being converted to lowercase: now case is not affected.
 * [rev:84332] Added required javascript files (behaviour, prototype, prototype_improvements) to the Field() method of TreeDropdownField.php
 * [rev:84320] Added required javascript files (behaviour, prototype, prototype_improvements) to the Field() method of TreeSelectorField.php
 * [rev:83587] Object subclasses with a constructor that didn't already will now call parent to respect inheritance
 * [rev:83586] CMSMenuItem constructor now calls parent to respect inheritance
 * [rev:83579] Fixed FilesystemPublisher::__construct() not calling parent::__construct() and breaking DataObjectDecorator::load_extra_statics()


text:
class ScreenAlignedQuad
{
public:

	static void Render();

private:

	ScreenAlignedQuad();
	~ScreenAlignedQuad() {}

	VertexArray vertexArray;

};

class SkyboxCube
{
public:

	static void Render();

private:

	SkyboxCube();
	~SkyboxCube() {}

	VertexArray vertexArray;

};

class Sphere
{
public:

	static void Render();

private:

	Sphere();
	~Sphere() {}

	VertexArray vertexArray;
	size_t indexCount;

};


text:
#ifndef __GDK_PIXBUF_BUFFER_QUEUE_H__
#define __GDK_PIXBUF_BUFFER_QUEUE_H__

#include <glib.h>

G_BEGIN_DECLS

typedef struct _GdkPixbufBufferQueue GdkPixbufBufferQueue;

GdkPixbufBufferQueue *  gdk_pixbuf_buffer_queue_new             (void);

GdkPixbufBufferQueue *  gdk_pixbuf_buffer_queue_ref             (GdkPixbufBufferQueue   *queue);
void                    gdk_pixbuf_buffer_queue_unref           (GdkPixbufBufferQueue   *queue);

gsize                   gdk_pixbuf_buffer_queue_get_size        (GdkPixbufBufferQueue   *queue);
gsize                   gdk_pixbuf_buffer_queue_get_offset      (GdkPixbufBufferQueue   *queue);

void                    gdk_pixbuf_buffer_queue_flush           (GdkPixbufBufferQueue   *queue,
                                                                 gsize                   n_bytes);
void                    gdk_pixbuf_buffer_queue_clear           (GdkPixbufBufferQueue   *queue);
void                    gdk_pixbuf_buffer_queue_push            (GdkPixbufBufferQueue   *queue,
                                                                 GBytes                 *buffer);
GBytes *                gdk_pixbuf_buffer_queue_pull            (GdkPixbufBufferQueue   *queue,
                                                                 gsize                   length);
GBytes *                gdk_pixbuf_buffer_queue_pull_buffer     (GdkPixbufBufferQueue   *queue);
GBytes *                gdk_pixbuf_buffer_queue_peek            (GdkPixbufBufferQueue   *queue,
                                                                 gsize                   length);
GBytes *                gdk_pixbuf_buffer_queue_peek_buffer     (GdkPixbufBufferQueue   *queue);

G_END_DECLS
#endif


text:
The organization of the sample scripts is pretty arbitrary; one day they might
be moved out of the repository.

Scripts whose name start with `x-` are not supposed to compile.


text:
require './lib/random_incidents/work_times.rb'

module RandomIncidents
  module RandomDelay
    include WorkTimes

    def seconds_from_now_until_time_in(range)
      random_time_within_range = rand(range)
      random_time_within_range.minus_without_coercion(Time.now).floor
    end

    def can_delay_for_today?
      is_today_a_weekday? && within_todays_work_hours?
    end

    private

    def is_today_a_weekday?
      WEEKEND_DAY_NAMES.exclude? Date.today.strftime('%^A')
    end

    def within_todays_work_hours?
      Time.now < (Date.today + END_WORK_DAY)
    end

    extend self
  end
end


text:
import GroupslistModule from './groupslist'
import GroupslistController from './groupslist.controller';
import GroupslistComponent from './groupslist.component';
import GroupslistTemplate from './groupslist.html';

describe('Groupslist', () => {
	let $rootScope, makeController;

	beforeEach(window.module(GroupslistModule));
	beforeEach(inject((_$rootScope_) => {
		$rootScope = _$rootScope_;
		makeController = () => {
			return new GroupslistController();
		};
	}));

	describe('Module', () => {
		// top-level specs: i.e., routes, injection, naming
	});

	describe('Controller', () => {
		// controller specs
		it('has a name property [REMOVE]', () => { // erase if removing this.name from the controller
			let controller = makeController();
			expect(controller).to.have.property('name');
		});
	});

	describe('Template', () => {
		// template specs
		// tip: use regex to ensure correct bindings are used e.g., {{  }}
		it('has name in template [REMOVE]', () => {
			expect(GroupslistTemplate).to.match(/{{\s?\$ctrl\.name\s?}}/g);
		});
	});

	describe('Component', () => {
			// component/directive specs
			let component = GroupslistComponent;

			it('includes the intended template',() => {
				expect(component.template).to.equal(GroupslistTemplate);
			});

			it('invokes the right controller', () => {
				expect(component.controller).to.equal(GroupslistController);
			});
	});
});


text:
module Chewy
  class Index
    # Module provides per-index actions, such as deletion,
    # creation and existance check.
    #
    module Actions
      extend ActiveSupport::Concern

      module ClassMethods
        # Checks index existance. Returns true or false
        #
        #   UsersIndex.exist? #=> true
        #
        def exists?
          client.indices.exists(index: index_name)
        end

        # Creates index and applies mappings and settings.
        # Returns false in case of unsuccessful creation.
        #
        #   UsersIndex.create # creates index named `users`
        #
        # Index name suffix might be passed optionally. In this case,
        # method creates index with suffix and makes unsuffixed alias
        # for it.
        #
        #   UsersIndex.create '01-2013' # creates index `uses_01-2013` and alias `users` for it
        #   UsersIndex.create '01-2013', alias: false # creates index `uses_01-2013` only and no alias
        #
        # Suffixed index names might be used for zero-downtime mapping change, for example.
        # Description: (http://www.elasticsearch.org/blog/changing-mapping-with-zero-downtime/).
        #
        def create *args
          create! *args
        rescue Elasticsearch::Transport::Transport::Errors::BadRequest
          false
        end

        # Creates index and applies mappings and settings.
        # Raises elasticsearch-ruby transport error in case of
        # unsuccessfull creation.
        #
        #   UsersIndex.create! # creates index named `users`
        #
        # Index name suffix might be passed optionally. In this case,
        # method creates index with suffix and makes unsuffixed alias
        # for it.
        #
        #   UsersIndex.create! '01-2014' # creates index `users_01-2014` and alias `users` for it
        #   UsersIndex.create! '01-2014', alias: false # creates index `users_01-2014` only and no alias
        #
        # Suffixed index names might be used for zero-downtime mapping change, for example.
        # Description: (http://www.elasticsearch.org/blog/changing-mapping-with-zero-downtime/).
        #
        def create! *args
          options = args.extract_options!.reverse_merge!(alias: true)
          name = build_index_name(suffix: args.first)

          if Chewy::Runtime.version >= 1.1
            body = index_params
            body.merge!(aliases: {index_name => {}}) if options[:alias] && name != index_name
            result = client.indices.create(index: name, body: body)
          else
            result = client.indices.create(index: name, body: index_params)
            result &&= client.indices.put_alias(index: name, name: index_name) if options[:alias] && name != index_name
          end

          Chewy.wait_for_status if result
          result
        end

        # Deletes ES index. Returns false in case of error.
        #
        #   UsersIndex.delete # deletes `users` index
        #
        # Supports index suffix passed as the first argument
        #
        #   UsersIndex.delete '01-2014' # deletes `users_01-2014` index
        #
        def delete suffix = nil
          delete! suffix
        rescue Elasticsearch::Transport::Transport::Errors::NotFound
          false
        end

        # Deletes ES index. Raises elasticsearch-ruby transport error
        # in case of error.
        #
        #   UsersIndex.delete # deletes `users` index
        #
        # Supports index suffix passed as the first argument
        #
        #   UsersIndex.delete '01-2014' # deletes `users_01-2014` index
        #
        def delete! suffix = nil
          result = client.indices.delete index: build_index_name(suffix: suffix)
          Chewy.wait_for_status if result
          result
        end

        # Deletes and recreates index. Supports suffixes.
        # Returns result of index creation.
        #
        #   UsersIndex.purge # deletes and creates `users` index
        #   UsersIndex.purge '01-2014' # deletes `users` and `users_01-2014` indexes, creates `users_01-2014`
        #
        def purge suffix = nil
          delete if suffix.present?
          delete suffix
          create suffix
        end

        # Deletes and recreates index. Supports suffixes.
        # Returns result of index creation. Raises error in case
        # of unsuccessfull creation
        #
        #   UsersIndex.purge! # deletes and creates `users` index
        #   UsersIndex.purge! '01-2014' # deletes `users` and `users_01-2014` indexes, creates `users_01-2014`
        #
        def purge! suffix = nil
          begin
            delete! if suffix.present? && exists?
            delete! suffix
          rescue Elasticsearch::Transport::Transport::Errors::NotFound
          end
          create! suffix
        end

        # Perform import operation for every defined type
        #
        #   UsersIndex.import                           # imports default data for every index type
        #   UsersIndex.import user: User.active         # imports specified objects for user type and default data for other types
        #   UsersIndex.import refresh: false            # to disable index refreshing after import
        #   UsersIndex.import suffix: Time.now.to_i     # imports data to index with specified suffix if such is exists
        #   UsersIndex.import batch_size: 300           # import batch size
        #
        # See [import.rb](lib/chewy/type/import.rb) for more details.
        #
        [:import, :import!].each do |method|
          class_eval <<-METHOD, __FILE__, __LINE__ + 1
            def #{method} options = {}
              objects = options.reject { |k, v| !type_names.map(&:to_sym).include?(k) }
              types.map do |type|
                args = [objects[type.type_name.to_sym], options.dup].reject(&:blank?)
                type.#{method} *args
              end.all?
            end
          METHOD
        end

        # Deletes, creates and imports data to the index.
        # Returns import result
        #
        #   UsersIndex.reset!
        #
        # If index name suffix passed as the first argument - performs
        # zero-downtime index resetting (described here:
        # http://www.elasticsearch.org/blog/changing-mapping-with-zero-downtime/).
        #
        #   UsersIndex.reset! Time.now.to_i
        #
        def reset! suffix = nil
          if suffix.present? && (indexes = self.indexes).any?
            create! suffix, alias: false
            result = import suffix: suffix
            client.indices.update_aliases body: {actions: [
              *indexes.map do |index|
                {remove: {index: index, alias: index_name}}
              end,
              {add: {index: build_index_name(suffix: suffix), alias: index_name}}
            ]}
            client.indices.delete index: indexes if indexes.any?
            result
          else
            purge! suffix
            import
          end
        end
      end
    end
  end
end


text:
#include <linux/sched.h>
#include <asm/suspend.h>
#include <asm/system.h>
#include <asm/current.h>
#include <asm/mmu_context.h>

void save_processor_state(void)
{
	/*
	 * flush out all the special registers so we don't need
	 * to save them in the snapshot
	 */
	flush_fp_to_thread(current);
	flush_altivec_to_thread(current);
	flush_spe_to_thread(current);

#ifdef CONFIG_PPC64
	hard_irq_disable();
#endif

}

void restore_processor_state(void)
{
#ifdef CONFIG_PPC32
	switch_mmu_context(NULL, current->active_mm);
#endif
}


text:
package aip0162

import (
	"github.com/googleapis/api-linter/lint"
	"github.com/googleapis/api-linter/rules/internal/utils"
	"github.com/jhump/protoreflect/desc"
)

var rollbackRequestRevisionIDBehavior = &lint.FieldRule{
	Name: lint.NewRuleName(162, "rollback-request-revision-id-behavior"),
	OnlyIf: func(f *desc.FieldDescriptor) bool {
		return isRollbackRequestMessage(f.GetOwner()) && f.GetName() == "revision_id"
	},
	LintField: utils.LintRequiredField,
}


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Xanthoxalis unduavensis Rusby

### Remarks
null


text:
package evaluation;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.StringWriter;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import org.apache.commons.cli.BasicParser;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.OptionBuilder;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;

import util.CleanTopicWords;

public class EvaluateAndFilterClusters {

	/*
	TODO add methods to evaluate clusters quality and filter
	 * In this class, clusters are evaluated and bad ones are removed from the set of clusters
	 * Result files from metrics computation and post processing, hypernyms research and IsA relationships research
	 * are merged into one file
	 */

	@SuppressWarnings({ "deprecation", "static-access" })
	public static void main( String[] args){

		CommandLineParser clParser = new BasicParser();
		Options options = new Options();
		options.addOption(OptionBuilder.withArgName("file").hasArg()
				.withDescription("file with topics")
				.isRequired()
				.create("clusters"));
		options.addOption(OptionBuilder.withArgName("file").hasArg()
				.withDescription("file with hypernyms")
				.isRequired()
				.create("hyps"));
		options.addOption(OptionBuilder.withArgName("file").hasArg()
				.withDescription("file with IsA relationships")
				.isRequired()
				.create("isas"));

		options.addOption(OptionBuilder.withArgName("file").hasArg()
				.withDescription("name of output file, default = input clusters file +\"Processed\"")
				.create("out"));
		options.addOption(OptionBuilder.withArgName("integer").hasArg()
				.withDescription("max. size of each cluster")
				.create("maxSize"));
		options.addOption(OptionBuilder.withArgName("integer").hasArg()
				.withDescription("min. size of each cluster")
				.create("minSize"));
		options.addOption(OptionBuilder.withArgName("double").hasArg().withDescription("min. score").create("minScore"));

		CommandLine cl = null;
		boolean success = false;
		try {
			cl = clParser.parse(options, args);
			success = true;
		} catch (ParseException e) {
			System.out.println(e.getMessage());
		}
		if (!success) {
			HelpFormatter formatter = new HelpFormatter();
			formatter.printHelp("java -jar processClusters.jar", options, true);
			System.exit(1);
		}
		String clustersFile = cl.getOptionValue("clusters");
		String hypsFile = cl.getOptionValue("hyps");
		String isasFile = cl.getOptionValue("isas");
		String outputFile = cl.hasOption("out") ? cl.getOptionValue("out") :
			clustersFile.split("/")[clustersFile.split("/").length-1].substring(0, clustersFile.split("/")[clustersFile.split("/").length-1].length()-4)+"Processed.txt";
		double minScore = cl.hasOption("minScore") ? Double.parseDouble(cl.getOptionValue("minScore")) : 0.0;
		int maxSize = cl.hasOption("maxSize") ? Integer.parseInt(cl.getOptionValue("maxSize")) : Integer.MAX_VALUE;
		int minSize = cl.hasOption("minSize") ? Integer.parseInt(cl.getOptionValue("minSize")) : 3;

		try {
			processClusters(clustersFile, hypsFile, isasFile, minScore, minSize, maxSize, outputFile);
		} catch (IOException e) {
			e.printStackTrace();
		}

	}

	static class HypernymsAndMetrics{
		private Set<String> hypernyms;
		private Map<String,Integer> mapHypCount;
		private Double avDepth;
		private Double similarity;

		public HypernymsAndMetrics(Set<String> hypernyms,
				Map<String, Integer> mapHypCount, Double avDepth, Double similarity) {
			super();
			this.hypernyms = hypernyms;
			this.mapHypCount = mapHypCount;
			this.avDepth = avDepth;
			this.similarity = similarity;
		}
		public Set<String> getHypernyms() {
			return hypernyms;
		}
		public void setHypernyms(Set<String> hypernyms) {
			this.hypernyms = hypernyms;
		}
		public Map<String, Integer> getMapHypCount() {
			return mapHypCount;
		}
		public void setMapHypCount(Map<String, Integer> mapHypCount) {
			this.mapHypCount = mapHypCount;
		}
		public Double getAvDepth() {
			return avDepth;
		}
		public void setAvDepth(Double avDepth) {
			this.avDepth = avDepth;
		}
		public Double getSimilarity() {
			return similarity;
		}
		public void setSimilarity(Double similarity) {
			this.similarity = similarity;
		}

	}

	private static void processClusters(String nodesFile, String hypernymsFile,
			String isasFile, double minScore, int minSize, int maxSize, String outputFile) throws IOException {

		BufferedReader nodesBR = new BufferedReader(new FileReader(nodesFile));
		BufferedReader hypernymsBR = new BufferedReader(new FileReader(hypernymsFile));
		BufferedReader isasBR = new BufferedReader(new FileReader(isasFile));

		String nodesLine;
		String hypernymsLine;
		String isasLine;
		FileWriter fw = new FileWriter (new File(outputFile));

		Map<Integer,HypernymsAndMetrics> mapHypernyms = new HashMap<Integer,HypernymsAndMetrics>();
		while ((hypernymsLine = hypernymsBR.readLine()) != null){
			mapHypernyms.put(Integer.valueOf(hypernymsLine.split("\t")[0]), createHypernymsAndMetrics(hypernymsLine));
		}

		Map<Integer,String> mapIsas = new HashMap<Integer,String>();
		while ((isasLine = isasBR.readLine()) != null){
			//TODO rechange 			mapIsas.put(Integer.valueOf(isasLine.split("\t")[0]), isasLine.split("\t")[2]);
			mapIsas.put(Integer.valueOf(isasLine.split("\t")[0]), isasLine.split("\t")[2]);
		}

		while ((nodesLine = nodesBR.readLine()) != null){
			HypernymsAndMetrics hypernyms = mapHypernyms.get(Integer.valueOf(nodesLine.split("\t")[0]));
			isasLine = mapIsas.get(Integer.valueOf(nodesLine.split("\t")[0]));
			String processedLine = processCluster(nodesLine, toString(hypernyms.hypernyms), isasLine, minScore, minSize, maxSize);
			if (processedLine != null){
				fw.write(nodesLine.split("\t")[0]+"\t"+processedLine + "\n");
			}

		}
		nodesBR.close();
		hypernymsBR.close();
		isasBR.close();
		fw.flush();
		fw.close();
	}

	private static String toString(Set<String> hypernyms) {
		StringWriter sw = new StringWriter();
		for (String s : hypernyms){
			sw.append(s+", ");
		}
		sw.getBuffer().setLength(sw.getBuffer().length()-2);
		return sw.toString();
	}

	private static HypernymsAndMetrics createHypernymsAndMetrics(
			String hypernymsLine) {

		Set<String> hypernyms = new HashSet<String>();
		Map<String,Integer> map = new HashMap<String,Integer>();
		String[] constituents = hypernymsLine.split("\t")[2].split(", ");
		//String[] constituents = hypernymsLine.split("\t")[1].split(", ");
		for (int i=0;i<constituents.length;i++){
			hypernyms.add(constituents[i].split(",")[0]);
			try {
				map.put(constituents[i].split(",")[0], Integer.valueOf(constituents[i].split(",")[1].split(":")[1].split("/")[0]));
			} catch (java.lang.ArrayIndexOutOfBoundsException e){
				System.err.println("line = "+hypernymsLine);
				e.printStackTrace();
			}
		}
		Double depth = Double.valueOf(hypernymsLine.split("\t")[1]);
		//Double depth = (Double.valueOf(constituents[0].split("=")[1].split(":")[0]) + Double.valueOf(constituents[1].split("=")[1].split(":")[0]) + Double.valueOf(constituents[2].split("=")[1].split(":")[0]))/3;
		String similarity = hypernymsLine.split("\t")[6];
		Double similarityValue = 0.;
		if (similarity.equals("NaN")) similarityValue = 0.;
		else if (similarity.equals("Infinity")) similarityValue = 1.;
		else similarityValue = Double.valueOf(similarity);
		return new HypernymsAndMetrics(hypernyms, map, depth,similarityValue);
	}

	private static String processCluster(String nodesLine, String hypernyms,
			String isas, double minScore, int minSize, int maxSize) {

		nodesLine = CleanTopicWords.cleanLine(nodesLine);
		StringWriter sw = new StringWriter();
		Integer size = Integer.valueOf(nodesLine.split("\t")[1]);
		Integer nbTriangles = Integer.valueOf(nodesLine.split("\t")[2]);
		Integer nbTriplets = Integer.valueOf(nodesLine.split("\t")[3]);
		boolean goodCluster = isItAGoodCluster(size,nbTriangles,nbTriplets, minScore, minSize, maxSize);
		if (!goodCluster){
			return null;
		} else {
			String nodes = nodesLine.split("\t")[5];
			for (String s : nodes.split(",")){
				//TODO sw.append(s.split("#")[0]+s.substring(s.lastIndexOf("("))+",");
				//sw.append(s.split("#")[0]+",");
				sw.append(s+",");
			}
			sw.getBuffer().setLength(sw.getBuffer().length()-1);

			sw.append("\t"+hypernyms+"\t"+isas);
			return sw.toString();
		}
	}

	private static boolean isItAGoodCluster(Integer size, Integer nbTriangles,
			Integer nbTriplets, double minScore, int minSize, int maxSize) {
		Integer nbTripletsMax = size*(size-1)*(size-2)/6;
		double clusterCoef = nbTriangles.doubleValue()/nbTripletsMax.doubleValue();
		double tripletsCoef = nbTriplets.doubleValue()/nbTripletsMax.doubleValue();
		double score = size*clusterCoef*tripletsCoef;
		if (score<minScore || size<minSize || size>maxSize)	{
			System.out.println(nbTriangles + " " + nbTriplets+ " "+score + " "+size);
			return false;
		}
		return true;
	}

}


text:
Title: Table Saw Cabinet is Nearing Completion!
Date: 2014/05/30 09:00
Category: Projects
Author: Josh Wickham
Tags: photo, woodworking
FBDescription: Getting close to being done with my table saw cabinet!

![Table Saw Cabinet]({filename}/images/10173696101524481808596707743689260795362678n-2.jpg)


text:
extern "Java"
{
  namespace gnu
  {
    namespace java
    {
      namespace util
      {
          class EmptyEnumeration;
      }
    }
  }
}

class gnu::java::util::EmptyEnumeration : public ::java::lang::Object
{

public:
  EmptyEnumeration();
  static ::gnu::java::util::EmptyEnumeration * getInstance();
  jboolean hasMoreElements();
  ::java::lang::Object * nextElement();
private:
  static ::gnu::java::util::EmptyEnumeration * instance;
public:
  static ::java::lang::Class class$;
};

#endif // __gnu_java_util_EmptyEnumeration__


text:
package org.arquillian.cube.impl.client.container.remote.command;

public class CreateCubeCommand extends AbstractCubeCommand<String> {

    private static final long serialVersionUID = 1L;

    public CreateCubeCommand(String cubeId) {
        super(cubeId);
    }
}


text:
SYNONYM

#### According to
Index Fungorum

#### Published in
null

#### Original name
Cladonia johnstoni C.W. Dodge

### Remarks
null


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

<title>OptionDescriptions (MaltParser 1.8.1)</title>
<meta name="date" content="2014-11-22">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

MaltParser 1.8.1

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

org.maltparser.core.options

Class OptionDescriptions

java.lang.Object

org.maltparser.core.options.OptionDescriptions

public class OptionDescriptions
extends java.lang.Object

Organizes all the option descriptions. Option descriptions can be loaded from the application data /appdata/options.xml, but also
 from a plugin option description file (always with the name plugin.xml).

Since:

1.0

Author:

Johan Hall

Constructor Summary

Constructors

Constructor and Description

OptionDescriptions()

Creates the Option Descriptions

Method Summary

Methods

Modifier and Type
Method and Description

void
generateMaps()

Creates several option maps for fast access to individual options.

Option
getOption(java.lang.String optionflag)

Returns an option based on the option flag

Option
getOption(java.lang.String optiongroup,
                  java.lang.String optionname)

Returns an option based on the option name and/or the option group name

protected java.util.Collection<Option>
getOptionGroupList(java.lang.String groupname)

Returns a collection of option that are member of an option group

java.util.TreeSet<java.lang.String>
getOptionGroupNameSet()

Return a sorted set of option group names

java.util.Set<Option>
getSaveOptionSet()

Returns a set of option that are marked as SAVEOPTION

boolean
hasOptions()

void
parseOptionDescriptionXMLfile(java.net.URL url)

Parse a XML file that contains the options used for controlling the application.

java.lang.String
toString()

java.lang.String
toStringMaps()

Returns a string representation that contains printable information of several options maps

java.lang.String
toStringOptionGroup(java.lang.String groupname)

Returns a string representation of a option group without the option group name in the string.

Methods inherited from class java.lang.Object

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

Constructor Detail

OptionDescriptions

public OptionDescriptions()

Creates the Option Descriptions

Method Detail

getOption

public Option getOption(java.lang.String optiongroup,
               java.lang.String optionname)
                 throws MaltChainedException

Returns an option based on the option name and/or the option group name

Parameters:

optiongroup - the name of the option group

optionname - the option name

Returns:

an option based on the option name and/or the option group name

Throws:

MaltChainedException

getOption

public Option getOption(java.lang.String optionflag)
                 throws MaltChainedException

Returns an option based on the option flag

Parameters:

optionflag - the option flag

Returns:

an option based on the option flag

Throws:

MaltChainedException

getSaveOptionSet

public java.util.Set<Option> getSaveOptionSet()

Returns a set of option that are marked as SAVEOPTION

Returns:

a set of option that are marked as SAVEOPTION

getOptionGroupNameSet

public java.util.TreeSet<java.lang.String> getOptionGroupNameSet()

Return a sorted set of option group names

Returns:

a sorted set of option group names

getOptionGroupList

protected java.util.Collection<Option> getOptionGroupList(java.lang.String groupname)

Returns a collection of option that are member of an option group

Parameters:

groupname - the name of the option group

Returns:

a collection of option that are member of an option group

parseOptionDescriptionXMLfile

public void parseOptionDescriptionXMLfile(java.net.URL url)
                                   throws MaltChainedException

Parse a XML file that contains the options used for controlling the application. The method
 calls the parseOptionGroups to parse the set of option groups in the DOM tree.

Parameters:

url - The path to a XML file that explains the options used in the application.

Throws:

OptionException

MaltChainedException

hasOptions

public boolean hasOptions()

generateMaps

public void generateMaps()
                  throws MaltChainedException

Creates several option maps for fast access to individual options.

Throws:

OptionException

MaltChainedException

toStringMaps

public java.lang.String toStringMaps()

Returns a string representation that contains printable information of several options maps

Returns:

a string representation that contains printable information of several options maps

toStringOptionGroup

public java.lang.String toStringOptionGroup(java.lang.String groupname)

Returns a string representation of a option group without the option group name in the string.

Parameters:

groupname - The option group name

Returns:

a string representation of a option group

toString

public java.lang.String toString()

Overrides:

toString in class java.lang.Object

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

MaltParser 1.8.1

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

Copyright 2007-2014 Johan Hall, Jens Nilsson and Joakim Nivre.


text:
namespace Azure.ResourceManager.DataBoxEdge.Models
{
    /// <summary> Etcd configuration. </summary>
    public partial class DataBoxEdgeEtcdInfo
    {
        /// <summary> Initializes a new instance of DataBoxEdgeEtcdInfo. </summary>
        internal DataBoxEdgeEtcdInfo()
        {
        }

        /// <summary> Initializes a new instance of DataBoxEdgeEtcdInfo. </summary>
        /// <param name="etcdInfoType"> Etcd type. </param>
        /// <param name="version"> Etcd version. </param>
        internal DataBoxEdgeEtcdInfo(string etcdInfoType, string version)
        {
            EtcdInfoType = etcdInfoType;
            Version = version;
        }

        /// <summary> Etcd type. </summary>
        public string EtcdInfoType { get; }
        /// <summary> Etcd version. </summary>
        public string Version { get; }
    }
}


text:
var url="http://127.0.0.1:5000/";

var nombre;
var nivel=-1;
var game;
var socket=io(url);

function comprobarUsuario(){
  eliminarCabeceras();
  //if ($.cookie("uid")!=undefined)
  if($.cookie("usr")!=undefined)
  {
    srvComprobarUsuario();
  }
  else{
    mostrarNavLogin();
    //mostrarIntro();
    mostrarLogin();
  }
 }

function mostrarNavLogout(){
  var strLogout='
 Modificar perfil
';
  strLogout = strLogout + '
 Salir
';

  $('#inicio li').remove();
  $('#inicio').append(strLogout);
}

function mostrarNavLogin(){
  var strLogin='
 Registrar usuario
';
  strLogin=strLogin+'
 Iniciar sesión
';

  $('#inicio li').remove();
  $('#inicio').append(strLogin);
}

function mostrarIntro(){
  var cadena='
Conquista Niveles
';
  $('#intro').append(cadena);
}

function mostrarLogin(){
  //borrarLogin();
  limpiar();
  //mostrarIntro();
  var cadena='

';
  cadena=cadena+'
Inicio de sesión

';
  cadena=cadena+'';
  cadena=cadena+'<input id="email" type="text" class="form-control" name="email" placeholder="Escribe tu email">
';
  cadena=cadena+'
';
  cadena=cadena+'';
  cadena=cadena+'<input id="clave" type="password" class="form-control" name="password" placeholder="Escribe tu clave">

';

  //$('#control').append('

Inicio de sesión
<input type="email" id="email" class="form-control" placeholder="introduce tu email" required><input type="password" id="clave" class="form-control" placeholder="introduce tu clave" required>
');
  $('#home').append(cadena);
  $('#home').append('
<button type="button" id="nombreBtn" class="btn btn-primary btn-md">Iniciar partida</button>
Recordar clave');//' Registrar usuario');
  $('#home').append('

');
  $('#email').blur(function() {
    var testEmail = /^[A-Z0-9._%+-]+@([A-Z0-9-]+\.)+[A-Z]{2,4}$/i;
    if (testEmail.test(this.value) )
    {
      $('#nombreBtn').on('click',function(){
        var nombre=$('#email').val();
        var clave=$('#clave').val();
        //$('#nombre').remove();
        $('#login').remove();
        $('#nombreBtn').remove();
        loginUsuario(nombre,clave);
      });
      $('#refRecordar').on('click',function(){
        var nombre=$('#email').val();
        enviarClave(nombre);
      });
    }
    else {
      mostrarAviso("Debe ser una dirección de email");
      //$("#info span").text("Debe ser una dirección de email");
      //alert('failed');
    }
  });
}

function mostrarRegistro(){
  //borrarLogin();
  limpiar();

//  $('#home').append('

Registro de usuarios
<input type="email" id="email" class="form-control" placeholder="introduce tu email"><input type="password" id="clave" class="form-control" placeholder="introduce tu clave">
');
var cadena='

';
  cadena=cadena+'
Nuevo usuario

';
  cadena=cadena+'';
  cadena=cadena+'<input id="email" type="text" class="form-control" name="email" placeholder="Escribe tu email">
';
  cadena=cadena+'
';
  cadena=cadena+'';
  cadena=cadena+'<input id="email2" type="text" class="form-control" name="email" placeholder="Repite el email">
';
  cadena=cadena+'
';
  cadena=cadena+'';
  cadena=cadena+'<input id="clave" type="password" class="form-control" placeholder="Escribe tu clave">

';

  //$('#control').append('

Inicio de sesión
<input type="email" id="email" class="form-control" placeholder="introduce tu email" required><input type="password" id="clave" class="form-control" placeholder="introduce tu clave" required>
');
  $('#home').append(cadena);

  $('#home').append('<button type="button" id="nombreBtn" class="btn btn-primary btn-md">Registrar usuario</button>');
  $('#home').append('

');
  $('#email2').blur(function() {
    var testEmail = /^[A-Z0-9._%+-]+@([A-Z0-9-]+\.)+[A-Z]{2,4}$/i;
    var nombre=$('#email').val();
    var nombre2=$('#email2').val();
    if (testEmail.test(this.value)&&comprobarEmail(nombre,nombre2))
    {
        $('#nombreBtn').on('click',function(){
          var clave=$('#clave').val();
          $('#nombre').remove();
          $('#nombreBtn').remove();
          registroUsuario(nombre,clave);
        });
    }
    else {
      mostrarAviso("Debe ser una dirección de email o las direcciones no coinciden");
      //$("#info span").text("Debe ser una dirección de email");
      //alert('failed');
    }
  });
}

function comprobarEmail(cad1,cad2){
  if (cad1==cad2){
    return true;
  }
  else{
    return false;
  }
}

function mostrarSolicitarReenvioMail(){
  $('#reenvio').remove();
  $('#home').append('<button type="button" id="reenvio" class="btn btn-primary btn-md">Reenviar email</button>');
  $('#email').blur(function() {
    var testEmail = /^[A-Z0-9._%+-]+@([A-Z0-9-]+\.)+[A-Z]{2,4}$/i;
    if (testEmail.test(this.value))
    {
        $('#reenvio').on('click',function(){
        var nombre=$('#email').val();
        //var clave=$('#clave').val();
        //$('#nombre').remove();
        //$('#nombreBtn').remove();
        //registroUsuario(nombre,clave);
        reenviarMail(nombre);
      });
    }
    else {
      mostrarAviso("Debe ser una dirección de email");
      //$("#info span").text("Debe ser una dirección de email");
      //alert('failed');
    }
  });
}

function mostrarAviso(cadena){
  $("#info span").text(cadena);
}

function mostrarActualizarEliminar(){
  //borrarLogin();
  limpiar();
  var uid;
  if ($.cookie("usr")!=undefined){
    var usr=JSON.parse($.cookie("usr"));
    uid=usr._id;
  }
  //if ($.cookie('uid')!=undefined)
  if(uid!=undefined)
  {
    $('#control').append('

Actualizar datos usuario
<input type="text" id="email" class="form-control" placeholder="Email: '+usr.email+'"><input type="text" id="nombre" class="form-control" placeholder="Nombre: '+usr.nombre+'"><input type="password" id="newpass" class="form-control" placeholder="introduce tu nueva clave">
');
    $('#control').append('<button type="button" id="actualizarBtn" class="btn btn-primary btn-md">Actualizar usuario</button> <button type="button" id="eliminarBtn" class="btn btn-danger btn-md">Eliminar usuario</button>');
    $('#actualizarBtn').on('click',function(){
      var email=$('#email').val();
      var nombre=$('#nombre').val();
      var newpass=$('#newpass').val();
      $('#actualizarBtn').remove();
      actualizarUsuario(email,nombre,newpass);
    });
    $('#eliminarBtn').on('click',function(){
      var nombre=$('#email').val();
      //var clave=$('#clave').val();
      $('#nombre').remove();
      $('#eliminarBtn').remove();
      eliminarUsuario(nombre);
    });
  }
  else{
    mostrarLogin();
  }
}

/*
function borrarLogin(){
  $('#login .glyphicon').remove();
  $('#login').remove();
  $('#email').remove();
  $('#clave').remove();
  $('#nombreBtn').remove();
  $('#cabeceraP').remove();
}
*/

function limpiar(){
  $('#ig1').remove();
  $('#ig12').remove();
  $('#ig2').remove();
  $('#login').remove();
  $('#email').remove();
  $('#clave').remove();
  $('#nombreBtn').remove();
  $('#datos').remove();
  $('#cabeceraP').remove();
  $('#cabecera').remove();
  $('#prog').remove();
  $('#cabecera').remove();
  $('#enh').remove();
  $('#siguienteBtn').remove();
  $('#actualizarBtn').remove();
  $('#eliminarBtn').remove();
  $('#refRegistro').remove();
  $('#nombre').remove();
  $('#newpass').remove();
  $('#tabla').remove();
  $('#tabla_wrapper').remove();
  $('#info').remove();
  $('#panel').remove();
  $('#reenvio').remove();
  $('#refRecordar').remove();
  //$('#res').remove();
  //$('#resultados').remove();
  $('#datos2').remove();
  $('#tab').remove();
}

function mostrarInfoJugador(){
  var usr=JSON.parse($.cookie("usr"));
  var email= usr.email;//$.cookie("email");
  var id=usr._id;//$.cookie("uid");
  var nivel=usr.nivel;//$.cookie("nivel");
  var nombre=usr.nombre;//$.cookie("nombre");
  var max=1000;

  mostrarNavLogout();
  if ($.cookie("max")!=undefined)
  {
    max=parseInt($.cookie("max"));
  }
  var percen=Math.floor((nivel/max)*100);
  limpiar();
  //borrarLogin();
  $('p').remove();
  var cadena='

Información del juego

';
  cadena=cadena+'

Email: '+email+'

Nombre: '+nombre+'

Nivel: '+nivel+'

Progreso: '+percen+'% completado

';
  $('#control').append(cadena);
 // $('#control').append('

Panel de Control

');
  //$('#control').append('

Email: '+email+'

Nombre: '+nombre+'

Nivel: '+nivel+'

'+percen+'% completado

');
  //$('#control').append('
'+percen+'%

');
  siguienteNivel();
  mostrarPanel();
  obtenerResultados();
}

function mostrarPanel(){
  $('#panel').remove();
  var cadena="
";
  cadena=cadena+"

Últimos logros de otros jugadores

";
  cadena=cadena+"

";
  $('#control').append(cadena);
}

socket.on('nueva',function(datos){
    $('#noticias').text(datos.texto);
})

function siguienteNivel(){
  var usr=JSON.parse($.cookie("usr"));
  $('#control').append('
<button type="button" id="siguienteBtn" class="btn btn-primary btn-block">Siguiente nivel</button>
')
  $('#siguienteBtn').on('click',function(){
    $('#siguienteBtn').remove();
    $('#enh').remove();
    $('#res').remove();
    $('#resultados').remove();
    $('#tab').remove();
    if ($('#juegoId').length==0){
      $('#canvas').append('

');
    }
    //crearNivel($.cookie('nivel'));
    pedirNivel(usr.nivel);
  });
}

function eliminarResultados(){
  $('#res').remove();
  $('#resultados').remove();
}

function mostrarResultados(datos){
  eliminarGame();
  $('#juegoId').remove();
  //$('#res').remove();
  //$('#resultados').remove();
  $('#tab').remove();

  //var cadena="

Resultados

";
  //cadena=cadena+"
";

  var cadena='

Resultados

';
  cadena=cadena+'
Todos
'
  cadena=cadena+'
Mis logros
'
  cadena=cadena+'
Los mejores

'
  cadena=cadena+'
';
  cadena=cadena+"
";
  cadena=cadena+obtenerTodos(datos);
  cadena=cadena+'
';
  cadena=cadena+"
";
  cadena=cadena+obtenerMisLogros(datos);
  cadena=cadena+'
';
  cadena=cadena+"
";
  cadena=cadena+obtenerLosMejores(datos);
  cadena=cadena+'
';
  cadena=cadena+'

';
  cadena=cadena+'
';
  $('#canvas').append(cadena);
  mostrarControlPaginas(datos.length);
}

function mostrarControlPaginas(max){
  Pagination('#demo',{
          itemsCount: max,
          pageSize: 10,
          onPageSizeChange: function (ps) {
            console.log('changed to ' + ps);
          },
          onPageChange: function (paging) {
            //custom paging logic here
            //console.log(paging);
            var start = paging.pageSize * (paging.currentPage - 1),
              end = start + paging.pageSize,
              $rows = $('#table').find('.data');

            $rows.hide();

            for (var i = start; i < end; i++) {
              $rows.eq(i).show();
            }
          }
        });
}

function obtenerTodos(datos){
  var cadena="

Nombre	Fecha	Nivel	Tiempo

";
  cadena=cadena+'
';
  for(var i=0;i<datos.length;i++){
      var fecha=new Date(datos[i].fecha);
      var strFecha=fecha.getDate()+'/'+(fecha.getMonth()+1)+'/'+fecha.getFullYear()+'  '+fecha.getHours()+':'+fecha.getMinutes();
      cadena=cadena+"
"+datos[i].nombre+"	"+strFecha+"	 "+datos[i].nivel+"	"+"	 "+datos[i].tiempo+"
";
    }
    cadena=cadena+"

";
  return cadena;
}

function obtenerMisLogros(datos){
  var usr=JSON.parse($.cookie("usr"));
  var miEmail=usr.email;
  misDatos=_.sortBy(_.filter(datos,function(each){
    return each.email==miEmail
  }),'nivel');
  var cadena="

Nombre	Fecha	Nivel	Tiempo
";
  for(var i=0;i<misDatos.length;i++){
      var fecha=new Date(misDatos[i].fecha);
      var strFecha=fecha.getDate()+'/'+(fecha.getMonth()+1)+'/'+fecha.getFullYear()+'  '+fecha.getHours()+':'+fecha.getMinutes();
      cadena=cadena+"
"+misDatos[i].nombre+"	"+strFecha+"	 "+misDatos[i].nivel+"	"+"	 "+misDatos[i].tiempo+"
";
    }
    cadena=cadena+"
";
  return cadena;
}

function obtenerLosMejores(datos){
  var usr=JSON.parse($.cookie("usr"));
  var miEmail=usr.email;
  var max=3;
  var nuevaCol=[];
  if ($.cookie("max")!=undefined)
  {
    max=parseInt($.cookie("max"));
  }

  for(var i=0;i<max;i++){
    nuevaCol.push(_.min(_.filter(datos,function(each){
      return each.nivel==i;
    }),function(ele){
      return ele.tiempo;
    }))
  }
  var cadena="

Nombre	Fecha	Nivel	Tiempo
";
  for(var i=0;i<nuevaCol.length;i++){
      var fecha=new Date(nuevaCol[i].fecha);
      var strFecha=fecha.getDate()+'/'+(fecha.getMonth()+1)+'/'+fecha.getFullYear()+'  '+fecha.getHours()+':'+fecha.getMinutes();
      cadena=cadena+"
"+nuevaCol[i].nombre+"	"+strFecha+"	 "+nuevaCol[i].nivel+"	"+"	 "+nuevaCol[i].tiempo+"
";
    }
    cadena=cadena+"
";
  return cadena;
}

function noHayNiveles(){
  //$("#juegoId").remove();
  $('#reset').remove();
  $('#control').append('
<button id="reset" type="button" class="btn btn-primary btn-lg">Volver a jugar</button>
');
  $('#reset').on("click",function(){
      //$('#reset').remove();
      //$('#canvas').append('

');
      //reset();
      volverAJugar();
     });
}

function eliminarCabeceras(){
  $('#resultados').remove();
  $('#res').remove();
  $('#cabecera').remove();
  $('#nombre').remove();
  $('#crear').remove();
  $('#nivel').remove();
  $('#help').remove();
  $('#reset').remove();
  $('#siguienteBtn').remove();
  $('#juegoId').remove();
  eliminarGame();
}

function reset(){
  eliminarCabeceras();
  eliminarCookies();
  eliminarGame();
  mostrarNavLogin();
  //iniciar();
  comprobarUsuario();
}

function eliminarGame(){
  if (game && game.state!=null) {
    game.destroy();
    //game=undefined;
  }
}

function eliminarCookies(){
  /*
  $.removeCookie("uid");
  $.removeCookie("email");
  $.removeCookie("nivel");
  $.cookie('nombre');
  */
  $.removeCookie("usr");
  $.removeCookie("max");
}

function nivelCompletado(tiempo){
  //game.destroy();
  //game.destroy();
  eliminarGame();
  $('#juegoId').append("
Enhorabuena!
");
  comunicarNivelCompletado(tiempo);
}

//Comunicaciones

function srvComprobarUsuario(){
  var usr=JSON.parse($.cookie("usr"));
  var id=usr._id;//$.cookie("uid");

  $.getJSON('/comprobarUsuario/'+id,function(datos){
    if (datos.nivel<0){
      eliminarCookies();
      //mostrarCabecera();
      mostrarLogin();
    }
    else{
      //$.cookie("nivel",datos.nivel);
      usr.nivel=datos.nivel;
      $.cookie("usr",JSON.stringify(usr));
      mostrarInfoJugador();
    }
  });
}

function loginUsuario(nombre,clave){
  //var id=$.cookie("id");

  $.ajax({
    type:'POST',
    url:'/login/',
    data:JSON.stringify({email:nombre,password:clave}),
    success:function(data){
      if (data.email==""){
        //mostrarRegistro();
        mostrarLogin();
        mostrarAviso("Usuario o clave incorrectos");
      }
      else{
        /*
        $.cookie('nombre',data.nombre);
        $.cookie('email',data.email);
        $.cookie('uid',data._id);
        $.cookie('nivel',data.nivel);
        */
        $.cookie("usr",JSON.stringify(data));
        mostrarInfoJugador();
        socket.emit("listo",data._id);
       }
      },
    contentType:'application/json',
    dataType:'json'
  });
}

function registroUsuario(nombre,clave){
  //var id=$.cookie("id");

  $.ajax({
    type:'POST',
    url:'/signup/',
    data:JSON.stringify({email:nombre,password:clave}),
    success:function(data){
      if (data.email==undefined){
        mostrarRegistro();
        mostrarAviso("Dirección de email inventada o el usuario ya existe");
        mostrarSolicitarReenvioMail();
      }
      else{
        /*
        $.cookie('nombre',data.nombre);
        $.cookie('email',data.email);
        $.cookie('uid',data._id);
        $.cookie('nivel',data.nivel);
        */
        //$.cookie("usr",JSON.stringify(data));
        //mostrarInfoJugador();
         mostrarLogin();
         mostrarAviso("Te hemos enviado un email para confirmar tu cuenta");
      }
      },
    contentType:'application/json',
    dataType:'json'
  });
}

function actualizarUsuario(email,nombre,newpass){
  var usr=JSON.parse($.cookie("usr"));
  var nivel=usr.nivel;//$.cookie("nivel");
  //var nivel=(JSON.parse($.cookie("usr"))).nivel;
 $.ajax({
    type:'PUT',
    url:'/actualizarUsuario',
    data:JSON.stringify({uid:usr._id,email:email,nombre:nombre,newpass:newpass,nivel:nivel}),
    success:function(data){
      if (data.email==undefined){
        mostrarRegistro();
      }
      else{
        /*
        $.cookie('nombre',data.nombre);
        $.cookie('email',data.email);
        $.cookie('uid',data._id);
        $.cookie('nivel',data.nivel);
        */
        $.cookie("usr",JSON.stringify(data));
        //mostrarActualizarEliminar();
        mostrarInfoJugador();
      }
      },
    contentType:'application/json',
    dataType:'json'
  });
}

function eliminarUsuario(){
  var usr=JSON.parse($.cookie("usr"));
  $.ajax({
    type:'DELETE',
    url:'/eliminarUsuario/'+usr._id,//$.cookie("uid"),
    data:'{}',
    success:function(data){
      if (data.resultados==1)
      {
        reset();
      }
      },
    contentType:'application/json',
    dataType:'json'
  });
}

function comunicarNivelCompletado(tiempo){
  //var id=$.cookie("uid");
  var usr=JSON.parse($.cookie("usr"));
  var uid=usr._id;
  $.getJSON('/nivelCompletado/'+uid+"/"+tiempo,function(datos){
      usr.nivel=datos.nivel;
      $.cookie("usr",JSON.stringify(usr));
      $.cookie("max",datos.max);
      //$.cookie("nivel",datos.nivel);
      mostrarInfoJugador();
      obtenerResultados()
  });
}

function obtenerResultados(){
  //var uid=$.cookie("uid");
   var uid;
  if ($.cookie("usr")!=undefined){
    var usr=JSON.parse($.cookie("usr"));
    uid=usr._id;
  }
  if (uid!=undefined){
    $.getJSON("/obtenerResultados/"+uid,function(data){
        mostrarResultados(data);
    });
  }
}

function pedirNivel(){
 var usr=JSON.parse($.cookie("usr"));
  var uid=usr._id;
  if (uid!=undefined){
    $.getJSON("/pedirNivel/"+uid,function(data){
        //console.log(data);
        crearNivel(data);
    });
  }
}

function volverAJugar(){
  var usr=JSON.parse($.cookie("usr"));
  var uid=usr._id;
  if (uid!=undefined){
    $.getJSON("/volverAJugar/"+uid,function(data){
        //console.log(data);
        $.cookie("usr",JSON.stringify(data));
        mostrarInfoJugador();
    });
  }
}

function reenviarMail(email){
  $.getJSON("/volverAEnviarMail/"+email,function(data){
      if (data.email==undefined){
        mostrarRegistro();
        mostrarAviso("Dirección de email inventada o el usuario ya existe");
        mostrarSolicitarReenvioMail();
      }
      else{
         mostrarLogin();
         mostrarAviso("Te hemos enviado un email para confirmar tu cuenta");
      }
    });
}

function enviarClave(email){
  if (email==undefined){
    mostrarLogin();
    mostrarAviso("Introduce usuario");
  }
  else{
    $.getJSON("/enviarClave/"+email,function(data){
        if (data.email==""){
          mostrarRegistro();
          mostrarAviso("Dirección de email inventada o el usuario ya existe");
          mostrarSolicitarReenvioMail();
        }
        else{
           mostrarLogin();
           mostrarAviso("Te hemos enviado un email para confirmar tu cuenta");
        }
      });
  }
}


text:
package io.aeron.driver.status;

import io.aeron.AeronCounters;
import org.agrona.collections.Int2ObjectHashMap;
import org.agrona.concurrent.status.*;

/**
 * System-wide counters for monitoring. These are separate from counters used for position tracking on streams.
 */
public enum SystemCounterDescriptor
{
    /**
     * Running total of bytes sent for data over UDP, excluding IP headers.
     */
    BYTES_SENT(0, "Bytes sent"),

    /**
     * Running total of bytes received for data over UDP, excluding IP headers.
     */
    BYTES_RECEIVED(1, "Bytes received"),

    /**
     * Failed offers to the receiver proxy suggesting back-pressure.
     */
    RECEIVER_PROXY_FAILS(2, "Failed offers to ReceiverProxy"),

    /**
     * Failed offers to the sender proxy suggesting back-pressure.
     */
    SENDER_PROXY_FAILS(3, "Failed offers to SenderProxy"),

    /**
     * Failed offers to the driver conductor proxy suggesting back-pressure.
     */
    CONDUCTOR_PROXY_FAILS(4, "Failed offers to DriverConductorProxy"),

    /**
     * Count of NAKs sent back to senders requesting re-transmits.
     */
    NAK_MESSAGES_SENT(5, "NAKs sent"),

    /**
     * Count of NAKs received from receivers requesting re-transmits.
     */
    NAK_MESSAGES_RECEIVED(6, "NAKs received"),

    /**
     * Count of status messages sent back to senders for flow control.
     */
    STATUS_MESSAGES_SENT(7, "Status Messages sent"),

    /**
     * Count of status messages received from receivers for flow control.
     */
    STATUS_MESSAGES_RECEIVED(8, "Status Messages received"),

    /**
     * Count of heartbeat data frames sent to indicate liveness in the absence of data to send.
     */
    HEARTBEATS_SENT(9, "Heartbeats sent"),

    /**
     * Count of heartbeat data frames received to indicate liveness in the absence of data to send.
     */
    HEARTBEATS_RECEIVED(10, "Heartbeats received"),

    /**
     * Count of data packets re-transmitted as a result of NAKs.
     */
    RETRANSMITS_SENT(11, "Retransmits sent"),

    /**
     * Count of packets received which under-run the current flow control window for images.
     */
    FLOW_CONTROL_UNDER_RUNS(12, "Flow control under runs"),

    /**
     * Count of packets received which over-run the current flow control window for images.
     */
    FLOW_CONTROL_OVER_RUNS(13, "Flow control over runs"),

    /**
     * Count of invalid packets received.
     */
    INVALID_PACKETS(14, "Invalid packets"),

    /**
     * Count of errors observed by the driver and an indication to read the distinct error log.
     */
    ERRORS(15, "Errors"),

    /**
     * Count of socket send operation which resulted in less than the packet length being sent.
     */
    SHORT_SENDS(16, "Short sends"),

    /**
     * Count of attempts to free log buffers no longer required by the driver which as still held by clients.
     */
    FREE_FAILS(17, "Failed attempts to free log buffers"),

    /**
     * Count of the times a sender has entered the state of being back-pressured when it could have sent faster.
     */
    SENDER_FLOW_CONTROL_LIMITS(18, "Sender flow control limits, i.e. back-pressure events"),

    /**
     * Count of the times a publication has been unblocked after a client failed to complete an offer within a timeout.
     */
    UNBLOCKED_PUBLICATIONS(19, "Unblocked Publications"),

    /**
     * Count of the times a command has been unblocked after a client failed to complete an offer within a timeout.
     */
    UNBLOCKED_COMMANDS(20, "Unblocked Control Commands"),

    /**
     * Count of the times the channel endpoint detected a possible TTL asymmetry between its config and new connection.
     */
    POSSIBLE_TTL_ASYMMETRY(21, "Possible TTL Asymmetry"),

    /**
     * Current status of the {@link org.agrona.concurrent.ControllableIdleStrategy} if configured.
     */
    CONTROLLABLE_IDLE_STRATEGY(22, "ControllableIdleStrategy status"),

    /**
     * Count of the times a loss gap has been filled when NAKs have been disabled.
     */
    LOSS_GAP_FILLS(23, "Loss gap fills"),

    /**
     * Count of the Aeron clients that have timed out without a graceful close.
     */
    CLIENT_TIMEOUTS(24, "Client liveness timeouts"),

    /**
     * Count of the times a connection endpoint has been re-resolved resulting in a change.
     */
    RESOLUTION_CHANGES(25, "Resolution changes"),

    /**
     * The maximum time spent by the conductor between work cycles.
     */
    CONDUCTOR_MAX_CYCLE_TIME(26, "Conductor max cycle time doing its work in ns"),

    /**
     * Count of the number of times the cycle time threshold has been exceeded by the conductor in its work cycle.
     */
    CONDUCTOR_CYCLE_TIME_THRESHOLD_EXCEEDED(27, "Conductor work cycle exceeded threshold count"),

    /**
     * The maximum time spent by the sender between work cycles.
     */
    SENDER_MAX_CYCLE_TIME(28, "Sender max cycle time doing its work in ns"),

    /**
     * Count of the number of times the cycle time threshold has been exceeded by the sender in its work cycle.
     */
    SENDER_CYCLE_TIME_THRESHOLD_EXCEEDED(29, "Sender work cycle exceeded threshold count"),

    /**
     * The maximum time spent by the receiver between work cycles.
     */
    RECEIVER_MAX_CYCLE_TIME(30, "Receiver max cycle time doing its work in ns"),

    /**
     * Count of the number of times the cycle time threshold has been exceeded by the receiver in its work cycle.
     */
    RECEIVER_CYCLE_TIME_THRESHOLD_EXCEEDED(31, "Receiver work cycle exceeded threshold count");

    /**
     * All system counters have the same type id, i.e. system counters are the same type. Other types can exist.
     */
    public static final int SYSTEM_COUNTER_TYPE_ID = AeronCounters.DRIVER_SYSTEM_COUNTER_TYPE_ID;

    private static final Int2ObjectHashMap<SystemCounterDescriptor> DESCRIPTOR_BY_ID_MAP = new Int2ObjectHashMap<>();

    static
    {
        for (final SystemCounterDescriptor descriptor : SystemCounterDescriptor.values())
        {
            if (null != DESCRIPTOR_BY_ID_MAP.put(descriptor.id, descriptor))
            {
                throw new IllegalStateException("Descriptor id already in use: " + descriptor.id);
            }
        }
    }

    /**
     * Get the {@link SystemCounterDescriptor} for a given id.
     *
     * @param id for the descriptor.
     * @return the descriptor if found otherwise null.
     */
    public static SystemCounterDescriptor get(final int id)
    {
        return DESCRIPTOR_BY_ID_MAP.get(id);
    }

    private final int id;
    private final String label;

    SystemCounterDescriptor(final int id, final String label)
    {
        this.id = id;
        this.label = label;
    }

    /**
     * The unique identity for the system counter.
     *
     * @return the unique identity for the system counter.
     */
    public int id()
    {
        return id;
    }

    /**
     * The human-readable label to identify a system counter.
     *
     * @return the human-readable label to identify a system counter.
     */
    public String label()
    {
        return label;
    }

    /**
     * Create a new counter for the enumerated descriptor.
     *
     * @param countersManager for managing the underlying storage.
     * @return a new counter for the enumerated descriptor.
     */
    public AtomicCounter newCounter(final CountersManager countersManager)
    {
        return countersManager.newCounter(label, SYSTEM_COUNTER_TYPE_ID, (buffer) -> buffer.putInt(0, id));
    }
}


text:
using System;
using System.Runtime.InteropServices;
using System.Security;

namespace BulletSharp
{
	public class CompoundCompoundCollisionAlgorithm : CompoundCollisionAlgorithm
	{
		public new class CreateFunc : CollisionAlgorithmCreateFunc
		{
			internal CreateFunc(IntPtr native)
				: base(native, true)
			{
			}

			public CreateFunc()
				: base(btCompoundCompoundCollisionAlgorithm_CreateFunc_new(), false)
			{
			}

			[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
			static extern IntPtr btCompoundCompoundCollisionAlgorithm_CreateFunc_new();
		}

		public new class SwappedCreateFunc : CollisionAlgorithmCreateFunc
		{
			internal SwappedCreateFunc(IntPtr native)
				: base(native, true)
			{
			}

			public SwappedCreateFunc()
				: base(btCompoundCompoundCollisionAlgorithm_SwappedCreateFunc_new(), false)
			{
			}

			[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
			static extern IntPtr btCompoundCompoundCollisionAlgorithm_SwappedCreateFunc_new();
		}

		public CompoundCompoundCollisionAlgorithm(CollisionAlgorithmConstructionInfo ci, CollisionObjectWrapper body0Wrap, CollisionObjectWrapper body1Wrap, bool isSwapped)
			: base(btCompoundCompoundCollisionAlgorithm_new(ci._native, body0Wrap._native, body1Wrap._native, isSwapped))
		{
		}

		[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
		static extern IntPtr btCompoundCompoundCollisionAlgorithm_new(IntPtr ci, IntPtr body0Wrap, IntPtr body1Wrap, bool isSwapped);
	}
}


text:
@interface BaseViewController (MBHUD)

- (void)showMBHudInView:(UIView *)view hint:(NSString *)hint;

- (void)hideMBHud;
- (void)showMB;

- (void)showMBHint:(NSString *)hint;
- (void)showSuccessMBHint:(NSString *)hint;
- (void)showSuccessMBHint:(NSString *)hint afterDelay:(NSTimeInterval)delay;
- (void)showFailMBHint:(NSString *)hint;
- (void)showFailMBHint:(NSString *)hint afterDelay:(NSTimeInterval)delay;

// 从默认(showHint:)显示的位置再往上(下)yOffset
- (void)showMBHint:(NSString *)hint yOffset:(float)yOffset;

@end