text:
package com.archinamon;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Created by Archinamon on 7/24/15.
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface Sequence {

    boolean synthetic() default true;
}

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Nva\FontBundle\Controller;

/**
 * This code has been auto-generated by the JMSDiExtraBundle.
 *
 * Manual changes to it will be lost.
 */
class DemoController__JMSInjector
{
    public static function inject($container) {
        $instance = new \Nva\FontBundle\Controller\DemoController();
        return $instance;
    }
}


text:
require 'saxon/source_helper'
require 'saxon/processor'

module Saxon
  # Create an XML Document object using the default processor
  # @param input [File, IO, String] the input XML file
  # @param opts [Hash] options for the XML
  # @return [Saxon::XML::Document]
  def self.XML(input, opts = {})
    Saxon::Processor.default.XML(input, opts)
  end

  module XML
    # Parse an XML File or String into a Document object
    # @!attribute [r] processor
    #   @return [Saxon::Processor] return the processor used to create this
    #     document
    class Document
      # @api private
      # @param [Saxon::Processor] processor The processor object which should
      #   be used to build the document
      # @param [String, File, IO] string_or_io The input XML
      # @param [Hash] opts (see Saxon::SourceHelper#to_stream_source)
      # @return [Saxon::XML::Document]
      def self.parse(processor, string_or_io, opts = {})
        builder = processor.to_java.newDocumentBuilder()
        source = SourceHelper.to_stream_source(string_or_io, opts)
        xdm_document = builder.build(source)
        new(xdm_document, processor)
      end

      # @return [Saxon::Processor] return the processor used to create this
      #   document
      attr_reader :processor

      # @param [String] expr The XPath expression to evaluate
      # @return [net.sf.saxon.s9api.XdmValue] return the value, node, or
      #   nodes selected
      def xpath(expr)
        processor.to_java.new_xpath_compiler.evaluate(expr, @xdm_document)
      end

      # @api private
      def initialize(xdm_document, processor)
        @xdm_document, @processor = xdm_document, processor
      end

      # @return [net.sf.saxon.s9api.XdmNode] return the underlying Saxon
      #   document object
      def to_java
        @xdm_document
      end

      # @return [String] return a simple serialisation of the document
      def to_s
        @xdm_document.to_s
      end
    end
  end
end


text:
using System;
using System.Text;

namespace ExampleClassLibrary
{
    public static class StringExtensions
    {
        /// <summary>
        /// Randomizes the string
        /// </summary>
        /// <param name="str">
        /// Input string to Randomize
        /// </param>
        /// <returns>
        /// Randomized string
        /// </returns>
        public static string Randomize(this string str)
        {
            if (str.Length < 2) return str;

            var rnd = new Random();
            var strl = str.Length;
            var sb = new StringBuilder();
            for (var i= 0; i < strl; i++)
            {
                var chr= str[rnd.Next(str.Length)].ToString();
                sb.Append(chr);
                str = str.ReplaceFirstOccurrance(chr, string.Empty);
            }

            return sb.ToString();
        }

        public static  string ReplaceFirstOccurrance(this string original, string oldValue, string newValue)
        {
            if (string.IsNullOrEmpty(original))
                return string.Empty;
            if (string.IsNullOrEmpty(oldValue))
                return original;
            if (string.IsNullOrEmpty(newValue))
                newValue = string.Empty;
            var loc = original.IndexOf(oldValue, StringComparison.Ordinal);
            return original.Remove(loc, oldValue.Length).Insert(loc, newValue);
        }
    }
}


text:
package org.apache.river.test.spec.jeri.basicinvocationhandler;

import java.util.logging.Level;

import java.util.logging.Level;
import java.lang.reflect.UndeclaredThrowableException;
import java.io.IOException;
import java.rmi.UnknownHostException;
import java.rmi.ConnectException;
import java.rmi.RemoteException;
import java.rmi.MarshalException;
import java.rmi.UnmarshalException;
import java.rmi.ConnectIOException;

/**
 * <pre>
 * Purpose
 *   This test verifies the behavior of the BasicInvocationHandler.invoke
 *   method when an exception is thrown during a call
 *   to ObjectEndpoint.executeCall.
 *
 * Test Cases
 *   This test iterates over a set of exceptions and boolean delivery status
 *   values.  Each {exception,deliveryStatus} pair denotes one test case
 *   and is defined by the variables:
 *      Throwable executeCallException
 *      boolean   deliveryStatus
 *
 * Infrastructure
 *   This test requires the following infrastructure:
 *     1) FakeInterface
 *          -an interface which declares one method that throws Throwable
 *     2) FakeObjectEndpoint
 *          -newCall returns OutboundRequestIterator passed to constructor
 *          -executeCall method throws executeCallException
 *     3) FakeOutboundRequestIterator
 *          -hasNext method returns true on first call and false after that
 *          -next method returns OutboundRequest passed to constructor
 *           and throws NoSuchElementException if called more than once
 *     4) FakeOutboundRequest
 *          -abort method does nothing
 *          -getDeliveryStatus method returns deliveryStatus
 *          -getRequestOutputStream method returns a ByteArrayOutputStream
 *          -getResponseInputStream method throws AssertionError
 *          -getUnfulfilledConstraints method return InvocationConstraints.EMPTY
 *          -populateContext method does nothing
 *
 * Actions
 *   For each test case the test performs the following steps:
 *     1) construct a FakeOutboundRequest
 *     2) construct a FakeOutboundRequestIterator, passing in FakeOutboundRequest
 *     3) construct a FakeObjectEndpoint, passing in FakeOutboundRequestIterator
 *     4) construct a BasicInvocationHandler, passing in FakeObjectEndpoint
 *        and FakeMethodConstraints
 *     5) create a dynamic proxy for the FakeInterface using the
 *        BasicInvocationHandler
 *     6) invoke FakeObjectEndpoint.setExecuteCallException
 *        passing in executeCallException
 *     7) invoke FakeOutboundRequest.setDeliveryStatusReturn
 *        passing in deliveryStatus
 *     8) invoke the method on the dynamic proxy
 *     9) assert executeCallException is thrown directly or
 *        appropriately wrapped
 * </pre>
 */
public class Invoke_ExecuteCallExceptionTest extends AbstractInvokeTest {

    // test cases
    Throwable[] cases = {
        new IOException(),
        new java.net.UnknownHostException(),    //IOException subclass
        new java.net.ConnectException(),        //IOException subclass
        new RemoteException(),                  //IOException subclass
        new java.rmi.UnknownHostException(""),  //RemoteException subclass
        new java.rmi.ConnectException(""),      //RemoteException subclass
        new MarshalException(""),               //RemoteException subclass
        new UnmarshalException(""),             //RemoteException subclass
        new ConnectIOException(""),             //RemoteException subclass
        new SecurityException(),                //RuntimeException subclass
        new ArrayIndexOutOfBoundsException(),   //RuntimeException subclass
        new UndeclaredThrowableException(null), //RuntimeException subclass
        new NullPointerException(),             //RuntimeException subclass
        new LinkageError(),                     //Error subclass
        new AssertionError()                    //Error subclass
    };

    boolean[] deliveryStatusCases = { true, false };

    // inherit javadoc
    public void run() throws Exception {
        //loop over deliveryStatusCases and cases arrays
        for (int h = 0; h < deliveryStatusCases.length; h++) {
            boolean deliveryStatus = deliveryStatusCases[h];

            for (int i = 0; i < cases.length; i++) {
                logger.log(Level.FINE,"=================================");
                Throwable executeCallException = cases[i];
                logger.log(Level.FINE,"test case " + (counter++) + ": "
                    + "deliveryStatus:" + deliveryStatus
                    + ",exception:" + executeCallException);
                logger.log(Level.FINE,"");

                iterator.init();
                request.setDeliveryStatusReturn(deliveryStatus);
                objectEndpoint.setExecuteCallException(
                    executeCallException);

                try {
                    impl.fakeMethod();
                    assertion(false);
                } catch (Throwable t) {
                    check(true,deliveryStatus,false,true,
                        executeCallException,t);
                }

            } //end inner loop
        } //end outter loop

    }

}


text:
require("firecast.lua");
local __o_rrpgObjs = require("rrpgObjs.lua");
require("rrpgGUI.lua");
require("rrpgDialogs.lua");
require("rrpgLFM.lua");
require("ndb.lua");
require("locale.lua");
local __o_Utils = require("utils.lua");

local function constructNew_frmM20_2_1()
    local obj = GUI.fromHandle(_obj_newObject("form"));
    local self = obj;
    local sheet = nil;

    rawset(obj, "_oldSetNodeObjectFunction", rawget(obj, "setNodeObject"));

    function obj:setNodeObject(nodeObject)
        sheet = nodeObject;
        self.sheet = nodeObject;
        self:_oldSetNodeObjectFunction(nodeObject);
    end;

    function obj:setNodeDatabase(nodeObject)
        self:setNodeObject(nodeObject);
    end;

    _gui_assignInitialParentForForm(obj.handle);
    obj:beginUpdate();
    obj:setName("frmM20_2_1");
    obj:setWidth(270);
    obj:setHeight(90);
    obj:setMargins({top=1});

    obj.rectangle1 = GUI.fromHandle(_obj_newObject("rectangle"));
    obj.rectangle1:setParent(obj);
    obj.rectangle1:setAlign("client");
    obj.rectangle1:setColor("#212121");
    obj.rectangle1:setName("rectangle1");

    obj.label1 = GUI.fromHandle(_obj_newObject("label"));
    obj.label1:setParent(obj.rectangle1);
    obj.label1:setWidth(40);
    obj.label1:setHeight(25);
    obj.label1:setText("Name");
    obj.label1:setHorzTextAlign("center");
    obj.label1:setName("label1");

    obj.edit1 = GUI.fromHandle(_obj_newObject("edit"));
    obj.edit1:setParent(obj.rectangle1);
    obj.edit1:setLeft(40);
    obj.edit1:setTop(0);
    obj.edit1:setWidth(200);
    obj.edit1:setHeight(25);
    obj.edit1:setField("nome");
    obj.edit1:setName("edit1");

    obj.textEditor1 = GUI.fromHandle(_obj_newObject("textEditor"));
    obj.textEditor1:setParent(obj.rectangle1);
    obj.textEditor1:setLeft(0);
    obj.textEditor1:setTop(25);
    obj.textEditor1:setWidth(270);
    obj.textEditor1:setHeight(65);
    obj.textEditor1:setField("description");
    obj.textEditor1:setName("textEditor1");

    obj.button1 = GUI.fromHandle(_obj_newObject("button"));
    obj.button1:setParent(obj.rectangle1);
    obj.button1:setLeft(245);
    obj.button1:setTop(0);
    obj.button1:setWidth(25);
    obj.button1:setHeight(25);
    obj.button1:setText("X");
    obj.button1:setName("button1");

    obj.dataLink1 = GUI.fromHandle(_obj_newObject("dataLink"));
    obj.dataLink1:setParent(obj.rectangle1);
    obj.dataLink1:setField("contador");
    obj.dataLink1:setName("dataLink1");

    obj._e_event0 = obj.button1:addEventListener("onClick",
        function (_)
            dialogs.confirmOkCancel("Tem certeza que quer apagar esse objeto?",
            					function (confirmado)
            						if confirmado then
            							ndb.deleteNode(sheet);
            						end;
            				end);
        end, obj);

    obj._e_event1 = obj.dataLink1:addEventListener("onChange",
        function (_, field, oldValue, newValue)
            if sheet~= nil then
            					local node = ndb.getRoot(sheet);
            					local objetos = ndb.getChildNodes(node.listaDe);
            					local soma = 0;

            					for i=1, #objetos, 1 do
            						soma = soma + (tonumber(objetos[i].contador) or 0);
            					end;

            					node.countSum = soma;

            					-- Atualiza a ordem lista a cada alteração
            					local rclName = self:findControlByName("rclName");
            					if rclName~=nil then
            						rclName:sort();
            					end;
            				end;
        end, obj);

    function obj:_releaseEvents()
        __o_rrpgObjs.removeEventListenerById(self._e_event1);
        __o_rrpgObjs.removeEventListenerById(self._e_event0);
    end;

    obj._oldLFMDestroy = obj.destroy;

    function obj:destroy()
        self:_releaseEvents();

        if (self.handle ~= 0) and (self.setNodeDatabase ~= nil) then
          self:setNodeDatabase(nil);
        end;

        if self.dataLink1 ~= nil then self.dataLink1:destroy(); self.dataLink1 = nil; end;
        if self.edit1 ~= nil then self.edit1:destroy(); self.edit1 = nil; end;
        if self.rectangle1 ~= nil then self.rectangle1:destroy(); self.rectangle1 = nil; end;
        if self.button1 ~= nil then self.button1:destroy(); self.button1 = nil; end;
        if self.textEditor1 ~= nil then self.textEditor1:destroy(); self.textEditor1 = nil; end;
        if self.label1 ~= nil then self.label1:destroy(); self.label1 = nil; end;
        self:_oldLFMDestroy();
    end;

    obj:endUpdate();

    return obj;
end;

function newfrmM20_2_1()
    local retObj = nil;
    __o_rrpgObjs.beginObjectsLoading();

    __o_Utils.tryFinally(
      function()
        retObj = constructNew_frmM20_2_1();
      end,
      function()
        __o_rrpgObjs.endObjectsLoading();
      end);

    assert(retObj ~= nil);
    return retObj;
end;

local _frmM20_2_1 = {
    newEditor = newfrmM20_2_1,
    new = newfrmM20_2_1,
    name = "frmM20_2_1",
    dataType = "",
    formType = "undefined",
    formComponentName = "form",
    title = "",
    description=""};

frmM20_2_1 = _frmM20_2_1;
Firecast.registrarForm(_frmM20_2_1);

return _frmM20_2_1;


text:
@interface OverviewASCollectionNode () <ASCollectionDataSource, ASCollectionDelegate>
@property (nonatomic, strong) ASCollectionNode *node;
@end

@implementation OverviewASCollectionNode

#pragma mark - Lifecycle

- (instancetype)init
{
    self = [super init];
    if (self == nil) { return self; }

    UICollectionViewFlowLayout *flowLayout = [UICollectionViewFlowLayout new];
    _node = [[ASCollectionNode alloc] initWithCollectionViewLayout:flowLayout];
    _node.dataSource = self;
    _node.delegate = self;
    [self addSubnode:_node];;

    return self;
}

- (ASLayoutSpec *)layoutSpecThatFits:(ASSizeRange)constrainedSize
{
    self.node.sizeRange = ASRelativeSizeRangeMakeWithExactCGSize(constrainedSize.max);
    return [ASStaticLayoutSpec staticLayoutSpecWithChildren:@[self.node]];
}

#pragma mark - <ASCollectionDataSource, ASCollectionDelegate>

- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
    return 100;
}

- (ASCellNodeBlock)collectionView:(ASCollectionView *)collectionView nodeBlockForItemAtIndexPath:(NSIndexPath *)indexPath
{
    return ^{
        ASTextCellNode *cellNode = [ASTextCellNode new];
        cellNode.backgroundColor = [UIColor lightGrayColor];
        cellNode.text = [NSString stringWithFormat:@"Row: %ld", indexPath.row];
        return cellNode;
    };
}

- (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath
{
    return ASSizeRangeMakeExactSize(CGSizeMake(100, 100));
}

@end


text:
package org.droitateddb.test.data;

import org.droitateddb.entity.AutoIncrement;
import org.droitateddb.entity.Column;
import org.droitateddb.entity.Entity;
import org.droitateddb.entity.PrimaryKey;
import org.droitateddb.entity.Relationship;

/**
 * @author Falk Appel
 * @author Alexander Frank
 */
@Entity
 public class WithAssociation {

	 @Column
	 @PrimaryKey
	 @AutoIncrement
	 private Integer _id;
	 @Column
	 private String name;
	 @Relationship
	 private Simple entity;

	 public WithAssociation() {
	 }
	 public WithAssociation(final Integer id, final String name, final Simple entity) {
		 this._id = id;
		 this.name = name;
		 this.entity = entity;
	 }

	 public Integer getId() {
		 return _id;
	 }

	 public void setId(final Integer id) {
		 this._id = id;
	 }

	 public String getName() {
		 return name;
	 }

	 public void setName(final String name) {
		 this.name = name;
	 }

	 public Simple getEntity() {
		 return entity;
	 }

	 public void setEntity(final Simple entity) {
		 this.entity = entity;
	 }

 }


text:
package fpinscala.answers

/**
  * See [[fpinscala.gettingstarted.MyModule]]
  */
object Exercise1 {

  // Exercise 1: Write a function to compute the nth fibonacci number

  // 0 and 1 are the first two numbers in the sequence,
  // so we start the accumulators with those.
  // At every iteration, we add the two numbers to get the next one.
  def fib(n: Int): Int = {
    @annotation.tailrec
    def loop(n: Int, prev: Int, cur: Int): Int =
      if (n == 0) prev
      else loop(n - 1, cur, prev + cur)
    loop(n, 0, 1)
  }

}

object TestFib {

  import Exercise1._

  def main(args: Array[String]): Unit = {
    println("Expected: 0, 1, 1, 2, 3, 5, 8")
    println("Actual:   %d, %d, %d, %d, %d, %d, %d".format(fib(0), fib(1), fib(2), fib(3), fib(4), fib(5), fib(6)))
  }
}


text:
#include <jni.h>
/* Header for class com_example_haha_JNITest */

#ifndef _Included_com_example_haha_JNITest
#define _Included_com_example_haha_JNITest
#ifdef __cplusplus
extern "C" {
#endif
/*
 * Class:     com_example_haha_JNITest
 * Method:    add
 * Signature: (II)I
 */
JNIEXPORT jint JNICALL Java_com_example_nnnn_JNITest_add(JNIEnv *env, jobject obj, jint j1, jint j2)
{
	return j1+ j2;
};
#ifdef __cplusplus
}
#endif
#endif


text:
using System;
using System.IO;
using libcmdline;

namespace tail
{
	/// <summary>
	/// tail - A reimplimentation of the Unix utility in C#
	///
	/// This program takes a file as its argument and prints the last n lines
	/// to stdout.
	///
	/// Note: This program is not POSIX compliant.
	/// </summary>
	public class tail
	{
		const string usage = "usage: tail -p filepath [-n number]";

		/// <summary>
		/// Read the file given by filePath. Return an array where each entry is
		/// one line in the file.
		/// </summary>
		/// <param name="filePath"></param>
		/// <returns></returns>
		public static string[] readFile(string filePath) {
			string[] fileLines = new string[0];

			if (!File.Exists(filePath)) {
				Console.WriteLine(string.Format("error: cannot find \'{0}\'", filePath));
				return fileLines;
			}

			try {
				fileLines = File.ReadAllLines(filePath);
			}
			catch (Exception e) {
				Console.WriteLine("error: " + e.Message);
			}

			return fileLines;
		}

		/// <summary>
		/// Print the last n lines of a file, which are stored in the given
		/// array.
		/// </summary>
		/// <param name="fileLines"></param>
		/// <param name="numLines"></param>
		public static void print(string[] fileLines, uint numLines) {
			if (fileLines == null || fileLines.Length < 1) {
				return;
			}

			try {
				uint startPosition = 0;

				if (fileLines.Length > numLines) {
					startPosition = ((uint) fileLines.Length - numLines);
				}

				for (uint i = startPosition; i < fileLines.Length; i++) {
					Console.WriteLine(fileLines[i]);
				}
			}
			catch (Exception e) {
				Console.WriteLine("error: " + e.Message);
			}
		}

		/// <summary>
		/// Attempt to read a file and print the last n lines to stdout.
		/// </summary>
		/// <param name="args"></param>
		static void Main(string[] args) {
			bool p_flag = false;			/* Determine if the -p flag was given */
			string filePath = string.Empty;	/* Path to file */
			uint numLines = 10;				/* Default number of lines to print */

			/* Set up the command line flag handler(s) */
			CommandLineArgs cmdLine = new CommandLineArgs();
			cmdLine.PrefixRegexPatternList.Add("-{1}");

			cmdLine.registerSpecificSwitchMatchHandler("n", (sender, e) => {
				numLines = uint.Parse(e.Value);
			});
			cmdLine.registerSpecificSwitchMatchHandler("p", (sender, e) => {
				filePath = e.Value;
				p_flag = true;
			});

			try {
				// Put a newline before doing anything. Looks better.
				Console.WriteLine();

				cmdLine.processCommandLineArgs(args);

				if (!p_flag) {
					Console.WriteLine("error: no file given");
					Console.WriteLine(usage);
					goto Exit;
				}

				print(readFile(filePath), numLines);
			}
			catch (IndexOutOfRangeException e) {
				Console.WriteLine("error: invalid number of arguments");
				Console.WriteLine(usage);
			}
			catch (Exception e) {
				Console.WriteLine(e.Message);
				Console.WriteLine(usage);
			}

		Exit:
			// Put a newline after everything is done. Looks better.
			Console.WriteLine();
#if DEBUG
		foreach (string invalidArg in cmdLine.InvalidArgs) {
			Console.WriteLine(invalidArg);
		}
		Console.ReadLine();
#endif
		}
	}
}


text:
namespace
{
  const int ScreenWidth = 1024;
  const int ScreenHeight = 725;
  const int ScreenFps = 60;
  const char* WindowTitle = "El Nacho: a game by Guilherme Taschetto";

  void doDisplay(void);
  void doKeyboard(unsigned char, int, int);
  void doSpecialFunc(int, int, int);
  void doReshapeFunc(GLsizei, GLsizei);
  void doMotionFunc(int, int);
  void doMouseFunc(int, int, int, int);
  void runMainLoop(int);

  GameEngine engine;
}

int main(int argc, char** argv)
{
  engine.Init(argc, argv, ::ScreenWidth, ::ScreenHeight, ::WindowTitle);

  if (!engine.InitGL())
  {
    std::cerr << "ElNacho error: Unable to initialize graphics library!" << std::endl;
    return 1;
  }

  engine.ChangeState(InitialState::Instance());

  ::glutDisplayFunc(::doDisplay);
  ::glutKeyboardFunc(::doKeyboard);
  ::glutSpecialFunc(::doSpecialFunc);
  ::glutTimerFunc(1000 / ScreenFps, ::runMainLoop, 0);
  ::glutReshapeFunc(::doReshapeFunc);
  ::glutMotionFunc(::doMotionFunc);
  ::glutMouseFunc(::doMouseFunc);
  ::glutMainLoop();

  return 0;
}

void ::runMainLoop(int ms)
{
  glutPostRedisplay();
  ::glutTimerFunc(ms, ::runMainLoop, ms);
}

void ::doDisplay(void)
{
  engine.Draw();
}

void ::doKeyboard(unsigned char key, int x, int y)
{
  engine.Keyboard(key, x, y);
}

void ::doSpecialFunc(int key, int x, int y)
{
  engine.SpecialFunc(key, x, y);
}

void ::doReshapeFunc(GLsizei width, GLsizei height)
{
  engine.ReshapeFunc(width, height);
}

void ::doMotionFunc(int x, int y)
{
  engine.MotionFunc(x, y);
}

void ::doMouseFunc(int button, int state, int x, int y)
{
  engine.MouseFunc(button, state, x, y);
}


text:
extern crate bitcrust_lib;

extern crate byteorder;

use std::io::BufReader;
use std::fs::File;

mod blk_file;

use std::time::{Instant};
extern crate rayon;

#[test]
#[ignore]
fn load_bench_init() {

    let mut store = bitcrust_lib::init();

    for fileno in 0..750 {
        let name = format!("./core-blocks/blk{:05}.dat", fileno);
        println!("Processing {}", name);
        let f = File::open(name).unwrap();
        let mut rdr = BufReader::new(f);

        let mut blocks = 0;
        loop {
            let blk = blk_file::read_block(&mut rdr).unwrap();

            if blk.is_none() {
                break;
            }

            bitcrust_lib::add_block(&mut store, &blk.unwrap());

            blocks += 1;
       }
    }

}

#[test]
#[ignore]
fn load_bench_next() {
    let mut store = bitcrust_lib::init();
    store.initial_sync = false;

    let fileno = 750;

    let name = format!("./core-blocks/blk{:05}.dat", fileno);
    println!("Processing {}", name);
    let f = File::open(name).unwrap();

    let mut rdr = BufReader::new(f);

    let mut blocks = 0;
    let start = Instant::now();
    loop {
        let blk = blk_file::read_block(&mut rdr).unwrap();

        if blk.is_none() {
            break;
        }

        bitcrust_lib::add_block(&mut store, &blk.unwrap());

        blocks += 1;
    }

    let elapsed = Instant::now() - start;
    let elapsed = elapsed.as_secs() as u64 * 1000 + elapsed.subsec_nanos() as u64 / 1000_000;
    println!("Processes {} blocks in {} ms ({} ms/block)", blocks, elapsed, elapsed / blocks )

}


text:
<template>

Settings

Page enter animation

    <form class="form-inline">

        duration:
        <input type="text" class="form-control" value.bind="enterDuration" />

        effect:
        <select class="form-control" id="select-enter-effect" value.bind="selectedEnterAnimation">
          <option value.bind="item" repeat.for="item of enterEffects">${item}</option>
        </select>

        easing:
        <select class="form-control" id="select-enter-easing" value.bind="selectedEnterEasing">
          <option value.bind="item" repeat.for="item of easings">${item}</option>
        </select>

    </form>

Page leave animation

    <form class="form-inline">

        duration:
        <input type="text" class="form-control" value.bind="leaveDuration" />

        effect:
        <select class="form-control" id="select-leave-effect" value.bind="selectedLeaveAnimation">
          <option value.bind="item" repeat.for="item of leaveEffects">${item}</option>
        </select>

        easing:
        <select class="form-control" id="select-leave-easing" value.bind="selectedLeaveEasing">
          <option value.bind="item" repeat.for="item of easings">${item}</option>
        </select>

    </form>

</template>


text:
//    #[license]
//    SmartsheetClient SDK for C#
//    %%
//    Copyright (C) 2014 SmartsheetClient
//    %%
//    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.
//    %[license]

using System.Collections.Generic;

namespace Smartsheet.Api
{
    using Api.Models;

    /// <summary>
    /// <para>This interface provides methods to access sheet resources that are associated to a Workspace object.</para>
    ///
    /// <para>Thread Safety: Implementation of this interface must be thread safe.</para>
    /// </summary>
    public interface WorkspaceSheetResources
    {
        /// <summary>
        /// <para>Creates a sheet in the given workspace.</para>
        ///
        /// <para>Mirrors to the following Smartsheet REST API method: POST /workspaces/{workspaceId}/Sheets</para>
        /// </summary>
        /// <param name="workspaceId"> the workspace Id </param>
        /// <param name="sheet"> the sheet to create </param>
        /// <returns> the created sheet </returns>
        /// <exception cref="System.InvalidOperationException"> if any argument is null or empty string </exception>
        /// <exception cref="InvalidRequestException"> if there is any problem with the REST API request </exception>
        /// <exception cref="AuthorizationException"> if there is any problem with the REST API authorization (access token) </exception>
        /// <exception cref="ResourceNotFoundException"> if the resource cannot be found </exception>
        /// <exception cref="ServiceUnavailableException"> if the REST API service is not available (possibly due to rate limiting) </exception>
        /// <exception cref="SmartsheetException"> if there is any other error during the operation </exception>
        Sheet CreateSheet(long workspaceId, Sheet sheet);

        /// <summary>
        /// <para>Creates a sheet at the top-level of the specified workspace, from the specified template. </para>
        /// <para>Mirrors to the following Smartsheet REST API method: POST /workspaces/{workspaceId}/Sheets</para>
        /// </summary>
        /// <param name="workspaceId"> the workspace Id </param>
        /// <param name="sheet"> the sheet to create </param>
        /// <param name="includes"> used to specify the optional objects to include </param>
        /// <returns> the created sheet </returns>
        /// <exception cref="System.InvalidOperationException"> if any argument is null or an empty string </exception>
        /// <exception cref="InvalidRequestException"> if there is any problem with the REST API request </exception>
        /// <exception cref="AuthorizationException"> if there is any problem with the REST API authorization (access token) </exception>
        /// <exception cref="ResourceNotFoundException"> if the resource cannot be found </exception>
        /// <exception cref="ServiceUnavailableException"> if the REST API service is not available (possibly due to rate limiting) </exception>
        /// <exception cref="SmartsheetException"> if there is any other error during the operation </exception>
        Sheet CreateSheetFromTemplate(long workspaceId, Sheet sheet, IEnumerable<TemplateInclusion> includes);

        /// <summary>
        /// <para>Imports a sheet at the top level of the specified workspace (from CSV). </para>
        /// <para>Mirrors to the following Smartsheet REST API method: POST /workspaces/{workspaceId}/sheets/import</para>
        /// </summary>
        /// <param name="workspaceId"> the workspace Id </param>
        /// <param name="file"> path to the CSV file</param>
        /// <param name="sheetName"> destination sheet name </param>
        /// <param name="headerRowIndex"> index (0 based) of row to be used for column names </param>
        /// <param name="primaryColumnIndex"> index (0 based) of primary column </param>
        /// <returns> the created sheet </returns>
        /// <exception cref="System.InvalidOperationException"> if any argument is null or an empty string </exception>
        /// <exception cref="InvalidRequestException"> if there is any problem with the REST API request </exception>
        /// <exception cref="AuthorizationException"> if there is any problem with the REST API authorization (access token) </exception>
        /// <exception cref="ResourceNotFoundException"> if the resource cannot be found </exception>
        /// <exception cref="ServiceUnavailableException"> if the REST API service is not available (possibly due to rate limiting) </exception>
        /// <exception cref="SmartsheetException"> if there is any other error during the operation </exception>
        Sheet ImportCsvSheet(long workspaceId, string file, string sheetName, int? headerRowIndex, int? primaryColumnIndex);

        /// <summary>
        /// <para>Imports a sheet at the top level of the specified workspace (From XLSX). </para>
        /// <para>Mirrors to the following Smartsheet REST API method: POST /workspaces/{workspaceId}/sheets/import</para>
        /// </summary>
        /// <param name="workspaceId"> the workspace Id </param>
        /// <param name="file"> path to the image file</param>
        /// <param name="sheetName"> destination sheet name </param>
        /// <param name="headerRowIndex"> index (0 based) of row to be used for column names </param>
        /// <param name="primaryColumnIndex"> index (0 based) of primary column </param>
        /// <returns> the created sheet </returns>
        /// <exception cref="System.InvalidOperationException"> if any argument is null or an empty string </exception>
        /// <exception cref="InvalidRequestException"> if there is any problem with the REST API request </exception>
        /// <exception cref="AuthorizationException"> if there is any problem with the REST API authorization (access token) </exception>
        /// <exception cref="ResourceNotFoundException"> if the resource cannot be found </exception>
        /// <exception cref="ServiceUnavailableException"> if the REST API service is not available (possibly due to rate limiting) </exception>
        /// <exception cref="SmartsheetException"> if there is any other error during the operation </exception>
        Sheet ImportXlsSheet(long workspaceId, string file, string sheetName, int? headerRowIndex, int? primaryColumnIndex);
    }
}


text:
using VkNet.Enums.Filters;
using VkNet.Utils;

namespace VkNet.Model.RequestParams
{
	/// <summary>
	/// Параметры метода groups.get
	/// </summary>
	public struct GroupsGetParams
	{
		/// <summary>
		/// Параметры метода groups.get
		/// </summary>
		/// <param name="gag">Заглушка для конструктора.</param>
		public GroupsGetParams(bool gag = true)
		{
			UserId = null;
			Extended = null;
			Filter = null;
			Fields = null;
			Offset = null;
			Count = null;
		}

		/// <summary>
		/// Идентификатор пользователя, информацию о сообществах которого требуется получить. положительное число, по умолчанию идентификатор текущего пользователя.
		/// </summary>
		public long? UserId { get; set; }

		/// <summary>
		/// Если указать в качестве этого параметра 1, то будет возвращена полная информация о группах пользователя. По умолчанию 0. флаг, может принимать значения 1 или 0.
		/// </summary>
		public bool? Extended { get; set; }

		/// <summary>
		/// Список фильтров сообществ, которые необходимо вернуть, перечисленные через запятую. Доступны значения admin, editor, moder, groups, publics, events. По умолчанию возвращаются все сообщества пользователя.
		/// При указании фильтра admin будут возвращены сообщества, в которых пользователь является администратором, editor — администратором или редактором, moder — администратором, редактором или модератором. список строк, разделенных через запятую.
		/// </summary>
		public GroupsFilters Filter { get; set; }

		/// <summary>
		/// Список дополнительных полей, которые необходимо вернуть. Возможные значения: city, country, place, description, wiki_page, members_count, counters, start_date, finish_date, can_post, can_see_all_posts, activity, status, contacts, links, fixed_post, verified, site, can_create_topic. Подробнее см. описание полей объекта group.
		/// Обратите внимание, этот параметр учитывается только при extended=1. список строк, разделенных через запятую.
		/// </summary>
		public GroupsFields Fields { get; set; }

		/// <summary>
		/// Смещение, необходимое для выборки определённого подмножества сообществ. положительное число.
		/// </summary>
		public long? Offset { get; set; }

		/// <summary>
		/// Количество сообществ, информацию о которых нужно вернуть. положительное число, максимальное значение 1000.
		/// </summary>
		public long? Count { get; set; }

		/// <summary>
		/// Привести к типу VkParameters.
		/// </summary>
		/// <param name="p">Параметры.</param>
		/// <returns></returns>
		public static VkParameters ToVkParameters(GroupsGetParams p)
		{
			var parameters = new VkParameters
			{
				{ "user_id", p.UserId },
				{ "extended", p.Extended },
				{ "filter", p.Filter },
				{ "fields", p.Fields },
				{ "offset", p.Offset },
				{ "count", p.Count }
			};

			return parameters;
		}
	}
}


text:
.class public Lhs;
.super Ljava/lang/Object;
.source "SourceFile"

# interfaces
.implements Landroid/content/DialogInterface$OnClickListener;

# instance fields
.field final synthetic a:Lcom/tndev/funnyframes/EditActivity;

# direct methods
.method public constructor <init>(Lcom/tndev/funnyframes/EditActivity;)V
    .registers 2
    .parameter

    .prologue
    .line 1
    iput-object p1, p0, Lhs;->a:Lcom/tndev/funnyframes/EditActivity;

    .line 430
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

# virtual methods
.method public onClick(Landroid/content/DialogInterface;I)V
    .registers 3
    .parameter
    .parameter

    .prologue
    .line 433
    return-void
.end method


text:
<?php
/* @var $this FileToTagsController */
/* @var $model FileToTags */

$this->breadcrumbs=array(
	'File To Tags'=>array('index'),
	$model->id,
);

$this->menu=array(
	array('label'=>'List FileToTags', 'url'=>array('index')),
	array('label'=>'Create FileToTags', 'url'=>array('create')),
	array('label'=>'Update FileToTags', 'url'=>array('update', 'id'=>$model->id)),
	array('label'=>'Delete FileToTags', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
	array('label'=>'Manage FileToTags', 'url'=>array('admin')),
);
?>

View FileToTags #<?php echo $model->id; ?>

<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		'id',
		'file',
		'tag',
	),
)); ?>


text:
namespace Microsoft.eShopOnContainers.Services.Identity.API.Services
{
    public class RedirectService : IRedirectService
    {
        public string ExtractRedirectUriFromReturnUrl(string url)
        {
            var decodedUrl = System.Net.WebUtility.HtmlDecode(url);
            var results = Regex.Split(decodedUrl, "redirect_uri=");
            if (results.Length < 2)
                return "";

            string result = results[1];

            string splitKey;
            if (result.Contains("signin-oidc"))
                splitKey = "signin-oidc";
            else
                splitKey = "scope";

            results = Regex.Split(result, splitKey);
            if (results.Length < 2)
                return "";

            result = results[0];

            return result.Replace("%3A", ":").Replace("%2F", "/").Replace("&", "");
        }
    }
}


text:
package ch.heigvd.res.labs.roulette.net.protocol;

/**
 * This class defines constants for the Roulette Protocol (version 2)
 *
 * @author Olivier Liechti
 */
public class RouletteV2Protocol extends RouletteV1Protocol {

  public final static String VERSION = "2.0";

  public final static int DEFAULT_PORT = 2613;

  public final static String CMD_CLEAR = "CLEAR";
  public final static String CMD_LIST = "LIST";

  public static String RESPONSE_CLEAR_DONE = "DATASTORE CLEARED";

  public final static String[] SUPPORTED_COMMANDS = new String[]{CMD_HELP, CMD_RANDOM, CMD_LOAD, CMD_INFO, CMD_BYE, CMD_CLEAR, CMD_LIST};

}


text:
package com.intellij.openapi.vcs.history;

import com.intellij.openapi.vcs.FilePath;
import com.intellij.openapi.vcs.VcsKey;

public class HistoryCacheBaseKey {
  private final FilePath myFilePath;
  private final VcsKey myVcsKey;

  public HistoryCacheBaseKey(FilePath filePath, VcsKey vcsKey) {
    myFilePath = filePath;
    myVcsKey = vcsKey;
  }

  public FilePath getFilePath() {
    return myFilePath;
  }

  public VcsKey getVcsKey() {
    return myVcsKey;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    HistoryCacheBaseKey baseKey = (HistoryCacheBaseKey)o;

    if (!myFilePath.equals(baseKey.myFilePath)) return false;
    if (!myVcsKey.equals(baseKey.myVcsKey)) return false;

    return true;
  }

  @Override
  public int hashCode() {
    int result = myFilePath.hashCode();
    result = 31 * result + myVcsKey.hashCode();
    return result;
  }
}


text:
require 'sinatra/base'

class Public < Sinatra::Base
  post '/hello' do
    [200, {"Content-Type"=>"text/plain"}, ["Hello World!"]]
  end
end

class Private < Sinatra::Base
  post '/hello' do
    validate_user!
    [200, {"Content-Type"=>"text/plain"}, ["Hello #{env['moguera.auth'].access_key}!"]]
  end

  private

  def validate_user!
    if e = env['moguera.error']
      $stderr.puts e.message
      case e
        when Moguera::Authentication::ParameterInvalid,
             Moguera::Authentication::RequestTokenRequired
          halt 400, "400 Bad Request: #{e.message}\n"
        when Moguera::Authentication::AuthenticationError
          halt 401, "401 Unauthorized: #{e.message}\n"
        when Moguera::Authentication::UserNotFound
          halt 404, "404 Not Found: #{e.message}\n"
        else
          halt 500, "500 Internal Server Error\n"
      end
    end
  end
end


text:
using Esri.ArcGISRuntime.Controls;
using Esri.ArcGISRuntime.Data;
using Esri.ArcGISRuntime.Layers;
using Esri.ArcGISRuntime.Security;
using System;
using System.Globalization;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;

namespace ArcGISRuntime.Samples.Desktop
{
	/// <summary>
	/// Demonstrates how editing of features can be restricted by ownership-based access defined in the service.
	/// </summary>
	/// <title>Ownership-based Editing</title>
	/// <category>Editing</category>
	public partial class OwnershipBasedEditing : UserControl
	{
		private TaskCompletionSource<Credential> loginTask;
		int loginAttempts = 0;

		public OwnershipBasedEditing()
		{
			InitializeComponent();
			// Enables application to handle credential challenge.
			IdentityManager.Current.ChallengeHandler = new ChallengeHandler(GetCredentialAsync);
		}

		/// <summary>
		/// Forwards credential request info using Dispatcher to enable access to UI elements.
		/// </summary>
		private async Task<Credential> GetCredentialAsync(CredentialRequestInfo info)
		{
			if (Dispatcher == null)
				return await GetCredentialUIAsync(info);
			return await Dispatcher.Invoke(() => GetCredentialUIAsync(info));
		}

		/// <summary>
		/// Initializes UI and login task with credential request info.
		/// </summary>
		private async Task<Credential> GetCredentialUIAsync(CredentialRequestInfo info)
		{
			InitalizeLoginPanel(info.ServiceUri);
			loginTask = new TaskCompletionSource<Credential>(info);
			string message = null;
			Credential credential = null;
			try
			{
				credential = await loginTask.Task;
			}
			catch (Exception ex)
			{
				message = ex.Message;
			}
			finally
			{
				LoginPanel.Visibility = Visibility.Collapsed;
			}
			if (!string.IsNullOrWhiteSpace(message))
				MessageBox.Show(message);
			return credential;
		}

		private void InitalizeLoginPanel(string serviceUri)
		{
			LoginInfo.Text = string.Format("Login to: {0}", serviceUri);
			Username.Text = "user2";
			Password.Text = "user2";
			LoginPanel.Visibility = Visibility.Visible;
		}

		/// <summary>
		/// Attempts to generate credential for service to set login task result.
		/// </summary>
		private async void SignInButton_Click(object sender, RoutedEventArgs e)
		{
			if (loginTask == null || loginTask.Task == null || !(loginTask.Task.AsyncState is CredentialRequestInfo))
				return;
			var info = (CredentialRequestInfo)loginTask.Task.AsyncState;
			var username = Username.Text.Trim();
			var password = Password.Text.Trim();
			try
			{
				var credential = await IdentityManager.Current.GenerateCredentialAsync(info.ServiceUri, username, password);
				loginTask.TrySetResult(credential);
			}
			catch (Exception ex)
			{
				loginAttempts++;
				if (loginAttempts > 3)
					loginTask.TrySetException(ex);
			}
		}

		/// <summary>
		/// Removes credential used to access the service and adds a new instance of layer to trigger another challenge.
		/// </summary>
		private void SignOut()
		{
			var layer = MyMapView.Map.Layers["Marine"] as FeatureLayer;
			if (layer == null) return;
			var table = (ServiceFeatureTable)layer.FeatureTable;
			var credential = IdentityManager.Current.FindCredential(table.ServiceUri);
			if (credential != null)
			{
				loginAttempts = 0;
				IdentityManager.Current.RemoveCredential(credential);
				MyMapView.Map.Layers.Remove(layer);
				InitalizeLoginPanel(table.ServiceUri);
				MyMapView.Map.Layers.Add(new FeatureLayer(new Uri(table.ServiceUri)) { ID = layer.ID });
			}
		}

		/// <summary>
		/// Signs out from current login so sample can trigger credential challenge.
		/// </summary>
		private void SignOutButton_Click(object sender, RoutedEventArgs e)
		{
			SignOut();
		}

		/// <summary>
		/// Updates login information based on credential.
		/// </summary>
		private void MyMapView_LayerLoaded(object sender, LayerLoadedEventArgs e)
		{
			if (e.LoadError != null || !(e.Layer is FeatureLayer))
				return;
			var layer = (FeatureLayer)e.Layer;
			var table = (ServiceFeatureTable)layer.FeatureTable;
			var credential = IdentityManager.Current.FindCredential(table.ServiceUri);
			LoginInfo.Text = string.Format("Login '{0}' service as: {1}", table.ServiceInfo.Name, ((TokenCredential)credential).UserName);
		}

		/// <summary>
		/// Signs out from current login so switching samples can trigger credential challenge.
		/// </summary>
		private void MyMapView_LayerUnloaded(object sender, LayerUnloadedEventArgs e)
		{
			if (!(e.Layer is FeatureLayer))
				return;
			SignOut();
		}

		/// <summary>
		/// Selects feature and checks whether update or delete is allowed.
		/// </summary>
		private async void MyMapView_MapViewTapped(object sender, MapViewInputEventArgs e)
		{
			// Ignore tap events while in edit mode so we do not interfere with add point.
			if (MyMapView.Editor.IsActive)
				return;
			var layer = MyMapView.Map.Layers["Marine"] as FeatureLayer;
			var table = (ArcGISFeatureTable)layer.FeatureTable;
			layer.ClearSelection();

			// Service metadata includes edit fields which can be used
			// to check ownership and/or tracking the last edit made.
			if (table.ServiceInfo == null || table.ServiceInfo.EditFieldsInfo == null)
				return;
			var creatorField = table.ServiceInfo.EditFieldsInfo.CreatorField;
			if (string.IsNullOrWhiteSpace(creatorField))
				return;

			string message = null;
			try
			{
				// Performs hit test on layer to select feature.
				var features = await layer.HitTestAsync(MyMapView, e.Position);
				if (features == null || !features.Any())
					return;
				var featureID = features.FirstOrDefault();
				layer.SelectFeatures(new long[] { featureID });
				var feature = (GeodatabaseFeature)await layer.FeatureTable.QueryAsync(featureID);

				// Displays feature attributes and editing restrictions.
				if (feature.Attributes.ContainsKey(table.ObjectIDField))
					message += string.Format("[{0}] : {1}\n", table.ObjectIDField, feature.Attributes[table.ObjectIDField]);
				if (feature.Attributes.ContainsKey(creatorField))
					message += string.Format("[{0}] : {1}\n", creatorField, feature.Attributes[creatorField]);
				// Checks whether service allows current user to add/update/delete attachment of feature.
				message += string.Format("Attachments\n\tCanAdd - {0}\n\tCanUpdate - {1}\n\tCanDelete - {2}\n",
					table.CanAddAttachment(feature), table.CanUpdateAttachment(feature), table.CanDeleteAttachment(feature));
				// Checks whether service allows current user to update feature's geometry or attributes; and delete feature.
				message += string.Format("Feature\n\tCanUpdateGeometry - {0}\n\tCanUpdate - {1}\n\tCanDelete - {2}\n",
					table.CanUpdateGeometry(feature), table.CanUpdateFeature(feature), table.CanDeleteFeature(feature));
			}
			catch (Exception ex)
			{
				message = ex.Message;
			}
			if (!string.IsNullOrWhiteSpace(message))
				MessageBox.Show(message);
		}

		/// <summary>
		/// Adds a new turtle feature owned by current user.
		/// </summary>
		private async void AddButton_Click(object sender, RoutedEventArgs e)
		{
			var layer = MyMapView.Map.Layers["Marine"] as FeatureLayer;
			var table = (ArcGISFeatureTable)layer.FeatureTable;
			var typeID = (Int32)((Button)sender).Tag;
			string message = null;
			try
			{
				var mapPoint = await MyMapView.Editor.RequestPointAsync();
				var feature = new GeodatabaseFeature(table.Schema) { Geometry = mapPoint };
				if (table.ServiceInfo.Types == null)
					return;
				var featureType = table.ServiceInfo.Types.FirstOrDefault(t => Int32.Equals(Convert.ToInt32(t.ID, CultureInfo.InvariantCulture), typeID));
				if (featureType == null)
					return;
				var template = featureType.Templates.FirstOrDefault();
				if (template == null || template.Prototype == null || template.Prototype.Attributes == null)
					return;
				foreach (var item in template.Prototype.Attributes)
					feature.Attributes[item.Key] = item.Value;
				if (table.CanAddFeature(feature))
					table.AddAsync(feature);
				if (table.HasEdits)
				{
					if (table is ServiceFeatureTable)
					{
						var serviceTable = (ServiceFeatureTable)table;
						// Pushes new feature back to the server.
						var result = await serviceTable.ApplyEditsAsync();
						if (result.AddResults == null || result.AddResults.Count < 1)
							return;
						var addResult = result.AddResults[0];
						if (addResult.Error != null)
							message = addResult.Error.Message;
					}
				}
			}
			catch (Exception ex)
			{
				message = ex.Message;
			}
			if (!string.IsNullOrWhiteSpace(message))
				MessageBox.Show(message);
		}
	}
}


text:
#ifndef _ASM_IO_H
#define _ASM_IO_H

#ifdef __KERNEL__

#include <linux/types.h>
#include <asm/iomap.h>
#include <asm/page.h>
#include <asm/cacheflush.h>

/*
 * We don't have PCI yet.
 * _IO_BASE is pointing at what should be unused virtual space.
 */
#define IO_SPACE_LIMIT 0xffff
#define _IO_BASE ((void __iomem *)0xfe000000)

#define IOMEM(x)        ((void __force __iomem *)(x))

extern int remap_area_pages(unsigned long start, unsigned long phys_addr,
				unsigned long end, unsigned long flags);

extern void __iounmap(const volatile void __iomem *addr);

/* Defined in lib/io.c, needed for smc91x driver. */
extern void __raw_readsw(const void __iomem *addr, void *data, int wordlen);
extern void __raw_writesw(void __iomem *addr, const void *data, int wordlen);

extern void __raw_readsl(const void __iomem *addr, void *data, int wordlen);
extern void __raw_writesl(void __iomem *addr, const void *data, int wordlen);

#define readsw(p, d, l)	__raw_readsw(p, d, l)
#define writesw(p, d, l) __raw_writesw(p, d, l)

#define readsl(p, d, l)   __raw_readsl(p, d, l)
#define writesl(p, d, l)  __raw_writesl(p, d, l)

/*
 * virt_to_phys - map virtual address to physical
 * @address:  address to map
 */
static inline unsigned long virt_to_phys(volatile void *address)
{
	return __pa(address);
}

/*
 * phys_to_virt - map physical address to virtual
 * @address: address to map
 */
static inline void *phys_to_virt(unsigned long address)
{
	return __va(address);
}

/*
 * convert a physical pointer to a virtual kernel pointer for
 * /dev/mem access.
 */
#define xlate_dev_kmem_ptr(p)    __va(p)
#define xlate_dev_mem_ptr(p)    __va(p)

/*
 * IO port access primitives.  Hexagon doesn't have special IO access
 * instructions; all I/O is memory mapped.
 *
 * in/out are used for "ports", but we don't have "port instructions",
 * so these are really just memory mapped too.
 */

/*
 * readb - read byte from memory mapped device
 * @addr:  pointer to memory
 *
 * Operates on "I/O bus memory space"
 */
static inline u8 readb(const volatile void __iomem *addr)
{
	u8 val;
	asm volatile(
		"%0 = memb(%1);"
		: "=&r" (val)
		: "r" (addr)
	);
	return val;
}

static inline u16 readw(const volatile void __iomem *addr)
{
	u16 val;
	asm volatile(
		"%0 = memh(%1);"
		: "=&r" (val)
		: "r" (addr)
	);
	return val;
}

static inline u32 readl(const volatile void __iomem *addr)
{
	u32 val;
	asm volatile(
		"%0 = memw(%1);"
		: "=&r" (val)
		: "r" (addr)
	);
	return val;
}

/*
 * writeb - write a byte to a memory location
 * @data: data to write to
 * @addr:  pointer to memory
 *
 */
static inline void writeb(u8 data, volatile void __iomem *addr)
{
	asm volatile(
		"memb(%0) = %1;"
		:
		: "r" (addr), "r" (data)
		: "memory"
	);
}

static inline void writew(u16 data, volatile void __iomem *addr)
{
	asm volatile(
		"memh(%0) = %1;"
		:
		: "r" (addr), "r" (data)
		: "memory"
	);

}

static inline void writel(u32 data, volatile void __iomem *addr)
{
	asm volatile(
		"memw(%0) = %1;"
		:
		: "r" (addr), "r" (data)
		: "memory"
	);
}

#define __raw_writeb writeb
#define __raw_writew writew
#define __raw_writel writel

#define __raw_readb readb
#define __raw_readw readw
#define __raw_readl readl

/*
 * http://comments.gmane.org/gmane.linux.ports.arm.kernel/117626
 */

#define readb_relaxed __raw_readb
#define readw_relaxed __raw_readw
#define readl_relaxed __raw_readl

#define writeb_relaxed __raw_writeb
#define writew_relaxed __raw_writew
#define writel_relaxed __raw_writel

#define mmiowb()

/*
 * Need an mtype somewhere in here, for cache type deals?
 * This is probably too long for an inline.
 */
void __iomem *ioremap_nocache(unsigned long phys_addr, unsigned long size);

static inline void __iomem *ioremap(unsigned long phys_addr, unsigned long size)
{
	return ioremap_nocache(phys_addr, size);
}

static inline void iounmap(volatile void __iomem *addr)
{
	__iounmap(addr);
}

#define __raw_writel writel

static inline void memcpy_fromio(void *dst, const volatile void __iomem *src,
	int count)
{
	memcpy(dst, (void *) src, count);
}

static inline void memcpy_toio(volatile void __iomem *dst, const void *src,
	int count)
{
	memcpy((void *) dst, src, count);
}

#define PCI_IO_ADDR	(volatile void __iomem *)

/*
 * inb - read byte from I/O port or something
 * @port:  address in I/O space
 *
 * Operates on "I/O bus I/O space"
 */
static inline u8 inb(unsigned long port)
{
	return readb(_IO_BASE + (port & IO_SPACE_LIMIT));
}

static inline u16 inw(unsigned long port)
{
	return readw(_IO_BASE + (port & IO_SPACE_LIMIT));
}

static inline u32 inl(unsigned long port)
{
	return readl(_IO_BASE + (port & IO_SPACE_LIMIT));
}

/*
 * outb - write a byte to a memory location
 * @data: data to write to
 * @addr:  address in I/O space
 */
static inline void outb(u8 data, unsigned long port)
{
	writeb(data, _IO_BASE + (port & IO_SPACE_LIMIT));
}

static inline void outw(u16 data, unsigned long port)
{
	writew(data, _IO_BASE + (port & IO_SPACE_LIMIT));
}

static inline void outl(u32 data, unsigned long port)
{
	writel(data, _IO_BASE + (port & IO_SPACE_LIMIT));
}

#define outb_p outb
#define outw_p outw
#define outl_p outl

#define inb_p inb
#define inw_p inw
#define inl_p inl

static inline void insb(unsigned long port, void *buffer, int count)
{
	if (count) {
		u8 *buf = buffer;
		do {
			u8 x = inb(port);
			*buf++ = x;
		} while (--count);
	}
}

static inline void insw(unsigned long port, void *buffer, int count)
{
	if (count) {
		u16 *buf = buffer;
		do {
			u16 x = inw(port);
			*buf++ = x;
		} while (--count);
	}
}

static inline void insl(unsigned long port, void *buffer, int count)
{
	if (count) {
		u32 *buf = buffer;
		do {
			u32 x = inw(port);
			*buf++ = x;
		} while (--count);
	}
}

static inline void outsb(unsigned long port, const void *buffer, int count)
{
	if (count) {
		const u8 *buf = buffer;
		do {
			outb(*buf++, port);
		} while (--count);
	}
}

static inline void outsw(unsigned long port, const void *buffer, int count)
{
	if (count) {
		const u16 *buf = buffer;
		do {
			outw(*buf++, port);
		} while (--count);
	}
}

static inline void outsl(unsigned long port, const void *buffer, int count)
{
	if (count) {
		const u32 *buf = buffer;
		do {
			outl(*buf++, port);
		} while (--count);
	}
}

#define flush_write_buffers() do { } while (0)

#endif /* __KERNEL__ */

#endif


text:
#include <aws/inspector/model/DescribeExclusionsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>

#include <utility>

using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;

DescribeExclusionsResult::DescribeExclusionsResult()
{
}

DescribeExclusionsResult::DescribeExclusionsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
  *this = result;
}

DescribeExclusionsResult& DescribeExclusionsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
  JsonView jsonValue = result.GetPayload().View();
  if(jsonValue.ValueExists("exclusions"))
  {
    Aws::Map<Aws::String, JsonView> exclusionsJsonMap = jsonValue.GetObject("exclusions").GetAllObjects();
    for(auto& exclusionsItem : exclusionsJsonMap)
    {
      m_exclusions[exclusionsItem.first] = exclusionsItem.second.AsObject();
    }
  }

  if(jsonValue.ValueExists("failedItems"))
  {
    Aws::Map<Aws::String, JsonView> failedItemsJsonMap = jsonValue.GetObject("failedItems").GetAllObjects();
    for(auto& failedItemsItem : failedItemsJsonMap)
    {
      m_failedItems[failedItemsItem.first] = failedItemsItem.second.AsObject();
    }
  }

  return *this;
}


text:
import pickle
import base64

from django.contrib import admin
from django.contrib.auth.models import User
from django.db import models

from oauth2client.django_orm import FlowField
from oauth2client.django_orm import CredentialsField

class CredentialsModel(models.Model):
  id = models.ForeignKey(User, primary_key=True)
  credential = CredentialsField()

class CredentialsAdmin(admin.ModelAdmin):
    pass

admin.site.register(CredentialsModel, CredentialsAdmin)


text:
<?php
/**
 * DO NOT EDIT THIS FILE!
 *
 * This file was automatically generated from external sources.
 *
 * Any manual change here will be lost the next time the SDK
 * is updated. You've been warned!
 */

namespace DTS\eBaySDK\FileTransfer\Types;

/**
 *
 * @property string $taskReferenceId
 * @property string $fileReferenceId
 */
class DownloadFileRequest extends \DTS\eBaySDK\FileTransfer\Types\BaseServiceRequest
{
    /**
     * @var array Properties belonging to objects of this class.
     */
    private static $propertyTypes = [
        'taskReferenceId' => [
            'type' => 'string',
            'repeatable' => false,
            'attribute' => false,
            'elementName' => 'taskReferenceId'
        ],
        'fileReferenceId' => [
            'type' => 'string',
            'repeatable' => false,
            'attribute' => false,
            'elementName' => 'fileReferenceId'
        ]
    ];

    /**
     * @param array $values Optional properties and values to assign to the object.
     */
    public function __construct(array $values = [])
    {
        list($parentValues, $childValues) = self::getParentValues(self::$propertyTypes, $values);

        parent::__construct($parentValues);

        if (!array_key_exists(__CLASS__, self::$properties)) {
            self::$properties[__CLASS__] = array_merge(self::$properties[get_parent_class()], self::$propertyTypes);
        }

        if (!array_key_exists(__CLASS__, self::$xmlNamespaces)) {
            self::$xmlNamespaces[__CLASS__] = 'xmlns="http://www.ebay.com/marketplace/services"';
        }

        if (!array_key_exists(__CLASS__, self::$requestXmlRootElementNames)) {
            self::$requestXmlRootElementNames[__CLASS__] = 'downloadFileRequest';
        }

        $this->setValues(__CLASS__, $childValues);
    }
}


text:
/* eslint-disable */

'use strict';

/*::
import type { ConcreteRequest, Query } from 'relay-runtime';
type UserNamePassthroughResolver$key = any;
import userNamePassthroughResolver from "../resolvers/UserNamePassthroughResolver.js";
// Type assertion validating that `userNamePassthroughResolver` resolver is correctly implemented.
// A type error here indicates that the type signature of the resolver module is incorrect.
(userNamePassthroughResolver: (
  rootKey: UserNamePassthroughResolver$key,
) => mixed);
export type RelayReaderResolverTest8Query$variables = {||};
export type RelayReaderResolverTest8Query$data = {|
  +me: ?{|
    +name_passthrough: $NonMaybeType<$Call<<R>((...empty[]) => R) => R, typeof userNamePassthroughResolver>>,
  |},
|};
export type RelayReaderResolverTest8Query = {|
  response: RelayReaderResolverTest8Query$data,
  variables: RelayReaderResolverTest8Query$variables,
|};
*/

var node/*: ConcreteRequest*/ = {
  "fragment": {
    "argumentDefinitions": [],
    "kind": "Fragment",
    "metadata": null,
    "name": "RelayReaderResolverTest8Query",
    "selections": [
      {
        "alias": null,
        "args": null,
        "concreteType": "User",
        "kind": "LinkedField",
        "name": "me",
        "plural": false,
        "selections": [
          {
            "kind": "RequiredField",
            "field": {
              "alias": null,
              "args": null,
              "fragment": {
                "args": null,
                "kind": "FragmentSpread",
                "name": "UserNamePassthroughResolver"
              },
              "kind": "RelayResolver",
              "name": "name_passthrough",
              "resolverModule": require('./../resolvers/UserNamePassthroughResolver.js'),
              "path": "me.name_passthrough"
            },
            "action": "NONE",
            "path": "me.name_passthrough"
          }
        ],
        "storageKey": null
      }
    ],
    "type": "Query",
    "abstractKey": null
  },
  "kind": "Request",
  "operation": {
    "argumentDefinitions": [],
    "kind": "Operation",
    "name": "RelayReaderResolverTest8Query",
    "selections": [
      {
        "alias": null,
        "args": null,
        "concreteType": "User",
        "kind": "LinkedField",
        "name": "me",
        "plural": false,
        "selections": [
          {
            "alias": null,
            "args": null,
            "kind": "ScalarField",
            "name": "name",
            "storageKey": null
          },
          {
            "alias": null,
            "args": null,
            "kind": "ScalarField",
            "name": "id",
            "storageKey": null
          }
        ],
        "storageKey": null
      }
    ]
  },
  "params": {
    "cacheID": "47b9f85bc1a62cf43538c22f5e2d8d93",
    "id": null,
    "metadata": {},
    "name": "RelayReaderResolverTest8Query",
    "operationKind": "query",
    "text": "query RelayReaderResolverTest8Query {\n  me {\n    ...UserNamePassthroughResolver\n    id\n  }\n}\n\nfragment UserNamePassthroughResolver on User {\n  name\n}\n"
  }
};

if (__DEV__) {
  (node/*: any*/).hash = "29f98fc496994fd02e276e0c65235467";
}

module.exports = ((node/*: any*/)/*: Query<
  RelayReaderResolverTest8Query$variables,
  RelayReaderResolverTest8Query$data,
>*/);


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

/**
 * 版权所有 All Rights Reserved
 *
 * @author Irving_Zhou
 * @description 数据库配置
 * @date 2013年8月17日 17:47:32
 * @version 1.0.0
 * @email zhouyongtao@outlook.com
 * @blog http://www.cnblogs.com/Irving/
 * @refer
 */
namespace Homeinns.Common.Util
{
    /// <summary>
    /// DB配置
    /// </summary>
    public class DBSetting
    {

        /// <summary>
        /// Hominns 默认数据库配置(38)
        /// </summary>
        public static string Hominns
        {
            get { return System.Configuration.ConfigurationManager.ConnectionStrings["Hominns"].ConnectionString; }
        }

        /// <summary>
        /// 地图信息(38)
        /// </summary>
        public static string Mapbar
        {
            get { return System.Configuration.ConfigurationManager.ConnectionStrings["Mapbar"].ConnectionString; }
        }

        /// <summary>
        /// bbs(136)
        /// </summary>
        public static string BBS
        {
            get { return System.Configuration.ConfigurationManager.ConnectionStrings["BBS"].ConnectionString; }
        }

        /// <summary>
        /// CMS数据库
        /// </summary>
        public static string CMS
        {
            get { return System.Configuration.ConfigurationManager.ConnectionStrings["CMS"].ConnectionString; }
        }

        /// <summary>
        /// Motel 默认数据库配置
        /// </summary>
        public static string Motel
        {
            get { return System.Configuration.ConfigurationManager.ConnectionStrings["Motel"].ConnectionString; }
        }

        /// <summary>
        /// Trans 默认数据库配置(直连酒店数据 订单冲账)
        /// </summary>
        public static string HomeinnsTrans
        {
            get { return System.Configuration.ConfigurationManager.ConnectionStrings["HomeinnsTrans"].ConnectionString; }
        }

        /// <summary>
        /// Trans 默认数据库配置(直连酒店数据 订单冲账)
        /// </summary>
        public static string MotelTrans
        {
            get { return System.Configuration.ConfigurationManager.ConnectionStrings["MotelTrans"].ConnectionString; }
        }

        /// <summary>
        /// Log 默认数据库配置(接口日志)
        /// </summary>
        public static string Log
        {
            get { return System.Configuration.ConfigurationManager.ConnectionStrings["Log"].ConnectionString; }
        }

        /// <summary>
        /// Task 默认数据库配置(暂时没有用)
        /// </summary>
        public static string Task
        {
            get { return System.Configuration.ConfigurationManager.ConnectionStrings["Task"].ConnectionString; }
        }

        /// <summary>
        /// Member 默认数据库配置(联系人)
        /// </summary>
        public static string Member
        {
            get { return System.Configuration.ConfigurationManager.ConnectionStrings["Member"].ConnectionString; }
        }

        /// <summary>
        /// Member 默认数据库配置(房态与价格)
        /// </summary>
        public static string PriceAndRmFlow
        {
            get { return System.Configuration.ConfigurationManager.ConnectionStrings["PriceAndRmFlow"].ConnectionString; }
        }

        /// <summary>
        /// 深度点评
        /// </summary>
        public static string Comment
        {
            get { return System.Configuration.ConfigurationManager.ConnectionStrings["Comment"].ConnectionString; }
        }

        /// <summary>
        /// 客史
        /// </summary>
        public static string TransHis
        {
            get { return System.Configuration.ConfigurationManager.ConnectionStrings["TransHis"].ConnectionString; }
        }

        public static string HCS
        {
            get { return System.Configuration.ConfigurationManager.ConnectionStrings["HCS"].ConnectionString; }
        }

        /// <summary>
        /// 获取164配置字符串
        /// </summary>
        public static string Mysql
        {
            get { return System.Configuration.ConfigurationManager.ConnectionStrings["Mysql"].ConnectionString; }
        }

        /// <summary>
        /// 获取DB配置字符串
        /// </summary>
        public static string getConText(string conText)
        {
            return System.Configuration.ConfigurationManager.ConnectionStrings[conText].ConnectionString;
        }

        /// <summary>
        /// 获取AppSettings配置字符串
        /// </summary>
        public static string getAppText(string appName)
        {
            return System.Configuration.ConfigurationManager.AppSettings[appName];
        }

        #region 其他配置
        /// <summary>
        /// 获取DB配置字符串
        /// </summary>
        public static string ConManagerText
        {
            get { return System.Web.Configuration.WebConfigurationManager.ConnectionStrings["ConText"].ConnectionString; }
        }

        /// <summary>
        /// 获取DB配置字符串
        /// </summary>
        public static string ConDBText(string conText, params object[] args)
        {
            if (args == null || args.Length == 0)
                return System.Configuration.ConfigurationManager.AppSettings[conText];
            else
                return System.Configuration.ConfigurationManager.ConnectionStrings[conText].ConnectionString;
        }
        #endregion

        #region 本地Debug
#if DEBUG
        /// <summary>
        /// Debug
        /// </summary>
        public static string Debug
        {
            get { return "Data Source=.;Initial Catalog=CRS;User ID=sa;Password=123"; }
        }
#endif
        #endregion
    }
}


text:
package com.github.axelandre42.schooldoc.core.api.docs.drawing;

import java.awt.Color;
import java.awt.Point;
import java.util.ArrayList;
import java.util.List;

public class LineData {

	private Color c = Color.BLACK;

	private List<Point> p = new ArrayList<Point>();

	public Color getColor() {
		return c;
	}

	public List<Point> getPoints() {
		return p;
	}

	public void setColor(Color c) {
		this.c = c;
	}

	public void addPoint(Point p) {
		this.p.add(p);
	}

}


text:
<?php

namespace swl\core\types;

/**
 * @author schivei
 */
abstract class Struct
{

    protected abstract function regConstructor();
}


text:
using System.Collections.Generic;

namespace Azure.Analytics.Synapse.Artifacts.Models
{
    /// <summary> A copy activity Common Data Service for Apps sink. </summary>
    public partial class CommonDataServiceForAppsSink : CopySink
    {
        /// <summary> Initializes a new instance of CommonDataServiceForAppsSink. </summary>
        /// <param name="writeBehavior"> The write behavior for the operation. </param>
        public CommonDataServiceForAppsSink(DynamicsSinkWriteBehavior writeBehavior)
        {
            WriteBehavior = writeBehavior;
            Type = "CommonDataServiceForAppsSink";
        }

        /// <summary> Initializes a new instance of CommonDataServiceForAppsSink. </summary>
        /// <param name="type"> Copy sink type. </param>
        /// <param name="writeBatchSize"> Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. </param>
        /// <param name="writeBatchTimeout"> Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). </param>
        /// <param name="sinkRetryCount"> Sink retry count. Type: integer (or Expression with resultType integer). </param>
        /// <param name="sinkRetryWait"> Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). </param>
        /// <param name="maxConcurrentConnections"> The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). </param>
        /// <param name="additionalProperties"> . </param>
        /// <param name="writeBehavior"> The write behavior for the operation. </param>
        /// <param name="ignoreNullValues"> The flag indicating whether to ignore null values from input dataset (except key fields) during write operation. Default is false. Type: boolean (or Expression with resultType boolean). </param>
        /// <param name="alternateKeyName"> The logical name of the alternate key which will be used when upserting records. Type: string (or Expression with resultType string). </param>
        internal CommonDataServiceForAppsSink(string type, object writeBatchSize, object writeBatchTimeout, object sinkRetryCount, object sinkRetryWait, object maxConcurrentConnections, IDictionary<string, object> additionalProperties, DynamicsSinkWriteBehavior writeBehavior, object ignoreNullValues, object alternateKeyName) : base(type, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, additionalProperties)
        {
            WriteBehavior = writeBehavior;
            IgnoreNullValues = ignoreNullValues;
            AlternateKeyName = alternateKeyName;
            Type = type ?? "CommonDataServiceForAppsSink";
        }

        /// <summary> The write behavior for the operation. </summary>
        public DynamicsSinkWriteBehavior WriteBehavior { get; set; }
        /// <summary> The flag indicating whether to ignore null values from input dataset (except key fields) during write operation. Default is false. Type: boolean (or Expression with resultType boolean). </summary>
        public object IgnoreNullValues { get; set; }
        /// <summary> The logical name of the alternate key which will be used when upserting records. Type: string (or Expression with resultType string). </summary>
        public object AlternateKeyName { get; set; }
    }
}


text:
/* 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.
 */
package org.flowable.rest.service.api.management;

import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson;
import static org.assertj.core.api.Assertions.assertThat;

import java.util.Map;

import org.apache.http.HttpStatus;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.flowable.rest.service.BaseSpringRestTestCase;
import org.flowable.rest.service.api.RestUrls;
import org.junit.Test;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ObjectNode;

/**
 * Test for all REST-operations related to the Table collection and a single table resource.
 *
 * @author Frederik Heremans
 */
public class TableResourceTest extends BaseSpringRestTestCase {

    /**
     * Test getting tables. GET management/tables
     */
    @Test
    public void testGetTables() throws Exception {
        Map<String, Long> tableCounts = managementService.getTableCount();

        CloseableHttpResponse response = executeRequest(new HttpGet(SERVER_URL_PREFIX + RestUrls.createRelativeResourceUrl(RestUrls.URL_TABLES_COLLECTION)),
                HttpStatus.SC_OK);

        // Check table array
        JsonNode responseNode = objectMapper.readTree(response.getEntity().getContent());
        closeResponse(response);
        assertThat(responseNode).isNotNull();
        assertThat(responseNode.isArray()).isTrue();
        assertThat(responseNode).hasSize(tableCounts.size());

        for (int i = 0; i < responseNode.size(); i++) {
            ObjectNode table = (ObjectNode) responseNode.get(i);
            assertThat(table.get("name").textValue()).isNotNull();
            assertThat(table.get("count").longValue()).isNotNull();
            assertThat(table.get("url").textValue().endsWith(RestUrls.createRelativeResourceUrl(RestUrls.URL_TABLE, table.get("name").textValue()))).isTrue();
            assertThat(table.get("count").longValue()).isEqualTo(tableCounts.get(table.get("name").textValue()).longValue());
        }
    }

    /**
     * Test getting a single table. GET management/tables/{tableName}
     */
    @Test
    public void testGetTable() throws Exception {
        Map<String, Long> tableCounts = managementService.getTableCount();

        String tableNameToGet = tableCounts.keySet().iterator().next();

        CloseableHttpResponse response = executeRequest(new HttpGet(SERVER_URL_PREFIX + RestUrls.createRelativeResourceUrl(RestUrls.URL_TABLE, tableNameToGet)),
                HttpStatus.SC_OK);

        // Check table
        JsonNode responseNode = objectMapper.readTree(response.getEntity().getContent());
        closeResponse(response);
        assertThat(responseNode).isNotNull();
        assertThatJson(responseNode)
                .isEqualTo("{"
                        + "name: '" + tableNameToGet + "',"
                        + "count: " + tableCounts.get(tableNameToGet) + ","
                        + "url: '" + SERVER_URL_PREFIX + RestUrls.createRelativeResourceUrl(RestUrls.URL_TABLE, tableNameToGet) + "'"
                        + "}");
    }

    @Test
    public void testGetUnexistingTable() throws Exception {
        closeResponse(executeRequest(new HttpGet(SERVER_URL_PREFIX + RestUrls.createRelativeResourceUrl(RestUrls.URL_TABLE, "unexisting")), HttpStatus.SC_NOT_FOUND));
    }
}


text:
PROMPT Gives a success when comparing values of identical cursors
--Arrange
declare
  l_actual   SYS_REFCURSOR;
  l_expected SYS_REFCURSOR;
  l_result   integer;
begin
--Act
  open l_actual for select * from user_objects where rownum <=4;
  open l_expected for select * from user_objects where rownum <=4;
  ut.expect(l_actual).to_equal(l_expected);
  l_result :=  ut_assert_processor.get_aggregate_asserts_result();
--Assert
  if nvl(:test_result, ut_utils.tr_success) = ut_utils.tr_success and l_result = ut_utils.tr_success then
    :test_result := ut_utils.tr_success;
  else
    dbms_output.put_line('expected: '''||ut_utils.tr_success||''', got: '''||l_result||'''' );
  end if;
end;
/


text:
/* A Bison parser, made by GNU Bison 3.0.2.  */

/* Bison interface for Yacc-like parsers in C

   Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.

   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

/* As a special exception, you may create a larger work that contains
   part or all of the Bison parser skeleton and distribute that work
   under terms of your choice, so long as that work isn't itself a
   parser generator using the skeleton or a modified version thereof
   as a parser skeleton.  Alternatively, if you modify or redistribute
   the parser skeleton itself, you may (at your option) remove this
   special exception, which will cause the skeleton and the resulting
   Bison output files to be licensed under the GNU General Public
   License without this special exception.

   This special exception was added by the Free Software Foundation in
   version 2.2 of Bison.  */

#ifndef YY_YY_Y_TAB_H_INCLUDED
# define YY_YY_Y_TAB_H_INCLUDED
/* Debug traces.  */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int yydebug;
#endif

/* Token type.  */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
  enum yytokentype
  {
    ID = 258,
    HBLOCK = 259,
    POUND = 260,
    STRING = 261,
    WSTRING = 262,
    INCLUDE = 263,
    IMPORT = 264,
    INSERT = 265,
    CHARCONST = 266,
    WCHARCONST = 267,
    NUM_INT = 268,
    NUM_FLOAT = 269,
    NUM_UNSIGNED = 270,
    NUM_LONG = 271,
    NUM_ULONG = 272,
    NUM_LONGLONG = 273,
    NUM_ULONGLONG = 274,
    NUM_BOOL = 275,
    TYPEDEF = 276,
    TYPE_INT = 277,
    TYPE_UNSIGNED = 278,
    TYPE_SHORT = 279,
    TYPE_LONG = 280,
    TYPE_FLOAT = 281,
    TYPE_DOUBLE = 282,
    TYPE_CHAR = 283,
    TYPE_WCHAR = 284,
    TYPE_VOID = 285,
    TYPE_SIGNED = 286,
    TYPE_BOOL = 287,
    TYPE_COMPLEX = 288,
    TYPE_TYPEDEF = 289,
    TYPE_RAW = 290,
    TYPE_NON_ISO_INT8 = 291,
    TYPE_NON_ISO_INT16 = 292,
    TYPE_NON_ISO_INT32 = 293,
    TYPE_NON_ISO_INT64 = 294,
    LPAREN = 295,
    RPAREN = 296,
    COMMA = 297,
    SEMI = 298,
    EXTERN = 299,
    INIT = 300,
    LBRACE = 301,
    RBRACE = 302,
    PERIOD = 303,
    CONST_QUAL = 304,
    VOLATILE = 305,
    REGISTER = 306,
    STRUCT = 307,
    UNION = 308,
    EQUAL = 309,
    SIZEOF = 310,
    MODULE = 311,
    LBRACKET = 312,
    RBRACKET = 313,
    BEGINFILE = 314,
    ENDOFFILE = 315,
    ILLEGAL = 316,
    CONSTANT = 317,
    NAME = 318,
    RENAME = 319,
    NAMEWARN = 320,
    EXTEND = 321,
    PRAGMA = 322,
    FEATURE = 323,
    VARARGS = 324,
    ENUM = 325,
    CLASS = 326,
    TYPENAME = 327,
    PRIVATE = 328,
    PUBLIC = 329,
    PROTECTED = 330,
    COLON = 331,
    STATIC = 332,
    VIRTUAL = 333,
    FRIEND = 334,
    THROW = 335,
    CATCH = 336,
    EXPLICIT = 337,
    STATIC_ASSERT = 338,
    CONSTEXPR = 339,
    THREAD_LOCAL = 340,
    DECLTYPE = 341,
    AUTO = 342,
    NOEXCEPT = 343,
    OVERRIDE = 344,
    FINAL = 345,
    USING = 346,
    NAMESPACE = 347,
    NATIVE = 348,
    INLINE = 349,
    TYPEMAP = 350,
    EXCEPT = 351,
    ECHO = 352,
    APPLY = 353,
    CLEAR = 354,
    SWIGTEMPLATE = 355,
    FRAGMENT = 356,
    WARN = 357,
    LESSTHAN = 358,
    GREATERTHAN = 359,
    DELETE_KW = 360,
    DEFAULT = 361,
    LESSTHANOREQUALTO = 362,
    GREATERTHANOREQUALTO = 363,
    EQUALTO = 364,
    NOTEQUALTO = 365,
    ARROW = 366,
    QUESTIONMARK = 367,
    TYPES = 368,
    PARMS = 369,
    NONID = 370,
    DSTAR = 371,
    DCNOT = 372,
    TEMPLATE = 373,
    OPERATOR = 374,
    CONVERSIONOPERATOR = 375,
    PARSETYPE = 376,
    PARSEPARM = 377,
    PARSEPARMS = 378,
    CAST = 379,
    LOR = 380,
    LAND = 381,
    OR = 382,
    XOR = 383,
    AND = 384,
    LSHIFT = 385,
    RSHIFT = 386,
    PLUS = 387,
    MINUS = 388,
    STAR = 389,
    SLASH = 390,
    MODULO = 391,
    UMINUS = 392,
    NOT = 393,
    LNOT = 394,
    DCOLON = 395
  };
#endif
/* Tokens.  */
#define ID 258
#define HBLOCK 259
#define POUND 260
#define STRING 261
#define WSTRING 262
#define INCLUDE 263
#define IMPORT 264
#define INSERT 265
#define CHARCONST 266
#define WCHARCONST 267
#define NUM_INT 268
#define NUM_FLOAT 269
#define NUM_UNSIGNED 270
#define NUM_LONG 271
#define NUM_ULONG 272
#define NUM_LONGLONG 273
#define NUM_ULONGLONG 274
#define NUM_BOOL 275
#define TYPEDEF 276
#define TYPE_INT 277
#define TYPE_UNSIGNED 278
#define TYPE_SHORT 279
#define TYPE_LONG 280
#define TYPE_FLOAT 281
#define TYPE_DOUBLE 282
#define TYPE_CHAR 283
#define TYPE_WCHAR 284
#define TYPE_VOID 285
#define TYPE_SIGNED 286
#define TYPE_BOOL 287
#define TYPE_COMPLEX 288
#define TYPE_TYPEDEF 289
#define TYPE_RAW 290
#define TYPE_NON_ISO_INT8 291
#define TYPE_NON_ISO_INT16 292
#define TYPE_NON_ISO_INT32 293
#define TYPE_NON_ISO_INT64 294
#define LPAREN 295
#define RPAREN 296
#define COMMA 297
#define SEMI 298
#define EXTERN 299
#define INIT 300
#define LBRACE 301
#define RBRACE 302
#define PERIOD 303
#define CONST_QUAL 304
#define VOLATILE 305
#define REGISTER 306
#define STRUCT 307
#define UNION 308
#define EQUAL 309
#define SIZEOF 310
#define MODULE 311
#define LBRACKET 312
#define RBRACKET 313
#define BEGINFILE 314
#define ENDOFFILE 315
#define ILLEGAL 316
#define CONSTANT 317
#define NAME 318
#define RENAME 319
#define NAMEWARN 320
#define EXTEND 321
#define PRAGMA 322
#define FEATURE 323
#define VARARGS 324
#define ENUM 325
#define CLASS 326
#define TYPENAME 327
#define PRIVATE 328
#define PUBLIC 329
#define PROTECTED 330
#define COLON 331
#define STATIC 332
#define VIRTUAL 333
#define FRIEND 334
#define THROW 335
#define CATCH 336
#define EXPLICIT 337
#define STATIC_ASSERT 338
#define CONSTEXPR 339
#define THREAD_LOCAL 340
#define DECLTYPE 341
#define AUTO 342
#define NOEXCEPT 343
#define OVERRIDE 344
#define FINAL 345
#define USING 346
#define NAMESPACE 347
#define NATIVE 348
#define INLINE 349
#define TYPEMAP 350
#define EXCEPT 351
#define ECHO 352
#define APPLY 353
#define CLEAR 354
#define SWIGTEMPLATE 355
#define FRAGMENT 356
#define WARN 357
#define LESSTHAN 358
#define GREATERTHAN 359
#define DELETE_KW 360
#define DEFAULT 361
#define LESSTHANOREQUALTO 362
#define GREATERTHANOREQUALTO 363
#define EQUALTO 364
#define NOTEQUALTO 365
#define ARROW 366
#define QUESTIONMARK 367
#define TYPES 368
#define PARMS 369
#define NONID 370
#define DSTAR 371
#define DCNOT 372
#define TEMPLATE 373
#define OPERATOR 374
#define CONVERSIONOPERATOR 375
#define PARSETYPE 376
#define PARSEPARM 377
#define PARSEPARMS 378
#define CAST 379
#define LOR 380
#define LAND 381
#define OR 382
#define XOR 383
#define AND 384
#define LSHIFT 385
#define RSHIFT 386
#define PLUS 387
#define MINUS 388
#define STAR 389
#define SLASH 390
#define MODULO 391
#define UMINUS 392
#define NOT 393
#define LNOT 394
#define DCOLON 395

/* Value type.  */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE YYSTYPE;
union YYSTYPE
{
#line 1307 "parser.y" /* yacc.c:1909  */

  const char  *id;
  List  *bases;
  struct Define {
    String *val;
    String *rawval;
    int     type;
    String *qualifier;
    String *bitfield;
    Parm   *throws;
    String *throwf;
    String *nexcept;
  } dtype;
  struct {
    const char *type;
    String *filename;
    int   line;
  } loc;
  struct {
    char      *id;
    SwigType  *type;
    String    *defarg;
    ParmList  *parms;
    short      have_parms;
    ParmList  *throws;
    String    *throwf;
    String    *nexcept;
  } decl;
  Parm         *tparms;
  struct {
    String     *method;
    Hash       *kwargs;
  } tmap;
  struct {
    String     *type;
    String     *us;
  } ptype;
  SwigType     *type;
  String       *str;
  Parm         *p;
  ParmList     *pl;
  int           intvalue;
  Node         *node;

#line 379 "y.tab.h" /* yacc.c:1909  */
};
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
#endif

extern YYSTYPE yylval;

int yyparse (void);

#endif /* !YY_YY_Y_TAB_H_INCLUDED  */


text:
/**
 * @param {string} before a param
 * @param {object} valueRange The data to be inserted
 * @ {string} range
 * @ {enum} majorDimension
 *     ["ROWS", "ROWS"]
 *     ["COLUMNS", "COLUMNS"]
 * @ {array} values An array of arrays, the outer array representing all the data and each inner array representing a major dimension. Each item in the inner array corresponds with one cell
 * @param {string} after a param
 * @returns {any}
 */
module.exports = async (before, valueRange, after, context) => {
  return valueRange;
};


text:
import React from 'react';
import { shallow, mount } from 'enzyme';
import { expect } from 'chai';
import Immutable from 'immutable';
import sinon from 'sinon';

// see: https://github.com/mochajs/mocha/issues/1847
const { describe, it } = global;

import Exons from '../presenter';
import Exon from '../Exon';

describe('<Exons />', () => {
  const exons = Immutable.List([
    { name: 'exon 1', positionFrom: 10, positionTo: 20 },
    { name: 'exon 2', positionFrom: 40, positionTo: 50 },
    { name: 'exon 3', positionFrom: 70, positionTo: 80 },
  ]);

  it('renders a list of exons', () => {
    const wrapper = shallow(
      <Exons
        exons={exons}
        onEditExon={() => {}}
        onRemoveExon={() => {}}
        onCreateNewExon={() => {}}
      />
    );

    expect(wrapper.find(Exon)).to.have.length(exons.size);
  });

  it('allows to create new exons', () => {
    const spy = sinon.spy();
    const wrapper = mount(
      <Exons
        exons={exons}
        onEditExon={() => {}}
        onRemoveExon={() => {}}
        onCreateNewExon={spy}
      />
    );

    wrapper.find('button.new-exon').simulate('click');
    wrapper.find('input[type="number"]').at(0).simulate('change', {
      persist: () => {},
      target: {
        value: 54,
      },
    });
    wrapper.find('input[type="number"]').at(1).simulate('change', {
      persist: () => {},
      target: {
        value: 62,
      },
    });
    wrapper.find('input[type="text"]').simulate('change', {
      persist: () => {},
      target: {
        value: 'exon 4',
      },
    });
    wrapper.find('.button.submit').simulate('click');

    expect(spy.calledOnce).to.be.true;
    expect(
      spy.calledWith({
        name: 'exon 4',
        positionFrom: 54,
        positionTo: 62,
      })
    ).to.be.true;
  });
});