text:
import java.io.*;
import java.util.*;

class Search
{
    public static void main(String[] args)
    {
	System.out.println("=== Search in Rotated Sorted Array ===");

	int[] array = {4,5,6,7,0,1,2};
	int target = 1;

	Solution solution = new Solution();

	int result = solution.search(array, target);

	System.out.println("array = "+array_to_string(array));
	System.out.println("target = "+target);
	System.out.println("result = "+result);
    }

    public static String array_to_string(int[] array)
    {
	StringBuffer buf = new StringBuffer("");

	for(int i = 0; i < array.length; i++) {
	    buf.append(array[i]+" ");
	}

	return buf.toString();
    }
}

class Solution
{
    public Solution()
    {
    }

    public int search(int[] A, int target)
    {
	for(int i = 0; i < A.length; i++) {

	    if(A[i] == target) {
		return i;
	    }
	}

	return -1;
    }
}

redpajama_set_name: RedPajamaGithub


text:
require 'lotus/utils/class'

module Lotus
  module Commands
    class DB
      class Console
        attr_reader :name, :env_options, :environment

        def initialize(name, environment)
          @name        = name
          @environment = environment
          @env_options = environment.to_options
          load_config
        end

        def start
          exec connection_string
        end

        private

        def config
          if name
            app_constant = Lotus::Utils::Class.load_from_pattern!(Lotus::Utils::String.new(name).classify)
            Lotus::Utils::Class.load_from_pattern!("#{app_constant}::Application").load!
            Lotus::Utils::Class.load_from_pattern!("#{app_constant}::Model").configuration
          else
            Lotus::Model.configuration
          end
        end

        def adapter_config
          config.adapter_config
        end

        def mapper
          config.mapper
        end

        def adapter_class
          Lotus::Utils::Class.load_from_pattern!(adapter_config.class_name, Lotus::Model::Adapters)
        end

        def connection_string
          adapter_class.new(mapper, adapter_config.uri).connection_string
        end

        def load_config
          require @env_options[:env_config]
        end
      end
    end
  end
end


text:
import * as React from "react";
import { ErrorInfo } from "react";

export interface ErrorBoundaryProps {
    fallback: (error: Error, info: ErrorInfo) => JSX.Element;
}

export type ErrorBoundaryState = { hasError: false; error: null; info: null; }
    | { hasError: true; error: Error; info: ErrorInfo; };

export class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
    constructor() {
        super();
        this.state = {
            hasError: false,
            error: null,
            info: null,
        };
    }

    componentDidCatch(error: Error, info: ErrorInfo) {
        this.setState({
            hasError: true,
            error, info
        });
    }

    render() {
        if (this.state.hasError) {
            return this.props.fallback(this.state.error, this.state.info);
        }
        return React.Children.only(this.props.children);
    }
}

export function showError(error: Error, info: ErrorInfo) {
    return (

{error.toString()}

            {info.componentStack.split('\n').map(line =>
{line}
)}

    );
}


text:
package org.springframework.beans.propertyeditors;

import java.beans.PropertyEditorSupport;
import java.io.File;

import org.springframework.util.StringUtils;

/**
 * Editor for java.io.File, to directly feed a File property
 * instead of using a String file name property.
 * @author Juergen Hoeller
 * @since 09.12.2003
 * @see java.io.File
 */
public class FileEditor extends PropertyEditorSupport {

	public void setAsText(String text) throws IllegalArgumentException {
		if (StringUtils.hasText(text)) {
			setValue(new File(text));
		}
		else {
			setValue(null);
		}
	}

	public String getAsText() {
		if (getValue() != null) {
			return ((File) getValue()).getAbsolutePath();
		}
		else {
			return "";
		}
	}

}


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

<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>org.apache.commons.math3.transform (Apache Commons Math 3.5 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

PREV PACKAGE

NEXT PACKAGE

FRAMES

NO FRAMES

All Classes

Package org.apache.commons.math3.transform

Implementations of transform methods, including Fast Fourier transforms.

See: Description

Interface Summary

Interface
Description

RealTransformer

Interface for one-dimensional data sets transformations producing real results.

Class Summary

Class
Description

FastCosineTransformer

Implements the Fast Cosine Transform for transformation of one-dimensional
 real data sets.

FastFourierTransformer

Implements the Fast Fourier Transform for transformation of one-dimensional
 real or complex data sets.

FastHadamardTransformer

Implements the Fast Hadamard Transform (FHT).

FastSineTransformer

Implements the Fast Sine Transform for transformation of one-dimensional real
 data sets.

TransformUtils

Useful functions for the implementation of various transforms.

Enum Summary

Enum
Description

DctNormalization

This enumeration defines the various types of normalizations that can be
 applied to discrete cosine transforms (DCT).

DftNormalization

This enumeration defines the various types of normalizations that can be
 applied to discrete Fourier transforms (DFT).

DstNormalization

This enumeration defines the various types of normalizations that can be
 applied to discrete sine transforms (DST).

TransformType

This enumeration defines the type of transform which is to be computed.

Package org.apache.commons.math3.transform Description

Implementations of transform methods, including Fast Fourier transforms.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

PREV PACKAGE

NEXT PACKAGE

FRAMES

NO FRAMES

All Classes

Copyright © 2003–2015 The Apache Software Foundation. All rights reserved.


text:
package com.hardsoftstudio.rxflux.sample.actions;

/**
 * Created by marcel on 11/09/15.
 */
public interface Keys {

  String PUBLIC_REPOS = "repos";
  String USER = "user";
  String ID = "id";
}