text:
<?php

/*
 * This file is part of Mannequin.
 *
 * (c) 2017 Last Call Media, Rob Bayliss <rob@lastcallmedia.com>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace LastCall\Mannequin\Drupal\Drupal;

use Drupal\Core\Theme\ActiveTheme;
use Drupal\Core\Theme\ThemeManagerInterface;

/**
 * Stub class to stand in for Drupal's standard ThemeManager.
 */
class MannequinThemeManager implements ThemeManagerInterface
{
    public function render($hook, array $variables)
    {
        throw new \Exception(__CLASS__.'::'.__METHOD__.' not yet implemented');
    }

    public function getActiveTheme()
    {
        throw new \Exception(__CLASS__.'::'.__METHOD__.' not yet implemented');
    }

    public function hasActiveTheme()
    {
        throw new \Exception(__CLASS__.'::'.__METHOD__.' not yet implemented');
    }

    public function resetActiveTheme()
    {
        throw new \Exception(__CLASS__.'::'.__METHOD__.' not yet implemented');
    }

    public function setActiveTheme(ActiveTheme $active_theme)
    {
        throw new \Exception(__CLASS__.'::'.__METHOD__.' not yet implemented');
    }

    public function alter($type, &$data, &$context1 = null, &$context2 = null)
    {
        throw new \Exception(__CLASS__.'::'.__METHOD__.' not yet implemented');
    }

    public function alterForTheme(
        ActiveTheme $theme,
        $type,
        &$data,
        &$context1 = null,
        &$context2 = null
    ) {
        throw new \Exception(__CLASS__.'::'.__METHOD__.' not yet implemented');
    }
}


text:
/*
 * client/js/shared/services/util.js
 */

'use strict';

/**
 * Given a state, e.g. "app.account.summary", returns an array of ancestor states
 * ["app", "app.account", "app.account.summary"] (last element removed if
 * `includeCurrentState` is false)
 */
function getAncestorStates(state, includeCurrentState) {
  var states = [state],
      temp;
  while (true) {
    if (states[0].indexOf('.') === -1) { break; }
    temp = states[0].split('.');
    states.unshift(temp.slice(0, temp.length - 1).join('.'));
  }
  if (!includeCurrentState) {
    states.pop();
  }
  return states;
}

// Public API
exports = module.exports = function (ngModule) {
  ngModule.factory('util', function () {
    return {
      getAncestorStates: getAncestorStates
    };
  });
};

redpajama_set_name: RedPajamaGithub


text:
// LICENSE
package com.forgedui.editor.figures;

import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.geometry.Insets;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;

/**
 * @author Dmitry {dmitry.grimm@gmail.com}
 *
 */
public class SearchBarFigureAndroid extends SearchBarFigure {

	private Image cancelImage;

	/**
	 * @param defaultBarColor
	 * @param searchImage
	 */
	public SearchBarFigureAndroid(Color defaultBarColor, Image cancel) {
		super(defaultBarColor, null);
		cancelImage = cancel;
	}

	@Override
	protected int getMaxHeight() {
		return Integer.MAX_VALUE;
	}

	@Override
	protected int getCancelButtonWidth() {
		return cancelImage.getBounds().width;
	}

	@Override
	protected int getMinimumBarRadius() {
		return 3;
	}

	@Override
	protected void paintCancel(Graphics graphics) {
		Rectangle barBounds = getBounds().getCopy();
		barBounds.crop(new Insets(getMargin()));
		Point imagePoint = new Point(barBounds.getRight().x, barBounds.getCenter().y);
		imagePoint.translate(-getCancelButtonWidth(), -cancelImage.getBounds().height / 2);
		graphics.drawImage(cancelImage, imagePoint);
	}

}


text:
<?php

namespace App\Repositories;

use App\Post;
use Underscore\Types\Arrays;

class PostRepository extends Repository
{
	protected $model;

	public function __construct(Post $model){parent::__construct($model);}

	/**
	* Querry database using appropriate filters
	*
	* @var string
	*/
	public function filter (array $filters)
	{
		$query = $this->model;

		// 'from' filter : lower limit for dates in the query
		$fromFilter = Arrays::get($filters, 'from');
		if($fromFilter)
		{
			$query = $query->where('date', '>=', $fromFilter);
		}

		// 'to' filter : upper limit for dates in the query
		$toFilter = Arrays::get($filters, 'to');
		if($toFilter)
		{
			$query = $query->where('date', '<=', $toFilter);
		}

		// 'author' filter : adds author property to where clause
		$authorFilter = Arrays::get($filters, 'author');
		if($authorFilter)
		{
			$query = $query->where('author', '=', $authorFilter);
		}

		return $query->orderBy('date', 'desc')->get();
	}
}

?>


text: This repository contains Spring Boot REST Docs example


text:
from __future__ import absolute_import
from .default import *

PROTEUS_PRELOAD_LIBS=['/p/app/hpe/mpt-2.21/lib/libmpi.so']