text:
package org.assertj.db.type;

import org.assertj.db.common.AbstractTest;
import org.junit.Test;

import static org.assertj.core.api.Assertions.assertThat;

/**
 * Tests on the {@code Column} of {@code Table}.
 * <p>
 * These tests are on the values in the {@code Column} got from a {@code Table}.
 * </p>
 *
 * @author Régis Pouiller
 *
 */
public class Table_Columns_Test extends AbstractTest {

  /**
   * This method test the columns got from a {@code Source}.
   */
  @Test
  public void test_columns_with_source_set() {
    Table table = new Table(source, "movie");

    Column columnFromIndex = table.getColumn(1);

    assertThat(columnFromIndex.getName()).isEqualTo("TITLE");
    assertThat(columnFromIndex.getValuesList().get(0).getValue()).isEqualTo("Alien");
    assertThat(columnFromIndex.getValuesList().get(1).getValue()).isEqualTo("The Village");
    assertThat(columnFromIndex.getValuesList().get(2).getValue()).isEqualTo("Avatar");
    assertThat(columnFromIndex.getRowValue(1).getValue()).isEqualTo("The Village");
  }

  /**
   * This method test the columns got from a {@code DataSource}.
   */
  @Test
  public void test_columns_with_datasource_set() {
    Table table = new Table(dataSource, "movie");

    Column columnFromIndex = table.getColumn(1);

    assertThat(columnFromIndex.getName()).isEqualTo("TITLE");
    assertThat(columnFromIndex.getValuesList().get(0).getValue()).isEqualTo("Alien");
    assertThat(columnFromIndex.getValuesList().get(1).getValue()).isEqualTo("The Village");
    assertThat(columnFromIndex.getValuesList().get(2).getValue()).isEqualTo("Avatar");
    assertThat(columnFromIndex.getRowValue(1).getValue()).isEqualTo("The Village");
  }

}


text:
namespace PivotalTrackerDotNet.Domain
{
    public class CountsByStoryState
    {
        public int Delivered { get; set; }
        public int Unscheduled { get; set; }
        public int Rejected { get; set; }
        public int Finished { get; set; }
        public int Unstarted { get; set; }
        public int Planned { get; set; }
        public int Accepted { get; set; }
        public int Started { get; set; }
        public string Kind { get; set; }
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?php

/**
 * Holds the headers of a mail during parsing and allows case insensitive lookup
 * but case sensitive storage.
 *
 * @package Mail
 * @version 1.7beta1
 * @access private
 */
class ezcMailHeadersHolder implements ArrayAccess
{
    /**
     * Holds the mapping between the case insensitive key and the real key.
     *
     * Format: array(lowerCaseKey, mixedCaseKey)
     *
     * @var array(string=>string)
     */
    private $lookup = array();

    /**
     * Holds the normal associative array between keys in correct case and values.
     *
     * Format: array(mixedCaseKey, value)
     *
     * @var array(string=>string)
     */
    private $map = array();

    /**
     * Constructs a new case insensitive associtive array formed around the array
     * $map with mixed case keys.
     *
     * @param array(string=>string) $map
     */
    public function __construct( array $map = array() )
    {
        $this->map = $map;
        foreach ( $map as $key => $value )
        {
            $this->lookup[strtolower( $key )] = $key;
        }
    }

    /**
     * Returns true if the $key exists in the array.
     *
     * @param string $key
     * @return bool
     */
    public function offsetExists( $key )
    {
        return array_key_exists( strtolower( $key ), $this->lookup );
    }

    /**
     * Returns the value recognized with $key.
     *
     * @param string $key
     * @return mixed
     */
    public function offsetGet( $key )
    {
        $key = strtolower( $key );
        if ( !array_key_exists( $key, $this->lookup ) )
        {
            return null;
        }
        return $this->map[$this->lookup[$key]];
    }

    /**
     * Sets the offset $key to the value $value.
     *
     * If it is a new entry the case in $key will be stored. If the $key exists already
     * using a case insensitive lookup the new spelling will be discarded.
     *
     * @param string $key
     * @param mixed $value
     */
    public function offsetSet( $key, $value )
    {
        $lowerKey = strtolower( $key );
        if ( !array_key_exists( $lowerKey, $this->lookup ) )
        {
            $this->map[$key] = $value;
            $this->lookup[$lowerKey] = $key;
        }
        else // use old case
        {
            $this->map[$this->lookup[$lowerKey]] = $value;
        }
    }

    /**
     * Unsets the key $key.
     *
     * @param string $key
     */
    public function offsetUnset( $key )
    {
        $key = strtolower( $key );
        if ( array_key_exists( $key, $this->lookup ) )
        {
            unset( $this->map[$this->lookup[$key]] );
            unset( $this->lookup[$key] );
        }
    }

    /**
     * Returns a copy of the associative array with the case of the keys preserved.
     *
     * @return array(string=>string)
     */
    public function getCaseSensitiveArray()
    {
        return $this->map;
    }
}
?>


text:
/**
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
/**
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package com.github.pires.obd.commands.mikolaj;

import com.github.pires.obd.commands.ObdCommand;
import com.github.pires.obd.enums.AvailableCommandNames;
import com.github.pires.obd.enums.ObdStandard;

public class ObdStandardObdCommand extends ObdCommand {

    private int obdstandard = 0;
    /**
     * Default ctor.
     */
    public ObdStandardObdCommand() {
        super("01 1C");
    }

    /**
     * Copy ctor.
     *
     * @param other a {@link FreezeDTCObdCommand} object.
     */
    public ObdStandardObdCommand(ObdStandardObdCommand other) {
        super(other);
    }

    @Override
    protected void performCalculations() {
        // ignore first two bytes [hh hh] of the response
        obdstandard = buffer.get(2);
    }

    @Override
    public String getFormattedResult() {
        try {
            return ObdStandard.fromValue(obdstandard).getDescription();
        } catch (NullPointerException e) {
            return "-";
        }
    }

    @Override
    public String getCalculatedResult() {
        return String.valueOf(obdstandard);
    }

    @Override
    public String getName() {
        return AvailableCommandNames.OBD_STANDARD.getValue();
    }

}


text:
(function ($) {
    "use strict";

    var ripple = function (e) {

        var el, ink, d, x, y;

        el = $(this);

        el.addClass('ripple');

        if (el.parents('.sidebar-skin-white').length) {
            el.addClass('ripple-dark-fade');
        }

        if (el.parents('.sidebar-skin-dark').length) {
            el.addClass('ripple-light-fade');
        }

        if (el.is('.btn-white')) {
            el.addClass('ripple-dark-fade');
        }

        if (el.attr('href') && ! el.data('toggle')) {
            e.preventDefault();
            if (el.closest('.dropdown-menu').length) {
                e.stopPropagation();
            }
            setTimeout(function () {
                document.location = el.attr('href');
            }, 400);
        }

        // create .ink element if it doesn't exist
        if (el.find(".ink").length === 0)
            el.prepend("");

        ink = el.find(".ink");
        // in case of quick double clicks stop the previous animation
        ink.removeClass("animate");

        // set size of .ink
        if (! ink.height() && ! ink.width()) {
            // use el's width or height whichever is larger for the diameter to make a circle which can cover the entire element.
            d = Math.max(el.outerWidth(), el.outerHeight());
            ink.css({height: d, width: d});
        }

        // get click coordinates
        // logic = click coordinates relative to page - el's position relative to page - half of self height/width to make it controllable from the center;
        x = e.pageX - el.offset().left - ink.width() / 2;
        y = e.pageY - el.offset().top - ink.height() / 2;

        // set the position and add class .animate
        ink.css({top: y + 'px', left: x + 'px'}).addClass("animate");

    };

    var listGroupMenu = $('.list-group-menu > .list-group-item > a'),
        button = $('.btn'),
        navbarNav = $('.navbar-nav > li > a'),
        dropdownMenu = $('.dropdown-menu > li > a'),
        sidebarMenu = $('.sidebar-menu > li > a');

    var addRipple = $()
        .add(listGroupMenu)
        .add(button)
        .add(navbarNav)
        .add(dropdownMenu)
        .add(sidebarMenu);

    if (addRipple.length) {
        addRipple.click(ripple);
    }

})(jQuery);


text:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta name="copyright" content="(C) Copyright 2005" />
<meta name="DC.rights.owner" content="(C) Copyright 2005" />
<meta content="public" name="security" />
<meta content="index,follow" name="Robots" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta content="task" name="DC.Type" />
<meta name="DC.Title" content="Setting up your environment" />
<meta name="abstract" content="Derby includes several scripts that run the Derby tools and utilities. How you run those scripts depends on the configuration that you want to use to access the Derby database and tools." />
<meta name="description" content="Derby includes several scripts that run the Derby tools and utilities. How you run those scripts depends on the configuration that you want to use to access the Derby database and tools." />
<meta scheme="URI" name="DC.Relation" content="cgsinsta.html" />
<meta scheme="URI" name="DC.Relation" content="tgsruntoolsutils.html" />
<meta scheme="URI" name="DC.Relation" content="tgssetupjavaenvir.html" />
<meta scheme="URI" name="DC.Relation" content="rgsderbyrunjarsyntax.html" />
<meta scheme="URI" name="DC.Relation" content="tgs26250.html" />
<meta content="XHTML" name="DC.Format" />
<meta content="tgssetupenvironment" name="DC.Identifier" />
<meta content="en-us" name="DC.Language" />
<link href="commonltr.css" type="text/css" rel="stylesheet" />
<title>Setting up your environment</title>

Setting up your environment

Derby includes
several scripts that run the Derby tools
and utilities. How you run those scripts depends on the configuration that
you want to use to access the Derby database
and tools.

To set up your environment:

Choose the
method that you want to use to run the Derby tools and utilities.

Set the environment
variables.

Choosing a method to run the Derby tools and startup utilities

There are several ways that you can run the Derby tools and startup utilities.

Setting the environment variables

There are several environment variables that must be set depending on the method that you selected to run the Derby tools and startup utilities.

Syntax for the derbyrun.jar file

The derbyrun.jar file is a special JAR file that simplifies how you invoke the Derby tools and the Network Server.

Manually setting the CLASSPATH environment variable

You can set the CLASSPATH environment variable in the operating system either temporarily, permanently, or at run time when you start your Java application and the JVM.

Parent topic: Installing and configuring Derby


text:
<!DOCTYPE html>
<html>
<head></head>
<body>
<object width="400" height="400">
  <param name="movie" value="themovie.swf" />
</object>

<object width="200" height="200">
  <param name="SRC" value="theothermovie.swf" />
</object>

<object data="yetanothermovie.swf"></object>
</body>
</html>


text:
export default function routes($stateProvider) {
  'use strict';

  return $stateProvider
    .state('root.dashboard', {
      url: '/dashboard',
      access: {allowAnonymous: true},
      templateUrl: 'modules/dashboard/partials/dashboard.html',
      controller: 'DashboardController as dc',
      content: {
        title: 'Dashboard',
        subtitle: 'Control panel'
      }
    })
    .state('root.widgets', {
      url: '/widgets',
      templateUrl: 'modules/dashboard/partials/widgets.html',
      content: {
        title: 'Widgets',
        subtitle: 'Preview page'
      }
    })
    .state('root.calendar', {
      url: '/calendar',
      templateUrl: 'modules/dashboard/partials/calendar.html',
      content: {
        title: 'Calendar',
        subtitle: 'Control panel'
      }
    })
    .state('root.mailbox', {
      url: '/mailbox',
      templateUrl: 'modules/dashboard/partials/mailbox.html',
      content: {
        title: 'Mailbox',
        subtitle: 'mail page'
      }
    });
}


text:
has-nexus6-on-moto
===
Pushbullet API token should placed in a file named .secret-api-token.


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

import com.facebook.presto.spi.block.Block;
import com.facebook.presto.spi.block.BlockBuilder;
import com.facebook.presto.spi.type.Type;
import org.apache.druid.segment.ColumnValueSelector;

import static com.facebook.presto.spi.type.DoubleType.DOUBLE;
import static com.google.common.base.Preconditions.checkArgument;
import static java.util.Objects.requireNonNull;

public class DoubleColumnReader
        implements ColumnReader
{
    private final ColumnValueSelector<Double> valueSelector;

    public DoubleColumnReader(ColumnValueSelector valueSelector)
    {
        this.valueSelector = requireNonNull(valueSelector, "value selector is null");
    }

    @Override
    public Block readBlock(Type type, int batchSize)
    {
        checkArgument(type == DOUBLE);
        BlockBuilder builder = type.createBlockBuilder(null, batchSize);
        for (int i = 0; i < batchSize; i++) {
            type.writeDouble(builder, valueSelector.getDouble());
        }

        return builder.build();
    }
}


text:
"use strict";
let datafire = require('datafire');
let openapi = require('./openapi.json');
module.exports = datafire.Integration.fromOpenAPI(openapi, "apitore_kmeansclusteringbyword2vec");


text:
namespace bombali.tests.integration.infrastructure.app.settings
{
    using bombali.infrastructure.app.settings;
    using MbUnit.Framework;

    public class EmailConfigurationCollectionSpecs
    {

        [TestFixture]
        public class When_getting_the_email_configuration_collection
        {
            EmailConfigurationCollection _config;

            [SetUp]
            public void setup_and()
            {
                _config = BombaliConfiguration.settings.items_to_monitor.Item(2).emails_to_send_to;
            }

            [Test]
            public void Verify_successful_creation()
            {
                Assert.IsNotNull(_config);
            }

            [Test]
            public void should_get_back_three_items_from_the_configuration()
            {
                Assert.AreEqual(3, _config.Count);
            }
        }
    }
}


text:
#ifndef TOKENIZER_H
#define TOKENIZER_H

#include <libjvs/list.h>

#include "tokentype.h"

typedef struct {
    ListNode _node;
    char *file;
    int line;
    int column;
    tkType type;
    union {
        long   l;
        double d;
        bool   b;
        char  *s;
    };
} tkToken;

/*
 * Clear token list <tokens>.
 */
void tokClear(List *tokens);

/*
 * Create tokens from the stream given by <fp> and put them in <tokens>.
 * Returns an error message if something went wrong, otherwise returns NULL.
 */
char *tokStream(FILE *fp, List *tokens);

/*
 * Create tokens from string <text>. Returns an error message if something went
 * wrong, otherwise returns NULL.
 */
char *tokString(char *text, List *tokens);

/*
 * Create tokens from the file <filename>, which is piped through cpp (the C
 * preprocessor) before processing. Returns an error message if something went
 * wrong, otherwise returns NULL.
 */
char *tokFile(const char *filename, List *output);

#endif


text:
using Foundation;
using System;
using System.CodeDom.Compiler;
using UIKit;

namespace MonoTouch.Dialog.Elements.Custom
{
    [Register ("ScanCodeController")]
    partial class ScanCodeController
    {
        void ReleaseDesignerOutlets ()
        {
        }
    }
}


text:
module Pod
  class MasterSource < Source
    # @!group Updating the source
    #-------------------------------------------------------------------------#

    # Updates the local clone of the source repo.
    #
    # @param  [Bool] show_output
    #
    # @return  [Array<String>] changed_spec_paths
    #          Returns the list of changed spec paths.
    #
    def update(show_output)
      if requires_update?
        super
      else
        []
      end
    end

    private

    # Returns whether a source requires updating.
    #
    # @param [Source] source
    #        The source to check.
    #
    # @return [Bool] Whether the given source should be updated.
    #
    def requires_update?
      commit_hash = Dir.chdir(repo) { git_commit_hash }
      GitHub.modified_since_commit('CocoaPods/Specs', commit_hash)
    end
  end
end


text:
export HAVE_DOXYGEN="false"
EXTRA_CONFIGURE_ARGS="\
  --disable-examples \
  --disable-sdltest \
  --${NACL_OPTION}-asm"


text:
package gov.nih.nci.ncicb.webtree;

/*
 * BDWebTree.java
 * Created on 09/26/2002
 * @author  Marc Piparo SAIC
 * @version 1.0
 */

import gov.nih.nci.ncicb.cadsr.common.util.logging.Log;
import gov.nih.nci.ncicb.cadsr.common.util.logging.LogFactory;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;

import javax.swing.tree.DefaultMutableTreeNode;

public class WebTreeFileReader
{
   private static Log log = LogFactory.getLog(WebTreeFileReader.class.getName());
 	private	DefaultMutableTreeNode _root = null;

  public static DefaultMutableTreeNode parseTabbedFile(String fileName, Class callingClass) throws Exception
  {
    // get file stream for file located in this calling classes current classpath
    try
    {
      InputStreamReader myReader = new InputStreamReader(callingClass.getResourceAsStream(fileName));
      return parseTabbedStream(myReader, fileName);
    }
    catch (Exception e)
    {
      throw (new Exception("Error reading file: "+fileName+"  - "+e.toString()));
    }
  }

  public static DefaultMutableTreeNode parseTabbedFile(File dataFile) throws Exception
  {
    try
    {
      InputStreamReader myReader = new InputStreamReader(new FileInputStream(dataFile));
      return parseTabbedStream(myReader, dataFile.getPath());
    }
    catch (Exception e)
    {
      throw (e);
    }

  }

  public static DefaultMutableTreeNode parseTabbedStream(InputStreamReader readStream, String fileName) throws Exception
  {

    DefaultMutableTreeNode treeRoot = null;

    // Buffer the file for parsing using a BufferedReader
    BufferedReader br = new BufferedReader(readStream);

    log.info("Parsing file: "+fileName);

    try
    {
      int totalNodes = 0;
      int prevTabCount = 0;
      DefaultMutableTreeNode prevNode = null;
      String nodeString = null;

      while ( (nodeString = br.readLine()) != null )
      {
        totalNodes++;

        // count leading tabs to determine where to place node and get node name
        String nodeName = "undefined";
        int tabCount = 0;
        int ci = 0;
        boolean done = false;
        while ((ci < nodeString.length()) && !done)
        {
          if (nodeString.charAt(ci) == '\t')
          {
            tabCount++;
          }
          else
          {
            done = true;
            nodeName = nodeString.substring(ci);
          }
          ci++;
        }

        // build a new node
        DefaultMutableTreeNode currentNode = new DefaultMutableTreeNode(new WebNode(String.valueOf(totalNodes), nodeName));

        // if zero tabs, this is a root - point root to this node
        if (tabCount == 0)
        {
          treeRoot = currentNode;
        }
        else if (tabCount == prevTabCount)
        {
          // tab count has not changed, this is a sibling, add node to prev node's parent
          DefaultMutableTreeNode parent = (DefaultMutableTreeNode)prevNode.getParent();
          if (parent != null)
          {
            parent.add(currentNode);
          }
          else
          {
            throw (new Exception("Error parsing file: "+fileName+" - error line #"+totalNodes+"\n"+nodeString));
          }
        }
        else if (tabCount > prevTabCount)
        {
          // tabs increased, this is a child of the prev node, add as child node
          prevNode.add(currentNode);
        }
        else if (tabCount < prevTabCount)
        {
          // tabs decreased, by how much will determine who is this nodes parent.
          int tabDiff = (prevTabCount - tabCount) + 1;

          // loop through parents of previous node
          DefaultMutableTreeNode parent = null;
          for (int i=0; i<tabDiff; i++)
          {
            parent = (DefaultMutableTreeNode) prevNode.getParent();
            prevNode = parent;
          }

          // add to parent determined
          if (parent != null)
          {
            parent.add(currentNode);
          }
          else
          {
            throw (new Exception("Error parsing file: "+fileName+" - error line #"+totalNodes+"\n"+nodeString));
          }
        }

        prevNode = currentNode;
        prevTabCount = tabCount;
      }

    }
    catch (IOException e)
    {
     throw (new Exception("Error parsing file: "+fileName+" - "+e.toString()));
    }

    return treeRoot;
  }

/*
  static DefaultMutableTreeNode parseXMLFile(File dataFile)
  {

  }
*/

}


text:
using base::android::JavaParamRef;

namespace midi {

namespace {

using Callback = UsbMidiDevice::Factory::Callback;

}  // namespace

UsbMidiDeviceFactoryAndroid::UsbMidiDeviceFactoryAndroid() : delegate_(NULL) {}

UsbMidiDeviceFactoryAndroid::~UsbMidiDeviceFactoryAndroid() {
  JNIEnv* env = base::android::AttachCurrentThread();
  if (!raw_factory_.is_null())
    Java_UsbMidiDeviceFactoryAndroid_close(
        env, raw_factory_, base::android::GetApplicationContext());
}

void UsbMidiDeviceFactoryAndroid::EnumerateDevices(
    UsbMidiDeviceDelegate* delegate,
    Callback callback) {
  DCHECK(!delegate_);
  JNIEnv* env = base::android::AttachCurrentThread();
  uintptr_t pointer = reinterpret_cast<uintptr_t>(this);
  raw_factory_.Reset(Java_UsbMidiDeviceFactoryAndroid_create(
      env, base::android::GetApplicationContext(), pointer));

  delegate_ = delegate;
  callback_ = callback;

  if (Java_UsbMidiDeviceFactoryAndroid_enumerateDevices(
          env, raw_factory_, base::android::GetApplicationContext())) {
    // Asynchronous operation.
    return;
  }
  // No devices are found.
  ScopedVector<UsbMidiDevice> devices;
  callback.Run(true, &devices);
}

// Called from the Java world.
void UsbMidiDeviceFactoryAndroid::OnUsbMidiDeviceRequestDone(
    JNIEnv* env,
    const JavaParamRef<jobject>& caller,
    const JavaParamRef<jobjectArray>& devices) {
  size_t size = env->GetArrayLength(devices);
  ScopedVector<UsbMidiDevice> devices_to_pass;
  for (size_t i = 0; i < size; ++i) {
    base::android::ScopedJavaLocalRef<jobject> raw_device(
        env, env->GetObjectArrayElement(devices, i));
    devices_to_pass.push_back(new UsbMidiDeviceAndroid(raw_device, delegate_));
  }

  callback_.Run(true, &devices_to_pass);
}

// Called from the Java world.
void UsbMidiDeviceFactoryAndroid::OnUsbMidiDeviceAttached(
    JNIEnv* env,
    const JavaParamRef<jobject>& caller,
    const JavaParamRef<jobject>& device) {
  delegate_->OnDeviceAttached(
      base::MakeUnique<UsbMidiDeviceAndroid>(device, delegate_));
}

// Called from the Java world.
void UsbMidiDeviceFactoryAndroid::OnUsbMidiDeviceDetached(
    JNIEnv* env,
    const JavaParamRef<jobject>& caller,
    jint index) {
  delegate_->OnDeviceDetached(index);
}

bool UsbMidiDeviceFactoryAndroid::RegisterUsbMidiDeviceFactory(JNIEnv* env) {
  return RegisterNativesImpl(env);
}

}  // namespace midi


text:
<resources>
    <!--
    To get one, follow this link, follow the directions and press "Create" at the end:

    https://console.developers.google.com/flows/enableapi?apiid=maps_android_backend&keyType=CLIENT_SIDE_ANDROID&r=5F:A7:0C:C6:08:1B:C8:7F:2A:CA:13:C6:85:B0:63:D0:FC:B3:C9:3A%3Bcom.example.eryk.aircar

    You can also add your credentials to an existing key, using this line:
    5F:A7:0C:C6:08:1B:C8:7F:2A:CA:13:C6:85:B0:63:D0:FC:B3:C9:3A;com.example.eryk.aircar

    Alternatively, follow the directions here:
    https://developers.google.com/maps/documentation/android/start#get-key

    Once you have your key (it starts with "AIza"), replace the "google_maps_key"
    string in this file.
    -->
    <string name="google_maps_key" templateMergeStrategy="preserve" translatable="false">
        AIzaSyANtUNdAB9_ljOmtvUmUKFSRPun5GLRyAQ
    </string>
</resources>


text:
[![NPM version](https://img.shields.io/npm/v/more-text.svg?style=flat)](https://www.npmjs.org/package/more-text)
[![Build status](https://img.shields.io/travis/lisposter/node-more-text.svg?style=flat)](https://travis-ci.org/lisposter/node-more-text)

[more text](http://more.handlino.com/api) for node

## Installation

```bash
$ npm install more-text
```

## Example
```js
moreText(2, [1, 5], function(err, data) {
    console.log(data)
});
```
`data` may looks like:

```js
{ sentences: [ '什麼?', '天下無敵。' ] }
```

## Usage
```js
moreText(n, limit, callback)
```

* `n`: how many sentences you need.
* `limit`(array/string/number):  limit the words number of each sentence.
    * if array has two elements, all the sentences' word number will between first element and the second element.
    * if there is only one element, it indicate the maxium number of words.
    * you can also pass an string or number to assign the limit:
        * `1`
        * `'1,10'`
        * `'5'`
* `callback(err, result)`: callback will be passed two arguments:
    * `err`: error cataching
    * `result`: the response

## License

MIT © [Leigh Zhu](#)


text:
load("robert.js");

var glycan = buildRobertsGlycan();

for (var i = 0; i < glycan.residueCount; i++) {
    var residue = glycan.residues(i);
    print("residue:", residue.name);
    for (var j = 0; j < residue.size; j++) {
        var atom = residue.atoms(j);
        print(" > ", atom.name, atom.type, atom.charge);
    }
}


text:
#include "d5d.h"

// {567FAD13-AF54-45EC-BD70-AD60FA1C2CA4}
MY_DEFINE_GUID(CLSID_ModuleD5D, 0x567fad13, 0xaf54, 0x45ec, 0xbd, 0x70, 0xad, 0x60, 0xfa, 0x1c, 0x2c, 0xa4);

PluginStartupInfo Info;
FARSTANDARDFUNCTIONS FSF;

D5DModule *pModule;

int OnInitialize (StartupInfo *pInfo)
{
	Info = pInfo->Info;
	FSF = *pInfo->Info.FSF;

	pModule = new D5DModule;
	pModule->Load();

	return NAERROR_SUCCESS;
}

int OnFinalize ()
{
	delete pModule;
	return NAERROR_SUCCESS;
}

int OnQueryArchive (QueryArchiveStruct *pQAS)
{
	bool bMoreArchives = false;

	const ArchiveQueryResult* pResult = pModule->QueryArchive(pQAS, bMoreArchives);

    if ( pResult )
	{
		pQAS->uidFormat = pResult->uidFormat;
		pQAS->uidPlugin = pResult->uidPlugin;

		if ( bMoreArchives )
			pQAS->dwFlags |= QUERY_FLAG_MORE_ARCHIVES;

		pQAS->bResult = true;
	}

	return NAERROR_SUCCESS;
}

int OnOpenArchive(OpenCreateArchiveStruct *pOAS)
{
	pOAS->hResult = (HANDLE)pModule->OpenArchive(pOAS->uidPlugin, pOAS->uidFormat, pOAS->lpFileName, pOAS->hCallback, pOAS->pfnCallback);
	return NAERROR_SUCCESS;
}

int OnCloseArchive(CloseArchiveStruct *pCAS)
{
	pModule->CloseArchive(pCAS->uidPlugin, (D5DArchive*)pCAS->hArchive);
	return NAERROR_SUCCESS;
}

int OnGetArchiveModuleInfo (ArchiveModuleInfo *ai)
{
	ai->uid = pModule->GetUID();
	ai->uPlugins = pModule->GetNumberOfPlugins();
	ai->pPlugins = pModule->GetPlugins();
	ai->dwFlags = AMF_SUPPORT_SINGLE_PLUGIN_QUERY;

	return NAERROR_SUCCESS;
}

int OnGetArchiveItem (GetArchiveItemStruct *pGAI)
{
	D5DArchive *pArchive = (D5DArchive*)pGAI->hArchive;
	pGAI->nResult = pArchive->GetArchiveItem (pGAI->pItem);

	return NAERROR_SUCCESS;
}

bool OnFreeArchiveItem(FreeArchiveItemStruct *pFAI)
{
	D5DArchive* pArchive = (D5DArchive*)pFAI->hArchive;
	pFAI->bResult = true;
	pArchive->FreeArchiveItem(pFAI->pItem);

	return NAERROR_SUCCESS;
}

int OnExtract(ExtractStruct *pES)
{
	D5DArchive *pArchive = (D5DArchive *)pES->hArchive;

	pES->bResult = pArchive->Extract (
			pES->pItems,
			pES->nItemsNumber,
			pES->lpDestPath,
			pES->lpCurrentPath
			);

	return NAERROR_SUCCESS;
}

int OnStartOperation(OperationStruct* pSOS)
{
	D5DArchive* pArchive = (D5DArchive*)pSOS->hArchive;
	pSOS->bResult = pArchive->StartOperation(pSOS->nOperation, pSOS->bInternal);

	return NAERROR_SUCCESS;
}

int OnEndOperation(OperationStruct* pEOS)
{
	D5DArchive* pArchive = (D5DArchive*)pEOS->hArchive;
	pEOS->bResult = pArchive->EndOperation(pEOS->nOperation, pEOS->bInternal);

	return NAERROR_SUCCESS;
}

int __stdcall ModuleEntry (
		int nFunctionID,
		void *pParams
		)
{
	switch ( nFunctionID ) {

	case FID_INITIALIZE:
		return OnInitialize ((StartupInfo*)pParams);

	case FID_FINALIZE:
		return OnFinalize ();

	case FID_QUERYARCHIVE:
		return OnQueryArchive ((QueryArchiveStruct*)pParams);

	case FID_OPENARCHIVE:
		return OnOpenArchive((OpenCreateArchiveStruct*)pParams);

	case FID_CLOSEARCHIVE:
		return OnCloseArchive ((CloseArchiveStruct*)pParams);

	case FID_GETARCHIVEMODULEINFO:
		return OnGetArchiveModuleInfo ((ArchiveModuleInfo*)pParams);

	case FID_FREEARCHIVEITEM:
		return OnFreeArchiveItem((FreeArchiveItemStruct*)pParams);

	case FID_GETARCHIVEITEM:
		return OnGetArchiveItem ((GetArchiveItemStruct*)pParams);

	case FID_EXTRACT:
		return OnExtract ((ExtractStruct*)pParams);

	case FID_STARTOPERATION:
		return OnStartOperation((OperationStruct*)pParams);

	case FID_ENDOPERATION:
		return OnEndOperation((OperationStruct*)pParams);
	}

	return NAERROR_NOTIMPLEMENTED;
}

#if defined(__GNUC__)
#ifdef __cplusplus
extern "C"{
#endif
	BOOL WINAPI DllMainCRTStartup (HANDLE hDll, DWORD dwReason, LPVOID lpReserved);
#ifdef __cplusplus
};
#endif

BOOL WINAPI DllMainCRTStartup (HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
{
	(void)hDll;
	(void)dwReason;
	(void)lpReserved;                                              s
	return TRUE;
}

#else

HINSTANCE hinst;

BOOL __stdcall DllMain (
		HINSTANCE hinstDLL,
		DWORD fdwReason,
		LPVOID lpvReserved
		)
{
	hinst = hinstDLL;
	return true;
}

#endif


text:
var request = require("request");

// **** ENTER YOUR DETAILS HERE ****

// Enter your Comapi API Space Id here e.g. 11164198-3f3f-4993-ab8f-70680c1113b1
var yourComapiAPISpaceId = 'YOUR_API_SPACE_ID';

// Enter your Comapi access token here
var yourComapiAccessToken = 'YOUR_ACCESS_TOKEN';

// Enter your mobile number in international format here e.g. for the UK 447123123123
var yourMobileNumber = 'YOUR_MOBILE_NUMBER';

console.log('');
console.log('Sending SMS using Comapi and NodeJS');
console.log('-----------------------------------');

// Create Comapi RESTful URL with API Space Id in it
var comapiUrl = "https://api.comapi.com/apispaces/" + yourComapiAPISpaceId + "/messages";

// Setup Comapi request JSON
var myRequest = {
    body: 'Your SMS message',
    to: { phoneNumber: yourMobileNumber },
    channelOptions: {
        sms: {
            from: 'Comapi',
            allowUnicode: true
        }
    },
    rules: ['sms']
};

// Call Comapi "One" API
var options = {
    method: 'POST',
    url: comapiUrl,
    headers:
    {
        'cache-control': 'no-cache',
        'content-type': 'application/json',
        'accept': 'application/json',
        authorization: 'Bearer ' + yourComapiAccessToken
    },
    body: myRequest,
    json: true
};

// Send the request
console.log('');
console.log('Calling Comapi...');

request(options, function (error, response, body) {
    if (error) throw new Error(error);

    console.log("HTTP status code returned: " + response.statusCode);

    // Check status
    if (response.statusCode == 201)
    {
        // All ok
        console.log('SMS message successfully sent via Comapi "One" API');
    }
    else
    {
        // Something went wrong
        console.log('Something went wrong!');
    }

    console.log(body);
});


text:
from website import Website
from poll import Poll
import threading
from pprint import pprint
import time
import sys
import os
import config
from utils import logutils, urlutils
import gc
import codecs
import json
from utils import queueconnection

poll = Poll([])

# TEST WEBSITES
websites = [
            '{"domain":"http://info-aschaffenburg.de"}',
            '{"domain":"http://3dhouse.ir"}',
            '{"domain":"http://tvblast.tv"}',
            '{"domain":"http://templatekunena.com"}',
            '{"domain":"http://unionvgf.com"}',
            '{"domain":"http://racheldinh.com"}',
            '{"domain":"www.rakuten.co.jp"}',
            '{"domain":"http://www.webcentric.co.rs"}',
            '{"domain":"fakenumber.org/australia/"}'
]

# for i in range(0,1000):
#     websites.append('{"domain":"http://thewebminer.com"}')

estimatedRequestsNumber = 0
requestLimit = 10000000
restart = False

def checkRestartCondition():
    global restart
    memory = logutils.getMemory()
    if estimatedRequestsNumber >= requestLimit:
        print('RESTART REASON: Request number is big, Memory:', memory)
        restart = True
    if memory > config.usedMemoryMaxPercent:
        restart = True
        print('RESTART REASON: Memory is over estimations Memory:', memory)
    return restart

def feeder():
    global restart, poll
    while not checkRestartCondition():
        if len(poll) < config.minPollSize:
            # print('GET A NEW BATCH OF LINKS')
            for i in range(config.minPollSize*2):
                if config.debug:
                    try:
                        website = websites.pop()
                    except:
                        website = ''
                else:
                    try:
                        website = queueconnection.pop(config.seedCollection)
                    except Exception as e:
                        logutils.log('Exception read queue', logutils.format_exception(e))
                        continue

                if website:
                    website = json.loads(website)
                    domain = website['domain']

                    if not (domain.startswith('http://') or domain.startswith('https://')):
                        domain = 'http://' + domain

                    if 'alexarank' in website:
                        poll.add(Website(domain, {"alexarank": website['alexarank']}))
                    else:
                        poll.add(Website(domain))

        # time.sleep(2)

def emergencyFeeder():
    global poll
    while len(poll) > 0:
        website = poll.pop()
        if website:
            item = {}
            domain =  urlutils.getDomain(website.startUrl)
            if "www." in domain:
                domain = domain.replace("www.","")
            item['domain'] = domain
            if 'alexarank' in website.initialMeta:
                item['alexarank'] = website.initialMeta['alexarank']
            queueconnection.push(config.seedCollection, json.dumps(item))

def doRestart(message):
    emergencyFeeder()
    print(message,flush=True)
    os.execv(sys.executable, [sys.executable] + sys.argv)

def crawl():
    global estimatedRequestsNumber, poll
    while not restart:
        if len(poll) == 0:
            time.sleep(5)
            # print('wait for poll')
        website = poll.getWebsite()
        if website:
            try:
                website.crawlNextUrl()
                estimatedRequestsNumber += 1
                website.inProgress = False
            except Exception as e:
                website.fails += 1
                website.inProgress = False
                logutils.log('Exception', logutils.format_exception(e))
                if config.debug:
                    raise e
            if website.fails >= config.maxWebsiteFails:
                try:
                    # poll.remove(website)
                    # FORCE ENDING
                    website.ended = True
                except Exception as e:
                    logutils.log('Exception', logutils.format_exception(e))

def monitor():
    lastEstimatedRequestNumber = estimatedRequestsNumber

    while not restart:
        memory = logutils.getMemory()
        dif = estimatedRequestsNumber - lastEstimatedRequestNumber
        print(round(dif / config.reportInterval, 2), ' RPS ', round(memory, 2), '% memory ', len(poll), ' poll', flush=True)
        lastEstimatedRequestNumber = estimatedRequestsNumber
        time.sleep(config.reportInterval)

if __name__ == '__main__':
    try:
        threads = []
        # # Start Compiler
        # from utils.compiler import comp
        # print("Starting compiler")
        # comp.loadRe()
        # Start feeder
        print('start feeder', flush=True)
        feederThread = threading.Thread(target=feeder)
        feederThread.daemon = True
        feederThread.start()
        threads.append(feederThread)
        time.sleep(10)

        # monitor thread
        thread = threading.Thread(target=monitor)
        thread.daemon = True
        thread.start()
        threads.append(thread)

        # Start crawling threads
        print('start crawling', flush=True)

        for i in range(config.threadsNumber):
            thread = threading.Thread(target=crawl)
            thread.daemon = True
            thread.start()
            threads.append(thread)

        for t in threads:
            t.join()

        # call GC
        gc.collect()

        # The end...
        if restart:
            doRestart('EXPLICIT RESTART')
        else:
            doRestart('IMPLICIT RESTART')
    except KeyboardInterrupt:
        restart = True
        print('SAVE WEBSITES', flush=True)
        emergencyFeeder()


text:
using System.ComponentModel;
using System.Runtime.Serialization;

namespace ChargeBee.Models.Enums
{
    public enum DunningTypeEnum
    {

        [EnumMember(Value = "Unknown Enum")]
        UnKnown, /*Indicates unexpected value for this enum. You can get this when there is a
                dotnet-client version incompatibility. We suggest you to upgrade to the latest version */

        [EnumMember(Value = "auto_collect")]
         AutoCollect,

        [EnumMember(Value = "offline")]
         Offline,

        [EnumMember(Value = "direct_debit")]
         DirectDebit,

    }
}


text:
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;

namespace iWay.PopStar
{
    public static class StartScreen
    {
        static Vector2 strpos = new Vector2(240 - Fonts.Author.MeasureString("Designed By iWay").X / 2, 525);

        static Rectangle newGameRect = new Rectangle(0, -60, 0, 0);
        static Rectangle resumeRect = new Rectangle(0, -60, 0, 0);

        public static void Show()
        {
            FireworksManager.Play();
            ScreenManager.ShowScreen(GameState.Start);
        }

        static MouseState prvMouseState;

        public static void Update(GameTime gameTime)
        {
            MouseState state = Mouse.GetState();
            FireworksManager.Update(gameTime);
            newGameRect.Width = Textures.NewGame.Width;
            newGameRect.Height = Textures.NewGame.Height;
            newGameRect.X = 240 - Textures.NewGame.Width / 2;
            newGameRect.Y = 250;
            if (state.X > newGameRect.X && state.X < newGameRect.X + newGameRect.Width &&
                state.Y > newGameRect.Y && state.Y < newGameRect.Y + newGameRect.Height)
            {
                if (state.LeftButton == ButtonState.Pressed)
                {
                    newGameRect.Inflate(-16, -5);
                }
                else
                {
                    newGameRect.Inflate(16, 5);
                    if (prvMouseState.LeftButton == ButtonState.Pressed)
                    {
                        Sounds.Play("MouseClick");
                        FireworksManager.Stop();
                        PlayData.CurrentScore = 0;
                        PlayData.Stage = 1;
                        PlayData.TargetScore = 1000;
                        TargetScoreScreen.Reset(true);
                        ScreenManager.ShowScreen(GameState.Target);
                    }
                }
            }
            resumeRect.Width = Textures.Resume.Width;
            resumeRect.Height = Textures.Resume.Height;
            resumeRect.X = 240 - Textures.Resume.Width / 2;
            resumeRect.Y = 350;
            if (state.X > resumeRect.X && state.X < resumeRect.X + resumeRect.Width &&
                state.Y > resumeRect.Y && state.Y < resumeRect.Y + resumeRect.Height)
            {
                if (state.LeftButton == ButtonState.Pressed)
                {
                    resumeRect.Inflate(-16, -5);
                }
                else
                {
                    resumeRect.Inflate(16, 5);
                    if (prvMouseState.LeftButton == ButtonState.Pressed)
                    {
                        Sounds.Play("MouseClick");
                        FireworksManager.Stop();
                        TargetScoreScreen.Reset(false);
                        ScreenManager.ShowScreen(GameState.Target);
                    }
                }
            }
            prvMouseState = state;
        }

        public static void Draw(SpriteBatch spriteBatch)
        {
            FireworksManager.Draw(spriteBatch);
            spriteBatch.Draw(Textures.GameLogo, new Vector2(40, 40), Color.White);
            string best = "Best Score : " + PlayData.BestScore;
            Vector2 size = Fonts.Author.MeasureString(best);
            Vector2 pos = new Vector2(240 - size.X / 2, 170);
            spriteBatch.DrawString(Fonts.Author, best, pos, Color.Red);
            spriteBatch.DrawString(Fonts.Author, "Designed By iWay", strpos, Color.Red);
            spriteBatch.Draw(Textures.NewGame, newGameRect, Color.White);
            spriteBatch.Draw(Textures.Resume, resumeRect, Color.White);
        }
    }
}


text:
package us.gov.dod.standard.ssrf._3_1.metadata.lists;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
import us.gov.dod.standard.ssrf._3_1.receiver.Curve;

/**
 * Enumerated values for fields using the ListCCT type.
 *

 * Used in {@link Curve}
 *

 * @author Key Bridge LLC <developer@keybridge.ch>
 * @version 3.1.0, 04/02/2015
 */
@XmlType(name = "ListCCT")
@XmlEnum
public enum ListCCT {

  @XmlEnumValue("Filter")
  FILTER("Filter"),
  @XmlEnumValue("Selectivity-IF1")
  SELECTIVITY_IF_1("Selectivity-IF1"),
  @XmlEnumValue("Selectivity-IF2")
  SELECTIVITY_IF_2("Selectivity-IF2"),
  @XmlEnumValue("Selectivity-IF3")
  SELECTIVITY_IF_3("Selectivity-IF3"),
  @XmlEnumValue("Selectivity-IF4")
  SELECTIVITY_IF_4("Selectivity-IF4"),
  @XmlEnumValue("Selectivity-IF5")
  SELECTIVITY_IF_5("Selectivity-IF5"),
  @XmlEnumValue("Selectivity-Overall")
  SELECTIVITY_OVERALL("Selectivity-Overall"),
  @XmlEnumValue("Selectivity-RF")
  SELECTIVITY_RF("Selectivity-RF"),
  @XmlEnumValue("Tx RF Spectrum")
  TX_RF_SPECTRUM("Tx RF Spectrum");
  private final String value;

  ListCCT(String v) {
    value = v;
  }

  public String value() {
    return value;
  }

  public static ListCCT fromValue(String v) {
    for (ListCCT c : ListCCT.values()) {
      if (c.value.equals(v)) {
        return c;
      }
    }
    throw new IllegalArgumentException(v);
  }

}


text:
using System;
using Merlin.Testing.TypeSample;

namespace Merlin.Testing.BaseClass {
    public struct EmptyStruct { }
    public enum EmptyEnum { }

    public class EmptyClass { }
    public class EmptyGenericClass<T> { }

    public class EmptyTypeGroup1<T> { }
    public class EmptyTypeGroup1<K, V> { }

    public class EmptyTypeGroup2 { }
    public class EmptyTypeGroup2<T> { }

    public sealed class SealedClass { }

    public interface IEmpty { }
    public interface IGenericEmpty<T> { }

    public interface IInterfaceGroup1 { }
    public interface IInterfaceGroup1<T> { }

    public interface IInterfaceGroup2 { }
    public interface IInterfaceGroup2<T> { }

    public delegate void EmptyDelegate();

    public interface INotEmpty {
        event EmptyDelegate D;
        void M1();
        void M2(ref int arg);
        int P { get; set; }
        int this[int index] { get; set; }
    }

    public abstract class AbstractEmptyClass { }
    public abstract class AbstractNotEmptyClass {
        public virtual void M1() { }
        public abstract void M2();
        public void M3() { }

        public virtual int P {
            get { return 1; }
            set { }
        }
    }

    public interface IInterface21 { int m21(); }
    public interface IInterface22 { int m22(); }
    public interface IInterface23 { int m23(); }
    public interface IInterface24 : IInterface21 { int m24(); }
    public interface IInterface25 : IInterface24, IInterface21, IInterface22 { int m25(); }
    public interface IInterface26 { int m26(); }

    public class Class41 { public int m41() { return 41; } }
    public class Class42 { public virtual int m42() { return 42; } }
    public interface IInterface42 { int m42(); }

    public class Class43 : IInterface26 { public int m26() { return 43; } }
    public class Class44 : IInterface26 { public virtual int m26() { return 44; } }

    public interface IInterface110a { int m110(); }
    public interface IInterface110b { int m110(int arg); }
    public interface IInterface110c : IInterface110a, IInterface110b { }

    public abstract class Class200a { public abstract int m200(); }
    public class Class200b : Class200a {
        public override int m200() { return 200; }
    }

    public class Class210a { public virtual int m210() { return 210; } }
    public class Class210b : Class210a { new public virtual int m210() { return 211; } }
    public class Class210c : Class210a { public override int m210() { return 212; } }
    public class Class210d : Class210a { }
    public class Class210e : Class210a { public sealed override int m210() { return 214; } }

    public class Class215a { protected virtual int m215() { return 215; } }
    public class Class215b : Class215a { new protected virtual int m215() { return 216; } }
    public class Class215c : Class215a { protected override int m215() { return 217; } }
    public class Class215d : Class215a { }
    public class Class215e : Class215a { protected sealed override int m215() { return 218; } }

    public partial class Callback {
        public static int On(Class210a arg) { return arg.m210(); }
    }

    public interface IInterface250 { int m250<T>(T arg); }
    public interface IInterface251 {
        int m251(int arg);
        int m251<T>(T arg);
    }

    public interface IInterface260<T> { int m260(); }

    public abstract class Class300 { public abstract int m300<T>(); }

    public class Class310 {
        public virtual int m310a<T>(T arg) { return 1; }
        public int m310b<K, V>(K arg1, V arg2) { return 2; }

        public int m310c(int arg) { return 3; }
        public int m310c<T>(int arg) { return 4; }
    }

    public class Class320<T> {
        public virtual int m320(T arg) { return 11; }
    }

    public class Class500 {
        public static int m500a() { return 501; }
        public static int m500b<T>() { return 502; }

        public static int m500c() { return 503; }
        public static int m500c<T>() { return 504; }

        public static int m500d<T>() { return 505; }
        public static int m500d<K, V>() { return 506; }
    }

    public interface IInterface600 {
        void m_a(ref int arg);
        void m_b(out int arg);
        void m_c(int[] arg);
        void m_d(params int[] arg);

        int m_e();
        void m_f();

        int m_g(ref int arg1, int arg2);
        int m_h(out int arg1, ref int arg2);

        int m_l(ref int arg1, out int arg2, int arg3, params int[] arg4);
        int m_k(ref int arg1, out int arg2, int arg3, int[] arg4);
    }

    // property inheritance
    public interface IProperty10 {
        int IntProperty { get; set; }
    }
    public interface IProperty11 {
        string StrProperty { get; }
    }
    public interface IProperty12 {
        double DoubleProperty { set; }
    }
    public interface IIndexer20 {
        // overload
        string this[int index] { get; set; }
        string this[int index1, int index2] { get; set; }
    }
    public interface IIndexer21 {
        int this[int index] { get; }
    }
    public interface IIndexer22 {
        double this[int index] { set; }
    }

    public class CProperty30 {
        protected int _p;
        public virtual int Property {
            get { return _p; }
            set { _p = value + 20; }
        }
    }
    public abstract class CProperty31 {
        public abstract int Property { get; set; }
    }

    public class CProperty32 : CProperty30 {
        public sealed override int Property {
            get { return _p - 4; }
            set { _p = value + 40; }
        }
    }
    public class CProperty33 {
        static int _p;
        public static int Property {
            get { return _p; }
            set { _p = value + 60; }
        }
    }
    public class CIndexer40 {
        int[] array = new int[] { 1, 2, 3, 4, 5, 6, 7 };
        public virtual int this[int index] {
            get { return array[index]; }
            set { array[index] = value; }
        }
    }

    public partial class Callback {
        public static void On1(IIndexer20 arg) {
            arg[1] = arg[1].ToLower();
            arg[2] = arg[2].ToUpper();
        }
        public static void On2(IIndexer20 arg) {
            arg[1, 2] = arg[3, 4] + "inside clr";
        }
        public static void On(CProperty30 arg) {
            arg.Property += 200;
        }
        public static void On(CProperty31 arg) {
            arg.Property += 100;
        }
        public static void On(CProperty32 arg) {
            arg.Property += 400;
        }
        public static void On(CIndexer40 arg) {
            arg[0] = arg[1] + 10;
        }
    }

    // event inheritance

    public interface IEvent10 {
        event Int32Int32Delegate Act;
    }

#pragma warning disable 0067
    public class CEvent40 {
        public event Int32Int32Delegate Act;
    }

    public class C : IEvent10 {
        public event Int32Int32Delegate Act;
    }
#pragma warning restore

    public partial class Callback {
        public static void On(IEvent10 arg) {
            arg.Act += new Int32Int32Delegate(arg_Act);
        }

        static int arg_Act(int arg) {
            Console.WriteLine(arg);
            return arg;
        }
    }

    // ctor
    public class CCtor10 {
        public CCtor10() { Flag.Set(42); }
    }
    public class CCtor20 {
        public CCtor20(int arg) { Flag.Set(arg); }
    }
    public class CCtor21 {
        public CCtor21(ref int arg) { Flag.Set(arg); arg *= 10; }
    }
    public class CCtor22 {
        public CCtor22(out int arg) { arg = 20; }
    }
    public class CCtor30 {
        public CCtor30(int[] args) { if (args == null) Flag.Set(-10); else Flag.Set(Helper.Sum(args)); }
    }
    public class CCtor31 {
        public CCtor31(params int[] args) {
            if (args == null) Flag.Set(-40);
            else if (args.Length == 0) Flag.Set(-20);  // explicit special casing here
            else Flag.Set(Helper.Sum(args));
        }
    }
    public class CCtor32 {
        public CCtor32(int arg1, params int[] args) { Flag.Set(arg1 + Helper.Sum(args)); }
    }

    public class CCtor40 {
        public CCtor40(int arg1, int arg2, int arg3, int arg4, int arg5) { Flag.Set(arg1 * 10000 + arg2 * 1000 + arg3 * 100 + arg4 * 10 + arg5); }
    }

    // ctor overloads
    public class CCtor50 {
        public CCtor50(int arg) { Flag.Set(arg); }
        public CCtor50(int arg1, int arg2) { Flag.Set(arg1 + arg2); }
    }

    public class CCtor51 {
        public CCtor51(int arg) { Flag.Set(10); }
        public CCtor51(params int[] args) { Flag.Set(20); }
    }

    // long hierarchy scenarios
    public class CType10 { public virtual void m1() { Flag.Set(10); } }
    public abstract class CType11 : CType10 { public abstract void m2(); }

    public interface IType20 { void m1();}
    public abstract class CType21 : IType20 {
        public abstract void m1();
        public abstract void m2();
    }

    public partial class Callback {
        public static void On(CType11 arg) { arg.m1(); }
        public static void On(CType21 arg) { arg.m1(); }
    }
}

namespace Merlin.Testing.Accessibility {
#pragma warning disable 0067, 0649
    public class CliClass {
        private static int private_static_field;
        private static int private_static_property {
            get { return private_static_field; }
            set { private_static_field = value; }
        }
        private static string private_static_method() { return "private_static"; }
        private static event System.EventHandler private_static_event;
        private static class private_static_nestedclass { }
        private int private_instance_field;
        private int private_instance_property {
            get { return private_instance_field; }
            set { private_instance_field = value; }
        }
        private string private_instance_method() { return "private_instance"; }
        private event System.EventHandler private_instance_event;
        private class private_instance_nestedclass { }
        internal static int internal_static_field;
        internal static int internal_static_property {
            get { return private_static_field; }
            set { private_static_field = value; }
        }
        internal static string internal_static_method() { return "internal_static"; }
        internal static event System.EventHandler internal_static_event;
        internal static class internal_static_nestedclass { }
        internal int internal_instance_field;
        internal int internal_instance_property {
            get { return private_instance_field; }
            set { private_instance_field = value; }
        }
        internal string internal_instance_method() { return "internal_instance"; }
        internal event System.EventHandler internal_instance_event;
        internal class internal_instance_nestedclass { }
        protected static int protected_static_field;
        protected static int protected_static_property {
            get { return private_static_field; }
            set { private_static_field = value; }
        }
        protected static string protected_static_method() { return "protected_static"; }
        protected static event System.EventHandler protected_static_event;
        protected static class protected_static_nestedclass { }
        protected int protected_instance_field;
        protected int protected_instance_property {
            get { return private_instance_field; }
            set { private_instance_field = value; }
        }
        protected string protected_instance_method() { return "protected_instance"; }
        protected event System.EventHandler protected_instance_event;
        protected class protected_instance_nestedclass { }
        public static int public_static_field;
        public static int public_static_property {
            get { return private_static_field; }
            set { private_static_field = value; }
        }
        public static string public_static_method() { return "public_static"; }
        public static event System.EventHandler public_static_event;
        public static class public_static_nestedclass { }
        public int public_instance_field;
        public int public_instance_property {
            get { return private_instance_field; }
            set { private_instance_field = value; }
        }
        public string public_instance_method() { return "public_instance"; }
        public event System.EventHandler public_instance_event;
        public class public_instance_nestedclass { }
    }

    public class DerivedCliClass : CliClass {
    }
#pragma warning restore
}


text:
require 'test_helper'

class PlatformsControllerTest < ActionController::TestCase
  setup do
    @user = users(:one)
    sign_in @user
    @platform = platforms(:one)
  end

  test "should get index" do
    get :index
    assert_response :success
    assert_not_nil assigns(:platforms)
  end

  test "should get new" do
    get :new
    assert_response :success
  end

  test "should create platform" do
    assert_difference('Platform.count') do
      post :create, platform: { name: @platform.name }
    end

    assert_redirected_to platform_path(assigns(:platform))
  end

  test "should show platform" do
    get :show, id: @platform
    assert_response :success
  end

  test "should get edit" do
    get :edit, id: @platform
    assert_response :success
  end

  test "should update platform" do

    put :update, id: @platform, platform: { name: @platform.name }
    assert_redirected_to platform_path(assigns(:platform))
  end

  test "should destroy platform" do
    assert_difference('Platform.count', -1) do
      delete :destroy, id: @platform
    end

    assert_redirected_to platforms_path
  end
end


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

namespace chocolatey.infrastructure.app.nuget
{
    using NuGet;

    // ReSharper disable InconsistentNaming

    public sealed class ChocolateyNugetLogger : ILogger
    {
        public FileConflictResolution ResolveFileConflict(string message)
        {
            return FileConflictResolution.OverwriteAll;
        }

        public void Log(MessageLevel level, string message, params object[] args)
        {
            switch (level)
            {
                case MessageLevel.Debug:
                    this.Log().Debug("[NuGet] " + message, args);
                    break;
                case MessageLevel.Info:
                    this.Log().Info("[NuGet] " + message, args);
                    break;
                case MessageLevel.Warning:
                    this.Log().Warn("[NuGet] " + message, args);
                    break;
                case MessageLevel.Error:
                    this.Log().Error("[NuGet] " + message, args);
                    break;
            }
        }
    }

    // ReSharper restore InconsistentNaming
}


text:
/*
Custom CSS for...
'Modern Business' HTML Theme by Start Bootstrap

All Start Bootstrap themes are licensed under Apache 2.0.
For more info and more free Bootstrap 3 HTML themes, visit http://startbootstrap.com!
*/

/* Global Styles */

html, body {
  height:100%;
}

body {
  padding-top: 50px; /* body padding for fixed top nav */
}

.img-home-portfolio,
.img-customer,
.portfolio-item {
  margin-bottom: 30px;
}

.tab-pane {
  margin-top: 15px;
}

/* Page Sections */
.section,
.section-colored {
  padding: 50px 0;
}

.section-colored {
  background-color: #e1e1e1; /* change this to change the background color of a colored section */
}

.sidebar {
  margin-top: 40px;
}

.sidebar ul {
  border-radius: 5px;
  padding: 5px;
  border: 1px solid #cccccc;
}

/* Half Page Height Carousel Customization */
.carousel {
  height: 50%;
}

.item,
.active,
.carousel-inner {
  height: 100%;
}

.fill {
  width: 100%;
  height: 100%;
  background-position: center;
  background-size: cover;
}

/* Social Icons Styles */
.list-social-icons {
  margin-bottom: 45px;
}

.tooltip-social a {
  text-decoration: none;
  color: inherit;
}

.facebook-link a:hover {
  color: #3b5998;
}

.linkedin-link a:hover {
  color: #007fb1;
}

.twitter-link a:hover {
  color: #39a9e0;
}

.google-plus-link a:hover {
  color: #d14836;
}

/* Service Page Styles */
.service-icon {
  font-size: 50px;
}

/* 404 Page Styles */
.error-404 {
  font-size: 8em;
}

/* Pricing Page Styles */
.price {
  font-size: 4em;
}

.price-cents {
  vertical-align: super;
  font-size: 50%;
}

.price-month {
  font-size: 35%;
  font-style: italic;
}

/* Footer Styles */
footer {
  margin: 50px 0;
}

/* Responsive Styles */
@media (max-width: 767px) {

.carousel {
  height: 70%; /* increases the carousel height so it looks good on phones */
}

}


text:
namespace blaze {

class StartupOptionsTest : public ::testing::Test {
 protected:
  StartupOptionsTest() : workspace_layout_(new WorkspaceLayout()) {}
  ~StartupOptionsTest() = default;

  void SetUp() override {
    // This knowingly ignores the possibility of these environment variables
    // being unset because we expect our test runner to set them in all cases.
    // Otherwise, we'll crash here, but this keeps our code simpler.
    old_home_ = GetHomeDir();
    old_test_tmpdir_ = GetEnv("TEST_TMPDIR");

    ReinitStartupOptions();
  }

  void TearDown() override {
    SetEnv("HOME", old_home_);
    SetEnv("TEST_TMPDIR", old_test_tmpdir_);
  }

  // Recreates startup_options_ after changes to the environment.
  void ReinitStartupOptions() {
    startup_options_.reset(new StartupOptions(workspace_layout_.get()));
  }

  void SuccessfulIsNullaryTest(const std::string& flag_name) const {
    EXPECT_TRUE(startup_options_->IsNullary("--" + flag_name));
    EXPECT_TRUE(startup_options_->IsNullary("--no" + flag_name));

    EXPECT_FALSE(startup_options_->IsNullary("--" + flag_name + "__invalid"));

    EXPECT_DEATH(startup_options_->IsNullary("--" + flag_name + "=foo"),
                 ("In argument '--" + flag_name + "=foo': option "
                     "'--" + flag_name + "' does not take a value").c_str());

    EXPECT_DEATH(startup_options_->IsNullary("--no" + flag_name + "=foo"),
                 ("In argument '--no" + flag_name + "=foo': option "
                     "'--no" + flag_name + "' does not take a value").c_str());

    EXPECT_FALSE(startup_options_->IsUnary("--" + flag_name));
    EXPECT_FALSE(startup_options_->IsUnary("--no" + flag_name));
  }

  void SuccessfulIsUnaryTest(const std::string& flag_name) const {
    EXPECT_TRUE(startup_options_->IsUnary("--" + flag_name));
    EXPECT_TRUE(startup_options_->IsUnary("--" + flag_name + "="));
    EXPECT_TRUE(startup_options_->IsUnary("--" + flag_name + "=foo"));

    EXPECT_FALSE(startup_options_->IsUnary("--" + flag_name + "__invalid"));
    EXPECT_FALSE(startup_options_->IsNullary("--" + flag_name));
    EXPECT_FALSE(startup_options_->IsNullary("--no" + flag_name));
  }

 private:
  std::unique_ptr<WorkspaceLayout> workspace_layout_;

 protected:
  std::unique_ptr<StartupOptions> startup_options_;

 private:
  std::string old_home_;
  std::string old_test_tmpdir_;
};

TEST_F(StartupOptionsTest, ProductName) {
  ASSERT_EQ("Bazel", startup_options_->product_name);
}

TEST_F(StartupOptionsTest, JavaLoggingOptions) {
  ASSERT_EQ("com.google.devtools.build.lib.util.SingleLineFormatter",
      startup_options_->java_logging_formatter);
}

// TODO(bazel-team): remove the ifdef guard once the implementation of
// GetOutputRoot is stable among the different platforms.
#ifdef __linux
TEST_F(StartupOptionsTest, OutputRootPreferTestTmpdirIfSet) {
  SetEnv("HOME", "/nonexistent/home");
  SetEnv("TEST_TMPDIR", "/nonexistent/tmpdir");
  ReinitStartupOptions();

  ASSERT_EQ("/nonexistent/tmpdir", startup_options_->output_root);
}

TEST_F(StartupOptionsTest, OutputRootUseHomeDirectory) {
  SetEnv("HOME", "/nonexistent/home");
  UnsetEnv("TEST_TMPDIR");
  ReinitStartupOptions();

  ASSERT_EQ("/nonexistent/home/.cache/bazel", startup_options_->output_root);
}
#endif  // __linux

TEST_F(StartupOptionsTest, EmptyFlagsAreInvalidTest) {
  EXPECT_FALSE(startup_options_->IsNullary(""));
  EXPECT_FALSE(startup_options_->IsNullary("--"));
  EXPECT_FALSE(startup_options_->IsUnary(""));
  EXPECT_FALSE(startup_options_->IsUnary("--"));
}

TEST_F(StartupOptionsTest, ValidStartupFlagsTest) {
  // IMPORTANT: Before modifying this test, please contact a Bazel core team
  // member that knows the Google-internal procedure for adding/deprecating
  // startup flags.
  SuccessfulIsNullaryTest("allow_configurable_attributes");
  SuccessfulIsNullaryTest("batch");
  SuccessfulIsNullaryTest("batch_cpu_scheduling");
  SuccessfulIsNullaryTest("block_for_lock");
  SuccessfulIsNullaryTest("client_debug");
  SuccessfulIsNullaryTest("deep_execroot");
  SuccessfulIsNullaryTest("experimental_oom_more_eagerly");
  SuccessfulIsNullaryTest("fatal_event_bus_exceptions");
  SuccessfulIsNullaryTest("host_jvm_debug");
  SuccessfulIsNullaryTest("master_bazelrc");
  SuccessfulIsNullaryTest("master_blazerc");
  SuccessfulIsNullaryTest("watchfs");
  SuccessfulIsNullaryTest("write_command_log");
  SuccessfulIsUnaryTest("bazelrc");
  SuccessfulIsUnaryTest("blazerc");
  SuccessfulIsUnaryTest("command_port");
  SuccessfulIsUnaryTest("connect_timeout_secs");
  SuccessfulIsUnaryTest("experimental_oom_more_eagerly_threshold");
  SuccessfulIsUnaryTest("host_javabase");
  SuccessfulIsUnaryTest("host_jvm_args");
  SuccessfulIsUnaryTest("host_jvm_profile");
  SuccessfulIsUnaryTest("invocation_policy");
  SuccessfulIsUnaryTest("io_nice_level");
  SuccessfulIsUnaryTest("install_base");
  SuccessfulIsUnaryTest("max_idle_secs");
  SuccessfulIsUnaryTest("output_base");
  SuccessfulIsUnaryTest("output_user_root");
}

}  // namespace blaze


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

    <title>org.ftccommunity.ftcxtensible.autonomous Class Hierarchy</title>
    <meta name="date" content="2016-01-30">
    <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation
        links

Overview

Package

Class

Tree

Deprecated

Index

Help

            Prev

            Next

            Frames

No Frames

All Classes

Hierarchy For Package org.ftccommunity.ftcxtensible.autonomous

    Package Hierarchies:

All Packages

Class Hierarchy

java.lang.Object

org.ftccommunity.ftcxtensible.autonomous.Autonomous (implements java.lang.Runnable)

org.ftccommunity.ftcxtensible.autonomous.AutonomousRobotState

org.ftccommunity.ftcxtensible.autonomous.BasicLevels.InitLevel (implements
                    org.ftccommunity.ftcxtensible.autonomous.RunLevel)

org.ftccommunity.ftcxtensible.autonomous.BasicLevels.Level1 (implements
                    org.ftccommunity.ftcxtensible.autonomous.RunLevel)

org.ftccommunity.ftcxtensible.autonomous.BasicLevels.Level2 (implements
                    org.ftccommunity.ftcxtensible.autonomous.RunLevel)

org.ftccommunity.ftcxtensible.autonomous.BasicLevels.Level3 (implements
                    org.ftccommunity.ftcxtensible.autonomous.RunLevel)

org.ftccommunity.ftcxtensible.autonomous.BasicLevels.Level4 (implements
                    org.ftccommunity.ftcxtensible.autonomous.RunLevel)

org.ftccommunity.ftcxtensible.autonomous.BasicLevels.SafeLevel (implements
                    org.ftccommunity.ftcxtensible.autonomous.RunLevel)

org.ftccommunity.ftcxtensible.autonomous.BasicLevels.StopLevel (implements
                    org.ftccommunity.ftcxtensible.autonomous.RunLevel)

com.qualcomm.robotcore.eventloop.opmode.OpMode

org.ftccommunity.ftcxtensible.robot.ExtensibleOpMode (implements
                            org.ftccommunity.ftcxtensible.interfaces.AbstractRobotContext,
                            org.ftccommunity.ftcxtensible.interfaces.FullOpMode)

org.ftccommunity.ftcxtensible.autonomous.AutoMode

                                            org.ftccommunity.ftcxtensible.autonomous.LinearAutoModeAdapter

Interface Hierarchy

org.ftccommunity.ftcxtensible.autonomous.BasicHardware

org.ftccommunity.ftcxtensible.autonomous.BasicLevels

org.ftccommunity.ftcxtensible.autonomous.RunLevel

Skip navigation
        links

Overview

Package

Class

Tree

Deprecated

Index

Help

            Prev

            Next

            Frames

No Frames

All Classes


text:
package org.springframework.boot.actuate.endpoint.invoke;

import java.util.Set;
import java.util.stream.Collectors;

import org.springframework.boot.actuate.endpoint.InvalidEndpointRequestException;
import org.springframework.util.StringUtils;

/**
 * {@link RuntimeException} thrown when an endpoint invocation does not contain required
 * parameters.
 *
 * @author Madhura Bhave
 * @author Phillip Webb
 * @since 2.0.0
 */
public final class MissingParametersException extends InvalidEndpointRequestException {

	private final Set<OperationParameter> missingParameters;

	public MissingParametersException(Set<OperationParameter> missingParameters) {
		super("Failed to invoke operation because the following required "
				+ "parameters were missing: "
				+ StringUtils.collectionToCommaDelimitedString(missingParameters),
				"Missing parameters: "
						+ missingParameters.stream().map(OperationParameter::getName)
								.collect(Collectors.joining(",")));
		this.missingParameters = missingParameters;
	}

	/**
	 * Returns the parameters that were missing.
	 * @return the parameters
	 */
	public Set<OperationParameter> getMissingParameters() {
		return this.missingParameters;
	}
}


text:
define_param row_unit   Param_Integer
define_param col_unit   Param_Integer

### hack to get sstep=int(ceil(BaseN/20))
define_param sf Param_Float
define_param sstep Param_Integer
set sf=BaseN/20
set sstep=BaseN/20
if (sf>sstep) set sstep=sstep+1
###

# want an even sstep so that we get right&bottom borders
# (assuming even BaseN)
if (sstep>2) if (sstep%2==1) set sstep=sstep+1

echo "Saving plots for units in range(0,${BaseN},${sstep})"
for row_unit=0 row_unit<BaseN row_unit=row_unit+sstep exec \
"for col_unit=0 col_unit<BaseN col_unit=col_unit+sstep \
  plot_unit save_matrices=True row_unit col_unit"


text:
package org.apache.ignite.internal.client.impl.connection;

import java.net.InetSocketAddress;
import java.util.Collection;
import java.util.UUID;
import javax.net.ssl.SSLContext;
import org.apache.ignite.internal.client.GridClientConfiguration;
import org.apache.ignite.internal.client.GridClientException;

/**
 * Open source version of connection manager.
 */
public class GridClientConnectionManagerOsImpl extends GridClientConnectionManagerAdapter {
    /**
     * @param clientId Client ID.
     * @param sslCtx SSL context to enable secured connection or {@code null} to use unsecured one.
     * @param cfg Client configuration.
     * @param routers Routers or empty collection to use endpoints from topology info.
     * @param top Topology.
     * @throws GridClientException In case of error.
     */
    public GridClientConnectionManagerOsImpl(UUID clientId, SSLContext sslCtx, GridClientConfiguration cfg,
        Collection<InetSocketAddress> routers, GridClientTopology top, Byte marshId, boolean routerClient)
        throws GridClientException {
        super(clientId, sslCtx, cfg, routers, top, marshId, routerClient);
    }

    /** {@inheritDoc} */
    @Override protected void init0() throws GridClientException {
        // No-op.
    }
}


text:
typedef NS_ENUM (NSUInteger, DPEventSignal) {
  DPEventSignalPressDown,
  DPEventSignalLongPress,
  DPEventSignalSwipeLeft,
  DPEventSignalSwipeUp,
  DPEventSignalSwipeRight,
  DPEventSignalSwipeDown,
  DPEventSignalRotate,
  DPEventSignalPinch
};

typedef NS_ENUM (NSUInteger, DPSwitchMode) {
  DPSwitchModePush,
  DPSwitchModeCover,
  DPSwitchModeUncover,
};

typedef NS_ENUM (NSUInteger, DPSwitchDirection) {
  DPSwitchDirectionNone,
  DPSwitchDirectionUp,
  DPSwitchDirectionDown,
  DPSwitchDirectionleft,
  DPSwitchDirectionRight
};

@interface DPMaskViewModel : DPMaskModel

@property (nonatomic, assign, readonly, getter=isSelected) BOOL selected;
@property (nonatomic, assign, readonly) DPEventSignal eventSignal;
@property (nonatomic, assign, readonly) DPSwitchMode switchMode;
@property (nonatomic, assign, readonly) DPSwitchDirection switchDirection;
@property (nonatomic, assign, readonly) NSInteger linkIndex;
@property (nonatomic, assign, readonly) NSTimeInterval animationDelayTime;

- (instancetype)initWithDictionary:(NSDictionary *)dictionary;
- (instancetype)initWithSeparatedDictionary:(NSDictionary *)dictionary;

- (void)setSwitchMode:(DPSwitchMode)switchMode;
- (void)setSwitchDirection:(DPSwitchDirection)switchDirection;
- (void)setEventSignal:(DPEventSignal)eventSignal;
- (void)setLinkIndex:(NSInteger)linkIndex;
- (void)setAnimationDelayTime:(NSTimeInterval)animationDelayTime;
- (void)setSelected:(BOOL)selected;

@end


text:
bool IERay::IntersectsSphere(IEVector3& intersectPos,
							 float& t,
							 const IEVector3& sphereCenter,
							 float sphereRadius) const
{
	// Geometric solution
	IEVector3 normDir = direction.Normalize();
	IEVector3 centerDir = sphereCenter - position;
	float beamCenterDistance = centerDir.DotProduct(normDir);
	float beamNormalLengthSqr = centerDir.DotProduct(centerDir) -
								beamCenterDistance * beamCenterDistance;
	float beamHalfLengthSqr = sphereRadius * sphereRadius - beamNormalLengthSqr;
	if(beamHalfLengthSqr > 0.0f)
	{
		// Inside Square
		float beamHalfLength = std::sqrt(beamHalfLengthSqr);
		float t0 = beamCenterDistance - beamHalfLength;
		float t1 = beamCenterDistance + beamHalfLength;
		if(t1 >= 0.0f)
		{
			t = (t0 >= 0.0f) ? t0 : t1;
			intersectPos = position + t * normDir;
			return true;
		}
	}
	return false;

	//// Quadratic Solution
	//const IEVector3 posDiff = position - sphereCenter;
	//float a = direction.DotProduct(direction);
	//float b = 2.0f * posDiff.DotProduct(direction);
	//float c = posDiff.DotProduct(posDiff) - sphereRadius * sphereRadius;
	//float delta = b * b - 4.0f * a * c;

	//float rayT0, rayT1;
	//if(delta > 0.0f)
	//{
	//	float q = (b > 0) ?
	//		-0.5 * (b + std::sqrt(delta)) :
	//		-0.5 * (b - std::sqrt(delta));
	//	rayT0 = q / a;

	//	// Mullers formula
	//	rayT1 = c / q;
	//}
	//else if(delta == 0.0f)
	//{
	//	rayT0 = rayT1 = -b * 0.5f / a;
	//}
	//else return false;

	//if(rayT0 < 0.0f && rayT1 < 0.0f) return false;
	//else if(rayT0 >= 0.0f && rayT1 >= 0.0f)
	//{
	//	t = std::min(rayT0, rayT1);
	//}
	//else if(rayT0 < 0.0f)
	//{
	//	t = rayT1;
	//}
	//else if(rayT1 < 0.0f)
	//{
	//	t = rayT0;
	//}
	//intersectPos = position + t * direction;
	//return true;
}

bool IERay::IntersectsTriangle(IEVector3& baryCoords,
							   float& t,
							   const IEVector3& t0,
							   const IEVector3& t1,
							   const IEVector3& t2) const
{
	// Matrix Solution
	// Kramers Rule
	auto abDiff = t0 - t1;
	auto acDiff = t0 - t2;
	auto aoDiff = t0 - position;

	IEMatrix3x3 A = IEMatrix3x3(abDiff, acDiff, direction);
	IEMatrix3x3 betaA = IEMatrix3x3(aoDiff, acDiff, direction);
	IEMatrix3x3 gammaA = IEMatrix3x3(abDiff, aoDiff, direction);
	IEMatrix3x3 tA = IEMatrix3x3(abDiff, acDiff, aoDiff);

	float aDetInv = 1.0f / A.Determinant();
	float beta = betaA.Determinant() * aDetInv;
	float gamma = gammaA.Determinant() * aDetInv;
	float alpha = 1.0f - beta - gamma;
	float rayT = tA.Determinant() * aDetInv;

	if(beta >= 0.0f && beta <= 1.0f &&
	   gamma >= 0.0f && gamma <= 1.0f &&
	   alpha >= 0.0f && alpha <= 1.0f &&
	   rayT >= 0.0f)
	{
		baryCoords = IEVector3(alpha, beta, gamma);
		t = rayT;
	}
	else return false;
	return true;
}

IERay IERay::Reflect(const IEVector3& normal) const
{
	float length = direction.Length();
	IEVector3 nDir = -direction / length;
	nDir = 2.0f * nDir.DotProduct(normal) * normal - nDir;
	return IERay(nDir * length, position);
}

IERay& IERay::ReflectSelf(const IEVector3& normal)
{
	float length = direction.Length();
	IEVector3 nDir = -direction / length;
	direction = (2.0f * nDir.DotProduct(normal) * normal - nDir) * length;
	return *this;
}

bool IERay::Refract(IERay& out, const IEVector3& normal, float fromMedium, float toMedium) const
{
	IEVector3 dir = direction.Normalize();
	float cosTetha = -normal.DotProduct(dir);
	float indexRatio = fromMedium / toMedium;

	float delta = 1.0f - indexRatio * indexRatio * (1.0f - cosTetha * cosTetha);
	if(delta > 0.0f)
	{
		out.direction = indexRatio * dir + normal * (cosTetha * indexRatio - std::sqrt(delta));
		out.position = position;
		return true;
	}
	return false;
}

bool IERay::RefractSelf(const IEVector3& normal, float fromMedium, float toMedium)
{
	IEVector3 dir = direction.Normalize();
	float cosTetha = -normal.DotProduct(dir);
	float indexRatio = fromMedium / toMedium;

	float delta = 1.0f - indexRatio * indexRatio * (1.0f - cosTetha * cosTetha);
	if(delta > 0.0f)
	{
		direction = indexRatio * dir + normal * (cosTetha * indexRatio - std::sqrt(delta));
		return true;
	}
	return false;
}

IERay IERay::NormalizeDir() const
{
	return IERay(direction.Normalize(), position);
}

IERay& IERay::NormalizeDirSelf()
{
	direction.NormalizeSelf();
	return *this;
}

IERay IERay::Advance(float t) const
{
	return IERay(direction, AdvancedPos(t));
}

IERay& IERay::AdvanceSelf(float t)
{
	position += t * direction;
	return *this;
}

IERay IERay::Transform(const IEMatrix4x4& mat) const
{
	return IERay(mat * IEVector4(direction, 0.0f),
				 mat * position);
}

IERay& IERay::TransformSelf(const IEMatrix4x4& mat)
{
	direction = mat * IEVector4(direction, 0.0f);
	position = mat * position;
	return *this;
}

IEVector3 IERay::AdvancedPos(float t) const
{
	return position + t * direction;
}

bool IERay::IntersectsAABB(const IEVector3& min, const IEVector3& max) const
{
	IEVector3 invD = IEVector3(1.0f, 1.0f, 1.0f) / direction;
	IEVector3 t0 = (min - position) * invD;
	IEVector3 t1 = (max - position) * invD;

	float tMin = -std::numeric_limits<float>::max();
	float tMax = std::numeric_limits<float>::max();

	#pragma unroll
	for(int i = 0; i < 3; i++)
	{
		tMin = std::max(tMin, std::min(t0[i], t1[i]));
		tMax = std::min(tMax, std::max(t0[i], t1[i]));
	}

	return tMax >= tMin;
	//return (tMax - tMin) >= -1e-4;
}
#endif // USE_AVX


text:
package ar.com.javacuriosities.hibernate.model.unidirectional_join_table;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name = "tasks")
public class Task {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    private String description;

    @OneToOne(cascade = CascadeType.ALL)
    @JoinTable(name = "tasks_tasks_details",
            joinColumns = {
                    @JoinColumn(name = "task_id")
            },
            inverseJoinColumns = {
                    @JoinColumn(name = "tasks_details_id", unique = true)
            }
    )
    private TaskDetail details;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public TaskDetail getDetails() {
        return details;
    }

    public void setDetails(TaskDetail details) {
        this.details = details;
    }
}


text:
require 'rhc/commands/base'
require 'resolv'
require 'rhc/git_helpers'
require 'rhc/cartridge_helpers'

module RHC::Commands
  class Ssh < Base
    suppress_wizard

    summary "SSH into the specified application"
    description <<-DESC
      Connect to your application using SSH.  This will connect to your primary gear
      (the one with your Git repository and web cartridge) by default.  To SSH to
      other gears run 'rhc show-app --gears' to get a list of their SSH hosts.

      You may run a specific SSH command by passing one or more arguments, or use a
      different SSH executable or pass options to SSH with the '--ssh' option.

      To use the '--ssh' flag with an SSH executable path containing a space, wrap
      the executable path with double quotes:
      --ssh '"C:\\path with spaces\\ssh"'
      DESC
    syntax "[--ssh path_to_ssh_executable] [--gears] [<app> --] <command>"
    takes_application :argument => true
    argument :command, "Command to run in the application's SSH session", ['--command COMMAND'], :type => :list, :optional => true
    option ["--ssh PATH"], "Path to your SSH executable or additional options"
    option ["--gears"], "Execute this command on all gears in the app.  Requires a command."
    option ["--limit INTEGER"], "Limit the number of simultaneous SSH connections opened with --gears (default: 5).", :type => Integer, :default => 5
    option ["--raw"], "Output only the data returned by each host, no hostname prefix."
    alias_action 'app ssh', :root_command => true
    def run(_, command)
      raise ArgumentError, "--gears requires a command" if options.gears && command.blank?
      raise ArgumentError, "--limit must be an integer greater than zero" if options.limit && options.limit < 1

      ssh = check_ssh_executable! options.ssh

      if options.gears
        run_on_gears(command.join(' '), find_app(:with_gear_groups => true))
        0
      else
        rest_app = find_app
        $stderr.puts "Connecting to #{rest_app.ssh_string.to_s} ..." unless command.present?

        debug "Using user specified SSH: #{options.ssh}" if options.ssh

        command_line = [RHC::Helpers.split_path(ssh), ('-vv' if debug?), rest_app.ssh_string.to_s, command].flatten.compact

        debug "Invoking Kernel.exec with #{command_line.inspect}"
        Kernel.send(:exec, *command_line)
      end
    end

    protected
      include RHC::SSHHelpers
  end
end


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

namespace Fungus
{
	[CommandInfo("Scripting",
	             "Note",
	             "Records design notes and reminders about your script.")]
	public class Note : Command
	{
		[TextArea(2,4)]
		public string commentText = "";

		public override void OnEnter()
		{
			Continue();
		}

		public override string GetSummary()
		{
			return commentText;
		}

		public override Color GetButtonColor()
		{
			return new Color32(220, 220, 220, 255);
		}
	}

}


text:
package com.ykushch.solution.arrays;

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

/**
 * Given an array of integers, sort the array into a wave like array and return it,
 * In other words, arrange the elements into a sequence such that a1 >= a2 <= a3 >= a4 <= a5...
 *
 * Example
 *
 * Given [1, 2, 3, 4]
 *
 * One possible answer : [2, 1, 4, 3]
 * Another possible answer : [4, 1, 3, 2]
 */
public class Wave {

    public static List<Integer> wave(List<Integer> inputList) {
        if (inputList == null || inputList.isEmpty()) {
            return Collections.emptyList();
        }

        Collections.sort(inputList);
        List<Integer> result = new ArrayList<>();

        formWaveWithEvenPart(inputList, result);
        formWaveWithRightMostPart(inputList, result);

        return result;
    }

    private static void formWaveWithRightMostPart(List<Integer> inputList, List<Integer> result) {
        int rightMostElements = inputList.size() % 2;
        int inputLength = inputList.size();
        if (rightMostElements != 0) {
            for (int i = inputLength - rightMostElements; i <= inputLength - 1; i++) {
                result.add(inputList.get(i));
            }
        }
    }

    private static void formWaveWithEvenPart(List<Integer> inputList, List<Integer> result) {
        for (int i = 0, length = inputList.size() - 1; i < length; i += 2) {
            if (inputList.get(i) < inputList.get(i + 1)) {
                result.add(inputList.get(i + 1));
                result.add(inputList.get(i));
            } else {
                result.add(inputList.get(i));
                result.add(inputList.get(i + 1));
            }
        }
    }
}


text:
{

# name: CFI
# description: I'm not good at writing secure code, but luckily there's control-flow integrity. Run with MCFI_SDK=/path/to/toolchain ./cfi (powered by https://github.com/mcfi/MCFI)

# flag: CTF{g0_wiTH__th3_fLow}

}