text:
module ActiveRecord
  ###
  # This class encapsulates a result returned from calling
  # {#exec_query}[rdoc-ref:ConnectionAdapters::DatabaseStatements#exec_query]
  # on any database connection adapter. For example:
  #
  #   result = ActiveRecord::Base.connection.exec_query('SELECT id, title, body FROM posts')
  #   result # => #<ActiveRecord::Result:0xdeadbeef>
  #
  #   # Get the column names of the result:
  #   result.columns
  #   # => ["id", "title", "body"]
  #
  #   # Get the record values of the result:
  #   result.rows
  #   # => [[1, "title_1", "body_1"],
  #         [2, "title_2", "body_2"],
  #         ...
  #        ]
  #
  #   # Get an array of hashes representing the result (column => value):
  #   result.to_hash
  #   # => [{"id" => 1, "title" => "title_1", "body" => "body_1"},
  #         {"id" => 2, "title" => "title_2", "body" => "body_2"},
  #         ...
  #        ]
  #
  #   # ActiveRecord::Result also includes Enumerable.
  #   result.each do |row|
  #     puts row['title'] + " " + row['body']
  #   end
  class Result
    include Enumerable

    attr_reader :columns, :rows, :column_types

    def initialize(columns, rows, column_types = {})
      @columns      = columns
      @rows         = rows
      @hash_rows    = nil
      @column_types = column_types
    end

    # Returns true if this result set includes the column named +name+
    def includes_column?(name)
      @columns.include? name
    end

    # Returns the number of elements in the rows array.
    def length
      @rows.length
    end

    # Calls the given block once for each element in row collection, passing
    # row as parameter.
    #
    # Returns an +Enumerator+ if no block is given.
    def each
      if block_given?
        hash_rows.each { |row| yield row }
      else
        hash_rows.to_enum { @rows.size }
      end
    end

    # Returns an array of hashes representing each row record.
    def to_hash
      hash_rows
    end

    alias :map! :map
    alias :collect! :map

    # Returns true if there are no records, otherwise false.
    def empty?
      rows.empty?
    end

    # Returns an array of hashes representing each row record.
    def to_ary
      hash_rows
    end

    def [](idx)
      hash_rows[idx]
    end

    # Returns the first record from the rows collection.
    # If the rows collection is empty, returns +nil+.
    def first
      return nil if @rows.empty?
      Hash[@columns.zip(@rows.first)]
    end

    # Returns the last record from the rows collection.
    # If the rows collection is empty, returns +nil+.
    def last
      return nil if @rows.empty?
      Hash[@columns.zip(@rows.last)]
    end

    def cast_values(type_overrides = {}) # :nodoc:
      if columns.one?
        # Separated to avoid allocating an array per row

        type = column_type(columns.first, type_overrides)

        rows.map do |(value)|
          type.deserialize(value)
        end
      else
        types = columns.map { |name| column_type(name, type_overrides) }

        rows.map do |values|
          Array.new(values.size) { |i| types[i].deserialize(values[i]) }
        end
      end
    end

    def initialize_copy(other)
      @columns      = columns.dup
      @rows         = rows.dup
      @column_types = column_types.dup
      @hash_rows    = nil
    end

    private

      def column_type(name, type_overrides = {})
        type_overrides.fetch(name) do
          column_types.fetch(name, Type.default_value)
        end
      end

      def hash_rows
        @hash_rows ||=
          begin
            # We freeze the strings to prevent them getting duped when
            # used as keys in ActiveRecord::Base's @attributes hash
            columns = @columns.map(&:-@)
            length  = columns.length

            @rows.map { |row|
              # In the past we used Hash[columns.zip(row)]
              #  though elegant, the verbose way is much more efficient
              #  both time and memory wise cause it avoids a big array allocation
              #  this method is called a lot and needs to be micro optimised
              hash = {}

              index = 0
              while index < length
                hash[columns[index]] = row[index]
                index += 1
              end

              hash
            }
          end
      end
  end
end


text:
module.exports = normalizeIdentifier

function normalizeIdentifier(value) {
  return (
    value
      // Collapse Markdown whitespace.
      .replace(/[\t\n\r ]+/g, ' ')
      // Trim.
      .replace(/^ | $/g, '')
      // Some characters are considered "uppercase", but if their lowercase
      // counterpart is uppercased will result in a different uppercase
      // character.
      // Hence, to get that form, we perform both lower- and uppercase.
      // Upper case makes sure keys will not interact with default prototypal
      // methods: no object method is uppercase.
      .toLowerCase()
      .toUpperCase()
  )
}

redpajama_set_name: RedPajamaGithub


text:
package cec.model;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.UUID;

import cec.config.CECConfigurator;
import cec.persistence.RuleDao;
import cec.persistence.RuleDaoFactory;

/**
 * The Class RuleSetImpl.
 */
public class RuleSetImpl implements RuleSet {

	/** The rule dao. */
	RuleDao ruleDao;

	/**
	 * Instantiates a new rule set impl.
	 */
	public RuleSetImpl() {
		setRuleDao(RuleDaoFactory.getRuleDaoInstance());
	}

	/**
	 * Gets the rule dao.
	 *
	 * @return the rule dao
	 */
	public RuleDao getRuleDao() {
		return ruleDao;
	}

	/**
	 * Sets the rule dao.
	 *
	 * @param ruleDao the new rule dao
	 */
	public void setRuleDao(RuleDao ruleDao) {
		this.ruleDao = ruleDao;
	}

	@Override
	public Iterable<Rule> loadSortedActiveRules() {
		Iterable<Rule> sorted = loadActiveRules();
		Collections.sort((List<Rule>) sorted);
		return sorted;
	}

	/**
	 * Precondition: rules exist in the system.
	 * Postcondition: Rules have been updated with the new rank values.
	 * It loads all the active rules from the system after filtering out active rules from the
	 * system.
	 * @param allRules the all rules
	 * @return the iterable
	 */
	@Override
	public Iterable<Rule> loadActiveRules() {
		Iterable<Rule> listOfAllRules = loadRules();
		Iterable<Rule> listOfActiveRules = filterActiveRules(listOfAllRules);
		return listOfActiveRules;
	}

	/**
	 * Precondition: rules exist in the system.
	 * Postcondition: Rules have been updated with the new rank values.
	 * It loads all the rules from the persistence.
	 * @param allRules the all rules
	 * @return the iterable
	 */

	@Override
	public Iterable<Rule> loadRules() {
		Iterable<Map<String, String>> rulesData = ruleDao
				.loadAllRules(CECConfigurator.getReference().get("RuleFolder"));
		List<Rule> rules = new ArrayList<>();
		for (Map<String, String> ruleData : rulesData) {
			UUID id = UUID.fromString(ruleData.get("Id"));
			String rank = ruleData.get("Rank");
			String senders = ruleData.get("Senders");
			String keywords = ruleData.get("Keywords");
			String tartgetFolder = ruleData.get("TartgetFolder");
			String status = ruleData.get("Status");
			Rule rule = new RuleImpl(id, Integer.parseInt(rank), senders,
					keywords, FolderFactory.getFolder(tartgetFolder),
					Boolean.parseBoolean(status));
            rules.add(rule);
		}
		Collections.sort((List<Rule>) rules);
		return rules;
	}

	/**
	 * Filter active rules.
	 *
	 * @param allRules the all rules
	 * @return the iterable
	 */
	protected Iterable<Rule> filterActiveRules(Iterable<Rule> allRules){
		List<Rule> activeRules = new ArrayList<Rule>();
		for (Rule rule : allRules){
			if(rule.isActive()){
				activeRules.add(rule);
			}
		}
		return activeRules;
	}

	@Override
	public void apply(Iterable<Email> targets) {
		for(Email e: targets) {
			for(Rule r: loadSortedActiveRules()) {
				if (r.apply(e))
					break;
			}
		}
	}

	/**
	 * Precondition: two rules exist in the system.
	 * Postcondition: Rules have been updated with the new rank values.
	 *
	 * @param allRules the all rules
	 * @return the iterable
	 */
	@Override
	public synchronized void  swapRank(Rule first, Rule second) {
		int temp = first.getRank();
		first.setRank(second.getRank());
		second.setRank(temp);
		first.update();
		second.update();
	}

}


text:
var JAR_PATH, JAVA_PATH, OPTIONS, path, spawn;

spawn = require('child_process').spawn;

path = require('path');

JAVA_PATH = exports.JAVA_PATH = 'java';

JAR_PATH = exports.JAR_PATH = require.resolve('google-closure-compiler/compiler.jar');

OPTIONS = exports.OPTIONS = {};

exports.compile = function(input, options, callback) {
  var args, compiler, result, stderr, stdout;
  if ('function' === typeof options) {
    callback = options;
    options = OPTIONS;
  } else {
    result = {};
    Object.keys(OPTIONS).forEach(function(key) {
      return result[key] = OPTIONS[key];
    });
    Object.keys(options).forEach(function(key) {
      return result[key] = options[key];
    });
    options = result;
  }
  args = [];
  if (!options.jar) {
    options.jar = JAR_PATH;
  }
  args.push('-jar');
  args.push(options.jar);
  delete options.jar;
  Object.keys(options).forEach(function(key) {
    var i, len, val, value;
    value = options[key];
    if (Array.isArray(value)) {
      for (i = 0, len = value.length; i < len; i++) {
        val = value[i];
        args.push("--" + key);
        args.push(val);
      }
      return;
    }
    if (typeof value === 'boolean' && value === false) {
      return;
    }
    args.push("--" + key);
    if (value !== true) {
      return args.push(value);
    }
  });
  compiler = spawn(JAVA_PATH, args);
  stdout = '';
  stderr = '';
  compiler.stdout.setEncoding('utf8');
  compiler.stderr.setEncoding('utf8');
  compiler.stdout.on('data', function(data) {
    return stdout += data;
  });
  compiler.stderr.on('data', function(data) {
    return stderr += data;
  });
  compiler.on('exit', function(code) {
    var error;
    if (code !== 0) {
      error = new Error(stderr);
      error.code = code;
    } else {
      error = null;
    }
    return callback(error, stdout, stderr);
  });
  return compiler.stdin.end(input);
};


text:
import { NgModule } from '@angular/core';
import { ServerModule } from '@angular/platform-server';
import { ServerCookiesModule } from '@ngx-utils/cookies/server';
import { ModuleMapLoaderModule } from '@nguniversal/module-map-ngfactory-loader';
import { AppModule } from './app.module';
import { HttpModule } from '@angular/http';
import { AppComponent } from './app.component';
// import { RequestService } from './service/request.service';
// import { ResponseService } from './service/response.service';
// import { Request, Response } from 'express';
// import { REQUEST, RESPONSE } from '@nguniversal/express-engine/src/tokens';

// import { CookieService, CookieBackendService } from 'ngx-cookie';

@NgModule({
    imports: [
        AppModule,
        ServerModule,
        ServerCookiesModule.forRoot(),
        HttpModule,
        ModuleMapLoaderModule
    ],
    bootstrap: [AppComponent],
    // providers: [
        // { provide: CookieService, useClass: CookieBackendService } //,
        // { provide: REQUEST, useValue: REQUEST },
        // { provide: RESPONSE, useValue: RESPONSE },
    // ]
})
export class AppServerModule { }


text:
class Item < ApplicationRecord
  validates :name, presence: true
  belongs_to :list, touch: true
end


text:
int main(int argc, char * argv[])
{
    @autoreleasepool {
        return UIApplicationMain(argc, argv, nil, NSStringFromClass([HMAppDelegate class]));
    }
}


text:
import proto  # type: ignore

__protobuf__ = proto.module(
    package="google.ads.googleads.v11.enums",
    marshal="google.ads.googleads.v11",
    manifest={"SlotEnum",},
)

class SlotEnum(proto.Message):
    r"""Container for enumeration of possible positions of the Ad.
    """

    class Slot(proto.Enum):
        r"""Enumerates possible positions of the Ad."""
        UNSPECIFIED = 0
        UNKNOWN = 1
        SEARCH_SIDE = 2
        SEARCH_TOP = 3
        SEARCH_OTHER = 4
        CONTENT = 5
        SEARCH_PARTNER_TOP = 6
        SEARCH_PARTNER_OTHER = 7
        MIXED = 8

__all__ = tuple(sorted(__protobuf__.manifest))


text:
function varargout = pmtm_detrend(data, varargin)

    data = detrend(data);

    [varargout{1:nargout}] = pmtm(data, varargin{:});

end


text:
<?php

/**
 * Contrôleur des Actualités
 * @package   Acidfarm\Controller
 */
class NewsController {

	/**
	 *  Liste les actualités si aucun argument ou un numéro de page est donné à l'url, sinon affiche l'actualité ciblée par l'url
	 */
    public function index(){
  		Conf::addToAriane(AcidRouter::getName('news'),News::buildUrl());

        //On autorise l'affichage d'une actualité
        $enable_news_view = true;

        //Si l'url correspond à la route de la liste des actualités
        if((AcidRouter::getPartialParamById(0)===AcidRouter::getKey('pagination_key'))||count(AcidRouter::getPartialParams())==0){

            $page = 1;
            if(AcidRouter::getPartialParamById(1)&&ctype_digit(AcidRouter::getPartialParamById(1))){
                 $page = AcidRouter::getPartialParamById(1);
            }

            if (count(AcidRouter::getPartialParams()) && ($page==1)) {
                AcidUrl::redirection301(News::buildUrlList(1));
            }

            if (News::validatePageList($page)) {

             // SEO settings
    //              $title = array(
    //              	'fr'=>'Actualités',
    // 					'en'=>'News',
    // 					'es'=>'Noticias',
    // 					'it'=>'Notizie',
    // 					'de'=>'Aktualitäten'
    //              );
    //              $desc = array(
    //              		'fr' => 'Suivez toute l\'actualités de '.Acid::get('site:name').' et restez informés de nos actions.',
    //              		'en' => 'Follow all the news '.Acid::get('site:name').' and stay informed of our actions.',
    //              		'es' => 'Siga todas las noticias de '.Acid::get('site:name').' y mantente informado de nuestras acciones.',
    //              		'it' => 'Segui tutte le notizie '.Acid::get('site:name').' e rimanere informati delle nostre azioni.',
    //              		'de' => 'Befolgen Sie alle Nachrichten '.Acid::get('site:name').' und bleiben Sie informiert unseres Handelns.'
    //              );
    //              $meta_img_url = Acid::get('url:img').'site/logo.png';
    //              $use_default_kewords = true;
    //              $added_keywords = array('keyword', 'ajouté');
    //              $generate_keywords_from_text = 'ceci est une chaine de caractère test que l\'on ajoute manuellement pour faire le test et voir ce qui est retenu. Ici, on peut voir qu\'un mot présent deux fois est retenu. Tout mot indésirable est à ajouter dans le fichier "kw_excluded.txt"';
    //              Conf::SEOGen($title, $desc, $meta_img_url, $use_default_kewords, $added_keywords, $generate_keywords_from_text);

             //Conf::setCanonicalUrl(AcidUrl::absolute(News::buildUrlList()));

                if ($prev_url = News::buildUrlListPrev($page)) {
                    Conf::setPrevUrl(AcidUrl::absolute($prev_url));
                }

                if ($next_url = News::buildUrlListNext($page)) {
                    Conf::setNextUrl(AcidUrl::absolute($next_url));
                }

                //add to HTML
                Conf::addToContent(News::printList($page));

            }else{
                AcidUrl::error404();
            }

        }
        //sinon
        else {

            //Si activée, on passe le relai à la méthode d'affichage d'une actualité
            if ($enable_news_view && count(AcidRouter::getPartialParams()) <= 2) {
                return $this->news();
            }

            AcidUrl::error404();

        }
    }

    /**
     *  Affichage d'une actualité
     */
    public function news(){
        $id_news = AcidRouter::getParam('id_news');

        if (!$id_news) {
            if (AcidRouter::getPartialParamById(0) && ctype_digit(AcidRouter::getPartialParamById(0))) {
                $id_news = AcidRouter::getPartialParamById(0);
            }
        }

        $news = new News($id_news);
        Acid::set('tmp_current_object',$news);

        if ($news->getId() && $news->active()) {

            if (AcidUrl::requestURI() != $news->url()) {
                AcidUrl::redirection301($news->url());
            }

            //add to ariane
            Conf::addToAriane($news->trad('title'),$news->url());

            //set meta tags
            Conf::setPageTitle($news->trad('seo_title') ? $news->hscTrad('seo_title') : $news->hscTrad('title'));
            Conf::addToMetaKeys($news->trad('seo_keys') ? explode(',',$news->trad('seo_keys')) : $news->hscTrad('title'));
            Conf::setMetadesc($news->trad('seo_desc') ? $news->hscTrad('seo_desc')  : (AcidVarString::split($news->trad('content'),100) . ' - '. Conf::getMetaDesc()));
            if ($news->get('src')) {
                Conf::setMetaImage($news->urlSrc('diapo'));
            }

            //add to HTML
            Conf::addToContent($news->printNews());

        }else{
            AcidUrl::error404();
        }
    }

    /**
	 *  Liste les actualités
	 */
    public function accueil(){
        //add to HTML
        Conf::addToContent(News::printList(0));
    }

}


text:
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals

import json
import logging
import os
import sys
from abc import ABCMeta
from importlib import import_module

from django.utils.module_loading import module_has_submodule
from six import with_metaclass

from kolibri.utils.build_config.default_plugins import DEFAULT_PLUGINS
from kolibri.utils.conf import KOLIBRI_HOME

logger = logging.getLogger(__name__)

conf_file = os.path.join(KOLIBRI_HOME, "plugins.json")

class ConfigDict(dict):
    # These values are encoded on the config dict as sets
    # so they need to be treated specially for serialization
    # and deserialization to/from JSON
    SET_KEYS = ("INSTALLED_PLUGINS", "DISABLED_PLUGINS", "UPDATED_PLUGINS")

    def __init__(self):
        # If the settings file does not exist or does not contain
        # valid JSON then create it
        self.set_defaults()
        if os.path.isfile(conf_file):
            try:
                # Open up the config file and load settings
                # use default OS encoding
                with open(conf_file, "r") as kolibri_conf_file:
                    self.update(json.load(kolibri_conf_file))
                return
            except ValueError:
                logger.warning(
                    "Attempted to load plugins.json but encountered a file that could not be decoded as valid JSON."
                )
        self.save()
        logger.info("Initialized plugins.json")

    def set_defaults(self):
        self.update(
            {
                #: Everything in this list is added to django.conf.settings.INSTALLED_APPS
                # except disabled ones below
                "INSTALLED_PLUGINS": DEFAULT_PLUGINS,
                #: Everything in this list is removed from the list above
                "DISABLED_PLUGINS": [],
                # Plugins that have been updated since we last initialized Kolibri
                "UPDATED_PLUGINS": [],
                # The current versions of plugins (both internal and external)
                "PLUGIN_VERSIONS": {},
            }
        )

    @property
    def ACTIVE_PLUGINS(self):
        return list(self["INSTALLED_PLUGINS"] - self["DISABLED_PLUGINS"])

    def update(self, new_values):
        """
        Updates current configuration with ``new_values``. Does not save to file.
        """
        values_copy = new_values.copy()
        for key in self.SET_KEYS:
            if key in values_copy:
                values_copy[key] = set(values_copy[key])
        super(ConfigDict, self).update(values_copy)

    def save(self):
        # use default OS encoding
        config_copy = self.copy()
        for key in self.SET_KEYS:
            if key in config_copy:
                config_copy[key] = list(config_copy[key])
        with open(conf_file, "w") as kolibri_conf_file:
            json.dump(config_copy, kolibri_conf_file, indent=2, sort_keys=True)

    def add_plugin(self, module_path):
        if module_path in self.ACTIVE_PLUGINS:
            logger.warning("{} already enabled".format(module_path))
            return
        self["INSTALLED_PLUGINS"].add(module_path)
        self["UPDATED_PLUGINS"].add(module_path)
        try:
            self["DISABLED_PLUGINS"].remove(module_path)
        except KeyError:
            pass
        self.save()

    def remove_plugin(self, module_path):
        if module_path not in self.ACTIVE_PLUGINS:
            logger.warning("{} already disabled".format(module_path))
            return
        self["DISABLED_PLUGINS"].add(module_path)
        try:
            self["INSTALLED_PLUGINS"].remove(module_path)
        except KeyError:
            pass
        try:
            self["UPDATED_PLUGINS"].remove(module_path)
        except KeyError:
            pass
        self.save()

    def clear_plugin(self, module_path):
        # Clean up references to plugins that either don't exist
        # Or don't import properly.
        try:
            self["INSTALLED_PLUGINS"].remove(module_path)
        except KeyError:
            pass
        try:
            self["DISABLED_PLUGINS"].remove(module_path)
        except KeyError:
            pass
        try:
            self["UPDATED_PLUGINS"].remove(module_path)
        except KeyError:
            pass
        self.save()

    def update_plugin_version(self, module_path, new_version):
        self["PLUGIN_VERSIONS"][module_path] = new_version
        try:
            self["UPDATED_PLUGINS"].remove(module_path)
        except KeyError:
            pass
        self.save()

#: Set defaults before updating the dict
config = ConfigDict()

class SingletonMeta(ABCMeta):
    _instances = {}

    # Make all classes using this metaclass singletons
    # Taken from here: https://stackoverflow.com/q/6760685
    # Should be resistant to the __new__ method on the class object
    # being overwritten.
    def __call__(cls, *args, **kwargs):
        if cls not in cls._instances:
            cls._instances[cls] = super(SingletonMeta, cls).__call__(*args, **kwargs)
        return cls._instances[cls]

class KolibriPluginBase(with_metaclass(SingletonMeta)):
    """
    This is the base class that all Kolibri plugins need to implement.
    """

    #: Comment
    # Name of a local module that contains url_patterns that define
    # URLs for views that do not contain any
    # translated content, and hence will not be prefixed
    # with a language prefix
    untranslated_view_urls = None

    #: Comment
    # Name of a local module that contains url_patterns that define
    # URLs for views that contain
    # translated content, and hence will be prefixed
    # with a language prefixs
    translated_view_urls = None

    #: Comment
    # Name of a local module that contains url_patterns that define
    # URLs for views that should be attached to the domain root.
    # Use with caution! The lack of namespacing is dangerous.
    root_view_urls = None

    #: Comment
    # Name of a local module that contains additional settings to augment
    # Django settings.
    # For settings that take a tuple or list, these will be appended to the value from
    # the base settings module set through conventional Django means.
    django_settings = None

    #: Comment
    # Name of a local module, containing a config spec as the 'option_spec' value.
    # These options should not override the core config spec. To override default values
    # of other options see the attribute below
    kolibri_options = None

    #: Comment
    # Name of a local module, containing a set of options defaults as the 'option_defaults' value.
    # Should be of the form:
    # option_defaults = {
    #     "<Section Name>": {
    #         "<Option Name>": "<New Default Value>",
    #     }
    # }
    kolibri_option_defaults = None

    #: Comment
    # Property that indicates whether it is safe to allow this plugin to be disabled via the GUI
    # This is used to prevent plugins that are required by the system from being disabled except
    # through the command line. This property is purely advisory, and does not affect the
    # functionality of the plugin, or the ability to disable it via the command line or other
    # configuration mechanisms.
    can_manage_while_running = False

    def __init__(self):
        self.INSTALLED_APPS = []

    @classmethod
    def class_module_path(self):
        return ".".join(self.__module__.split(".")[:-1])

    @property
    def module_path(self):
        return self.class_module_path()

    def name(self, lang):
        """
        A function to return a name for the plugin.
        Accepts a lang argument to allow for internationalization of the name.
        """
        return self.__class__.__name__

    def _installed_apps_add(self):
        """Call this from your enable() method to have the plugin automatically
        added to Kolibri configuration"""
        config.add_plugin(self.module_path)

    def _installed_apps_remove(self):
        """Call this from your enable() method to have the plugin automatically
        added to Kolibri configuration"""
        config.remove_plugin(self.module_path)

    def enable(self):
        """Modify the kolibri config dict to your plugin's needs"""
        self._installed_apps_add()

    @property
    def enabled(self):
        return self.module_path in config.ACTIVE_PLUGINS

    def disable(self):
        """Modify the kolibri config dict to your plugin's needs"""
        self._installed_apps_remove()

    def _return_module(self, module_name):
        if module_has_submodule(sys.modules[self.module_path], module_name):
            models_module_name = "%s.%s" % (self.module_path, module_name)
            try:
                return import_module(models_module_name)
            except Exception as e:
                logging.warning(
                    "Tried to import module {module_name} from {plugin} but an error was raised".format(
                        plugin=self.module_path, module_name=module_name
                    )
                )
                logging.exception(e)

        return None

    @property
    def url_module(self):
        """
        Return a url module, containing ``urlpatterns = [...]``, a conventional
        Django application url module.

        URLs are by default accessed through Django's reverse lookups like
        this::

            reverse('kolibri:mypluginclass:url_name')

        To customize "mypluginclass" (which is automatically derived from the
        plugin's class name), override ``url_namespace``.

        By default this will be discovered based on the translated_view_urls
        property.
        """
        if self.translated_view_urls:
            module = self._return_module(self.translated_view_urls)
            if module is None:
                logging.warning(
                    "{plugin} defined {urls} translated view urls but the module was not found".format(
                        plugin=self.module_path, urls=self.translated_view_urls
                    )
                )
            return module

    @property
    def api_url_module(self):
        """
        Return a url module, containing ``urlpatterns = [...]``, a conventional
        Django application url module.

        Do this separately for API endpoints so that they do not need
        to be prefixed by the language code.

        URLs are by default accessed through Django's reverse lookups like
        this::

            reverse('kolibri:mypluginclass:url_name')

        To customize "mypluginclass" (which is automatically derived from the
        plugin's class name), override ``url_namespace``.

        By default this will be discovered based on the untranslated_view_urls
        property.
        """
        if self.untranslated_view_urls:
            module = self._return_module(self.untranslated_view_urls)
            if module is None:
                logging.warning(
                    "{plugin} defined {urls} untranslated view urls but the module was not found".format(
                        plugin=self.module_path, urls=self.untranslated_view_urls
                    )
                )
            return module

    @property
    def root_url_module(self):
        """
        Return a url module, containing ``urlpatterns = [...]``, a conventional
        Django application url module.

        Do this separately for endpoints that need to be attached at the root.

        URLs are by default accessed through Django's reverse lookups like
        this::

            reverse('kolibri:url_name')

        By default this will be discovered based on the root_view_urls
        property.
        """
        if self.root_view_urls:
            module = self._return_module(self.root_view_urls)
            if module is None:
                logging.warning(
                    "{plugin} defined {urls} root view urls but the module was not found".format(
                        plugin=self.module_path, urls=self.root_view_urls
                    )
                )
            return module

    @property
    def settings_module(self):
        """
        Return a settings module, containing Django settings that this
        module wants to apply.

        For settings that take a tuple or list, these will be appended to the value from
        the base settings module set through conventional Django means.

        By default this will be discovered based on the django_settings
        property.
        """
        if self.django_settings:
            module = self._return_module(self.django_settings)
            if module is None:
                logging.warning(
                    "{plugin} defined {module} django settings but the module was not found".format(
                        plugin=self.module_path, module=self.django_settings
                    )
                )
            return module

    @property
    def options_module(self):
        """
        Return an options module, containing a config spec as the 'option_spec' value.

        These options should not override the core config spec.

        By default this will be discovered based on the kolibri_options
        property.
        """
        if self.kolibri_options:
            module = self._return_module(self.kolibri_options)
            if module is None:
                logging.warning(
                    "{plugin} defined {module} kolibri options but the module was not found".format(
                        plugin=self.module_path, module=self.kolibri_options
                    )
                )
            return module

    @property
    def option_defaults_module(self):
        """
        Return an option defaults module, containing default overrides as the 'options_default' value.

        By default this will be discovered based on the kolibri_options
        property.
        """
        if self.kolibri_option_defaults:
            module = self._return_module(self.kolibri_option_defaults)
            if module is None:
                logging.warning(
                    "{plugin} defined {module} kolibri option defaults but the module was not found".format(
                        plugin=self.module_path, module=self.kolibri_option_defaults
                    )
                )
            return module

    @property
    def url_slug(self):
        """
        Where should urls be included? By default, this is a lower-case version
        of the class name.

        Example::

            return r"my-plugin/"

        .. warning:: Avoid the empty string, as you might get conflicts.
        """
        return self.module_path.split(".")[-1].lower() + "/"


text:
#region Copyright
//
#endregion
namespace NZBDash.Services.HardwareMonitor.Interfaces
{
    public interface IThresholds
    {
        double CriticalLoad { get; } // critical load threshold
    }
}


text:
{% for radio in field %}

    {{ radio.choice_label }}
    {{ radio.tag }}

{% endfor %}


text:
import cStringIO, zipfile
from django.conf import settings
from django.http import HttpResponse
from django.template import loader

def compress_kml(kml):
    "Returns compressed KMZ from the given KML string."
    kmz = cStringIO.StringIO()
    zf = zipfile.ZipFile(kmz, 'a', zipfile.ZIP_DEFLATED)
    zf.writestr('doc.kml', kml.encode(settings.DEFAULT_CHARSET))
    zf.close()
    kmz.seek(0)
    return kmz.read()

def render_to_kml(*args, **kwargs):
    "Renders the response as KML (using the correct MIME type)."
    return HttpResponse(loader.render_to_string(*args, **kwargs),
                        mimetype='application/vnd.google-earth.kml+xml')

def render_to_kmz(*args, **kwargs):
    """
    Compresses the KML content and returns as KMZ (using the correct
    MIME type).
    """
    return HttpResponse(compress_kml(loader.render_to_string(*args, **kwargs)),
                        mimetype='application/vnd.google-earth.kmz')

def render_to_text(*args, **kwargs):
    "Renders the response using the MIME type for plain text."
    return HttpResponse(loader.render_to_string(*args, **kwargs),
                        mimetype='text/plain')


text:
-- phpMyAdmin SQL Dump
-- version 4.4.8
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 31, 2015 at 06:15 PM
-- Server version: 5.5.44-0+deb7u1
-- PHP Version: 5.4.41-0+deb7u1

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `upld`
--

-- --------------------------------------------------------

--
-- Table structure for table `images`
--

CREATE TABLE IF NOT EXISTS `images` (
  `id` char(5) NOT NULL,
  `ext` char(4) NOT NULL,
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `user` smallint(5) unsigned DEFAULT NULL,
  `ip` varchar(39) NOT NULL,
  `removed` enum('0','1') NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `reports`
--

CREATE TABLE IF NOT EXISTS `reports` (
  `id` char(5) NOT NULL,
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(39) NOT NULL,
  `actioned` enum('1','0') NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE IF NOT EXISTS `users` (
  `id` smallint(5) unsigned NOT NULL,
  `email` varchar(100) NOT NULL,
  `salt` char(23) NOT NULL,
  `password` char(64) NOT NULL,
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(39) NOT NULL,
  `admin` enum('0','1') NOT NULL DEFAULT '0',
  `banned` enum('0','1') NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `images`
--
ALTER TABLE `images`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `reports`
--
ALTER TABLE `reports`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;


text:
module Rack::App::CLI::Fetcher

  require 'rack/app/cli/fetcher/server'

  extend self

  module ExitPrevent

    def abort(*args)
    end

  end

  def rack_app
    @rack_app ||= (server_based_lookup || rack_app_with_most_endpoints)
  end

  protected

  def server_based_lookup
     Rack::App::CLI::Fetcher::Server.new(:config => 'config.ru').get_rack_app
  end

  def rack_app_with_most_endpoints
    ObjectSpace.each_object(Class).select{|klass|
      klass < Rack::App
    }.uniq.sort_by{ |rack_app|
      rack_app.router.endpoints.length
    }.last
  end

end


text:
<title>DOM tests -- CSS2 interface</title>

Background position at 100px 300px

Background position top left

Default background position


text:
            Frame : {{ $index + 1 }}
            <button class="button-close" type="button"
                ng-mousedown="$event.stopPropagation(); frame_editor.motion.removeFrame($index);"
                title="Delete this frame."
            >

            </button>

Transition time :

            <input type="number" min="1" max="5000" ng-disabled="frame_editor.touch_disabled" ng-model="frame.transition_time_ms"> [ms]
            <input type="range" min="1" max="5000" step="1" ng-model="frame.transition_time_ms">


text:
package org.thingsboard.server.transport.lwm2m.server.client;

import lombok.Data;

import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

@Data
public class ParametersAnalyzeResult {
    Set<String> pathPostParametersAdd;
    Set<String> pathPostParametersDel;

    public ParametersAnalyzeResult() {
        this.pathPostParametersAdd = ConcurrentHashMap.newKeySet();
        this.pathPostParametersDel = ConcurrentHashMap.newKeySet();
    }
}


text:
@class BaseRequest, NSString, VoipRelayData;

@interface VoipAnswerReq : WXPBGeneratedMessage
{
}

+ (void)initialize;

// Remaining properties
@property(nonatomic) int answer; // @dynamic answer;
@property(retain, nonatomic) BaseRequest *baseRequest; // @dynamic baseRequest;
@property(retain, nonatomic) VoipRelayData *capInfo; // @dynamic capInfo;
@property(retain, nonatomic) NSString *fromUsername; // @dynamic fromUsername;
@property(nonatomic) int netType; // @dynamic netType;
@property(nonatomic) int onlyAudio; // @dynamic onlyAudio;
@property(retain, nonatomic) VoipRelayData *peerId; // @dynamic peerId;
@property(nonatomic) int roomId; // @dynamic roomId;
@property(nonatomic) long long roomKey; // @dynamic roomKey;
@property(nonatomic) unsigned long long timestamp64; // @dynamic timestamp64;

@end


text:
var appDiv = document.createElement('div');
yourDiv.appendChild(appDiv);

var addDiv = document.createElement('div');
yourDiv.appendChild(addDiv);
var addButton = document.createElement('button');
addButton.innerHTML = "Add element";
addDiv.appendChild(addButton);

var removeDiv = document.createElement('div');
yourDiv.appendChild(removeDiv);
var idText = document.createElement('textarea');
idText.rows = 1;
idText.cols = 10;
removeDiv.appendChild(idText);
var removeButton = document.createElement('button');
removeButton.innerHTML = "Remove element";
removeDiv.appendChild(removeButton);

var app = require("biojs-vis-pinpad");
var instance = new app({
    ordering: ['type', 'start', 'end'],
    options: {
        el: appDiv
        , width: '220px'
        , height: '320px'
        , highlightColor: 'green'
    }
});

var toAdd = [site671, site580, catPTM, site342, site425, variant];
addButton.onclick = function() {
    if (toAdd.length != 0) {
        var elem = toAdd.shift();
        instance.addElement(elem);
    } else {
        console.log('No more test elements to add');
    }
};

removeButton.onclick = function() {
    console.log('removeButton.onclick');
    console.log(idText);
    var text = idText.value;
    if (text.length !== 0) {
        instance.removeElement(text);
    }
};

instance.dispatcher.on('duplication', function(obj) {
    console.log('Element already exist');
    console.log(obj);
});

instance.dispatcher.on('add', function(obj) {
    console.log('Something added');
    console.log(obj);
});

instance.dispatcher.on('remove', function(obj) {
    console.log('Something removed');
    console.log(obj);
});


text:
<?php if ( ! defined('SZ_EXEC') ) exit('access_denied');

class GadgetMemoActiveRecord extends SZ_ActiveRecord
{
	protected $_table   = 'gadget_memo';
	protected $_primary = 'gadget_memo_id';
	protected $_schemas = array(
		'gadget_memo_id' => array('type' => 'INT'),
		'user_id' => array('type' => 'INT'),
		'token' => array('type' => 'VARCHAR'),
		'data' => array('type' => 'TEXT'),
		'update_time' => array('type' => 'INT')
	);

	public function isValidGadgetMemoId($value) {
		return TRUE;
	}

	public function isValidUserId($value) {
		return TRUE;
	}

	public function isValidToken($value) {
		return TRUE;
	}

	public function isValidData($value) {
		return TRUE;
	}

	public function isValidUpdateTime($value) {
		return TRUE;
	}

}


text:
package org.zstack.header.tag;

/**
 */
public class APICreateSystemTagMsg extends APICreateTagMsg {
}


text:
'use strict';
/* global suite: false, setup: false, test: false,
    teardown: false, suiteSetup: false, suiteTeardown: false */
var assert = require('assert');
var crypto = require('crypto');
var common = require('./common');
var http = require('http');
var RAIL = require('../');

suite('http:auth', function() {
  var rail, server;
  var onrequest;

  var listener = function(request, response) {
    if (typeof onrequest === 'function') {
      onrequest(request, response);
    }
  };

  suiteSetup(function(done) {
    rail = new RAIL({
      request: {
        headers: {
          'Hello': 'World'
        }
      }
    });

    rail.use('auth');

    server = http.createServer(listener);
    server.listen(common.port, done);
  });

  test('call', function(done) {
    onrequest = function(request, response) {
      assert(request.headers.hello);
      assert.strictEqual(request.headers.hello, 'World');

      var hash = crypto.createHash('sha1');

      request.pipe(hash, {
        end: false
      });

      request.on('end', function() {
        assert.strictEqual(request.headers.authorization, hash.digest('base64'));
        response.end('pong');
      });
    };

    var call = rail.call({
      proto: 'http',
      method: 'PUT',
      port: common.port
    }, function(response) {
      assert.strictEqual(response.statusCode, 200);
      var body = [];

      response.on('readable', function() {
        var data = response.read();

        if (data) {
          body.push(data);
        }
      });

      response.on('end', function() {
        body = Buffer.concat(body);
        assert.strictEqual(body.length, 4);
        assert.strictEqual(body.toString(), 'pong');
        done();
      });
    });

    call.write('start');

    setImmediate(function() {
      call.end('ping');
    });
  });

  suiteTeardown(function(done) {
    server.close(done);
  });
});


text:
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using MovieRant.Movies.Models;

namespace MovieRant.Movies.ViewModels
{
    public class EditActorViewModel {
        public int Id { get; set; }

        [Required(ErrorMessage = "The actor's name is required")]
        public string Name { get; set; }

        public IEnumerable<MoviePart> Movies { get; set; }
    }
}


text:
package com.alanbuttars.commons.compress.archives.util;

import static com.alanbuttars.commons.compress.archives.util.Archives.AR;

import java.io.File;
import java.io.IOException;

import org.junit.Test;

import com.alanbuttars.commons.compress.stub.compress.Compress;
import com.alanbuttars.commons.compress.stub.decompress.Decompress;
import com.alanbuttars.commons.compress.util.FilesFunction;

/**
 * Integration test class for {@link Archives} for {@link Archives#AR} archives.
 *
 * @author Alan Buttars
 *
 */
public class ArchivesIntegrationArImplTest extends ArchivesIntegrationAbstractTest {

	@Test
	public void testExtract() throws IOException {
		testExtract(AR, decompressFunction());
	}

	@Test
	public void testArchive() throws IOException {
		testArchive(AR, compressFunction(), decompressFunction());
	}

	private FilesFunction decompressFunction() {
		return new FilesFunction() {

			@Override
			public File act(File original) throws IOException {
				return Decompress.archive(original).withAr().toTempDirectory();
			}
		};
	}

	private FilesFunction compressFunction() {
		return new FilesFunction() {

			@Override
			public File act(File original) throws IOException {
				return Compress.directory(original).withAr().toTempFile();
			}
		};
	}
}


text: console.log('AngularJS version', angular.version.full);


text:
module RbRouting
  module Router

    # Find all costs for each pair of nodes in the graph via Johnson's algorithm (http://docs.pgrouting.org/2.0/en/src/apsp_johnson/doc/index.html#pgr-apsp-johnson)
    #
    #   @apsp = RbRouting::Router::ApspJohnson.new  :host => 'localhost', :database => 'routing',
    #                                               :user => 'routing', :edge_table => 'ways',
    #                                               :id => :id, :cost => :cost, :reverse_cost => :reverse_cost
    #
    #   @apsp.run
    class ApspJohnson < RbRouting::Base

      def cost_query_select
      {
        'source'        => @source_field,
        'target'        => @target_field,
        'cost'          => @cost_field
      }
    end

      def routing_function_defaults
        {:sql => cost_query.sql }
      end

      def routing_function_definition
        {:pgr_apspJohnson => [:sql]}
      end

    end

  end
end


text:
<?php

namespace app\modules\task\controllers\admin;

use Yii;
use app\modules\task\models\Task;
use app\modules\task\models\search\TaskSearch;
use app\core\web\BackController;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;

/**
 * DefaultController implements the CRUD actions for Task model.
 */
class DefaultController extends BackController
{
    public function behaviors()
    {
        return [
            'verbs' => [
                'class' => VerbFilter::className(),
                'actions' => [
                    'delete' => ['post'],
                ],
            ],
        ];
    }

    /**
     * Lists all Task models.
     * @return mixed
     */
    public function actionIndex()
    {
        $searchModel = new TaskSearch();
        $params = Yii::$app->request->queryParams;

        $dataProvider = $searchModel->search($params);

        if (isset($params['excel']) && $params['excel']){
            return $this->excel($dataProvider);
        }
        return $this->render('index', [
            'searchModel' => $searchModel,
            'dataProvider' => $dataProvider,
        ]);
    }

    private function excel($dp)
    {

        $columns = [
            'info.name',
            'user.username',
            'op.username',
            'title',
            'content:ntext',
            'pre_finish:date',
            'finish',
            'statusText',
        ];

        $options = [
            'title'=>'任务',
            'filename'=>'task',
            'pageTitle'=>'任务'
        ];
        \app\core\libs\Export::export($dp, $columns, $options);
    }

    /**
     * Displays a single Task model.
     * @param integer $id
     * @return mixed
     */
    public function actionView($id)
    {
        return $this->render('view', [
            'model' => $this->findModel($id),
        ]);
    }

    /**
     * Creates a new Task model.
     * If creation is successful, the browser will be redirected to the 'view' page.
     * @return mixed
     */
    public function actionCreate()
    {
        $model = new Task();

        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            return $this->redirect(['view', 'id' => $model->id]);
        } else {
            $model->pre_finish = date('Y-m-d', strtotime('+2 day'));
            return $this->renderAjax('create', [
                'model' => $model,
            ]);
        }
    }

    /**
     * Updates an existing Task model.
     * If update is successful, the browser will be redirected to the 'view' page.
     * @param integer $id
     * @return mixed
     */
    public function actionUpdate($id)
    {
        $model = $this->findModel($id);

        if ($model->load(Yii::$app->request->post())) {

            $model->save();

            return $this->redirect(['view', 'id' => $model->id]);
        } else {

            $model->pre_finish = substr($model->pre_finish, 0,10);
            return $this->renderAjax('update', [
                'model' => $model,
            ]);
        }
    }

    /**
     * Deletes an existing Task model.
     * If deletion is successful, the browser will be redirected to the 'index' page.
     * @param integer $id
     * @return mixed
     */
    public function actionDelete($id)
    {
        $model = $this->findModel($id);

        $flag = $model->del();

        if (Yii::$app->request->isAjax) {

            if ($flag) {
                return $this->json();
            } else {
                return $this->json(null, '错误,请重试', 0);
            }
        }

        return $this->redirect(['index']);
    }

    public function actionFinish($id)
    {
        $model = $this->findModel($id);

        if (Yii::$app->request->isAjax) {

            if ($model->finish()) {
                return $this->json();
            } else {
                return $this->json(null, '错误,请重试', 0);
            }
        } else {
            $model->finish();
        }

        return $this->redirect(['index']);
    }

    /**
     * Finds the Task model based on its primary key value.
     * If the model is not found, a 404 HTTP exception will be thrown.
     * @param integer $id
     * @return Task the loaded model
     * @throws NotFoundHttpException if the model cannot be found
     */
    protected function findModel($id)
    {
        if (($model = Task::findOne($id)) !== null) {
            return $model;
        } else {
            throw new NotFoundHttpException('The requested page does not exist.');
        }
    }
}


text:
#pragma once

#include "physics/rotating_body.hpp"

#include <algorithm>
#include <vector>

#include "physics/oblate_body.hpp"
#include "quantities/constants.hpp"

namespace principia {

using geometry::Exp;

namespace physics {

template<typename Frame>
RotatingBody<Frame>::Parameters::Parameters(
    Length const& mean_radius,
    Angle const& reference_angle,
    Instant const& reference_instant,
    AngularVelocity<Frame> const& angular_velocity)
    : mean_radius_(mean_radius),
      reference_angle_(reference_angle),
      reference_instant_(reference_instant),
      angular_velocity_(angular_velocity) {
  CHECK_NE(angular_velocity_.Norm(), 0.0 * SIUnit<AngularFrequency>())
      << "Rotating body cannot have zero angular velocity";
}

template<typename Frame>
RotatingBody<Frame>::RotatingBody(
    MassiveBody::Parameters const& massive_body_parameters,
    Parameters const& parameters)
    : MassiveBody(massive_body_parameters),
      parameters_(parameters) {}

template<typename Frame>
Length RotatingBody<Frame>::mean_radius() const {
  return parameters_.mean_radius_;
}

template<typename Frame>
AngularVelocity<Frame> const& RotatingBody<Frame>::angular_velocity() const {
  return parameters_.angular_velocity_;
}

template<typename Frame>
Angle RotatingBody<Frame>::AngleAt(Instant const& t) const {
  return parameters_.reference_angle_ +
         (t - parameters_.reference_instant_) *
             parameters_.angular_velocity_.Norm();
}

template<typename Frame>
Rotation<Frame, Frame> RotatingBody<Frame>::RotationAt(Instant const& t) const {
  return Exp((t - parameters_.reference_instant_) *
                 parameters_.angular_velocity_);
}

template<typename Frame>
bool RotatingBody<Frame>::is_massless() const {
  return false;
}

template<typename Frame>
bool RotatingBody<Frame>::is_oblate() const {
  return false;
}

template<typename Frame>
void RotatingBody<Frame>::WriteToMessage(
    not_null<serialization::Body*> const message) const {
  WriteToMessage(message->mutable_massive_body());
}

template<typename Frame>
void RotatingBody<Frame>::WriteToMessage(
    not_null<serialization::MassiveBody*> const message) const {
  MassiveBody::WriteToMessage(message);
  not_null<serialization::RotatingBody*> const rotating_body =
      message->MutableExtension(serialization::RotatingBody::extension);
  Frame::WriteToMessage(rotating_body->mutable_frame());
  parameters_.reference_angle_.WriteToMessage(
      rotating_body->mutable_reference_angle());
  parameters_.reference_instant_.WriteToMessage(
      rotating_body->mutable_reference_instant());
  parameters_.angular_velocity_.WriteToMessage(
      rotating_body->mutable_angular_velocity());
}

template<typename Frame>
not_null<std::unique_ptr<RotatingBody<Frame>>>
RotatingBody<Frame>::ReadFromMessage(
    serialization::RotatingBody const& message,
    MassiveBody::Parameters const& massive_body_parameters) {
  // For pre-Buffon compatibility, build a point mass.
  Parameters parameters(
                 message.has_mean_radius()
                     ? Length::ReadFromMessage(message.mean_radius())
                     : Length(),
                 Angle::ReadFromMessage(message.reference_angle()),
                 Instant::ReadFromMessage(message.reference_instant()),
                 AngularVelocity<Frame>::ReadFromMessage(
                     message.angular_velocity()));

  if (message.HasExtension(serialization::OblateBody::extension)) {
    serialization::OblateBody const& extension =
        message.GetExtension(serialization::OblateBody::extension);

    return OblateBody<Frame>::ReadFromMessage(extension,
                                              massive_body_parameters,
                                              parameters);
  } else {
    return std::make_unique<RotatingBody<Frame>>(massive_body_parameters,
                                                 parameters);
  }
}

}  // namespace physics
}  // namespace principia


text:
function copy_files() {
SSHCMD="ssh -i $HOME/.ssh/id_rsa-jumphost-logcollector"
#let's copy the finished sessions
# this part must be run from the host that receives the backups
    for HOST in `cat ~/jumphosts.txt` ; do
	$SSHCMD root@$HOST 'find /var/log/asciinema -type f -size +1c' | \
#	    while read filename ; do $SSHCMD "fuser -s $filename" || echo $filename ; done | \
#	    while read filename ; do $SSHCMD "chattr -a $filename" ; echo $filename ; done | \
	    tr '\n' '\0'  | \
	    rsync -e "$SSHCMD" -avxtz --remove-sent-files --files-from=- --from0 root@$HOST:/ ~/$HOST
	done
}
function display_status() {
echo 'archive:' ; find ~ -type f | wc -l
echo 'src:' ; find /var/log/asciinema -type f | wc -l
}
#harden_files
while (true) ; do
    copy_files
    sleep 1
    done


text:
#include "SDL_config.h"

#include "SDL_aavideo.h"

/* Variables and functions exported by SDL_sysevents.c to other parts
   of the native video subsystem (SDL_sysvideo.c)
*/
extern void AA_initkeymaps(int fd);
extern void AA_mousecallback(int button, int dx, int dy,
                                 int u1,int u2,int u3, int u4);
extern void AA_keyboardcallback(int scancode, int pressed);

extern void AA_InitOSKeymap(_THIS);
extern void AA_PumpEvents(_THIS);


text:
package org.drools.mvel.integrationtests;

import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.List;

import org.junit.Test;
import org.kie.api.io.ResourceType;
import org.kie.internal.builder.KnowledgeBuilder;
import org.kie.internal.builder.KnowledgeBuilderFactory;
import org.kie.internal.io.ResourceFactory;

public class ParallelBuildTest {

    private final List<Class<?>> classes = Arrays.asList(
            java.util.List.class,
            java.awt.Color.class,
            java.util.concurrent.Callable.class,
            java.util.concurrent.atomic.AtomicBoolean.class,
            java.util.concurrent.locks.Lock.class,
            java.util.zip.ZipFile.class,
            java.awt.color.ColorSpace.class,
            java.awt.font.TextMeasurer.class,
            java.awt.geom.Area.class,
            java.awt.im.InputContext.class,
            java.net.Inet4Address.class,
            java.io.File.class
    );

    @Test
    public void testParallelBuild() {
        KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();

        StringBuilder sb = new StringBuilder();
        int rc = 0;
        for (Class<?> c : classes) {
            sb.append("rule \"rule_" + rc++ + "\"\n");
            sb.append("  when\n");
            sb.append("    a : " + c.getName() + "()\n");
            sb.append("  then\n");
            sb.append("    System.out.print(\".\");\n");
            sb.append("end\n");
            sb.append("\n");
        }

        kbuilder.add(ResourceFactory.newByteArrayResource(sb.toString().getBytes(StandardCharsets.UTF_8)), ResourceType.DRL);
    }

}


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

// Issue 7978.  Stack tracing didn't work during cgo code after calling a Go
// callback.  Make sure GC works and the stack trace is correct.

package cgotest

/*
#include <stdint.h>

void issue7978cb(void);

#if defined(__APPLE__) && defined(__arm__)
// on Darwin/ARM, libSystem doesn't provide implementation of the __sync_fetch_and_add
// primitive, and although gcc supports it, it doesn't inline its definition.
// Clang could inline its definition, so we require clang on Darwin/ARM.
#if defined(__clang__)
#define HAS_SYNC_FETCH_AND_ADD 1
#else
#define HAS_SYNC_FETCH_AND_ADD 0
#endif
#else
#define HAS_SYNC_FETCH_AND_ADD 1
#endif

// use ugly atomic variable sync since that doesn't require calling back into
// Go code or OS dependencies
static void issue7978c(uint32_t *sync) {
#if HAS_SYNC_FETCH_AND_ADD
	while(__sync_fetch_and_add(sync, 0) != 0)
		;
	__sync_fetch_and_add(sync, 1);
	while(__sync_fetch_and_add(sync, 0) != 2)
		;
	issue7978cb();
	__sync_fetch_and_add(sync, 1);
	while(__sync_fetch_and_add(sync, 0) != 6)
		;
#endif
}
*/
import "C"

import (
	"os"
	"runtime"
	"strings"
	"sync/atomic"
	"testing"
)

var issue7978sync uint32

func issue7978check(t *testing.T, wantFunc string, badFunc string, depth int) {
	runtime.GC()
	buf := make([]byte, 65536)
	trace := string(buf[:runtime.Stack(buf, true)])
	for _, goroutine := range strings.Split(trace, "\n\n") {
		if strings.Contains(goroutine, "test.issue7978go") {
			trace := strings.Split(goroutine, "\n")
			// look for the expected function in the stack
			for i := 0; i < depth; i++ {
				if badFunc != "" && strings.Contains(trace[1+2*i], badFunc) {
					t.Errorf("bad stack: found %s in the stack:\n%s", badFunc, goroutine)
					return
				}
				if strings.Contains(trace[1+2*i], wantFunc) {
					return
				}
			}
			t.Errorf("bad stack: didn't find %s in the stack:\n%s", wantFunc, goroutine)
			return
		}
	}
	t.Errorf("bad stack: goroutine not found. Full stack dump:\n%s", trace)
}

func issue7978wait(store uint32, wait uint32) {
	if store != 0 {
		atomic.StoreUint32(&issue7978sync, store)
	}
	for atomic.LoadUint32(&issue7978sync) != wait {
		runtime.Gosched()
	}
}

//export issue7978cb
func issue7978cb() {
	// Force a stack growth from the callback to put extra
	// pressure on the runtime. See issue #17785.
	growStack(64)
	issue7978wait(3, 4)
}

func growStack(n int) int {
	var buf [128]int
	if n == 0 {
		return 0
	}
	return buf[growStack(n-1)]
}

func issue7978go() {
	C.issue7978c((*C.uint32_t)(&issue7978sync))
	issue7978wait(7, 8)
}

func test7978(t *testing.T) {
	if runtime.Compiler == "gccgo" {
		t.Skip("gccgo can not do stack traces of C code")
	}
	if C.HAS_SYNC_FETCH_AND_ADD == 0 {
		t.Skip("clang required for __sync_fetch_and_add support on darwin/arm")
	}
	if runtime.GOOS == "android" || runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") {
		t.Skip("GOTRACEBACK is not passed on to the exec wrapper")
	}
	if os.Getenv("GOTRACEBACK") != "2" {
		t.Fatalf("GOTRACEBACK must be 2")
	}
	issue7978sync = 0
	go issue7978go()
	// test in c code, before callback
	issue7978wait(0, 1)
	issue7978check(t, "_Cfunc_issue7978c(", "", 1)
	// test in go code, during callback
	issue7978wait(2, 3)
	issue7978check(t, "test.issue7978cb(", "test.issue7978go", 3)
	// test in c code, after callback
	issue7978wait(4, 5)
	issue7978check(t, "_Cfunc_issue7978c(", "_cgoexpwrap", 1)
	// test in go code, after return from cgo
	issue7978wait(6, 7)
	issue7978check(t, "test.issue7978go(", "", 3)
	atomic.StoreUint32(&issue7978sync, 8)
}


text:
import { CancellationToken, Definition, DefinitionProvider, Location, Position, TextDocument } from 'vscode';
import * as Constants from '../common/constants';
import { VariableUtility } from '../utils/variableUtility';

export class FileVariableDefinitionProvider implements DefinitionProvider {
    public async provideDefinition(document: TextDocument, position: Position, token: CancellationToken): Promise<Definition | undefined> {
        const wordRange = VariableUtility.getEnvironmentOrFileVariableReferenceNameRange(document, position);
        if (!wordRange) {
            return undefined;
        }

        const selectedVariableName = document.getText(wordRange);

        const documentLines = document.getText().split(Constants.LineSplitterRegex);
        const locations = VariableUtility.getFileVariableDefinitionRanges(documentLines, selectedVariableName);
        return locations.map(location => new Location(document.uri, location));
    }
}


text:
namespace dropkick.Configuration.Dsl
{
    using DeploymentModel;
    using Engine;
    using Magnum.Reflection;

    public class DropkickDeploymentInspector :
        ReflectiveVisitorBase<DropkickDeploymentInspector>,
        DeploymentInspector
    {
        readonly DeploymentPlan _plan = new DeploymentPlan();
        DeploymentRole _currentRole; //TODO: seems hackish
        RoleToServerMap _serverMappings;

        public DropkickDeploymentInspector() :
            base("Look")
        {
        }

        #region DeploymentInspector Members

        public void Inspect(object obj)
        {
            base.Visit(obj);
        }

        public void Inspect(object obj, ExposeMoreInspectionSites additionalInspections)
        {
            base.Visit(obj, () =>
            {
                additionalInspections();
                return true;
            });
        }

        #endregion

        public bool Look(Deployment deployment)
        {
            _plan.Name = deployment.GetType().Name;
            return true;
        }

        public bool Look(Role role)
        {
            _currentRole = _plan.AddRole(role.Name);

            foreach (var serverName in _serverMappings.GetServers(role.Name))
            {
                _currentRole.AddServer(serverName);
            }

            return true;
        }

        public bool Look(Server server)
        {
            //TODO: implement
            return true;
        }

        public bool Look(ProtoTask protoTask)
        {
            //TODO: hackish
            _currentRole.ForEachServer(server =>
            {
                var task = protoTask.ConstructTasksForServer(server);
                var detail = new DeploymentDetail(() => task.Name, task.VerifyCanRun, task.Execute);
                server.AddDetail(detail);
            });

            return true;
        }

        public DeploymentPlan GetPlan(Deployment deployment, RoleToServerMap serverMappings)
        {
            _serverMappings = serverMappings;

            deployment.InspectWith(this);

            return _plan;
        }
    }
}


text:
class Server
{
private:
	ILrpTextStream* m_stream;
public:
	Server(ILrpTextStream* pStream);
public:
	void GetSupportedSymbols(const std::string& id);
	void GetSessionInfo(const std::string& id);
	void SubscribeToQuotes(const std::string& id, const std::vector<std::string>& symbols, const __int32& marketDepth);
	void UnsubscribeQuotes(const std::string& id, const std::vector<std::string>& symbols);
	void GetQuotesHistoryVersion(const std::string& id, const __int32& clientVersion);
	void SendDataHistoryRequest(const std::string& id, const CFxDataHistoryRequest& request);
	void SendGetFileChunk(const std::string& id, const std::string& fieldId, const unsigned __int32& chunkId);
	void SendGetBarsHistoryMetaInfoFile(const std::string& id, const std::string& symbol, const __int32& priceType, const std::string& period);
	void SendGetTicksHistoryMetaInfoFile(const std::string& id, const std::string& symbol, const bool& includeLevel2);
};


text:
module.exports = function (grunt) {

    grunt.initConfig({
        less: {
            development: {
                files: {
                    "Content/Styles/Site.css": "Content/Styles/Site.less"
                }
            }
        },
        watch: {
            styles: {
                files: ['Content/Styles/**/*.less'],
                tasks: ['less'],
                options: {
                    nospawn: true
                }
            }
        }
    });

    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-contrib-less');

    grunt.registerTask('default', ['less']);
};


text:
from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer
from hazelcast.protocol.builtin import StringCodec
from hazelcast.protocol.builtin import DataCodec
from hazelcast.protocol.builtin import CodecUtil

# hex: 0x030700
_REQUEST_MESSAGE_TYPE = 198400
# hex: 0x030701
_RESPONSE_MESSAGE_TYPE = 198401

_REQUEST_INITIAL_FRAME_SIZE = REQUEST_HEADER_SIZE

def encode_request(name):
    buf = create_initial_buffer(_REQUEST_INITIAL_FRAME_SIZE, _REQUEST_MESSAGE_TYPE)
    StringCodec.encode(buf, name, True)
    return OutboundMessage(buf, False)

def decode_response(msg):
    msg.next_frame()
    return CodecUtil.decode_nullable(msg, DataCodec.decode)


text:
NAME=hyperledger/fabric-baseimage
RELEASE=`uname -m`-$1
DOCKERHUB_NAME=$NAME:$RELEASE

CURDIR=`dirname $0`

echo "BUILD-CACHE: Pulling \"$DOCKERHUB_NAME\" from dockerhub.."
docker pull $DOCKERHUB_NAME
docker inspect $DOCKERHUB_NAME 2>&1 > /dev/null
if [ "$?" == "0" ]; then
    echo "BUILD-CACHE: Success!"
    BASENAME=$DOCKERHUB_NAME
else
    echo "BUILD-CACHE: WARNING - Build-cache unavailable, attempting local build"
    (cd $CURDIR/../../images/base && make docker DOCKER_TAG=localbuild)
    if [ "$?" != "0" ]; then
        echo "ERROR: Build-cache could not be compiled locally"
        exit -1
    fi
    BASENAME=$NAME:localbuild
fi

# Ensure that we have the baseimage we are expecting
docker inspect $BASENAME 2>&1 > /dev/null
if [ "$?" != "0" ]; then
   echo "ERROR: Unable to obtain a baseimage"
   exit -1
fi

# any further errors should be fatal
set -e

TMP=`mktemp -d`
DOCKERFILE=$TMP/Dockerfile

LOCALSCRIPTS=$TMP/scripts
REMOTESCRIPTS=/hyperledger/scripts/provision

mkdir -p $LOCALSCRIPTS
cp -R $CURDIR/* $LOCALSCRIPTS

# extract the FQN environment and run our common.sh to create the :latest tag
cat <<EOF > $DOCKERFILE
FROM $BASENAME
`for i in \`docker run -i $BASENAME /bin/bash -l -c printenv\`;
do
   echo ENV $i
done`
COPY scripts $REMOTESCRIPTS
RUN $REMOTESCRIPTS/common.sh
RUN chmod a+rw -R /opt/gopath
EOF

[ ! -z "$http_proxy" ] && DOCKER_ARGS_PROXY="$DOCKER_ARGS_PROXY --build-arg http_proxy=$http_proxy"
[ ! -z "$https_proxy" ] && DOCKER_ARGS_PROXY="$DOCKER_ARGS_PROXY --build-arg https_proxy=$https_proxy"
[ ! -z "$HTTP_PROXY" ] && DOCKER_ARGS_PROXY="$DOCKER_ARGS_PROXY --build-arg HTTP_PROXY=$HTTP_PROXY"
[ ! -z "$HTTPS_PROXY" ] && DOCKER_ARGS_PROXY="$DOCKER_ARGS_PROXY --build-arg HTTPS_PROXY=$HTTPS_PROXY"
[ ! -z "$no_proxy" ] && DOCKER_ARGS_PROXY="$DOCKER_ARGS_PROXY --build-arg no_proxy=$no_proxy"
[ ! -z "$NO_PROXY" ] && DOCKER_ARGS_PROXY="$DOCKER_ARGS_PROXY --build-arg NO_PROXY=$NO_PROXY"
docker build $DOCKER_ARGS_PROXY -t $NAME:latest $TMP

rm -rf $TMP


text:
package core.handler;

import java.util.HashMap;
import java.util.Map;

public class HandlerFactory {

	private Map<String, Handler> _tableOfHandler;

	public HandlerFactory() {
		_tableOfHandler = new HashMap<String, Handler>();

		_tableOfHandler.put("CREATE_PLAYER_INFO", new CreatePlayerInfoHandler());
		_tableOfHandler.put("CREATE_ROOM", new CreateRoomHandler());
		_tableOfHandler.put("DISCONNECT", new DisconnectHandler());
		_tableOfHandler.put("ECHO", new EchoHandler());
		_tableOfHandler.put("END_TURN", new EndTurnHandler());
		_tableOfHandler.put("ENTER_ROOM", new EnterRoomHandler());
		_tableOfHandler.put("GET_ROOMS", new GetRoomsHandler());
		_tableOfHandler.put("LEAVE_ROOM", new LeaveRoomHandler());
		_tableOfHandler.put("REQUEST_ID", new RequestIDHandler());
		_tableOfHandler.put("UPDATE_MONEY", new UpdateMoneyHandler());
	}

	public Handler getHandlerInstance(String handler) {
		if (!_tableOfHandler.containsKey(handler))
			throw new IllegalArgumentException("This handler not exist in factory");

		return _tableOfHandler.get(handler);
	}
}


text:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Control_Escolar
{

    public partial class Control_Escolar : Form
    {
        public Control_Escolar()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
        }

        private void profesoresToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void busquedaToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void alumnosToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void bajasToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Bajas_Alumnos Alumnos_Bajas = new Bajas_Alumnos();
            Alumnos_Bajas.Show();
        }

        private void reinscripcionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Alumnos_Inscripciones formularioAlumnos = new Alumnos_Inscripciones();
            formularioAlumnos.Show();
        }

        private void toolStripMenuItem1_Click(object sender, EventArgs e)
        {
            Cambios_Alumnos Alumnos_Cambios = new Cambios_Alumnos();
            Alumnos_Cambios.Show();
        }

        private void busquedaToolStripMenuItem2_Click(object sender, EventArgs e)
        {

            Busqueda_Alumnos Alumnos_Busqueda = new Busqueda_Alumnos();
            Alumnos_Busqueda.Show();
        }

        private void busquedaToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            Busqueda_Profesores Profesores_Busqueda = new Busqueda_Profesores();
            Profesores_Busqueda.Show();
        }

        private void agregarToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Altas_Profesores Profesores_Altas = new Altas_Profesores();
            Profesores_Altas.Show();

        }

        private void bjasToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Bajas_Profesores Profesores_Bajas = new Bajas_Profesores();
            Profesores_Bajas.Show();
        }

        private void cambiosToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            Cambios_Profesores Profesores_Cambios = new Cambios_Profesores();
            Profesores_Cambios.Show();
        }

        private void formatosToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void menuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {

        }
    }
}


text:
/**
 * @unrestricted
 */
SourceFrame.ResourceSourceFrame = class extends SourceFrame.SourceFrame {
  /**
   * @param {!Common.ContentProvider} resource
   */
  constructor(resource) {
    super(resource.contentURL(), resource.requestContent.bind(resource));
    this._resource = resource;
  }

  /**
   * @param {!Common.ContentProvider} resource
   * @param {string} highlighterType
   * @return {!UI.SearchableView}
   */
  static createSearchableView(resource, highlighterType) {
    var sourceFrame = new SourceFrame.ResourceSourceFrame(resource);
    sourceFrame.setHighlighterType(highlighterType);
    var searchableView = new UI.SearchableView(sourceFrame);
    searchableView.setPlaceholder(Common.UIString('Find'));
    sourceFrame.show(searchableView.element);
    sourceFrame.setSearchableView(searchableView);
    return searchableView;
  }

  get resource() {
    return this._resource;
  }

  /**
   * @override
   * @param {!UI.ContextMenu} contextMenu
   * @param {number} lineNumber
   * @param {number} columnNumber
   * @return {!Promise}
   */
  populateTextAreaContextMenu(contextMenu, lineNumber, columnNumber) {
    contextMenu.appendApplicableItems(this._resource);
    return Promise.resolve();
  }
};


text:
<?php defined('BASEPATH') OR exit('No direct script access allowed');?>
<!DOCTYPE html>

	<meta charset="UTF-8">
	<title>Jefe</title>
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' />
	<meta name="viewport" content="width=device-width" />

	<link rel="apple-touch-icon" sizes="76x76" href="<?php echo base_url(); ?>/img/apple-icon.png">
	<link rel="icon" type="image/png" sizes="96x96" href="<?php echo base_url(); ?>/img/favicon.png">

  <link href="<?php echo base_url(); ?>public/css/bootstrap.min.css" rel="stylesheet" />
  <link href="<?php echo base_url(); ?>public/css/animate.min.css" rel="stylesheet"/>
  <link href="<?php echo base_url(); ?>public/css/paper-dashboard.css" rel="stylesheet"/>
  <link href="<?php echo base_url(); ?>public/css/demo.css" rel="stylesheet" />
	<link href="<?php echo base_url(); ?>public/css/themify-icons.css" rel="stylesheet">

  <link href="http://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" rel="stylesheet">
  <link href='https://fonts.googleapis.com/css?family=Muli:400,300' rel='stylesheet' type='text/css'>

	                <a href="<?php echo base_url(); ?>index.php/Student_Controller/index" class="simple-text">
	                    Inicio

											<a href="<?php echo base_url() ?>index.php/Student_Controller/index">

Cuestionarios

											<a href="<?php echo base_url() ?>index.php/Student_Controller/historial">

Historial

	                    <button type="button" class="navbar-toggle">
	                        Toggle navigation

	                    </button>
											<a class="navbar-brand" href="<?php echo base_url(); ?>index.php/Student_Controller/index">Inicio
/

                      <?php
                        foreach($cuestionario as $c){
                          echo "
Cuestionario: $c[name]
";
                          echo '<input type="hidden" ng-model="cuestionario_id" name="cuestionario_id" id="cuestionario_id" value="'.$c['id'].'">';
                        }
                      ?>

<?php print_r($this->session->userdata('logged_in')['username'] );?>

<a href="<?php echo base_url(); ?>index.php/Student_Controller/perfil">Perfil

<a href="<?php echo base_url() ?>index.php/Home/logout">Logout

								<?php
								//Si existen las sesiones flasdata que se muestren
										if($this->session->flashdata('correcto'))
											echo '
<button type="button" aria-hidden="true" class="close" data-dismiss="alert">×</button> Bien - '.$this->session->flashdata('correcto').'
';

										if($this->session->flashdata('incorrecto'))
											echo '
<button type="button" aria-hidden="true" class="close" data-dismiss="alert">×</button> Error - '.$this->session->flashdata('incorrecto').'
';
								?>

                                        {{porcentaje}} completado

Sección 1

																			<?php
																			for ($i = 1; $i <$numpreguntas; $i++) {
																					$var=$i+1;
																				  echo "
Sección $var
";
																			}
																			?>

 ¿  ?

																											<input type="radio" name="respuesta1" value="1">Siempre

																											<input type="radio" name="respuesta1" value="2">Usualmente

																											<input type="radio" name="respuesta1" value="3">Algunas Veces

																											<input type="radio" name="respuesta1" value="4">Rara Vez

																											<input type="radio" name="respuesta1" value="5">Nunca

 ¿  ?

																										<input type="radio" name="respuesta2" value="1">Siempre

																										<input type="radio" name="respuesta2" value="2">Usualmente

																										<input type="radio" name="respuesta2" value="3">Algunas Veces

																										<input type="radio" name="respuesta2" value="4">Rara Vez

																										<input type="radio" name="respuesta2" value="5">Nunca

																									<button id="atras" ng-click="atras()" type="button"  class="btn btn-default btn-wd">Atrás</button>
																									<button ng-click="siguiente()"  type="button"  class="btn btn-info btn-wd" >Siguiente</button>
																									<button ng-click="terminarEncuesta()" type="button" class="btn btn-info btn-wd">Terminar</button>