text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.camunda.bpm.getstarted</groupId>
  <artifactId>loan-approval-spring-boot</artifactId>
  <version>0.0.1-SNAPSHOT</version>

  <properties>
    <camunda.spring-boot.version>3.3.1</camunda.spring-boot.version>
    <spring-boot.version>2.1.5.RELEASE</spring-boot.version>
    <maven.compiler.source>1.7</maven.compiler.source>
    <maven.compiler.target>1.7</maven.compiler.target>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>${spring-boot.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.camunda.bpm.springboot</groupId>
      <artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
      <version>${camunda.spring-boot.version}</version>
    </dependency>
    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
    </dependency>
    <dependency>
      <groupId>com.sun.xml.bind</groupId>
      <artifactId>jaxb-impl</artifactId>
      <version>2.2.3</version>
    </dependency>
  </dependencies>

   <build>
    <plugins>
      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <configuration>
          <layout>ZIP</layout>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>repackage</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>


text:
<?php

namespace Pastum\Component\PAMI\Message\Action;

/**
 * Show channels.
 */
class CoreShowChannelsAction extends ActionMessage
{
    /**
     * Constructor.
     */
    public function __construct()
    {
        parent::__construct('CoreShowChannels');
    }
}

redpajama_set_name: RedPajamaGithub


text:
package org.takes.rq;

import java.io.IOException;
import java.util.Arrays;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.Test;

/**
 * Test case for {@link RqHeaders}.
 * @author Yegor Bugayenko (yegor@teamed.io)
 * @version $Id$
 * @since 0.1
 */
public final class RqHeadersTest {

    /**
     * RqHeaders can parse headers.
     * @throws IOException If some problem inside
     */
    @Test
    public void parsesHttpHeaders() throws IOException {
        MatcherAssert.assertThat(
            new RqHeaders.Base(
                new RqFake(
                    Arrays.asList(
                        "GET /h?a=3",
                        "Host:  www.example.com",
                        "Content-type: text/plain"
                    ),
                    ""
                )
            ).header("Host"),
            Matchers.hasItem("www.example.com")
        );
    }

    /**
     * RqHeaders can find all headers.
     * @throws IOException If some problem inside
     */
    @Test
    public void findsAllHeaders() throws IOException {
        MatcherAssert.assertThat(
            new RqHeaders.Base(
                new RqFake(
                    Arrays.asList(
                        "GET /f?a=3&b-6",
                        "Host: www.example.com",
                        "Accept: text/xml",
                        "Accept: text/html"
                    ),
                    ""
                )
            ).header("Accept"),
            Matchers.<String>iterableWithSize(2)
        );
    }

    /**
     * RqHeaders.Smart can return a single header.
     * @throws IOException If some problem inside
     */
    @Test
    public void returnsSingleHeader() throws IOException {
        MatcherAssert.assertThat(
            new RqHeaders.Smart(
                new RqHeaders.Base(
                    new RqFake(
                        Arrays.asList(
                            "GET /g",
                            "Host: www.takes.com"
                        ),
                        ""
                    )
                )
            ).single("host", "www.takes.net"),
            Matchers.equalTo("www.takes.com")
        );
    }
    /**
     * RqHeaders.Smart can return a default header.
     * @throws IOException If some problem inside
     */
    @Test
    public void returnsDefaultHeader() throws IOException {
        final String type = "text/plain";
        MatcherAssert.assertThat(
            new RqHeaders.Smart(
                new RqHeaders.Base(
                    new RqFake(
                        Arrays.asList(
                            "GET /f",
                            "Accept: text/json"
                        ),
                        ""
                    )
                )
            ).single("Content-type", type),
            Matchers.equalTo(type)
        );
    }

}


text:
package main

import (
	"github.com/ant0ine/go-json-rest"
	"net/http"
	"strconv"
	"strings"
//	"fmt"
)

// Use for return status if some exception occurs.
type Controller struct {
	useCache bool
}

type ResourceStatus struct {
	Msg     string
	Code    int
	Request string
}

var controller Controller

// func (controller *Controller) Init () {
// 	if config.global.cacheEable {
// 		if engine.indexComplete {
// 			controller.useCache = true
// 		}
// 	} else {
// 		controller.useCache = false
// 	}
// }

func (controller *Controller) GetAppRelease(w *rest.ResponseWriter, req *rest.Request) {
	parameter := req.URL.Query()
	verMap := parameter["ver"]
	var verCode string

	if len(verMap) == 0 {
		verCode = "latest"
	} else {
		if stringIsDigit(verMap[0]) {
			verCode = verMap[0]
		} else {
			verCode = "latest"
		}
	}
	appRelease := model.QueryAppRelease(verCode)
	if appRelease.VerName != ""  {
		w.WriteJson(&appRelease)
		return
	} else {
		controller.NotFoundError(w, req)
		return
	}
}

// controller for route /book/:id
// Query a book_id and response one single book information in a json.
func (controller *Controller) GetBookFromBookId(w *rest.ResponseWriter, req *rest.Request) {
	bookId := req.PathParam("id")
	parameter := req.URL.Query()
	fieldsMap := parameter["fields"]

	if len(bookId) != 8 {
		controller.NotFoundError(w, req)
		return
	}

	fields := fieldsFilter(fieldsMap)
	//	checkErr(err)
	book, err := model.QueryBookFromBookId(bookId, fields)
	checkErr(err)

	if book.Id != " " {
		// expire := time.Now().AddDate(0, 0, 1)
		// cookie := http.Cookie{Name: "testcookiename", Value: "testcookievalue", Path: "/", Expires: expire, MaxAge: 86400}
		// http.SetCookie(w, &cookie)
		w.WriteJson(&book)
		return
	} else {
		controller.NotFoundError(w, req)
		return
	}
}

// controller for route /book/isbn/:isbn
// Query from book_isbn and response one single book information in a json.
func (controller *Controller) GetBookFromBookISBN(w *rest.ResponseWriter, req *rest.Request) {
	book_isbn := req.PathParam("isbn")
	parameter := req.URL.Query()
	fieldsMap := parameter["fields"]

	if !isValidIsbn13(book_isbn) {
		controller.NotFoundError(w, req)
		return
	}

	fields := fieldsFilter(fieldsMap)

	book, err := model.QueryBookFromBookIsbn(book_isbn, fields)
	checkErr(err)

	if book.Isbn != " " {
		w.WriteJson(&book)
		return
	} else {
		controller.NotFoundError(w, req)
		return
	}
}

// controller for route /book/search/
// Query from keyword and response a booklist with all book
// match keyword in a json.
func (controller *Controller) GetBookListFromKeyword(w *rest.ResponseWriter, req *rest.Request) {
	parameter := req.URL.Query()
//	log.Println(req.URL.RawQuery)
	keywordMap := parameter["q"]
	startMap := parameter["start"]
	countMap := parameter["count"]
	fieldsMap := parameter["fields"]

	w.Header().Set("Access-Control-Allow-Origin", "*")
	var (
		keywords, fields []string
		start, count    string
	)
	if len(keywordMap) == 0 {
		controller.NotFoundError(w, req)
		return
	} else if keywordMap[0] == " " {
		controller.NotFoundError(w, req)
		return
	} else if keywordMap[0] == "" {
		controller.NotFoundError(w, req)
		return
	} else {
		keywords = strings.Split(keywordMap[0], " ")
		keywords = replaceSpecialChar(keywords)
		keywords = replaceUnclearChar(keywords)
		if len(keywords) == 0 {
			controller.NotFoundError(w, req)
			return
		}
	}

	fields = fieldsFilter(fieldsMap)
//	fmt.Println(fields)
	if len(startMap) == 0 {
		start = "0"
	} else {
		start = startMap[0]
	}

	if len(countMap) == 0 {
		count = "20"
	} else {
		count = countMap[0]
		if countInt, _ := strconv.Atoi(count); countInt > 100 {
			count = "100"
		}
	}

	//  fmt.Println(keyword)
	//	fmt.Println(fields)
	//	fmt.Println(start)
	//	fmt.Println(count)
	if controller.useCache {
		cacheResult := engine.Query(keywords, start, count)
		if cacheResult.total == 0 {
			controller.NotFoundError(w, req)
			return
		} else if len(cacheResult.books) == 0 {
			booklist := model.QueryBookListIfEmptySet(cacheResult, fields, start, count)
			w.WriteJson(&booklist)
			return
		} else {
			booklist, err := model.QueryBookListFromCache(cacheResult, fields, start, count)
//			fmt.Println(booklist)
			checkErr(err)
			w.WriteJson(&booklist)
			return
		}
		// if keyword search result is null, return 404
	} else {
		booklist, err := model.QueryBookListFromKeyword(keywords, fields, start, count)
		checkErr(err)

		// if keyword search result is null, return 404
		if booklist.Total == 0 {
			controller.NotFoundError(w, req)
			return
		} else {
			w.WriteJson(&booklist)
			return
		}
	}
}

// return 404 json response
func (controller *Controller)NotFoundError(w *rest.ResponseWriter, req *rest.Request) {
	var statusMsg ResourceStatus = *ResourceNotFound(req)
	w.Header().Set("content-type", "application/json")
	w.WriteHeader(http.StatusNotFound)
	w.WriteJson(&statusMsg)
}

// Return a ResourceStatus struct if Resource not found.
func ResourceNotFound(req *rest.Request) *ResourceStatus {
	return &ResourceStatus{
		Msg:     "Resource not found",
		Code:    404,
		Request: req.Method + " " + req.URL.Path + req.URL.RawQuery,
	}
}

// Filter invalid field in the original fieldlist.
func fieldsFilter(fieldsMap []string) []string {
	var fields, secureFields []string
	if len(fieldsMap) == 0 {
		return defaultQueryFields
	} else {
		fields = strings.Split(fieldsMap[0], ",")
		for _, value := range fields {
			if value == "douban_rate" {
				value = "average"
			}
			for _, secureValue := range defaultQueryFields {
				if value == secureValue {
					secureFields = append(secureFields, value)
				}
			}
		}
	}
	return secureFields
}


text:
package pkg

import (
	"os"
	"path/filepath"
)

func RemoveFileExtension(file string) string {
	var extension = filepath.Ext(file)
	return file[0 : len(file)-len(extension)]
}

func FileExists(name string) bool {
	_, err := os.Stat(name)
	return !os.IsNotExist(err)
}


text:
class Bho;

// DeleteChromeHistory: Implements IDeleteBrowsingHistory and
// pumps cache clearing operations over automation. Blocks the UI
// thread while operating.  You have been warned.
class ATL_NO_VTABLE DeleteChromeHistory
    : public CComTearOffObjectBase<Bho, CComSingleThreadModel>,
      public CWindowImpl<DeleteChromeHistory>,
      public ChromeFramePlugin<DeleteChromeHistory>,
      public IDeleteBrowsingHistory {
 public:
  DeleteChromeHistory();
  ~DeleteChromeHistory();

  HRESULT FinalConstruct();

DECLARE_CLASSFACTORY_SINGLETON(DeleteChromeHistory)

BEGIN_COM_MAP(DeleteChromeHistory)
  COM_INTERFACE_ENTRY(IDeleteBrowsingHistory)
END_COM_MAP()

BEGIN_MSG_MAP(DeleteChromeHistory)
  CHAIN_MSG_MAP(ChromeFramePlugin<DeleteChromeHistory>)
END_MSG_MAP()

  // IDeleteBrowsingHistory methods
  STDMETHOD(DeleteBrowsingHistory)(DWORD flags);

 protected:
  // ChromeFrameDelegate overrides
  virtual void OnAutomationServerReady();
  virtual void OnAutomationServerLaunchFailed(
      AutomationLaunchResult reason, const std::string& server_version);

  virtual void GetProfilePath(const std::wstring& profile_name,
                              FilePath* profile_path);

 private:
  unsigned long remove_mask_;
  MessageLoopForUI loop_;
};

#endif  // CHROME_FRAME_DELETE_CHROME_HISTORY_H_


text:
<?php

namespace JsonApiClient;

use JsonApiClient\Resource;

class TestResource extends Resource
{
    public function __construct()
    {
        parent::__construct("http://api.site.com/v1/", "widgets");
    }
}


text:
using SFA.DAS.Commitments.Support.SubSite.Models;
using SFA.DAS.CommitmentsV2.Application.Queries.GetApprenticeship;
using SFA.DAS.CommitmentsV2.Application.Queries.GetApprenticeships;
using SFA.DAS.CommitmentsV2.Application.Queries.GetApprenticeshipUpdate;
using SFA.DAS.CommitmentsV2.Application.Queries.GetChangeOfProviderChain;
using SFA.DAS.CommitmentsV2.Application.Queries.GetOverlappingTrainingDateRequest;
using SFA.DAS.CommitmentsV2.Application.Queries.GetSupportApprenticeship;
using SFA.DAS.CommitmentsV2.Models;
using System.Collections.Generic;

namespace SFA.DAS.Commitments.Support.SubSite.Mappers
{
    public interface IApprenticeshipMapper
    {
        ApprenticeshipViewModel MapToApprenticeshipViewModel(GetSupportApprenticeshipQueryResult response, GetChangeOfProviderChainQueryResult providerChainQueryResult);

        ApprenticeshipUpdateViewModel MapToUpdateApprenticeshipViewModel(GetApprenticeshipUpdateQueryResult updateApprenticeship, SupportApprenticeshipDetails originalApprenticeship);

        UlnSummaryViewModel MapToUlnResultView(GetSupportApprenticeshipQueryResult response);

        ApprenticeshipSearchItemViewModel MapToApprenticeshipSearchItemViewModel(SupportApprenticeshipDetails apprenticeship);
        OverlappingTrainingDateRequestViewModel MapToOverlappingTrainingDateRequest(GetOverlappingTrainingDateRequestQueryResult.OverlappingTrainingDateRequest overlappingTrainingDateRequest);
    }
}


text:
@* addDevice Template File *@
@(addDeviceForm: Form[AddDeviceFormData])(implicit flash: play.api.mvc.Flash)

@import helper._
@import helper.twitterBootstrap._
@import play.api.i18n.Messages

@main("Add Device"){
	<fieldset>
		<legend>Add Device. Remove Device</legend>
		@flash.get("addSuccess").map{ _ =>

Device Added Successfully. Add Another.

		}
		@form(action = routes.Application.addDevicePost()){
			@inputText(
				addDeviceForm("simId"),
				'_label -> "SIM ID",
				'_showConstraints -> false
			)
			@inputText(
				addDeviceForm("phoneNumber"),
				'_label -> "PHONE NUMBER",
				'_showConstraints -> false
			)
			<button class="btn btn-primary">Add Device</button>
		}
	</fieldset>
	@addDeviceForm.globalErrors.map{ error =>

@Messages(error.message)

	}
}


text:
'use strict';

exports.__esModule = true;

var _getIterator2 = require('babel-runtime/core-js/get-iterator');

var _getIterator3 = _interopRequireDefault(_getIterator2);

var _isArray3 = require('lodash/isArray');

var _isArray4 = _interopRequireDefault(_isArray3);

var _indexOf2 = require('lodash/indexOf');

var _indexOf3 = _interopRequireDefault(_indexOf2);

var _isEmpty2 = require('lodash/isEmpty');

var _isEmpty3 = _interopRequireDefault(_isEmpty2);

var _tail2 = require('lodash/tail');

var _tail3 = _interopRequireDefault(_tail2);

var _first2 = require('lodash/first');

var _first3 = _interopRequireDefault(_first2);

var _map2 = require('lodash/map');

var _map3 = _interopRequireDefault(_map2);

var _reduce2 = require('lodash/reduce');

var _reduce3 = _interopRequireDefault(_reduce2);

var _groupBy2 = require('lodash/groupBy');

var _groupBy3 = _interopRequireDefault(_groupBy2);

var _helpers = require('./helpers');

var _helpers2 = require('../helpers');

var helpers = _interopRequireWildcard(_helpers2);

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/* eslint max-len:0 */

// Table Compiler
// -------
function TableCompiler(client, tableBuilder) {
  this.client = client;
  this.method = tableBuilder._method;
  this.schemaNameRaw = tableBuilder._schemaName;
  this.tableNameRaw = tableBuilder._tableName;
  this.single = tableBuilder._single;
  this.grouped = (0, _groupBy3.default)(tableBuilder._statements, 'grouping');
  this.formatter = client.formatter();
  this.sequence = [];
  this._formatting = client.config && client.config.formatting;
}

TableCompiler.prototype.pushQuery = _helpers.pushQuery;

TableCompiler.prototype.pushAdditional = _helpers.pushAdditional;

// Convert the tableCompiler toSQL
TableCompiler.prototype.toSQL = function () {
  this[this.method]();
  return this.sequence;
};

TableCompiler.prototype.lowerCase = true;

// Column Compilation
// -------

// If this is a table "creation", we need to first run through all
// of the columns to build them into a single string,
// and then run through anything else and push it to the query sequence.
TableCompiler.prototype.createAlterTableMethods = null;
TableCompiler.prototype.create = function (ifNot) {
  var columnBuilders = this.getColumns();
  var columns = columnBuilders.map(function (col) {
    return col.toSQL();
  });
  var columnTypes = this.getColumnTypes(columns);
  if (this.createAlterTableMethods) {
    this.alterTableForCreate(columnTypes);
  }
  this.createQuery(columnTypes, ifNot);
  this.columnQueries(columns);
  delete this.single.comment;
  this.alterTable();
};

// Only create the table if it doesn't exist.
TableCompiler.prototype.createIfNot = function () {
  this.create(true);
};

// If we're altering the table, we need to one-by-one
// go through and handle each of the queries associated
// with altering the table's schema.
TableCompiler.prototype.alter = function () {
  var addColBuilders = this.getColumns();
  var addColumns = addColBuilders.map(function (col) {
    return col.toSQL();
  });
  var alterColBuilders = this.getColumns('alter');
  var alterColumns = alterColBuilders.map(function (col) {
    return col.toSQL();
  });
  var addColumnTypes = this.getColumnTypes(addColumns);
  var alterColumnTypes = this.getColumnTypes(alterColumns);

  this.addColumns(addColumnTypes);
  this.alterColumns(alterColumnTypes, alterColBuilders);
  this.columnQueries(addColumns);
  this.columnQueries(alterColumns);
  this.alterTable();
};

TableCompiler.prototype.foreign = function (foreignData) {
  if (foreignData.inTable && foreignData.references) {
    var keyName = foreignData.keyName ? this.formatter.wrap(foreignData.keyName) : this._indexCommand('foreign', this.tableNameRaw, foreignData.column);
    var column = this.formatter.columnize(foreignData.column);
    var references = this.formatter.columnize(foreignData.references);
    var inTable = this.formatter.wrap(foreignData.inTable);
    var onUpdate = foreignData.onUpdate ? (this.lowerCase ? ' on update ' : ' ON UPDATE ') + foreignData.onUpdate : '';
    var onDelete = foreignData.onDelete ? (this.lowerCase ? ' on delete ' : ' ON DELETE ') + foreignData.onDelete : '';
    if (this.lowerCase) {
      this.pushQuery((!this.forCreate ? 'alter table ' + this.tableName() + ' add ' : '') + 'constraint ' + keyName + ' ' + 'foreign key (' + column + ') references ' + inTable + ' (' + references + ')' + onUpdate + onDelete);
    } else {
      this.pushQuery((!this.forCreate ? 'ALTER TABLE ' + this.tableName() + ' ADD ' : '') + 'CONSTRAINT ' + keyName + ' ' + 'FOREIGN KEY (' + column + ') REFERENCES ' + inTable + ' (' + references + ')' + onUpdate + onDelete);
    }
  }
};

// Get all of the column sql & bindings individually for building the table queries.
TableCompiler.prototype.getColumnTypes = function (columns) {
  return (0, _reduce3.default)((0, _map3.default)(columns, _first3.default), function (memo, column) {
    memo.sql.push(column.sql);
    memo.bindings.concat(column.bindings);
    return memo;
  }, { sql: [], bindings: [] });
};

// Adds all of the additional queries from the "column"
TableCompiler.prototype.columnQueries = function (columns) {
  var queries = (0, _reduce3.default)((0, _map3.default)(columns, _tail3.default), function (memo, column) {
    if (!(0, _isEmpty3.default)(column)) return memo.concat(column);
    return memo;
  }, []);
  for (var _iterator = queries, _isArray2 = Array.isArray(_iterator), _i = 0, _iterator = _isArray2 ? _iterator : (0, _getIterator3.default)(_iterator);;) {
    var _ref;

    if (_isArray2) {
      if (_i >= _iterator.length) break;
      _ref = _iterator[_i++];
    } else {
      _i = _iterator.next();
      if (_i.done) break;
      _ref = _i.value;
    }

    var q = _ref;

    this.pushQuery(q);
  }
};

// Add a new column.
TableCompiler.prototype.addColumnsPrefix = 'add column ';

// All of the columns to "add" for the query
TableCompiler.prototype.addColumns = function (columns, prefix) {
  prefix = prefix || this.addColumnsPrefix;

  if (columns.sql.length > 0) {
    var columnSql = (0, _map3.default)(columns.sql, function (column) {
      return prefix + column;
    });
    this.pushQuery({
      sql: (this.lowerCase ? 'alter table ' : 'ALTER TABLE ') + this.tableName() + ' ' + columnSql.join(', '),
      bindings: columns.bindings
    });
  }
};

// Alter column
TableCompiler.prototype.alterColumnsPrefix = 'alter column ';

TableCompiler.prototype.alterColumns = function (columns, colBuilders) {
  if (columns.sql.length > 0) {
    this.addColumns(columns, this.alterColumnsPrefix, colBuilders);
  }
};

// Compile the columns as needed for the current create or alter table
TableCompiler.prototype.getColumns = function (method) {
  var _this = this;

  var columns = this.grouped.columns || [];
  method = method || 'add';

  return columns.filter(function (column) {
    return column.builder._method === method;
  }).map(function (column) {
    return _this.client.columnCompiler(_this, column.builder);
  });
};

TableCompiler.prototype.tableName = function () {
  var name = this.schemaNameRaw ? this.schemaNameRaw + '.' + this.tableNameRaw : this.tableNameRaw;

  return this.formatter.wrap(name);
};

// Generate all of the alter column statements necessary for the query.
TableCompiler.prototype.alterTable = function () {
  var alterTable = this.grouped.alterTable || [];
  for (var i = 0, l = alterTable.length; i < l; i++) {
    var statement = alterTable[i];
    if (this[statement.method]) {
      this[statement.method].apply(this, statement.args);
    } else {
      helpers.error('Debug: ' + statement.method + ' does not exist');
    }
  }
  for (var item in this.single) {
    if (typeof this[item] === 'function') this[item](this.single[item]);
  }
};

TableCompiler.prototype.alterTableForCreate = function (columnTypes) {
  this.forCreate = true;
  var savedSequence = this.sequence;
  var alterTable = this.grouped.alterTable || [];
  this.grouped.alterTable = [];
  for (var i = 0, l = alterTable.length; i < l; i++) {
    var statement = alterTable[i];
    if ((0, _indexOf3.default)(this.createAlterTableMethods, statement.method) < 0) {
      this.grouped.alterTable.push(statement);
      continue;
    }
    if (this[statement.method]) {
      this.sequence = [];
      this[statement.method].apply(this, statement.args);
      columnTypes.sql.push(this.sequence[0].sql);
    } else {
      helpers.error('Debug: ' + statement.method + ' does not exist');
    }
  }
  this.sequence = savedSequence;
  this.forCreate = false;
};

// Drop the index on the current table.
TableCompiler.prototype.dropIndex = function (value) {
  this.pushQuery('drop index' + value);
};

// Drop the unique
TableCompiler.prototype.dropUnique = TableCompiler.prototype.dropForeign = function () {
  throw new Error('Method implemented in the dialect driver');
};

TableCompiler.prototype.dropColumnPrefix = 'drop column ';
TableCompiler.prototype.dropColumn = function () {
  var _this2 = this;

  var columns = helpers.normalizeArr.apply(null, arguments);
  var drops = (0, _map3.default)((0, _isArray4.default)(columns) ? columns : [columns], function (column) {
    return _this2.dropColumnPrefix + _this2.formatter.wrap(column);
  });
  this.pushQuery((this.lowerCase ? 'alter table ' : 'ALTER TABLE ') + this.tableName() + ' ' + drops.join(', '));
};

// If no name was specified for this index, we will create one using a basic
// convention of the table name, followed by the columns, followed by an
// index type, such as primary or index, which makes the index unique.
TableCompiler.prototype._indexCommand = function (type, tableName, columns) {
  if (!(0, _isArray4.default)(columns)) columns = columns ? [columns] : [];
  var table = tableName.replace(/\.|-/g, '_');
  var indexName = (table + '_' + columns.join('_') + '_' + type).toLowerCase();
  return this.formatter.wrap(indexName);
};

exports.default = TableCompiler;
module.exports = exports['default'];


text:
import { Component } from '@angular/core';
import { WernerwareTabs } from './navbar/tabs.component';

@Component({
  selector: 'my-app',
  templateUrl: './app.component.html',
  styleUrls: [ './app.component.css' ],
  providers: [
    WernerwareTabs
  ]
})
export class AppComponent  { name = 'Angular'; }


text:
The NYC Taxi dataset has a [data dictionary](http://www.nyc.gov/html/tlc/downloads/pdf/data_dictionary_trip_records_yellow.pdf), which we can use to properly label the columns `VendorID`, `RateCodeID`, `store_and_fwd_flag` and `payment_type`.

First check the column type for `payment_type`. Now based on the information in the data dictionary, run a transformation that creates a column called `card_vs_cash` (type `factor`) based `payment_type`. It will have two levels `card` and `cash` (lumping anything that isn't card or cash into an <NA> category).

We will be running the above transformation on `nyc_jan_xdf`, which is created here:

```R
input_csv <- 'yellow_tripsample_2016-01.csv'
input_xdf <- 'yellow_tripsample_2016-01.xdf'
rxImport(input_csv, input_xdf, overwrite = TRUE)

nyc_jan_xdf <- RxXdfData(input_xdf)
## your code goes here
```


text:
[![Build Status](https://travis-ci.org/macfanatic/SprintApp.png)](https://travis-ci.org/macfanatic/SprintApp)

Project management and time tracking should be easy. SprintApp is simple to use so you can focus on running your business and focus on what you do best.  [Redmine](http://www.redmine.org) is great for some teams, but we think it's difficult to use and doesn't look that great.  SprintApp aims to solve those issues and more!

## Features
See the list below for our great list of features, including clock in/out functionality, reporting and more!

### Calendar View
The calendar allows management to view tickets for any given month with powerful filter options at your fingertips. Management can also drag-n-drop tickets to reschedule with ease.

As an employee, you can quickly see what is assigned to you at any given time, so you can stay productive.

### Sprint View
The sprint view shows all work that should begin or be completed by the upcoming Sunday. In line with Agile methodology, a sprint is one Monday to the next, allowing your team to focus on what is at hand.

This view allows for sorting and quick filtering, so finding out what billable items Joey has or how many overdue tasks Mary has is quick and easy.

### Issue Tracking
There comes a point when you realize to-do lists, whiteboards, notebooks or Basecamp just isn't detailed enough to keep your business running. SprintApp provides simple yet sophisticated issue tracking tools to help focus your team.

Quickly create a ticket describing an action item, including subject, description, budgeted time and people interested in the progress of the ticket. Never miss an important detail or deadline again.

### Time Tracking
SprintApp revolves around tickets - tickets are grouped together as milestones, and milestones are scheduled for a project. As work is performed on your projects, tracking time is as simple as adding it to the ticket.  SprintApp offers easy to use "Start Timer" and "Stop Timer" buttons when viewing a ticket and a cool alert bar along the top of the SprintApp site so you can always see how much time you've spent on a task.

This data is used to display simple health-meters per ticket, milestone, and project, allowing the entire team to focus on productivity and profitability all while delivering a kick-ass product to your customers.

### Client and Contact Management
Finally a place for your team to share contact information in a centralized place. SprintApp offers the ability to create clients, with an associated list of contacts at that organization, so you can easily find that pesky phone number or email address.

In addition, each project belongs to a client, meaning you can quickly find all work performed for a particular client.

### Reporting
Collecting all this data is great, but it's not much use if you can't analyze it.  That's why we offer several reports, all aimed at getting you useful data quickly and letting you get back to work.

Reports include:

* Company Roadmap - lists out all active projects in your organization with a budget progress bar, color coded to easily see what projects are good, going or gone
* Employee Timesheet - view a listing of tickets a particular employee has clocked time to over a time period, complete with a handy bar graph per day
* Hours Worked Report - show daily total per employee during a time period
* Project Report - view the project activity per day during a time period
* Ticket Report - quickly view how much time your organization has spent on a ticket in a time period, with a handy bar graph and listing of employee time spent, per day

## Getting Started
SprintApp is easy to setup and get started.

### Jump Start on Heroku
To get started with SprintApp on Heroku quickly, see our [Deploying to Heroku Guide](https://github.com/macfanatic/SprintApp/wiki/Deploying-to-Heroku).

### Requirements
SprintApp is built upon the following great community gems:

* [Rails 3.2](https://github.com/rails/rails)
* [ActiveAdmin](https://github.com/gregbell/active_admin)
* [Carrierwave](https://github.com/jnicklas/carrierwave)
* [CanCan](https://github.com/ryanb/cancan)

### Installation
SprintApp is designed to run in the cloud or on dedicated hardware, whatever your organization is the most comfortable with. If you are looking for a hosting solution, we recommend [Heroku](http://www.heroku.com) for Rails hosting.

**SprintApp currently only works with Ruby 1.9.3, Ruby 2.0 is not supported at this time**

1. Clone the repo to your computer or server
2. Configure your database for use with the Rails app
3. Run bundler
4. Create and seed the database with default data and a user account
5. Kick up a server with [foreman](https://github.com/ddollar/foreman) running at [localhost:5000](http://localhost:5000)
6. Login!
	* username: admin@example.com
	* password: password

```
	$> git clone git://github.com/macfanatic/SprintApp.git sprint_app
	$> cd sprint_app
	$> cp config/database.yml.sample config/database.yml
	$> bundle install --without production
	$> bundle exec rake db:setup
	$> bundle exec foreman start
```

### Configuration
There are a few ways you can customize SprintApp for your needs.

1. [Configure Carrierwave for Amazon S3](https://github.com/jnicklas/carrierwave#using-amazon-s3)
2. Edit the from address for [Devise](https://github.com/plataformatec/devise) in the existing initializer
3. Edit the SMTP settings for outgoing mail (needed to email notifications of ticket updates) for the production environment.

## Contributing
This is a guide to contributing to SprintApp. It should walk you through the major steps of contributing to this project.

### 1. Create an Issue on Github
The first step is to create an issue with [GitHub Issues](https://github.com/macfanatic/SprintApp/issues), after searching the issues to make sure that another developer hasn't already submitted the same ticket.

Please be thorough in your description of the issue or feature request, and provide all relevant environment information if submitting a bug ticket.

### 2. Fork and Create a Feature Branch
If you have implemented a new feature of fixed a bug, please create a new git branch on your fork of the SprintApp project, labeled after the ticket you created in step 1.  This way when you submit a pull request to have your code integrated into the project, it is easily referenced.

### 3. Submit a Pull Request
After you are sure that your code change is ready for integration, please submit a pull request for your feature branch on github.  I will review the code and work with you to make any necessary changes before merging your pull request into the main branch.

## License
Copyright (c) 2012 [Matt Brewer](https://github.com/macfanatic). MIT License.


text:
<?php

namespace Imos\Tests\DomainRedirector;

use Imos\DomainRedirector;
use Symfony\Component\HttpFoundation\Request;

class DomainRedirectorTest extends \PHPUnit_Framework_TestCase {

    public function setUp() {
        $this->fixture = new DomainRedirector\DomainRedirector();
    }

    public function testAddingPrimaryWwwDomainCreatesAutomaticallySecondaryDomain()
    {
        // vorbereitung
        $this->fixture->addPrimaryDomain('www.imos.net', true);
        $secondaryDomains = $this->fixture->getSecondaryDomains();

        // asserts
        $this->assertArrayHasKey('imos.net', $secondaryDomains);
    }

    /**
     * @expectedException \Imos\DomainRedirector\Exception\MissingPrimaryDomainException
     */
    public function testAddingSecondaryDomainWhosePrimaryDomainDoesNotExistCausesException()
    {
        $this->fixture->addSecondaryDomain('imos.net', 'www.imos.net');
    }

    public function testSecondaryDomainRedirectsToPrimary()
    {
        // vorbereitung
        $this->fixture->addPrimaryDomain('www.imos.net', true);
        $this->fixture->addSecondaryDomain('imosnet.de', 'www.imos.net');
        $request = Request::create('/', 'GET', [], [], [], ['HTTP_HOST' => 'imosnet.de']);

        // asserts
        $redirect = $this->fixture->getRedirect($request);
        $this->assertEquals('https://www.imos.net', rtrim($redirect, '/'));
    }

    public function testSecondaryDomainWithoutWwwRedirectsToPrimary()
    {
        // vorbereitung
        $this->fixture->addPrimaryDomain('www.imos.net', true);
        $this->fixture->addSecondaryDomain('www.imosnet.de', 'www.imos.net');
        $request = Request::create('/', 'GET', [], [], [], ['HTTP_HOST' => 'imosnet.de']);

        // asserts
        $redirect = $this->fixture->getRedirect($request);
        $this->assertEquals('https://www.imos.net', rtrim($redirect, '/'));
    }

    public function testPrimaryDomainWithoutWwwRedirectsToWww()
    {
        // vorbereitung
        $this->fixture->addPrimaryDomain('www.imos.net', false);
        $request = Request::create('/', 'GET', [], [], [], ['HTTP_HOST' => 'imos.net']);

        // asserts
        $redirect = $this->fixture->getRedirect($request);
        $this->assertEquals('http://www.imos.net', rtrim($redirect, '/'));
    }

    public function testPrimaryDomainWithoutSslRedirectsToSsl()
    {
        // vorbereitung
        $this->fixture->addPrimaryDomain('www.imos.net', true);
        $request = Request::create('/', 'GET', [], [], [], ['HTTP_HOST' => 'www.imos.net']);

        // asserts
        $redirect = $this->fixture->getRedirect($request);
        $this->assertEquals('https://www.imos.net', rtrim($redirect, '/'));
    }

    public function testPrimaryDomainWithMatchingRequestDoesNotRedirect()
    {
        // vorbereitung (SSL)
        $this->fixture->addPrimaryDomain('www.imos.net', true);
        $request = Request::create('/', 'GET', [], [], [], ['HTTP_HOST' => 'www.imos.net', 'HTTPS' => 'on']);

        // asserts (SSL)
        $redirect = $this->fixture->getRedirect($request);
        $this->assertFalse($redirect);

        // vorbereitung (NONE-SSL)
        $this->fixture->addPrimaryDomain('www.imos.net', false);
        $request = Request::create('/', 'GET', [], [], [], ['HTTP_HOST' => 'www.imos.net']);

        // asserts (NONE-SSL)
        $redirect = $this->fixture->getRedirect($request);
        $this->assertFalse($redirect);
    }

    public function testRequestWithPathAndParametersRedirects()
    {
        // vorbereitung
        $this->fixture->addPrimaryDomain('www.imos.net', true);
        $this->fixture->addSecondaryDomain('imosnet.de', 'www.imos.net');
        $request = Request::create('/de/test.html?x=y', 'GET', [], [], [], ['HTTP_HOST' => 'imosnet.de']);

        // asserts
        $redirect = $this->fixture->getRedirect($request);
        $this->assertEquals('https://www.imos.net/de/test.html?x=y', rtrim($redirect, '/'));
    }

    public function testRequestForNonExistentDomainFallsBackOnDefaultDomain()
    {
        // vorbereitung
        $this->fixture->addPrimaryDomain('www.imos.net', true);
        $this->fixture->setFallbackDomain('www.imos.net');
        $request = Request::create('/de/test.html?x=y', 'GET', [], [], [], ['HTTP_HOST' => 'nonexistent.de']);

        // asserts
        $redirect = $this->fixture->getRedirect($request);
        $this->assertEquals('https://www.imos.net/de/test.html?x=y', rtrim($redirect, '/'));
    }

    public function testSecondarySubDomainWithWwwRedirectsToPrimary()
    {
        // vorbereitung
        $this->fixture->addPrimaryDomain('shop.imos.net', true);
        $this->fixture->addSecondaryDomain('www.shop.imos.net', 'shop.imos.net', false);

        // asserts
        $request = Request::create('/', 'GET', [], [], [], ['HTTP_HOST' => 'www.shop.imos.net']);
        $redirect = $this->fixture->getRedirect($request);
        $this->assertEquals('https://shop.imos.net', rtrim($redirect, '/'));

        // asserts
        $request = Request::create('/', 'GET', [], [], [], ['HTTP_HOST' => 'shop.imos.net', 'HTTPS' => 'on']);
        $redirect = $this->fixture->getRedirect($request);
        $this->assertFalse($redirect);
    }
}


text:
package com.thoughtworks.paranamer.generator;

import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.lang.reflect.Field;

public class QDoxParanamerTestCase {

    private String root;

    @Before
    public void setUp() throws Exception {
        ParanamerGenerator generator = new QdoxParanamerGenerator();
        root = new File(".").getAbsolutePath();
        // Kludge for running inside Intellij when it's universally setting
        // the current directory to the root of the checkout :-(
        if (!root.contains("/paranamer-generator")) {
            root = root.replace("/.", "/paranamer-generator");
        }
        generator.processSourcePath(root + "/src/test", root + "/target/test-classes/");
    }

    @Test
    public void testFoo() throws IOException, NoSuchFieldException, IllegalAccessException {

        FileInputStream fis = new FileInputStream(root + "/target/test-classes/com/thoughtworks/paranamer/generator/Elephant.class");
        byte[] bytes = new byte[4000];
        int read = fis.read(bytes);
        byte[] bytes2 = new byte[read];
        System.arraycopy(bytes,0,bytes2,0,read);

        MyClassLoader cl = new MyClassLoader();

        Class<?> enhancedClazz = cl.defineEnhancerClass(bytes2, read);
        Field f = enhancedClazz.getField("__PARANAMER_DATA");
        Assert.assertNotNull(f);
        String s1 = ((String) f.get(null));
        String s2 = ("<init> java.util.Map map \n" +
                        "longArray long longs \n" +
                        "setMap java.util.Map map \n");
        Assert.assertEquals(s2, s1);
    }

    private static class MyClassLoader extends ClassLoader {
        public Class<?> defineEnhancerClass(byte[] bytes, int length) {
            return defineClass("com.thoughtworks.paranamer.generator.Elephant", bytes, 0, bytes.length);
        }
    }
}


text:
The application is based on the Apache Cordova Hello World example.

### 1. Update the Source

    cp /incubator-cordova-app-hello-world/www www/

__Do not replace `www/config.xml`.__

__Do not replace `www/img/logo.png`.__

### 2. Update index.html

Replace `<h1>Apache Cordova</h1>` with `<h1>PhoneGap</h1>`.

### 3. Update config.xml

1. Update app version to latest PhoneGap version.

        <widget xmlns     = "http://www.w3.org/ns/widgets"
            xmlns:gap = "http://phonegap.com/ns/1.0"
            id        = "com.phonegap.hello-world"
            version   = "2.2.0">

2. Update PhoneGap version.

        <preference name="phonegap-version" value="x.x.x" />

### 4. Commit

    $ git commit -am "[app] Version x.x.x"

## 5. Tag

    $ git tag x.x.x


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="235dp"
        android:weightSum="1">

        <ImageButton
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:id="@+id/imageButton"
            android:layout_gravity="center_vertical"
            android:layout_marginLeft="15dp" />

        <ImageButton
            android:layout_width="110dp"
            android:layout_height="135dp"
            android:id="@+id/imageButton2"
            android:layout_gravity="center_vertical|right"
            android:layout_marginRight="15dp"
            android:layout_marginLeft="120dp" />
    </LinearLayout>

    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <ImageButton
            android:layout_width="110dp"
            android:layout_height="135dp"

            android:id="@+id/imageButton3"
            android:layout_gravity="center"
            android:layout_marginLeft="140dp" />
    </LinearLayout>
</LinearLayout><!-- From: file:/C:/Users/luiz/AndroidStudioProjects/TabsFragments2/app/src/main/res/layout/test.xml -->


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>uk.theretiredprogrammer.hockeytracker</groupId>
    <artifactId>parent</artifactId>
    <version>2.0.0-SNAPSHOT</version>
    <packaging>pom</packaging>

    <name>Hockey Tracker</name>

    <modules>
        <module>branding</module>
        <module>processing</module>
        <module>main</module>
        <module>updater</module>
        <module>aggregator</module>
    </modules>

    <url>https://www.theretiredprogrammer.uk/?Project=${projectId}</url>

    <scm>
        <connection>scm:git:git://github.com/The-Retired-Programmer/${projectId}.git</connection>
        <developerConnection>scm:git:ssh://github.com:The-Retired-Programmer/${projectId}.git</developerConnection>
        <url>http://github.com/The-Retired-Programmer/${projectId}/tree/master</url>
    </scm>

    <developers>
        <developer>
            <name>Richard Linsdale</name>
            <email>richard@theretiredprogrammer.uk</email>
            <organization>The-Retired-Programmer</organization>
            <organizationUrl>https://www.theretiredprogrammer.uk</organizationUrl>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <properties>
        <projectId>hockeytracker</projectId>
    </properties>
</project>


text:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE ldml SYSTEM "../../common/dtd/ldml.dtd">
<!-- Copyright © 1991-2017 Unicode, Inc.
For terms of use, see http://www.unicode.org/copyright.html
Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.
CLDR data files are interpreted according to the LDML specification (http://unicode.org/reports/tr35/)
-->
<ldml>
	<identity>
		<version number="$Revision: 13133 $"/>
		<language type="sr"/>
		<script type="Cyrl"/>
		<territory type="XK"/>
	</identity>
	<localeDisplayNames>
		<languages>
			<language type="bm" draft="contributed">бамананкан</language>
			<language type="bn" draft="contributed">бангла</language>
			<language type="ff" draft="contributed">фулах</language>
			<language type="gsw" draft="contributed">швајцарски немачки</language>
			<language type="ht" draft="contributed">хаићански креолски</language>
			<language type="lo" draft="contributed">лаошки</language>
			<language type="moh" draft="contributed">мохок</language>
			<language type="nqo" draft="contributed">н'ко</language>
			<language type="shi" draft="contributed">јужни шилха</language>
			<language type="si" draft="contributed">синхалски</language>
			<language type="tzm" draft="contributed">централноатласки тамашек</language>
			<language type="xh" draft="contributed">исикоса</language>
			<language type="zgh" draft="contributed">стандардни марокански тамашек</language>
			<language type="zu" draft="contributed">исизулу</language>
		</languages>
		<territories>
			<territory type="CG" draft="contributed">Конго</territory>
			<territory type="CI" draft="contributed">Обала Слоноваче (Кот д'Ивоар)</territory>
			<territory type="CV" draft="contributed">Кабо Верде</territory>
			<territory type="CZ" draft="contributed">Чешка Република</territory>
			<territory type="HK" draft="contributed">САР Хонгконг</territory>
			<territory type="KN" draft="contributed">Свети Китс и Невис</territory>
			<territory type="MK" alt="variant" draft="contributed">БЈР Македонија</territory>
			<territory type="MO" draft="contributed">САР Макао</territory>
			<territory type="PM" draft="contributed">Свети Пјер и Микелон</territory>
			<territory type="RE" draft="contributed">Реунион</territory>
			<territory type="TL" draft="contributed">Тимор-Лесте (Источни Тимор)</territory>
			<territory type="UM" draft="contributed">Мања удаљена острва САД</territory>
			<territory type="VC" draft="contributed">Свети Винсент и Гренадини</territory>
		</territories>
	</localeDisplayNames>
	<dates>
		<calendars>
			<calendar type="generic">
				<dateTimeFormats>
					<intervalFormats>
						<intervalFormatItem id="MMMEd">
							<greatestDifference id="d" draft="contributed">E, d – E, d. MMM</greatestDifference>
							<greatestDifference id="M" draft="contributed">E, d. MMM – E, d. MMM</greatestDifference>
						</intervalFormatItem>
					</intervalFormats>
				</dateTimeFormats>
			</calendar>
			<calendar type="gregorian">
				<months>
					<monthContext type="format">
						<monthWidth type="abbreviated">
							<month type="1" draft="contributed">јан.</month>
							<month type="2" draft="contributed">феб.</month>
							<month type="3" draft="contributed">март</month>
							<month type="4" draft="contributed">апр.</month>
							<month type="5" draft="contributed">мај</month>
							<month type="6" draft="contributed">јун</month>
							<month type="7" draft="contributed">јул</month>
							<month type="8" draft="contributed">авг.</month>
							<month type="9" draft="contributed">септ.</month>
							<month type="10" draft="contributed">окт.</month>
							<month type="11" draft="contributed">нов.</month>
							<month type="12" draft="contributed">дец.</month>
						</monthWidth>
					</monthContext>
					<monthContext type="stand-alone">
						<monthWidth type="abbreviated">
							<month type="1" draft="contributed">јан.</month>
							<month type="2" draft="contributed">феб.</month>
							<month type="3" draft="contributed">март</month>
							<month type="4" draft="contributed">апр.</month>
							<month type="5" draft="contributed">мај</month>
							<month type="6" draft="contributed">јун</month>
							<month type="7" draft="contributed">јул</month>
							<month type="8" draft="contributed">авг.</month>
							<month type="9" draft="contributed">септ.</month>
							<month type="10" draft="contributed">окт.</month>
							<month type="11" draft="contributed">нов.</month>
							<month type="12" draft="contributed">дец.</month>
						</monthWidth>
					</monthContext>
				</months>
				<days>
					<dayContext type="format">
						<dayWidth type="abbreviated">
							<day type="sun" draft="contributed">нед.</day>
							<day type="mon" draft="contributed">пон.</day>
							<day type="tue" draft="contributed">ут.</day>
							<day type="wed" draft="contributed">ср.</day>
							<day type="thu" draft="contributed">чет.</day>
							<day type="fri" draft="contributed">пет.</day>
							<day type="sat" draft="contributed">суб.</day>
						</dayWidth>
					</dayContext>
					<dayContext type="stand-alone">
						<dayWidth type="abbreviated">
							<day type="sun" draft="contributed">нед.</day>
							<day type="mon" draft="contributed">пон.</day>
							<day type="tue" draft="contributed">ут.</day>
							<day type="wed" draft="contributed">ср.</day>
							<day type="thu" draft="contributed">чет.</day>
							<day type="fri" draft="contributed">пет.</day>
							<day type="sat" draft="contributed">суб.</day>
						</dayWidth>
					</dayContext>
				</days>
				<dayPeriods>
					<dayPeriodContext type="format">
						<dayPeriodWidth type="abbreviated">
							<dayPeriod type="midnight" draft="contributed">поноћ</dayPeriod>
							<dayPeriod type="noon" draft="contributed">подне</dayPeriod>
							<dayPeriod type="morning1" draft="contributed">јутро</dayPeriod>
							<dayPeriod type="afternoon1" draft="contributed">по под.</dayPeriod>
							<dayPeriod type="evening1" draft="contributed">увече</dayPeriod>
							<dayPeriod type="night1" draft="contributed">ноћу</dayPeriod>
						</dayPeriodWidth>
						<dayPeriodWidth type="narrow">
							<dayPeriod type="midnight" draft="contributed">поноћ</dayPeriod>
							<dayPeriod type="noon" draft="contributed">подне</dayPeriod>
							<dayPeriod type="morning1" draft="contributed">јутро</dayPeriod>
							<dayPeriod type="afternoon1" draft="contributed">по под.</dayPeriod>
							<dayPeriod type="evening1" draft="contributed">вече</dayPeriod>
							<dayPeriod type="night1" draft="contributed">ноћ</dayPeriod>
						</dayPeriodWidth>
					</dayPeriodContext>
					<dayPeriodContext type="stand-alone">
						<dayPeriodWidth type="narrow">
							<dayPeriod type="am" draft="contributed">a</dayPeriod>
							<dayPeriod type="pm" draft="contributed">p</dayPeriod>
						</dayPeriodWidth>
					</dayPeriodContext>
				</dayPeriods>
			</calendar>
		</calendars>
	</dates>
</ldml>


text:
/*

old collision code. this code is deprecated and will eventually be removed
from ODE.

*/

#ifndef _ODE_GEOM_H_
#define _ODE_GEOM_H_

#include "common.h"
#include "space.h"
#include "contact.h"

#if defined SHARED_GEOM_H_INCLUDED_FROM_DEFINING_FILE
#define GLOBAL_SHAREDLIB_SPEC SHAREDLIBEXPORT
#else
#define GLOBAL_SHAREDLIB_SPEC SHAREDLIBIMPORT
#endif

#ifdef __cplusplus
extern "C" {
#endif

/* ************************************************************************ */
/* utility functions */

void dClosestLineSegmentPoints (const dVector3 a1, const dVector3 a2,
				const dVector3 b1, const dVector3 b2,
				dVector3 cp1, dVector3 cp2);

int dBoxTouchesBox (const dVector3 _p1, const dMatrix3 R1,
		    const dVector3 side1, const dVector3 _p2,
		    const dMatrix3 R2, const dVector3 side2);

void dInfiniteAABB (dGeomID geom, dReal aabb[6]);
void dCloseODE();

/* ************************************************************************ */
/* standard classes */

/* class numbers */
extern GLOBAL_SHAREDLIB_SPEC int dSphereClass;
extern GLOBAL_SHAREDLIB_SPEC int dBoxClass;
extern GLOBAL_SHAREDLIB_SPEC int dCCylinderClass;
extern GLOBAL_SHAREDLIB_SPEC int dPlaneClass;
extern GLOBAL_SHAREDLIB_SPEC int dGeomGroupClass;
extern GLOBAL_SHAREDLIB_SPEC int dGeomTransformClass;

/* constructors */
dGeomID dCreateSphere (dSpaceID space, dReal radius);
dGeomID dCreateBox (dSpaceID space, dReal lx, dReal ly, dReal lz);
dGeomID dCreatePlane (dSpaceID space, dReal a, dReal b, dReal c, dReal d);
dGeomID dCreateCCylinder (dSpaceID space, dReal radius, dReal length);
dGeomID dCreateGeomGroup (dSpaceID space);

/* set geometry parameters */
void dGeomSphereSetRadius (dGeomID sphere, dReal radius);
void dGeomBoxSetLengths (dGeomID box, dReal lx, dReal ly, dReal lz);
void dGeomPlaneSetParams (dGeomID plane, dReal a, dReal b, dReal c, dReal d);
void dGeomCCylinderSetParams (dGeomID ccylinder, dReal radius, dReal length);

/* get geometry parameters */
int   dGeomGetClass (dGeomID);
dReal dGeomSphereGetRadius (dGeomID sphere);
void  dGeomBoxGetLengths (dGeomID box, dVector3 result);
void  dGeomPlaneGetParams (dGeomID plane, dVector4 result);
void  dGeomCCylinderGetParams (dGeomID ccylinder,
			       dReal *radius, dReal *length);

/* general functions */
void dGeomSetData (dGeomID, void *);
void *dGeomGetData (dGeomID);
void dGeomSetBody (dGeomID, dBodyID);
dBodyID dGeomGetBody (dGeomID);
void dGeomSetPosition (dGeomID, dReal x, dReal y, dReal z);
void dGeomSetRotation (dGeomID, const dMatrix3 R);
const dReal * dGeomGetPosition (dGeomID);
const dReal * dGeomGetRotation (dGeomID);
void dGeomDestroy (dGeomID);
void dGeomGetAABB (dGeomID, dReal aabb[6]);
dReal *dGeomGetSpaceAABB (dGeomID);

/* ************************************************************************ */
/* geometry group functions */

void dGeomGroupAdd (dGeomID group, dGeomID x);
void dGeomGroupRemove (dGeomID group, dGeomID x);
int dGeomGroupGetNumGeoms (dGeomID group);
dGeomID dGeomGroupGetGeom (dGeomID group, int i);

/* ************************************************************************ */
/* transformed geometry functions */

dGeomID dCreateGeomTransform (dSpaceID space);
void dGeomTransformSetGeom (dGeomID g, dGeomID obj);
dGeomID dGeomTransformGetGeom (dGeomID g);
void dGeomTransformSetCleanup (dGeomID g, int mode);
int dGeomTransformGetCleanup (dGeomID g);
void dGeomTransformSetInfo (dGeomID g, int mode);
int dGeomTransformGetInfo (dGeomID g);

/* ************************************************************************ */
/* general collision */

int dCollide (dGeomID o1, dGeomID o2, int flags, dContactGeom *contact,
	      int skip);

/* ************************************************************************ */
/* custom classes */

typedef void dGetAABBFn (dGeomID, dReal aabb[6]);
typedef int dColliderFn (dGeomID o1, dGeomID o2,
			 int flags, dContactGeom *contact, int skip);
typedef dColliderFn * dGetColliderFnFn (int num);
typedef void dGeomDtorFn (dGeomID o);
typedef int dAABBTestFn (dGeomID o1, dGeomID o2, dReal aabb[6]);

typedef struct dGeomClass {
  int bytes;
  dGetColliderFnFn *collider;
  dGetAABBFn *aabb;
  dAABBTestFn *aabb_test;
  dGeomDtorFn *dtor;
} dGeomClass;

int dCreateGeomClass (const dGeomClass *classptr);
void * dGeomGetClassData (dGeomID);
dGeomID dCreateGeom (int classnum);

/* ************************************************************************ */

#ifdef __cplusplus
}
#endif

#endif


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>de.hartlit.opensaft</groupId>
		<artifactId>opensaft-bom</artifactId>
		<version>0.0.1-SNAPSHOT</version>
		<relativePath>../opensaft-bom</relativePath>
	</parent>

	<artifactId>opensaft-input</artifactId>

	<repositories>
		<repository>
			<id>developer.garmin.com</id>
			<name>Garmin Developer Repository</name>
			<url>http://developer.garmin.com/maven2</url>
		</repository>
	</repositories>

	<dependencies>
		<dependency>
			<groupId>de.hartlit.opensaft</groupId>
			<artifactId>opensaft-garmin</artifactId>
			<version>0.0.1-SNAPSHOT</version>
		</dependency>
		<dependency>
			<groupId>de.hartlit.opensaft</groupId>
			<artifactId>opensaft-garmin-tcx</artifactId>
			<version>0.0.1-SNAPSHOT</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

</project>


text:
import { factory } from '../../utils/factory';
import { createAlgorithm01 } from '../../type/matrix/utils/algorithm01';
import { createAlgorithm02 } from '../../type/matrix/utils/algorithm02';
import { createAlgorithm06 } from '../../type/matrix/utils/algorithm06';
import { createAlgorithm11 } from '../../type/matrix/utils/algorithm11';
import { createAlgorithm13 } from '../../type/matrix/utils/algorithm13';
import { createAlgorithm14 } from '../../type/matrix/utils/algorithm14';
import { nthRootNumber } from '../../plain/number';
var name = 'nthRoot';
var dependencies = ['typed', 'matrix', 'equalScalar', 'BigNumber'];
export var createNthRoot =
/* #__PURE__ */
factory(name, dependencies, function (_ref) {
  var typed = _ref.typed,
      matrix = _ref.matrix,
      equalScalar = _ref.equalScalar,
      _BigNumber = _ref.BigNumber;
  var algorithm01 = createAlgorithm01({
    typed: typed
  });
  var algorithm02 = createAlgorithm02({
    typed: typed,
    equalScalar: equalScalar
  });
  var algorithm06 = createAlgorithm06({
    typed: typed,
    equalScalar: equalScalar
  });
  var algorithm11 = createAlgorithm11({
    typed: typed,
    equalScalar: equalScalar
  });
  var algorithm13 = createAlgorithm13({
    typed: typed
  });
  var algorithm14 = createAlgorithm14({
    typed: typed
  });
  /**
   * Calculate the nth root of a value.
   * The principal nth root of a positive real number A, is the positive real
   * solution of the equation
   *
   *     x^root = A
   *
   * For matrices, the function is evaluated element wise.
   *
   * Syntax:
   *
   *     math.nthRoot(a)
   *     math.nthRoot(a, root)
   *
   * Examples:
   *
   *     math.nthRoot(9, 2)    // returns 3, as 3^2 == 9
   *     math.sqrt(9)          // returns 3, as 3^2 == 9
   *     math.nthRoot(64, 3)   // returns 4, as 4^3 == 64
   *
   * See also:
   *
   *     sqrt, pow
   *
   * @param {number | BigNumber | Array | Matrix | Complex} a
   *              Value for which to calculate the nth root
   * @param {number | BigNumber} [root=2]    The root.
   * @return {number | Complex | Array | Matrix} Returns the nth root of `a`
   */

  var complexErr = '' + 'Complex number not supported in function nthRoot. ' + 'Use nthRoots instead.';
  var nthRoot = typed(name, {
    number: function number(x) {
      return nthRootNumber(x, 2);
    },
    'number, number': nthRootNumber,
    BigNumber: function BigNumber(x) {
      return _bigNthRoot(x, new _BigNumber(2));
    },
    Complex: function Complex(x) {
      throw new Error(complexErr);
    },
    'Complex, number': function ComplexNumber(x, y) {
      throw new Error(complexErr);
    },
    'BigNumber, BigNumber': _bigNthRoot,
    'Array | Matrix': function ArrayMatrix(x) {
      return nthRoot(x, 2);
    },
    'SparseMatrix, SparseMatrix': function SparseMatrixSparseMatrix(x, y) {
      // density must be one (no zeros in matrix)
      if (y.density() === 1) {
        // sparse + sparse
        return algorithm06(x, y, nthRoot);
      } else {
        // throw exception
        throw new Error('Root must be non-zero');
      }
    },
    'SparseMatrix, DenseMatrix': function SparseMatrixDenseMatrix(x, y) {
      return algorithm02(y, x, nthRoot, true);
    },
    'DenseMatrix, SparseMatrix': function DenseMatrixSparseMatrix(x, y) {
      // density must be one (no zeros in matrix)
      if (y.density() === 1) {
        // dense + sparse
        return algorithm01(x, y, nthRoot, false);
      } else {
        // throw exception
        throw new Error('Root must be non-zero');
      }
    },
    'DenseMatrix, DenseMatrix': function DenseMatrixDenseMatrix(x, y) {
      return algorithm13(x, y, nthRoot);
    },
    'Array, Array': function ArrayArray(x, y) {
      // use matrix implementation
      return nthRoot(matrix(x), matrix(y)).valueOf();
    },
    'Array, Matrix': function ArrayMatrix(x, y) {
      // use matrix implementation
      return nthRoot(matrix(x), y);
    },
    'Matrix, Array': function MatrixArray(x, y) {
      // use matrix implementation
      return nthRoot(x, matrix(y));
    },
    'SparseMatrix, number | BigNumber': function SparseMatrixNumberBigNumber(x, y) {
      return algorithm11(x, y, nthRoot, false);
    },
    'DenseMatrix, number | BigNumber': function DenseMatrixNumberBigNumber(x, y) {
      return algorithm14(x, y, nthRoot, false);
    },
    'number | BigNumber, SparseMatrix': function numberBigNumberSparseMatrix(x, y) {
      // density must be one (no zeros in matrix)
      if (y.density() === 1) {
        // sparse - scalar
        return algorithm11(y, x, nthRoot, true);
      } else {
        // throw exception
        throw new Error('Root must be non-zero');
      }
    },
    'number | BigNumber, DenseMatrix': function numberBigNumberDenseMatrix(x, y) {
      return algorithm14(y, x, nthRoot, true);
    },
    'Array, number | BigNumber': function ArrayNumberBigNumber(x, y) {
      // use matrix implementation
      return nthRoot(matrix(x), y).valueOf();
    },
    'number | BigNumber, Array': function numberBigNumberArray(x, y) {
      // use matrix implementation
      return nthRoot(x, matrix(y)).valueOf();
    }
  });
  return nthRoot;
  /**
   * Calculate the nth root of a for BigNumbers, solve x^root == a
   * https://rosettacode.org/wiki/Nth_root#JavaScript
   * @param {BigNumber} a
   * @param {BigNumber} root
   * @private
   */

  function _bigNthRoot(a, root) {
    var precision = _BigNumber.precision;

    var Big = _BigNumber.clone({
      precision: precision + 2
    });

    var zero = new _BigNumber(0);
    var one = new Big(1);
    var inv = root.isNegative();

    if (inv) {
      root = root.neg();
    }

    if (root.isZero()) {
      throw new Error('Root must be non-zero');
    }

    if (a.isNegative() && !root.abs().mod(2).equals(1)) {
      throw new Error('Root must be odd when a is negative.');
    } // edge cases zero and infinity

    if (a.isZero()) {
      return inv ? new Big(Infinity) : 0;
    }

    if (!a.isFinite()) {
      return inv ? zero : a;
    }

    var x = a.abs().pow(one.div(root)); // If a < 0, we require that root is an odd integer,
    // so (-1) ^ (1/root) = -1

    x = a.isNeg() ? x.neg() : x;
    return new _BigNumber((inv ? one.div(x) : x).toPrecision(precision));
  }
});
export var createNthRootNumber =
/* #__PURE__ */
factory(name, ['typed'], function (_ref2) {
  var typed = _ref2.typed;
  return typed(name, {
    number: nthRootNumber,
    'number, number': nthRootNumber
  });
});


text:
namespace TwitchLeecher.Core.Enums
{
    public enum SearchType
    {
        Channel,
        Urls,
        Ids
    }
}


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

namespace Metaheuristics
{
	public class GABL2OptFirst42SP : IMetaheuristic, ITunableMetaheuristic
	{
		protected double timePenalty = 500;
		protected double popSize = 4;
		protected double mutProbability = 0.3;

		public void Start(string fileInput, string fileOutput, int timeLimit)
		{
			TwoSPInstance instance = new TwoSPInstance(fileInput);

			// Setting the parameters of the GA for this instance of the problem.
			int[] lowerBounds = new int[instance.NumberItems];
			int[] upperBounds = new int[instance.NumberItems];
			for (int i = 0; i < instance.NumberItems; i++) {
				lowerBounds[i] = 0;
				upperBounds[i] = instance.NumberItems - 1;
			}
			DiscreteGA genetic = new DiscreteGABL2OptFirst42SP(instance, (int)popSize, mutProbability, lowerBounds, upperBounds);

			// Solving the problem and writing the best solution found.
			genetic.Run(timeLimit - (int)timePenalty);
			int[,] coordinates = TwoSPUtils.BLCoordinates(instance, genetic.BestIndividual);
			TwoSPSolution solution = new TwoSPSolution(instance, coordinates);
			solution.Write(fileOutput);
		}

		public string Name {
			get {
				return "GA using the BL heuristic with 2-opt (first improvement) local search for 2SP";
			}
		}

		public MetaheuristicType Type {
			get {
				return MetaheuristicType.GA;
			}
		}

		public ProblemType Problem {
			get {
				return ProblemType.TwoSP;
			}
		}

		public string[] Team {
			get {
				return About.Team;
			}
		}

		public void UpdateParameters(double[] parameters)
		{
			timePenalty = parameters[0];
			popSize = parameters[1];
			mutProbability = parameters[2];
		}
	}
}


text:
This tool can commit and update specified file to CVS Repository.
Optional feature: run command after update

Examples:
- Run command after cvs update in groupname group
```
  ansible-playbook --extra-vars "file=named.conf servers=groupname destination=/etc/bind cvsdir=~/cvsworkdir command='ls -all'" site.yml
```
- Only update remote files in hist1, host2
```
  ansible-playbook --extra-vars "file=named.conf servers=host1;host2 destination=/etc/bind cvsdir=~/cvsworkdir" site.yml
```
Where:
  - file: filename on local (this will be copied to local CVS for commit and update on remote)
  - servers: server or group names
  - destination: directory on remote where we want to update the file
  - command: command with arguments

Test opportunities:
```
  --skip-tags "cvscommit,cvsupdate,cvslocalupdate"
```


text:
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".ManagementMenu" >

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:background="@color/White"
        android:orientation="vertical" >

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="164dp" >

            <TextView
                android:id="@+id/forgotPassword"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerHorizontal="true"
                android:layout_centerVertical="true"
                android:textColor="@color/GreenApp"
                android:text="ROOMS"
                android:textSize="30sp"
                 />

        </RelativeLayout>

        <ListView
            android:id="@+id/roomsListView"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:background="@color/GreenApp">
        </ListView>
    </LinearLayout>

    <ListView
        android:id="@+id/ListViewSlidingMenu"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="left"
        android:background="@color/GreenApp" />

</android.support.v4.widget.DrawerLayout>


text:
<?php

/**
 * @file
 * Contains \Drupal\page_manager\Entity\PageAccess.
 */

namespace Drupal\page_manager\Entity;

use Drupal\Core\Access\AccessResult;
use Drupal\Core\Condition\ConditionAccessResolverTrait;
use Drupal\Core\Entity\EntityAccessControlHandler;
use Drupal\Core\Entity\EntityHandlerInterface;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Plugin\Context\ContextHandlerInterface;
use Drupal\Core\Plugin\ContextAwarePluginInterface;
use Drupal\Core\Session\AccountInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;

/**
 * Defines the access control handler for the page entity type.
 */
class PageAccess extends EntityAccessControlHandler implements EntityHandlerInterface {

  use ConditionAccessResolverTrait;

  /**
   * The context handler.
   *
   * @var \Drupal\Core\Plugin\Context\ContextHandlerInterface
   */
  protected $contextHandler;

  /**
   * Constructs an access control handler instance.
   *
   * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
   *   The entity type definition.
   * @param \Drupal\Core\Plugin\Context\ContextHandlerInterface $context_handler
   *   The context handler.
   */
  public function __construct(EntityTypeInterface $entity_type, ContextHandlerInterface $context_handler) {
    parent::__construct($entity_type);
    $this->contextHandler = $context_handler;
  }

  /**
   * {@inheritdoc}
   */
  public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) {
    return new static(
      $entity_type,
      $container->get('context.handler')
    );
  }

  /**
   * Wraps the context handler.
   *
   * @return \Drupal\Core\Plugin\Context\ContextHandlerInterface
   */
  protected function contextHandler() {
    return $this->contextHandler;
  }

  /**
   * {@inheritdoc}
   */
  protected function checkAccess(EntityInterface $entity, $operation, AccountInterface $account) {
    /** @var \Drupal\page_manager\PageInterface $entity */
    if ($operation == 'view') {
      if (!$entity->status()) {
        return AccessResult::forbidden()->addCacheableDependency($entity);
      }

      $contexts = $entity->getContexts();
      $conditions = $entity->getAccessConditions();
      foreach ($conditions as $condition) {
        if ($condition instanceof ContextAwarePluginInterface) {
          $this->contextHandler()->applyContextMapping($condition, $contexts);
        }
      }
      return AccessResult::allowedIf($this->resolveConditions($conditions, $entity->getAccessLogic()));
    }
    return parent::checkAccess($entity, $operation, $account);
  }

}


text: .error { color:red; }


text:
namespace Microsoft.Azure.Management.Network.Models
{
    using Newtonsoft.Json;
    using System.Linq;

    /// <summary>
    /// Policies for vpn gateway.
    /// </summary>
    public partial class Policies
    {
        /// <summary>
        /// Initializes a new instance of the Policies class.
        /// </summary>
        public Policies()
        {
            CustomInit();
        }

        /// <summary>
        /// Initializes a new instance of the Policies class.
        /// </summary>
        /// <param name="allowBranchToBranchTraffic">True if branch to branch
        /// traffic is allowed.</param>
        /// <param name="allowVnetToVnetTraffic">True if Vnet to Vnet traffic
        /// is allowed.</param>
        public Policies(bool? allowBranchToBranchTraffic = default(bool?), bool? allowVnetToVnetTraffic = default(bool?))
        {
            AllowBranchToBranchTraffic = allowBranchToBranchTraffic;
            AllowVnetToVnetTraffic = allowVnetToVnetTraffic;
            CustomInit();
        }

        /// <summary>
        /// An initialization method that performs custom operations like setting defaults
        /// </summary>
        partial void CustomInit();

        /// <summary>
        /// Gets or sets true if branch to branch traffic is allowed.
        /// </summary>
        [JsonProperty(PropertyName = "allowBranchToBranchTraffic")]
        public bool? AllowBranchToBranchTraffic { get; set; }

        /// <summary>
        /// Gets or sets true if Vnet to Vnet traffic is allowed.
        /// </summary>
        [JsonProperty(PropertyName = "allowVnetToVnetTraffic")]
        public bool? AllowVnetToVnetTraffic { get; set; }

    }
}


text:
package org.apereo.cas.adaptors.yubikey;

import org.apereo.cas.authentication.AbstractMultifactorAuthenticationProvider;
import org.apereo.cas.configuration.model.support.mfa.yubikey.YubiKeyMultifactorAuthenticationProperties;
import org.apereo.cas.services.RegisteredService;
import org.apereo.cas.util.EncodingUtils;
import org.apereo.cas.util.LoggingUtils;
import org.apereo.cas.util.http.HttpClient;
import org.apereo.cas.util.http.HttpMessage;

import com.yubico.client.v2.YubicoClient;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import lombok.val;
import org.apache.commons.lang3.StringUtils;

import java.io.Serial;
import java.net.URL;
import java.util.Optional;

/**
 * The authentication provider for yubikey.
 *
 * @author Misagh Moayyed
 * @since 5.0.0
 */
@Slf4j
@AllArgsConstructor
@NoArgsConstructor
public class YubiKeyMultifactorAuthenticationProvider extends AbstractMultifactorAuthenticationProvider {

    @Serial
    private static final long serialVersionUID = 4789727148634156909L;

    private transient YubicoClient client;

    private transient HttpClient httpClient;

    @Override
    public String getFriendlyName() {
        return "YubiKey";
    }

    @Override
    public String getId() {
        return StringUtils.defaultIfBlank(super.getId(), YubiKeyMultifactorAuthenticationProperties.DEFAULT_IDENTIFIER);
    }

    @Override
    public boolean isAvailable(final RegisteredService service) {
        try {
            val endpoints = client.getWsapiUrls();
            for (val endpoint : endpoints) {
                LOGGER.debug("Pinging YubiKey API endpoint at [{}]", endpoint);
                val msg = this.httpClient.sendMessageToEndPoint(new URL(endpoint));
                val message = Optional.ofNullable(msg).map(HttpMessage::getMessage).orElse(null);
                if (StringUtils.isNotBlank(message)) {
                    val response = EncodingUtils.urlDecode(message);
                    LOGGER.debug("Received YubiKey ping response [{}]", response);
                    return true;
                }
            }
        } catch (final Exception e) {
            LoggingUtils.warn(LOGGER, e);
        }
        return false;
    }
}


text: ({"loadingState":"Betöltés...","errorState":"Sajnálom, hiba történt"})


text:
<!DOCTYPE html>

<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<title>Revelation 19 (ASV)</title>
<link href="../../../build/mobile.css" rel="stylesheet" />

American Standard VersionRevelation 19<
=
>

19

1 After these things I heard as it were a great voice of a great multitude in heaven, saying,

Hallelujah; Salvation, and glory, and power, belong to our God:
2 for true and righteous are his judgments; for he hath judged the great harlot, her that corrupted the earth with her fornication, and he hath avenged the blood of his servants at her hand.

3 And a second time they say, Hallelujah. And her smoke goeth up for ever and ever.
4 And the four and twenty elders and the four living creatures fell down and worshipped God that sitteth on the throne, saying, Amen; Hallelujah.
5 And a voice came forth from the throne, saying,

Give praise to our God, all ye his servants, ye that fear him, the small and the great.

6 And I heard as it were the voice of a great multitude, and as the voice of many waters, and as the voice of mighty thunders, saying,

Hallelujah: for the Lord our God, the Almighty, reigneth.
7 Let us rejoice and be exceeding glad, and let us give the glory unto him: for the marriage of the Lamb is come, and his wife hath made herself ready.
8 And it was given unto her that she should array herself in fine linen, bright and pure: for the fine linen is the righteous acts of the saints.

9 And he saith unto me, Write, Blessed are they that are bidden to the marriage supper of the Lamb. And he saith unto me, These are true words of God.
10 And I fell down before his feet to worship him. And he saith unto me, See thou do it not: I am a fellow-servant with thee and with thy brethren that hold the testimony of Jesus: worship God: for the testimony of Jesus is the spirit of prophecy.
11 And I saw the heaven opened; and behold, a white horse, and he that sat thereon called Faithful and True; and in righteousness he doth judge and make war.
12 And his eyes are a flame of fire, and upon his head are many diadems; and he hath a name written which no one knoweth but he himself.
13 And he is arrayed in a garment sprinkled with blood: and his name is called The Word of God.
14 And the armies which are in heaven followed him upon white horses, clothed in fine linen, white and pure.
15 And out of his mouth proceedeth a sharp sword, that with it he should smite the nations: and he shall rule them with a rod of iron: and he treadeth the winepress of the fierceness of the wrath of God, the Almighty.
16 And he hath on his garment and on his thigh a name written, KING OF KINGS, AND LORD OF LORDS.
17 And I saw an angel standing in the sun; and he cried with a loud voice, saying to all the birds that fly in mid heaven, Come and be gathered together unto the great supper of God;
18 that ye may eat the flesh of kings, and the flesh of captains, and the flesh of mighty men, and the flesh of horses and of them that sit thereon, and the flesh of all men, both free and bond, and small and great.
19 And I saw the beast, and the kings of the earth, and their armies, gathered together to make war against him that sat upon the horse, and against his army.
20 And the beast was taken, and with him the false prophet that wrought the signs in his sight, wherewith he deceived them that had received the mark of the beast and them that worshipped his image: they two were cast alive into the lake of fire that burneth with brimstone:
21 and the rest were killed with the sword of him that sat upon the horse, even the sword which came forth out of his mouth: and all the birds were filled with their flesh.

<
=
>


text:
import noisejs from 'noisejs';

function LandGenerator({actions, grid, log, random}) {
    actions.setHandler('GENERATE_LANDMASS', action=> {
        worldGenPerlin();
        action.resolve();
    });

    return Object.freeze({});

    function worldGenSolid() {
        grid.fillWith((p)=> true);
    }

    function worldGenPerlin() {
        const MIN_SIZE = grid.width * grid.height * 0.4;
        const SMOOTHNESS = 10;
        const WATER_LEVEL = 0.5;

        let noise, comps, largest, tries, seed;
        const generatorFunc = (p=>{
            return (noise.simplex2(p.x/SMOOTHNESS,p.y/SMOOTHNESS) + 1) * avoidEdges(p.x/grid.width,p.y/grid.height) >= WATER_LEVEL;
        });

        do {
            seed = random.integer(0,65535);
            noise = new noisejs.Noise(seed);
            grid.fillWith(generatorFunc);
            comps = grid.components();
            largest = comps.getLargestGroup();
            ++tries;
            if (tries > 50) throw Error('Failed to generate suitable world after 50 iterations');
        } while (!largest || largest.length < MIN_SIZE);

        comps.forEach((hexGroup)=>{
            if (hexGroup!=largest) {
                grid.destroyHexes(hexGroup);
            }
        });

        log.info("Map generated (map seed="+seed+")");

    }
}

// x and y shoudl be between 0 and 1
// returns 1 for center (0.5;0.5) and approaches zero when going further from center (return 0 in corners such as 0;0, 1;0)
function avoidEdges(x,y) {
    return 1 - ((0.5-x)*(0.5-x)+(0.5-y)*(0.5-y))*2;
}

export default LandGenerator;


text:
class GuildState {
  constructor (id) {
    this.id = id
    this.timeout = undefined

    this.searchResults = []
    this.responseCapture = {
      count: 0,
      handler: undefined
    }

    this.lastMsgTimestamp = 0

    this.resetTimeout()
  }

  resetTimeout () {
    if (this.timeout) clearTimeout(this.timeout)
    this.timeout = setTimeout(this.clearTempData, 300000)
  }

  clearTempData () {
    this.searchResults = []
    this.responseCapture = {
      count: 0,
      handler: undefined
    }
  }

  checkIfPrunable () {
    if (!this.searchResults && !this.responseCapture.handler) return true
    else return false
  }

  // Guild State Getters
  getGuildSearchResults () {
    this.resetTimeout()
    return this.searchResults
  }

  getGuildResponseCapturer () {
    this.resetTimeout()
    return this.responseCapture
  }

  getGuildVoiceData () {
    this.resetTimeout()
    return this.voiceData
  }

  // Guild State Setters
  setGuildSearchResults (state) {
    this.resetTimeout()
    this.searchResults = state
  }

  setGuildResponseCapturer (state) {
    this.resetTimeout()
    this.responseCapture = state
  }

  // State Modifiers
  resetResponseCapturer () {
    this.resetTimeout()
    this.responseCapture = {
      count: 0,
      handler: undefined
    }
  }
}

module.exports = GuildState


text:
layout: page
title: Jukebox Mod
excerpt: "The jukebox of Minecraft PC in Minecraft PE"
comments: true
---

Do you miss the Jukebox of Minecraft PC? This mod is a porting of it to Minecraft Pocket Edition!

* Table of Contents
{:toc}

## Features

• There are twelve different discs with twelve different songs (songs are ported from Minecraft PC).

• Tap the jukebox with a disc and it will start playing the chosen song.

• Greater the distance between you and the Jukebox, lower the volume of it.

• Support multiple jukeboxes that play simultaneously.

• There is a random chance of finding a disc every 30 kills of hostile mobs.

• Tap the Jukebox to eject the disc. When the song ends the disc will be ejected automatically.

• The Jukebox block and the discs are also in the creative inventory.

• The crafting recipes of the Jukebox are the same of the PC version.

---

## Installation instructions

• Download the zip that contains the necessary files.

• Extract it with an [Android file manager](http://lmgtfy.com/?q=file+manager+android) (I use ES File Explorer) or with your computer.

• IMPORTANT: Move the "minecraft-jukebox" folder in the "/sdcard/games/com.mojang/" folder.

• Import the script from local storage in Blocklauncher and enable it.

• Enjoy! ;)

• Optional: download the ["Desno365's Mods" app](https://play.google.com/store/apps/details?id=com.desno365.mods) from Google Play Store.

---

## Downloads

Minecraft Pocket Edition 0.10.4 & 0.9.5:

 --- Jukebox Mod r002:

| Website | Support | Regular |
|:--------|:-------:|:-------:|
| MediaFire:       | [Support download](http://adf.ly/rMLgk) | [Regular download](http://www.mediafire.com/download/qvtuhflw0wncfb7/Jukebox_Mod_r002_Desno365.zip) |
| MEGA:            | [Support download](http://adf.ly/rMKm6) | [Regular download](https://mega.co.nz/#!P4pWzCgA!HrjiZ2epU-rbRYGlBgH4wG5YBZfe3tTHroA4gdUJCwg) |
|----
{: rules="groups"}

• Remember to read the "Installation instructions" section before downloading.

ADVERTISEMENT:

---

## Screenshots

![Now Playing screenshot]({{ site.url }}/minecraft/jukebox-mod/images/now-playing-screen.jpg)

![Eject Disc screenshot]({{ site.url }}/minecraft/jukebox-mod/images/eject-screen.jpg)

This help UI will be displayed when you tap the Jukebox with an item that isn't a disc

---

## How to craft and items IDs

Click an icon under the "**Crafting**" column to display the crafting recipe of that item.

| Item                         | ID       | Crafting |
|:-----------------------------|:--------:|:--------:|
| Jukebox:                     | 84      |

 |
| Discs:                       | 415≈426 | Crafting not available* |
|----
{: rules="groups"}

*This item/block doesn't have a crafting recipe but you can get it in Creative Mode, or there is a random chance of finding a disc every 30 kills of hostile mobs in Survival Mode.

---

## Changelog

**Jukebox Mod r002**
{% highlight text %}
- NEW: now it's possible to craft the jukebox.
- UPDATED: increased the distance when the volume of the music is 0 (before the volume became 0 at 30 blocks, now you need a distance of 65 blocks for a volume of 0). This is now the same as the PC.
{% endhighlight %}

**Jukebox Mod r001**
{% highlight text %}
- Initial release
{% endhighlight %}

---

## Known bugs and issues

• No known bugs (for now).

• If you find a bug report it in the [minecraft-forum.net thread][thread].

---

## F.A.Q.

*• Can I share this mod on whatever-website.com / with my friends / on the xyz social network ?*

*• Can I add this mod in my modpack?*

Yes you can, and you don't have to ask my permission, but you have to follow the [license of this mod]({{ site.url }}/minecraft/jukebox-mod/#copyrights), this means that you have to give me credits and you can't use my work for commercial purposes (in a few words you can't make money from my work, for example you can't sell my mod).

*• Can I make a YouTube review for this mod?*

Of course you can. Only one thing: if you want to add a link for the download, please, don't put a download link on MediaFire or whatever, but just put a link of [my web page]({{ site.url }}/minecraft/jukebox-mod) or a link of the [minecraftforum.net thread][thread].

*• If I find a bug, where I should report it?*

The best way to report a bug is write it on the [minecraft-forum.net][thread] thread. But, before posting your bug-report, read the ["Known bugs and issues"]({{ site.url }}/minecraft/jukebox-mod/#known-bugs-and-issues) section.

*• How can I support you?*

You can [follow me on Twitter](https://twitter.com/desno365), subscribe on [my Youtube channel](http://www.youtube.com/channel/UCJQL47nQnsijcaN_7pMsjCQ/videos) or [make a donation](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GBEMKJBA3Z7PG). :)

---

## Copyrights

This work is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License.
To view a copy of this license, visit [http://creativecommo...nses/by-nc/4.0/](http://creativecommons.org/licenses/by-nc/4.0/) or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.

All the following trademarks are the properties of their respective owners as listed below.

Minecraft ®/TM & © 2009-2013 Mojang / Notch

---

[thread]:    http://www.minecraftforum.net/forums/minecraft-pocket-edition/mcpe-mods-tools/2173829-mod-jukebox-mod-pc-porting-r002-by-desno365


text:
from __future__ import unicode_literals

from datetime import datetime

from django.db import models

from users.models import UserProfile
from courses.models import Course

# Create your models here.

class UserAsk(models.Model):
    name = models.CharField(max_length=20, verbose_name=u"姓名")
    mobile = models.CharField(max_length=11, verbose_name=u"手机")
    course_name = models.CharField(max_length=50, verbose_name=u"课程名")
    add_time = models.DateTimeField(default=datetime.now, verbose_name=u"添加时间")

    class Meta:
        verbose_name = u"用户咨询"
        verbose_name_plural = verbose_name

class CourseComments(models.Model):
    """课程评论"""
    user = models.ForeignKey(UserProfile, verbose_name=u"用户名")
    course = models.ForeignKey(Course, verbose_name=u"课程")
    comments = models.CharField(max_length=200, verbose_name=u"评论")
    add_time = models.DateTimeField(default=datetime.now, verbose_name=u"添加时间")

    class Meta:
        verbose_name = u"课程评论"
        verbose_name_plural = verbose_name

class UserFavorite(models.Model):
    user = models.ForeignKey(UserProfile, verbose_name=u"用户名")
    fav_id = models.IntegerField(default=0, verbose_name=u"数据id")
    fav_type = models.IntegerField(choices=((1, u"课程"), (2, u"课程机构"), (3, u"讲师")), default=1, verbose_name=u"收藏类型")
    add_time = models.DateTimeField(default=datetime.now, verbose_name=u"添加时间")

    class Meta:
        verbose_name = u"用户收藏"
        verbose_name_plural = verbose_name

class UserMessage(models.Model):
    user = models.IntegerField(default=0, verbose_name=u"接收用户")
    message = models.CharField(max_length=500, verbose_name=u"消息内容")
    has_read = models.BooleanField(default=False, verbose_name=u"是否已读")
    add_time = models.DateTimeField(default=datetime.now, verbose_name=u"添加时间")

    class Meta:
        verbose_name = u"用户消息"
        verbose_name_plural = verbose_name

class UserCourse(models.Model):
    user = models.ForeignKey(UserProfile, verbose_name=u"接收用户")
    course = models.ForeignKey(Course, verbose_name=u"课程")
    add_time = models.DateTimeField(default=datetime.now, verbose_name=u"添加时间")

    class Meta:
        verbose_name = u"用户课程"
        verbose_name_plural = verbose_name


text:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;

namespace ProjectSpacer
{
    public class GridEffect : MonoBehaviour
    {
        public List<string> SubEffect;
        public List<State> EffectConditions;

    }
}