text:
import L from "leaflet";
import '../../core/Base';
import { FetchRequest } from '@supermap/iclient-common';

/**
 * @class L.supermap.components.DistributedAnalysisModel
 * @classdesc 分布式分析组件数据模型。
 * @private
 * @category Components DistributedAnalysis
 * @param {string} processingUrl - 分布式分析地址。
 * @fires L.supermap.components.DistributedAnalysisModel#datasetsloaded
 * @fires L.supermap.components.DistributedAnalysisModel#datasetinfoloaded
 * @extends {L.Evented}
 */
export class DistributedAnalysisModel extends L.Evented {

    initialize(processingUrl) {
        this.processingUrl = processingUrl
    }
    /**
     * @function L.supermap.components.DistributedAnalysisModel.prototype.getDatasetsName
     * @description 获取所有可进行分布式分析的数据集。
     * @param {string} url - 分布式分析服务地址。
     */
    getDatasetsName() {
        let url = this.processingUrl;
        this.dataset = [];
        this.dataset['datasetNames'] = [];
        this.dataset['childUrl'] = [];

        let host = 'http://' + url.split('/')[2];
        let sharefileUrl = host + '/iserver/services/datacatalog/rest/datacatalog/sharefile.json';
        let datasetsUrl = host + '/iserver/services/datacatalog/rest/datacatalog/relationship/datasets.json';
        let me = this;
        FetchRequest.get(sharefileUrl).then(function (response) {
            return response.json();
        }).then(function (result) {
            me.dataset['datasetNames'] = me.dataset['datasetNames'].concat(result.datasetNames);
            me.dataset['childUrl'] = me.dataset['childUrl'].concat(result.childUriList);
            let _me = me;
            FetchRequest.get(datasetsUrl).then(function (response) {
                return response.json();
            }).then(function (result) {
                _me.dataset['datasetNames'] = _me.dataset['datasetNames'].concat(result.datasetNames);
                _me.dataset['childUrl'] = _me.dataset['childUrl'].concat(result.childUriList);

                let datasetHash = [];
                for (let i in _me.dataset['datasetNames']) {
                    datasetHash[_me.dataset.datasetNames[i]] = _me.dataset.childUrl[i]
                }
                /**
                 * @event L.supermap.components.DistributedAnalysisModel#datasetsloaded
                 * @description 数据集获取完成之后触发。
                 * @property {Object} result - 数据集数据。
                 * @property {Array.<string>} result.dataset - 数据集名称数组。
                 * @property {Object} result.datasetHash - 数据集名称数组与数据集 URL 一一对应的对象。
                 */
                _me.fire('datasetsloaded', { 'result': { 'dataset': _me.dataset, 'datasetHash': datasetHash } });

            });
        });
    }
    /**
     * @function L.supermap.components.DistributedAnalysisModel.prototype.getDatasetInfo
     * @description 获得数据集类型与 fields。
     * @param {string} datasetUrl - 数据集资源地址。
     */
    getDatasetInfo(datasetUrl) {
        let type;
        let me = this;
        FetchRequest.get(datasetUrl).then(function (response) {
            return response.json();
        }).then(function (data) {
            let datasetInfo = data.datasetInfo
            if (datasetInfo.datasetType === 'LINE' || datasetInfo.type === 'LINE') {
                type = 'LINE';
            } else if (datasetInfo.datasetType === 'POINT' || datasetInfo.type === 'POINT' || datasetInfo.type === 'CSV') {
                type = 'POINT';
            } else if (datasetInfo.datasetType === 'REGION' || datasetInfo.type === 'REGION') {
                type = 'REGION';
            }
            let fields = [];
            let fieldInfos = datasetInfo.fieldInfos || datasetInfo.fieldInfo || null;
            if (fieldInfos) {
                for (let i in fieldInfos) {
                    fields.push(fieldInfos[i].name)
                }
                /**
                 * @event L.supermap.components.DistributedAnalysisModel#datasetinfoloaded
                 * @description 数据集查询完成之后触发。
                 * @property {Object} result - 数据集数据。
                 * @property {string} result.type - 数据集类型。
                 * @property {Array.<string>} result.fields - 数据集字段。
                 */
                me.fire('datasetinfoloaded', { 'result': { 'type': type, 'fields': fields } })
            } else {
                let fieldsUrl = data.childUriList[0].replace('//fields', '/fields');
                FetchRequest.get(fieldsUrl).then(function (response) {
                    return response.json();
                }).then(function (data) {
                    let fieldNames = data.fieldNames;
                    let fields = [];
                    for (let i in fieldNames) {
                        fields.push(fieldNames[i])
                    }
                    me.fire('datasetinfoloaded', { 'result': { 'type': type, 'fields': fields } })
                })
            }
        })
    }
}
L.supermap.components.DistributedAnalysisModel = DistributedAnalysisModel;


text:
<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSomelineImagesTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('someline_images', function(Blueprint $table)
		{
			$table->increments('someline_image_id');
            $table->unsignedInteger('user_id')->nullable()->index();
            $table->string('image_name');
            $table->text('exif')->nullable();
            $table->tinyInteger('is_gif')->default(0);
            $table->unsignedInteger('file_size');
            $table->unsignedInteger('width');
            $table->unsignedInteger('height');
			$table->unsignedInteger('created_by')->nullable();
			$table->timestamp('created_at')->nullable();
			$table->ipAddress('created_ip')->nullable();
			$table->unsignedInteger('updated_by')->nullable();
			$table->timestamp('updated_at')->nullable();
			$table->ipAddress('updated_ip')->nullable();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('someline_images');
	}

}

redpajama_set_name: RedPajamaGithub


text:
using Microsoft.EntityFrameworkCore.Migrations;

namespace GraphQL.DataLoader.StarWars.Migrations
{
    public partial class Initial : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {

        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {

        }
    }
}


text:
module Pushbit
  class ActionCreator
    attr_reader :repo, :task

    def initialize(repo, task)
      @repo = repo
      @task = task
    end

    def self.issue(repo, task, params)
      new(repo, task).issue(params)
    end

    def self.pull_request(repo, task, params)
      new(repo, task).pull_request(params)
    end

    def self.line_comment(repo, task, params)
      new(repo, task).line_comment(params)
    end

    def issue(params)
      task = @task
      title = params["title"]
      body = params["body"]

      response = client.create_issue(
        task.repo.github_full_name,
        title,
        body,
        labels: task.labels.join(",")
      )

      action = Action.create!({
        kind: 'issue',
        title: title,
        body: body,
        repo_id: task.repo_id,
        task_id: task.id,
        github_id: response.id,
        github_url: response.html_url
      }, without_protection: true)

      action
    end

    def pull_request(params)
      repo = @repo
      task = @task
      title = params["title"]
      body = params["body"]

      # check if the branch we're basing off still has an open
      # pull request - if not, then no more work is needed.
      if task.trigger.kind == 'pull_request_opened'
        pr = client.pull_request(task.repo.github_full_name, task.trigger.payload['number'])
        if pr.state != 'open'
          logger.info "Pull request #{task.trigger.payload['number']} no longer open"
          return
        end
      end

      response = client.create_pull_request(
        repo.github_full_name,
        params["base_branch"],
        task.branch,
        title,
        body,
        labels: task.labels.join(",")
      )

      action = Action.create!({
        kind: 'pull_request',
        title: title,
        body: body,
        repo_id: task.repo_id,
        task_id: task.id,
        github_id: response.id,
        github_url: response.html_url
      }, without_protection: true)

      action
    rescue Octokit::UnprocessableEntity => e
      unless e.message.match 'A pull request already exists'
        raise e # capture in sentry
      end
    end

    def line_comment(params)
      task = @task

      action = Action.find_by({
        identifier: params["identifier"],
        trigger_id: task.trigger_id
      })

      return action if action.present?

      response = client.create_pull_request_comment(
        task.repo.github_full_name,
        task.trigger.payload["number"],
        params["body"],
        task.trigger.payload["pull_request"]["head"]["sha"],
        params["path"],
        params["line"]
      )

      Action.create!({
        identifier: params["identifier"],
        trigger_id: task.trigger_id,
        kind: 'line_comment',
        body: params[:body],
        repo_id: task.repo_id,
        task_id: task.id,
        github_id: response.id,
        github_url: response.html_url
      })
    end

    def client
      @client ||= Octokit::Client.new(:access_token => ENV.fetch("GITHUB_TOKEN"))
    end
  end
end


text:
<Type Name="SegmentedBar+Segment" FullName="Hyena.Widgets.SegmentedBar+Segment">
  <TypeSignature Language="C#" Value="public class SegmentedBar.Segment" />
  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi beforefieldinit SegmentedBar/Segment extends System.Object" />
  <AssemblyInfo>
    <AssemblyName>Hyena.Gui</AssemblyName>
    <AssemblyVersion>1.3.1.0</AssemblyVersion>
    <AssemblyVersion>1.4.0.0</AssemblyVersion>
    <AssemblyVersion>1.5.0.0</AssemblyVersion>
    <AssemblyVersion>2.4.0.0</AssemblyVersion>
  </AssemblyInfo>
  <Base>
    <BaseTypeName>System.Object</BaseTypeName>
  </Base>
  <Interfaces />
  <Docs>
    To be added.
    <remarks>To be added.</remarks>
  </Docs>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public Segment (string title, double percent, Cairo.Color color);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string title, float64 percent, valuetype Cairo.Color color) cil managed" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.3.1.0</AssemblyVersion>
        <AssemblyVersion>1.4.0.0</AssemblyVersion>
        <AssemblyVersion>1.5.0.0</AssemblyVersion>
        <AssemblyVersion>2.4.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Parameters>
        <Parameter Name="title" Type="System.String" />
        <Parameter Name="percent" Type="System.Double" />
        <Parameter Name="color" Type="Cairo.Color" />
      </Parameters>
      <Docs>
        <param name="title">To be added.</param>
        <param name="percent">To be added.</param>
        <param name="color">To be added.</param>
        To be added.
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public Segment (string title, double percent, Cairo.Color color, bool showInBar);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string title, float64 percent, valuetype Cairo.Color color, bool showInBar) cil managed" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.3.1.0</AssemblyVersion>
        <AssemblyVersion>1.4.0.0</AssemblyVersion>
        <AssemblyVersion>1.5.0.0</AssemblyVersion>
        <AssemblyVersion>2.4.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Parameters>
        <Parameter Name="title" Type="System.String" />
        <Parameter Name="percent" Type="System.Double" />
        <Parameter Name="color" Type="Cairo.Color" />
        <Parameter Name="showInBar" Type="System.Boolean" />
      </Parameters>
      <Docs>
        <param name="title">To be added.</param>
        <param name="percent">To be added.</param>
        <param name="color">To be added.</param>
        <param name="showInBar">To be added.</param>
        To be added.
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="Color">
      <MemberSignature Language="C#" Value="public Cairo.Color Color { get; set; }" />
      <MemberSignature Language="ILAsm" Value=".property instance valuetype Cairo.Color Color" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.3.1.0</AssemblyVersion>
        <AssemblyVersion>1.4.0.0</AssemblyVersion>
        <AssemblyVersion>1.5.0.0</AssemblyVersion>
        <AssemblyVersion>2.4.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Cairo.Color</ReturnType>
      </ReturnValue>
      <Docs>
        To be added.
        <value>To be added.</value>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="Percent">
      <MemberSignature Language="C#" Value="public double Percent { get; set; }" />
      <MemberSignature Language="ILAsm" Value=".property instance float64 Percent" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.3.1.0</AssemblyVersion>
        <AssemblyVersion>1.4.0.0</AssemblyVersion>
        <AssemblyVersion>1.5.0.0</AssemblyVersion>
        <AssemblyVersion>2.4.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Double</ReturnType>
      </ReturnValue>
      <Docs>
        To be added.
        <value>To be added.</value>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="ShowInBar">
      <MemberSignature Language="C#" Value="public bool ShowInBar { get; set; }" />
      <MemberSignature Language="ILAsm" Value=".property instance bool ShowInBar" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.3.1.0</AssemblyVersion>
        <AssemblyVersion>1.4.0.0</AssemblyVersion>
        <AssemblyVersion>1.5.0.0</AssemblyVersion>
        <AssemblyVersion>2.4.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Docs>
        To be added.
        <value>To be added.</value>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="Title">
      <MemberSignature Language="C#" Value="public string Title { get; set; }" />
      <MemberSignature Language="ILAsm" Value=".property instance string Title" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.3.1.0</AssemblyVersion>
        <AssemblyVersion>1.4.0.0</AssemblyVersion>
        <AssemblyVersion>1.5.0.0</AssemblyVersion>
        <AssemblyVersion>2.4.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.String</ReturnType>
      </ReturnValue>
      <Docs>
        To be added.
        <value>To be added.</value>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
  </Members>
</Type>


text:
package com.atilika.kuromoji.buffer;

import java.util.*;

public class FeatureInfoMap {

    private Map<String, Integer> featureMap = new HashMap<>();

    private int maxValue = 0;

    public List<Integer> mapFeatures(List<String> allPosFeatures) {
        List<Integer> posFeatureIds = new ArrayList<>();
        for (String feature : allPosFeatures) {
            if (featureMap.containsKey(feature)) {
                posFeatureIds.add(featureMap.get(feature));
            } else {
                featureMap.put(feature, maxValue);
                posFeatureIds.add(maxValue);
                maxValue++;
            }
        }
        return posFeatureIds;
    }

    public TreeMap<Integer, String> invert() {
        TreeMap<Integer, String> features = new TreeMap<>();

        for (String key : featureMap.keySet()) {
            features.put(featureMap.get(key), key);
        }

        return features;
    }

    public int getEntryCount() {
        return maxValue;
    }

    @Override
    public String toString() {
        return "FeatureInfoMap{" +
            "featureMap=" + featureMap +
            ", maxValue=" + maxValue +
            '}';
    }
}


text:
package example;

import java.util.HashSet;

import akka.basicActors.ActorOptions;
import akka.basicActors.LoggingMode;
import example.aggregator.AggregatorModel;
import example.commericalComponents.CommercialBuildingModel;
import example.farmComponents.FarmModel;
import example.houseComponents.HouseModel;
import example.solarComponents.SolarModel;
import example.streetLights.StreetLightsModel;

/**
 *
 * The ActorFactory initializes the Actors with the corresponding BehaviorModels
 *
 * @author bytschkow
 *
 */
public abstract class HelperClassForCreation {

		public static ActorOptions createFarm(double jahresVerbrauch){
		ActorOptions result = new ActorOptions(LoggingMode.MINIMAL,
				new HashSet<String>(),new HashSet<String>(),new HashSet<String>(),
				new FarmModel(jahresVerbrauch));
		return result;
	}

	public static ActorOptions createCommercial(double jahresVerbrauch){
		ActorOptions result = new ActorOptions(LoggingMode.MINIMAL,
				new HashSet<String>(),new HashSet<String>(),new HashSet<String>(),
				new CommercialBuildingModel(jahresVerbrauch));
		return result;
	}

	public static ActorOptions createHouse(double jahresVerbrauch){
		ActorOptions result = new ActorOptions(LoggingMode.MINIMAL,
				new HashSet<String>(),new HashSet<String>(),new HashSet<String>(),
				new HouseModel(jahresVerbrauch));
		return result;
	}

	public static ActorOptions createAggregator(){
		ActorOptions result = new ActorOptions(LoggingMode.MINIMAL,
				new HashSet<String>(),new HashSet<String>(),new HashSet<String>(),
				new AggregatorModel());
		return result;
	}

	public static ActorOptions createStreetLights(double jahresVerbrauch) {
		ActorOptions result = new ActorOptions(LoggingMode.MINIMAL,
				new HashSet<String>(),new HashSet<String>(),new HashSet<String>(),
				new StreetLightsModel(jahresVerbrauch));
		return result;
	}

	public static ActorOptions createSolar(double jahresVerbrauch) {
		ActorOptions result = new ActorOptions(LoggingMode.MINIMAL,
				new HashSet<String>(),new HashSet<String>(),new HashSet<String>(),
				new SolarModel(jahresVerbrauch));
		return result;
	}
}


text:
require "rspec/expectations"

RSpec::Matchers.define(:eq_time) do |t1|
  match do |t2|
    t1.strftime("%F %T") == t2.strftime("%F %T")
  end
end

RSpec::Matchers.define(:have_apex_domain) do |_subdomain|
  match do |url|
    url =~ %r{\Ahttp://#{Settings.url.host}}
  end
end

RSpec::Matchers.define(:have_subdomain) do |subdomain|
  match do |url|
    subdomain += "." unless subdomain.nil?
    url =~ %r{\Ahttp://#{subdomain}#{Settings.url.host}}
  end
end

RSpec::Matchers.define(:have_subdomain_and_path) do |subdomain, path|
  match do |url|
    subdomain += "." unless subdomain.nil?
    url =~ %r{\Ahttp://#{subdomain}#{Settings.url.host}(:#{Settings.url.port})?#{Regexp.escape(path)}\z}
  end
end

RSpec::Matchers.define(:have_errors) do |errors|
  match do |object|
    object.invalid? && errors.all? do |field, pattern|
      pattern.nil? ? object.errors[field].empty? : object.errors[field].join.match?(pattern)
    end
  end
  failure_message do |object|
    if object.valid?
      "expected object to be invalid but it was valid"
    else
      failing = errors.detect { |f, p| !object.errors[f].join.match?(p) }
      "expected errors on #{failing[0]} to match #{failing[1].inspect} "\
        "but was #{object.errors[failing[0]].inspect}"
    end
  end
end


text:
var uuid = require('uuid');

var ct = require('../crud-test.js');

var entity = {
    id: uuid.v1(),
    logo: 'atLogo',
    logoThumbnail: 'atLogoThumbnail',
    firstName: 'atFirstName',
    lastName: 'atLastName',
    username: 'atUsername',
    password: 'atPassword',
    phone: 'atPhone',
    email: 'atEmail'
};
var change = {
    logo: 'AtLogo',
    logoThumbnail: 'AtLogoThumbnail',
    firstName: 'AtFirstName',
    lastName: 'AtLastName',
    username: 'AtUsername',
    password: 'AtPassword',
    phone: 'AtPhone',
    email: 'AtEmail'
};
ct.crudTest('user', entity, change, ['password']);


text:
package com.voxeo.moho.presence.sip.impl.notifybody;

public class PIDFNotifyBody extends SimpleNotifyBody {

  public PIDFNotifyBody(String content) {
    super(content);
  }

  public PIDFNotifyBody(String encoding, byte[] content) {
    super(encoding, content);
  }

  @Override
  public String getName() {
    return "application/pidf+xml";
  }
}


text:
package org.apache.commons.pipeline.driver.control;

import java.util.ArrayList;
import java.util.EventObject;
import java.util.List;
import org.apache.commons.pipeline.Pipeline;
import org.apache.commons.pipeline.StageEventListener;
import org.apache.commons.pipeline.PipelineLifecycleJob;

/**
 *
 */
public class CountingDriverController extends AbstractDriverController implements PipelineLifecycleJob {

    // flag used to signal that controller thread should stop
    private volatile boolean running;

    /** Creates a new instance of AbstractPriorityController */
    public CountingDriverController() { }

    public void onStart(Pipeline pipeline) {
        if (pipeline != null) pipeline.registerListener(CountingDriverController.this);
        running = true;

        new Thread() {
            public void run() {
                while (running) {
                    List<StageProcessTimingEvent> eventsToHandle;
                    synchronized(CountingDriverController.this) {
                        while (events.size() < minimumEventsToHandle && running) {
                            try {
                                CountingDriverController.this.wait();
                            } catch (InterruptedException e) {
                                throw new Error("Assertion failure: interrupted while waiting for events", e);
                            }
                        }

                        eventsToHandle = events;
                        events = new ArrayList<StageProcessTimingEvent>();
                    }

                    driverControl.handleEvents(drivers, eventsToHandle);
                }
            }
        }.start();
    }

    /**
     * Holds value of property minimumEventsToHandle.
     */
    private int minimumEventsToHandle;

    /**
     * Getter for property minimumEventsToHandle.
     * @return Value of property minimumEventsToHandle.
     */
    public int getMinimumEventsToHandle() {
        return this.minimumEventsToHandle;
    }

    /**
     * Setter for property minimumEventsToHandle.
     * @param minimumEventsToHandle New value of property minimumEventsToHandle.
     */
    public void setMinimumEventsToHandle(int minimumEventsToHandle) {
        this.minimumEventsToHandle = minimumEventsToHandle;
    }

    public void onFinish(Pipeline pipeline) {
        this.running = false;
    }
}


text:
<?php
ini_set('display_errors', 1);

session_start();

@$path = $_GET['path'];
if (!preg_match('/^[a-z\-]+\/[a-z0-9\-\.]+\/[a-z0-9\-,]+$/', $path)) {
	die ('Invalid sample path input');
}

$fullpath = dirname(__FILE__) . '/../../samples/' . $path;

// Get source
$html = @file_get_contents("$fullpath/demo.html");
$css = @file_get_contents("$fullpath/demo.css");
$js = @file_get_contents("$fullpath/demo.js");

?>

	<link href="//cdnjs.cloudflare.com/ajax/libs/codemirror/4.0.3/codemirror.min.css" rel="stylesheet" type="text/css" />

HTML

		<textarea id="html"><?php echo $html; ?></textarea>

	<?php if ($css) : ?>

CSS

		<textarea id="css"><?php echo $css; ?></textarea>

	<?php endif ?>

JavaScript

		<textarea id="js"><?php echo $js; ?></textarea>


text:
<?xml version="1.0" encoding="UTF-8"?>
<!-- EN-Revision: 20774 -->
<!-- Reviewed: no -->
<sect2 id="zend.filter.set.null">
    <title>Null</title>

    <para>
        Ce filtre retournera la valeur <constant>NULL</constant> si des critères précis sont rencontrés.
        C'est souvent nécessaire lorsqu'on travaille avec des bases de données et que l'on souhaite une
        valeur <constant>NULL</constant> plutôt qu'un booléen ou tout autre type.
    </para>

    <sect3 id="zend.filter.set.null.default">
        <title>Comportement par défaut de Zend_Filter_Null</title>

        <para>
            Par défaut, ce filtre fonctionne comme la fonction <acronym>PHP</acronym>
            <methodname>empty()</methodname>. Donc si
            <methodname>empty()</methodname> retourne true sur la valeur, alors
            <constant>NULL</constant> sera retourné par ce filtre
        </para>

        <programlisting language="php"><![CDATA[
$filter = new Zend_Filter_Null();
$value  = '';
$result = $filter->filter($value);
// retourne null plutôt que la chaine vide
]]></programlisting>

        <para>
            Ceci signifie qu'en l'absence d'une configuration spéciale,
            <classname>Zend_Filter_Null</classname> accepte tout type en entrée et retourne
            <constant>NULL</constant> dans les mêmes cas que <methodname>empty()</methodname>.
        </para>

        <para>
            Toute autre valeur sera retournée telle quelle, sans aucune modification.
        </para>
    </sect3>

    <sect3 id="zend.filter.set.null.types">
        <title>Changer le comportement de Zend_Filter_Null</title>

        <para>
            Quelques fois ça ne suffit pas de filtrer en se basant sur <methodname>empty()</methodname>. Ainsi,
            <classname>Zend_Filter_Null</classname> permet de déclarer quels types seront convertis.
        </para>

        <para>
            Les types suivants sont gérés:
        </para>

        <itemizedlist>
            <listitem>
                <para>
                    <emphasis>booleen</emphasis>: Convertit le booléen
                    <emphasis><constant>FALSE</constant></emphasis> en
                    <constant>NULL</constant>.
                </para>
            </listitem>

            <listitem>
                <para>
                    <emphasis>entier</emphasis>: Convertit l'entier <emphasis>0</emphasis> en
                    <constant>NULL</constant>.
                </para>
            </listitem>

            <listitem>
                <para>
                    <emphasis>tableau_vide</emphasis>: Convertit le <emphasis>tableau</emphasis> vide
                    en <constant>NULL</constant>.
                </para>
            </listitem>

            <listitem>
                <para>
                    <emphasis>chaine</emphasis>: Convertit la chaine vide <emphasis>''</emphasis> en
                    <constant>NULL</constant>.
                </para>
            </listitem>

            <listitem>
                <para>
                    <emphasis>zero</emphasis>: Convertit la chaine zéro
                     (<emphasis>'0'</emphasis>) en <constant>NULL</constant>.
                </para>
            </listitem>

            <listitem>
                <para>
                    <emphasis>tout</emphasis>: Convertit tous les types cités en <constant>NULL</constant>.
                    (comportement par défaut).
                </para>
            </listitem>
        </itemizedlist>

        <para>
            Il existe plusieurs manières de spécifier les types à filtrer, des constantes, des types ajoutés
            à la suite, des chaines de caractères, un tableau... Voyez les exemples suivants:
        </para>

        <programlisting language="php"><![CDATA[
// convertit false en null
$filter = new Zend_Filter_Null(Zend_Filter_Null::BOOLEAN);

// convertit false et 0 en null
$filter = new Zend_Filter_Null(
    Zend_Filter_Null::BOOLEAN + Zend_Filter_Null::INTEGER
);

// convertit false et 0 en null
$filter = new Zend_Filter_Null( array(
    Zend_Filter_Null::BOOLEAN,
    Zend_Filter_Null::INTEGER
));

// convertit false et 0 en null
$filter = new Zend_Filter_Null(array(
    'boolean',
    'integer',
));
]]></programlisting>

        <para>
            Un objet <classname>Zend_Config</classname> peut aussi être utilisé pour préciser les types.
            La méthode <methodname>setType()</methodname> existe de même.
        </para>
    </sect3>
</sect2>
<!--
vim:se ts=4 sw=4 et:
-->


text:
<?php
namespace SimpleCrud\Tests;

use PDO;
use SimpleCrud\Row;
use SimpleCrud\RowCollection;

class RowCollectionTest extends AbstractTestCase
{
    private function createDatabase()
    {
        return $this->createSqliteDatabase([
            <<<'EOT'
CREATE TABLE "post" (
    `id`          INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
    `title`       TEXT
);
EOT
            ,
            <<<'EOT'
CREATE TABLE "category" (
    `id`          INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
    `name`        TEXT,
    `category_id` INTEGER
);
EOT
            ,
            <<<'EOT'
CREATE TABLE "comment" (
    `id`          INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
    `text`        TEXT,
    `post_id`     INTEGER
);
EOT
            ,
            <<<'EOT'
CREATE TABLE "category_post" (
    `id`          INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
    `category_id` INTEGER NOT NULL,
    `post_id`     INTEGER NOT NULL
);
EOT
        ]);
    }

    private function createSeededDatabase()
    {
        $db = $this->createDatabase();

        $db->post[] = ['title' => 'First post'];
        $db->post[] = ['title' => 'Second post'];
        $db->post[] = ['title' => 'Third post'];

        $db->comment[] = ['text' => 'Comment 1 of first post', 'post_id' => 1];
        $db->comment[] = ['text' => 'Comment 1 of second post', 'post_id' => 2];
        $db->comment[] = ['text' => 'Comment 2 of second post', 'post_id' => 2];

        $db->category[] = ['name' => 'Category 1'];
        $db->category[] = ['name' => 'Category 2'];
        $db->category[] = ['name' => 'Category 2 - subcategory', 'category_id' => 2];

        $db->category_post[] = ['category_id' => 1, 'post_id' => 1];
        $db->category_post[] = ['category_id' => 2, 'post_id' => 1];
        $db->category_post[] = ['category_id' => 3, 'post_id' => 3];

        return $db;
    }

    public function testRowCollection()
    {
        $db = $this->createSeededDatabase();

        $posts = $db->post->select()->run();

        $this->assertSame($db->post, $posts->getTable());
        $this->assertInstanceOf(RowCollection::class, $posts);
        $this->assertInstanceOf(Row::class, $posts[1]);
        $this->assertSame($db->post[1], $posts[1]);
        $this->assertCount(3, $posts);

        $titles = $posts->title;

        $this->assertIsArray($titles);
        $this->assertCount(3, $titles);
        $this->assertSame($posts[3]->title, $titles[3]);

        $posts->title = 'Same title';

        $this->assertSame('Same title', $db->post[1]->title);
        $this->assertSame('Same title', $posts[2]->title);

        $this->assertTrue(isset($posts->title));
        $this->assertTrue(isset($posts[1]));
        $this->assertFalse(isset($posts->foo));
        $this->assertFalse(isset($posts[4]));

        $array = [
            1 => ['id' => 1, 'title' => 'Same title'],
            2 => ['id' => 2, 'title' => 'Same title'],
            3 => ['id' => 3, 'title' => 'Same title'],
        ];

        $this->assertEquals($array, $posts->toArray(true));

        $this->assertSame(
            'First post',
            $db->execute('SELECT title FROM post WHERE id = 1')->fetch(PDO::FETCH_COLUMN)
        );

        $posts->save();

        $this->assertSame(
            'Same title',
            $db->execute('SELECT title FROM post WHERE id = 1')->fetch(PDO::FETCH_COLUMN)
        );

        $posts->delete();

        $this->assertEquals(
            0,
            $db->execute('SELECT COUNT(*) FROM post')->fetch(PDO::FETCH_COLUMN)
        );
    }

    public function testRowCollectionHasOneRelations()
    {
        $db = $this->createSeededDatabase();

        $posts = $db->post->select()->run();
        $comments = $posts->comment;

        $this->assertCount(3, $posts);
        $this->assertCount(3, $comments);

        $post_1 = $posts[1]->__debugInfo();
        $post_2 = $posts[2]->__debugInfo();
        $post_3 = $posts[3]->__debugInfo();

        $comment_1 = $comments[1]->__debugInfo();
        $comment_2 = $comments[2]->__debugInfo();
        $comment_3 = $comments[3]->__debugInfo();

        $this->assertCount(1, $post_1['data']['comment']);
        $this->assertCount(2, $post_2['data']['comment']);
        $this->assertCount(0, $post_3['data']['comment']);

        $this->assertSame($db->post[1], $comment_1['data']['post']);
        $this->assertSame($db->post[2], $comment_2['data']['post']);
        $this->assertSame($db->post[2], $comment_3['data']['post']);
    }

    public function testRowCollectionHasManyRelations()
    {
        $db = $this->createSeededDatabase();

        $comments = $db->comment->select()->run();
        $posts = $comments->post;

        $this->assertCount(2, $posts);
        $this->assertCount(3, $comments);

        $post_1 = $posts[1]->__debugInfo();
        $post_2 = $posts[2]->__debugInfo();

        $comment_1 = $comments[1]->__debugInfo();
        $comment_2 = $comments[2]->__debugInfo();
        $comment_3 = $comments[3]->__debugInfo();

        $this->assertCount(1, $post_1['data']['comment']);
        $this->assertCount(2, $post_2['data']['comment']);

        $this->assertSame($db->post[1], $comment_1['data']['post']);
        $this->assertSame($db->post[2], $comment_2['data']['post']);
        $this->assertSame($db->post[2], $comment_3['data']['post']);
    }

    public function testRowCollectionHasManyToManyRelations()
    {
        $db = $this->createSeededDatabase();

        $categories = $db->category->select()->run();
        $category_post = $db->category_post->select()->run();
        $posts = $categories->post;

        $this->assertCount(2, $posts);
        $this->assertCount(3, $categories);
        $this->assertCount(3, $category_post);

        $post_1 = $posts[1]->__debugInfo();
        $post_3 = $posts[3]->__debugInfo();

        $category_1 = $categories[1]->__debugInfo();
        $category_2 = $categories[2]->__debugInfo();
        $category_3 = $categories[3]->__debugInfo();

        $category_post_1 = $category_post[1]->__debugInfo();
        $category_post_2 = $category_post[2]->__debugInfo();
        $category_post_3 = $category_post[3]->__debugInfo();

        $this->assertCount(2, $post_1['data']['category']);
        $this->assertCount(1, $post_3['data']['category']);

        $this->assertCount(1, $category_1['data']['post']);
        $this->assertCount(1, $category_2['data']['post']);
        $this->assertCount(1, $category_3['data']['post']);

        $this->assertSame($posts[1], $category_post_1['data']['post']);
        $this->assertSame($posts[1], $category_post_2['data']['post']);
        $this->assertSame($posts[3], $category_post_3['data']['post']);

        $this->assertSame($categories[1], $category_post_1['data']['category']);
        $this->assertSame($categories[2], $category_post_2['data']['category']);
        $this->assertSame($categories[3], $category_post_3['data']['category']);
    }
}


text:
package io.druid.data.input.impl;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Function;

import io.druid.java.util.common.parsers.TimestampParser;

import org.joda.time.DateTime;

import java.util.List;
import java.util.Map;
import java.util.Objects;

/**
 */
public class TimestampSpec
{
  private static class ParseCtx
  {
    Object lastTimeObject = null;
    DateTime lastDateTime = null;
  }

  private static final String DEFAULT_COLUMN = "timestamp";
  private static final String DEFAULT_FORMAT = "auto";
  private static final DateTime DEFAULT_MISSING_VALUE = null;

  private final String timestampColumn;
  private final String timestampFormat;
  // this value should never be set for production data
  private final DateTime missingValue;
  /** This field is a derivative of {@link #timestampFormat}; not checked in {@link #equals} and {@link #hashCode} */
  private final Function<Object, DateTime> timestampConverter;

  // remember last value parsed
  private transient ParseCtx parseCtx = new ParseCtx();

  @JsonCreator
  public TimestampSpec(
      @JsonProperty("column") String timestampColumn,
      @JsonProperty("format") String format,
      // this value should never be set for production data
      @JsonProperty("missingValue") DateTime missingValue
  )
  {
    this.timestampColumn = (timestampColumn == null) ? DEFAULT_COLUMN : timestampColumn;
    this.timestampFormat = format == null ? DEFAULT_FORMAT : format;
    this.timestampConverter = TimestampParser.createObjectTimestampParser(timestampFormat);
    this.missingValue = missingValue == null
                        ? DEFAULT_MISSING_VALUE
                        : missingValue;
  }

  @JsonProperty("column")
  public String getTimestampColumn()
  {
    return timestampColumn;
  }

  @JsonProperty("format")
  public String getTimestampFormat()
  {
    return timestampFormat;
  }

  @JsonProperty("missingValue")
  public DateTime getMissingValue()
  {
    return missingValue;
  }

  public DateTime extractTimestamp(Map<String, Object> input)
  {
    return parseDateTime(input.get(timestampColumn));
  }

  public DateTime parseDateTime(Object input)
  {
    DateTime extracted = missingValue;
    if (input != null) {
      // Check if the input is equal to the last input, so we don't need to parse it again
      if (input.equals(parseCtx.lastTimeObject)) {
        extracted = parseCtx.lastDateTime;
      } else {
        ParseCtx newCtx = new ParseCtx();
        newCtx.lastTimeObject = input;
        extracted = timestampConverter.apply(input);
        newCtx.lastDateTime = extracted;
        parseCtx = newCtx;
      }
    }
    return extracted;
  }

  @Override
  public boolean equals(Object o)
  {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }

    TimestampSpec that = (TimestampSpec) o;

    if (!timestampColumn.equals(that.timestampColumn)) {
      return false;
    }
    if (!timestampFormat.equals(that.timestampFormat)) {
      return false;
    }
    return !(missingValue != null ? !missingValue.equals(that.missingValue) : that.missingValue != null);

  }

  @Override
  public int hashCode()
  {
    int result = timestampColumn.hashCode();
    result = 31 * result + timestampFormat.hashCode();
    result = 31 * result + (missingValue != null ? missingValue.hashCode() : 0);
    return result;
  }

  @Override
  public String toString()
  {
    return "TimestampSpec{" +
           "timestampColumn='" + timestampColumn + '\'' +
           ", timestampFormat='" + timestampFormat + '\'' +
           ", missingValue=" + missingValue +
           '}';
  }

  //simple merge strategy on timestampSpec that checks if all are equal or else
  //returns null. this can be improved in future but is good enough for most use-cases.
  public static TimestampSpec mergeTimestampSpec(List<TimestampSpec> toMerge) {
    if (toMerge == null || toMerge.size() == 0) {
      return null;
    }

    TimestampSpec result = toMerge.get(0);
    for (int i = 1; i < toMerge.size(); i++) {
      if (toMerge.get(i) == null) {
        continue;
      }
      if (!Objects.equals(result, toMerge.get(i))) {
        return null;
      }
    }

    return result;
  }
}


text:
FOUNDATION_EXPORT double Pods_PBComponentDemoTestsVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_PBComponentDemoTestsVersionString[];


text:
planet-kubb-scoring-web-app
===========================

Planet Kubb Scoring Web App


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

class Home extends MX_Controller {
    public function index()
    {
        $this->load->view('tpl_index');
    }
}


text:
FROM python:3.6-alpine
MAINTAINER David Muto <david.muto@gmail.com>
ENV REFRESHED_AT 2017-01-27

RUN pip install --upgrade pip
RUN pip install termcolor && mkdir -p /kazoom

ADD ./kazurator-*.whl ./
ADD ./kazoom ./kazoom
RUN pip install kazurator-*.whl

ENTRYPOINT ["python"]
CMD ["-m", "kazoom"]


text:
package org.edx.mobile.task;

import android.content.Context;

import org.edx.mobile.base.MainApplication;
import org.edx.mobile.http.OkHttpUtil;
import org.edx.mobile.model.course.CourseComponent;
import org.edx.mobile.module.prefs.PrefManager;

import java.util.Date;

public abstract class GetCourseStructureTask extends
Task<CourseComponent> {

    String courseId;

    public GetCourseStructureTask(Context context, String courseId) {
        super(context);
        this.courseId = courseId;
    }

    public CourseComponent call( ) throws Exception{
        try {

            if(courseId!=null){
                PrefManager.UserPrefManager prefManager = new PrefManager.UserPrefManager(MainApplication.instance());
                long lastFetchTime = prefManager.getLastCourseStructureFetch(courseId);
                long curTime = new Date().getTime();
                OkHttpUtil.REQUEST_CACHE_TYPE useCacheType = OkHttpUtil.REQUEST_CACHE_TYPE.PREFER_CACHE;
                //if last fetch happened over one hour ago, re-fetch data
                if ( lastFetchTime + 3600 * 1000 < curTime ){
                    useCacheType =  OkHttpUtil.REQUEST_CACHE_TYPE.IGNORE_CACHE;;
                    prefManager.setLastCourseStructureFetch(courseId, curTime);
                }
                final CourseComponent model = environment.getServiceManager().getCourseStructure(courseId, useCacheType);
                if (model != null) {
                    handler.post(new Runnable() {
                        public void run() {
                            try {
                                onSuccess(model);
                            } catch (Exception e) {
                                handle(e);
                                logger.error(e);
                            }
                            stopProgress();
                        }
                    });
                }
            }
        } catch (Exception ex) {
            handle(ex);
            logger.error(ex, true);
        }
        return null;
    }
}


text:
.. _development:

Developing Pecan Applications Locally
=====================================

.. include:: reload.rst
    :start-after: #reload

Debugging Pecan Applications
----------------------------

Pecan comes with simple debugging middleware for helping diagnose problems
in your applications. To enable the debugging middleware, simply set the
``debug`` flag to ``True`` in your configuration file::

    app = {
        ...
        'debug': True,
        ...
    }

Once enabled, the middleware will automatically catch exceptions raised by your
application and display the Python stack trace and WSGI environment in your
browser for easy debugging:

.. figure:: debug-middleware-1.png
   :alt: Pecan debug middleware sample output.
   :width: 90%

To further aid in debugging, the middleware includes the ability to repeat the
offending request, automatically inserting a breakpoint, and dropping your
console into the Python debugger, ``pdb``:

.. figure:: debug-middleware-2.png
   :alt: Pecan debug middleware request debugger.

.. seealso::

  Refer to the `pdb documentation
  <http://docs.python.org/library/pdb.html>`_ for more information on
  using the Python debugger.

Serving Static Files
--------------------

Pecan comes with simple file serving middleware for serving CSS, Javascript,
images, and other static files.  You can configure it by ensuring that the
following options are specified in your configuration file:

::

    app = {
        ...
        'debug': True,
        'static_root': '%(confdir)/public
    }

where ``static_root`` is an absolute pathname to the directory in which your
static files live.  For convenience, the path may include the ``%(confdir)``
variable, which Pecan will substitute with the absolute path of your
configuration file at runtime.

.. note::

    In production, ``app.debug`` should *never* be set to ``True``, so you'll
    need to serve your static files via your production web server.


text:
package net.paslavsky.msm.client.activity;

import com.google.gwt.core.client.JsArray;
import com.google.gwt.http.client.URL;
import com.google.gwt.place.shared.PlaceChangeEvent;
import com.google.gwt.place.shared.PlaceController;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.google.web.bindery.event.shared.EventBus;
import net.paslavsky.msm.client.ajax.Ajax;
import net.paslavsky.msm.client.ajax.Configuration;
import net.paslavsky.msm.client.domain.AudioFile;
import net.paslavsky.msm.client.domain.Directory;
import net.paslavsky.msm.client.domain.MediaItem;
import net.paslavsky.msm.client.event.OpenDirectoryEvent;
import net.paslavsky.msm.client.event.OpenDirectoryEventHandler;
import net.paslavsky.msm.client.place.MusicPlace;
import net.paslavsky.msm.client.Factory;
import net.paslavsky.msm.client.ui.music.MusicView;

import java.util.Collections;
import java.util.Map;

/**
 * Activity for {@link net.paslavsky.msm.client.ui.music.MusicView music view}
 *
 * @author Andrey Paslavsky
 * @version 1.0
 */
@Singleton
public class MusicActivity extends AbstractActivity<MusicView>
        implements PlaceChangeEvent.Handler, OpenDirectoryEventHandler {
    private final Ajax ajax;
    private final MusicView view;
    private PlaceController placeController;

    @Inject
    public MusicActivity(EventBus eventBus, MusicView view, Factory factory) {
        super(eventBus, view);
        this.view = view;
        ajax = factory.ajax("/api/content?directory=:path", Ajax.GET);
    }

    @Override
    protected void registerEventHandlers(EventBus eventBus) {
        eventBus.addHandler(PlaceChangeEvent.TYPE, this);
        eventBus.addHandler(OpenDirectoryEvent.TYPE, this);
    }

    @Override
    public void onPlaceChange(PlaceChangeEvent event) {
        if (!(event.getNewPlace() instanceof MusicPlace)) {
            return;
        }

        final MusicPlace newPlace = (MusicPlace) event.getNewPlace();
        view.setCurrentPlace(newPlace.getPath());
        ajax.execute(new Configuration<JsArray<MediaItem>>() {
            @Override
            public void success(JsArray<MediaItem> response) {
                showContent(response);
            }

            @Override
            public Map<String, String> parameters() {
                return Collections.singletonMap("path", URL.encode(newPlace.getPath()));
            }
        });
    }

    private void showContent(JsArray<MediaItem> items) {
        view.clearList();
        for (int i = 0; i < items.length(); i++) {
            MediaItem item = items.get(i);
            switch (item.getCategory()) {
                case AudioFile:
                    view.addAudioFile(item.<AudioFile>cast());
                    break;
                case Directory:
                    view.addDirectory(item.<Directory>cast());
                    break;
            }
        }
    }

    @Override
    public void onOpenDirectory(OpenDirectoryEvent event) {
        placeController.goTo(new MusicPlace(event.getDirectory().getPath()));
    }

    @Inject
    public void setPlaceController(PlaceController placeController) {
        this.placeController = placeController;
    }
}


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <title>matemnik</title>
  <meta content="matemnik" property="og:title">
  <meta content="width=device-width, initial-scale=1" name="viewport">
  <meta content="Webflow" name="generator">
  <link href="css/normalize.css" rel="stylesheet" type="text/css">
  <link href="css/webflow.css" rel="stylesheet" type="text/css">
  <link href="css/main-try.webflow.css" rel="stylesheet" type="text/css">

  <link href="img/gaika_2.png" rel="shortcut icon" type="image/x-icon">
  <link href="img/gaika_2.png" rel="apple-touch-icon">

      гЛАВНАЯКружкиВыездные школыМатемникКонтакты

Здесь Что-нибудь Появится.

Когда-нибудь.

info@poincare.ru

8 (495) 150-30-81

Подпишись

Рассылаем новости о грядущих школах, мастер-классах и лекциях, которые мы устраиваем

            <form id="email-form-2" name="email-form-2" data-name="Email Form 2">

<input type="email" class="text-field w-input" maxlength="256" name="email-2" data-name="Email 2" placeholder="email" id="email-2" required="">

<input type="submit" value="→" data-wait="Please wait..." class="submit-button w-button">

            </form>

Thank you! Your submission has been received!

Oops! Something went wrong while submitting the form.


text:
package me.theoddpuff.anticombatlog;

import me.theoddpuff.anticombatlog.listener.EntityListener;
import me.theoddpuff.anticombatlog.listener.PlayerListener;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public class CombatPlugin extends JavaPlugin {

    private PluginConfig pluginConfig;
    private CombatManager manager;

    public void onEnable() {
        try {
            // Initialize plugin configuration
            this.pluginConfig = new PluginConfig(this);
            this.pluginConfig.startReloadTask();

            // Initialize combat manager
            this.manager = new CombatManager(this);

            // Register event listeners
            Bukkit.getPluginManager().registerEvents(new EntityListener(this), this);
            Bukkit.getPluginManager().registerEvents(new PlayerListener(this), this);

            getLogger().info("AntiCombatLog by TheOddPuff has been enabled.");
        } catch (Exception e) {
            e.printStackTrace();
            Bukkit.getPluginManager().disablePlugin(this);
        }
    }

    public void onDisable() {
        getLogger().info("AntiCombatLog by TheOddPuff has been disabled.");
    }

    public PluginConfig getPluginConfig() {
        return pluginConfig;
    }

    public CombatManager getManager() {
        return manager;
    }

}


text:
@class NSArray, NSMutableArray, NSMutableSet, NSString, SBFakeStatusBarView, SBFolder, SBFolderTitleTextField, SBIconListPageControl, SBIconListView, SBIconScrollView, SBIconViewMap, UISwipeGestureRecognizer, UITapGestureRecognizer, _UILegibilitySettings;

@interface SBFolderView : UIView <SBIconListPageControlDelegate, UITextFieldDelegate, UIGestureRecognizerDelegate, SBIconScrollViewDelegate>
{
    NSMutableArray *_iconListViews;
    NSMutableSet *_scrollingDisabledReasons;
    SBIconListView *_rotatingIconList;
    long long _minVisibleListViewIndex;
    long long _maxVisibleListViewIndex;
    long long _minAnimatingListViewIndex;
    long long _maxAnimatingListViewIndex;
    long long _disableUpdatingCurrentIconListCount;
    long long _firstDisplayedColumnOnCurrentList;
    _Bool _animatedScrolling;
    _Bool _scalingViewIsBorrowed;
    SBIconViewMap *_viewMap;
    NSMutableArray *_scrollFrames;
    unsigned long long _scrollFrameCount;
    SBIconListPageControl *_pageControl;
    SBIconScrollView *_scrollView;
    SBFolderTitleTextField *_titleTextField;
    UIView *_scalingView;
    SBFakeStatusBarView *_reachabilityStatusBar;
    UISwipeGestureRecognizer *_swipeToCancelReachabilityGestureRecognizer;
    UISwipeGestureRecognizer *_swipeToRevealNotificationCenterGestureRecognizer;
    UITapGestureRecognizer *_tapToCancelReachabilityGestureRecognizer;
    _Bool _isEditing;
    _Bool _isScrolling;
    long long _currentPageIndex;
    double _statusBarHeight;
    id <SBFolderViewDelegate> _delegate;
    SBFolder *_folder;
    long long _orientation;
    _UILegibilitySettings *_legibilitySettings;
    long long _animatingToOrientation;
    struct UIEdgeInsets _reachabilityStatusBarEdgeInsets;
}

+ (unsigned long long)_countOfAdditionalPagesToKeepVisibleInOneDirection;
+ (Class)_scrollViewClass;
@property(nonatomic) struct UIEdgeInsets reachabilityStatusBarEdgeInsets; // @synthesize reachabilityStatusBarEdgeInsets=_reachabilityStatusBarEdgeInsets;
@property(nonatomic) long long animatingToOrientation; // @synthesize animatingToOrientation=_animatingToOrientation;
@property(retain, nonatomic) _UILegibilitySettings *legibilitySettings; // @synthesize legibilitySettings=_legibilitySettings;
@property(nonatomic) long long orientation; // @synthesize orientation=_orientation;
@property(retain, nonatomic) SBFolder *folder; // @synthesize folder=_folder;
@property(nonatomic) id <SBFolderViewDelegate> delegate; // @synthesize delegate=_delegate;
@property(nonatomic) double statusBarHeight; // @synthesize statusBarHeight=_statusBarHeight;
@property(readonly, nonatomic) long long currentPageIndex; // @synthesize currentPageIndex=_currentPageIndex;
@property(readonly, nonatomic, getter=isEditing) _Bool editing; // @synthesize editing=_isEditing;
- (void)handleRevealNotificationCenterGesture:(id)arg1;
- (void)handleCancelReachabilityGesture:(id)arg1;
- (_Bool)gestureRecognizerShouldBegin:(id)arg1;
- (void)handleReachabilityActivated:(_Bool)arg1 animated:(_Bool)arg2 completion:(CDUnknownBlockType)arg3;
- (void)repositionForReachabilityActivated:(_Bool)arg1 animated:(_Bool)arg2 actions:(CDUnknownBlockType)arg3 completion:(CDUnknownBlockType)arg4;
- (double)reachabilityYOffset;
- (void)willMoveToWindow:(id)arg1;
- (void)_backgroundContrastDidChange:(id)arg1;
- (void)_updateTitleLegibilitySettings;
- (id)_legibilitySettingsWithPrimaryColor:(id)arg1;
- (void)setIconPageIndicatorImageSetCache:(id)arg1;
- (void)textFieldDidEndEditing:(id)arg1;
- (_Bool)textFieldShouldReturn:(id)arg1;
- (_Bool)textFieldShouldBeginEditing:(id)arg1;
- (void)_setFolderName:(id)arg1;
- (void)pageControl:(id)arg1 didRecieveTouchInDirection:(int)arg2;
- (void)iconScrollView:(id)arg1 willSetContentOffset:(inout struct CGPoint *)arg2;
- (void)iconScrollViewDidCancelTouchTracking:(id)arg1;
- (void)iconScrollViewWillCancelTouchTracking:(id)arg1;
- (void)scrollViewDidEndScrollingAnimation:(id)arg1;
- (void)scrollViewDidEndDecelerating:(id)arg1;
- (void)scrollViewDidEndDragging:(id)arg1 willDecelerate:(_Bool)arg2;
- (void)scrollViewDidScroll:(id)arg1;
- (void)scrollViewWillBeginDragging:(id)arg1;
- (void)didRotateFromInterfaceOrientation:(long long)arg1;
- (void)willAnimateRotationToInterfaceOrientation:(long long)arg1 duration:(double)arg2;
- (void)willRotateToInterfaceOrientation:(long long)arg1;
- (void)cleanUpAfterZoomAnimation;
- (void)prepareForZoomAnimation;
- (void)cleanupAfterClosing;
- (void)prepareToOpen;
- (_Bool)_scrollViewThinksItsScrolling;
- (void)_purgeListViews;
- (void)noteUserIsInteractingWithIcons;
- (void)noteUserHasGrabbedIcon:(_Bool)arg1;
- (void)updateIconListIndexAndVisibility:(_Bool)arg1;
- (unsigned long long)_countOfAdditionalPagesToKeepAnimatingInOneDirection;
- (long long)lowestVisibleIconListIndexAndColumn:(long long *)arg1 columnsOnScreen:(long long *)arg2 totalLists:(unsigned long long)arg3 columnsPerList:(unsigned long long)arg4;
- (void)updateIconListIndexAndVisibility;
- (void)_updateEditingStateAnimated:(_Bool)arg1;
- (void)layoutIconLists:(double)arg1 domino:(_Bool)arg2 forceRelayout:(_Bool)arg3;
- (void)updateIconListViews;
- (void)resetIconListViews;
- (void)tearDownListViews;
- (id)currentIconListView;
- (id)iconListViewForTouch:(id)arg1;
- (id)iconListViewAtPoint:(struct CGPoint)arg1;
- (id)iconListViewAtIndex:(unsigned long long)arg1;
- (long long)_pageIndexForOffset:(double)arg1;
- (struct CGRect)_iconListFrameForPageRect:(struct CGRect)arg1 atIndex:(unsigned long long)arg2;
- (struct CGSize)_scrollViewContentSize;
- (_Bool)_updatesWallpaperRelativeCenter;
- (void)_updateIconListFrames;
- (void)_updateIconListContainment:(id)arg1 atIndex:(unsigned long long)arg2;
- (void)_updateIconListViews;
- (void)_resetIconListViews;
- (void)_addIconListViewsForModels:(id)arg1;
- (id)_createIconListViewForList:(id)arg1;
- (id)_interactionTintColor;
- (id)_iconListViewForList:(id)arg1;
- (id)_iconListViewAtIndex:(unsigned long long)arg1;
- (id)_currentIconListView;
- (void)_removeIconListView:(id)arg1;
- (void)_addIconListView:(id)arg1;
- (void)_enableUserInteractionAfterSignificantAnimation;
- (void)_disableUserInteractionBeforeSignificantAnimation;
- (double)_titleFontSize;
- (_Bool)_showsTitle;
- (void)_popDisableUpdateCurrentIconListCount;
- (void)_pushDisableUpdateCurrentIconListCount;
- (_Bool)_shouldDisableUpdatingCurrentIconList;
- (_Bool)_isValidPageIndex:(long long)arg1;
- (double)_scrollOffsetForPageAtIndex:(long long)arg1;
- (double)_scrollOffsetForFirstListView;
- (double)_pageWidth;
- (_Bool)_hasMinusPages;
- (unsigned long long)_minusPageCount;
- (double)_offsetToCenterPageControlInSpaceForPageControl;
- (id)_newPageControl;
- (struct CGRect)_frameForScalingView;
- (void)_layoutSubviews;
- (id)hitTest:(struct CGPoint)arg1 withEvent:(id)arg2;
- (void)layoutSubviews;
- (void)setNeedsLayout;
- (void)fadeContentForMinificationFraction:(double)arg1;
- (void)fadeContentForMagnificationFraction:(double)arg1;
- (void)didAnimate;
- (void)willAnimate;
@property(readonly, retain, nonatomic) SBIconViewMap *viewMap;
- (_Bool)locationCountsAsInsideFolder:(struct CGPoint)arg1;
- (void)returnScalingView;
- (id)borrowScalingView;
- (struct CGRect)scalingViewFrame;
- (void)resetContentOffsetToCurrentPage;
- (_Bool)setCurrentPageIndex:(long long)arg1 animated:(_Bool)arg2;
- (_Bool)doesPageContainIconListView:(long long)arg1;
- (void)setEditing:(_Bool)arg1 animated:(_Bool)arg2;
@property(readonly, nonatomic) unsigned long long iconListViewCount;
@property(readonly, copy, nonatomic) NSArray *iconListViews; // @synthesize iconListViews=_iconListViews;
- (void)_orientationDidChange:(long long)arg1;
- (void)setPageControlHidden:(_Bool)arg1;
- (void)_updatePageControlToIndex:(long long)arg1;
- (void)_currentPageIndexDidChange;
- (void)_setCurrentPageIndex:(long long)arg1 deferringPageControlUpdate:(_Bool)arg2;
- (void)_setCurrentPageIndex:(long long)arg1;
- (void)_setAnimatedScrolling:(_Bool)arg1;
- (void)_setScrollingDisabled:(_Bool)arg1 forReason:(id)arg2;
- (void)_endScrollingTest;
@property(nonatomic, getter=isScrolling) _Bool scrolling; // @synthesize scrolling=_isScrolling;
- (id)scrollView;
- (void)dealloc;
- (id)initWithFolder:(id)arg1 orientation:(long long)arg2 viewMap:(id)arg3;

// Remaining properties
@property(readonly, copy) NSString *debugDescription;
@property(readonly, copy) NSString *description;
@property(readonly) unsigned long long hash;
@property(readonly) Class superclass;

@end


text:
FactoryGirl.define do

  factory :recipient, :class => 'AlchemyCrm::Recipient' do
    email  'foo@baz.org'
    contact { FactoryGirl.create :verified_contact }
  end

  factory :contact, :class => 'AlchemyCrm::Contact' do
    email       'jon@doe.com'
    firstname   'Jon'
    lastname    'Doe'
    salutation  'mr'

    factory :verified_contact do
      verified true
    end
  end

  factory :delivery, :class => 'AlchemyCrm::Delivery' do
    recipients { [FactoryGirl.create(:recipient)] }
    mailing    { FactoryGirl.create(:mailing) }
  end

  factory :mailing, :class => 'AlchemyCrm::Mailing' do
    name                       'Mailing'
    subject                    'News Mailing'
    additional_email_addresses "jim@family.com, jon@doe.com, jane@family.com, \n"
    newsletter                 { FactoryGirl.create :newsletter }
  end

  factory :newsletter, :class => 'AlchemyCrm::Newsletter' do
    name   'Newsletter'
    layout 'newsletter_layout_standard'
  end

 factory :page, :class => 'Alchemy::Page' do

   language { Alchemy::Language.get_default || FactoryGirl.create(:language) }
   sequence(:name) { |n| "A Page #{n}" }
   parent_id { (Alchemy::Page.find_by_language_root(true) || FactoryGirl.create(:language_root_page)).id }
   page_layout "standard"

   # This speeds up creating of pages dramatically. Pass :do_not_autogenerate => false to generate elements
   do_not_autogenerate true

   factory :language_root_page do
     name 'Startseite'
     language_root true
     public true
     parent_id { Alchemy::Page.root.id }
   end

   factory :public_page do
     public      true
   end

   factory :unsubscribe_page do
     public      true
     name        'Unsubscribe Page'
     page_layout 'newsletter_signout'
   end

 end

end


text:
Séance de TD n°0

CodeSchool

		Séance de TD n°1 2 Exercices
		Exercice 1 : Note
		Exercice 2 : Choix de services
		Séance de TD n°2 2 Exercices
		Exercice 1 : Choix multiples
		Exercice 2 : Gestion des contacts
		Séance de TD n°3 2 Exercices
		Exercice 1 : Convertisseur de devises
		Exercice 2 : Calculatrice

Vacances

Du 16 au 22 février

		Séance de TD n°4 Directives3 Exercices
		Exercice 1 : Button
		Exercice 2 : Panel
		Exercice 3 : Progress bar


text:
package com.intellij.lang.jsgraphql.schema.library;

import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.AdditionalLibraryRootsProvider;
import com.intellij.openapi.roots.SyntheticLibrary;
import com.intellij.openapi.vfs.VirtualFile;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;

public class GraphQLLibraryRootsProvider extends AdditionalLibraryRootsProvider {

    @Nullable
    public static GraphQLLibrary findLibrary(@NotNull Project project, @NotNull GraphQLLibraryDescriptor libraryDescriptor) {
        for (SyntheticLibrary library : getLibraries(project)) {
            if (library instanceof GraphQLLibrary && ((GraphQLLibrary) library).getLibraryDescriptor().equals(libraryDescriptor)) {
                return (GraphQLLibrary) library;
            }
        }
        return null;
    }

    @NotNull
    public static Collection<SyntheticLibrary> getLibraries(@NotNull Project project) {
        GraphQLLibraryRootsProvider provider = AdditionalLibraryRootsProvider.EP_NAME.findExtension(GraphQLLibraryRootsProvider.class);
        return provider != null ? provider.getAdditionalProjectLibraries(project) : Collections.emptyList();
    }

    @NotNull
    @Override
    public Collection<SyntheticLibrary> getAdditionalProjectLibraries(@NotNull Project project) {
        return GraphQLLibraryManager.getInstance(project).getAllLibraries();
    }

    @NotNull
    @Override
    public Collection<VirtualFile> getRootsToWatch(@NotNull Project project) {
        Set<VirtualFile> roots = new HashSet<>();
        for (SyntheticLibrary library : GraphQLLibraryManager.getInstance(project).getAllLibraries()) {
            roots.addAll(library.getSourceRoots());
        }
        return roots;
    }
}


text:
package util

import jp.sf.amateras.scalatra.forms._
import org.scalatra.i18n.Messages

trait Validations {

  /**
   * Constraint for the identifier such as user name, repository name or page name.
   */
  def identifier: Constraint = new Constraint(){
    override def validate(name: String, value: String, messages: Messages): Option[String] =
      if(!value.matches("^[a-zA-Z0-9\\-_.]+$")){
        Some(s"${name} contains invalid character.")
      } else if(value.startsWith("_") || value.startsWith("-")){
        Some(s"${name} starts with invalid character.")
      } else {
        None
      }
  }

  def color = pattern("#[0-9a-fA-F]{6}")

  /**
   * ValueType for the java.util.Date property.
   */
  def date(constraints: Constraint*): SingleValueType[java.util.Date] =
    new SingleValueType[java.util.Date]((pattern("\\d{4}-\\d{2}-\\d{2}") +: constraints): _*){
      def convert(value: String, messages: Messages): java.util.Date = new java.text.SimpleDateFormat("yyyy-MM-dd").parse(value)
    }

}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

class stringDecryption
{
    static void Main()
    {
        int[] manipulatingNumbers = Console.ReadLine()
            .Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
            .Select(int.Parse)
            .ToArray();

        List<int> numbers = Console.ReadLine().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
            .Select(int.Parse).ToList();

        int elementsToSkip = manipulatingNumbers[0];
        int elementsToTake = manipulatingNumbers[1];

        numbers = numbers.Where(n => n >= 65 && n <= 90)
            .Skip(elementsToSkip)
            .Take(elementsToTake)
            //.Distinct()
            .ToList();

        foreach (var num in numbers)
        {
            Console.Write((char) num);
        }
        Console.WriteLine();
    }
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>Projet Web</title>

    <link href="/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <link href="/assets/css/freelancer.css" rel="stylesheet">

    <link href="/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic" rel="stylesheet" type="text/css">

	<?php
	if(isset($menu)){
		include($menu);
	}else{
		include('menu.php');
	}?>

Gestion Résultats

Liste des matchs en attente de résultats

							Compétition
							Phase
							Match
							Date
							Résultat

							<?php
							//On affiche la liste des matchs en attente de résultats
							while($donnees=$listeMatch->fetch()){
								echo "
";
								echo "$donnees[nom_competition]	";
								echo "$donnees[libelle_phase]	";
								echo "$donnees[rencontre]	";
								echo "$donnees[date_rencontre]	";
								echo "<select name=\"resultat$donnees[id_rencontre]\" id=\"resultat$donnees[id_rencontre]\" onchange=\"res($donnees[id_rencontre]);\"><option value=\"1\">$donnees[nom_equipe1]</option><option value=\"N\">Nul</option><option value=\"2\">$donnees[nom_equipe2]</option></select>	";
								echo "<input id=\"submitter\" type=\"submit\" value=\"Confirmer\" />	";
								echo "
";
							}
							?>

	<?php include("footer.php"); ?>


text:
/**
 *
 * @title Let It Rain
 * @author Bathlamos, Maty241
 * @version 4.02
 *
 */

package me.legault.letitrain;

import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.SortedSet;
import java.util.TreeSet;
import java.util.logging.Logger;

import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.EntityType;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.JavaPlugin;

/**
 * Main class
 * Receives the command and calls proper class
 *
 */
public class LetItRain extends JavaPlugin{

	private static Logger log;
	public static FileConfiguration config, coords;
	public static Server server;
	public static Plugin plugin;
	public static List<Coordinate> coordinates;

	//Defaults
	public static int defLightAmount, Zeusdelay, dAmount, maxAmount, maxRadius, dRadius, dLightningPower;
	public static boolean usingZeus, dRemoveArtifact, destructiveArrows, checkForUpdate, rainBlocks, rainPotions, rainLava, rainWater, dispenserWorksWithFireSnowballs;
	public static String rainLightnings, ZeusWait, dPunishMsg, dZeusMsg, dGrenadeMsg, dRainMsg, dFirerainMsg;
	public static int item, itemZeus;
	private Rain rainExec;
	private Zeus zeusExec;
	private Punish punishExec;
	private Launcher launcherExec;
	private RemoveItemsnSlaughter removeItems;
	private LetItRainHelp lirh;
	public static int version;

	public static List<EntityType> defaultBlackList;

	public void onEnable(){
		plugin = this;
		log = this.getLogger();

		server = this.getServer();

		server.getPluginManager().registerEvents(new Events(), this);

		version = getBukkitVersion();
		//Sets blacklist
		defaultBlackList = new ArrayList<EntityType>();
		defaultBlackList.add(EntityType.ENDER_DRAGON);
		defaultBlackList.add(EntityType.ENDERMAN);
		defaultBlackList.add(EntityType.BLAZE);
		defaultBlackList.add(EntityType.GHAST);
		defaultBlackList.add(EntityType.IRON_GOLEM);
		defaultBlackList.add(EntityType.ENDER_CRYSTAL);
		defaultBlackList.add(EntityType.SNOWMAN);
		defaultBlackList.add(EntityType.SLIME);
		defaultBlackList.add(EntityType.MAGMA_CUBE);
		defaultBlackList.add(EntityType.BAT);
		defaultBlackList.add(EntityType.ENDER_SIGNAL);

		extractCoordinates();
		createConfig();

		rainExec = new Rain();
		getCommand("rain").setExecutor(rainExec);
		getCommand("firerain").setExecutor(rainExec);
		getCommand("effectrain").setExecutor(rainExec);

		zeusExec = new Zeus(this);
		getCommand("zeus").setExecutor(zeusExec);

		punishExec = new Punish(this);
		getCommand("strike").setExecutor(punishExec);

		launcherExec = new Launcher(this);
		getCommand("launcher").setExecutor(launcherExec);

		removeItems = new RemoveItemsnSlaughter(this);
		getCommand("removeItems").setExecutor(removeItems);
		getCommand("slaughter").setExecutor(removeItems);

		lirh = new LetItRainHelp(this);
		getCommand("letitrain").setExecutor(lirh);

		log.info(Resources.getPluginTitle() + " enabled");

	}

	public void onDisable(){
		log.info(Resources.getPluginTitle() + " disabled");
	}

    private int getBukkitVersion(){
    	String name = Bukkit.getServer().getClass().getPackage().getName();
		String v = name.substring(name.lastIndexOf('.') + 1) + ".";
    	String[] version = v.replace('_', '.').split("\\.");

		int lesserVersion = 0;
		try {
			lesserVersion = Integer.parseInt(version[2]);
		} catch (NumberFormatException ex){
		}
		return Integer.parseInt((version[0]+version[1]).substring(1)+lesserVersion);
    }

	private void extractCoordinates(){
		File coordFile = new File("plugins" + File.separator + "LetItRain" + File.separator + "coordinates.yml");
		coordinates = new LinkedList<Coordinate>();
		coords = YamlConfiguration.loadConfiguration(coordFile);

		coords.options().header(
				"Let It Rain programmable coordinates \n" +
				"The format is x y z\n\n" +
				"Maty241, Bathlamos, FabioZumbi12\n" +
				"Version " + LetItRain.plugin.getDescription().getVersion() + "\n\n\n" +
				"http://mathieu.legault.me/\n" +
				"http://bathlamos.me/\n" +
				"http://areaz12server.net.br/\n");
		coords.set("LetItRain.world.samplePosition", "0 0 0");

		for(String g: coords.getConfigurationSection("LetItRain").getKeys(false)){
			for(String f: coords.getConfigurationSection("LetItRain." + g).getKeys(false)){
				String[] value = coords.getString("LetItRain." + g + "." + f).split(" ");
				double[] intValues = new double[3];
				if(value.length != 3){
					log.severe("The following coordinate could not be parsed: LetItRain." + g + "." + f);
					continue;
				}
				for(int i = 0; i < value.length; i++)
					try{
						intValues[i] = Double.parseDouble(value[i]);
					}catch(NumberFormatException e){
						log.severe("The following coordinate could not be parsed: LetItRain." + g + "." + f);
					}
				boolean hasBeenDefined = false;
				for(Coordinate c: coordinates)
					if(c.hasName(f)){
						log.severe("The following coordinate has already been defined: LetItRain." + g + "." + f);
						hasBeenDefined = true;
						break;
					}
				if(!hasBeenDefined)
					coordinates.add(new Coordinate(f, g, intValues[0], intValues[1], intValues[2]));
			}
		}

		try {
			coords.save(coordFile);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public static void reloadCfg(){
		try{

			File confRain = new File("plugins" + File.separator + "LetItRain" + File.separator + "config.yml");
			config.load(confRain);
			AddProperties(config);
			config.save(confRain);

		}catch(Exception e){
			e.printStackTrace();
			log.severe("An error has been detected with the config file. Default values will be loaded");
		}finally{
			plugin.saveConfig();
		}
	}

	public static void createConfig(){
		//Defaults
		dLightningPower = 15;
		ZeusWait = "&cWait to use the Lightning again";
		dZeusMsg = "[player] shall bring peace";
		dGrenadeMsg = "Feel the power of [player]";
		dPunishMsg = "May the Gods punish [player] for his incompetence ";
		maxAmount = 4096;
		dRemoveArtifact = true;
		dRainMsg = "May [entity] rain upon [player] ";
		dFirerainMsg = "May burning [entity] rain upon [player] ";
		rainLightnings = "The power of Zeus is with [player]";
		dAmount = 500;
		dRadius = 30;
		maxRadius = 200;
		defLightAmount = 10;

		try{
			config = plugin.getConfig();
			File confRain = new File("plugins" + File.separator + "LetItRain" + File.separator + "config.yml");
			AddProperties(config);
			config.save(confRain);

		}catch(Exception e){
			e.printStackTrace();
			log.severe("An error has been detected with the config file. Default values will be loaded");
		}finally{
			plugin.saveConfig();
		}
	}

	@SuppressWarnings("deprecation")
	private static void AddProperties(FileConfiguration config){
		config.options().header(
				"Let It Rain plugin \n\n" +
				"Maty241, Bathlamos, FabioZumbi12\n" +
				"Version " + plugin.getDescription().getVersion() + "\n\n\n" +
				"http://mathieu.legault.me/\n" +
				"http://bathlamos.me/\n" +
				"http://areaz12server.net.br/\n");

		usingZeus = conf("LetItRain.Zeus.Show Player Using Zeus", true);
		Zeusdelay = conf("LetItRain.Zeus.Delay", 5);
		ZeusWait = conf("LetItRain.Zeus.Delay Message", ZeusWait);
		checkForUpdate = conf("LetItRain.Check for updates", true);
		dLightningPower = conf("LetItRain.Zeus.Lightning explosion power", dLightningPower);
		dZeusMsg = conf("LetItRain.Zeus.Message", dZeusMsg);
		dGrenadeMsg = conf("LetItRain.Grenade Launcher.Message", dGrenadeMsg);
		dPunishMsg = conf("LetItRain.Punish.Message", dPunishMsg);

		dispenserWorksWithFireSnowballs = conf("LetItRain.Rain.Dispensers can shoot explosive snowballs", true);
		rainLightnings = conf("LetItRain.Rain.Raining Lightnings", rainLightnings);
		maxAmount = conf("LetItRain.Rain.Maximum amount", maxAmount);
		maxRadius = conf("LetItRain.Rain.Maximum radius", maxRadius);
		defLightAmount = conf("LetItRain.Rain.Default Lightning amount", defLightAmount);
		dRemoveArtifact = !conf("LetItRain.Rain.Drops from corpses", dRemoveArtifact);//Note: the nots are important. Don't delete
		dRainMsg = conf("LetItRain.Rain.Rain Message", dRainMsg);
		dFirerainMsg = conf("LetItRain.Rain.Firerain message", dFirerainMsg);
		destructiveArrows = conf("LetItRain.Rain.Deep impact arrows", true);
		itemZeus = conf("LetItRain.Zeus.Launcher id", 369);
		item = conf("LetItRain.Grenade Launcher.Launcher id", 377);
		dAmount = conf("LetItRain.Rain.Default amount", 500);
		dRadius = conf("LetItRain.Rain.Default radius", 30);
		rainBlocks = !conf("LetItRain.Rain.Blacklist.Block", false); //Note: the nots are important. Don't delete
		rainPotions = !conf("LetItRain.Rain.Blacklist.Potion", false);//Note: the nots are important. Don't delete
		rainLava = conf("LetItRain.Rain.Blacklist.Lava", false);
		rainWater = conf("LetItRain.Rain.Blacklist.Water", false);

		item = config.getInt("LetItRain.Grenade Launcher.Launcher id");

		Material.getMaterial(item);
		if (Material.getMaterial(item) == null || item <= 0){
			log.severe("Invalid item in plugin.yml (<Grenade Launcher.Launcher id>)");
		item = 377;
		}

		itemZeus = config.getInt("LetItRain.Zeus.Launcher id");

		Material.getMaterial(itemZeus);
		if (Material.getMaterial(itemZeus) == null || itemZeus <= 0){
			log.severe("Invalid item in plugin.yml (<Zeus.Launcher id>)");
			itemZeus = 369;
		}

		//Put the entities in alphabetical order
		Map<String, Boolean> entityNames = new HashMap<String, Boolean>();
		for(EntityType e: EntityType.values()){
			if (e.isSpawnable() && !config.contains("LetItRain.Rain.Blacklist." + e.getEntityClass().getSimpleName()))
				entityNames.put(e.getEntityClass().getSimpleName(), defaultBlackList.contains(e));
		}
		SortedSet<String> keys = new TreeSet<String>(entityNames.keySet());
		for(String key: keys){
			Boolean isBlacklisted = entityNames.get(key);
			config.set("LetItRain.Rain.Blacklist." + key, isBlacklisted);
		}

	}

	private static String conf(String identifier, String value){
		if (!config.contains(identifier)){
			config.set(identifier, value);
			return value;
		}else
			return config.getString(identifier);
	}

	private static boolean conf(String identifier, boolean value){
		if (!config.contains(identifier)){
			config.set(identifier, value);
			return value;
		}else
			return config.getBoolean(identifier);
	}

	private static int conf(String identifier, int value){
		if (!config.contains(identifier)){
			config.set(identifier, value);
			return value;
		}else
			return config.getInt(identifier);
	}

}


text:
draft: true
title: "Sorry, Alien Ant Farm Dude"
date: 2015-10-02
description: "Hill and Beez review the new albums from Trivium, Clutch, No Devotion and Black Breath, there's questions on moshing etiquette, double albums and Alter Bridge and we should probably say sorry to the old bass player in Alien Ant Farm. Sorry mate."
soundcloud: 226560547
---


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CSC_523_Game
{

    class TruthTable
    {
        private int variableCount;
        private List<Variable> variables;
        private List<Variable> uniqueVariables = new List<Variable>();
        private Dictionary<int, string> truthValues = new Dictionary<int, string>();
        private string postfix;
        private bool[] expectedResults;

        public TruthTable(List<Variable> variables, string postfix)
        {
            this.variables = variables;
            this.postfix = postfix;
            init();
        }

        private void init()
        {
            initUniqueVariables();
            this.variableCount = uniqueVariables.Count;
            generateInputValues();
        }

        private void initUniqueVariables()
        {
            List<char> localVars = new List<char>();

            foreach (Variable v in variables)
            {
                char c = v.getVariable();
                if (Char.IsUpper(c)) c = Char.ToLower(c);

                if (!localVars.Contains(c))
                {
                    localVars.Add(c);
                    Variable var = new Variable(c);
                    uniqueVariables.Add(var);
                }
            }
        }

        private void generateInputValues()
        {
            if (variableCount == 2) twoVariables();
            else if (variableCount == 3) threeVariables();
            else if (variableCount == 4) fourVariables();
        }

        private void twoVariables()
        {
            int row = 1;

            for (int x = 0; x < 2; x++)
            {
                for (int y = 0; y < 2; y++)
                {

                    string val = x.ToString() + y.ToString();
                    truthValues.Add(row, val);
                    row++;
                }
            }
        }

        private void threeVariables()
        {
            int row = 1;

            for (int x = 0; x < 2; x++)
            {
                for (int y = 0; y < 2; y++)
                {
                    for (int z = 0; z < 2; z++)
                    {
                        string val = x.ToString() + y.ToString() + z.ToString();
                        truthValues.Add(row, val);
                        row++;
                    }
                }
            }
        }

        private void fourVariables()
        {
            int row = 1;

            for (int w = 0; w < 2; w++)
            {
                for (int x = 0; x < 2; x++)
                {
                    for (int y = 0; y < 2; y++)
                    {
                        for (int z = 0; z < 2; z++)
                        {
                            string val = w.ToString() + x.ToString() + y.ToString() + z.ToString();
                            truthValues.Add(row, val);
                            row++;
                        }
                    }
                }
            }
        }

        //Should solve truth table
        public string[] generateTruthTable()
        {
            List<string> listOfOutputs = new List<string>();
            foreach (string val in truthValues.Values)
            {
                // {'0', '1', '0'}
                char[] rowTruthValues = val.ToCharArray();
                updateVariableTruthValues(rowTruthValues);

                bool result = solveRow();
                listOfOutputs.Add(val + "     " + result);
                Console.WriteLine(val + "     " + result);
            }
            return listOfOutputs.ToArray<string>();
        }

        private void updateVariableTruthValues(char[] newTruthValues)
        {
            int index = 0;
            foreach(Variable v in uniqueVariables)
            {
                //newTruthValues = {'0', '1', '0'}
                bool value = Convert.ToBoolean(Char.GetNumericValue(newTruthValues[index]));
                v.setValue(value);
                index++;
            }
        }

        private bool solveRow()
        {
            Stack<Term> infixStack = new Stack<Term>();
            Stack<char> postfixStack = generatePostfixStack();
            Dictionary<string, bool> termValues = new Dictionary<string, bool>();
            for (int i = 0; i < postfixStack.Count; i++)
            {
                char token = postfix[i];

                if (isOperator(token))
                {
                    Term t1 = infixStack.Pop();
                    Term t2 = infixStack.Pop();

                    if (token == '+')
                    {
                        string newTerm = t1.getExpression() + '+' + t2.getExpression();
                        bool newTermValue = t1.getValue() || t2.getValue();
                        Term term = new Term(newTerm, newTermValue);
                        infixStack.Push(term);
                    }

                    else
                    {
                        string newTerm = t1.getExpression() + '*' + t2.getExpression();
                        bool newTermValue = t1.getValue() && t2.getValue();
                        Term term = new Term(newTerm, newTermValue);
                        infixStack.Push(term);
                    }
                }

                else
                {
                    Variable v = charToVariable(token);
                    infixStack.Push(new Term(v.getVariable().ToString(), v.getTruthValue()));
                }
            }

            return infixStack.Pop().getValue();
        }

        private Stack<char> generatePostfixStack()
        {
            Stack<char> localPostfix = new Stack<char>();

            for (int i = postfix.Length - 1; i >= 0; i--)
            {
                localPostfix.Push(postfix[i]);
            }

            return localPostfix;
        }

        private bool isOperator(char c)
        {
            if (c == '+' || c == '*') return true;
            else return false;
        }

        private Variable charToVariable(char c)
        {
            foreach (Variable v in uniqueVariables)
            {
                if (v.getVariable() == c) return v;
                else if (Char.ToUpper(v.getVariable()) == c) return new Variable(c, !v.getTruthValue());
            }

            return null;
        }

        private void viewStack(Stack<char> s)
        {
            int size = s.Count();
            char[] array = new char[size];
            s.CopyTo(array, 0);

            Console.WriteLine("----------");
            for (int i = 0; i < size; i++)
            {
                Console.WriteLine("Index: " + i + " :: Element: " + array[i]);
            }
            Console.WriteLine("----------");
        }

    }

}


text:
package us.mcsw.compserver.net;

public enum SpriteType {

	PLAYER;

}


text:
package flex.management.runtime.messaging.endpoints;

import flex.management.BaseControl;
import flex.messaging.endpoints.HTTPEndpoint;

/**
 * The HTTPEndpointControl class is the MBean implemenation
 * for monitoring and managing a HTTPEndpoint at runtime.
 */
public class HTTPEndpointControl extends PollingEndpointControl implements
    HTTPEndpointControlMBean
{
    private static final String TYPE = "HTTPEndpoint";

    /**
     * Constructs a HTTPEndpointControl, assigning managed message
     * endpoint and parent MBean.
     *
     * @param endpoint The HTTPEndpoint managed by this MBean.
     * @param parent The parent MBean in the management hierarchy.
     */
    public HTTPEndpointControl(HTTPEndpoint endpoint, BaseControl parent)
    {
        super(endpoint, parent);
    }

    /** {@inheritDoc} */
    public String getType()
    {
        return TYPE;
    }
}


text:
import collections
from supriya.enums import CalculationRate
from supriya.ugens.Index import Index

class IndexInBetween(Index):
    """

    ::

        >>> source = supriya.ugens.In.ar(bus=0)
        >>> index_in_between = supriya.ugens.IndexInBetween.ar(
        ...     buffer_id=buffer_id,
        ...     source=source,
        ...     )
        >>> index_in_between
        IndexInBetween.ar()

    """

    ### CLASS VARIABLES ###

    _ordered_input_names = collections.OrderedDict(
        'buffer_id',
        'source',
        )

    _valid_calculation_rates = None

    ### INITIALIZER ###

    def __init__(
        self,
        calculation_rate=None,
        buffer_id=None,
        source=None,
        ):
        Index.__init__(
            self,
            calculation_rate=calculation_rate,
            buffer_id=buffer_id,
            source=source,
            )

    ### PUBLIC METHODS ###

    @classmethod
    def ar(
        cls,
        buffer_id=None,
        source=None,
        ):
        """
        Constructs an audio-rate IndexInBetween.

        ::

            >>> source = supriya.ugens.In.ar(bus=0)
            >>> index_in_between = supriya.ugens.IndexInBetween.ar(
            ...     buffer_id=buffer_id,
            ...     source=source,
            ...     )
            >>> index_in_between
            IndexInBetween.ar()

        Returns ugen graph.
        """
        import supriya.synthdefs
        calculation_rate = supriya.CalculationRate.AUDIO
        ugen = cls._new_expanded(
            calculation_rate=calculation_rate,
            buffer_id=buffer_id,
            source=source,
            )
        return ugen

    @classmethod
    def kr(
        cls,
        buffer_id=None,
        source=None,
        ):
        """
        Constructs a control-rate IndexInBetween.

        ::

            >>> source = supriya.ugens.In.ar(bus=0)
            >>> index_in_between = supriya.ugens.IndexInBetween.kr(
            ...     buffer_id=buffer_id,
            ...     source=source,
            ...     )
            >>> index_in_between
            IndexInBetween.kr()

        Returns ugen graph.
        """
        import supriya.synthdefs
        calculation_rate = supriya.CalculationRate.CONTROL
        ugen = cls._new_expanded(
            calculation_rate=calculation_rate,
            buffer_id=buffer_id,
            source=source,
            )
        return ugen

    ### PUBLIC PROPERTIES ###

    @property
    def buffer_id(self):
        """
        Gets `buffer_id` input of IndexInBetween.

        ::

            >>> source = supriya.ugens.In.ar(bus=0)
            >>> index_in_between = supriya.ugens.IndexInBetween.ar(
            ...     buffer_id=buffer_id,
            ...     source=source,
            ...     )
            >>> index_in_between.buffer_id

        Returns ugen input.
        """
        index = self._ordered_input_names.index('buffer_id')
        return self._inputs[index]

    @property
    def source(self):
        """
        Gets `source` input of IndexInBetween.

        ::

            >>> source = supriya.ugens.In.ar(bus=0)
            >>> index_in_between = supriya.ugens.IndexInBetween.ar(
            ...     buffer_id=buffer_id,
            ...     source=source,
            ...     )
            >>> index_in_between.source
            OutputProxy(
                source=In(
                    bus=0.0,
                    calculation_rate=CalculationRate.AUDIO,
                    channel_count=1
                    ),
                output_index=0
                )

        Returns ugen input.
        """
        index = self._ordered_input_names.index('source')
        return self._inputs[index]


text:
exports.info = { FormatID: '1228',
  FormatName: 'Windows Media Video 9 Advanced Profile (WVC1)',
  FormatVersion: '9 Advanced Profile (WVC1)',
  FormatAliases: '',
  FormatFamilies: '',
  FormatTypes: 'Audio, Video',
  FormatDisclosure: '',
  FormatDescription: 'This is an outline record only, and requires further details, research or authentication to provide information that will enable users to further understand the format and to assess digital preservation risks associated with it if appropriate. If you are able to help by supplying any additional information concerning this entry, please return to the main PRONOM page and select 'Add an Entry'.',
  BinaryFileFormat: '',
  ByteOrders: '',
  ReleaseDate: '',
  WithdrawnDate: '',
  ProvenanceSourceID: '1',
  ProvenanceName: 'Digital Preservation Department / The National Archives',
  ProvenanceSourceDate: '11 Jun 2012',
  ProvenanceDescription: '',
  LastUpdatedDate: '11 Jun 2012',
  FormatNote: '',
  FormatRisk: '',
  TechnicalEnvironment: '',
  FileFormatIdentifier: { Identifier: 'fmt/441', IdentifierType: 'PUID' },
  ExternalSignature:
   { ExternalSignatureID: '1229',
     Signature: 'wmv',
     SignatureType: 'File extension' },
  InternalSignature:
   { SignatureID: '685',
     SignatureName: 'Windows Media Video 9 Advanced Profile (WVC1)',
     SignatureNote: '',
     ByteSequence:
      [ { ByteSequenceID: '845',
          PositionType: 'Absolute from BOF',
          Offset: '',
          MaxOffset: '',
          IndirectOffsetLocation: '',
          IndirectOffsetLength: '',
          Endianness: '',
          ByteSequenceValue: '3026B2758E66CF11A6D900AA0062CE6C{12}0102' },
        { ByteSequenceID: '846',
          PositionType: 'Variable',
          Offset: '',
          MaxOffset: '',
          IndirectOffsetLocation: '',
          IndirectOffsetLength: '',
          Endianness: '',
          ByteSequenceValue: '{30}9107DCB7B7A9CF118EE600C00C205365{8}C0EF19BC4D5BCF11A8FD00805F5C442B{65}57564331' } ] },
  RelatedFormat:
   [ { RelationshipType: 'Has priority over',
       RelatedFormatID: '691',
       RelatedFormatName: 'Advanced Systems Format',
       RelatedFormatVersion: '' },
     { RelationshipType: 'Has priority over',
       RelatedFormatID: '692',
       RelatedFormatName: 'Windows Media Audio',
       RelatedFormatVersion: '' } ] }


text: © Copyright 2017 Finance Planner Lite


text:
class CreateAdvertises < ActiveRecord::Migration
  def self.up
    create_table :advertises do |t|
      t.column :description, :string
      t.timestamps
    end
  end

  def self.down
    drop_table :advertises
  end
end


text:
import pyautogui

while True:
	currentMouseX, currentMouseY = pyautogui.position()
	print(str(currentMouseX) + "," + str(currentMouseY))


text:
package at.ac.uibk.igwee.metadata.wikidata;

import at.ac.uibk.igwee.metadata.vocabulary.VocabularyException;

/**
 * Wrapper Exception Class
 * @author joseph
 *
 */
public class WikidataException extends VocabularyException {

	private static final long serialVersionUID = 201503311720L;

	public WikidataException(String msg) {
		super(msg);
	}

}


text:
package com.easyooo.framework.cache.storage;

import java.util.List;
import java.util.Set;

import com.easyooo.framework.cache.CacheException;

/**
 *
 * @author Killer
 */
public class CheckParameterCache implements ICache{
	private ICache delegate;

	public CheckParameterCache(ICache delegate){
		this.delegate = delegate;
	}

	public boolean set(String cacheKey, String value)
			throws CacheException{
		checkKey(cacheKey);
		checkValue(value);
		return delegate.set(cacheKey, value);
	}

	@Override
	public boolean sets(String... keyvalues) throws CacheException {
		if(keyvalues == null){
			return false;
		}
		if(keyvalues.length % 2 != 0){
			return false;
		}
		return delegate.sets(keyvalues);
	}

	@Override
	public List<String> gets(String...cacheKey) throws CacheException{
		checkKey(cacheKey);
		return delegate.gets(cacheKey);
	}

	@Override
	public boolean mod(String cacheKey, String value)
			throws CacheException {
		checkKey(cacheKey);
		checkValue(value);
		return delegate.mod(cacheKey, value);
	}

	@Override
	public Long del(String cacheKey) throws CacheException {
		checkKey(cacheKey);
		return delegate.del(cacheKey);
	}

	@Override
	public String get(String cacheKey) throws CacheException {
		checkKey(cacheKey);
		return delegate.get(cacheKey);
	}

	@Override
	public Long addMembers(String groupKey, String... entityCacheKeys)
			throws CacheException {
		checkKey(groupKey);
		checkMembers(entityCacheKeys);
		return delegate.addMembers(groupKey, entityCacheKeys);
	}

	@Override
	public Long delMembers(String groupKey, String... entityCacheKeys)
			throws CacheException {
		checkKey(groupKey);
		checkMembers(entityCacheKeys);
		return delegate.delMembers(groupKey, entityCacheKeys);
	}

	@Override
	public Set<String> getMembers(String groupKey) throws CacheException {
		checkKey(groupKey);
		return delegate.getMembers(groupKey);
	}

	@Override
	public int getSize() {
		return delegate.getSize();
	}

	private void checkKey(String... keys)throws CacheException{
		if(null == keys || keys.length == 0){
			throw new CacheException("the key cannot be null");
		}
	}

	private void checkMembers(String...members)throws CacheException{
		if(members.length == 0){
			throw new CacheException("At least one member");
		}
	}

	private void checkValue(Object value)throws CacheException{
		if(null == value){
			throw new CacheException("Value cannot be null");
		}
	}
}