text:
use crate::spec::{FramePointer, LinkerFlavor, StackProbeType, Target};

pub fn target() -> Target {
    let mut base = super::linux_musl_base::opts();
    base.cpu = "pentium4".to_string();
    base.max_atomic_width = Some(64);
    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".to_string());
    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-Wl,-melf_i386".to_string());
    // don't use probe-stack=inline-asm until rust#83139 and rust#84667 are resolved
    base.stack_probes = StackProbeType::Call;

    // The unwinder used by i686-unknown-linux-musl, the LLVM libunwind
    // implementation, apparently relies on frame pointers existing... somehow.
    // It's not clear to me why nor where this dependency is introduced, but the
    // test suite does not pass with frame pointers eliminated and it passes
    // with frame pointers present.
    //
    // If you think that this is no longer necessary, then please feel free to
    // ignore! If it still passes the test suite and the bots then sounds good
    // to me.
    //
    // This may or may not be related to this bug:
    // https://llvm.org/bugs/show_bug.cgi?id=30879
    base.frame_pointer = FramePointer::Always;

    Target {
        llvm_target: "i686-unknown-linux-musl".to_string(),
        pointer_width: 32,
        data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
            f64:32:64-f80:32-n8:16:32-S128"
            .to_string(),
        arch: "x86".to_string(),
        options: base,
    }
}


text:
<?php
include('includes/session.php');
include('includes/accessControl.php');

 $a = true; //allow admin
 $m = true; //allow manager
 $u = true; //allow user
 $n = false; //allow anyone

 access($a,$m,$u,$n,$session_group);
 ?>

<!DOCTYPE html>

        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">

        <title>Dave Casey & Co.</title>

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

        <link href="css/stylesheet.css" rel="stylesheet">
        <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet">
        <link href="css/profilePanel.css" rel="stylesheet">
        <link href="css/tablePanel.css" rel="stylesheet">
        <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">

	<?php
	include('includes/menu.php');
	?>

        <link href="css/noMoreTables.css" rel="stylesheet">

 Welcome to the Dave Casey & Co Online Organiser, <?php echo $session_username;?>

Tasks

						<input type="text" class="form-control" id="filter" data-action="filter" placeholder="Filter That Dosen't Work" />

								 Task
								 Start
								 End
								 View

					<?php
						include('connection.php');

						$query = mysql_query("SELECT * FROM task WHERE userId=$session_id AND DATE(taskEnd) >= DATE(NOW()) ORDER BY taskStart ASC", $connection);

						while($rows = mysql_fetch_array($query))
						{
							$taskId = $rows['taskId'];
							$userId = $rows['userId'];
							$taskName = $rows['taskName'];
							$taskNameId = $rows['taskNameId'];
							$taskStart = date_create($rows['taskStart']);
							$taskEnd = date_create($rows['taskEnd']);
							$taskStartTime = substr($rows['taskStart'], 10, -3);
							$taskEndTime = substr($rows['taskEnd'], 10, -3);

							echo('
');
								echo(''.$taskName.'	');

								echo(''); echo($taskStartTime.' - ');  echo(date_format($taskStart, 'l jS F Y')); echo('	 ');

								echo(''); echo($taskEndTime.' - ');  echo(date_format($taskEnd, 'l jS F Y')); echo('	 ');

								echo('

	');

							echo('
');
						}
						$amtOfRows = mysql_num_rows($query);
						 if($amtOfRows < 1)
						 	echo('
There are no tasks
');
					?>

Holidays

						<input type="text" class="form-control" id="filter" data-action="filter" placeholder="Filter That Dosen't Work" />

								 Start
								 End
								 Status
								 Cancel

					<?php
						include('connection.php');

						$query = mysql_query("SELECT * FROM holiday WHERE `userId`='$session_id' AND DATE(end) >= DATE(NOW()) ORDER BY start ASC", $connection);

						while($rows = mysql_fetch_array($query))
						{
							$holidayId = $rows['holidayId'];
							$start = date_create($rows['start']);
							$end = date_create($rows['end']);
							$status = $rows['status'];

							switch($status)
							{

							    case 'p':
							        $statusFormatted = 'Pending';
							        break;
							    case 'a':
							        $statusFormatted = 'Accepted';
							        break;
							    case 'd':
							    	$statusFormatted = 'Denied';
							    	break;

							}

							echo('
');

								echo(''); echo(date_format($start, 'l jS F Y')); echo('	 ');

								echo(''); echo(date_format($end, 'l jS F Y')); echo('	 ');

								echo(''); echo($statusFormatted); echo('	 ');

								echo('

	');

							echo('
');
						}
						$amtOfRows = mysql_num_rows($query);
						 if($amtOfRows < 1)
						 	echo('
There are no holidays
');
					?>

    <?php
    include('includes/footer.php');
    ?>

                Cancel Holiday

                Are you sure you want to cancel this holiday request?

                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                Delete

redpajama_set_name: RedPajamaGithub


text:
$(document).ready(function() {

	$('#tabs').tabs();

	$('.user-delete, .group-delete').jsonClick({
		success: function(msg, evt) { $(evt.currentTarget).parent().remove(); }
	});

});


text:
SYNONYM

#### According to
GRIN Taxonomy for Plants

#### Published in
Barbier & Cie, Nursery trade list 1910-1911:86. 1910

#### Original name
null

### Remarks
null


text:
<?xml version="1.0"?>
<!--
*
* The Nuxeo lifecycle (workflow) declaration for this Service resource's document types.
*
-->
<component name="org.collectionspace.ecm.platform.${NuxeoDocTypeName}.LifeCycleManagerExtensions">
	<extension target="org.nuxeo.ecm.core.lifecycle.LifeCycleService" point="types">
		<types>
			<type name="${NuxeoDocTypeName}">${Lifecycle}</type>
		</types>
	</extension>
</component>


text:
define(function (require) {

    "use strict";

    var $                   = require('jquery'),
        Backbone            = require('backbone'),

        Employee = Backbone.Model.extend({

            urlRoot: "http://www.netbard.com/employees",

            initialize: function () {
                this.reports = new EmployeeCollection();
                this.reports.url = this.urlRoot + "/" + this.id + "/reports";
            }

        }),

        EmployeeCollection = Backbone.Collection.extend({

            model: Employee,

            url: "http://www.netbard.com/employees",
            parse: function(response)
                {
                    return response.employees;
                }

        });

    return {
        Employee: Employee,
        EmployeeCollection: EmployeeCollection
    };

});


text:
package org.brzy.webapp.controller

import org.scalatest.WordSpec
import org.scalatest.matchers.ShouldMatchers

class ImplControllerSpec extends WordSpec with ShouldMatchers with Fixtures {

  "A Contoller Implementataion" should {
    "load" in {
//      val controller = new ImplController
//      assert(controller != null)
//      assert(2 == controller.actions.size)

    }
    "call action" in {
//      val myCtl = new BaseController("test") {
//        def fun1(a: Parameters) = ""
//      }
//      implicit val ctlRef = myCtl
//      val action1 = Action("f1", "f1", myCtl.fun1 _)
//      assert(action1.returnType != null)
//      assert(action1.argTypes != null)
    }
    "call another action" in {
//      val myCtl2 = new BaseController("test") {
//        def fun2(a: Parameters) = ""
//      }
//      implicit val ctlRef2 = myCtl2
//      val action2 = Action("f2","f2", myCtl2.fun2 _)
//      assert(action2.returnType != null)
//      assert(action2.argTypes != null)
    }
    "intercept an action" in {
//
//      val controller = new ImplController
//      val action = controller.actions.find(_.actionPath == "list").get
//      // need to create parameters from
//      val args = Array[Arg](parameters)
//      val result = action.execute(args,principal)
//      assert(result != null)
//      assert(result.isInstanceOf[Model])
    }
  }
}


text:
#pragma once

#include "il2cpp-config.h"

#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif

#include <stdint.h>
#include <assert.h>
#include <exception>

// System.Text.EncoderReplacementFallbackBuffer
struct EncoderReplacementFallbackBuffer_t599697854;
// System.Text.EncoderReplacementFallback
struct EncoderReplacementFallback_t3024397534;

#include "codegen/il2cpp-codegen.h"
#include "mscorlib_System_Text_EncoderReplacementFallback3024397534.h"

// System.Void System.Text.EncoderReplacementFallbackBuffer::.ctor(System.Text.EncoderReplacementFallback)
extern "C"  void EncoderReplacementFallbackBuffer__ctor_m1930588894 (EncoderReplacementFallbackBuffer_t599697854 * __this, EncoderReplacementFallback_t3024397534 * ___fallback0, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Int32 System.Text.EncoderReplacementFallbackBuffer::get_Remaining()
extern "C"  int32_t EncoderReplacementFallbackBuffer_get_Remaining_m3963160455 (EncoderReplacementFallbackBuffer_t599697854 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Boolean System.Text.EncoderReplacementFallbackBuffer::Fallback(System.Char,System.Int32)
extern "C"  bool EncoderReplacementFallbackBuffer_Fallback_m1355578442 (EncoderReplacementFallbackBuffer_t599697854 * __this, Il2CppChar ___charUnknown0, int32_t ___index1, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Boolean System.Text.EncoderReplacementFallbackBuffer::Fallback(System.Char,System.Char,System.Int32)
extern "C"  bool EncoderReplacementFallbackBuffer_Fallback_m2465367699 (EncoderReplacementFallbackBuffer_t599697854 * __this, Il2CppChar ___charUnknownHigh0, Il2CppChar ___charUnknownLow1, int32_t ___index2, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Boolean System.Text.EncoderReplacementFallbackBuffer::Fallback(System.Int32)
extern "C"  bool EncoderReplacementFallbackBuffer_Fallback_m2505575553 (EncoderReplacementFallbackBuffer_t599697854 * __this, int32_t ___index0, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Char System.Text.EncoderReplacementFallbackBuffer::GetNextChar()
extern "C"  Il2CppChar EncoderReplacementFallbackBuffer_GetNextChar_m491962295 (EncoderReplacementFallbackBuffer_t599697854 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR;


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Bot. Notiser 133(2): 139 (1980)

#### Original name
Rhynchomyces marchalii Sacc. & Marchal, 1885

### Remarks
null


text:
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">

    <title>PHPXRef 0.7.1 : Unnamed Project : /public/themes/admin/mobile__footer.php source</title>
    <link rel="stylesheet" href="../../../sample.css" type="text/css">
    <link rel="stylesheet" href="../../../sample-print.css" type="text/css" media="print">

    <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">

            [ Index ]

PHP Cross Reference of Unnamed Project

[ Show Explorer ]
[ Hide Navbar ]

title

Body

[close]

/public/themes/admin/ -> mobile__footer.php (source)

[Summary view]
[Print]
[Text view]

   1      <footer>
   2          <div class="container">
   3              <div class="row">
   4                  <div class="column size1of2">
   5                      <a href="<?php echo site_url(SITE_AREA .'/settings/users/edit/'. $this->current_user->id) ?>">My Account</a>
   6                  </div>
   7
   8                  <div class="column size1of2 last-column">
   9                      <p>{elapsed_time} seconds. {memory_usage}<br/>
  10                      Built with <a href="http://cibonfire.com" target="_blank"><i class="icon-fire" style="color:red;">&nbsp;</i>&nbsp;Bonfire</a>
  11                      </p>
  12                  </div>
  13              </div>
  14          </div>
  15      </footer>
  16
  17      <div id="debug"><!-- Stores the Profiler Results --></div>
  18
  19    <!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if offline -->
  20    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
  21    <script>window.jQuery || document.write('<script src="<?php echo js_path(); ?>jquery-1.7.2.min.js"><\/script>')</script>
  22
  23      <?php echo Assets::js(); ?>
  24  </body>
  25  </html>

title

Description

Body

title

Description

Body

title

Description

Body

title

Body

Generated: Thu Oct 23 18:57:41 2014
	Cross-referenced by PHPXref 0.7.1


text:
class CreateExhibitorsCategories < ActiveRecord::Migration
  def change
    create_table :exhibitors_categories do |t|
      t.integer :exhibitor_id
      t.integer :category_id

      t.timestamps
    end
  end
end


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    android:id="@+id/activity_main"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context="fr.wildcodeschool.amazin.MainActivity">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello World!"/>
</LinearLayout>


text:
layout: post
title: I Love Big Tits - Scene 5
titleinfo: pornvd
desc: Watch I Love Big Tits - Scene 5. Pornhub is the ultimate xxx porn and sex site.
---

I Love Big Tits - Scene 5

Watch I Love Big Tits - Scene 5. Pornhub is the ultimate xxx porn and sex site.


text:
package com.brianledbetter.kwplogger;

/**
 * Created by b3d on 12/19/15.
 */
// Android = facepalm
public class StateSingleton {
    private static StateSingleton mInstance = null;
    private boolean mIsConnected = false;
    private boolean mIsConnecting = false;

    public static synchronized StateSingleton getInstance(){
        if(mInstance == null)
        {
            mInstance = new StateSingleton();
        }
        return mInstance;
    }

    public boolean getIsConnected() {
        return this.mIsConnected;
    }

    public void setIsConnected(boolean value){
        mIsConnected = value;
    }

    public boolean getIsConnecting() {
        return this.mIsConnecting;
    }

    public void setIsConnecting(boolean value){
        mIsConnecting = value;
    }
}


text:
pouch-model
===========

PouchDB-based model objects for Angular

`$pouchModel` is intended to be a drop-in replacement for the `$resource` service that
comes with Angular's `ngResource` module for building offline-first web applications.
`$pouchModel` also provides a more sophisticated API than `$resource` for defining a
data model using [JSON Schema](http://json-schema.org/) so that business logic that
would typically reside on the server can be relocated to the client.

Getting Started
---------------

Install development dependencies:

```shell
npm install
```

Build for distribution:

```shell
grunt build
```

Example
-------

An example application is included in the `example` directory that demonstrates how
to use `$pouchModel` as a drop-in replacement for `$resource` in a typical Angular
application.

Install required Bower components:

```shell
bower install
```

Start the Express app server:

```shell
grunt serve
```


text:
import abc
import json
import logging
from pathlib import Path

import networkx

logger = logging.getLogger(__name__)

class ProtocolException(Exception):
    pass

class BaseRepository(abc.ABC):
    def __init__(self, absolute_path: Path):
        if not absolute_path.exists():
            logger.error("repository path `%s` does not exist", absolute_path.name)
            raise FileNotFoundError("repository path `%s` does not exist" % absolute_path.name)

        self._absolute_path = absolute_path

        if not self.info_path.exists():
            logger.error("`%s` is not a valid BiReUS repository", absolute_path.name)
            raise ValueError("`%s` is not a valid BiReUS repository" % absolute_path.name)

        logger.debug("Initialize Repository @ %s ", absolute_path)
        with self.info_path.open("r") as file:
            self._metadata = json.load(file)

        self.version_graph = networkx.read_gml(str(self.version_graph_path))  # type: networkx.Graph

    @property
    def absolute_path(self):
        return self._absolute_path

    @property
    @abc.abstractmethod
    def info_path(self) -> Path:
        pass

    @property
    @abc.abstractmethod
    def version_graph_path(self) -> Path:
        pass

    @property
    def name(self) -> str:
        return self._metadata['name']

    @property
    def first_version(self) -> str:
        return self._metadata['first_version']

    @property
    def latest_version(self) -> str:
        return self._metadata['latest_version']

    def has_version(self, name: str):
        return self.version_graph.has_node(name)

    @property
    def strategy(self) -> str:
        return self._metadata['strategy']

    @property
    def protocol(self) -> int:
        return self._metadata['protocol']


text:
void* glp_malloc(int size) {
  void* header = malloc(size + 10);
  return (void*)((char*)header + 10);
}


text:
require 'match/commands_generator'

describe Match::CommandsGenerator do
  let(:available_options) { Match::Options.available_options }

  def expect_runner_run_with(expected_options)
    fake_runner = "runner"
    expect(Match::Runner).to receive(:new).and_return(fake_runner)
    expect(fake_runner).to receive(:run) do |actual_options|
      expect(expected_options._values).to eq(actual_options._values)
    end
  end

  Match.environments.each do |env|
    describe ":#{env} option handling" do
      it "can use the git_url short flag from tool options" do
        stub_commander_runner_args([env, '-r', 'git@github.com:you/your_repo.git'])

        expected_options = FastlaneCore::Configuration.create(available_options, {
          git_url: 'git@github.com:you/your_repo.git',
          type: env
        })

        expect_runner_run_with(expected_options)

        Match::CommandsGenerator.start
      end

      it "can use the git_branch flag from tool options" do
        stub_commander_runner_args([env, '--git_branch', 'my-branch'])

        expected_options = FastlaneCore::Configuration.create(available_options, {
          git_branch: 'my-branch',
          type: env
        })

        expect_runner_run_with(expected_options)

        Match::CommandsGenerator.start
      end
    end
  end

  describe ":change_password option handling" do
    def expect_change_password_with(expected_options)
      expect(Match::ChangePassword).to receive(:update) do |args|
        expect(args[:params]._values).to eq(expected_options._values)
      end
      expect(FastlaneCore::UI).to receive(:success).with(/Successfully changed the password./)
    end

    it "can use the git_url short flag from tool options" do
      stub_commander_runner_args(['change_password', '-r', 'git@github.com:you/your_repo.git'])

      expected_options = FastlaneCore::Configuration.create(available_options, { git_url: 'git@github.com:you/your_repo.git' })

      expect_change_password_with(expected_options)

      Match::CommandsGenerator.start
    end

    it "can use the shallow_clone flag from tool options" do
      stub_commander_runner_args(['change_password', '--shallow_clone', 'true'])

      expected_options = FastlaneCore::Configuration.create(available_options, { shallow_clone: true })

      expect_change_password_with(expected_options)

      Match::CommandsGenerator.start
    end
  end

  describe ":decrypt option handling" do
    def expect_githelper_clone_with(git_url, shallow_clone, git_branch)
      fake_storage = "fake_storage"
      expect(Match::Storage::GitStorage).to receive(:configure).with({
        git_url: git_url,
        shallow_clone: shallow_clone,
        git_branch: git_branch[:branch],
        clone_branch_directly: git_branch[:clone_branch_directly]
      }).and_return(fake_storage)

      expect(fake_storage).to receive(:download)
      allow(fake_storage).to receive(:working_directory).and_return("yolo_path")
      allow(fake_storage).to receive(:keychain_name).and_return("https://github.com/fastlane/certs")

      expect(FastlaneCore::UI).to receive(:success).with(/Successfully decrypted certificates/)
      expect(FastlaneCore::UI).to receive(:success).with(/Repo is at/)
    end

    it "can use the git_url short flag from tool options" do
      stub_const('ENV', { 'MATCH_PASSWORD' => '' })
      stub_commander_runner_args(['decrypt', '-r', 'git@github.com:you/your_repo.git'])

      expect_githelper_clone_with('git@github.com:you/your_repo.git', false, { branch: 'master', clone_branch_directly: false })

      Match::CommandsGenerator.start
    end

    it "can use the shallow_clone flag from tool options" do
      stub_const('ENV', { 'MATCH_PASSWORD' => '' })
      stub_commander_runner_args(['decrypt', '-r', 'git@github.com:you/your_repo.git', '--shallow_clone', 'true'])

      expect_githelper_clone_with('git@github.com:you/your_repo.git', true, { branch: 'master', clone_branch_directly: false })

      Match::CommandsGenerator.start
    end
  end

  def expect_nuke_run_with(expected_options, type)
    fake_nuke = "nuke"
    expect(Match::Nuke).to receive(:new).and_return(fake_nuke)
    expect(fake_nuke).to receive(:run) do |actual_options, args|
      expect(actual_options._values).to eq(expected_options._values)
      expect(args[:type]).to eq(type)
    end
  end

  ["development", "distribution"].each do |type|
    describe "nuke #{type} option handling" do
      it "can use the git_url short flag from tool options" do
        stub_commander_runner_args(['nuke', type, '-r', 'git@github.com:you/your_repo.git'])

        expected_options = FastlaneCore::Configuration.create(available_options, { git_url: 'git@github.com:you/your_repo.git' })

        expect_nuke_run_with(expected_options, type)

        Match::CommandsGenerator.start
      end

      it "can use the git_branch flag from tool options" do
        # leaving out the command name defaults to 'run'
        stub_commander_runner_args(['nuke', type, '--git_branch', 'my-branch'])

        expected_options = FastlaneCore::Configuration.create(available_options, { git_branch: 'my-branch' })

        expect_nuke_run_with(expected_options, type)

        Match::CommandsGenerator.start
      end
    end
  end

  # :init is not tested here because it does not use any tool options
end


text:
import { bindable, containerless } from 'aurelia-framework';
import * as util from './bridge/util';

@containerless()
export class ToolbarLinks {
  @bindable() public doc = false;
  @bindable() public comp = false;

  public compChanged(newValue) {
    this.comp = util.getBoolean(newValue);
  }
  public docChanged(newValue) {
    this.doc = util.getBoolean(newValue);
  }
}


text:
package com.google.errorprone.bugpatterns;

import static com.google.errorprone.CompilationTestHelper.sources;

import com.google.errorprone.CompilationTestHelper;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

/**
 * @author eaftan@google.com (Eddie Aftandilian)
 */
@RunWith(JUnit4.class)
public class StaticAccessedFromInstanceTest {

  private CompilationTestHelper compilationHelper;

  @Before
  public void setUp() {
    compilationHelper = new CompilationTestHelper(StaticAccessedFromInstance.class);
  }

  @Test
  public void testPositiveCase1() throws Exception {
    compilationHelper.assertCompileFailsWithMessages(
        sources(getClass(), "StaticAccessedFromInstancePositiveCase1.java"));
  }

  @Test
  public void testPositiveCase2() throws Exception {
    compilationHelper.assertCompileFailsWithMessages(
        sources(getClass(), "StaticAccessedFromInstancePositiveCase2.java"));
  }

  @Test
  public void testNegativeCases() throws Exception {
    compilationHelper.assertCompileSucceeds(
        sources(getClass(), "StaticAccessedFromInstanceNegativeCases.java"));
  }

}


text:
<?php

declare(strict_types=1);

namespace EngineWorks\DBAL\Traits;

use EngineWorks\DBAL\CommonTypes;
use EngineWorks\DBAL\DBAL;

/** @var DBAL $this */
trait MethodSqlLimit
{
    private function sqlLimitOffset(string $query, int $requestedPage, int $recordsPerPage = 20): string
    {
        $requestedPage = max(1, $requestedPage) - 1; // zero indexed
        $recordsPerPage = max(1, $recordsPerPage);
        return rtrim($query, "; \t\n\r\0\x0B")
            . ' LIMIT ' . $this->sqlQuote($recordsPerPage, CommonTypes::TINT)
            . ' OFFSET ' . $this->sqlQuote($recordsPerPage * $requestedPage, CommonTypes::TINT)
            . ';';
    }

    private function sqlLimitOffsetFetchNext(string $query, int $requestedPage, int $recordsPerPage = 20): string
    {
        $requestedPage = max(1, $requestedPage) - 1; // zero indexed
        $recordsPerPage = max(1, $recordsPerPage);
        return rtrim($query, "; \t\n\r\0\x0B")
            . ' OFFSET ' . $this->sqlQuote($recordsPerPage * $requestedPage, CommonTypes::TINT) . ' ROWS'
            . ' FETCH NEXT ' . $this->sqlQuote($recordsPerPage, CommonTypes::TINT) . ' ROWS ONLY'
            . ';';
    }
}


text:
package org.marsik.bugautomation.trello;

import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.DefaultValue;
import javax.ws.rs.FormParam;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.QueryParam;
import java.util.List;
import java.util.Map;

public interface TrelloClient {
    @GET
    @Path("/1/boards/{id}")
    @Consumes("application/json")
    Board getBoard(@PathParam("id") String id);

    @GET
    @Path("/1/boards/{id}")
    @Consumes("application/json")
    Board getBoardWithData(@PathParam("id") String id,
            @QueryParam("lists") @DefaultValue("open") String lists,
            @QueryParam("cards") @DefaultValue("open") String cards,
            @QueryParam("members") @DefaultValue("all") String members);

    @GET
    @Path("/1/boards/{id}/labels")
    @Consumes("application/json")
    List<Label> getBoardLabels(@PathParam("id") String id);

    @POST
    @Path("/1/lists/{id}/cards")
    @Consumes("application/json")
    Card createCard(@PathParam("id") String listId, Map<String, Object> card);

    @PUT
    @Path("/1/cards/{id}")
    @Consumes("application/json")
    Card updateCard(@PathParam("id") String cardId, Map<String, Object> card);

    @GET
    @Path("/1/boards/{id}/lists")
    @Consumes("application/json")
    List<TrelloList> getListByBoard(@PathParam("id") String boardId);

    @POST
    @Path("/1/cards/{id}/idMembers")
    @Consumes("application/json")
    void assignCardToUser(@PathParam("id") String cardId, @FormParam("value") String userId);

    @PUT
    @Path("/1/cards/{id}/idList")
    @Consumes("application/json")
    void moveCard(@PathParam("id") String cardId, @FormParam("value") String listId);

    @POST
    @Path("/1/cards/{id}/idLabels")
    @Consumes("application/json")
    void addLabelToCard(@PathParam("id") String cardId, @FormParam("value") String labelId);

    @DELETE
    @Path("/1/cards/{id}/idLabels/{value}")
    @Consumes("application/json")
    void removeLabelFromCard(@PathParam("id") String cardId, @PathParam("value") String labelId);

    @PUT
    @Path("/1/cards/{id}/closed")
    @Consumes("application/json")
    void archiveCard(@PathParam("id") String cardId, Map<String, Object> attributes);
}


text:
/*
 Author:     Andy, nkuwjg@gmail.com
 Date:       Dec 20, 2014
 Problem:    Substring with Concatenation of All Words
 Difficulty: Easy
 Source:     https://oj.leetcode.com/problems/substring-with-concatenation-of-all-words/
 Notes:
 You are given a string, S, and a list of words, L, that are all of the same length. Find all
 starting indices of substring(s) in S that is a concatenation of each word in L exactly once
 and without any intervening characters.
 For example, given:
 S: "barfoothefoobarman"
 L: ["foo", "bar"]
 You should return the indices: [0,9].
 (order does not matter).

 Solution: 1. Brute + HashMap.
           2. Sliding Window + HashMap. from Sun Mian.
*/
public class Solution {
    public List<Integer> findSubstring_1(String S, String[] L) {
        List<Integer> res = new ArrayList<Integer>();
        if(L.length==0 || S==null || S.length()==0) return res;
        int M = S.length(), N = L.length;
        int K = L[0].length();
        HashMap<String, Integer> need = new HashMap<String, Integer>();
        for(String str: L) {
            if(need.containsKey(str)) {
                need.put(str, need.get(str)+1);
            } else {
                need.put(str, 1);
            }
        }
        for (int i = 0; i <= M - N*K; ++i) {
            HashMap<String, Integer> found = new HashMap<String, Integer>();
            int j = 0;
            for (j = 0; j < N; ++j) {
                String s = S.substring(i + j * K, i + (j+1) * K);
                if (need.containsKey(s) == false) break;
                if (found.containsKey(s) == true) {
                    if (need.get(s) <= found.get(s)) break;
                    found.put(s, found.get(s)+1);
                } else found.put(s, 1);
            }
            if (j == N) res.add(i);
        }
        return res;
    }

    public List<Integer> findSubstring_2(String S, String[] L) {
        List<Integer> list = new ArrayList<>();
        Map<String, Integer> need = new HashMap<>();
        for(String str: L) {
            if(need.containsKey(str)) {
                need.put(str, need.get(str)+1);
            } else {
                need.put(str, 1);
            }
        }
        int n = L[0].length(), m = L.length;
        for (int i = 0; i < n; ++i) {
            Map<String, Integer> find = new HashMap<>();
            for (int start = i, end = i, count = 0; end + n <= S.length(); end += n) {
                String str = S.substring(end, end + n);
                if (need.get(str) == null) {
                    start = end + n;
                    find.clear();
                    count = 0;
                    continue;
                }
                while (find.get(str) != null && find.get(str) >= need.get(str)) {
                    String subStart = S.substring(start, start + n);
                    find.put(subStart, find.get(subStart) - 1);
                    start += n;
                    --count;
                }
                find.put(str, (find.get(str) == null ? 0 : find.get(str)) + 1);
                ++count;
                if (count != m) continue;
                list.add(start);
            }
        }
        return list;
    }

}


text:
This is my README file.

There are many like it but this one is mine.
QUACK QUACK QUACK ATTACK!!!


text:
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
using QuantConnect.Algorithm.Framework.Alphas;

namespace QuantConnect.Algorithm.Framework.Portfolio
{
    /// <summary>
    /// Base alpha streams portfolio construction model
    /// </summary>
    public class AlphaStreamsPortfolioConstructionModel : IPortfolioConstructionModel
    {
        /// <summary>
        /// Get's the weight for an alpha
        /// </summary>
        /// <param name="alphaId">The algorithm instance that experienced the change in securities</param>
        /// <returns>The alphas weight</returns>
        public virtual decimal GetAlphaWeight(string alphaId)
        {
            throw new System.NotImplementedException();
        }

        /// <summary>
        /// Event fired each time the we add/remove securities from the data feed
        /// </summary>
        /// <param name="algorithm">The algorithm instance that experienced the change in securities</param>
        /// <param name="changes">The security additions and removals from the algorithm</param>
        public virtual void OnSecuritiesChanged(QCAlgorithm algorithm, SecurityChanges changes)
        {
            throw new System.NotImplementedException();
        }

        /// <summary>
        /// Create portfolio targets from the specified insights
        /// </summary>
        /// <param name="algorithm">The algorithm instance</param>
        /// <param name="insights">The insights to create portfolio targets from</param>
        /// <returns>An enumerable of portfolio targets to be sent to the execution model</returns>
        public virtual IEnumerable<IPortfolioTarget> CreateTargets(QCAlgorithm algorithm, Insight[] insights)
        {
            throw new System.NotImplementedException();
        }
    }
}


text:
@class NSMutableArray, NSMutableDictionary, NSString;

@interface CSendMesEvent : CMultiEvent
{
    NSMutableDictionary *m_dicMsgList;
    NSMutableArray *m_arrMsgList;
    NSString *m_nsLocalUsrName;
    _Bool m_bFinish;
    _Bool m_bNotifyNotOpen;
    unsigned int m_uiScene;
}

@property(retain, nonatomic) NSString *m_nsLocalUsrName; // @synthesize m_nsLocalUsrName;
- (void).cxx_destruct;
- (void)deleteSendMsgAfterUpdateMsgStatus:(unsigned int)arg1 userName:(id)arg2 localId:(unsigned int)arg3;
- (void)NotifyFromEvent:(id)arg1 Message:(unsigned int)arg2 MessageInfo:(id)arg3;
- (void)HandleSendFail:(unsigned int)arg1 MessageInfo:(id)arg2;
- (void)LoadMsgFromDB;
- (void)TimerCheckEvent;
- (void)Stop;
- (_Bool)Start:(unsigned int *)arg1 RetInfo:(id)arg2;
- (void)CheckMessageTime;
- (_Bool)SetEventInfo:(id)arg1;
- (void)dealloc;
- (id)init;

@end


text:
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using System;
using System.Runtime.InteropServices;
using Xunit;
using static Microsoft.Azure.WebJobs.Script.EnvironmentSettingNames;

namespace Microsoft.Azure.WebJobs.Script.Tests
{
    public class EnvironmentTests
    {
        [Fact]
        public void IsAppServiceWindowsEnvironment_SetAzureWebsiteInstanceId_ReturnsTrue()
        {
            var environment = new TestEnvironment();
            environment.SetEnvironmentVariable(AzureWebsiteInstanceId, Guid.NewGuid().ToString("N"));
            if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
            {
                Assert.True(environment.IsAppServiceWindowsEnvironment());
            }
            else
            {
                Assert.False(environment.IsAppServiceWindowsEnvironment());
            }
        }

        [Fact]
        public void IsAppServiceWindowsEnvironment_AzureWebsiteInstanceIdNotSet_ReturnsFalse()
        {
            var environment = new TestEnvironment();
            Assert.False(environment.IsAppServiceWindowsEnvironment());
        }

        [Fact]
        public void IsCoreToolsEnvironment_SetAzureWebsiteInstanceId_ReturnsTrue()
        {
            var environment = new TestEnvironment();
            environment.SetEnvironmentVariable(CoreToolsEnvironment, "true");
            Assert.True(environment.IsCoreToolsEnvironment());
        }

        [Fact]
        public void IsLinuxAppServiceEnvWithPersistentStorage_NotLinux_ReturnsFalse()
        {
            var environment = new TestEnvironment();
            environment.SetEnvironmentVariable(AzureWebsiteInstanceId, Guid.NewGuid().ToString("N"));
            Assert.False(environment.IsLinuxAppServiceEnvWithPersistentFileSystem());
        }

        [Fact]
        public void IsLinuxAppServiceEnvWithPersistentStorage_LinuxStorageSettingNotPresent_ReturnsTrue()
        {
            var environment = new TestEnvironment();
            environment.SetEnvironmentVariable(AzureWebsiteInstanceId, Guid.NewGuid().ToString("N"));
            environment.SetEnvironmentVariable(FunctionsLogsMountPath, Guid.NewGuid().ToString("N"));
            Assert.True(environment.IsLinuxAppServiceEnvWithPersistentFileSystem());
        }

        [Fact]
        public void IsLinuxAppServiceEnvWithPersistentStorage_StorageSetToFalse_ReturnsFalse()
        {
            var environment = new TestEnvironment();
            environment.SetEnvironmentVariable(AzureWebsiteInstanceId, Guid.NewGuid().ToString("N"));
            environment.SetEnvironmentVariable(FunctionsLogsMountPath, Guid.NewGuid().ToString("N"));
            environment.SetEnvironmentVariable(LinuxAzureAppServiceStorage, "false");
            Assert.False(environment.IsLinuxAppServiceEnvWithPersistentFileSystem());
        }

        [Fact]
        public void IsLinuxAppServiceEnvWithPersistentStorage_NotLinuxWithStorageSet_ReturnsFalse()
        {
            var environment = new TestEnvironment();
            environment.SetEnvironmentVariable(AzureWebsiteInstanceId, Guid.NewGuid().ToString("N"));
            environment.SetEnvironmentVariable(LinuxAzureAppServiceStorage, "true");
            Assert.False(environment.IsLinuxAppServiceEnvWithPersistentFileSystem());
        }

        [Fact]
        public void IsLinuxAppServiceEnvWithPersistentStorage_StorageSetToTrue_ReturnsTrue()
        {
            var environment = new TestEnvironment();
            environment.SetEnvironmentVariable(AzureWebsiteInstanceId, Guid.NewGuid().ToString("N"));
            environment.SetEnvironmentVariable(FunctionsLogsMountPath, Guid.NewGuid().ToString("N"));
            environment.SetEnvironmentVariable(LinuxAzureAppServiceStorage, "true");
            Assert.True(environment.IsLinuxAppServiceEnvWithPersistentFileSystem());
        }

        [Fact]
        public void IsPersistentStorageAvailable_IsWindows_ReturnsTrue()
        {
            var environment = new TestEnvironment();
            environment.SetEnvironmentVariable(AzureWebsiteInstanceId, Guid.NewGuid().ToString("N"));
            Assert.True(environment.IsAppServiceWindowsEnvironment());
            Assert.True(environment.IsPersistentFileSystemAvailable());
        }

        [Fact]
        public void IsPersistentStorageAvailable_IsCoreTools_ReturnsTrue()
        {
            var environment = new TestEnvironment();
            environment.SetEnvironmentVariable(CoreToolsEnvironment, "true");
            Assert.True(environment.IsPersistentFileSystemAvailable());
        }

        [Fact]
        public void IsContainerEnvironment_valid_ReturnsTrue()
        {
            var environment = new TestEnvironment();
            environment.SetEnvironmentVariable(RunningInContainer, "true");
            Assert.True(environment.IsContainerEnvironment());
        }

        [Theory]
        [InlineData("false")]
        [InlineData(null)]
        public void IsContainerEnvironment_Invalid_ReturnsFalse(string runningInContainerValue)
        {
            var environment = new TestEnvironment();
            environment.SetEnvironmentVariable(RunningInContainer, runningInContainerValue);
            Assert.False(environment.IsContainerEnvironment());
        }

        [Fact]
        public void IsPersistentStorageAvailable_IsLinuxWithoutStorage_ReturnsFalse()
        {
            var environment = new TestEnvironment();
            environment.SetEnvironmentVariable(AzureWebsiteInstanceId, Guid.NewGuid().ToString("N"));
            environment.SetEnvironmentVariable(FunctionsLogsMountPath, Guid.NewGuid().ToString("N"));
            environment.SetEnvironmentVariable(LinuxAzureAppServiceStorage, "false");
            Assert.False(environment.IsLinuxAppServiceEnvWithPersistentFileSystem());
            if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
            {
                Assert.True(environment.IsPersistentFileSystemAvailable());
            }
            else
            {
                Assert.False(environment.IsPersistentFileSystemAvailable());
            }
        }

        [Fact]
        public void IsPersistentStorageAvailable_IsLinuxWithStorage_ReturnsTrue()
        {
            var environment = new TestEnvironment();
            environment.SetEnvironmentVariable(AzureWebsiteInstanceId, Guid.NewGuid().ToString("N"));
            environment.SetEnvironmentVariable(FunctionsLogsMountPath, Guid.NewGuid().ToString("N"));
            Assert.True(environment.IsLinuxAppServiceEnvWithPersistentFileSystem());
            Assert.True(environment.IsPersistentFileSystemAvailable());
        }

        [Theory]
        [InlineData("1", true)]
        [InlineData("https://functionstest.blob.core.windows.net/microsoft/functionapp.zip", true)]
        [InlineData("https://functionstest.blob.core.windows.net/microsoft/functionapp.zip?sv=123434234234&other=key", true)]
        [InlineData("/microsoft/functionapp.zip", false)]
        [InlineData("functionapp.zip", false)]
        [InlineData("0", false)]
        [InlineData("", false)]
        public void IsZipDeployment_CorrectlyValidatesSetting(string appSettingValue, bool expectedOutcome)
        {
            var zipSettings = new string[]
            {
                EnvironmentSettingNames.AzureWebsiteZipDeployment,
                EnvironmentSettingNames.AzureWebsiteAltZipDeployment,
                EnvironmentSettingNames.AzureWebsiteRunFromPackage
            };

            // Test each environment variable being set
            foreach (var setting in zipSettings)
            {
                var environment = new TestEnvironment();
                environment.SetEnvironmentVariable(setting, appSettingValue);
                Assert.Equal(environment.IsZipDeployment(), expectedOutcome);
            }

            // Test multiple being set
            var allSettingsEnvironment = new TestEnvironment();

            foreach (var setting in zipSettings)
            {
                allSettingsEnvironment.SetEnvironmentVariable(setting, appSettingValue);
            }

            Assert.Equal(allSettingsEnvironment.IsZipDeployment(), expectedOutcome);
        }
    }
}


text:
package at.ac.tuwien.infosys.jcloudscale.migration.utility;

import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;
import java.util.Set;

import at.ac.tuwien.infosys.jcloudscale.CloudInvocationInfos;
import at.ac.tuwien.infosys.jcloudscale.annotations.CloudObject;
import at.ac.tuwien.infosys.jcloudscale.annotations.CloudObjectId;
import at.ac.tuwien.infosys.jcloudscale.annotations.DestructCloudObject;
import at.ac.tuwien.infosys.jcloudscale.annotations.EventSink;
import at.ac.tuwien.infosys.jcloudscale.exception.IllegalDefinitionException;
import at.ac.tuwien.infosys.jcloudscale.migration.annotations.MigrationTransient;
import at.ac.tuwien.infosys.jcloudscale.migration.annotations.NoMigration;
import at.ac.tuwien.infosys.jcloudscale.migration.annotations.PostMigration;
import at.ac.tuwien.infosys.jcloudscale.migration.annotations.PreMigration;
import at.ac.tuwien.infosys.jcloudscale.migration.annotations.SerializationProvider;
import at.ac.tuwien.infosys.jcloudscale.migration.serialization.DefaultSerializationProvider;
import at.ac.tuwien.infosys.jcloudscale.migration.serialization.ISerializationProvider;

/**
 * Provides helper methods for working with {@link CloudObject}'s annotations
 * and for migrating CloudObjects.
 */
public class MigrationUtil {

	// =========================================================================
	// Cache
	// =========================================================================

	// Hashtable: synchronized + non-null
	private static Map<Class<?>, MigrationUtilCacheDto> cacheMap =
			new Hashtable<Class<?>, MigrationUtilCacheDto>();

	private static synchronized MigrationUtilCacheDto getCache(Class<?> clazz) {
		MigrationUtilCacheDto dto = cacheMap.get(clazz);
		if (dto == null) {
			dto = new MigrationUtilCacheDto();
			cacheMap.put(clazz, dto);
		}
		return dto;
	}

	public static void resetCache() {
		cacheMap.clear();
	}

	// =========================================================================
	// Public Methods
	// =========================================================================

	/**
	 * Checks if all migration-specific annotations are used correctly (if any).
	 *
	 * @param clazz
	 *            The cloud object type to check
	 * @throws IllegalDefinitionException
	 *             If the given class doesn't comply to migration requirements
	 * @throws NullPointerException
	 *             If the given class is null
	 */
	public static void checkLegalMigrationDef(Class<?> clazz) throws IllegalDefinitionException {
		MigrationUtilCacheDto cache = getCache(clazz);

		if (cache.isLegal != null) {
			// Cache hit
			if (!cache.isLegal)
				throw cache.legalError;
		} else {
			// Cache miss
			try {
				// Check @PreMigrate and @PostMigrate methods
				for (Method m : clazz.getDeclaredMethods()) {
					if (m.isAnnotationPresent(PreMigration.class)
							|| m.isAnnotationPresent(PostMigration.class)) {
						if (m.isAnnotationPresent(DestructCloudObject.class))
							throw new IllegalDefinitionException(
									"Illegal method "
											+ m.getName()
											+ " annotated with @DestructCloudObject."
											+ "You may not annotate @PreMigration/@PostMigration with @DestructCloudObject");
						if (m.getParameterTypes().length > 0)
							throw new IllegalDefinitionException(
									"Illegal method "
											+ m.getName()
											+ " annotated with @PreMigration/@PostMigration. "
											+ "You may only annotate methods without parameters with these annotations.");
						if (Modifier.isStatic(m.getModifiers()))
							throw new IllegalDefinitionException(
									"Illegal method "
											+ m.getName()
											+ " annotated with @PreMigration/@PostMigration. "
											+ "You may only annotate non-static methods with these annotations.");
					}
				}

				// Check @MigrationTransient fields
				for (Field f : clazz.getDeclaredFields()) {
					if (f.isAnnotationPresent(MigrationTransient.class)) {
						if (Modifier.isStatic(f.getModifiers()))
							throw new IllegalDefinitionException(
									"Illegal field "
											+ f.getName()
											+ " annotated with @MigrationTransient. "
											+ "You may only annotate non-static fields with this annotation.");

						Class<?> initClazz = f.getAnnotation(MigrationTransient.class).initialize();
						if (initClazz != Class.class && f.getType().isPrimitive())
							throw new IllegalDefinitionException(
									"Illegal field "
											+ f.getName()
											+ " annotated with @MigrationTransient. "
											+ "You may not specify an initialization class for primitive type fields.");
						if (initClazz != Class.class && !f.getType().isAssignableFrom(initClazz))
							throw new IllegalDefinitionException(
									"Illegal field "
											+ f.getName()
											+ " annotated with @MigrationTransient. "
											+ "Specified initialization class not assignable to field.");
					}
				}

				// Recursively Check superclasses (if any)
				if (clazz.getSuperclass() != null) {
					checkLegalMigrationDef(clazz.getSuperclass());
				}
			} catch (IllegalDefinitionException ide) {
				cache.isLegal = false;
				cache.legalError = ide;
				throw ide;
			}
			cache.isLegal = true;
		}
	}

	/**
	 * Checks if the given class is marked to be not considered in migration
	 * decisions.
	 *
	 * @param clazz
	 *            The class to check
	 * @return true or false
	 * @throws NullPointerException
	 *             If the given class is null
	 */
	public static boolean isNoMigrate(Class<?> clazz) {
		MigrationUtilCacheDto cache = getCache(clazz);
		if (cache.isNoMigrate == null) {
			// Cache miss
			cache.isNoMigrate = clazz.isAnnotationPresent(NoMigration.class);
		}
		// Cache hit
		return cache.isNoMigrate;
	}

	/**
	 * Returns the {@link ISerializationProvider} implementation class object
	 * specified for the given class using the {@link SerializationProvider}
	 * annotation.
	 *
	 * @param clazz
	 *            The class to scan for.
	 * @return The implementation class object specified or
	 *         {@link DefaultSerializationProvider} if the annotation is
	 *         missing.
	 */
	public static ISerializationProvider getSerializationProvider(Class<?> clazz)
			throws InstantiationException, InvocationTargetException, IllegalAccessException,
			NoSuchMethodException {
		MigrationUtilCacheDto cache = getCache(clazz);

		if (cache.serializationProvider == null) {
			// Cache miss
			SerializationProvider ann = clazz.getAnnotation(SerializationProvider.class);
			if (ann == null)
				cache.serializationProvider = DefaultSerializationProvider.class;
			else
				cache.serializationProvider = ann.value();
		}

		// Instantiate the serialization provider
		try {
			return cache.serializationProvider.getConstructor(Class.class).newInstance(clazz);
		} catch (Exception e) {
		}
		return cache.serializationProvider.getConstructor().newInstance();
	}

	/**
	 * Scans the given class for methods annotated with {@link PreMigration} and
	 * orders them by their priority
	 *
	 * @param clazz
	 *            The class to scan
	 * @return A sorted set with methods or an empty set if the class has no
	 *         annotated methods
	 */
	// Can't use a SortedSet because methods with the same priority are seen as
	// equal and thus can't be added to the set
	public static List<Method> getSortedPreMigrate(Class<?> clazz) {
		MigrationUtilCacheDto cache = getCache(clazz);
		if (cache.sortedPreMigrate == null) {
			List<Method> tmp = new ArrayList<Method>();

			for (Method method : clazz.getDeclaredMethods()) {
				if (method.isAnnotationPresent(PreMigration.class)) {
					tmp.add(method);
				}
			}

			Collections.sort(tmp, new Comparator<Method>() {
				@Override
				public int compare(Method m1, Method m2) {
					int m1Priority = m1.getAnnotation(PreMigration.class).priority();
					int m2Priority = m2.getAnnotation(PreMigration.class).priority();
					return Integer.compare(m1Priority, m2Priority);
				}
			});

			cache.sortedPreMigrate = Collections.unmodifiableList(tmp);
		}

		return cache.sortedPreMigrate;
	}

	/**
	 * Scans the given class for methods annotated with {@link PostMigration}
	 * and orders them by their priority
	 *
	 * @param clazz
	 *            The class to scan
	 * @return A sorted set with methods or an empty set if the class has no
	 *         annotated methods
	 */
	// Can't use a SortedSet because methods with the same priority are seen as
	// equal and thus can't be added to the set
	public static List<Method> getSortedPostMigrate(Class<?> clazz) {
		MigrationUtilCacheDto cache = getCache(clazz);
		if (cache.sortedPreMigrate == null) {
			List<Method> tmp = new ArrayList<Method>();

			for (Method method : clazz.getDeclaredMethods()) {
				if (method.isAnnotationPresent(PostMigration.class)) {
					tmp.add(method);
				}
			}

			Collections.sort(tmp, new Comparator<Method>() {
				@Override
				public int compare(Method m1, Method m2) {
					int m1Priority = m1.getAnnotation(PostMigration.class).priority();
					int m2Priority = m2.getAnnotation(PostMigration.class).priority();
					return Integer.compare(m1Priority, m2Priority);
				}
			});

			cache.sortedPreMigrate = Collections.unmodifiableList(tmp);
		}

		return cache.sortedPreMigrate;
	}

	/**
	 * Scans the given class for fields annotated with
	 * {@link MigrationTransient}
	 *
	 * @param clazz
	 *            The class to scan
	 * @return A set of fields
	 */
	public static Set<Field> getTransientFields(Class<?> clazz) {
		MigrationUtilCacheDto cache = getCache(clazz);
		if (cache.transientFields == null) {
			Set<Field> tmp = new HashSet<Field>();

			for (Field field : clazz.getDeclaredFields()) {
				if (!Modifier.isStatic(field.getModifiers())
						&& field.isAnnotationPresent(MigrationTransient.class)) {
					tmp.add(field);
				}
			}

			cache.transientFields = Collections.unmodifiableSet(tmp);
		}

		return cache.transientFields;
	}

	/**
	 * Scans the class for fields NOT annotated with {@link MigrationTransient}
	 *
	 * @param clazz
	 *            The class to scan
	 * @return A set of fields
	 */
	public static Set<Field> getNonTransientFields(Class<?> clazz) {
		MigrationUtilCacheDto cache = getCache(clazz);
		if (cache.nonTransientFields == null) {
			Set<Field> tmp = new HashSet<Field>();

			for (Field field : clazz.getDeclaredFields()) {
				if (!Modifier.isStatic(field.getModifiers())
						&& !field.isAnnotationPresent(MigrationTransient.class)) {
					tmp.add(field);
				}
			}

			cache.nonTransientFields = Collections.unmodifiableSet(tmp);
		}

		return cache.nonTransientFields;
	}

	/**
	 * Scans the class for fields annotated with JCloudScale-specific annotations
	 *
	 * @param clazz
	 *            The class to scan
	 * @return A set of fields
	 *
	 * @see CloudObjectId
	 * @see CloudInvocationInfos
	 * @see EventSink
	 */
	public static Set<Field> getJCloudScaleFields(Class<?> clazz) {
		MigrationUtilCacheDto cache = getCache(clazz);
		if (cache.cloudScaleFields == null) {
			Set<Field> tmp = new HashSet<Field>();

			for (Field field : clazz.getDeclaredFields()) {
				if (!Modifier.isStatic(field.getModifiers())
						&& (field.isAnnotationPresent(CloudObjectId.class) ||
								field.isAnnotationPresent(CloudInvocationInfos.class) ||
						field.isAnnotationPresent(EventSink.class))) {
					tmp.add(field);
				}
			}

			cache.cloudScaleFields = Collections.unmodifiableSet(tmp);
		}

		return Collections.unmodifiableSet(cache.cloudScaleFields);
	}

	/**
	 * Resets all given complex-type fields to null, so that the
	 * object can be serialized
	 *
	 * @param cloudObject
	 *            The cloudObject which fields should be reseted
	 * @param fields
	 *            The fields to reset
	 * @throws Exception
	 *             If an exception occurs
	 */
	public static void resetFields(Object cloudObject, Set<Field> fields) throws Exception {
		for (Field f : fields) {
			f.setAccessible(true);
			if (!f.getType().isPrimitive())
				f.set(cloudObject, null);
			else if (f.getType() == double.class)
				f.setDouble(cloudObject, 0d);
			else if (f.getType() == float.class)
				f.setFloat(cloudObject, 0f);
			else if (f.getType() == long.class)
				f.setLong(cloudObject, 0l);
			else if (f.getType() == int.class)
				f.setInt(cloudObject, 0);
			else if (f.getType() == short.class)
				f.setShort(cloudObject, (short) 0);
			else if (f.getType() == byte.class)
				f.setByte(cloudObject, (byte) 0);
			else if (f.getType() == char.class)
				f.setChar(cloudObject, (char) 0);
			else if (f.getType() == boolean.class)
				f.setBoolean(cloudObject, false);
		}
	}

	/**
	 * Initializes all complex type fields of an {@link CloudObject} annotated
	 * with {@link MigrationTransient}. Primitive fields are set to their
	 * declared initialization value. Complex type fields are initialized with a
	 * new instance of the class specified in
	 * {@link MigrationTransient#initialize()} or their declared initialization
	 * value if there's nothing specified
	 *
	 * @param cloudObject
	 *            The CloudObject to initialize.
	 * @param fields
	 *            The fields to initialize.
	 * @throws IllegalAccessException
	 *             If the fields which should be initialized couldn't be
	 *             accessed
	 * @throws InstantiationException
	 *             If a complex field couldn't be initialized
	 * @throws NullPointerException
	 *             If a given field isn't annotated with
	 *             {@link MigrationTransient}
	 */
	public static void initTransientFields(Object cloudObject, Set<Field> fields)
			throws IllegalAccessException, InstantiationException, NullPointerException {
		Object templateCloudObject = cloudObject.getClass().newInstance();
		for (Field f : fields) {
			f.setAccessible(true);
			if (f.getType().isPrimitive()) {
				f.set(cloudObject, f.get(templateCloudObject));
			} else {
				Class<?> initType = f.getAnnotation(MigrationTransient.class).initialize();
				if (initType != Class.class)
					f.set(cloudObject, initType.newInstance());
				else
					f.set(cloudObject, f.getType().newInstance());
			}
		}
	}
}


text:
/**
 *
 */
package org.openntf.domino.schema.impl;

import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

import org.openntf.domino.schema.IDatabaseSchema;
import org.openntf.domino.schema.IDocumentDefinition;
import org.openntf.domino.schema.IItemDefinition;

public class DocumentDefinition implements IDocumentDefinition, Externalizable {
	private String name_; // will be used as Form field value
	private final Set<String> itemDefinitionKeys_ = new HashSet<String>();
	private transient Map<String, IItemDefinition> itemDefs_ = new ConcurrentHashMap<String, IItemDefinition>();
	private final Map<String, String> overrideLabels_ = new HashMap<String, String>();
	private boolean defaultSummary_ = true;
	private transient IDatabaseSchema parentSchema_;
	@SuppressWarnings("unused")
	private DocumentValidator validator_;

	public DocumentDefinition() {

	}

	@Override
	public void setParent(final IDatabaseSchema parent) {
		parentSchema_ = parent;
	}

	@Override
	public IDatabaseSchema getParent() {
		return parentSchema_;
	}

	@Override
	public String getName() {
		return name_;
	}

	@Override
	public void setName(final String name) {
		name_ = name;
	}

	@Override
	public boolean isDefaultSummary() {
		return defaultSummary_;
	}

	@Override
	public void setDefaultSummary(final boolean defaultSummary) {
		defaultSummary_ = defaultSummary;
	}

	@Override
	public Map<String, IItemDefinition> getItemDefinitions() {
		if (itemDefs_.isEmpty()) {
			for (String key : getItemDefinitionKeys()) {
				ItemDefinition id = parentSchema_.getItemDefinitions().get(key);
				if (id != null) {
					itemDefs_.put(key, id);
				}
			}
		}
		return itemDefs_;
	}

	@Override
	public Set<String> getItemDefinitionKeys() {
		return itemDefinitionKeys_;
	}

	public void setItemDefinitionKeys(final Set<String> itemDefinitionKeys) {
		//TODO NTF - Not really sure this should even have a setter, honestly.
		itemDefinitionKeys_.clear();
		itemDefinitionKeys_.addAll(itemDefinitionKeys);
	}

	@Override
	public void addItemDefinition(final IItemDefinition itemDef) {
		if (itemDefs_ != null) {
			itemDefs_.put(itemDef.getName(), itemDef);
		}
		String key = itemDef.getName();
		addItemDefinitionKey(key);
	}

	public void addItemDefinitionKey(final String key) {
		itemDefinitionKeys_.add(key);
	}

	@Override
	public Map<String, String> getOverrideLabels() {
		return overrideLabels_;
	}

	// public void setOverrideLabels(Map<String, String> overrideLabels) {
	// overrideLabels_ = overrideLabels;
	// }

	/*
	 * (non-Javadoc)
	 *
	 * @see java.io.Externalizable#readExternal(java.io.ObjectInput)
	 */
	@Override
	public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
		name_ = in.readUTF();
		defaultSummary_ = in.readBoolean();
		int defCount = in.readInt();
		for (int i = 0; i < defCount; i++) {
			itemDefinitionKeys_.add(in.readUTF());
		}
		int labelCount = in.readInt();
		for (int i = 0; i < labelCount; i++) {
			String key = in.readUTF();
			String value = in.readUTF();
			overrideLabels_.put(key, value);
		}
	}

	/*
	 * (non-Javadoc)
	 *
	 * @see java.io.Externalizable#writeExternal(java.io.ObjectOutput)
	 */
	@Override
	public void writeExternal(final ObjectOutput out) throws IOException {
		out.writeUTF(name_);
		out.writeBoolean(defaultSummary_);
		out.writeInt(itemDefinitionKeys_.size());
		for (String key : itemDefinitionKeys_) {
			out.writeUTF(key);
		}
		out.writeInt(overrideLabels_.size());
		for (Map.Entry<String, String> entry : overrideLabels_.entrySet()) {
			out.writeUTF(entry.getKey());
			out.writeUTF(entry.getValue());
		}
	}

}


text:
Global Denomination GDN
================================

http://www.GlobalDenomination.org

Copyright (c) 2009-2013 Bitcoin Developers
Copyright (c) 2014 Global Denomination Developers

What is Global Denomination GDN?
----------------

Global Denomination is a crypto-currency that is using the X11 Algorithm for energy efficient, CPU and GPU mining with Digishield.
 - 1 minute block targets
 - subsidy halves in 700k blocks (Approx 1 year +)
 - ~56 million total coins
 - 40 coins per block
 - Digishield for retargeting difficulty & to protect from Multi-pools

For more information, as well as an immediately useable, binary version of
the Global Denomination client sofware, see http://www.GlobalDenomination.org

21/07/2014
Qt Wallet redesign
Added Integrated IRC
Added Stats
Added Links

04/06/2014
Extra Cosmetic changes

v0.8.8.0
Fixed Digishield Implementation

v0.8.7 Changes
Hardcoded nodes
Changed Patched KGW to Digishield
Cosmetic Changes to the code

License
-------

Global Denomination is released under the terms of the MIT license. See `COPYING` for more
information or see http://opensource.org/licenses/MIT.

Links
-------
http://www.globaldenomination.org
https://www.gdtalk.org
http://www.gdfaucet.org
http://www.gddice.org
http://www.gdexplorer.org
https://cryptoconnecta.com
https://www.crypto-auctions.com

Global Denomination ANN
https://bitcointalk.org/index.php?topic=578574

https://www.facebook.com/GlobalDenomination
https://twitter.com/GDenomination
http://www.reddit.com/r/GlobalDenominationGDN/


text:
/*global module:false*/
module.exports = function(grunt) {
  // Project configuration.
  grunt.initConfig({
    manifest: grunt.file.readJSON('extension/manifest.json'),

    shell: {
      configure_release: {
          options: { stdout: true, stderr: true },
          command: 'python scripts/configure.py --web_url production'
      },

      configure_staging: {
          options: { stdout: true },
          command: 'python scripts/configure.py --web_url staging'
      },

      configure_dev: {
          options: { stdout: true },
          command: 'python scripts/configure.py --web_url dev'
      },

      configure_local: {
          options: { stdout: true },
          command: 'python scripts/configure.py --web_url local'
      }
    },

    compress: {
      main: {
          options: {
            archive: 'releases/v<%= manifest.version %>.zip'
          },
          files: [
            {src: ['extension/**', '!extension/tests/**', '!extension/manifest_key.json', '!extension/tester.html'], dest: '/'}, // includes files in path and its subdirs
          ]
        }
    }
  });

  // These plugins provide necessary tasks.
  grunt.loadNpmTasks('grunt-contrib-handlebars');
  grunt.loadNpmTasks('grunt-contrib-concat');
  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-mindirect');
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-contrib-sass');
  grunt.loadNpmTasks('grunt-contrib-compress');
  grunt.loadNpmTasks('grunt-shell');

  grunt.registerTask('package_release', ['shell:configure_release', 'compress']);
  grunt.registerTask('package_staging', ['shell:configure_staging', 'compress']);
  grunt.registerTask('package_dev', ['shell:configure_dev', 'compress']);
  grunt.registerTask('package_local', ['shell:configure_local']);
  grunt.registerTask('configure_test', ['shell:configure_test']);

};


text:
require 'formula'

class ErlangInstalled < Requirement
  fatal true
  default_formula 'erlang'
  env :userpaths

  satisfy {
    erl = which('erl') and begin
      `#{erl} -noshell -eval 'io:fwrite("~s~n", [erlang:system_info(otp_release)]).' -s erlang halt | grep -q '^1[789]'`
      $?.exitstatus == 0
    end
  }

  def message; <<-EOS.undent
    Erlang 17 is required to install.

    You can install this with:
      brew install erlang --devel

    Or you can use an official installer from:
      http://www.erlang.org/
    EOS
  end
end

class Elixir < Formula
  homepage 'http://elixir-lang.org/'
  url  'https://github.com/elixir-lang/elixir/archive/v0.13.1.tar.gz'
  sha1 'e89935019a88e76e25d6f32b1afc1568b9560892'

  head 'https://github.com/elixir-lang/elixir.git'

  depends_on ErlangInstalled

  def install
    system "make"
    bin.install Dir['bin/*'] - Dir['bin/*.bat']

    Dir['lib/*/ebin'].each do |path|
      app = File.basename(File.dirname(path))
      (lib/app).install path
    end
  end

  test do
    system "#{bin}/elixir", "-v"
  end
end


text:
package korolev.server.internal

private[korolev] object Cookies {
  val DeviceId = "deviceId"
}


text:
package geospace.render.elements;

import geospace.entity.Constants;
import geospace.entity.Point;
import geospace.entity.Ship;
import org.newdawn.slick.Color;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.geom.RoundedRectangle;
import org.newdawn.slick.geom.Shape;

public class EnergyBar {
    private Ship ship;
    private Point topLeft;
    private float height;
    private float width;

    private Shape bar;
    private final static float CORNER_RADIUS = 5.0f;

    public EnergyBar(Ship ship, Point topLeft, float width, float height) {
        this.ship = ship;
        this.topLeft = topLeft;
        this.height = height;
        this.width = width;

        this.bar = new RoundedRectangle(topLeft.getX(), topLeft.getY(), width, height, EnergyBar.CORNER_RADIUS);
    }

    public void render(Graphics graphics) {
        graphics.setColor(Color.white);
        graphics.draw(this.bar);

        graphics.setColor(ship.getColor());
        graphics.fillRect(this.topLeft.getX() + EnergyBar.CORNER_RADIUS, this.topLeft.getY() + EnergyBar.CORNER_RADIUS - 1.0f, (width - (2 * EnergyBar.CORNER_RADIUS)) * ((float)ship.getEnergy() / Constants.SHIP_MAX_ENERGY), (height - (2 * EnergyBar.CORNER_RADIUS)));
    }

    public Point getTopLeft() {
        return topLeft;
    }

    public Point getBarCenter() {
        return new Point(this.bar.getCenterX(), this.bar.getCenterY());
    }
}


text:
<?php

namespace Victoire\Bundle\FormBundle\Form\Extension;

use Symfony\Component\Form\AbstractTypeExtension;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\FormView;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

/**
 * Extension for Time type.
 *
 * @author phiamo <phiamo@googlemail.com>
 */
class TimeTypeExtension extends AbstractTypeExtension
{
    /**
     * {@inheritdoc}
     */
    public function finishView(FormView $view, FormInterface $form, array $options)
    {
        if ('single_text' === $options['widget'] && isset($options['timepicker'])) {
            $view->vars['timepicker'] = $options['timepicker'];
        }
    }

    /**
     * {@inheritdoc}
     */
    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setOptional([
            'timepicker',
        ]);
    }

    /**
     * {@inheritdoc}
     */
    public function getExtendedType()
    {
        return 'time';
    }
}


text:
// =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2014 projectchrono.org
// All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of the distribution and at
// http://projectchrono.org/license-chrono.txt.
//
// =============================================================================
// Authors: Alessandro Tasora, Radu Serban
// =============================================================================

#include <cstdio>

#include "chrono/geometry/ChCapsule.h"

namespace chrono {
namespace geometry {

// Register into the object factory, to enable run-time dynamic creation and persistence
CH_FACTORY_REGISTER(ChCapsule)

ChCapsule::ChCapsule(const ChCapsule& source) {
    center = source.center;
    rad = source.rad;
    hlen = source.hlen;
}

void ChCapsule::GetBoundingBox(double& xmin,
                               double& xmax,
                               double& ymin,
                               double& ymax,
                               double& zmin,
                               double& zmax,
                               ChMatrix33<>* Rot) const {
    ChVector<> trsfCenter = Rot ? Rot->transpose() * center : center;

    xmin = trsfCenter.x() - rad;
    xmax = trsfCenter.x() + rad;
    ymin = trsfCenter.y() - (rad + hlen);
    ymax = trsfCenter.y() + (rad + hlen);
    zmin = trsfCenter.z() - rad;
    zmax = trsfCenter.z() + rad;
}

void ChCapsule::CovarianceMatrix(ChMatrix33<>& C) const {
    C.setZero();
    C(0, 0) = center.x() * center.x();
    C(1, 1) = center.y() * center.y();
    C(2, 2) = center.z() * center.z();
}

void ChCapsule::ArchiveOUT(ChArchiveOut& marchive) {
    // version number
    marchive.VersionWrite<ChCapsule>();
    // serialize parent class
    ChGeometry::ArchiveOUT(marchive);
    // serialize all member data:
    marchive << CHNVP(center);
    marchive << CHNVP(rad);
    marchive << CHNVP(hlen);
}

void ChCapsule::ArchiveIN(ChArchiveIn& marchive) {
    // version number
    /*int version =*/ marchive.VersionRead<ChCapsule>();
    // deserialize parent class
    ChGeometry::ArchiveIN(marchive);
    // stream in all member data:
    marchive >> CHNVP(center);
    marchive >> CHNVP(rad);
    marchive >> CHNVP(hlen);
}

}  // end namespace geometry
}  // end namespace chrono


text:
package com.intellij.updater;

import org.junit.Test;

import static org.assertj.core.api.Assertions.assertThat;

public class RunnerTest {
  @Test
  public void testExtractingFiles() {
    String[] args = {"bar", "ignored=xxx;yyy;zzz/zzz", "critical=", "ignored=aaa", "baz", "critical=ccc"};
    assertThat(Runner.extractArguments(args, "ignored")).containsExactly("xxx", "yyy", "zzz/zzz", "aaa");
    assertThat(Runner.extractArguments(args, "critical")).containsExactly("ccc");
    assertThat(Runner.extractArguments(args, "unknown")).isEmpty();
  }
}


text:
<?php

namespace Fuel\Core;

/**
 * The Autloader is responsible for all class loading.  It allows you to define
 * different load paths based on namespaces.  It also lets you set explicit paths
 * for classes to be loaded from.
 *
 * @package     Fuel
 * @subpackage  Core
 */
class Autoloader
{

	/**
	 * @var  array  $classes  holds all the classes and paths
	 */
	protected static $classes = array();

	/**
	 * @var  array  holds all the namespace paths
	 */
	protected static $namespaces = array();

	/**
	 * Holds all the PSR-0 compliant namespaces.  These namespaces should
	 * be loaded according to the PSR-0 standard.
	 *
	 * @var  array
	 */
	protected static $psr_namespaces = array();

	/**
	 * @var  array  list off namespaces of which classes will be aliased to global namespace
	 */
	protected static $core_namespaces = array(
		'Fuel\\Core'
	);

	/**
	 * @var  array  the default path to look in if the class is not in a package
	 */
	protected static $default_path = null;

	/**
	 * @var  bool  whether to initialize a loaded class
	 */
	protected static $auto_initialize = null;

	/**
	 * Adds a namespace search path.  Any class in the given namespace will be
	 * looked for in the given path.
	 *
	 * @param   string  the namespace
	 * @param   string  the path
	 * @return  void
	 */
	public static function add_namespace($namespace, $path, $psr = false)
	{
		static::$namespaces[$namespace] = $path;
		if ($psr)
		{
			static::$psr_namespaces[$namespace] = $path;
		}
	}

	/**
	 * Adds an array of namespace paths. See {add_namespace}.
	 *
	 * @param   array  the namespaces
	 * @param   bool   whether to prepend the namespace to the search path
	 * @return  void
	 */
	public static function add_namespaces(array $namespaces, $prepend = false)
	{
		if ( ! $prepend)
		{
			static::$namespaces = array_merge(static::$namespaces, $namespaces);
		}
		else
		{
			static::$namespaces = $namespaces + static::$namespaces;
		}
	}

	/**
	 * Returns the namespace's path or false when it doesn't exist.
	 *
	 * @param   string      the namespace to get the path for
	 * @return  array|bool  the namespace path or false
	 */
	public static function namespace_path($namespace)
	{
		if ( ! array_key_exists($namespace, static::$namespaces))
		{
			return false;
		}

		return static::$namespaces[$namespace];
	}

	/**
	 * Adds a classes load path.  Any class added here will not be searched for
	 * but explicitly loaded from the path.
	 *
	 * @param   string  the class name
	 * @param   string  the path to the class file
	 * @return  void
	 */
	public static function add_class($class, $path)
	{
		static::$classes[$class] = $path;
	}

	/**
	 * Adds multiple class paths to the load path. See {@see Autoloader::add_class}.
	 *
	 * @param   array  the class names and paths
	 * @return  void
	 */
	public static function add_classes($classes)
	{
		foreach ($classes as $class => $path)
		{
			static::$classes[$class] = $path;
		}
	}

	/**
	 * Aliases the given class into the given Namespace.  By default it will
	 * add it to the global namespace.
	 *
	 * <code>
	 * Autoloader::alias_to_namespace('Foo\\Bar');
	 * Autoloader::alias_to_namespace('Foo\\Bar', '\\Baz');
	 * </code>
	 *
	 * @param  string  $class      the class name
	 * @param  string  $namespace  the namespace to alias to
	 */
	public static function alias_to_namespace($class, $namespace = '')
	{
		empty($namespace) or $namespace = rtrim($namespace, '\\').'\\';
		$parts = explode('\\', $class);
		$root_class = $namespace.array_pop($parts);
		class_alias($class, $root_class);
	}

	/**
	 * Register's the autoloader to the SPL autoload stack.
	 *
	 * @return	void
	 */
	public static function register()
	{
		spl_autoload_register('Autoloader::load', true, true);
	}

	/**
	 * Returns the class with namespace prefix when available
	 *
	 * @param	string
	 * @return	bool|string
	 */
	protected static function find_core_class($class)
	{
		foreach (static::$core_namespaces as $ns)
		{
			if (array_key_exists($ns_class = $ns.'\\'.$class, static::$classes))
			{
				return $ns_class;
			}
		}

		return false;
	}

	/**
	 * Add a namespace for which classes may be used without the namespace prefix and
	 * will be auto-aliased to the global namespace.
	 * Prefixing the classes will overwrite core classes and previously added namespaces.
	 *
	 * @param	string
	 * @param	bool
	 * @return	void
	 */
	public static function add_core_namespace($namespace, $prefix = true)
	{
		if ($prefix)
		{
			array_unshift(static::$core_namespaces, $namespace);
		}
		else
		{
			static::$core_namespaces[] = $namespace;
		}
	}

	/**
	 * Loads a class.
	 *
	 * @param   string  $class  Class to load
	 * @return  bool    If it loaded the class
	 */
	public static function load($class)
	{
		// deal with funny is_callable('static::classname') side-effect
		if (strpos($class, 'static::') === 0)
		{
			// is called from within the class, so it's already loaded
			return true;
		}

		$loaded = false;
		$class = ltrim($class, '\\');
		$namespaced = ($pos = strripos($class, '\\')) !== false;

		if (empty(static::$auto_initialize))
		{
			static::$auto_initialize = $class;
		}

		if (isset(static::$classes[$class]))
		{
			include str_replace('/', DS, static::$classes[$class]);
			static::init_class($class);
			$loaded = true;
		}
		elseif ($full_class = static::find_core_class($class))
		{
			if ( ! class_exists($full_class, false) and ! interface_exists($full_class, false))
			{
				include static::prep_path(static::$classes[$full_class]);
			}
			class_alias($full_class, $class);
			static::init_class($class);
			$loaded = true;
		}
		else
		{
			$full_ns = substr($class, 0, $pos);

			if ($full_ns)
			{
				foreach (static::$namespaces as $ns => $path)
				{
					$ns = ltrim($ns, '\\');
					if (stripos($full_ns, $ns) === 0)
					{
						$path .= static::class_to_path(
							substr($class, strlen($ns) + 1),
							array_key_exists($ns, static::$psr_namespaces)
						);
						if (is_file($path))
						{
							require $path;
							static::init_class($class);
							$loaded = true;
							break;
						}
					}
				}
			}

			if ( ! $loaded)
			{
				$path = APPPATH.'classes/'.static::class_to_path($class);

				if (is_file($path))
				{
					include $path;
					static::init_class($class);
					$loaded = true;
				}
			}
		}

		// Prevent failed load from keeping other classes from initializing
		if (static::$auto_initialize == $class)
		{
			static::$auto_initialize = null;
		}

		return $loaded;
	}

	/**
	 * Reset the auto initialize state after an autoloader exception.
	 * This method is called by the exception handler, and is considered an
	 * internal method!
	 *
	 * @access protected
	 */
	public static function _reset()
	{
		static::$auto_initialize = null;
	}

	/**
	 * Takes a class name and turns it into a path.  It follows the PSR-0
	 * standard, except for makes the entire path lower case, unless you
	 * tell it otherwise.
	 *
	 * Note: This does not check if the file exists...just gets the path
	 *
	 * @param   string  $class  Class name
	 * @param   bool    $psr    Whether this is a PSR-0 compliant class
	 * @return  string  Path for the class
	 */
	protected static function class_to_path($class, $psr = false)
	{
		$file  = '';
		if ($last_ns_pos = strripos($class, '\\'))
		{
			$namespace = substr($class, 0, $last_ns_pos);
			$class = substr($class, $last_ns_pos + 1);
			$file = str_replace('\\', DS, $namespace).DS;
		}
		$file .= str_replace('_', DS, $class).'.php';

		if ( ! $psr)
		{
			$file = strtolower($file);
		}

		return $file;
	}

	/**
	 * Prepares a given path by making sure the directory separators are correct.
	 *
	 * @param   string  $path  Path to prepare
	 * @return  string  Prepped path
	 */
	protected static function prep_path($path)
	{
		return str_replace(array('/', '\\'), DS, $path);
	}

	/**
	 * Checks to see if the given class has a static _init() method.  If so then
	 * it calls it.
	 *
	 * @param	string	the class name
	 */
	protected static function init_class($class)
	{
		if (static::$auto_initialize === $class)
		{
			static::$auto_initialize = null;
			if (method_exists($class, '_init') and is_callable($class.'::_init'))
			{
				call_user_func($class.'::_init');
			}
		}
	}
}


text:
<!DOCTYPE html>

		<meta charset="utf-8" />
		<base href="../../../" />

		<link type="text/css" rel="stylesheet" href="page.css" />

		[page:BufferGeometry] →

[name]

This is the [page:BufferGeometry] port of [page:CylinderGeometry].

Example

		var geometry = new THREE.CylinderBufferGeometry( 5, 5, 20, 32 );
		var material = new THREE.MeshBasicMaterial( {color: 0xffff00} );
		var cylinder = new THREE.Mesh( geometry, material );
		scene.add( cylinder );

Constructor

[name]([param:Float radiusTop], [param:Float radiusBottom], [param:Float height], [param:Integer radialSegments], [param:Integer heightSegments], [param:Boolean openEnded], [param:Float thetaStart], [param:Float thetaLength])

		radiusTop — Radius of the cylinder at the top. Default is 1.

		radiusBottom — Radius of the cylinder at the bottom. Default is 1.

		height — Height of the cylinder. Default is 1.

		radialSegments — Number of segmented faces around the circumference of the cylinder. Default is 8

		heightSegments — Number of rows of faces along the height of the cylinder. Default is 1.

		openEnded — A Boolean indicating whether the ends of the cylinder are open or capped. Default is false, meaning capped.

		thetaStart — Start angle for first segment, default = 0 (three o'clock position).

		thetaLength — The central angle, often called theta, of the circular sector. The default is 2*Pi, which makes for a complete cylinder.

Properties

[property:Object parameters]

		An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.

Source

		[link:https://github.com/mrdoob/three.js/blob/master/src/geometries/CylinderGeometry.js src/geometries/CylinderGeometry.js]


text:
import { CommonModule } from "@angular/common";
import {
    Component,
    ElementRef,
    HostBinding,
    Input,
    NgModule,
    OnInit,
    TemplateRef,
    ViewChild
} from "@angular/core";
import { IgxIconModule } from "../icon/icon.component";

export enum Size {
    SMALL = "small",
    MEDIUM = "medium",
    LARGE = "large"
}

@Component({
    selector: "igx-avatar",
    templateUrl: "avatar.component.html"
})
export class IgxAvatarComponent implements OnInit {
    @ViewChild("image")
    public image: ElementRef;

    @ViewChild("imageTemplate", { read: TemplateRef })
    protected imageTemplate: TemplateRef<any>;

    @ViewChild("initialsTemplate", { read: TemplateRef })
    protected initialsTemplate: TemplateRef<any>;

    @ViewChild("iconTemplate", { read: TemplateRef })
    protected iconTemplate: TemplateRef<any>;

    @HostBinding("attr.aria-label")
    public ariaLabel = "avatar";

    @HostBinding("attr.role")
    public role = "img";

    @HostBinding("attr.class")
    public get classes() {
        if (this.roundShape) {
            return `igx-avatar--rounded igx-avatar--${this._size}`;
        }
        return `igx-avatar igx-avatar--${this._size}`;
    }

    public roleDescription: string;
    private _size: string | Size = "small";

    @Input()
    public roundShape = false;

    @Input()
    public color: string;

    @Input()
    public bgColor: string;

    @Input()
    public initials: string;

    @Input()
    public icon: string;

    @Input()
    public src: string;

    @Input()
    public get size(): string | Size {
        return this._size;
    }

    public set size(value: string | Size) {
        switch (value) {
            case "small":
            case "medium":
            case "large":
                this._size = value;
                break;
            default:
                this._size = "small";
        }
    }

    get template() {
        if (this.src) {
            return this.imageTemplate;
        }

        if (this.initials) {
            return this.initialsTemplate;
        }

        return this.iconTemplate;
    }

    constructor(public elementRef: ElementRef) { }

    public ngOnInit() {
        this.roleDescription = this.getRole();
    }

    private getRole() {
        if (this.initials) {
            return "initials type avatar";
        } else if (this.src) {
            return "image type avatar";
        } else {
            return "icon type avatar";
        }
    }
}

@NgModule({
    declarations: [IgxAvatarComponent],
    exports: [IgxAvatarComponent],
    imports: [CommonModule, IgxIconModule]
})
export class IgxAvatarModule { }


text:
require 'reel'
require 'webmachine'

module Spanx
  module API
  end
end


text:
namespace {
// The name of a temporary directory to install an extension into for
// validation before finalizing install.
const char kTempExtensionName[] = "TEMP_INSTALL";

// The file to write our decoded images to, relative to the extension_path.
const char kDecodedImagesFilename[] = "DECODED_IMAGES";

// Errors
const char* kCouldNotCreateDirectoryError =
    "Could not create directory for unzipping.";
const char* kCouldNotDecodeImageError = "Could not decode theme image.";
const char* kCouldNotUnzipExtension = "Could not unzip extension.";
const char* kPathNamesMustBeAbsoluteOrLocalError =
    "Path names must not be absolute or contain '..'.";

}  // namespace

static SkBitmap DecodeImage(const FilePath& path) {
  // Read the file from disk.
  std::string file_contents;
  if (!file_util::PathExists(path) ||
      !file_util::ReadFileToString(path, &file_contents)) {
    return SkBitmap();
  }

  // Decode the image using WebKit's image decoder.
  const unsigned char* data =
      reinterpret_cast<const unsigned char*>(file_contents.data());
  webkit_glue::ImageDecoder decoder;
  return decoder.Decode(data, file_contents.length());
}

static bool PathContainsParentDirectory(const FilePath& path) {
  const FilePath::StringType kSeparators(FilePath::kSeparators);
  const FilePath::StringType kParentDirectory(FilePath::kParentDirectory);
  const size_t npos = FilePath::StringType::npos;
  const FilePath::StringType& value = path.value();

  for (size_t i = 0; i < value.length(); ) {
    i = value.find(kParentDirectory, i);
    if (i != npos) {
      if ((i == 0 || kSeparators.find(value[i-1]) == npos) &&
          (i+1 < value.length() || kSeparators.find(value[i+1]) == npos)) {
        return true;
      }
      ++i;
    }
  }

  return false;
}

DictionaryValue* ExtensionUnpacker::ReadManifest() {
  FilePath manifest_path =
      temp_install_dir_.AppendASCII(Extension::kManifestFilename);
  if (!file_util::PathExists(manifest_path)) {
    SetError(Extension::kInvalidManifestError);
    return NULL;
  }

  JSONFileValueSerializer serializer(manifest_path);
  std::string error;
  scoped_ptr<Value> root(serializer.Deserialize(&error));
  if (!root.get()) {
    SetError(error);
    return NULL;
  }

  if (!root->IsType(Value::TYPE_DICTIONARY)) {
    SetError(Extension::kInvalidManifestError);
    return NULL;
  }

  return static_cast<DictionaryValue*>(root.release());
}

bool ExtensionUnpacker::Run() {
  LOG(INFO) << "Installing extension " << extension_path_.value();

  // <profile>/Extensions/INSTALL_TEMP/<version>
  temp_install_dir_ =
      extension_path_.DirName().AppendASCII(kTempExtensionName);
  if (!file_util::CreateDirectory(temp_install_dir_)) {
    SetError(kCouldNotCreateDirectoryError);
    return false;
  }

  if (!Unzip(extension_path_, temp_install_dir_)) {
    SetError(kCouldNotUnzipExtension);
    return false;
  }

  // Parse the manifest.
  parsed_manifest_.reset(ReadManifest());
  if (!parsed_manifest_.get())
    return false;  // Error was already reported.

  // NOTE: Since the Unpacker doesn't have the extension's public_id, the
  // InitFromValue is allowed to generate a temporary id for the extension.
  // ANY CODE THAT FOLLOWS SHOULD NOT DEPEND ON THE CORRECT ID OF THIS
  // EXTENSION.
  Extension extension;
  std::string error;
  if (!extension.InitFromValue(*parsed_manifest_,
                               false,
                               &error)) {
    SetError(error);
    return false;
  }
  // Decode any images that the browser needs to display.
  std::set<FilePath> image_paths = extension.GetBrowserImages();
  for (std::set<FilePath>::iterator it = image_paths.begin();
       it != image_paths.end(); ++it) {
    if (!AddDecodedImage(*it))
      return false;  // Error was already reported.
  }

  return true;
}

bool ExtensionUnpacker::DumpImagesToFile() {
  IPC::Message pickle;  // We use a Message so we can use WriteParam.
  IPC::WriteParam(&pickle, decoded_images_);

  FilePath path = extension_path_.DirName().AppendASCII(kDecodedImagesFilename);
  if (!file_util::WriteFile(path, static_cast<const char*>(pickle.data()),
                            pickle.size())) {
    SetError("Could not write image data to disk.");
    return false;
  }

  return true;
}

// static
bool ExtensionUnpacker::ReadImagesFromFile(const FilePath& extension_path,
                                           DecodedImages* images) {
  FilePath path = extension_path.DirName().AppendASCII(kDecodedImagesFilename);
  std::string file_str;
  if (!file_util::ReadFileToString(path, &file_str))
    return false;

  IPC::Message pickle(file_str.data(), file_str.size());
  void* iter = NULL;
  return IPC::ReadParam(&pickle, &iter, images);
}

bool ExtensionUnpacker::AddDecodedImage(const FilePath& path) {
  // Make sure it's not referencing a file outside the extension's subdir.
  if (path.IsAbsolute() || PathContainsParentDirectory(path)) {
    SetError(kPathNamesMustBeAbsoluteOrLocalError);
    return false;
  }

  SkBitmap image_bitmap = DecodeImage(temp_install_dir_.Append(path));
  if (image_bitmap.isNull()) {
    SetError(kCouldNotDecodeImageError);
    return false;
  }

  decoded_images_.push_back(MakeTuple(image_bitmap, path));
  return true;
}

void ExtensionUnpacker::SetError(const std::string &error) {
  error_message_ = error;
}


text:
from ethel.runners.piuparts import piuparts, version
from ethel.config import load

def run(debs, package, job, firehose):
    if any((not x.endswith(".deb") for x in debs)):
        raise Exception("Non-deb given")

    config = load()
    all_arch = config['all-arch']
    arch = package['arch']
    if package['arch'] == 'all':
        arch = all_arch

    chroot_name = "{suite}-{arch}".format(
        suite=package['suite'],
        arch=arch
    )

    return piuparts(chroot_name, debs, firehose)

def get_version():
    return version()


text:
package lsn

type Lsnrtspalgprofile struct {
	Rtspalgprofilename    string `json:"rtspalgprofilename,omitempty"`
	Rtspidletimeout       int    `json:"rtspidletimeout,omitempty"`
	Rtspportrange         string `json:"rtspportrange,omitempty"`
	Rtsptransportprotocol string `json:"rtsptransportprotocol,omitempty"`
}


text:
'use strict'

const globs = require('../../globs')

module.exports = {

  overrides: [{
    files: globs.test,

    plugins: [
      'mocha',
    ],

    env: {
      mocha: true,
    },

    rules: {
      // Set Maximum Depth of Nested Callbacks
      // This rule is aimed at increasing code clarity by discouraging deeply nesting callbacks.
      // Allow some extra nesting for Mocha tests, due to Mocha's test coding patterns encouraging
      // some extra callback nesting.
      'max-nested-callbacks': ['warn', 6],

      // Enforces handling of callbacks for async tests
      // Mocha allows you to write asynchronous tests by adding a done callback to the parameters of
      // your test function. It is easy to forget calling this callback after the asynchronous
      // operation is done.
      'mocha/handle-done-callback': 'error',

      // Limit the number of top-level suites in a single file
      // This rule enforces having a limited amount of top-level suites in a file.
      'mocha/max-top-level-suites': ['warn', { limit: 1 }],

      // Disallow exclusive tests
      // This rule reminds you to remove .only from your tests by raising a warning whenever you are
      // using the exclusivity feature.
      'mocha/no-exclusive-tests': 'warn',

      // Disallow global tests
      // This rule checks each mocha test function to not be located directly in the global scope.
      'mocha/no-global-tests': 'warn',

      // Disallow identical titles
      // This rule looks at the title of every test and test suites. It will report when two test
      // suites or two test cases at the same level of a test suite have the same title.
      'mocha/no-identical-title': 'warn',

      // Disallow tests to be nested within other tests
      // This rule looks for all test cases (it, specify and test) or suites (describe, context and
      // suite) which are nested within another test case.
      'mocha/no-nested-tests': 'error',

      // Disallow returning in a test or hook function that uses a callback
      // Mocha's tests or hooks (like before) may be asynchronous by either returning a Promise or
      // specifying a callback parameter for the function. It can be confusing to have both methods
      // used in a test or hook, and from Mocha v3 on, causes the test to fail in order to force
      // developers to remove this source of confusion.
      'mocha/no-return-and-callback': 'error',

      // Disallow setup in describe blocks
      // Any setup directly in a describe is run before all tests execute. This rule reports all
      // function calls and use of the dot operator (due to getters and setters) directly in
      // describe blocks.
      'mocha/no-setup-in-describe': 'warn',
    },
  }],
}


text:
export function configRouter (router) {
  // dispatch routes
  router.map({
    '/index': {
      component: {
        template: '
You are now in Index Page! Use navigation to Go!
'
      }
    },
    '/test': {
      component: {
        template: '
hey JuJu! this is test page!
'
      }
    },
    '/markdown': {
      component: require('./components/Markdown.vue')
    },
    '/table': {
      component: require('./components/table/Table.vue')
    },
    '/tree': {
      component: require('./components/tree/Tree.vue')
    },
    '/svg': {
      component: require('./components/Svg.vue')
    },
    '/modal': {
      component: require('./components/modal/Modal.vue')
    },
    '/elastic': {
      component: require('./components/elastic/Elastic.vue')
    },
    '/select': {
      component: require('./components/Select.vue')
    },
    '/rotate': {
      component: require('./components/Rotate.vue')
    },
    '/todo': {
      component: require('./components/Todo.vue')
    }
  })
  // redirect
  router.redirect({
    '/': '/index',
    '/md': 'markdown'
  })
  // afterEach
  router.afterEach(function (transition) {
    let routeName = transition.to.path
    let title = document.getElementById('title')
    let titleName = ''
    switch (routeName) {
      case '/index':
        titleName = 'Hello Vue'
        break
      case '/markdown':
        titleName = 'A Simple Markdown Editor'
        break
      case '/table':
        titleName = 'Table Component'
        break
      case '/tree':
        titleName = 'Tree ViewModel'
        break
      case '/svg':
        titleName = 'SVG Demo'
        break
      case '/modal':
        titleName = 'Modal Component'
        break
      case '/elastic':
        titleName = 'Elastic Header Example'
        break
      case '/select':
        titleName = 'Directive Example'
        break
      case '/rotate':
        titleName = 'Video Display Stage Using CSS3 3D Transform'
        break
      case '/todo':
        titleName = 'Todo MVC'
        break
      default:
        titleName = 'Hello Vue!'
        break
    }
    try {
      title.innerText = titleName
    } catch (e) {
      // console.log(e)
    }
  })
}


text:
'use strict';

function SoundfontProcessingError (message) {
	this.message = message;
	this.stack = (new Error()).stack;
};

SoundfontProcessingError.prototype = Object.create(Error.prototype);

SoundfontProcessingError.prototype.name = 'SoundfontProcessingError';

SoundfontProcessingError.prototype.constructor = SoundfontProcessingError;

exports = module.exports = SoundfontProcessingError;


text:
<!DOCTYPE HTML>

  <title>
   Werner Family Recipes
  </title>
  <meta charset="utf-8"/>
  <meta content="width=device-width, initial-scale=1" name="viewport"/>

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

  <link href="../../../generator/templates/images/touch/chrome-touch-icon-192x192.png" rel="icon" sizes="192x192"/>
  <link href="../../../generator/templates/images/touch/apple-touch-icon.png" rel="apple-touch-icon"/>

         Menu

     Menu

    <button id="searchButton" onclick="enterKeyRedirect()" style="float:right">
     Search
    </button>

     <input class="searchField" id="searchTxt" maxlength="512" name="searchTxt" placeholder="Search Here..." style="width: 100%" type="text"/>

    <button id="scalingButton" onclick="rescaleRecipe()">
     1X
    </button>

       Home

       Appetizer

       Bread

       Breakfast

       Cocktail

       Dessert

       Entree

       Hotdish

       Instant Pot

       Meat

       Pasta

       Side Dish

       Soup

      Circus Animal Cookie Truffles

       Recipe from Heidi Jordan

        Ingredients

          12

          Ounces

          Frosted Circus Animal Cookies

          6

          Ounces

          Cream Cheese, Softened

          1

          Whole

          White Almond Bark

          1

          Dash

          Sprinkles

        Directions

         Place half of the animal cookies in a food processor and whirl around until finely ground. Pour cookie crumbs in a large bowl and repeat with remaining cookies.

         Add the frosting or cream cheese in the bowl with the cookie crumbs and mix well. Use your hands if desired because this will make mixture more consistent. Form cookie mixture into approximately 1 inch truffles and place them on a parchment paper lined baking sheet. Place the baking sheet in the refrigerator to harden back up a bit and make for easier rolling.

         When you are ready to decorate, prepare almond bark according to package directions.

         Dip half of truffles in the melted candy/chocolate and return them to the parchment paper lined baking sheet, pouring on sprinkles after each candy dip. Don't wait too long to add sprinkles or the candy will harden and the sprinkles will not stick. Repeat with other candy.

      Notes

      8 oz cream cheese frosting can be used instead of cream cheese

    <scaling_button_goes_here>
    </scaling_button_goes_here>

       All recipes subject to cooking skill

        Contact the Administrator


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Pl. asiat. rar. 2:81, t. 189. 1831

#### Original name
null

### Remarks
null


text:
* React and Node hot-reloading on the same port using Chokidar.
* Recompose higher-order functional components:
  * Higher-order components can be added to any component using `recompose`
  * Current working example to showcase this can be found in the TopNav component
* Uses `redux-promise-middleware` and `redux-thunk` middlewares for the redux store
* Uses `type-to-reducer` to make it easier to handle and read the dispatch status (PENDING, REJECTED, FULFILLED)

## Mandatory:
You will need to create a `.env` file in the root directory of this boilerplate. Inside should be two environment variables for `PORT` and `NODE_ENV`.
An example `.env` file can look like:
```
NODE_ENV="development"
PORT=3000
```

## Optional:
Install MongoDB: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/#install-with-homebrew

## Commands
1. Install `nodemon` globally using `npm install -g nodemon`
2. `npm install` to install dependencies
3. `npm run build` to remove existing build files and (re)compile the webpack bundle into the `build` directory
4. `npm run start` to run the development server
  * There is currently no need to run a webpack dev server on a separate port for this boilerplate. All development and front+back end changes can be done on the same server port.