text:
<?php

App::uses('AppController', 'Controller');

class FortunesController extends AppController {

	public $modelClass = 'Fortune';

	public function index() {
		// use full view stack as encouraged by test rules
		$this->layout = 'benchmark';
		$this->set('title_for_layout', 'Fortunes');

		// using ORM instead of raw SQL
		$results = $this->Fortune->find('all');

		// stuffing in the dynamic data
		$results[]['Fortune'] = array(
			'id'      => 0,
			'message' => 'Additional fortune added at request time.'
		);

		// because we are performance concerned we don't use Hash::sort()
		foreach ($results as $result) {
			$fortunes[$result['Fortune']['id']] = $result['Fortune']['message'];
		}
		asort($fortunes);

		$this->set('fortunes', $fortunes);
	}

}


text: export default () => console.log('shared module')

redpajama_set_name: RedPajamaGithub


text:
package org.eclipse.microprofile.lra.annotation;

import javax.interceptor.InterceptorBinding;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * If a participant is unable to compensate it must remember the fact (by reporting it when asked for its'
 * {@link Status}) until it is explicitly told to forget. To support this
 * requirement the developer should annotate one of the participant methods with @Forget.
 */
@InterceptorBinding
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
public @interface Forget {
}


text:
package seedu.forgetmenot.logic.commands;

import seedu.forgetmenot.commons.exceptions.IllegalValueException;
import seedu.forgetmenot.model.task.Done;
import seedu.forgetmenot.model.task.Name;
import seedu.forgetmenot.model.task.Recurrence;
import seedu.forgetmenot.model.task.Task;
import seedu.forgetmenot.model.task.Time;
import static seedu.forgetmenot.commons.core.Messages.MESSAGE_INVALID_START_AND_END_TIME;

import seedu.forgetmenot.commons.core.EventsCenter;
import seedu.forgetmenot.commons.events.ui.JumpToListRequestEvent;

//@@author A0147619W
/**
 * Adds a task to the task manager.
 */
public class AddCommand extends Command {

    public static final String COMMAND_WORD = "add";

    public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a task to ForgetMeNot. "
            + "\tParameters: TASKNAME DATE"
            + "\tExample: " + COMMAND_WORD
            + " Homework by tomorrow 6pm";

    public static final String MESSAGE_SUCCESS = "New task added: %1$s";
    public static final String MESSAGE_CLASH_WARNING = "WARNING! This task clashes with one of the tasks in ForgetMeNot. Type undo if you want to undo the previous add.";

    private final Task toAdd;

    /**
     * Convenience constructor using raw values.
     *
     * @throws IllegalValueException if any of the raw values are invalid
     */
    public AddCommand(String name, String date, String start, String end, String recur)
            throws IllegalValueException {

        Time startTime = new Time(start);
        Time endTime = new Time(end);

        if(!Time.checkOrderOfDates(start, end)) {
        	throw new IllegalValueException(MESSAGE_INVALID_START_AND_END_TIME);
        }

        this.toAdd = new Task(
                new Name(name),
                new Done(false),
                startTime,
                endTime,
                new Recurrence(recur)
        );
    }

	@Override
    public CommandResult execute() throws IllegalValueException {
        assert model != null;

        boolean clashCheck = false;
    	if(model.isClashing(toAdd))
    		clashCheck = true;

        model.saveToHistory();
        model.addTask(toAdd);
        if (toAdd.getRecurrence().getValue())
            model.addRecurringTask(toAdd);
        model.updateFilteredTaskListToShowNotDone();

        jumpToTask();

    	return clashCheck? new CommandResult(MESSAGE_CLASH_WARNING + "\n" + String.format(MESSAGE_SUCCESS, toAdd)):
    					new CommandResult(String.format(MESSAGE_SUCCESS, toAdd));
    }

	/**
	 * Jumps to the added Task
	 */
	private void jumpToTask() {
		int targetIndex = model.getFilteredTaskList().indexOf(toAdd);
        EventsCenter.getInstance().post(new JumpToListRequestEvent(targetIndex));
	}
}


text:
(function(){
    var app = angular.module('shorturlApp', ['ui.router', 'ngSanitize', 'ngAnimate', 'ui.bootstrap']).config(function($interpolateProvider){
        $interpolateProvider.startSymbol('[[').endSymbol(']]');
        });

    // get root url of website
    function getRootUrl() {
        return window.location.origin?window.location.origin+'/':window.location.protocol+'/'+window.location.host+'/';

    }

    //alert(getRootUrl());

    app.config(function($stateProvider, $urlRouterProvider) {

        $urlRouterProvider.otherwise('/shorten');

        $stateProvider

            // HOME STATES AND NESTED VIEWS ========================================
            .state('home', {
                url: '/home',
                templateUrl: getRootUrl().concat('shorturlapp/home.html'),
                controller : "homeController"
            })
            .state('list', {
                url: '/list',
                templateUrl: getRootUrl().concat('shorturlapp/list.html'),
                controller : "listController"
            })
       //     .state('clicks.clicksdata', {
       //         url: '/clicksdata',
       //         views: {
			    //   'clicksdata': {
			    //     templateUrl: getRootUrl().concat('shorturlapp/clicksdata.html')
			    //   }
			    // }
       //         // templateUrl: getRootUrl().concat('shorturlapp/clicks.html')
       //     })
            .state('shorten', {
                url: '/shorten',
                templateUrl: getRootUrl().concat('shorturlapp/shorten.html'),
                controller : "shortenController"
            })
            .state('mass-shorten', {
                url: '/mass-shorten',
                templateUrl: getRootUrl().concat('shorturlapp/mass-shorten.html'),
                controller : "massShortenController"
            });

    });

}());


text:
@interface StyleSheetViewController : TTViewController {
@private
  TTCSSStyleSheet*  _styleSheet;

  BOOL              _loadedSuccessfully;
}

@end


text:
require File.dirname(__FILE__) + '/../../spec_helper'
require 'mspec/runner/formatters/spinner'
require 'mspec/runner/mspec'
require 'mspec/runner/state'

describe SpinnerFormatter, "#initialize" do
  it "permits zero arguments" do
    SpinnerFormatter.new
  end

  it "accepts one argument" do
    SpinnerFormatter.new nil
  end
end

describe SpinnerFormatter, "#register" do
  before :each do
    @formatter = SpinnerFormatter.new
  end

  it "registers self with MSpec for appropriate actions" do
    MSpec.stub!(:register)
    MSpec.should_receive(:register).with(:start, @formatter)
    MSpec.should_receive(:register).with(:load, @formatter)
    MSpec.should_receive(:register).with(:after, @formatter)
    MSpec.should_receive(:register).with(:finish, @formatter)
    @formatter.register
  end

  it "creates TimerAction and TallyAction" do
    timer = mock("timer")
    tally = mock("tally")
    timer.should_receive(:register)
    tally.should_receive(:register)
    tally.should_receive(:counter)
    TimerAction.should_receive(:new).and_return(timer)
    TallyAction.should_receive(:new).and_return(tally)
    @formatter.register
  end
end

describe SpinnerFormatter, "#print" do
  after :each do
    $stdout = STDOUT
  end

  it "ignores the argument to #initialize and writes to $stdout" do
    $stdout = IOStub.new
    formatter = SpinnerFormatter.new "some/file"
    formatter.print "begonias"
    $stdout.should == "begonias"
  end
end

describe SpinnerFormatter, "#after" do
  before :each do
    $stdout = IOStub.new
    MSpec.stub!(:retrieve).and_return(["a", "b"])
    @formatter = SpinnerFormatter.new
    @formatter.register
    @state = SpecState.new("describe", "it")
  end

  after :each do
    $stdout = STDOUT
  end

  it "updates the spinner" do
    @formatter.start
    @formatter.load
    @formatter.after @state
    @formatter.after @state
    $stdout.should == "\r[/ | ========          20%                    | 00:00:00] " \
                      "\e[0;32m     0F \e[0;32m     0E\e[0m" \
                      "\r[- | ========          20%                    | 00:00:00] " \
                      "\e[0;32m     0F \e[0;32m     0E\e[0m"
  end
end


text:
require "attentive/entities/core/number/integer"
require "attentive/entities/core/number/float"

Attentive::CompositeEntity.define "core.number",
  "core.number.float",
  "core.number.integer"

require "attentive/entities/core/number/positive"
require "attentive/entities/core/number/negative"