text:
set -e

if ! [[ "$0" =~ scripts/updatedep.sh ]]; then
  echo "must be run from repository root"
  exit 255
fi

if [ -d "gopath.proto" ]; then
  # gopath.proto is created by genproto.sh and it thoroughly messes
  # with go mod.
  echo "Remove gopath.proto before running this script"
  exit 255
fi

if [[ $(go version) != "go version go1.14"* ]]; then
  echo "expect Go 1.14+, got:" "$(go version)"
  exit 255
fi

GO111MODULE=on go mod tidy -v
GO111MODULE=on go mod vendor -v

redpajama_set_name: RedPajamaGithub


text:
package com.mobileforming.news.streamer.rotoworld;

import com.mobileforming.news.streamer.data.model.Player;
import com.mobileforming.news.streamer.data.model.PlayerBuilder;
import com.mobileforming.news.streamer.data.model.PlayerNews;
import com.mobileforming.news.streamer.data.model.PlayerNewsBuilder;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

import java.net.MalformedURLException;
import java.net.URL;

/**
 * Created by jeffreypthomas on 9/6/15.
 */
public class PlayerNewsHtmlAnalyzer {

    private static final org.slf4j.Logger LOG =
        org.slf4j.LoggerFactory.getLogger(PlayerNewsHtmlAnalyzer.class);

    public static PlayerNews getPlayerNews(Document playerNewsDetails)
        throws MalformedURLException {

        final Element playerElement = playerNewsDetails.select("div[id$=cp1_pnlPlayer]").first();
        final String[] playerNameWithPosition =
            playerElement.select("div[class$=playername]").text().split("\\|");

        final String playerName = playerNameWithPosition[0].trim();
        final String playerPosition = playerNameWithPosition[1].trim();

        final Element playerTableElement =
            playerElement.getElementById("cp1_ctl00_tblPlayerDetails");
        final String playerTeamName = playerTableElement.select("tbody tr td").eq(1).text();

        final Elements playerNewsElement = playerElement.select("div[class$=playernews]");
        final String newsBody = playerNewsElement.select("div[class$=impact]").first().text();
        final String newsHeadline = playerNewsElement.select("div[class$=report]").first().text();

        final Player player = new PlayerBuilder().setName(playerName).setPosition(playerPosition)
            .setTeam(playerTeamName).createPlayer();

        return new PlayerNewsBuilder().setPlayer(player).setBody(newsBody).setHeadline(newsHeadline)
            .setLink(new URL(playerNewsDetails.baseUri())).createPlayerNews();

    }
}


text:
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_marginLeft="8dp"
    android:layout_marginRight="8dp"
    android:baselineAligned="false"
    android:divider="?android:attr/dividerHorizontal"
    android:orientation="horizontal"
    android:showDividers="middle"
    tools:context="com.sandeep.redditer.PostListActivity">

    <android.support.v7.widget.RecyclerView
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:id="@+id/post_list"
        android:name="com.sandeep.redditer.PostListFragment"
        android:layout_width="@dimen/item_width"
        android:layout_height="match_parent"
        android:layout_marginStart="@dimen/margin_left_recycler_view"
        android:layout_marginEnd="@dimen/margin_right_recycler_view"
        app:layoutManager="LinearLayoutManager"
        tools:context="com.sandeep.redditer.PostListActivity"
        tools:listitem="@layout/post_list_content" />

    <FrameLayout
        android:id="@+id/post_detail_container"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="3" />

</LinearLayout>


text:
<?php

//default SEO values
$seoValues = array();

$pageTitle = 'Page Title';

$controllerPath = MVC_PATH . '/' . $this->module . '/controllers/' . ucfirst($this->controller) . '.php';
#echo $controllerPath;exit;
if(file_exists($controllerPath)){
	//session is needed for login
	$sess = new Framework_Session($this->conf);
	$this->session = &$_SESSION;

	//check if user is allowed to acces this area
	$auth = new Framework_Auth();

	$auth->module = $this->module;
	$auth->controller = $this->controller;
	$auth->action = $this->action;
	$auth->request = $this->request;
	$auth->requestRaw = $this->requestRaw;

	$auth->checkIdentity($this->module);

	//include main model
	$this->includeFile(MVC_PATH . '/' . $this->module . '/models/Model.php', true);

	if(Framework_Main::includeFile(MVC_PATH . '/' . $this->module . '/models/' . ucfirst($this->controller) . '.php', false)){
		$modelClass = $this->controller;
		$model = new $modelClass($this->conf);

		#there is no other way to pass these, sending as constructor params looks bad
		$model->module = $this->module;
		$model->controller = $this->controller;
		$model->action = $this->action;
		$model->request = $this->request;
	}

	require ($controllerPath);

	#echo $this->registry->module.'
';
	#echo $this->registry->controller.'
';
	#echo $this->registry->action.'
';
	#exit;
}else{
	//404 error
	Framework_Main::pageNotFound();
}

$menuItems = $model->getMenuItems();
if (!isset($menuItems[0]) || (!isset($_SESSION[$this->module]->id) || $_SESSION[$this->module]->id <= 0)){
	$menuItems[0] = array();
}

//in admin there is no need for distinct meta data
$seoValues = array(
	'metaKeywords' => $pageTitle,
	'metaDescription' => $pageTitle,
	'metaTitle' => $pageTitle,
	'title' => $pageTitle,
);
$siteUrl = SITE_URL;
$staticUrl = SITE_URL.'/static';


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

<TITLE>
BezierInterpolation
</TITLE>

<META NAME="date" CONTENT="2011-01-03">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

toxi.math

Class BezierInterpolation

java.lang.Object
  toxi.math.BezierInterpolation

All Implemented Interfaces:
InterpolateStrategy

public class BezierInterpolation
extends java.lang.Object
implements InterpolateStrategy

<map id="APIVIZ" name="APIVIZ">
<area shape="rect" id="node1" href="InterpolateStrategy.html" title="«interface» InterpolateStrategy" alt="" coords="5,5,136,51"/>
<area shape="rect" id="node2" href="BezierInterpolation.html" title="BezierInterpolation" alt="" coords="7,90,135,118"/>
</map>

Bezier curve interpolation with configurable coefficients. The curve
 parameters need to be normalized offsets relative to the start and end values
 passed to the interpolate(float, float, float) method, but can
 exceed the normal 0 .. 1.0 interval. Use symmetrical offsets to create a
 symmetrical curve, e.g. this will create a curve with 2 dips reaching the
 minimum and maximum values at 25% and 75% of the interval...

 BezierInterpolation b=new BezierInterpolation(3,-3);

 The curve will be a straight line with this configuration:

 BezierInterpolation b=new BezierInterpolation(1f/3,-1f/3);

Field Summary

 float
c1

 float
c2

Constructor Summary

BezierInterpolation(float h1,
                    float h2)

Method Summary

 float
interpolate(float a,
            float b,
            float t)

          Implements an interpolation equation.

 void
setCoefficients(float a,
                float b)

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

c1

public float c1

c2

public float c2

Constructor Detail

BezierInterpolation

public BezierInterpolation(float h1,
                           float h2)

Method Detail

interpolate

public float interpolate(float a,
                         float b,
                         float t)

Description copied from interface: InterpolateStrategy

Implements an interpolation equation.

Specified by:
interpolate in interface InterpolateStrategy

Parameters:
a - current value
b - target value
t - normalized interpolation factor (0.0 .. 1.0)

Returns:
interpolated value

setCoefficients

public void setCoefficients(float a,
                            float b)

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD


text:
var test     = require('tape')
var levelup  = require('level-test')()
var sublevel = require('level-sublevel')
var index    = require('../')

test('simple - retrive by times', function (t) {

var db = sublevel(levelup('/tmp/level-index-test', {encoding: 'json'}))

var postByDate = index(db, 'postByDate',
  function (key, value, emit) {
    var obj = value;
    console.log(obj.date);
    emit(obj.date, {
      id : key,
      subject : obj.subject,
      content : obj.content,
      date : obj.date
    });
  }
);

/// then later
function getPost(fromDate, cb)  {
  var a = []
  postByDate.createReadStream({
      start : fromDate.toISOString(),
      end : (new Date()).toISOString()
  })
  .on('data', function(data){
    a.push(data)
  })
  .on('end', function () {
    cb(null, a)
  })
}

require('./generate')(db, function () {
    var start = new Date(2012,0,1)
    getPost(start, function (err, ary) {
      console.log(ary)
      ary.forEach(function (data) {
        t.ok(data.key > start.toISOString())
      })
      t.end()
    });
})

})