text:
// Copyright 2020 The Oppia Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
 * @fileoverview Backend api service for stats reporting.
 */

import { downgradeInjectable } from '@angular/upgrade/static';
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';

import { ContextService } from 'services/context.service';
import { ExplorationPlayerConstants } from
  'pages/exploration-player-page/exploration-player-page.constants';
import { UrlInterpolationService } from
  'domain/utilities/url-interpolation.service';

interface SessionStateStats {
  'total_answers_count': number;
  'useful_feedback_count': number;
  'total_hit_count': number;
  'first_hit_count': number;
  'num_times_solution_viewed': number;
  'num_completions': number;
}

export interface AggregatedStats {
  'num_starts': number;
  'num_completions': number;
  'num_actual_starts': number;
  'state_stats_mapping': {
    [stateName: string]: SessionStateStats
  };
}

@Injectable({
  providedIn: 'root'
})
export class StatsReportingBackendApiService {
  constructor(
    private contextService: ContextService,
    private http: HttpClient,
    private urlInterpolationService: UrlInterpolationService) {}

  private getFullStatsUrl(
      urlIdentifier: string, explorationId: string,
      currentStateName: string, nextExpId: string,
      previousStateName: string, nextStateName: string): string {
    try {
      return this.urlInterpolationService.interpolateUrl(
        ExplorationPlayerConstants.STATS_REPORTING_URLS[urlIdentifier], {
          exploration_id: explorationId
        });
    } catch (e) {
      let additionalInfo = (
        '\nUndefined exploration id error debug logs:' +
        '\nThe event being recorded: ' + urlIdentifier +
        '\nExploration ID: ' + this.contextService.getExplorationId()
      );
      if (currentStateName) {
        additionalInfo += (
          '\nCurrent State name: ' + currentStateName);
      }
      if (nextExpId) {
        additionalInfo += (
          '\nRefresher exp id: ' + nextExpId);
      }
      if (
        previousStateName &&
        nextStateName) {
        additionalInfo += (
          '\nOld State name: ' + previousStateName +
          '\nNew State name: ' + nextStateName);
      }
      e.message += additionalInfo;
      throw e;
    }
  }

  postsStats(
      aggregatedStats: AggregatedStats, expVersion: number,
      explorationId: string, currentStateName: string, nextExpId: string,
      previousStateName: string, nextStateName: string): Promise<Object> {
    return this.http.post(this.getFullStatsUrl(
      'STATS_EVENTS', explorationId, currentStateName, nextExpId,
      previousStateName, nextStateName), {
      aggregated_stats: aggregatedStats,
      exp_version: expVersion
    }).toPromise();
  }

  recordExpStarted(
      params: Object, sessionId: string, stateName: string, expVersion: number,
      explorationId: string, currentStateName: string, nextExpId: string,
      previousStateName: string, nextStateName: string): Promise<Object> {
    return this.http.post(this.getFullStatsUrl(
      'EXPLORATION_STARTED', explorationId, currentStateName, nextExpId,
      previousStateName, nextStateName), {
      params: params,
      session_id: sessionId,
      state_name: stateName,
      version: expVersion
    }).toPromise();
  }

  recordStateHit(
      clientTimeSpentInSecs: number, expVersion: number, newStateName: string,
      oldParams: Object, sessionId: string,
      explorationId: string, currentStateName: string, nextExpId: string,
      previousStateName: string, nextStateName: string): Promise<Object> {
    return this.http.post(this.getFullStatsUrl(
      'STATE_HIT', explorationId, currentStateName, nextExpId,
      previousStateName, nextStateName), {
      client_time_spent_in_secs: clientTimeSpentInSecs,
      exploration_version: expVersion,
      new_state_name: newStateName,
      old_params: oldParams,
      session_id: sessionId,
    }).toPromise();
  }

  recordExplorationActuallyStarted(
      expVersion: number, stateName: string,
      sessionId: string, explorationId: string, currentStateName: string,
      nextExpId: string, previousStateName: string,
      nextStateName: string): Promise<Object> {
    return this.http.post(this.getFullStatsUrl(
      'EXPLORATION_ACTUALLY_STARTED', explorationId, currentStateName,
      nextExpId, previousStateName, nextStateName), {
      exploration_version: expVersion,
      state_name: stateName,
      session_id: sessionId
    }).toPromise();
  }

  recordSolutionHit(
      timeSpentInStateSecs: number, expVersion: number, stateName: string,
      sessionId: string, explorationId: string, currentStateName: string,
      nextExpId: string, previousStateName: string,
      nextStateName: string): Promise<Object> {
    return this.http.post(this.getFullStatsUrl(
      'SOLUTION_HIT', explorationId, currentStateName, nextExpId,
      previousStateName, nextStateName), {
      exploration_version: expVersion,
      state_name: stateName,
      session_id: sessionId,
      time_spent_in_state_secs: timeSpentInStateSecs
    }).toPromise();
  }

  recordLeaveForRefresherExp(
      expVersion: number, refresherExpId: string, stateName: string,
      sessionId: string, timeSpentInStateSecs: number,
      explorationId: string, currentStateName: string,
      nextExpId: string, previousStateName: string,
      nextStateName: string): Promise<Object> {
    return this.http.post(this.getFullStatsUrl(
      'LEAVE_FOR_REFRESHER_EXP', explorationId, currentStateName, nextExpId,
      previousStateName, nextStateName), {
      exploration_version: expVersion,
      refresher_exp_id: refresherExpId,
      state_name: stateName,
      session_id: sessionId,
      time_spent_in_state_secs: timeSpentInStateSecs
    }).toPromise();
  }

  recordStateCompleted(
      expVersion: number, sessionId: string, stateName: string,
      timeSpentInStateSecs: number, explorationId: string,
      currentStateName: string, nextExpId: string, previousStateName: string,
      nextStateName: string): Promise<Object> {
    return this.http.post(this.getFullStatsUrl(
      'STATE_COMPLETED', explorationId, currentStateName, nextExpId,
      previousStateName, nextStateName), {
      exp_version: expVersion,
      state_name: stateName,
      session_id: sessionId,
      time_spent_in_state_secs: timeSpentInStateSecs
    }).toPromise();
  }

  recordExplorationCompleted(
      clientTimeSpentInSecs: number, collectionId: string, params: Object,
      sessionId: string, stateName: string, version: number,
      explorationId: string, currentStateName: string, nextExpId: string,
      previousStateName: string, nextStateName: string): Promise<Object> {
    return this.http.post(this.getFullStatsUrl(
      'EXPLORATION_COMPLETED', explorationId, currentStateName, nextExpId,
      previousStateName, nextStateName), {
      client_time_spent_in_secs: clientTimeSpentInSecs,
      collection_id: collectionId,
      params: params,
      session_id: sessionId,
      state_name: stateName,
      version: version
    }).toPromise();
  }

  recordAnswerSubmitted(
      answer: string, params: Object, version: number, sessionId: string,
      clientTimeSpentInSecs: number, oldStateName: string,
      answerGroupIndex: number, ruleSpecIndex: number,
      classificationCategorization: string,
      explorationId: string, currentStateName: string, nextExpId: string,
      previousStateName: string, nextStateName: string): Promise<Object> {
    return this.http.post(this.getFullStatsUrl(
      'ANSWER_SUBMITTED', explorationId, currentStateName, nextExpId,
      previousStateName, nextStateName), {
      answer: answer,
      params: params,
      version: version,
      session_id: sessionId,
      client_time_spent_in_secs: clientTimeSpentInSecs,
      old_state_name: oldStateName,
      answer_group_index: answerGroupIndex,
      rule_spec_index: ruleSpecIndex,
      classification_categorization: classificationCategorization
    }).toPromise();
  }

  recordMaybeLeaveEvent(
      clientTimeSpentInSecs: number, collectionId: string, params: Object,
      sessionId: string, stateName: string, version: number,
      explorationId: string, currentStateName: string, nextExpId: string,
      previousStateName: string, nextStateName: string): Promise<Object> {
    return this.http.post(this.getFullStatsUrl(
      'EXPLORATION_MAYBE_LEFT', explorationId, currentStateName, nextExpId,
      previousStateName, nextStateName), {
      client_time_spent_in_secs: clientTimeSpentInSecs,
      collection_id: collectionId,
      params: params,
      session_id: sessionId,
      state_name: stateName,
      version: version
    }).toPromise();
  }
}

angular.module('oppia').factory(
  'StatsReportingBackendApiService',
  downgradeInjectable(StatsReportingBackendApiService));


text:
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "basesixtyfour.h"
#include "hexConverter.h"

//Everything is Awesome~~~
//Everything is Coool when you're part of a Team~~~
//Everything is Awesome~~~
//When we're living our Dreeeeaaams~~~~~

//But only in this file.

//Matasano's CryptoPals
//Intro Program Thing
//By Lady Redezra

int main(int argc, char** argv)
{
	//I'ma assume that the first arg was your string
	int i;
	if (argc != 2)
	{
		printf("ERROR: NEED ONE STRINGS \n");
		exit(EXIT_FAILURE);
	}
	char* strOne = argv[1];
	//char* strTwo = argv[2];

	unsigned char* newStr = HexToBytes(strOne);
	/*
	for(i = 0; i < strlen(newStr); i++)
	{
		printf("%d ",(int)newStr[i]);
	}
	printf("\n");
	*/
	struct baseMatcher* baseMatcher;
	baseMatcher = GenerateMatchingArray();
	/*
	for(i=0;i<64;i++)
	{
		printf("%c, %d\n",baseMatcher[i].matchChar,baseMatcher[i].matchInt);
	}
	*/

	char* magicReturnArray = ConvertByteStr(newStr, baseMatcher);

	printf("%s\n",magicReturnArray);

	free(baseMatcher);
	free(newStr);
	return 0;
}

redpajama_set_name: RedPajamaGithub


text:
package org.jetbrains.plugins.scala.annotator
import com.intellij.psi.PsiElement
import org.jetbrains.plugins.scala.base.SimpleTestCase
import org.jetbrains.plugins.scala.lang.psi.api.ScalaRecursiveElementVisitor
import org.jetbrains.plugins.scala.lang.psi.api.statements.params.ScClassParameter
import org.jetbrains.plugins.scala.lang.psi.api.statements.{ScFunction, ScTypeAlias, ScValue, ScVariable}
import org.jetbrains.plugins.scala.lang.psi.api.toplevel.ScEarlyDefinitions
import org.jetbrains.plugins.scala.lang.psi.api.toplevel.templates.ScTemplateBody
import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.ScTypeDefinition

/**
  * Created by mucianm on 22.03.16.
  */
trait OverridingAnnotatorTestBase extends SimpleTestCase{

  final val Header = "\n"

  def messages(code: String): List[Message] = {
    val annotator = new OverridingAnnotator() {}
    val mock = new AnnotatorHolderMock

    val element: PsiElement = (Header + code).parse

    val visitor = new ScalaRecursiveElementVisitor {
      override def visitFunction(fun: ScFunction): Unit = {
        if (fun.getParent.isInstanceOf[ScTemplateBody]) {
          annotator.checkOverrideMethods(fun, mock, isInSources = false)
        }
        super.visitFunction(fun)
      }

      override def visitTypeDefinition(typedef: ScTypeDefinition): Unit = {
        if (typedef.getParent.isInstanceOf[ScTemplateBody]) {
          annotator.checkOverrideTypes(typedef, mock)
        }
        super.visitTypeDefinition(typedef)
      }

      override def visitTypeAlias(alias: ScTypeAlias): Unit = {
        if (alias.getParent.isInstanceOf[ScTemplateBody]) {
          annotator.checkOverrideTypes(alias, mock)
        }
        super.visitTypeAlias(alias)
      }

      override def visitVariable(varr: ScVariable): Unit = {
        if (varr.getParent.isInstanceOf[ScTemplateBody] ||
          varr.getParent.isInstanceOf[ScEarlyDefinitions]) {
          annotator.checkOverrideVars(varr, mock, isInSources = false)
        }
        super.visitVariable(varr)
      }

      override def visitValue(v: ScValue): Unit = {
        if (v.getParent.isInstanceOf[ScTemplateBody] ||
          v.getParent.isInstanceOf[ScEarlyDefinitions]) {
          annotator.checkOverrideVals(v, mock, isInSources = false)
        }
        super.visitValue(v)
      }

      override def visitClassParameter(parameter: ScClassParameter): Unit = {
        annotator.checkOverrideClassParameters(parameter, mock)
        super.visitClassParameter(parameter)
      }
    }

    element.accept(visitor)

    mock.annotations
  }
}


text:
set OUTDIR=UserVoice_1_5_0
set INDIR1=..\UserVoice\bin\Release
set INDIR2=..\ankoUserVoice\bin\Release

rm -rf %OUTDIR%

mkdir %OUTDIR%

copy readme.txt %OUTDIR%
copy %INDIR1%\UserVoice.dll %OUTDIR%
copy %INDIR1%\WPFToolkit.dll %OUTDIR%
copy %INDIR2%\ankoUserVoice.dll %OUTDIR%

mkdir %OUTDIR%\Data
xcopy %INDIR1%\Data %OUTDIR%\Data /E /Y

zip -r %OUTDIR%.zip %OUTDIR%

pause


text:
/****************************************************************************
 * Included Files
 ****************************************************************************/

#include <nuttx/config.h>
#if defined(CONFIG_NET_IPv4) && CONFIG_NSOCKET_DESCRIPTORS > 0

#include <sys/socket.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>

#include <netinet/in.h>
#include <net/if.h>

#include <apps/netutils/netlib.h>

/****************************************************************************
 * Public Functions
 ****************************************************************************/

/****************************************************************************
 * Name: netlib_set_ipv4netmask
 *
 * Description:
 *   Set the PIv4 netmask
 *
 * Parameters:
 *   ifname   The name of the interface to use
 *   ipaddr   The address to set
 *
 * Return:
 *   0 on success; -1 on failure
 *
 ****************************************************************************/

int netlib_set_ipv4netmask(FAR const char *ifname,
                           FAR const struct in_addr *addr)
{
  int ret = ERROR;

  if (ifname && addr)
    {
      int sockfd = socket(PF_INET, NETLIB_SOCK_IOCTL, 0);
      if (sockfd >= 0)
        {
          FAR struct sockaddr_in *inaddr;
          struct ifreq req;

          /* Add the device name to the request */

          strncpy(req.ifr_name, ifname, IFNAMSIZ);

          /* Add the INET address to the request */

          inaddr             = (FAR struct sockaddr_in *)&req.ifr_addr;
          inaddr->sin_family = AF_INET;
          inaddr->sin_port   = 0;
          memcpy(&inaddr->sin_addr, addr, sizeof(struct in_addr));

          ret = ioctl(sockfd, SIOCSIFNETMASK, (unsigned long)&req);
          close(sockfd);
        }
    }

  return ret;
}

#endif /* CONFIG_NET_IPv4 && CONFIG_NSOCKET_DESCRIPTORS */


text:
package com.pi4j.io.gpio;

import java.util.EnumSet;

/**
 * Pin pull up/down resistance definition.
 *
 * @author Robert Savage (<a
 *         href="http://www.savagehomeautomation.com">http://www.savagehomeautomation.com</a>)
 */
public enum PinPullResistance {

    OFF(0, "off"),
    PULL_DOWN(1, "down"),
    PULL_UP(2, "up");

    private final int value;
    private final String name;

    private PinPullResistance(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    @Override
    public String toString() {
        return name.toUpperCase();
    }

    public static EnumSet<PinPullResistance> all() {
        return EnumSet.of(PinPullResistance.OFF,
                          PinPullResistance.PULL_DOWN,
                          PinPullResistance.PULL_UP);
    }
}


text:
import {Injectable} from '@angular/core';
import {Observable, Injectable} from 'rxjs/Observable';
import {Observer} from 'rxjs/Observer';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/share';
import 'jquery';
import 'jquery-csv';

declare let jQuery:any;

@Injectable()
export class DataService {

    public responseChange$:Observable<any>;
    public errorChange$:Observable<any>;
    public rowFiltersChange$:Observable<any>;

    public reports:Array<{url:string, name:string}> = [
        {
            url: 'report-a.csv',
            name: 'report-a'
        }, {
            url: 'report-b.csv',
            name: 'report-b'
        }, {
            url: 'report-c.csv',
            name: 'report-c'
        }
    ];

    private _rowFilters:Array<any>;
    private _rowFiltersObserver:Observer<any>;

    private _response:any;
    private _responseObserver:Observer<any>;

    private _error:any;
    private _errorObserver:Observer<any>;

    private _gridApi:any;

    private  _json:any = {
        cols: [],
        data: []
    };

    private _filteredJson:any = {
        cols: [],
        data: []
    }

    set gridApi(api:any) {
        this._gridApi = api;
    }

    get gridApi():any {
        return this._gridApi;
    }

    set rowFitlers(filters:Array<any>) {
        this._rowFilters = filters;
        if (this._rowFiltersObserver) {
            this._rowFiltersObserver.next(filters);
        }
    }

    get rowFilters:Array<any> {
        return this._rowFilters;
    }

    set response(resp:any) {
        this._response = resp;
        if (this._responseObserver) {
            this._responseObserver.next(resp);
            if (this._gridApi) {
                this._gridApi.showLoadingOverlay();
            }
        }
    }

    get response():any {
        return this._response;
    }

    set error(err:any) {
        this._error = err;
        if (this._errorObserver) {
            this._errorObserver.next(err);
        }
    }

    get error():any {
        return this._error;
    }

    constructor() {
        this._rowFilters = [];
        this.responseChange$ = new Observable(
            (observer:any) => this._responseObserver = observer
        ).share();

        this.errorChange$ = new Observable(
            (observer:any) => this._errorObserver = observer
        ).share();

        this.rowFiltersChange$ = new Observable(
            (observer:any) => this._rowFiltersObserver = observer
        ).share();

        this.request(this.reports[0].url);

    }

    request(url) {
        let self:DataService = this,
            req:any = new XMLHttpRequest(),
            data:any;

        if (this._gridApi) {
            this._gridApi.showLoadingOverlay();
        }

        req.open('GET', url);

        req.onload = () => {
            if (req.status == 200) {
                window.setTimeout(() => {
                    data = self.addFieldHeader(self, req.responseText.trimLeft().trimRight());
                    self._json.data = jQuery.csv.toObjects(data);
                    self.response = self._json;
                }, 1000);
            } else {
                self.error = req.statusText;
            }
        }
        req.onerror = () => {
            self.error = "Unknown Error";
        }
        req.send();
    }

    addFilter(filter:any) {
        this._rowFilters.push(filter);
        if (this._rowFiltersObserver) {
            this._rowFiltersObserver.next(this._rowFilters);
        }
        if (this._rowFilters.length) {
            this.applyFilter();
        }
    }

    clearFilter() {
        this.response = this._json;
    }

    applyFilter() {
        let self:DataService = this,
            data:Array<any> = [];

        self._filteredJson.cols = this._json.cols;
        self._filteredJson.data = [];

        self._rowFilters.map(function (rowFilter:{field:string, values:Array<any>}) {
            let filteredData = self._json.data.filter(function (row:any) {
                return row.hasOwnProperty(rowFilter.field) && row[rowFilter.field] === rowFilter.values[0];
            });
            Array.prototype.push.apply(data, filteredData);
        });

        self._filteredJson.data = data;

        if (self._filteredJson.data.length) {
            self.response = self._filteredJson;
        } else {
            self.response = self._json;
        }

    }

    private parseFieldCount(csv:any):number {
        let lines:Array<string> = csv.split('\n'),
            longestLine:string = lines.reduce(function (lineA, lineB) {
                if (lineB.split(',').length > lineA.split(',').length) {
                    return lineB;
                }
                return lineA;
            }),
            fields:Array<string> = longestLine ? longestLine.split(',') : [];
        return fields.length;
    }

    private addFieldHeader(self:any, csv:any):any {
        let cnt:number = this.parseFieldCount(csv),
            alphabet:string = 'A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z',
            fields:Array<string> = alphabet.split(','),
            fieldQuotient:number,
            fieldRemainder:number,
            cols:Array<any> = [],
            i:number = 0,
            header:any;

        if (cnt <= fields.length) {
            cols = fields.slice(0, cnt);
        }
        if (cnt > fields.length) {
            fieldQuotient = (Math.floor(cnt / fields.length)) - 1;
            fieldRemainder = cnt % fields.length;
            cols = alphabet.split(',');
            if (fieldQuotient > 0) {
                for (; i < fieldQuotient; i++) {
                    fields.map(function (field) {
                        cols.push(field + (i + 1));
                    });
                }
            }
            fields.slice(0, fieldRemainder).map(function (field) {
                cols.push(field + (i + 1));
            });
        }
        cols.map(function (col, index) {
            if (index == 0) {
                header = col;
            } else {
                header += ',' + col;
            }
        });

        self._json.cols = cols;
        return header + '\n' + csv;
    }

    export() {
        if (this._gridApi) {
            let params = {
                skipHeader: false,
                skipFooters: false,
                skipGroups: false,
                allColumns: true,
                onlySelected: false,
                suppressQuotes: true,
                fileName: 'report.csv',
                columnSeparator: ','
            };
            this._gridApi.exportDataAsCsv(params);
        }
    }

}


text:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:context="http://www.springframework.org/schema/context"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">

	<!-- Root Context: defines shared resources visible to all other web components -->
	<import resource="/spring-context.xml" />
	<import resource="/hibernate-context.xml"/>
	<import resource="/cache-context.xml" />

</beans>


text:
/**
 * Tests for
 *  {@link com.driver733.vkuploader.post.posts}.
 */

/**
 * Tests for
 * {@link com.driver733.vkuploader.post.posts.Posts}.
 */
package com.driver733.vkuploader.post.posts;


text:
package systems.comodal.hash.base;

import java.math.BigInteger;
import java.nio.ByteOrder;
import java.security.MessageDigest;
import systems.comodal.hash.api.Hash;

public abstract class ReverseHash implements Hash {

  protected final byte[] data;
  protected final int offset;

  protected ReverseHash(final byte[] data, final int offset) {
    this.data = data;
    this.offset = offset + getDigestOffsetLength();
  }

  @Override
  public int hashCode() {
    int index = offset - getDigestOffsetLength();
    return (data[index] & 0xFF)
        | (data[++index] & 0xFF) << 8
        | (data[++index] & 0xFF) << 16
        | (data[++index] & 0xFF) << 24;
  }

  @Override
  public byte[] getBackingDigestData() {
    return data;
  }

  @Override
  public int getDigestOffset() {
    return offset;
  }

  @Override
  public int getDigestOffsetLength() {
    return getHashFactory().getOffsetLength();
  }

  @Override
  public ByteOrder getDigestByteOrder() {
    return ByteOrder.BIG_ENDIAN;
  }

  @Override
  public int getDigestLength() {
    return getHashFactory().getDigestLength();
  }

  @Override
  public Hash getDiscreteHash() {
    return getHashFactory().overlay(copyDigest());
  }

  @Override
  public byte[] getDiscreteDigest() {
    return copyDigest();
  }

  @Override
  public boolean isDigestDiscrete() {
    return false;
  }

  @Override
  public BigInteger digestToBigInteger() {
    return new BigInteger(1, copyDigest());
  }

  @Override
  public byte[] copyDigest() {
    final byte[] copy = new byte[getDigestLength()];
    for (int i = offset, o = 0; o < getDigestLength(); ++o, --i) {
      copy[o] = data[i];
    }
    return copy;
  }

  @Override
  public byte[] copyDigestReverse() {
    final byte[] reverseHash = new byte[getDigestLength()];
    copyDigestToReverse(reverseHash, getDigestOffsetLength());
    return reverseHash;
  }

  @Override
  public void copyDigestTo(final byte[] to, int otherOffset) {
    for (int i = offset, max = otherOffset + getDigestLength(); otherOffset < max;
        --i, ++otherOffset) {
      to[otherOffset] = data[i];
    }
  }

  @Override
  public void copyDigestToReverse(final byte[] to, int otherOffset) {
    System.arraycopy(data, offset - getDigestOffsetLength(), to, otherOffset - getDigestOffsetLength(),
        getDigestLength());
  }

  @Override
  public void updateDigest(final MessageDigest messageDigest) {
    for (int i = offset, min = offset - getDigestLength(); i > min; --i) {
      messageDigest.update(data[i]);
    }
  }

  @Override
  public void updateDigestReverse(final MessageDigest messageDigest) {
    messageDigest.update(data, offset - getDigestOffsetLength(), getDigestLength());
  }

  @Override
  public boolean digestEquals(final byte[] other, int otherOffset) {
    for (int i = offset, max = otherOffset + getDigestLength(); otherOffset < max;
        --i, ++otherOffset) {
      if (data[i] != other[otherOffset]) {
        return false;
      }
    }
    return true;
  }

  @Override
  public boolean digestEquals(final byte[] other) {
    int index = offset;
    for (final byte b : other) {
      if (b != data[index]) {
        return false;
      }
      --index;
    }
    return true;
  }

  @Override
  public boolean digestEqualsReverse(final byte[] other, int otherOffset) {
    for (int i = offset, min = offset - getDigestLength(); i > min; --i, --otherOffset) {
      if (data[i] != other[otherOffset]) {
        return false;
      }
    }
    return true;
  }

  @Override
  public int compareDigestTo(final byte[] other, int otherOffset) {
    for (int i = offset, min = offset - getDigestLength(); i > min; --i, ++otherOffset) {
      if (data[i] != other[otherOffset]) {
        return Byte.compareUnsigned(other[otherOffset], data[i]);
      }
    }
    return 0;
  }

  @Override
  public int compareDigestTo(final byte[] other) {
    int index = offset;
    for (final byte b : other) {
      if (data[index] != b) {
        return Byte.compareUnsigned(b, data[index]);
      }
      --index;
    }
    return 0;
  }

  @Override
  public int compareDigestToReverse(final byte[] other, int otherOffset) {
    for (int i = offset, min = offset - getDigestLength(); i > min; --i, --otherOffset) {
      if (data[i] != other[otherOffset]) {
        return Byte.compareUnsigned(other[otherOffset], data[i]);
      }
    }
    return 0;
  }

  @Override
  public int compareHashTo(final Hash other) {
    return other.compareDigestToReverse(data, offset);
  }
}


text:
local InCombat = function() end

local OutCombat = function() end

XB.CR:Add(5, '[XB] Priest - Basic', InCombat, OutCombat)


text:
using System;
using Microsoft.AspNetCore.Authentication;

namespace Umbraco.Cms.Web.Common.Security
{
    public class MemberExternalLoginProviderScheme
    {
        public MemberExternalLoginProviderScheme(
            MemberExternalLoginProvider externalLoginProvider,
            AuthenticationScheme? authenticationScheme)
        {
            ExternalLoginProvider = externalLoginProvider ?? throw new ArgumentNullException(nameof(externalLoginProvider));
            AuthenticationScheme = authenticationScheme ?? throw new ArgumentNullException(nameof(authenticationScheme));
        }

        public MemberExternalLoginProvider ExternalLoginProvider { get; }
        public AuthenticationScheme AuthenticationScheme { get; }
    }

}


text:
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package org.chromium.distiller.webdocument.filters.images;

import com.google.gwt.dom.client.Element;

/**
 * This interface is used to represent a single heuristic used in image extraction. The
 * provided image will be given a score based on the heuristic and a max score.
 */
public interface ImageScorer {
    /**
     * Give a particular image a score based on the heuristic implemented in this ImageScorer and
     * what the max score is set to.
     * @param e The element to score.
     * @return An integer score for the image.
     */
    public int getImageScore(Element e);

    /**
     * Get the maximum possible score that this ImageScorer can return.
     * @return The max score for this ImageScorer.
     */
    public int getMaxScore();
}


text:
package com.facebook.buck.cxx.toolchain;

import com.facebook.buck.core.sourcepath.PathSourcePath;
import com.facebook.buck.core.toolchain.tool.impl.HashedFileTool;
import com.facebook.buck.io.filesystem.ProjectFilesystem;
import com.facebook.buck.io.filesystem.impl.FakeProjectFilesystem;
import com.facebook.buck.testutil.PathNormalizer;
import com.google.common.collect.Lists;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.List;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

public class WindowsPreprocessorTest {

  private WindowsPreprocessor preprocessor;
  private ProjectFilesystem projectFilesystem = new FakeProjectFilesystem();

  @Before
  public void setUp() {
    preprocessor =
        new WindowsPreprocessor(
            new HashedFileTool(
                () ->
                    PathSourcePath.of(
                        projectFilesystem,
                        PathNormalizer.toWindowsPathIfNeeded(Paths.get("/root/preprocessor")))));
  }

  @Test
  public void localIncludeArguments() {
    List<String> includeRoots =
        Arrays.asList("/test/dir", "/another/test/dir", "one/more/test/dir");
    List<String> resultLocalIncludes =
        Lists.newArrayList(preprocessor.localIncludeArgs(includeRoots));
    List<String> expected =
        Arrays.asList("/I/test/dir", "/I/another/test/dir", "/Ione/more/test/dir");

    Assert.assertFalse(resultLocalIncludes.isEmpty());
    Assert.assertEquals(resultLocalIncludes, expected);
    Assert.assertEquals(resultLocalIncludes.size(), includeRoots.size());
  }

  @Test
  public void systemIncludeArguments() {
    List<String> includeRoots =
        Arrays.asList("/test/dir", "/another/test/dir", "one/more/test/dir");
    List<String> resultSystemIncludes =
        Lists.newArrayList(preprocessor.systemIncludeArgs(includeRoots));
    List<String> expected =
        Arrays.asList(
            "/experimental:external",
            "/external:I/test/dir",
            "/external:I/another/test/dir",
            "/external:Ione/more/test/dir");

    Assert.assertFalse(resultSystemIncludes.isEmpty());
    Assert.assertEquals(resultSystemIncludes.get(0), "/experimental:external");
    Assert.assertEquals(resultSystemIncludes, expected);
  }
}


text:
begin
  file = File.expand_path(File.dirname(__FILE__) + '/../../../../spec/spec_helper')
  require file
rescue LoadError
  puts "You need to install rspec in your base app"
  exit
end

plugin_spec_dir = File.dirname(__FILE__)
ActiveRecord::Base.logger = Logger.new(plugin_spec_dir + "/debug.log")


text:
<!doctype html>
<title>Lektor Admin</title>
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='gen/styles.css') }}">

Loading Interface ...


text:
name: getrawmempool
btcversion: 0.16.0
btcgroup: blockchain
permalink: en/doc/0.16.0/rpc/blockchain/getrawmempool/
---

getrawmempool ( verbose )

Returns all transaction ids in memory pool as a json array of string transaction ids.

Hint: use getmempoolentry to fetch a specific transaction from the mempool.

Arguments:
1. verbose (boolean, optional, default=false) True for a json object, false for array of transaction ids

Result: (for verbose = false):
[                     (json array of string)
  "transactionid"     (string) The transaction id
  ,...
]

Result: (for verbose = true):
{                           (json object)
  "transactionid" : {       (json object)
    "size" : n,             (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted.
    "fee" : n,              (numeric) transaction fee in BTC
    "modifiedfee" : n,      (numeric) transaction fee with fee deltas used for mining priority
    "time" : n,             (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT
    "height" : n,           (numeric) block height when transaction entered pool
    "descendantcount" : n,  (numeric) number of in-mempool descendant transactions (including this one)
    "descendantsize" : n,   (numeric) virtual transaction size of in-mempool descendants (including this one)
    "descendantfees" : n,   (numeric) modified fees (see above) of in-mempool descendants (including this one)
    "ancestorcount" : n,    (numeric) number of in-mempool ancestor transactions (including this one)
    "ancestorsize" : n,     (numeric) virtual transaction size of in-mempool ancestors (including this one)
    "ancestorfees" : n,     (numeric) modified fees (see above) of in-mempool ancestors (including this one)
    "wtxid" : hash,         (string) hash of serialized transaction, including witness data
    "depends" : [           (array) unconfirmed transactions used as inputs for this transaction
        "transactionid",    (string) parent transaction id
       ... ]
  }, ...
}

Examples:
> bitcoin-cli getrawmempool true
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getrawmempool", "params": [true] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/


text:
package boofcv.alg.distort;

import boofcv.struct.distort.PointTransform_F32;
import georegression.struct.homo.Homography2D_F32;
import georegression.struct.homo.Homography2D_F64;
import georegression.struct.homo.UtilHomography;
import georegression.struct.point.Point2D_F32;
import georegression.transform.homo.HomographyPointOps_F32;
import org.ejml.data.DenseMatrix64F;

/**
 * {@link PointTransform_F32} using {@link georegression.struct.homo.Homography2D_F32}.
 *
 * @author Peter Abeles
 */
public class PointTransformHomography_F32 implements PointTransform_F32 {

	Homography2D_F32 homo = new Homography2D_F32();

	public PointTransformHomography_F32() {
	}

	public PointTransformHomography_F32(DenseMatrix64F homo) {
		UtilHomography.convert(homo, this.homo);
	}

	public PointTransformHomography_F32(Homography2D_F32 homo) {
		this.homo = homo;
	}
	public PointTransformHomography_F32(Homography2D_F64 homo) {
		set(homo);
	}

	public void set(Homography2D_F32 transform ) {
		this.homo.set(transform);
	}

	public void set( Homography2D_F64 transform ) {
		UtilHomography.convert(transform,homo);
	}

	@Override
	public void compute(float x, float y, Point2D_F32 out) {
		HomographyPointOps_F32.transform(homo, x, y, out);
	}

	public Homography2D_F32 getModel() {
		return homo;
	}
}