text:
package org.jctools.queues;

import org.jctools.queues.atomic.MpscUnboundedAtomicArrayQueue;
import org.jctools.queues.spec.ConcurrentQueueSpec;
import org.jctools.queues.spec.Ordering;
import org.jctools.queues.unpadded.MpscUnboundedUnpaddedArrayQueue;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Queue;

import static org.jctools.util.TestUtil.makeParams;

@RunWith(Parameterized.class)
public class QueueSanityTestMpscUnboundedArray extends QueueSanityTest
{
    public QueueSanityTestMpscUnboundedArray(ConcurrentQueueSpec spec, Queue<Integer> queue)
    {
        super(spec, queue);
    }

    @Parameterized.Parameters
    public static Collection<Object[]> parameters()
    {
        ArrayList<Object[]> list = new ArrayList<Object[]>();
        list.add(makeParams(0, 1, 0, Ordering.FIFO, new MpscUnboundedArrayQueue<>(2)));// MPSC size 1
        list.add(makeParams(0, 1, 0, Ordering.FIFO, new MpscUnboundedArrayQueue<>(64)));// MPSC size SIZE
        list.add(makeParams(0, 1, 0, Ordering.FIFO, new MpscUnboundedAtomicArrayQueue<>(2)));// MPSC size 1
        list.add(makeParams(0, 1, 0, Ordering.FIFO, new MpscUnboundedAtomicArrayQueue<>(64)));// MPSC size SIZE
        list.add(makeParams(0, 1, 0, Ordering.FIFO, new MpscUnboundedUnpaddedArrayQueue<>(2)));// MPSC size 1
        list.add(makeParams(0, 1, 0, Ordering.FIFO, new MpscUnboundedUnpaddedArrayQueue<>(64)));// MPSC size SIZE
        return list;
    }
}


text:
package liquibase.changelog;

import liquibase.changelog.filter.ContextChangeSetFilter;
import liquibase.changelog.filter.DbmsChangeSetFilter;
import liquibase.changelog.visitor.ChangeSetVisitor;
import liquibase.database.Database;
import liquibase.database.core.MySQLDatabase;
import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;

import java.util.ArrayList;
import java.util.List;

public class ChangeLogIteratorTest {
    private DatabaseChangeLog changeLog;

    @Before
    public void setUp() {
        changeLog = new DatabaseChangeLog();
        changeLog.addChangeSet(new ChangeSet("1", "nvoxland", false, false, "/path/to/changelog", "test1", "mysql"));
        changeLog.addChangeSet(new ChangeSet("2", "nvoxland", false, false, "/path/to/changelog",  "test1", "oracle"));
        changeLog.addChangeSet(new ChangeSet("3", "nvoxland", false, false, "/path/to/changelog",  "test2", "mysql"));
        changeLog.addChangeSet(new ChangeSet("4", "nvoxland", false, false, "/path/to/changelog",  null, null));
        changeLog.addChangeSet(new ChangeSet("5", "nvoxland", false, false, "/path/to/changelog",  null, "mysql"));
        changeLog.addChangeSet(new ChangeSet("6", "nvoxland", false, false, "/path/to/changelog",  "test2", null));
    }

    @Test
    public void runChangeSet_emptyFiltersIterator() throws Exception {
        TestChangeSetVisitor testChangeLogVisitor = new TestChangeSetVisitor();

        ChangeLogIterator iterator = new ChangeLogIterator(changeLog);
        iterator.run(testChangeLogVisitor, null);
        assertEquals(6, testChangeLogVisitor.visitedChangeSets.size());
    }

    @Test
    public void runChangeSet_singleFilterIterator() throws Exception {
        TestChangeSetVisitor testChangeLogVisitor = new TestChangeSetVisitor();

        ChangeLogIterator iterator = new ChangeLogIterator(changeLog, new ContextChangeSetFilter("test1"));
        iterator.run(testChangeLogVisitor, null);
        assertEquals(4, testChangeLogVisitor.visitedChangeSets.size());
    }

    @Test
    public void runChangeSet_doubleFilterIterator() throws Exception {
        TestChangeSetVisitor testChangeLogVisitor = new TestChangeSetVisitor();

        ChangeLogIterator iterator = new ChangeLogIterator(changeLog, new ContextChangeSetFilter("test1"), new DbmsChangeSetFilter(new MySQLDatabase()));
        iterator.run(testChangeLogVisitor, null);
        assertEquals(3, testChangeLogVisitor.visitedChangeSets.size());
        assertEquals("1", testChangeLogVisitor.visitedChangeSets.get(0).getId());
        assertEquals("4", testChangeLogVisitor.visitedChangeSets.get(1).getId());
        assertEquals("5", testChangeLogVisitor.visitedChangeSets.get(2).getId());

    }

    @Test
    public void runChangeSet_reverseVisitor() throws Exception {
        TestChangeSetVisitor testChangeLogVisitor = new ReverseChangeSetVisitor();

        ChangeLogIterator iterator = new ChangeLogIterator(changeLog, new ContextChangeSetFilter("test1"), new DbmsChangeSetFilter(new MySQLDatabase()));
        iterator.run(testChangeLogVisitor, null);
        assertEquals(3, testChangeLogVisitor.visitedChangeSets.size());
        assertEquals("5", testChangeLogVisitor.visitedChangeSets.get(0).getId());
        assertEquals("4", testChangeLogVisitor.visitedChangeSets.get(1).getId());
        assertEquals("1", testChangeLogVisitor.visitedChangeSets.get(2).getId());
    }

    private static class TestChangeSetVisitor implements ChangeSetVisitor {

        public List<ChangeSet> visitedChangeSets = new ArrayList<ChangeSet>();

        public Direction getDirection() {
            return ChangeSetVisitor.Direction.FORWARD;
        }

        public void visit(ChangeSet changeSet, DatabaseChangeLog databaseChangeLog, Database database) {
            visitedChangeSets.add(changeSet);
        }
    }

    private static class ReverseChangeSetVisitor extends TestChangeSetVisitor {

        @Override
        public Direction getDirection() {
            return ChangeSetVisitor.Direction.REVERSE;
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
package io.lumify.core.bootstrap.lib;

import io.lumify.core.config.Configuration;
import io.lumify.core.exception.LumifyException;
import io.lumify.core.util.LumifyLogger;
import io.lumify.core.util.LumifyLoggerFactory;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.LocatedFileStatus;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.RemoteIterator;

import java.io.File;
import java.io.IOException;
import java.net.URI;
import java.security.NoSuchAlgorithmException;

public class HdfsLibCacheLoader extends LibLoader {
    private static final LumifyLogger LOGGER = LumifyLoggerFactory.getLogger(HdfsLibCacheLoader.class);

    @Override
    public void loadLibs(Configuration configuration) {
        LOGGER.info("Loading libs using %s", HdfsLibCacheLoader.class.getName());

        String hdfsLibCacheDirectory = configuration.get(Configuration.HDFS_LIB_CACHE_SOURCE_DIRECTORY, null);
        if (hdfsLibCacheDirectory == null) {
            LOGGER.warn("Skipping HDFS libcache. Configuration parameter %s not found", Configuration.HDFS_LIB_CACHE_SOURCE_DIRECTORY);
            return;
        }

        File libCacheDirectory = getLocalHdfsLibCacheDirectory(configuration);
        String hdfsLibCacheUser = getHdfsLibCacheUser(configuration);
        FileSystem hdfsFileSystem = getFileSystem(configuration, hdfsLibCacheUser);

        try {
            syncLibCache(hdfsFileSystem, new Path(hdfsLibCacheDirectory), libCacheDirectory);
        } catch (Exception ex) {
            throw new LumifyException(String.format("Could not sync HDFS libcache. %s -> %s", hdfsLibCacheDirectory, libCacheDirectory.getAbsolutePath()), ex);
        }
    }

    private File getLocalHdfsLibCacheDirectory(Configuration configuration) {
        String hdfsLibCacheTempDirectoryString = configuration.get(Configuration.HDFS_LIB_CACHE_TEMP_DIRECTORY, null);
        File libCacheDirectory = null;
        if (hdfsLibCacheTempDirectoryString == null) {
            File baseDir = new File(System.getProperty("java.io.tmpdir"));
            libCacheDirectory = new File(baseDir, "lumify-hdfslibcache");
            LOGGER.info("Configuration parameter %s was not set; defaulting local libcache dir to %s", Configuration.HDFS_LIB_CACHE_TEMP_DIRECTORY, libCacheDirectory.getAbsolutePath());
        } else {
            libCacheDirectory = new File(hdfsLibCacheTempDirectoryString);
            LOGGER.info("Using local lib cache directory: %s", libCacheDirectory.getAbsolutePath());
        }

        if (!libCacheDirectory.exists()) {
            libCacheDirectory.mkdirs();
        }

        return libCacheDirectory;
    }

    private String getHdfsLibCacheUser(Configuration configuration) {
        String hdfsLibCacheUser = configuration.get(Configuration.HDFS_LIB_CACHE_HDFS_USER, null);
        if (hdfsLibCacheUser == null) {
            hdfsLibCacheUser = "hadoop";
            LOGGER.warn("Configuration parameter %s was not set; defaulting to HDFS user '%s'.", Configuration.HDFS_LIB_CACHE_HDFS_USER, hdfsLibCacheUser);
        } else {
            LOGGER.info("Connecting to HDFS as user '%s'", hdfsLibCacheUser);
        }
        return hdfsLibCacheUser;
    }

    private FileSystem getFileSystem(Configuration configuration, String user) {
        try {
            String hdfsRootDir = configuration.get(Configuration.HADOOP_URL, null);
            if (hdfsRootDir == null) {
                throw new LumifyException("Could not find configuration: " + Configuration.HADOOP_URL);
            }
            return FileSystem.get(new URI(hdfsRootDir), configuration.toHadoopConfiguration(), user);
        } catch (Exception ex) {
            throw new LumifyException("Could not open HDFS file system.", ex);
        }
    }

    private static void syncLibCache(FileSystem fs, Path source, File destDir) throws IOException, NoSuchAlgorithmException {
        if (!fs.exists(source)) {
            throw new LumifyException(String.format("Could not sync HDFS directory %s. Directory does not exist.", source));
        }

        addFilesFromHdfs(fs, source, destDir);
    }

    private static void addFilesFromHdfs(FileSystem fs, Path source, File destDir) throws IOException, NoSuchAlgorithmException {
        LOGGER.debug("Adding files from HDFS %s -> %s", source.toString(), destDir.getAbsolutePath());
        RemoteIterator<LocatedFileStatus> hdfsFiles = fs.listFiles(source, true);
        while (hdfsFiles.hasNext()) {
            LocatedFileStatus hdfsFile = hdfsFiles.next();
            if (hdfsFile.isDirectory()) {
                continue;
            }

            File locallyCachedFile = getLocalCacheFileName(hdfsFile, destDir);
            if (locallyCachedFile.exists()) {
                LOGGER.info("HDFS file %s already cached at %s. Skipping sync.", hdfsFile.getPath().toString(), locallyCachedFile.getPath());
            } else {
                fs.copyToLocalFile(hdfsFile.getPath(), new Path(locallyCachedFile.getAbsolutePath()));
                locallyCachedFile.setLastModified(hdfsFile.getModificationTime());
                LOGGER.info("Caching HDFS file %s -> %s", hdfsFile.getPath().toString(), locallyCachedFile.getPath());
            }

            addLibFile(locallyCachedFile);
        }
    }

    private static File getLocalCacheFileName(LocatedFileStatus hdfsFile, File destdir) {
        String filename = hdfsFile.getPath().getName();
        String baseFilename = filename.substring(0, filename.lastIndexOf('.'));
        String extension = filename.substring(filename.lastIndexOf('.'));
        String cacheFilename = baseFilename + "-" + hdfsFile.getModificationTime() + extension;
        return new File(destdir, cacheFilename);
    }

}


text:
#include <assert.h>
#include <console.h>
#include <debug.h>
#include <platform.h>

/*
* Only print the output if PLAT_LOG_LEVEL_ASSERT is higher or equal to
* LOG_LEVEL_INFO, which is the default value for builds with DEBUG=1.
*/

#if PLAT_LOG_LEVEL_ASSERT >= LOG_LEVEL_VERBOSE
void __assert(const char *file, unsigned int line, const char *assertion)
{
	tf_printf("ASSERT: %s:%d:%s\n", file, line, assertion);
	console_flush();
	plat_panic_handler();
}
#elif PLAT_LOG_LEVEL_ASSERT >= LOG_LEVEL_INFO
void __assert(const char *file, unsigned int line)
{
	tf_printf("ASSERT: %s:%d\n", file, line);
	console_flush();
	plat_panic_handler();
}
#else
void __assert(void)
{
	plat_panic_handler();
}
#endif


text:
using System;
/*Write a program that reads two numbers N and K and generates
 * all the combinations of K distinct elements from the set [1..N].*/
class Distinct
{
    static void Main()
    {
        int n;
        Console.Write("N=");
        while (!int.TryParse(Console.ReadLine(), out n) || n < 0)
        {
            Console.WriteLine("Incorrect input. Please try again:");
        }
        int k;
        Console.Write("K=");
        while (!int.TryParse(Console.ReadLine(), out k) || k < 1)
        {
            Console.WriteLine("Incorrect input. Please try again:");
        }
        int[] generatorArray = new int[k];
        for (int i = 0; i < k; i++)
        {
            generatorArray[i] = i+1;
        }

        Console.Write("{");
        for (int i = 0; i < k; i++)
        {
            Console.Write("{0},", generatorArray[i]);
        }
        Console.CursorLeft--;
        Console.WriteLine("}");
        while (true)
        {
            generatorArray[k - 1]++;
            int iterator = k - 1;
            while (( iterator >= 1) &&  (generatorArray[iterator]>n-k+iterator+1) )
            {
                iterator--;
                generatorArray[iterator]++;
            }
            if (generatorArray[0] == n - k + 2)
                break;

            for (int i = iterator + 1; i < k; i++)
            {
                generatorArray[i] = generatorArray[i - 1]+1;
            }
            Console.Write("{");
            for (int i = 0; i < k; i++)
            {
                Console.Write("{0},", generatorArray[i]);
            }
            Console.CursorLeft--;
            Console.WriteLine("}");
        }

    }
}


text:
/* global */

import './common'

var ko = require('knockout')
var Model = require('./ActionGroups')
var model = new Model()

ko.applyBindings(model)


text:
<!DOCTYPE html>

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>The source code</title>
  <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />

.#{$prefix}message-box .#{$prefix}window-body {
    background-color: $messagebox-body-background-color;
    border-width: $messagebox-body-border-width;
    @if $messagebox-body-border-width != 0 {
        border-color: $messagebox-body-border-color;
        border-style: $messagebox-body-border-style;
    }
}

.#{$prefix}message-box-info,
.#{$prefix}message-box-warning,
.#{$prefix}message-box-question,
.#{$prefix}message-box-error {
    background-position: $messagebox-icon-background-position;
    background-repeat: no-repeat;
}

@if $include-rtl {
    .#{$prefix}rtl {
        &.#{$prefix}message-box-info,
        &.#{$prefix}message-box-warning,
        &.#{$prefix}message-box-question,
        &.#{$prefix}message-box-error {
            background-position: rtl-background-position($messagebox-icon-background-position)
        }
    }
}

.#{$prefix}message-box-info {
    background-image: theme-background-image('shared/icon-info');
}

.#{$prefix}message-box-warning {
    background-image: theme-background-image('shared/icon-warning');
}

.#{$prefix}message-box-question {
    background-image: theme-background-image('shared/icon-question');
}

.#{$prefix}message-box-error {
    background-image: theme-background-image('shared/icon-error');
}


text:
ParseConfig provides simple parsing of standard configuration files in the
form of `param = value`.  It also supports nested `[group]` sections.

[![Continuous Integration Status](https://secure.travis-ci.org/datafolklabs/ruby-parseconfig.png)](http://travis-ci.org/datafolklabs/ruby-parseconfig)

## Installation

```
$ gem install parseconfig
```

Gemfile

```
gem 'parseconfig'
```

## Usage

An example configuration file might look like:

```
# Example Config
param1 = value1
param2 = value2

[group1]
group1_param1 = group1_value1
group1_param2 = group1_value2

[group2]
group2_param1 = group2_value1
group2_param2 = group2_value2
```

Access it with ParseConfig:

```ruby
>> require 'parseconfig'
=> true

>> config = ParseConfig.new('/path/to/config/example.conf')
=> #<ParseConfig:0x102410908
      @config_file="example.conf",
      @groups=["group1", "group2"],
      @params={
            "param1"=>"value1"
            "param2"=>"value2",
            "group1"=>{
                "param1"=>"value1"
                "param2"=>"value2",
            },
            "group2"=>{
                "param1"=>"value1"
                "param2"=>"value2",
            },
    }>

>> config.get_params
=> ["param1", "param2", "group1", "group2"]

>> config['param1']
=> "value1"

>> config.get_groups
=> ["group1", "group2"]

>> config['group1']
=> {"group1_param1"=>"group1_value1", "group1_param2"=>"group1_value2"}

>> config['group1']['group1_param1']
=> "group1_value1"

>> file = File.open('/path/to/config/file', 'w')
=> #<File:file>

>> config.write(file)
=> []

>> file.close
=> nil

```

## License

The ParseConfig library is Open Source and distributed under the MIT license.
Please see the LICENSE file included with this software.


text:
POMDOG_SUPPRESS_WARNINGS_GENERATED_BY_STD_HEADERS_BEGIN
#include <cstdint>
POMDOG_SUPPRESS_WARNINGS_GENERATED_BY_STD_HEADERS_END

namespace pomdog {

/// Color describes a 32-bit packed RGBA color.
class POMDOG_EXPORT Color final {
public:
    std::uint8_t R;
    std::uint8_t G;
    std::uint8_t B;
    std::uint8_t A;

public:
    Color() noexcept;

    /// Constructs from unsigned integer values.
    Color(std::uint8_t r, std::uint8_t g, std::uint8_t b, std::uint8_t a) noexcept;

    explicit Color(const Vector3& vector);
    explicit Color(const Vector4& vector);

    [[nodiscard]] bool operator==(const Color&) const noexcept;
    [[nodiscard]] bool operator!=(const Color&) const noexcept;

    [[nodiscard]] Vector3 ToVector3() const noexcept;
    [[nodiscard]] Vector4 ToVector4() const noexcept;

    [[nodiscard]] std::uint32_t
    ToPackedValue() const noexcept;

    [[nodiscard]] static Color
    FromPackedValue(std::uint32_t packedValue);

    /// Returns the Color (255, 255, 255, 255).
    [[nodiscard]] static Color White() noexcept;

    /// Returns the Color (0, 0, 0, 255).
    [[nodiscard]] static Color Black() noexcept;

    /// Returns the Color (255, 0, 0, 255).
    [[nodiscard]] static Color Red() noexcept;

    /// Returns the Color (0, 255, 0, 255).
    [[nodiscard]] static Color Green() noexcept;

    /// Returns the Color (0, 0, 255, 255).
    [[nodiscard]] static Color Blue() noexcept;

    /// Returns the Color (255, 255, 0, 255).
    [[nodiscard]] static Color Yellow() noexcept;

    /// Returns the Color (100, 149 ,237, 255).
    [[nodiscard]] static Color CornflowerBlue() noexcept;

    /// Returns the Color (0, 0, 0, 0).
    [[nodiscard]] static Color TransparentBlack() noexcept;
};

} // namespace pomdog

namespace pomdog::math {

/// Multiplies a color by a scalar factor.
[[nodiscard]] Color POMDOG_EXPORT
Multiply(const Color& color, float factor);

/// Multiplies a color by another color.
[[nodiscard]] Color POMDOG_EXPORT
Multiply(const Color& source1, const Color& source2);

/// Performs a linear interpolation between two colors.
[[nodiscard]] Color POMDOG_EXPORT
Lerp(const Color& source1, const Color& source2, float amount);

/// Performs Hermite interpolation between two colors.
[[nodiscard]] Color POMDOG_EXPORT
SmoothStep(const Color& source1, const Color& source2, float amount);

} // namespace pomdog::math


text:
package io.cattle.platform.core.util;

import io.cattle.platform.archaius.util.ArchaiusUtil;
import io.cattle.platform.core.constants.NetworkConstants;
import io.cattle.platform.core.model.Instance;
import io.cattle.platform.core.model.Network;
import io.cattle.platform.object.util.DataAccessor;

import com.netflix.config.DynamicStringProperty;

public class HostnameGenerator {

    private static final DynamicStringProperty DEFAULT_DOMAIN = ArchaiusUtil.getString("default.network.domain");
    private static final DynamicStringProperty DEFAULT_PREFIX = ArchaiusUtil.getString("default.hostname.prefix");

    private static final DynamicStringProperty DEFAULT_LOCAL_DOMAIN = ArchaiusUtil.getString("default.local.network.domain");
    private static final DynamicStringProperty DEFAULT_LOCAL_PREFIX = ArchaiusUtil.getString("default.local.hostname.prefix");

    private static final DynamicStringProperty DEFAULT_SERVICES_DOMAIN = ArchaiusUtil.getString("default.services.domain");

    public static String getDefaultDomain(boolean local) {
        return local ? DEFAULT_LOCAL_DOMAIN.get() : DEFAULT_DOMAIN.get();
    }

    public static String getDefaultPrefix(boolean local) {
        return local ? DEFAULT_LOCAL_PREFIX.get() : DEFAULT_PREFIX.get();
    }

    public static String getDefaultServicesDomain() {
        return DEFAULT_SERVICES_DOMAIN.get();
    }

    public static String getServicesDomain(Network network) {
        String servicesDomain = DataAccessor.fieldString(network, NetworkConstants.FIELD_SERVICES_DOMAIN);
        return servicesDomain == null ? getDefaultServicesDomain() : servicesDomain;
    }

    public static String lookup(boolean local, Instance instance, String address, Network network) {
        return lookup(local, instance.getHostname(), instance.getDomain(), address, network.getDomain());
    }

    public static String lookupHostname(boolean local, String instanceHostname, String address) {
        String hostname = local ? instanceHostname : null;

        String prefix = getDefaultPrefix(local);

        if ( hostname == null ) {
            if ( address == null ) {
                return null;
            }

            return String.format("%s%s", prefix, address.replaceAll("[.:]", "-"));
        } else {
            return hostname;
        }
    }

    public static String lookup(boolean local, String instanceHostname, String instanceDomain, String address, String networkDomain) {
        String hostname = lookupHostname(local, instanceHostname, address);
        if ( hostname == null ) {
            return null;
        }

        String domain = local ? instanceDomain : null;
        if ( domain == null && local ) {
            domain = networkDomain;
        }

        if ( domain == null ) {
            domain = getDefaultDomain(local);
        }

        return String.format("%s.%s", hostname, domain);
    }

}


text:
namespace Task01.ConsoleWriter
{
    /// <summary>
    /// Task 1. class_123 in C#
    /// StyleCop settings: disabled: Documentation Rules
    /// </summary>
    public class EntryPoint
    {
        public static void Main()
        {
            var writer = new Task01.ConsoleWriter.ConsoleVariableWriter();
            writer.WriteBooleanToTheConsole(true);
        }
    }
}


text:
package org.eclipse.php.internal.core.codeassist.templates.contexts;

import org.eclipse.php.internal.core.codeassist.contexts.GlobalMethodStatementContext;

/**
 * This context represents state when staying in a method top level statement.
 *

 * Examples:
 *
 *

 *  1. |
 *  2. pri|
 *  3. $v|
 *  etc...
 *

 *
 * @author zhaozw
 */
public final class GlobalMethodStatementContextForTemplate extends GlobalMethodStatementContext {
}


text:
(function() {
  var Lexer, Parser, rt;

  rt = require('./runtime');

  Lexer = require('./lexer');

  Parser = (function() {
    function Parser(lexer) {
      this.lexer = lexer;
    }

    Parser.prototype.parseExpList = function() {
      var e, result;
      result = [];
      while ((e = this.parseExpression()) != null) {
        result.push(e);
      }
      return result;
    };

    Parser.prototype.parseExpression = function() {
      var r, res;
      r = this.lexer.next();
      switch (r) {
        case Lexer.T_LPAREN:
          return this.parseExpList();
        case Lexer.T_LBRACKET:
          res = this.parseExpList();
          res.unshift(rt.identifier('array'));
          return res;
        case Lexer.T_ID:
          if (this.lexer.lexeme === 'false') {
            return false;
          } else if (this.lexer.lexeme === 'true') {
            return true;
          } else {
            return res = rt.identifier(this.lexer.lexeme);
          }
          break;
        case Lexer.T_STRING:
          return this.lexer.lexeme;
        case Lexer.T_NUMBER:
          return parseFloat(this.lexer.lexeme);
        default:
          return null;
      }
    };

    Parser.prototype.parse = function() {
      return this.parseExpression();
    };

    return Parser;

  })();

  module.exports = Parser;

}).call(this);


text:
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: >
    The Date.prototype.valueOf property "length" has { ReadOnly, DontDelete,
    DontEnum } attributes
es5id: 15.9.5.8_A3_T1
description: Checking ReadOnly attribute
---*/

x = Date.prototype.valueOf.length;
Date.prototype.valueOf.length = 1;
if (Date.prototype.valueOf.length !== x) {
  $ERROR('#1: The Date.prototype.valueOf.length has the attribute ReadOnly');
}


text:
/**
 * Created by Huy on 16/01/2015.
 *
 * TODO: improve the situation
 * TODO: when the mouse is released outside the canvas.
 */

// region Global Variables......................................................

var canvas = document.getElementById('canvas'),
    divRubberband = document.getElementById('divRubberband'),
    buttonReset = document.getElementById('buttonReset'),
    ctx = canvas.getContext('2d'),
    cWidth = canvas.width,
    cHeight = canvas.height,
    image = new Image(),
    mousedown = {},
    rubberbandRectangle = {},
    dragging = false;

// endregion

// region Initialzation.........................................................

image.src = "./arch.png";
resetRubberbandRectangle();

// endregion

// region Event Handlers........................................................

window.onmousemove = function (event) {
    event.preventDefault();

    if (dragging) {
        stretchRubberband(event.clientX, event.clientY);
    }
};

window.onmouseup = function (event) {
    event.preventDefault();
    endRubberband();
};

canvas.onmousedown = function (event) {
    event.preventDefault();
    startRubberband(event.clientX, event.clientY);
};

buttonReset.onclick = function (event) {
    ctx.clearRect(0, 0, cWidth, cHeight);
    ctx.drawImage(image, 0, 0, cWidth, cHeight);
};

image.onload = function (event) {
    ctx.drawImage(image, 0, 0, cWidth, cHeight);
};

// endregion

// region Functions.............................................................

/**
 * Starts the process of selecting the rubberband rectangle
 * @param x the x-coordinate of the first point of the rectangle
 * @param y the y-coordinate of the first point of the rectangle
 */
function startRubberband(x, y) {
    mousedown.x = x;
    mousedown.y = y;

    rubberbandRectangle.left = x;
    rubberbandRectangle.top = y;

    moveDivRubberband();
    showDivRubberband();

    dragging = true;
}

/**
 * Continues the process of selecting the rubberband rectangle
 * @param x the x-coordinate of the last point of the rectangle
 * @param y the y-coordinate of the last point of the rectangle
 */
function stretchRubberband(x, y) {
    rubberbandRectangle.left = Math.min(x, mousedown.x);
    rubberbandRectangle.top = Math.min(y, mousedown.y);

    rubberbandRectangle.width = Math.abs(x - mousedown.x);
    rubberbandRectangle.height = Math.abs(y - mousedown.y);

    moveDivRubberband();
    resizeDivRubberband();
}

/**
 * Ends the process of selecting the rubberband rectangle
 */
function endRubberband() {
    var bbox = canvas.getBoundingClientRect();

    try {
        ctx.drawImage(canvas,
            rubberbandRectangle.left - bbox.left,
            rubberbandRectangle.top - bbox.top,
            rubberbandRectangle.width,
            rubberbandRectangle.height,
            0, 0, cWidth, cHeight);
    } catch (error) {
        // The mouse is released outside the canvas
    }

    resetRubberbandRectangle();

    divRubberband.style.width = 0;
    divRubberband.style.height = 0;

    hideRubberbandDiv();

    dragging = false;
}

/**
 *
 */
function moveDivRubberband() {
    divRubberband.style.left = rubberbandRectangle.left + 'px';
    divRubberband.style.top = rubberbandRectangle.top + 'px';
}

/**
 *
 */
function resizeDivRubberband() {
    divRubberband.style.width  = rubberbandRectangle.width  + 'px';
    divRubberband.style.height = rubberbandRectangle.height + 'px';
}

/**
 * Makes the div rubberband visible
 */
function showDivRubberband() {
    divRubberband.style.display = 'inline';
}

/**
 *
 */
function hideRubberbandDiv() {
    divRubberband.style.display = 'none';
}

/**
 *
 */
function resetRubberbandRectangle() {
    rubberbandRectangle = { top: 0, left: 0, width: 0, height: 0 };
}

// endregion


text:
<?php

/**
 * Check PHP configuration.
 */
foreach (array('function_exists', 'version_compare', 'extension_loaded', 'ini_get') as $function) {
	if (!function_exists($function)) {
		die("Error: function '$function' is required by Nette Framework and this Requirements Checker.");
	}
}

/**
 * Check assets folder, template file must be readable
 */
define('TEMPLATE_FILE', __DIR__ . '/assets/checker.phtml');
if (!is_readable(TEMPLATE_FILE)) {
	die("Error: template file is not readable. Check assets folder (part of distribution), it should be present, readable and contain readable template file.");
}

/**
 * Check Nette Framework requirements.
 */
define('CHECKER_VERSION', '1.5');

$tests[] = array(
	'title' => 'Web server',
	'message' => $_SERVER['SERVER_SOFTWARE'],
);

$tests[] = array(
	'title' => 'PHP version',
	'required' => TRUE,
	'passed' => version_compare(PHP_VERSION, '5.3.0', '>='),
	'message' => PHP_VERSION,
	'description' => 'Your PHP version is too old. Nette Framework requires at least PHP 5.3.0 or higher.',
);

$tests[] = array(
	'title' => 'Memory limit',
	'message' => ini_get('memory_limit'),
);

$tests['hf'] = array(
	'title' => '.htaccess file protection',
	'required' => FALSE,
	'description' => 'File protection by .htaccess is not present. You must be careful to put files into document_root folder.',
	'script' => ' ',
);

$tests['hr'] = array(
	'title' => '.htaccess mod_rewrite',
	'required' => FALSE,
	'description' => 'Mod_rewrite is probably not present. You will not be able to use Cool URL.',
	'script' => ' ',
);

$tests[] = array(
	'title' => 'Function ini_set()',
	'required' => FALSE,
	'passed' => function_exists('ini_set'),
	'description' => 'Function ini_set() is disabled. Some parts of Nette Framework may not work properly.',
);

$tests[] = array(
	'title' => 'Function error_reporting()',
	'required' => TRUE,
	'passed' => function_exists('error_reporting'),
	'description' => 'Function error_reporting() is disabled. Nette Framework requires this to be enabled.',
);

$tests[] = array(
	'title' => 'Function flock()',
	'required' => TRUE,
	'passed' => flock(fopen(__FILE__, 'r'), LOCK_SH),
	'description' => 'Function flock() is not supported on this filesystem. Nette Framework requires this to process atomic file operations.',
);

$tests[] = array(
	'title' => 'Register_globals',
	'required' => TRUE,
	'passed' => !iniFlag('register_globals'),
	'message' => 'Disabled',
	'errorMessage' => 'Enabled',
	'description' => 'Configuration directive register_globals is enabled. Nette Framework requires this to be disabled.',
);

$tests[] = array(
	'title' => 'Zend.ze1_compatibility_mode',
	'required' => TRUE,
	'passed' => !iniFlag('zend.ze1_compatibility_mode'),
	'message' => 'Disabled',
	'errorMessage' => 'Enabled',
	'description' => 'Configuration directive zend.ze1_compatibility_mode is enabled. Nette Framework requires this to be disabled.',
);

$tests[] = array(
	'title' => 'Variables_order',
	'required' => TRUE,
	'passed' => strpos(ini_get('variables_order'), 'G') !== FALSE && strpos(ini_get('variables_order'), 'P') !== FALSE && strpos(ini_get('variables_order'), 'C') !== FALSE,
	'description' => 'Configuration directive variables_order is missing. Nette Framework requires this to be set.',
);

$tests[] = array(
	'title' => 'Session auto-start',
	'required' => FALSE,
	'passed' => session_id() === '' && !defined('SID'),
	'description' => 'Session auto-start is enabled. Nette Framework recommends not to use this directive for security reasons.',
);

$tests[] = array(
	'title' => 'Reflection extension',
	'required' => TRUE,
	'passed' => class_exists('ReflectionFunction'),
	'description' => 'Reflection extension is required.',
);

$tests[] = array(
	'title' => 'SPL extension',
	'required' => TRUE,
	'passed' => extension_loaded('SPL'),
	'description' => 'SPL extension is required.',
);

$tests[] = array(
	'title' => 'PCRE extension',
	'required' => TRUE,
	'passed' => extension_loaded('pcre') && @preg_match('/pcre/u', 'pcre'),
	'message' => 'Enabled and works properly',
	'errorMessage' => 'Disabled or without UTF-8 support',
	'description' => 'PCRE extension is required and must support UTF-8.',
);

$tests[] = array(
	'title' => 'ICONV extension',
	'required' => TRUE,
	'passed' => extension_loaded('iconv') && (ICONV_IMPL !== 'unknown') && @iconv('UTF-16', 'UTF-8//IGNORE', iconv('UTF-8', 'UTF-16//IGNORE', 'test')) === 'test',
	'message' => 'Enabled and works properly',
	'errorMessage' => 'Disabled or does not work properly',
	'description' => 'ICONV extension is required and must work properly.',
);

$tests[] = array(
	'title' => 'PHP tokenizer',
	'required' => TRUE,
	'passed' => extension_loaded('tokenizer'),
	'description' => 'PHP tokenizer is required.',
);

$tests[] = array(
	'title' => 'PDO extension',
	'required' => TRUE,
	'passed' => $pdo = extension_loaded('pdo') && array_search( 'sqlite', PDO::getAvailableDrivers()),
	'message' => $pdo ? 'Available drivers: ' . implode(' ', PDO::getAvailableDrivers()) : NULL,
	'description' => 'PDO extension or PDO drivers are absent. You will not be able to use Nette\Database.',
);

$tests[] = array(
	'title' => 'Multibyte String extension',
	'required' => FALSE,
	'passed' => extension_loaded('mbstring'),
	'description' => 'Multibyte String extension is absent. Some internationalization components may not work properly.',
);

$tests[] = array(
	'title' => 'Multibyte String function overloading',
	'required' => TRUE,
	'passed' => !extension_loaded('mbstring') || !(mb_get_info('func_overload') & 2),
	'message' => 'Disabled',
	'errorMessage' => 'Enabled',
	'description' => 'Multibyte String function overloading is enabled. Nette Framework requires this to be disabled. If it is enabled, some string function may not work properly.',
);

/*5.2*
$tests[] = array(
	'title' => 'HTTP extension',
	'required' => FALSE,
	'passed' => !extension_loaded('http'),
	'message' => 'Disabled',
	'errorMessage' => 'Enabled',
	'description' => 'HTTP extension has naming conflict with Nette Framework. You have to disable this extension or use "prefixed" version.',
);*/

$tests[] = array(
	'title' => 'HTTP_HOST or SERVER_NAME',
	'required' => TRUE,
	'passed' => isset($_SERVER["HTTP_HOST"]) || isset($_SERVER["SERVER_NAME"]),
	'message' => 'Present',
	'errorMessage' => 'Absent',
	'description' => 'Either $_SERVER["HTTP_HOST"] or $_SERVER["SERVER_NAME"] must be available for resolving host name.',
);

$tests[] = array(
	'title' => 'REQUEST_URI or ORIG_PATH_INFO',
	'required' => TRUE,
	'passed' => isset($_SERVER["REQUEST_URI"]) || isset($_SERVER["ORIG_PATH_INFO"]),
	'message' => 'Present',
	'errorMessage' => 'Absent',
	'description' => 'Either $_SERVER["REQUEST_URI"] or $_SERVER["ORIG_PATH_INFO"] must be available for resolving request URL.',
);

$tests[] = array(
	'title' => 'DOCUMENT_ROOT & SCRIPT_FILENAME or SCRIPT_NAME',
	'required' => TRUE,
	'passed' => isset($_SERVER['DOCUMENT_ROOT'], $_SERVER['SCRIPT_FILENAME']) || isset($_SERVER['SCRIPT_NAME']),
	'message' => 'Present',
	'errorMessage' => 'Absent',
	'description' => '$_SERVER["DOCUMENT_ROOT"] and $_SERVER["SCRIPT_FILENAME"] or $_SERVER["SCRIPT_NAME"] must be available for resolving script file path.',
);

paint($tests);

/**
 * Paints checker.
 * @param  array
 * @return void
 */
function paint($requirements)
{
	$errors = $warnings = FALSE;

	foreach ($requirements as $id => $requirement)
	{
		$requirements[$id] = $requirement = (object) $requirement;
		if (isset($requirement->passed) && !$requirement->passed) {
			if ($requirement->required) {
				$errors = TRUE;
			} else {
				$warnings = TRUE;
			}
		}
	}

	require TEMPLATE_FILE;
}

/**
 * Gets the boolean value of a configuration option.
 * @param  string  configuration option name
 * @return bool
 */
function iniFlag($var)
{
	$status = strtolower(ini_get($var));
	return $status === 'on' || $status === 'true' || $status === 'yes' || (int) $status;
}


text:
We would like to think our many {file:Contributors contributors} for
suggestions, ideas and improvements to AclPermalink.

* Table of Contents
{:toc}

## 4.0.10.1 (2013-08-20)

* Update dependencies in gemspec to avoid using with Active Record 4.
* Fixed links in docs.

## 4.0.10 (2013-08-10)

* Fixed table prefixes/suffixes being ignored (Jesse Farless)
* Fixed sequence generation for slugs containing numbers (Adam Carroll)

## 4.0.9 (2012-10-31)

* Fixed support for Rails 3.2.9.rc1

## 4.0.8 (2012-08-01)

* Name internal anonymous class to fix marshall dump/load error (Jess Brown, Philip Arndt and Norman Clarke).

* Avoid using deprecated `update_attribute` (Philip Arndt).

* Added set_acl_permalink method to Globalize module (Norman Clarke).

* autoload AclPermalink::Slug; previously this class was not accessible from
  migrations unless required explicitly, which could cause some queries to
  unexpectedly fail (Norman Clarke).

* Fix Mocha load order (Mark Turner).

* Minor doc updates (Rob Yurkowski).

* Other miscellaneous refactorings and doc updates.

## 4.0.7 (2012-06-06)

* to_param just calls super when no acl_permalink is present, to keep the model's
  default behavior. (Andrew White)

* AclPermalink can now properly sequence slugs that end in numbers even when a
  single dash is used as the separator (Tomás Arribas).

## 4.0.6 (2012-05-21)

* Fix nil return value from to_param when save fails because of validation errors (Tomás Arribas)
* Fix incorrect usage of i18n API (Vinicius Ferriani)
* Improve error handling in reserved module (Adrián Mugnolo and Github user "nolamesa")

## 4.0.5 (2012-04-28)

* Favor `includes` over `joins` in globalize to avoid read-only results (Jakub Wojtysiak)
* Fix globalize compatibility with results from dynamic finders (Chris Salzberg)

## 4.0.4 (2012-03-26)

* Fix globalize plugin to avoid issues with asset precompilation (Philip Arndt)

## 4.0.3 (2012-03-14)

* Fix escape for '%' and '_' on SQLite (Norman Clarke and Sergey Petrunin)
* Allow AclPermalink to be extended or included (Norman Clarke)
* Allow Configuration#use to accept a Module (Norman Clarke)
* Fix bugs with History module + STI (Norman Clarke and Sergey Petrunin)

## 4.0.2 (2012-03-12)

* Improved conflict handling and performance in History module (Erik Ogan and Thomas Shafer)
* Fixed bug that impeded using underscores as a sequence separator (Erik Ogan and Thomas Shafer)
* Minor documentation improvements (Norman Clarke)

## 4.0.1 (2012-02-29)

* Added support for Globalize 3 (Enrico Pilotto and Philip Arndt)
* Allow the scoped module to use multiple scopes (Ben Caldwell)
* Fixes for conflicting slugs in history module (Erik Ogan, Thomas Shafer, Evan Arnold)
* Fix for conflicting slugs when using STI (Danny van der Heiden, Diederick Lawson)
* Maintainence improvements (Norman Clarke, Philip Arndt, Thomas Darde, Lee Hambley)

## 4.0.0 (2011-12-27)

This is a complete rewrite of AclPermalink, and introduces a smaller, faster and
less ambitious codebase. The primary change is the relegation of external slugs
to an optional addon, and the adoption of what were formerly "cached slugs"
as the primary way of handling slugging.

## Older releases

Please see the 3.x branch.


text:
namespace System.ServiceModel.Syndication
{
    using System.Collections.ObjectModel;
    using System.Collections.Generic;
    using System.Runtime.Serialization;
    using System.Xml.Serialization;
    using System.Xml;

    // NOTE: This class implements Clone so if you add any members, please update the copy ctor
    struct ExtensibleSyndicationObject : IExtensibleSyndicationObject
    {
        Dictionary<XmlQualifiedName, string> attributeExtensions;
        SyndicationElementExtensionCollection elementExtensions;

        ExtensibleSyndicationObject(ExtensibleSyndicationObject source)
        {
            if (source.attributeExtensions != null)
            {
                this.attributeExtensions = new Dictionary<XmlQualifiedName, string>();
                foreach (XmlQualifiedName key in source.attributeExtensions.Keys)
                {
                    this.attributeExtensions.Add(key, source.attributeExtensions[key]);
                }
            }
            else
            {
                this.attributeExtensions = null;
            }
            if (source.elementExtensions != null)
            {
                this.elementExtensions = new SyndicationElementExtensionCollection(source.elementExtensions);
            }
            else
            {
                this.elementExtensions = null;
            }
        }

        public Dictionary<XmlQualifiedName, string> AttributeExtensions
        {
            get
            {
                if (this.attributeExtensions == null)
                {
                    this.attributeExtensions = new Dictionary<XmlQualifiedName, string>();
                }
                return this.attributeExtensions;
            }
        }

        public SyndicationElementExtensionCollection ElementExtensions
        {
            get
            {
                if (this.elementExtensions == null)
                {
                    this.elementExtensions = new SyndicationElementExtensionCollection();
                }
                return this.elementExtensions;
            }
        }

        static XmlBuffer CreateXmlBuffer(XmlDictionaryReader unparsedExtensionsReader, int maxExtensionSize)
        {
            XmlBuffer buffer = new XmlBuffer(maxExtensionSize);
            using (XmlDictionaryWriter writer = buffer.OpenSection(unparsedExtensionsReader.Quotas))
            {
                writer.WriteStartElement(Rss20Constants.ExtensionWrapperTag);
                while (unparsedExtensionsReader.IsStartElement())
                {
                    writer.WriteNode(unparsedExtensionsReader, false);
                }
                writer.WriteEndElement();
            }
            buffer.CloseSection();
            buffer.Close();
            return buffer;
        }

        internal void LoadElementExtensions(XmlReader readerOverUnparsedExtensions, int maxExtensionSize)
        {
            if (readerOverUnparsedExtensions == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("readerOverUnparsedExtensions");
            }
            if (maxExtensionSize < 0)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("maxExtensionSize"));
            }
            XmlDictionaryReader r = XmlDictionaryReader.CreateDictionaryReader(readerOverUnparsedExtensions);
            this.elementExtensions = new SyndicationElementExtensionCollection(CreateXmlBuffer(r, maxExtensionSize));
        }

        internal void LoadElementExtensions(XmlBuffer buffer)
        {
            this.elementExtensions = new SyndicationElementExtensionCollection(buffer);
        }

        internal void WriteAttributeExtensions(XmlWriter writer)
        {
            if (writer == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("writer");
            }
            if (this.attributeExtensions != null)
            {
                foreach (XmlQualifiedName qname in this.attributeExtensions.Keys)
                {
                    string value = this.attributeExtensions[qname];
                    writer.WriteAttributeString(qname.Name, qname.Namespace, value);
                }
            }
        }

        internal void WriteElementExtensions(XmlWriter writer)
        {
            if (writer == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("writer");
            }
            if (this.elementExtensions != null)
            {
                this.elementExtensions.WriteTo(writer);
            }
        }

        public ExtensibleSyndicationObject Clone()
        {
            return new ExtensibleSyndicationObject(this);
        }
    }
}


text:
package jetbrains.buildServer.nuget.common;

import jetbrains.buildServer.util.StringUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import static jetbrains.buildServer.nuget.common.PackagesConstants.NUGET_USE_RESTORE_COMMAND_INSTALL_MODE;
import static jetbrains.buildServer.nuget.common.PackagesConstants.NUGET_USE_RESTORE_COMMAND_RESTORE_MODE;

/**
 * Created 13.08.13 13:48
 *
 * @author Eugene Petrenko (eugene.petrenko@jetbrains.com)
 */
public enum PackagesInstallMode {
  /**
   * This method calls one NuGet command to update all packages
   */
  VIA_RESTORE(NUGET_USE_RESTORE_COMMAND_RESTORE_MODE),

  /**
   * This methos must call a NuGet udpate command per packages.config
   */
  VIA_INSTALL(NUGET_USE_RESTORE_COMMAND_INSTALL_MODE),
  ;
  private final String myName;

  PackagesInstallMode(@NotNull final String name) {
    myName = name;
  }

  @NotNull
  public String getName() {
    return myName;
  }

  @Override
  public String toString() {
    return myName;
  }

  @Nullable
  public static PackagesInstallMode parse(@Nullable String text) {
    //convertion for older settings
    if (StringUtil.isEmptyOrSpaces(text)) return VIA_INSTALL;

    for (PackagesInstallMode mode : values()) {
      if (mode.getName().equals(text)) return mode;
    }
    return null;
  }
}


text:
<!DOCTYPE html>

  <meta charset="utf-8" />
  <title>Blink: SVG focus event listener</title>

    The only thing focusable on this page should be svg a[xlink|href].
    But in Blink and WebKit as soon as you add a focus event listener to any SVG element, it becomes focusable.
    Gecko and Trident are missing SVGElement.prototype.focus (which is why this test will fail there).

  <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <text x="10" y="20">just text, no link</text>

      <text x="10" y="45">an svg link</text>

    <rect x="20" y="60" width="5" height="5" data-label="svg rect" />
  </svg>


text:
package com.wso2telco.dep.ratecardservice.dao.model;

import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement
public class CurrencyDTO {

	private Integer currencyId;
	private String currencyCode;
	private String currencyDescription;
	private String createdBy;

	public Integer getCurrencyId() {
		return currencyId;
	}
	public void setCurrencyId(Integer currencyId) {
		this.currencyId = currencyId;
	}
	public String getCurrencyCode() {
		return currencyCode;
	}
	public void setCurrencyCode(String currencyCode) {
		this.currencyCode = currencyCode;
	}
	public String getCurrencyDescription() {
		return currencyDescription;
	}
	public void setCurrencyDescription(String currencyDescription) {
		this.currencyDescription = currencyDescription;
	}
	public String getCreatedBy() {
		return createdBy;
	}
	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}
}


text:
using System;

//•	Write a program to convert binary numbers to their decimal representation.

class BinaryToDecimal
{
    static void Main()
    {
        string numberToConvert = Console.ReadLine();
        //ulong baseSystem = ulong.Parse(Console.ReadLine());
        ulong baseSystem = 2UL;
        ulong result = ConvertToDecimal(numberToConvert, baseSystem);

        Console.WriteLine(result);

    }

    private static ulong ConvertToDecimal(string numberToConvert, ulong baseSystem)
    {
        ulong result = 0;

        for (int i = 0; i < numberToConvert.Length; i++)
        {
            char digit = numberToConvert[i];

            if (digit >= '0' && digit <= '9')
            {

                result += (ulong)(digit - '0') * (ulong)Math.Pow(baseSystem, numberToConvert.Length - i - 1);
            }
            else if (digit >= 'A' && digit <= 'Z')
            {
                result += (ulong)(digit - 'A' + 10) * (ulong)Math.Pow(baseSystem, numberToConvert.Length - i - 1);
            }

        }

        return result;
    }
}


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<parent>
		<artifactId>SpringMvcDubbo</artifactId>
		<groupId>com.evangel</groupId>
		<!--suppress MavenPropertyInParent -->
		<version>${springMvcDubbo.version}</version>
	</parent>
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.gege</groupId>
	<artifactId>api</artifactId>
	<version>${api.version}</version>
	<packaging>jar</packaging>
	<name>SpringMvcDubbo-api</name>
	<url>http://maven.apache.org</url>
	<dependencies>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>servlet-api</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
		</dependency>
	</dependencies>
</project>


text:
namespace llvm {

class raw_ostream;
class RecordKeeper;

/// Perform the action using Records, and write output to OS.
/// Returns true on error, false otherwise.
using TableGenMainFn = bool (raw_ostream &OS, RecordKeeper &Records);

int TableGenMain(char *argv0, TableGenMainFn *MainFn);

} // end namespace llvm

#endif // LLVM_TABLEGEN_MAIN_H


text:
package org.batfish.collections;

import java.util.HashMap;

import org.batfish.representation.Ip;

public class PolicyRouteFibIpMap extends HashMap<Ip, EdgeSet> {

   private static final long serialVersionUID = 1L;

}


text:
package is.hail.expr.ir.agg

import is.hail.annotations.Region
import is.hail.asm4s._
import is.hail.expr.ir.{EmitClassBuilder, EmitCode, EmitCodeBuilder}
import is.hail.io.{BufferSpec, InputBuffer, OutputBuffer, TypedCodecSpec}
import is.hail.types.physical._
import is.hail.types.physical.stypes.SValue
import is.hail.utils._

object StagedArrayBuilder {
  val END_SERIALIZATION: Int = 0x12345678
}

class StagedArrayBuilder(eltType: PType, kb: EmitClassBuilder[_], region: Value[Region], var initialCapacity: Int = 8) {
  val eltArray = PCanonicalArray(eltType.setRequired(false), required = true) // element type must be optional for serialization to work
  val stateType = PCanonicalTuple(true, PInt32Required, PInt32Required, eltArray)

  val size: Settable[Int] = kb.genFieldThisRef[Int]("size")
  private val capacity = kb.genFieldThisRef[Int]("capacity")
  val data = kb.genFieldThisRef[Long]("data")

  private val tmpOff = kb.genFieldThisRef[Long]("tmp_offset")
  private val currentSizeOffset: Code[Long] => Code[Long] = stateType.fieldOffset(_, 0)
  private val capacityOffset: Code[Long] => Code[Long] = stateType.fieldOffset(_, 1)
  private val dataOffset: Code[Long] => Code[Long] = stateType.fieldOffset(_, 2)

  def loadFrom(cb: EmitCodeBuilder, src: Code[Long]): Unit = {
    cb.assign(tmpOff, src)
    cb.assign(size, Region.loadInt(currentSizeOffset(tmpOff)))
    cb.assign(capacity, Region.loadInt(capacityOffset(tmpOff)))
    cb.assign(data, Region.loadAddress(dataOffset(tmpOff)))
  }

  def copyFrom(cb: EmitCodeBuilder, src: Code[Long]): Unit = {
    cb.assign(tmpOff, src)
    cb.assign(size, Region.loadInt(currentSizeOffset(tmpOff)))
    cb.assign(capacity, Region.loadInt(capacityOffset(tmpOff)))
    cb.assign(data, eltArray.store(cb, region, eltArray.loadCheapSCode(cb, Region.loadAddress(dataOffset(tmpOff))), deepCopy = true))
  }

  def reallocateData(cb: EmitCodeBuilder): Unit = {
    cb.assign(data, eltArray.store(cb, region, eltArray.loadCheapSCode(cb, data), deepCopy = true))
  }

  def storeTo(cb: EmitCodeBuilder, dest: Code[Long]): Unit = {
    cb.assign(tmpOff, dest)
    cb += Region.storeInt(currentSizeOffset(tmpOff), size)
    cb += Region.storeInt(capacityOffset(tmpOff), capacity)
    cb += Region.storeAddress(dataOffset(tmpOff), data)
  }

  def serialize(codec: BufferSpec): (EmitCodeBuilder, Value[OutputBuffer]) => Unit = {
    val codecSpec = TypedCodecSpec(eltArray, codec)
    (cb: EmitCodeBuilder, ob: Value[OutputBuffer]) => {

      cb += ob.writeInt(size)
      cb += ob.writeInt(capacity)
      codecSpec.encodedType.buildEncoder(eltArray.sType, kb)
        .apply(cb, eltArray.loadCheapSCode(cb, data), ob)
      cb += ob.writeInt(const(StagedArrayBuilder.END_SERIALIZATION))
    }
  }

  def deserialize(codec: BufferSpec): (EmitCodeBuilder, Value[InputBuffer]) => Unit = {
    val codecSpec = TypedCodecSpec(eltArray, codec)

    (cb: EmitCodeBuilder, ib: Value[InputBuffer]) => {
      cb.assign(size, ib.readInt())
      cb.assign(capacity, ib.readInt())

      val decValue = codecSpec.encodedType.buildDecoder(eltArray.virtualType, kb)
        .apply(cb, region, ib)
      cb.assign(data, eltArray.store(cb, region, decValue, deepCopy = false))

      cb += ib.readInt()
        .cne(const(StagedArrayBuilder.END_SERIALIZATION))
        .orEmpty(Code._fatal[Unit](s"StagedArrayBuilder serialization failed"))
    }
  }

  private def incrementSize(cb: EmitCodeBuilder): Unit = {
    cb.assign(size, size + 1)
    resize(cb)
  }

  def setMissing(cb: EmitCodeBuilder): Unit = incrementSize(cb) // all elements set to missing on initialization

  def append(cb: EmitCodeBuilder, elt: SValue, deepCopy: Boolean = true): Unit = {
    eltArray.setElementPresent(cb, data, size)
    eltType.storeAtAddress(cb, eltArray.elementOffset(data, capacity, size), region, elt, deepCopy)
    incrementSize(cb)
  }

  def initializeWithCapacity(cb: EmitCodeBuilder, capacity: Code[Int]): Unit = initialize(cb, 0, capacity)

  def initialize(cb: EmitCodeBuilder): Unit = initialize(cb, const(0), const(initialCapacity))

  private def initialize(cb: EmitCodeBuilder, _size: Code[Int], _capacity: Code[Int]): Unit = {
    cb.assign(size, _size)
    cb.assign(capacity, _capacity)
    cb.assign(data, eltArray.allocate(region, capacity))
    eltArray.stagedInitialize(cb, data, capacity, setMissing = true)
  }

  def elementOffset(cb: EmitCodeBuilder, idx: Value[Int]): Value[Long] =
    cb.memoize(eltArray.elementOffset(data, capacity, idx))

  def loadElement(cb: EmitCodeBuilder, idx: Value[Int]): EmitCode = {
    val m = eltArray.isElementMissing(data, idx)
    EmitCode(Code._empty, m, eltType.loadCheapSCode(cb, eltArray.loadElement(data, capacity, idx)))
  }

  private def resize(cb: EmitCodeBuilder): Unit = {
    val newDataOffset = kb.genFieldThisRef[Long]("new_data_offset")
    cb.ifx(size.ceq(capacity),
      {
        cb.assign(capacity, capacity * 2)
        cb.assign(newDataOffset, eltArray.allocate(region, capacity))
        eltArray.stagedInitialize(cb, newDataOffset, capacity, setMissing = true)
        cb += Region.copyFrom(data + eltArray.lengthHeaderBytes, newDataOffset + eltArray.lengthHeaderBytes, eltArray.nMissingBytes(size).toL)
        cb += Region.copyFrom(data + eltArray.elementsOffset(size),
          newDataOffset + eltArray.elementsOffset(capacity.load()),
          size.toL * const(eltArray.elementByteSize))
        cb.assign(data, newDataOffset)
      })
  }
}


text:
package com.google.javascript.jscomp;

import static com.google.common.truth.Truth.assertThat;
import static com.google.javascript.rhino.testing.NodeSubject.assertNode;

import com.google.javascript.jscomp.modules.ModuleMap;
import com.google.javascript.jscomp.modules.ModuleMetadataMap;
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.Token;
import org.jspecify.nullness.Nullable;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

@RunWith(JUnit4.class)
public final class PolymerClassDefinitionTest extends CompilerTypeTestCase {

  private @Nullable Node polymerCall;

  @Override
  @Before
  public void setUp() throws Exception {
    super.setUp();
    polymerCall = null;
  }

  // TODO(jlklein): Add more complex test cases and verify behaviors and descriptors.

  @Test
  public void testSimpleBehavior() {
    PolymerClassDefinition def =
        parseAndExtractClassDefFromCall(
            lines(
                "/** @polymerBehavior */",
                "var FunBehavior = {",
                "  properties: {",
                "    /** @type {boolean} */",
                "    isFun: {",
                "      type: Boolean,",
                "      value: true,",
                "    }",
                "  },",
                "  listeners: {",
                "    click: 'doSomethingFun',",
                "  },",
                "  /** @type {string} */",
                "  foo: 'hooray',",
                "",
                "  /** @param {string} funAmount */",
                "  doSomethingFun: function(funAmount) {",
                "    alert('Something ' + funAmount + ' fun!');",
                "  },",
                "",
                "  /** @override */",
                "  created: function() {}",
                "};",
                "var A = Polymer({",
                "  is: 'x-element',",
                "  properties: {",
                "    pets: {",
                "      type: Array,",
                "      notify: true,",
                "    },",
                "    name: String,",
                "  },",
                "  behaviors: [ FunBehavior ],",
                "});"));

    assertThat(def).isNotNull();
    assertThat(def.defType).isEqualTo(PolymerClassDefinition.DefinitionType.ObjectLiteral);
    assertNode(def.target).hasType(Token.NAME);
    assertThat(def.target.getString()).isEqualTo("A");
    assertThat(def.nativeBaseElement).isNull();
    assertThat(def.behaviors).hasSize(1);
    assertThat(def.props).hasSize(2);
    assertThat(def.props.get(0).name.getString()).isEqualTo("pets");
    assertThat(def.props.get(1).name.getString()).isEqualTo("name");
    assertThat(def.behaviorProps).hasSize(1); // 'isFun'
    assertThat(def.behaviors.get(0).props.get(0).name.getString()).isEqualTo("isFun");
  }

  @Test
  public void testBasicClass() {
    PolymerClassDefinition def =
        parseAndExtractClassDefFromClass(
            lines(
                "class A extends Polymer.Element {",
                "  static get is() { return 'x-element'; }",
                "  static get properties() {",
                "    return {",
                "      pets: {",
                "        type: Array,",
                "        notify: true,",
                "      },",
                "      name: String",
                "    };",
                "  }",
                "}"));

    assertThat(def).isNotNull();
    assertThat(def.defType).isEqualTo(PolymerClassDefinition.DefinitionType.ES6Class);
    assertNode(def.target).hasType(Token.NAME);
    assertThat(def.target.getString()).isEqualTo("A");
    assertThat(def.descriptor).isNotNull();
    assertNode(def.descriptor).hasType(Token.OBJECTLIT);
    assertThat(def.nativeBaseElement).isNull();
    assertThat(def.behaviors).isNull();
    assertThat(def.props).hasSize(2);
  }

  @Test
  public void testDynamicDescriptor() {
    PolymerClassDefinition def = parseAndExtractClassDefFromCall(
        lines(
            "var A = Polymer({",
            "  is: x,",
            "});"));

    assertThat(def.target.getString()).isEqualTo("A");
  }

  @Test
  public void testDynamicDescriptor1() {
    PolymerClassDefinition def = parseAndExtractClassDefFromCall(
        lines(
            "Polymer({",
            "  is: x,",
            "});"));

    assertThat(def.target.getString()).isEqualTo("XElement");
  }

  @Test
  public void testDynamicDescriptor2() {
    PolymerClassDefinition def = parseAndExtractClassDefFromCall(
        lines(
            "Polymer({",
            "  is: foo.bar,",
            "});"));

    assertThat(def.target.getString()).isEqualTo("Foo$barElement");
  }

  @Test
  public void testDynamicDescriptor3() {
    PolymerClassDefinition def = parseAndExtractClassDefFromCall(
        lines(
            "Polymer({",
            "  is: this.bar,",
            "});"));

    assertThat(def.target.getString()).isEqualTo("This$barElement");
  }

  private PolymerClassDefinition parseAndExtractClassDefFromCall(String code) {
    Node rootNode = compiler.parseTestCode(code);
    GlobalNamespace globalNamespace =  new GlobalNamespace(compiler, rootNode);

    NodeUtil.visitPostOrder(
        rootNode,
        new NodeUtil.Visitor() {
          @Override
          public void visit(Node node) {
            if (PolymerPassStaticUtils.isPolymerCall(node)) {
              polymerCall = node;
            }
          }
        });

    assertThat(polymerCall).isNotNull();
    return PolymerClassDefinition.extractFromCallNode(
        polymerCall,
        compiler,
        /* moduleMetadata= */ null,
        new PolymerBehaviorExtractor(
            compiler,
            globalNamespace,
            ModuleMetadataMap.emptyForTesting(),
            ModuleMap.emptyForTesting()));
  }

  private PolymerClassDefinition parseAndExtractClassDefFromClass(String code) {
    Node rootNode = compiler.parseTestCode(code);
    GlobalNamespace globalNamespace = new GlobalNamespace(compiler, rootNode);

    NodeUtil.visitPostOrder(
        rootNode,
        new NodeUtil.Visitor() {
          @Override
          public void visit(Node node) {
            if (PolymerPassStaticUtils.isPolymerClass(node)) {
              polymerCall = node;
            }
          }
        });

    assertThat(polymerCall).isNotNull();
    return PolymerClassDefinition.extractFromClassNode(polymerCall, compiler, globalNamespace);
  }
}


text:
@extends('layouts.public')
@section('content')

						 logo}}" width="90">

						{{$club->name}}

Team {{$team->name}}

Select one option:

					@if(Session::has('error'))

									<button class="close" aria-hidden="true" data-dismiss="alert" type="button">×</button>

{{Session::get('error')}}

					@endif
					@if($notice)

									<button class="close" aria-hidden="true" data-dismiss="alert" type="button">×</button>

{{$notice}}

					@endif

							{{Form::open(array('action' => array('ClubPublicController@doPaymentSelectTeam', $club->id,$team->id), 'class'=>'form-horizontal', 'method' => 'post')) }}
							{{Form::hidden('type','full') }}
							<button type="submit" class="tile text-left btn btn-block btn-outline btn-success ">

{{$price}}

Full Payment

							</button>
							{{Form::close()}}

							{{Form::open(array('action' => array('ClubPublicController@doPaymentSelectTeam', $club->id,$team->id), 'class'=>'form-horizontal', 'method' => 'post')) }}
							{{Form::hidden('type','plan') }}
							<button type="submit" class="tile btn btn-block btn-outline btn-warning ">

{{$team->plan->initial}}*

+ {{$team->plan->recurring}} per month

							</button>
							{{Form::close()}}

* Please read carefully our terms and conditions for this services and refund policy.

@stop
@section("script")

@stop


text:
//
//  BSAAdContainerView.m
//  BSAAdFramework
//
//  Created by Rick Fillion on 6/28/10.
//  Copyright 2010 BuySellAds. All rights reserved.
//

#import "BSAAdContainerView.h"
#import "BSAAdController.h"
#import "NSNotificationCenter+BuySellAds.h"
#import "LTPixelAlign.h"
#import "BSAAdView.h"
#import "BSAAdImageView.h"
#import "BSAAdImageAndTextView.h"
#import "BSAAd.h"
#import "BSASwitchboard.h"
#import "BSAZone.h"
#import "BSAAdViewDelegate.h"

@interface BSAAdContainerView (Private)

- (void)refreshAds;
- (void)frameChanged;
- (void)reflowAdViews;
- (NSUInteger)maximumNumberOfAds;

@end

@implementation BSAAdContainerView

@synthesize zoneIdentifier, backgroundColor, bordered, ads, delegate;

- (id)initWithFrame:(NSRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code here.
        self.backgroundColor = [NSColor colorWithCalibratedWhite:0.1 alpha:0.1];
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(adsAvailableForZoneIdNotification:) name:BSAAdsAvailableForZoneIdNotification object:nil];
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(boundsDidChangeNotification:) name:NSViewBoundsDidChangeNotification object:self];
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(frameDidChangeNotification:) name:NSViewFrameDidChangeNotification object:self];
        [self setPostsFrameChangedNotifications:YES];
        [self setPostsBoundsChangedNotifications:YES];
        self.bordered = YES;
    }
    return self;
}

- (void)dealloc
{
    [[NSNotificationCenter defaultCenter] removeObserver:self name:BSAAdsAvailableForZoneIdNotification object:nil];
    [[NSNotificationCenter defaultCenter] removeObserver:self name:NSViewBoundsDidChangeNotification object:self];
    [[NSNotificationCenter defaultCenter] removeObserver:self name:NSViewFrameDidChangeNotification object:self];
    [ads release];
    [super dealloc];
}

- (BOOL)isFlipped
{
    return YES;
}

- (void)boundsDidChangeNotification:(NSNotification *)notification
{
    [self frameChanged];
}

- (void)frameDidChangeNotification:(NSNotification *)notification
{
    [self frameChanged];
}

- (void)adsAvailableForZoneIdNotification:(NSNotification *)notification
{
    //NSLog(@"adsAvailableForZoneIdNotification: %@", notification);
    NSDictionary *userInfo = [notification userInfo];
    NSNumber *zoneIdentifierForNewAds = [userInfo objectForKey:@"zoneIdentifier"];
    if (!zoneIdentifierForNewAds || !self.zoneIdentifier)
    {
        return;
    }
    if ([zoneIdentifierForNewAds isEqualToNumber:self.zoneIdentifier])
    {
        //NSLog(@"found new ads for me! (%@)", self.zoneIdentifier);
        //NSArray *adsAvailable = [[BSAAdController sharedController] allAdsForZoneId: self.zoneIdentifier];
        //NSLog(@"ads = %@", adsAvailable);
        [self refreshAds];
    }
}

- (void)setZoneIdentifier:(NSNumber *)aZoneIdentifier
{
    [aZoneIdentifier retain];
    [zoneIdentifier release];
    zoneIdentifier = aZoneIdentifier;
    [self refresh];
}

- (void)drawRect:(NSRect)dirtyRect {
    // Drawing code here.

    [[NSColor blueColor] set];
    //NSRectFill([self bounds]);

    NSColor *borderColor = [NSColor colorWithCalibratedRed:0.665 green:0.665 blue:0.665 alpha:1.000];
    NSColor *bgColor = self.backgroundColor ? self.backgroundColor : [NSColor clearColor];

    CGFloat stroke = 1.0;
    NSRect bounds = [self bounds];
    bounds.size.width -= 1.0;
    bounds.origin.y += 0.5;
    bounds.size.height -= 1.0;
    bounds.origin.x += 0.5;
    //bounds = [self pixelAlignRect:bounds withStroke:stroke];
    NSBezierPath *path = [NSBezierPath bezierPathWithRect:bounds];
    [path setLineWidth:stroke];
    [bgColor set];
    [path fill];
    [borderColor set];
    if ([self isBordered])
        [path stroke];
}

- (void)refresh
{
    [self refreshAds];
}

- (Class)adViewClass
{
    BSAZoneFormat zoneFormat = [[BSAAdController sharedController] zoneFormatForZoneId:self.zoneIdentifier];

    if (zoneFormat == BSAZoneImageFormat)
        return [BSAAdImageView class];
    else if (zoneFormat == BSAZoneImageAndTextFormat)
        return [BSAAdImageAndTextView class];
    else {
        NSLog(@"[BSAAdController adViewClass] encountered a zoneFormat not supported: %i", zoneFormat);
        return nil;
    }

}

#pragma mark Private

- (void)refreshAds
{
    [self willChangeValueForKey:@"ads"];
    [ads release];
    NSNumber *howMany = [[BSAAdController sharedController] numberOfAdsForZoneId:self.zoneIdentifier];
    ads = [[BSAAdController sharedController] randomAdsForZoneId:self.zoneIdentifier howMany:[howMany integerValue]];
    [ads retain];
    [self didChangeValueForKey:@"ads"];
    [self reflowAdViews];

    // Register the impressions.
    NSMutableArray *adIdentifiers = [NSMutableArray array];
    for (BSAAd *ad in ads)
    {
        if (ad.identifier)
            [adIdentifiers addObject:ad.identifier];
    }
    [[BSASwitchboard switchboard] registerImpressionForAdIds:adIdentifiers zoneId:self.zoneIdentifier target:self selector:@selector(impressionResponse:error:)];
}

- (void)frameChanged
{
    if ([ads count] < [self maximumNumberOfAds])
    {
        [self refreshAds];
    }
    else {
        [self reflowAdViews];
    }
}

- (void)reflowAdViews
{
    //NSLog(@"reflowAdViews");

    // get rid of all the old adViews;
    [[self subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)];

    NSSize adSize = [[BSAAdController sharedController] sizeForZoneId:self.zoneIdentifier];
    if (NSEqualSizes(adSize, NSZeroSize))
    {
        return;
    }

    BSAZoneFormat zoneFormat = [[BSAAdController sharedController] zoneFormatForZoneId:self.zoneIdentifier];

    // figure out how many ads we can fit horizontally
    NSUInteger boundsWidth = (NSUInteger)NSWidth([self bounds]);
    NSUInteger boundsHeight = (NSUInteger)NSHeight([self bounds]) - ([self isBordered] ? 2.0 : 0.0);
    NSUInteger adWidth = (NSUInteger)adSize.width;
    if (zoneFormat == BSAZoneImageAndTextFormat)
    {
        adWidth = boundsWidth - 2.0;
    }
    NSUInteger adHeight = (NSUInteger)adSize.height;

    NSUInteger maximumNumberOfAds = [self maximumNumberOfAds];
    NSUInteger horizontalAmount = boundsWidth / adWidth;
    if (maximumNumberOfAds < horizontalAmount)
        horizontalAmount = maximumNumberOfAds;
    if (horizontalAmount == 0)
        return; // lets avoid some divide by zero action.
    NSUInteger verticalAmount =  [self maximumNumberOfAds] / horizontalAmount;
    if (maximumNumberOfAds > 0 && verticalAmount == 0)
        verticalAmount = 1;

    //NSLog(@"horizontalAmount = %i, verticalAmount = %i", horizontalAmount, verticalAmount);

    // figure out spacing between ads
    CGFloat horizontalSpacing = ((CGFloat)(boundsWidth - (adWidth * horizontalAmount))) / ((CGFloat) horizontalAmount+1);
    CGFloat verticalSpacing = ((CGFloat)(boundsHeight - (adHeight * verticalAmount))) / ((CGFloat) verticalAmount+1);

    NSPoint origin = NSZeroPoint;
    origin.y = ([self isBordered] ? 1.0 : 0.0) + verticalSpacing;
    NSInteger adIndex = 0;
    Class adViewClass = [self adViewClass];
    for (int v = 0; v < verticalAmount; v++)
    {
        origin.x = horizontalSpacing;
        for (int h = 0; h < horizontalAmount; h++)
        {
            if (adIndex < [ads count])
            {
                NSRect frameRect = NSMakeRect(origin.x, origin.y, adWidth, adHeight);
                frameRect = [self pixelAlignRect:frameRect withStroke:0];
                //NSLog(@"creating new BSAAdView for zone id %@ with frame %@", self.zoneIdentifier, NSStringFromRect(frameRect));
                BSAAdView *adView =  [[(BSAAdView *)[adViewClass alloc] initWithFrame:frameRect] autorelease];
                adView.ad = [ads objectAtIndex:adIndex];
                adView.delegate = self;
                [self addSubview:adView];
                origin.x += adSize.width + horizontalSpacing;
            }
            adIndex++;
        }
        origin.y += adSize.height + verticalSpacing;
    }
}

- (NSUInteger)maximumNumberOfAds
{
    NSSize adSize = [[BSAAdController sharedController] sizeForZoneId:self.zoneIdentifier];
    if (NSEqualSizes(adSize, NSZeroSize))
    {
        return 0;
    }

    BSAZoneFormat zoneFormat = [[BSAAdController sharedController] zoneFormatForZoneId:self.zoneIdentifier];

    // figure out how many ads we can fit horizontally
    NSUInteger boundsWidth = (NSUInteger)NSWidth([self bounds]);
    NSUInteger boundsHeight = (NSUInteger)NSHeight([self bounds]);
    NSUInteger adWidth = (NSUInteger)adSize.width;
    if (zoneFormat == BSAZoneImageAndTextFormat)
    {
        adWidth = boundsWidth - 2.0;
    }
    NSUInteger adHeight = (NSUInteger)adSize.height;

    NSUInteger horizontalAmount = boundsWidth / adWidth;

    NSUInteger verticalAmount = boundsHeight / adHeight;
    NSUInteger maxAmountThatCanFit = horizontalAmount * verticalAmount;
    //NSLog(@"%i %i %i %i", horizontalAmount, verticalAmount, adWidth, adHeight);

    NSInteger proposedNumberOfAdsForZone = [[[BSAAdController sharedController] numberOfAdsForZoneId:self.zoneIdentifier] integerValue];
    NSInteger actualNumberofAdsAvailableForZone = [[[BSAAdController sharedController] allAdsForZoneId:self.zoneIdentifier] count];
    BOOL showsPlaceholderAds = [[BSAAdController sharedController] showsPlaceholderAdForZoneId:self.zoneIdentifier];
    BOOL repeatsPlaceholderAds = [[BSAAdController sharedController] repeatsPlaceholderAdsForZoneId:self.zoneIdentifier];

    NSUInteger maximumNumberOfAds = 0;

    if (proposedNumberOfAdsForZone <= actualNumberofAdsAvailableForZone)
    {
        // We have more ads than what the advertiser wants.  So now we just need to
        // Figure out if we can fit that many in the view
        if (maxAmountThatCanFit < proposedNumberOfAdsForZone)
            maximumNumberOfAds = maxAmountThatCanFit;
        else
            maximumNumberOfAds = proposedNumberOfAdsForZone;
    }
    else {
        // There aren't enough ads.
        if (!showsPlaceholderAds)
        {
            // Doesn't want placeholders so just use what we have.
            maximumNumberOfAds = actualNumberofAdsAvailableForZone;
        }
        else {
            // Does want placeholders
            if (!repeatsPlaceholderAds)
            {
                // Only wants one placeholder
                maximumNumberOfAds =  actualNumberofAdsAvailableForZone + 1;
            }
            else {
                // Wants as many placeholders as will fit, up to the max proposed
                if (maxAmountThatCanFit < proposedNumberOfAdsForZone)
                    maximumNumberOfAds = maxAmountThatCanFit;
                else
                    maximumNumberOfAds = proposedNumberOfAdsForZone;
            }
        }
    }
    return maximumNumberOfAds;
}

#pragma mark BSAAdViewDelegate

- (void)adClicked:(BSAAd *)ad;
{
    //NSLog(@"ad clicked:  %@", ad);
    if (ad.identifier)
    {
        // It's a real ad.
        BOOL shouldHandle = YES;
        if (self.delegate && [(id)self.delegate respondsToSelector:@selector(adContainerView:shouldHandleClickOfAd:)])
        {
            shouldHandle = [self.delegate adContainerView:self shouldHandleClickOfAd:ad];
        }

        if (shouldHandle)
            [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:ad.url]];

        // Report the click
        [[BSASwitchboard switchboard] registerClickForAdId:ad.identifier zoneId:self.zoneIdentifier target:self selector:@selector(clickResponse:error:)];
    }
    else {
        // It's a spot that's for sale.
        NSString *urlString = [[BSAAdController sharedController] buyUrlForZoneId:self.zoneIdentifier];
        [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:urlString]];
    }
}

#pragma mark BSASwitchboard Responses

// Click and Impression responses return gif data which throws JSON for a loop.
// It'll always return an error.

- (void)clickResponse:(id)response error:(NSError *)error
{

}

- (void)impressionResponse:(id)response error:(NSError *)error
{

}

@end


text:
<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use backend\models\TblDanaInfrastruktur;
use ibrarturi\latlngfinder\LatLngFinder;
use dosamigos\datepicker\DatePicker;

/* @var $this yii\web\View */
/* @var $model backend\models\TblPembangunan */
/* @var $form yii\widgets\ActiveForm */
?>

    <?php $form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]); ?>

    <?= $form->field($model, 'id_pembangunan')->hiddenInput(['value' => '4'.date('YmdHis')])->label(false) ?>

    <?= $form->field($model, 'id_dana_inf')->dropDownList(
        ArrayHelper::map(TblDanaInfrastruktur::find()->all(),'id_dana_inf', 'nama_dana'),
        ['prompt'=>'-Pilih Nama Dana-']) ?>

    <?= $form->field($model, 'nama_pembanguna')->textarea(['rows' => 6]) ?>

    <?= $form->field($model, 'gambar')->fileInput() ?>

    <?= $form->field($model, 'lat') ?>
    <?= $form->field($model, 'lng') ?>

    <?php
        if ($model->lat!= null && $model->lng != null) {
            $lat = $model->lat;
            $lng = $model->lng;
        }else{
            $lat = -7.8815254;
            $lng = 111.4164468;
        }
        echo    \ibrarturi\latlngfinder\LatLngFinder::widget([
                    'model' => $model,              // model object
                    'latAttribute' => 'lat',        // Latitude attribute
                    'lngAttribute' => 'lng',        // Longitude attribute
                    'zoomAttribute' => 'zoom',      // Zoom text attribute
                    'mapCanvasId' => 'map',         // Map Canvas id
                    'mapWidth' => 650,              // Map Canvas width
                    'mapHeight' => 300,             // Map Canvas mapHeight
                    'defaultLat' => $lat,        // Default latitude for the map
                    'defaultLng' => $lng,         // Default Longitude for the map
                    'defaultZoom' => 13,             // Default zoom for the map
                    'enableZoomField' => true,      // True: for assigning zoom values to the zoom field, False: Do not assign zoom value to the zoom field
                ]);
    ?>

    <?= $form->field($model, 'anggaran')->textInput() ?>

    <?= $form->field($model, 'tgl_mulai')->widget(
        DatePicker::className(), [
        'model' => $model,
        'attribute' => 'tgl_mulai',
        'template' => '{addon}{input}',
        'clientOptions' => [
            'autoclose' => true,
            'format' => 'yyyy-mm-dd'
        ]]) ?>

    <?= $form->field($model, 'tgl_selesai')->widget(
        DatePicker::className(), [
        'model' => $model,
        'attribute' => 'tgl_selesai',
        'template' => '{addon}{input}',
        'clientOptions' => [
            'autoclose' => true,
            'format' => 'yyyy-mm-dd'
        ]]) ?>

    <?= $form->field($model, 'progres')->textInput() ?>

    <?= $form->field($model, 'keterangan')->textarea(['rows' => 6]) ?>

    <?= $form->field($model, 'id_admin')->hiddenInput(['value' => Yii::$app->user->id])->label(false) ?>

        <?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>

    <?php ActiveForm::end(); ?>


text:
import { getGlobal, deprecated } from "../utils/utils"
import { IDerivation } from "./derivation"
import { Reaction } from "./reaction"
import { IObservable } from "./observable"

/**
 * These values will persist if global state is reset
 */
const persistentKeys = ["mobxGuid", "resetId", "spyListeners", "strictMode", "runId"]

export class MobXGlobals {
    /**
	 * MobXGlobals version.
	 * MobX compatiblity with other versions loaded in memory as long as this version matches.
	 * It indicates that the global state still stores similar information
	 */
    version = 5

    /**
	 * Currently running derivation
	 */
    trackingDerivation: IDerivation | null = null

    /**
	 * Are we running a computation currently? (not a reaction)
	 */
    computationDepth = 0

    /**
	 * Each time a derivation is tracked, it is assigned a unique run-id
	 */
    runId = 0

    /**
	 * 'guid' for general purpose. Will be persisted amongst resets.
	 */
    mobxGuid = 0

    /**
	 * Are we in a batch block? (and how many of them)
	 */
    inBatch: number = 0

    /**
	 * Observables that don't have observers anymore, and are about to be
	 * suspended, unless somebody else accesses it in the same batch
	 *
	 * @type {IObservable[]}
	 */
    pendingUnobservations: IObservable[] = []

    /**
	 * List of scheduled, not yet executed, reactions.
	 */
    pendingReactions: Reaction[] = []

    /**
	 * Are we currently processing reactions?
	 */
    isRunningReactions = false

    /**
	 * Is it allowed to change observables at this point?
	 * In general, MobX doesn't allow that when running computations and React.render.
	 * To ensure that those functions stay pure.
	 */
    allowStateChanges = true
    /**
	 * If strict mode is enabled, state changes are by default not allowed
	 */
    strictMode = false

    /**
	 * Used by createTransformer to detect that the global state has been reset.
	 */
    resetId = 0

    /**
	 * Spy callbacks
	 */
    spyListeners: { (change: any): void }[] = []

    /**
	 * Globally attached error handlers that react specifically to errors in reactions
	 */
    globalReactionErrorHandlers: ((error: any, derivation: IDerivation) => void)[] = []
}

export let globalState: MobXGlobals = new MobXGlobals()

let shareGlobalStateCalled = false
let runInIsolationCalled = false
let warnedAboutMultipleInstances = false

{
    const global = getGlobal()
    if (!global.__mobxInstanceCount) {
        global.__mobxInstanceCount = 1
    } else {
        global.__mobxInstanceCount++
        setTimeout(() => {
            if (!shareGlobalStateCalled && !runInIsolationCalled && !warnedAboutMultipleInstances) {
                warnedAboutMultipleInstances = true
                console.warn(
                    "[mobx] Warning: there are multiple mobx instances active. This might lead to unexpected results. See https://github.com/mobxjs/mobx/issues/1082 for details."
                )
            }
        })
    }
}

export function isolateGlobalState() {
    runInIsolationCalled = true
    getGlobal().__mobxInstanceCount--
}

export function shareGlobalState() {
    // TODO: remove in 4.0; just use peer dependencies instead.
    deprecated(
        "Using `shareGlobalState` is not recommended, use peer dependencies instead. See https://github.com/mobxjs/mobx/issues/1082 for details."
    )
    shareGlobalStateCalled = true
    const global = getGlobal()
    const ownState = globalState

    /**
	 * Backward compatibility check
	 */
    if (global.__mobservableTrackingStack || global.__mobservableViewStack)
        throw new Error("[mobx] An incompatible version of mobservable is already loaded.")
    if (global.__mobxGlobal && global.__mobxGlobal.version !== ownState.version)
        throw new Error("[mobx] An incompatible version of mobx is already loaded.")
    if (global.__mobxGlobal) globalState = global.__mobxGlobal
    else global.__mobxGlobal = ownState
}

export function getGlobalState(): any {
    return globalState
}

export function registerGlobals() {
    // no-op to make explicit why this file is loaded
}

/**
 * For testing purposes only; this will break the internal state of existing observables,
 * but can be used to get back at a stable state after throwing errors
 */
export function resetGlobalState() {
    globalState.resetId++
    const defaultGlobals = new MobXGlobals()
    for (let key in defaultGlobals)
        if (persistentKeys.indexOf(key) === -1) globalState[key] = defaultGlobals[key]
    globalState.allowStateChanges = !globalState.strictMode
}


text:
// snippet-sourcedescription:[ ]
// snippet-service:[dynamodb]
// snippet-keyword:[JavaScript]
// snippet-sourcesyntax:[javascript]
// snippet-keyword:[Amazon DynamoDB]
// snippet-keyword:[Code Sample]
// snippet-keyword:[ ]
// snippet-sourcetype:[full-example]
// snippet-sourcedate:[ ]
// snippet-sourceauthor:[AWS]
// snippet-start:[dynamodb.JavaScript.CodeExample.MoviesLoadData]

var AWS = require("aws-sdk");
var fs = require('fs');

AWS.config.update({
    region: "us-west-2",
    endpoint: "http://localhost:8000"
});

var docClient = new AWS.DynamoDB.DocumentClient();

console.log("Importing movies into DynamoDB. Please wait.");

var allMovies = JSON.parse(fs.readFileSync('moviedata.json', 'utf8'));
allMovies.forEach(function(movie) {
    var params = {
        TableName: "Movies",
        Item: {
            "year":  movie.year,
            "title": movie.title,
            "info":  movie.info
        }
    };

    docClient.put(params, function(err, data) {
       if (err) {
           console.error("Unable to add movie", movie.title, ". Error JSON:", JSON.stringify(err, null, 2));
       } else {
           console.log("PutItem succeeded:", movie.title);
       }
    });
});
// snippet-end:[dynamodb.JavaScript.CodeExample.MoviesLoadData]


text:
extern "Java"
{
  namespace gnu
  {
    namespace javax
    {
      namespace swing
      {
        namespace tree
        {
            class GnuPath;
        }
      }
    }
  }
}

class gnu::javax::swing::tree::GnuPath : public ::javax::swing::tree::TreePath
{

public:
  GnuPath(JArray< ::java::lang::Object * > *, jboolean);
  jboolean __attribute__((aligned(__alignof__( ::javax::swing::tree::TreePath)))) isLastChild;
  static ::java::lang::Class class$;
};

#endif // __gnu_javax_swing_tree_GnuPath__


text:
/*Bootstrap Classes*/
var Grid = ReactBootstrap.Grid;
var Row = ReactBootstrap.Row;
var Col = ReactBootstrap.Col;

var ContactInfo = React.createClass({

	render: function() {
		return (
			<Col xs={12} md={3} className="contact-info" >

: beni@hognogi.com

: @AndreiHognogi

: @hognogi

: Cluj napoca

For any any other contact info (like phone number or skype id) please send me a message along with a short descripton about what you want to discuss, and I will send you the relevant info dirrectly

			</Col>
		);
	}

});

module.exports = ContactInfo;


text:
'use strict';

module.exports = require('./lib/component.collection-page-flip');


text:
Trait-based type-level equality constraint for Rust

[![build status](https://api.travis-ci.org/darinmorrison/unify.rs.svg?branch=master)](https://travis-ci.org/darinmorrison/unify.rs)

## Synopsis

This crate provides a trait-based implementation of equality constraints. It is intended as a stopgap until proper equality predicates are implemented as described in the `where`-clause [RFC](https://github.com/nikomatsakis/rfcs/blob/where-clauses/active/0000-where.md).

Because it is a hack, there are some limitations with how it can be used. It is most effective as a helper for encoding additional trait invariants in order to rule out invalid implementations. Previously it was useful as a means to specify `Self` for static method invocation but this is no longer needed with [UFCS](https://github.com/rust-lang/rust/pull/21077).

## Documentation

See the API documentation [here](http://darinmorrison.github.io/unify.rs/doc/unify/).

## Requirements

1.   [Rust](http://www.rust-lang.org/)
2.   [Cargo](http://crates.io/)

You can install both with the following:

```
$ curl -s https://static.rust-lang.org/rustup.sh | sudo sh
```

See [Installing Rust](http://doc.rust-lang.org/guide.html#installing-rust) for further details.

## Usage

```
$ cargo build       ## build library and binary
$ cargo test        ## run tests in ./tests
$ cargo bench       ## run benchmarks in ./benches
```

## Discussion

There is an IRC channel on [freenode](https://freenode.net) (chat.freenode.net) at [#epsilonz](http://webchat.freenode.net/?channels=%23epsilonz).


text:
#import "ExternalURLModule.h"
#import "Foundation+KGOAdditions.h"

@implementation ExternalURLModule

@synthesize url;
/*
- (id)initWithDictionary:(NSDictionary *)moduleDict {
    self = [super initWithDictionary:moduleDict];
    if (self) {
        self.url = [moduleDict nonemptyStringForKey:@"url"];
    }
    return self;
}
*/
- (UIViewController *)modulePage:(NSString *)pageName params:(NSDictionary *)params {

    NSURL *externalURL = [NSURL URLWithString:self.url];
    if ([[UIApplication sharedApplication] canOpenURL:externalURL]) {
        [[UIApplication sharedApplication] openURL:externalURL];
    }

    return nil;
}

- (void)evaluateInitialiationPayload:(NSDictionary *)payload
{
    self.url = [payload nonemptyStringForKey:@"url"];
}

- (BOOL)requiresKurogoServer
{
    return NO;
}

@end


text:
function Controller() {
    function toggleStatus() {
        var todo = todos.get(id);
        todo.set({
            done: todo.get("done") ? 0 : 1,
            date_completed: common.getDate()
        }).save();
    }
    function deleteTask(e) {
        e.cancelBubble = true;
        var todo = todos.get(id);
        todo.destroy();
    }
    function editTask() {
        Ti.API.info("El id a ser modificado es: " + id);
        var send = todos.get(id);
        var updateWindow = Alloy.createController("update", {
            data: send,
            $model: send
        });
        updateWindow.getView().open();
    }
    require("alloy/controllers/BaseController").apply(this, Array.prototype.slice.call(arguments));
    this.__controllerPath = "row";
    arguments[0] ? arguments[0]["__parentSymbol"] : null;
    var $model = arguments[0] ? arguments[0]["$model"] : null;
    arguments[0] ? arguments[0]["__itemTemplate"] : null;
    var $ = this;
    var exports = {};
    var __defers = {};
    $.__views.row = Ti.UI.createTableViewRow({
        height: "80dp",
        backgroundColor: "#fff",
        focusable: false,
        id: "row"
    });
    $.__views.row && $.addTopLevelView($.__views.row);
    $.__views.check = Ti.UI.createImageView({
        image: "/tick_gray_64.png",
        left: 0,
        height: "50dp",
        width: "50dp",
        id: "check"
    });
    $.__views.row.add($.__views.check);
    toggleStatus ? $.__views.check.addEventListener("click", toggleStatus) : __defers["$.__views.check!click!toggleStatus"] = true;
    $.__views.task = Ti.UI.createLabel({
        color: "#000",
        top: "15dp",
        left: "50dp",
        right: "50dp",
        height: Ti.UI.SIZE,
        font: {
            fontSize: "18dp"
        },
        id: "task",
        text: "undefined" != typeof $model.__transform["item"] ? $model.__transform["item"] : $model.get("item")
    });
    $.__views.row.add($.__views.task);
    $.__views.update = Ti.UI.createLabel({
        color: "#000",
        top: "50dp",
        left: "50dp",
        right: "50dp",
        height: Ti.UI.SIZE,
        font: {
            fontSize: "10dp"
        },
        id: "update",
        text: "undefined" != typeof $model.__transform["date_completed"] ? $model.__transform["date_completed"] : $model.get("date_completed")
    });
    $.__views.row.add($.__views.update);
    $.__views.edit = Ti.UI.createImageView({
        image: "/edit.png",
        right: 30,
        height: "50dp",
        width: "50dp",
        id: "edit"
    });
    $.__views.row.add($.__views.edit);
    editTask ? $.__views.edit.addEventListener("click", editTask) : __defers["$.__views.edit!click!editTask"] = true;
    $.__views.remove = Ti.UI.createImageView({
        image: "/red_x.png",
        right: 0,
        height: "50dp",
        width: "50dp",
        id: "remove"
    });
    $.__views.row.add($.__views.remove);
    deleteTask ? $.__views.remove.addEventListener("click", deleteTask) : __defers["$.__views.remove!click!deleteTask"] = true;
    exports.destroy = function() {};
    _.extend($, $.__views);
    require("alloy/moment");
    var todos = Alloy.Collections.todo;
    var common = require("/common");
    var id;
    if ($model) {
        id = $model.id;
        if ($model.get("done")) {
            $.row.backgroundColor = "#eee";
            $.check.backgroundColor = "#eee";
            $.task.color = "#ccc";
            $.update.color = "#ccc";
            $.check.image = "/tick_64.png";
        } else {
            $.row.backgroundColor = "#fff";
            $.check.backgroundColor = "#fff";
            $.task.color = "#000";
            $.update.color = "#000";
            $.check.image = "/tick_gray_64.png";
        }
    }
    __defers["$.__views.check!click!toggleStatus"] && $.__views.check.addEventListener("click", toggleStatus);
    __defers["$.__views.edit!click!editTask"] && $.__views.edit.addEventListener("click", editTask);
    __defers["$.__views.remove!click!deleteTask"] && $.__views.remove.addEventListener("click", deleteTask);
    _.extend($, exports);
}

var Alloy = require("alloy"), Backbone = Alloy.Backbone, _ = Alloy._;

module.exports = Controller;


text:
""" QiBuild """
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function

from qilinguist.pml_translator import translations_files_from_pml

def test_parse_pml(tmpdir):
    """ Test Parse Pml """
    pml_path = tmpdir.join("foo.pml")
    pml_path.write("""
<Package name="foo" format_version="4">
  <Translations>
    <Translation name="foo_fr_FR"
                 src="translations/foo_fr_FR.ts"
                 language="fr_FR" />
    <Translation name="foo_en_US"
                 src="translations/foo_en_US.ts"
                 language="en_US" />
  </Translations>

</Package>
""")
    translations = translations_files_from_pml(pml_path.strpath)
    assert translations == ["translations/foo_fr_FR.ts",
                            "translations/foo_en_US.ts"]


text:
package org.apache.james.managesieve.api.commands;

import org.apache.james.managesieve.api.AuthenticationRequiredException;
import org.apache.james.managesieve.api.ScriptNotFoundException;

/**
 * SetActive
 *
 *  @see RFC 5804 SETACTIVE Command
 */
public interface SetActive {

    abstract public void setActive(String name) throws AuthenticationRequiredException, ScriptNotFoundException;

}


text:
(function() {
    // takes the option: toHTML {boolean}

    var body = document.body;

    var appendHtml = function(filename, data, toHTML) {

        var str = "";
        str += 'SF:' + filename + '\n';

        data.source.forEach(function(line, num) {
            // increase the line number, as JS arrays are zero-based
            num++;

            if (data[num] !== undefined) {
                str += 'DA:' + num + ',' + data[num] + '\n';
            }
        });

        str += 'end_of_record\n';

        if (toHTML) {
            var div = document.createElement('div');
            div.className = "blanket_lcov_reporter";
            div.innerText = str;
            body.appendChild(div);
        } else {
            window._$blanket_LCOV = str;
        }
    };

    blanket.customReporter = function(coverageData, options) {
        var toHTML = true;

        if (typeof options !== 'undefined' && typeof options.toHTML !== 'undefined') {
            toHTML = options.toHTML;
        }

        for (var filename in coverageData.files) {
            var data = coverageData.files[filename];
            appendHtml(filename, data, toHTML);
        }
    };

})();


text:
public class RequiredArgsConstructorWithGeneric136<T> {

    private static class Foo<T> {
        private final T object;
        private final int i;

        static <T> Foo<T> of(T object, int i) {
            return new Foo<T>(object, i);
        }

        @java.lang.SuppressWarnings("all")
        @javax.annotation.Generated("lombok")
        public T getObject() {
            return this.object;
        }

        @java.lang.SuppressWarnings("all")
        @javax.annotation.Generated("lombok")
        public int getI() {
            return this.i;
        }

        @java.lang.SuppressWarnings("all")
        @javax.annotation.Generated("lombok")
        private Foo(final T object, final int i) {
            this.object = object;
            this.i = i;
        }

        @java.lang.SuppressWarnings("all")
        @javax.annotation.Generated("lombok")
        public static <T> Foo<T> of2(final T object, final int i) {
            return new Foo<T>(object, i);
        }
    }

    private <D> Foo<D> createFoo(D t, int i) {
        return new Foo<>(t, i);
    }

    public static void main(String[] args) {
        Foo<String> stringFoo = new Foo<>("", 2);
        Foo<String> foo1 = Foo.of("String2", 123);
        Foo<String> foo2 = Foo.of2("String2", 4423);
        System.out.println(stringFoo);
        System.out.println(foo1);
        System.out.println(foo2);
    }
}


text:
package org.jasonjson.core;

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

/**
 *
 * @author Adam Dubiel
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface JasonAccess {

    AccessStrategyType strategy() default AccessStrategyType.FIELD;

}


text:
@interface OEXRevealContentViewController () <MFMailComposeViewControllerDelegate>

@end

@implementation OEXRevealContentViewController

- (IBAction)overlayButtonTapped:(id)sender {
    [self.revealViewController revealToggleAnimated:YES];
}

- (void)revealController:(SWRevealViewController*)revealController didMoveToPosition:(FrontViewPosition)position {
    if(position == FrontViewPositionLeft) {
        [UIView animateWithDuration:0.2 delay:0.0 options:0 animations:^{
            self.overlayButton.alpha = 0.0f;
        } completion:^(BOOL finished) {
            self.overlayButton.hidden = YES;
        }];
    }
    else if(position == FrontViewPositionRight) {
        self.overlayButton.hidden = NO;
        [self.navigationController popToViewController:self animated:NO];
        [UIView animateWithDuration:0.5 delay:0 options:0 animations:^{
            self.overlayButton.alpha = 0.5f;
        } completion:^(BOOL finished) {
        }];
    }
}

@end


text:
package com.linecorp.armeria.server;

import com.linecorp.armeria.common.Request;
import com.linecorp.armeria.common.Response;

/**
 * A functional interface that enables building a {@link SimpleDecoratingService} with
 * {@link Service#decorate(DecoratingServiceFunction)}.
 *
 * @param <I> the {@link Request} type
 * @param <O> the {@link Response} type
 */
@FunctionalInterface
public interface DecoratingServiceFunction<I extends Request, O extends Response> {
    /**
     * Serves an incoming {@link Request}.
     *
     * @param delegate the {@link Service} being decorated by this function
     * @param ctx the context of the received {@link Request}
     * @param req the received {@link Request}
     *
     * @return the {@link Response}
     */
    O serve(Service<I, O> delegate, ServiceRequestContext ctx, I req) throws Exception;
}