text:
echo "CREATING DATABASES"
mysql -e 'CREATE DATABASE jeeventstore_test;'
# (echo 'USE jeeventstore_test;'; cat ./persistence-jpa/src/main/sql/mysql.sql) | mysql
# mysql -e 'USE jeeventstore_test; TRUNCATE TABLE jeeventstore_test.event_store;'

psql -U postgres -c 'CREATE DATABASE jeeventstore_test;'
#(echo '\c jeeventstore_test'; \
#	cat ./persistence-jpa/src/main/sql/postgres.sql; \
#	echo 'ALTER SEQUENCE event_store_id_seq RESTART;'; \
#	echo 'TRUNCATE TABLE event_store;' \
#	) | psql -U postgres


text:
require File.join(File.dirname(__FILE__), 'external_test_helper.rb')
require 'external'

class ReadmeTest < Test::Unit::TestCase
  acts_as_file_test

  #
  # YAML issues
  #

  def test_yaml_issues_documentation
    block = lambda {}
    assert_raise(TypeError) { YAML.load(YAML.dump(block)) }
    assert_raise(TypeError) { YAML.dump(Object) }

    assert_equal nil, YAML.load(YAML.dump("\r"))
    assert_equal "", YAML.load(YAML.dump("\r\n"))
    assert_equal "string with \n inside", YAML.load(YAML.dump("string with \r\n inside"))

    assert_equal "", YAML.load(YAML.dump("\n"))
    assert_equal "",YAML.load(YAML.dump("\n\n"))

    assert_equal Time, YAML.load(YAML.dump(DateTime.now)).class
  end

  #
  # ExternalArray usage
  #

  def test_external_array_readme_documentation
    a = ExternalArray['str', {'key' => 'value'}]
    assert_equal "str", a[0]
    assert_equal({'key' => 'value'}, a.last)
    a << [1,2]
    assert_equal ['str', {'key' => 'value'}, [1,2]], a.to_a

    condition_test(:ruby_1_8) { assert_equal Tempfile, a.io.class }
    condition_test(:ruby_1_9) { assert_equal File, a.io.class }

    a.io.rewind
    assert_equal "--- str\n--- \nkey: value\n--- \n- 1\n- 2\n", a.io.read

    assert_equal Array, a.io_index.class
    assert_equal [[0, 8], [8, 16], [24, 13]], a.io_index.to_a

    example = method_root.prepare(:tmp, 'example.yml')
    index = example.chomp(".yml") + ".index"
    a.close(example)
    assert_equal "--- str\n--- \nkey: value\n--- \n- 1\n- 2\n", File.read(example)
    assert_equal [0, 8, 8, 16, 24, 13], File.read(index).unpack('I*')

    ExternalArray.open(example) do |b|
      assert_equal File.basename(index), File.basename(b.io_index.io.path)
      assert_equal ['str', {'key' => 'value'}, [1,2]], b.to_a
    end

    FileUtils.rm(index)
    ExternalArray.open(example) do |b|
      assert_equal ['str', {'key' => 'value'}, [1,2]], b.to_a
    end

    c = ExternalArray.new File.open(example)
    assert_equal [], c.to_a

    c.reindex
    assert_equal ['str', {'key' => 'value'}, [1,2]], c.to_a
    c.close
  end

  #
  # ExternalArchive usage
  #

  class FastaEntry
    attr_reader :header, :body

    def initialize(str)
      @body = str.split(/\r?\n/)
      @header = body.shift
    end
  end

  class FastaArchive < ExternalArchive
    def str_to_entry(str); FastaEntry.new(str); end
    def entry_to_str(entry); ([entry.header] + entry.body).join("\n"); end

    def reindex
      reindex_by_sep('>', :entry_follows_sep => true)
    end
  end

  def test_external_archive_readme_documentation
    arc = ExternalArchive["swift", "brown", "fox"]
    assert_equal "fox", arc[2]
    assert_equal ["swift", "brown", "fox"], arc.to_a

    arc.io.rewind
    assert_equal "swiftbrownfox", arc.io.read

    fasta = FastaArchive.new File.open(File.dirname(__FILE__) + '/../docs/tiny_fasta.txt')
    fasta.reindex

    assert_equal 5, fasta.length
    assert_equal ">gi|114329651|ref|YP_740470.1| photosystem II protein D2 [Citrus sinensis]", fasta[1].header
    assert_equal ["MEVNILAFIATTLFVLVPTAFLLIIYVKTVSQSD"], fasta[0].body
  end

  #
  # ExternalIndex usage
  #

  def test_external_index_readme_documentation
    index = ExternalIndex[1, 2, 3, 4, 5, 6, {:format => 'II'}]
    assert_equal 'I*', index.format
    assert_equal 2, index.frame
    assert_equal [3,4], index[1]
    assert_equal [[1,2], [3,4], [5,6]], index.to_a

    Tempfile.new('sample.txt') do |file|
      file << [1,2,3].pack("IQS")
      file << [4,5,6].pack("IQS")
      file << [7,8,9].pack("IQS")
      file.flush

      index = ExternalIndex.new(file, :format => "IQS")
      assert_equal [4,5,6], index[1]
      assert_equal [[1,2,3], [4,5,6], [7,8,9]], index.to_a
    end
  end
end

redpajama_set_name: RedPajamaGithub


text:
<?php
class ControllerCheckoutCheckout extends Controller {
	public function index() {
		// Validate cart has products and has stock.
		if ((!$this->cart->hasProducts() && empty($this->session->data['vouchers'])) || (!$this->cart->hasStock() && !$this->config->get('config_stock_checkout'))) {
			$this->redirect($this->url->link('checkout/cart'));
		}

		// Validate minimum quantity requirments.
		$products = $this->cart->getProducts();

		foreach ($products as $product) {
			$product_total = 0;

			foreach ($products as $product_2) {
				if ($product_2['product_id'] == $product['product_id']) {
					$product_total += $product_2['quantity'];
				}
			}

			if ($product['minimum'] > $product_total) {
				$this->redirect($this->url->link('checkout/cart'));
			}
		}

		$this->language->load('checkout/checkout');

		$this->document->setTitle($this->language->get('heading_title'));
		$this->document->addScript('catalog/view/javascript/jquery/colorbox/jquery.colorbox-min.js');
		$this->document->addStyle('catalog/view/javascript/jquery/colorbox/colorbox.css');

		$this->data['breadcrumbs'] = array();

		$this->data['breadcrumbs'][] = array(
			'text'      => $this->language->get('text_home'),
			'href'      => $this->url->link('common/home'),
			'separator' => false
		);

		$this->data['breadcrumbs'][] = array(
			'text'      => $this->language->get('text_cart'),
			'href'      => $this->url->link('checkout/cart'),
			'separator' => $this->language->get('text_separator')
		);

		$this->data['breadcrumbs'][] = array(
			'text'      => $this->language->get('heading_title'),
			'href'      => $this->url->link('checkout/checkout', '', 'SSL'),
			'separator' => $this->language->get('text_separator')
		);

		$this->data['heading_title'] = $this->language->get('heading_title');

		$this->data['text_checkout_option'] = $this->language->get('text_checkout_option');
		$this->data['text_checkout_account'] = $this->language->get('text_checkout_account');
		$this->data['text_checkout_payment_address'] = $this->language->get('text_checkout_payment_address');
		$this->data['text_checkout_shipping_address'] = $this->language->get('text_checkout_shipping_address');
		$this->data['text_checkout_shipping_method'] = $this->language->get('text_checkout_shipping_method');
		$this->data['text_checkout_payment_method'] = $this->language->get('text_checkout_payment_method');
		$this->data['text_checkout_confirm'] = $this->language->get('text_checkout_confirm');
		$this->data['text_modify'] = $this->language->get('text_modify');

		$this->data['logged'] = $this->customer->isLogged();
		$this->data['shipping_required'] = $this->cart->hasShipping();

		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/checkout/checkout.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/checkout/checkout.tpl';
		} else {
			$this->template = 'default/template/checkout/checkout.tpl';
		}

		$this->children = array(
			'common/column_left',
			'common/column_right',
			'common/content_top',
			'common/content_bottom',
			'common/footer',
			'common/header'
		);

		if (isset($this->request->get['quickconfirm'])) {
			$this->data['quickconfirm'] = $this->request->get['quickconfirm'];
		}

		$this->response->setOutput($this->render());
	}

	public function country() {
		$json = array();

		$this->load->model('localisation/country');

		$country_info = $this->model_localisation_country->getCountry($this->request->get['country_id']);

		if ($country_info) {
			$this->load->model('localisation/zone');

			$json = array(
				'country_id'        => $country_info['country_id'],
				'name'              => $country_info['name'],
				'iso_code_2'        => $country_info['iso_code_2'],
				'iso_code_3'        => $country_info['iso_code_3'],
				'address_format'    => $country_info['address_format'],
				'postcode_required' => $country_info['postcode_required'],
				'zone'              => $this->model_localisation_zone->getZonesByCountryId($this->request->get['country_id']),
				'status'            => $country_info['status']
			);
		}

		$this->response->setOutput(json_encode($json));
	}
}
?>


text:
//
//  Copyright 2017 Gustavo J Knuppe (https://github.com/knuppe)
//
//   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.
//
//   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//   - May you do good and not evil.                                         -
//   - May you find forgiveness for yourself and forgive others.             -
//   - May you share freely, never taking more than you give.                -
//   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//

using System.IO;
using NUnit.Framework;

namespace SharpNL.Tests.LangDetect {
    using SharpNL.LangDetect;

    [TestFixture]
    public class LanguageDetectorFactoryTest {

        private LanguageDetectorModel model;

        [OneTimeSetUp]
        public void Init() {
            model = LanguageDetectorMETest.TrainModel(new DummyLangDetectorFactory());
        }

        [Test]
        public void TestCorrectFactory() {

            using (var mem = new MemoryStream()) {
                model.Serialize(mem, true);

                mem.Seek(0, SeekOrigin.Begin);

                var deserializedModel = new LanguageDetectorModel(mem);

                Assert.NotNull(deserializedModel);

                Assert.IsInstanceOf<DummyLangDetectorFactory>(deserializedModel.Factory);
            }

        }

        [Test]
        public void TestDummyFactoryContextGenerator() {

            var cg = model.Factory.GetContextGenerator();

            var context = cg.GetContext("a dummy text phrase to test if the context generator works!!!!!!!!!!!!");

            CollectionAssert.Contains(context, "!!!!!"); // default normalizer would remove the repeated !
            CollectionAssert.Contains(context, "a dum");
            CollectionAssert.Contains(context, "tg=[THE,CONTEXT,GENERATOR]");
        }
    }
}


text:
ShouldI
=======

ExUnit is fine for small, simple applications, but when you want to do more complex test cases, it has limitations. ShouldI provides nested contexts to eliminate duplication in tests, and has better support for naming tests based on behavior. This API is based on the shoulda framework for Ruby on Rails.

Quick start
------------
Just add the hex dependency to your mix file:

~~~elixir
defp deps do
  [{:shouldi, only: :test}]
end
~~~

and add

~~~elixir
...
use ShouldI
...
~~~

to your test script in place of

~~~elixir
...
use ExUnit.Case
...
~~~

Name tests with `should`
------------
When you're testing behavior, you can get better names with a more descriptive macro. The test code...

~~~elixir
test "should return ok on parse" do
  assert :ok == Parser.parse
end
~~~

...can become more descriptive and shorter with...

~~~elixir
should "return :ok on parse" do
   assert :ok == Parser.parse
end
~~~

Nest your context using `having`
---------------

Say you have a test case that needs some setup. ExUnit has support for a context that can be set once, and passed to all clients. You can use the `setup` method to pass a map to each of your test cases, like this:

~~~elixir
defmodule MyFlatTest do
  setup context do
    {:ok, Dict.put context, :necessary_key, :necessary_value}
  end

  test( "this test needs :necessary_key", context ) do
    assert context.necessary_key == :necessary_value
  end
end
~~~

This approach breaks down when several, but not all, tests need the same set of values. ShouldI solves this problem with nested contexts, which you can provide with the `having` keyword, like this:

~~~elixir
defmodule MyFatTest do

  having "necessary_key" do
    setup context do
      Dict.put context, :necessary_key, :necessary_value
    end

    should( "have necessary key", context ) do
      assert context.necessary_key == :necessary_value
    end
  end

  having "sometimes_necessary_key" do
    setup context do
      Dict.put context, :sometimes_necessary_key, :sometimes_necessary_value
    end

    should( "have necessary key", context ) do
      assert context.sometimes_necessary_key == :sometimes_necessary_value
    end
  end
end
~~~

This approach is much nicer than the alternatives when you're testing something like a controller with dramatically different requirements across tests:

~~~elixir
having "a logged in user" do
  setup context do
    login context, user
  end

  ...
end

having "a logged out user" do
   ...
end

having "a logged in admin" do
  setup context do
    login context, admin
  end

  ...
end
~~~

Use `assign` to set the context
------------
`assign` is a macro that is syntactic sugar for updating the `context`.

~~~elixir
setup context do
  Dict.put context, :necessary_key, :necessary_value
end
~~~

becomes

~~~elixir
setup context do
  assign context, necessary_key: :necessary_value
end
~~~

Use matchers simplify tests
---------------------------

You can package macros that write your own tests. Matchers encode common assertion patterns. For example, our plug matchers

~~~elixir
having "a logged in admin" do
  setup context do
    login context, admin
  end

  having "a get to :index" do
    setup context do
      # process get
    end
    should_respond_with :success
    should_match_body_to "<html>"
  end
end
~~~

The two matchers, `should_respond_with` and `should_match_body_to`, will run in a single test, against the context created in the `setup` function (or setup functions, if you've used multiple contexts). Even if both of these tests fail, you'll see two failures in your output.

Create your own matchers with `defmatcher`
------------------------

We come prepackaged with a set of matchers, but you can code your own as well. The following is the matcher to check for existence of a dictionary key in the context:

~~~elixir
defmatcher should_assign_key([{key, value}]) do
  quote do
    assert var!(context)[unquote(key)] == unquote(value)
  end
end
~~~

This macro allows you to build a matcher macro.

We'll have more information about creating matchers later. In the mean time, you can read through the matchers we've created in the project. Matchers should be stateless, as all matchers within a `having` clause will run to completion, unless there is an `error`, even if a test fails.

Existing Matchers
-----------------

- Context
    - `should_assign_key key, value`: assert that the value for `key` in the context is `value`
    - `should_match_key key, expected`: assert that the value for `key` in the context satisfies the pattern match `expected`
    - `should_have_key key`: assert that `key` exists in the context
    - `should_not_have_key key`: assert that `key` does not exist in the context
- Plug
    - `should_respond_with expected`: Assert that the value for `context.connection.status` in the context matches a reasonable value for `:success`, `:redirect`, `:bad_request`, `:unauthorized`, `:missing` or `:error`
    - `should_match_body_to expected`: Assert that the value for `context.resp_body` contains the text `expected`.

Unique IDs
----------

When running tests asynchronously it can be useful to have a way to generate IDs or names that will not conflict with other tests that run concurrently. `uid()` will generate an ID unique for the current test and setup. If it is called again during the same test it will return the same ID. An additional string can be given `uid("some string")` so multiple IDs can be generated during the same test.

One Experiment, Multiple Measurements
-------------------------------------

The philosophy is that experiments go in `setup` and measurements go into matchers. `shouldi` will make sure that the context is passed between them cleanly so that things compose correctly.

When you run a `shouldi` test, for each context:

- one `should` test is created, collecting all of the matchers in a `having` clause.
- one exunit `test` is created for each `should` block
- for each test
- - all of the ancestor `setup` functions will fire, from outermost to innermost.
- - the test will fire
- - if a test is a matcher test, all of the matchers will run to completion, even if there is a failure, stopping only on errors.
- - if a test is a `should` block, the first failure will halt the test, as in `ExUnit`.

Happy testing. Open an issue if there are any matchers you'd like to see. Feedback and pull requests are welcome. Send a pull request if you'd like to contribute.

Special thanks to ThoughtBot's shoulda, which formed the foundation for this approach.


text:
\hypertarget{_operand_8h}{}\section{Operand.\+h File Reference}
\label{_operand_8h}\index{Operand.\+h@{Operand.\+h}}

\hyperlink{class_operand}{Operand} class.

{\ttfamily \#include $<$iostream$>$}\\*
{\ttfamily \#include $<$string$>$}\\*
{\ttfamily \#include $<$Enum\+\_\+type.\+h$>$}\\*
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item
class \hyperlink{class_operand}{Operand}
\begin{DoxyCompactList}\small\item\em Abstract class representing an operand. \end{DoxyCompactList}\end{DoxyCompactItemize}

\subsection{Detailed Description}
\hyperlink{class_operand}{Operand} class.

\begin{DoxyAuthor}{Author}
Hajjem
\end{DoxyAuthor}


text:
package com.github.j5ik2o.reactive.redis.command.strings

import java.util.UUID

import cats.data.NonEmptyList
import com.github.j5ik2o.reactive.redis.RedisIOException
import com.github.j5ik2o.reactive.redis.command.{ CommandRequest, CommandResponse, StringParsersSupport }
import com.github.j5ik2o.reactive.redis.parser.StringParsers._
import com.github.j5ik2o.reactive.redis.parser.model._
import fastparse.all._

final class MGetRequest(val id: UUID, val keys: NonEmptyList[String]) extends CommandRequest with StringParsersSupport {

  override type Response = MGetResponse

  override val isMasterOnly: Boolean = false

  override def asString: String = cs("MGET", keys.toList.map(Some(_)): _*)

  override protected lazy val responseParser: P[Expr] = fastParse(
    stringArrayReply | simpleStringReply | errorReply
  )

  override protected lazy val parseResponse: Handler = {
    case (ArrayExpr(values), next) =>
      (MGetSucceeded(UUID.randomUUID(), id, values.asInstanceOf[Seq[StringExpr]].map(_.value)), next)
    case (SimpleExpr(QUEUED), next) =>
      (MGetSuspended(UUID.randomUUID(), id), next)
    case (ErrorExpr(msg), next) =>
      (MGetFailed(UUID.randomUUID(), id, RedisIOException(Some(msg))), next)
  }

  override def equals(other: Any): Boolean = other match {
    case that: MGetRequest =>
      id == that.id &&
      keys == that.keys
    case _ => false
  }

  @SuppressWarnings(Array("org.wartremover.warts.JavaSerializable"))
  override def hashCode(): Int = {
    val state = Seq(id, keys)
    state.map(_.hashCode()).foldLeft(0)((a, b) => 31 * a + b)
  }

  override def toString: String = s"MGetRequest($id, $keys)"

}

object MGetRequest {

  def apply(id: UUID, keys: NonEmptyList[String]): MGetRequest = new MGetRequest(id, keys)
  def apply(id: UUID, key: String, keys: String*): MGetRequest = apply(id, NonEmptyList.of(key, keys: _*))

  def unapply(self: MGetRequest): Option[(UUID, NonEmptyList[String])] = Some((self.id, self.keys))

  def create(id: UUID, keys: NonEmptyList[String]): MGetRequest = new MGetRequest(id, keys)
  def create(id: UUID, key: String, keys: String*): MGetRequest = apply(id, NonEmptyList.of(key, keys: _*))

}

sealed trait MGetResponse                                                      extends CommandResponse
final case class MGetSuspended(id: UUID, requestId: UUID)                      extends MGetResponse
final case class MGetSucceeded(id: UUID, requestId: UUID, values: Seq[String]) extends MGetResponse
final case class MGetFailed(id: UUID, requestId: UUID, ex: Exception)          extends MGetResponse


text:
---
layout: post
date:   2017-08-02
title:  "Github ile kişisel blog; ücretsiz, hızlıca. Ama nasıl?"
tags: [yazılım]
---
# Nasıl mı?

Mesela [http://dogancan.net](http://dogancan.net)
Bu arkadaş her nekadar kendi domaininde yapmış olsada aslında bu adres
[https://dgncan.github.io](https://dgncan.github.io) adresinden yönlendiriliyor.

Buradaki dgncan github taki hesap ismi

mesela senin github'taki sitenin adresi https://githubismin.github.io gibi olacak

Bu arkadaşınki [https://github.com/dgncan/dgncan.github.io](https://github.com/dgncan/dgncan.github.io)

Burda hazır bir sistem kullanmış. Temaları da var bi sürü ücretsiz.
Bu sistem ruby de yazılmı [Jekyll](https://jekyllrb.com/) isminde bir sistem.
Temel özelliği statik web siteleri üretmek.
Zaten github sana statik içerik koyabileceğin bir alan veriyor.
Jekyll'ın en güzel özelliği _post klasörünün içine düz metin (markdown formatında) olarak blogun için içeriğini yazıyorsun, jekyll da onu güzelce parse ediyor.

Örnek olarak nasıl bir şey yazıldığını [şurdan](https://raw.githubusercontent.com/dgncan/dgncan.github.io/master/_posts/2017-08-02-github-ile-kisisel-blog-ucretsiz-hizlica-ama-nasil.md) bakabilirsin.

[Şurdan](http://dogancan.net/github-ile-kisisel-blog-ucretsiz-hizlica-ama-nasil) da nasıl göründüğüne bakabilirsin.

Mesela yazdıklarıma yorum da yazsın birileri istiyorsan. Kendine özel bir şey yapmana gerek yok.
[Disqus](https://disqus.com/) ile entegre edebilirsin.

Bunun için Disqus tan bir hesap açman gerek. Akabinde jekyll'da bir ayar yapman yeterli.

## Disqus entegrasyonu
Başlık afilli ama pek bi numarası yok.

_includes klasöründe disqus.html diye bir dosya oluştur.
içine şunları yaz:

{% highlight html %}

	Please enable JavaScript to view the comments powered by Disqus.

{% endhighlight %}

_config.yml de

disqus: "dogancanblog"

Not: "dogancanblog" yazan yerlere kendi disqus hesabını yazmalısın.

## Google Analytics entegrasyonu

_includes klasörüne google_analytics.html adında bir dosya oluştur.
içine:
{% highlight html %}

{% endhighlight %}

_config.yml de

google_analytics: UA-49928671-1

Not: "UA-49928671-1" yazan yere kendi analytics kodunu yazmalısın.


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 me.mikujo.series.wiki;

/**
 * List of keys that are used from the list
 * @author mithun.gonsalvez
 */
public interface Keyz {

  /** Hints */
  String HINTS = "hints";

  /** Page */
  String PAGE = "page";

  /** Title */
  String TITLE = "title";

  /** Key to identify which episode has been watched */
  String WATCHED = "watched";

  /** Key 'formats', group tag that contains all the the formats */
  String FORMATS = "formats";

  /** Key 'format', identifies the format to be used to parse the wiki-page */
  String FORMAT = "format";

  /** Key 'series', identifies the list of series to be parsed */
  String SERIES = "series";

  /** Key 'extends', identifies the parent from which we should inherit properties */
  String EXTENDS = "extends";

  /** Key 'type', identifies the type of parser to use */
  String TYPE = "type";

  /** Key 'wiki' indicates that we should be using the wiki parser */
  String TYPE_WIKI = "wiki";

  /** Key 'text', that identifies that the format is text */
  String FORMAT_TEXT = "text";

  /** TOC id */
  String TOC_ID = "toc.id";

  /** Episodes Link */
  String EPISODES_LINK = "episodes.link";

  /** Table Row Class */
  String TABLE_ROW_CLZ = "table.row.class";

  /** Table Column Season */
  String TABLE_COL_TITLE = "table.col.title";

  /** Table Column Air-Date */
  String TABLE_COL_AIRDATE = "table.col.air-date";

  /** Format of the air date column */
  String DATE_FORMAT = "air.date.format";

  /** Key for the setting used to fetch the episode unifier multiplier */
  String SEASON_MULTIPLIER = "unified.episode.season.multiplier";

  String SEASON_SKIP_LIST = "season.skip";

}


text:
"""Contains the logic for `aq del grn`."""

from aquilon.exceptions_ import ArgumentError
from aquilon.aqdb.model import Host, Personality, HostGrnMap, PersonalityGrnMap
from aquilon.worker.broker import BrokerCommand
from aquilon.worker.dbwrappers.grn import lookup_grn

class CommandDelGrn(BrokerCommand):

    def render(self, session, logger, grn, eon_id, **_):
        dbgrn = lookup_grn(session, grn, eon_id, logger=logger,
                           config=self.config, usable_only=False)

        q1 = session.query(Host.hardware_entity_id)
        q1 = q1.filter_by(owner_eon_id=dbgrn.eon_id)
        q2 = session.query(HostGrnMap.host_id)
        q2 = q2.filter_by(eon_id=dbgrn.eon_id)
        if q1.count() or q2.count():
            raise ArgumentError("GRN %s is still used by hosts, and "
                                "cannot be deleted." % dbgrn.grn)

        q1 = session.query(Personality.id)
        q1 = q1.filter_by(owner_eon_id=dbgrn.eon_id)
        q2 = session.query(PersonalityGrnMap.personality_stage_id)
        q2 = q2.filter_by(eon_id=dbgrn.eon_id)
        if q1.count() or q2.count():
            raise ArgumentError("GRN %s is still used by personalities, "
                                "and cannot be deleted." % dbgrn.grn)

        session.delete(dbgrn)
        session.flush()
        return


text:
//#define COSMOSDEBUG
using System.IO;
using IL2CPU.API.Attribs;
using Cosmos.System;
using Cosmos.System.FileSystem.VFS;

/*
 * This is is similar to what we have done for FileSystem but they did in a weird and really unclear way this time
 * (an abstract class that inherits from an interface? What is the sense? They have not used a class for
 *  any platform but did "kludges" with partial classes).
 * In the end the more simple thing to do is plug things here some it seems only Properties will hit this code
 * while methods will call FileSystem directly... what a mess!
 */
namespace Cosmos.System_Plugs.System.IO
{
    [Plug(Target = typeof(FileSystemInfo))]
    public static class CosmosFileSystemInfo
    {
        [PlugMethod(Signature = "System_Boolean__System_IO_FileSystemInfo_System_IO_IFileSystemObject_get_Exists__")]
        public static bool get_Exists(FileSystemInfo aThis)
        {
            Global.mFileSystemDebugger.SendInternal($"FileSystemInfo.get_Exists : fullPath = {aThis.FullName}");
            // TODO we have to find if 'aThis' is a DirectoryInfo or a FileInfo to decide what method to call
            if (aThis is DirectoryInfo)
                return VFSManager.DirectoryExists(aThis.FullName);
            else
                return VFSManager.FileExists(aThis.FullName);
        }

        public static FileAttributes get_Attributes(FileSystemInfo aThis)
        {
            Global.mFileSystemDebugger.SendInternal($"FileSystemInfo.get_Attributes : fullPath = {aThis.FullName}");
            return VFSManager.GetFileAttributes(aThis.FullName);
        }

        public static void set_Attributes(FileSystemInfo aThis, FileAttributes value)
        {
            Global.mFileSystemDebugger.SendInternal($"FileSystemInfo.set_Attributes : fullPath = {aThis.FullName} value {(int) value}");
            VFSManager.SetFileAttributes(aThis.FullName, value);
        }

        public static object get_FileSystemObject(object aThis)
        {
            return aThis;
        }
    }
}


text:
<?xml version="1.0" encoding="iso-8859-1"?>

<idea-plugin version="2">

  <extensions xmlns="com.intellij">
    <multiHostInjector implementation="com.intellij.spring.web.mvc.SpringJsInjector"/>
  </extensions>
</idea-plugin>


text:
[![GoDoc](https://godoc.org/github.com/01walid/echosentry?status.svg)](https://godoc.org/github.com/01walid/echosentry)

A sentry ([raven-go](https://github.com/getsentry/raven-go)) middleware for [echo](https://github.com/labstack/echo) (v2) micro web framework.

**Note**: this support echo with the standard http engine (no fasthttp support yet)

# Usage

```go
echosentry.SetDSN("https://<key>:<secret>@app.getsentry.com/<project>")
e.Use(echosentry.Middleware())

```

By default, the middleware logs the HTTP context and sends it along with the stacktrace, this adds info about the user's browser, URL, OS, device, interface_type ..etc.

You can disable HTTP context as follow:

```go
echosentry.WithContext(false)
```

## Additional tags

You can append additional tags to be captured by Sentry. Tags content can be extracted from the current request context or just static tags, e.g. tags["app_version"] = appVersion.

```go
echosentry.SetTags(func(c echo.Context) map[string]string {
    return map[string]string{
        "endpoint":       c.Request().URL.String(),
        "http_interface": c.Request().Proto,
        "app_version":    appVersion,
    }
})
```

# TODO
- Log the user info (user context)
- Expose more options

# License
MIT License. A copy is included with the source.


text:
<!--
  Copyright 2014 Google Inc.

  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.
  -->

<resources>

    <!-- Muzei activity -->

    <style name="Theme.MuzeiActivity" parent="Theme.Muzei.Wallpaper">
        <item name="windowActionBar">false</item>
        <!-- on Samsung devices, window animations between windows showing
             the wallpaper seem to be broken, so don't use them. -->
        <!--<item name="android:windowAnimationStyle">@style/WindowAnimation.MuzeiActivity</item>-->
    </style>

    <!-- Settings activity -->

    <style name="Theme.Muzei.Settings" parent="Theme.Muzei.Wallpaper">
        <item name="windowActionBar">false</item>
        <item name="colorControlActivated">#fff</item>
    </style>

    <style name="Settings.Widget.SeekBar.BlurAmount" parent="Widget.Muzei.SeekBar">
        <item name="android:progressDrawable">@drawable/scrubber_progress_blur_amount</item>
    </style>

    <style name="Settings.Widget.SeekBar.DimAmount" parent="Widget.Muzei.SeekBar">
        <item name="android:progressDrawable">@drawable/scrubber_progress_dim_amount</item>
    </style>

    <style name="Settings.Widget.SeekBar.GreyAmount" parent="Widget.Muzei.SeekBar">
        <item name="android:progressDrawable">@drawable/scrubber_progress_grey_amount</item>
    </style>

    <!-- Gallery source settings -->

    <style name="Theme.Muzei.GallerySettings" parent="Theme.Muzei">
        <item name="windowActionBar">false</item>
        <item name="android:windowBackground">@color/gallery_settings_window_background</item>

        <item name="colorPrimaryDark">@color/gallery_settings_theme_dark</item>
        <item name="colorPrimary">@color/gallery_settings_theme</item>
        <item name="colorAccent">@color/gallery_settings_theme</item>
    </style>

    <!-- About -->

    <style name="Theme.Muzei.About" parent="Theme.Muzei.Wallpaper">
        <item name="windowActionBar">false</item>
    </style>

    <!-- Global -->

    <style name="Theme.Muzei.Base" parent="Theme.AppCompat">
        <item name="android:windowBackground">@android:color/black</item>
        <item name="android:windowContentOverlay">@null</item>
        <!--<item name="android:actionModeBackground">@drawable/cab_background</item>-->
        <!--<item name="android:actionModeStyle">@style/Widget.Muzei.ActionMode</item>-->
        <!--<item name="android:actionOverflowButtonStyle">@style/Widget.Muzei.ActionButton.Overflow</item>-->
        <item name="android:selectableItemBackground">@drawable/white_selectable_item_background</item>
        <item name="android:seekBarStyle">@style/Widget.Muzei.SeekBar</item>
        <item name="android:spinnerStyle">@style/Widget.Muzei.Spinner</item>
        <item name="android:dropDownListViewStyle">@style/Widget.Muzei.ListView.DropDown</item>
        <item name="android:popupMenuStyle">@style/Widget.Muzei.PopupMenu</item>
        <item name="actionOverflowMenuStyle">@style/Widget.Muzei.PopupMenu.Overflow</item>
        <item name="android:textAppearanceMedium">@style/TextAppearance.Muzei.Medium</item>
        <item name="android:textAppearanceLargePopupMenu">@style/TextAppearance.Muzei.LargePopupMenu</item>

        <item name="colorPrimary">@color/theme_primary</item>
        <item name="colorAccent">@color/theme_accent</item>
    </style>

    <style name="ThemeOverlay.Muzei.Toolbar" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
        <item name="android:dropDownListViewStyle">@style/Widget.Muzei.ListView.DropDown</item>
        <item name="android:popupMenuStyle">@style/Widget.Muzei.PopupMenu</item>
    </style>

    <style name="Theme.Muzei" parent="Theme.Muzei.Base"> <!-- pre-Lollipop -->
        <item name="android:windowTranslucentStatus">true</item>
        <item name="android:windowTranslucentNavigation">true</item>
    </style>

    <style name="TextAppearance.ActionBar.Title" parent="TextAppearance.AppCompat.Widget.ActionBar.Title">
        <item name="android:textSize">20sp</item>
        <item name="android:textColor">#fff</item>
    </style>

    <style name="Theme.Muzei.Wallpaper" parent="Theme.Muzei">
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:windowShowWallpaper">true</item>
    </style>

    <style name="Widget.Muzei.PopupMenu" parent="Widget.AppCompat.PopupMenu">
        <item name="android:popupBackground">@drawable/popup_background</item>
    </style>

    <style name="Widget.Muzei.PopupMenu.Overflow" parent="Widget.AppCompat.PopupMenu.Overflow">
        <item name="android:popupBackground">@drawable/popup_background</item>
    </style>

    <style name="Muzei.SimpleFadeFragmentAnimation" parent="">
        <item name="android:fragmentFadeEnterAnimation">@animator/fade_in</item>
        <item name="android:fragmentFadeExitAnimation">@animator/fade_out</item>
    </style>

    <style name="Widget.Muzei.SeekBar" parent="android:Widget.Holo.SeekBar">
        <item name="android:progressDrawable">@drawable/scrubber_progress_horizontal</item>
        <item name="android:indeterminateDrawable">@drawable/scrubber_progress_horizontal</item>
        <item name="android:thumb">@drawable/scrubber_control_selector</item>
    </style>

    <style name="Widget.Muzei.Spinner" parent="Widget.AppCompat.Spinner">
        <item name="android:popupBackground">@drawable/popup_background</item>
        <item name="android:dropDownVerticalOffset">4dp</item>
    </style>

    <!-- https://code.google.com/p/android/issues/detail?id=24922 -->
    <style name="Widget.Muzei.ListView.DropDown" parent="Widget.AppCompat.ListView.DropDown">
        <item name="android:popupBackground">@drawable/popup_background</item>
        <item name="android:listSelector">?selectableItemBackground</item>
        <item name="android:dropDownVerticalOffset">-4dp</item>
    </style>

    <style name="TextAppearance.Muzei.Medium" parent="TextAppearance.AppCompat.Medium">
        <item name="android:textColor">#fff</item>
    </style>

    <style name="TextAppearance.Muzei.LargePopupMenu" parent="TextAppearance.AppCompat.Widget.PopupMenu.Large">
        <item name="android:textColor">#eee</item>
    </style>

    <style name="Widget.Muzei.TextView.SettingsAdvancedSeekBarLabel" parent="">
        <item name="android:gravity">center_vertical</item>
        <item name="android:textSize">@dimen/settings_text_size_large</item>
        <item name="android:fontFamily">sans-serif-condensed</item>
        <item name="android:textAllCaps">true</item>
        <item name="android:textColor">#fff</item>
        <item name="android:textStyle">bold</item>
    </style>

    <style name="Widget.Muzei.CheckBox.SettingsAdvanced" parent="">
        <item name="android:textSize">@dimen/settings_text_size_normal</item>
        <item name="android:textColor">#fff</item>
        <item name="android:paddingStart">4dp</item>
        <item name="android:paddingEnd">0dp</item>
    </style>

</resources>


text:
.monaco-workbench .part.activitybar {
	width: 48px;
	height: 100%;
}

.monaco-workbench .activitybar.bordered::before {
	content: '';
	float: left;
	position: absolute;
	box-sizing: border-box;
	height: 100%;
	width: 0px;
	border-color: inherit;
}

.monaco-workbench .activitybar.left.bordered::before {
	right: 0;
	border-right-style: solid;
	border-right-width: 1px;
}

.monaco-workbench .activitybar.right.bordered::before {
	left: 0;
	border-left-style: solid;
	border-left-width: 1px;
}

.monaco-workbench .activitybar > .content {
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

/*
 * Fix menu jumping and background inheritance in Safari
 */
.monaco-workbench.safari .activitybar > .content {
	position: absolute;
	background-color: inherit;
}

/** Viewlet Switcher */

.monaco-workbench .activitybar > .content .monaco-action-bar {
	text-align: left;
	background-color: inherit;
}

.monaco-workbench .activitybar .action-item:focus {
	outline: 0 !important; /* activity bar indicates focus custom */
}

.monaco-workbench .activitybar > .content > .composite-bar {
	margin-bottom: auto;
}

/** Menu Bar */

.monaco-workbench .activitybar .menubar {
	width: 100%;
	height: 35px;
}

.monaco-workbench .activitybar .menubar.compact .toolbar-toggle-more {
	width: 100%;
	height: 35px;
}


text:
package com.twosigma.beakerx.kernel.magic.autocomplete;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.twosigma.beakerx.autocomplete.AutocompleteNode;
import com.twosigma.beakerx.autocomplete.AutocompleteResult;
import org.apache.http.client.fluent.Request;
import org.jetbrains.annotations.NotNull;

import java.io.IOException;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;

import static com.fasterxml.jackson.databind.SerializationFeature.WRITE_ENUMS_USING_TO_STRING;

public class AutocompleteNodeHttpGet extends AutocompleteNode {

  public static final String HTTPS_SEARCH_MAVEN_ORG_SOLRSEARCH_SELECT_Q_S_START_0_ROWS_20 = "https://search.maven.org/solrsearch/select?q=%s&start=0&rows=20";
  public static final String SPACE = "%20";

  private final ObjectMapper objectMapper;

  public AutocompleteNodeHttpGet(String name, List<AutocompleteNode> children) {
    super(name, children);
    this.objectMapper = new ObjectMapper();
    this.objectMapper.enable(WRITE_ENUMS_USING_TO_STRING);
  }

  @Override
  public Optional<AutocompleteResult> findNextWord(String text, LinkedList<String> parts) {
    return Optional.empty();
  }

  @Override
  public Optional<AutocompleteResult> matchToTheWord(String text, LinkedList<String> parts, String last) {
    try {
      Map result = getResult(parts, last);
      if (result.containsKey("response")) {
        Map response = (Map) result.get("response");
        if ((response.containsKey("docs")) && ((List) response.get("docs")).size() > 0) {
          return createResult(text, parts, last, response);
        } else {
          Optional<String> suggestion = getSuggestion(result);
          if (suggestion.isPresent()) {
            Map fromSuggestion = getResult(new LinkedList<>(), suggestion.get());
            if (fromSuggestion.containsKey("response")) {
              Map responseFromSuggestion = (Map) fromSuggestion.get("response");
              if ((responseFromSuggestion.containsKey("docs")) && ((List) responseFromSuggestion.get("docs")).size() > 0) {
                return createResult(text, parts, last, responseFromSuggestion);
              }
            }
          }
        }
      }
      return Optional.empty();
    } catch (Exception e) {
      return Optional.empty();
    }
  }

  private Optional<String> getSuggestion(Map result) {
    if (result.containsKey("spellcheck")) {
      Map spellcheck = (Map) result.get("spellcheck");
      if (spellcheck.containsKey("suggestions")) {
        List suggestions = (List) spellcheck.get("suggestions");
        if (suggestions.size() > 1) {
          Map suggestionOption = (Map) suggestions.get(1);
          if (suggestionOption.containsKey("suggestion")) {
            List suggestion = (List) suggestionOption.get("suggestion");
            if (suggestion.size() > 0) {
              return Optional.of((String) suggestion.get(0));
            }
          }
        }
      }
    }
    return Optional.empty();
  }

  private Optional<AutocompleteResult> createResult(String text, LinkedList<String> parts, String last, Map response) {
    List docs = (List) response.get("docs");
    List<String> collect = (List<String>) docs.stream()
            .map(x -> {
              Map doc = (Map) x;
              return doc.get("g") + " " + doc.get("a") + " " + doc.get("latestVersion");
            })
            .collect(Collectors.toList());

    if (!collect.isEmpty()) {
      return Optional.of(new AutocompleteResult(collect, text.length() - lengthOfCoordinates(parts, last)));
    }
    return Optional.empty();
  }

  private int lengthOfCoordinates(LinkedList<String> parts, String last) {
    return parts.stream().mapToInt(x -> x.length() + 1).sum() + last.length();
  }

  private Map getResult(LinkedList<String> parts, String last) throws IOException {
    String uri = getUrl(parts, last);
    String valueString = Request
            .Get(uri)
            .execute()
            .returnContent()
            .asString();
    return fromJson(valueString);
  }

  private Map fromJson(String json) {
    try {
      return objectMapper.readValue(json, Map.class);
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
  }

  @NotNull
  private String getUrl(LinkedList<String> parts, String last) {
    if (parts.size() == 2) {
      String encode = parts.get(0) + SPACE + parts.get(1) + SPACE + last;
      return String.format(HTTPS_SEARCH_MAVEN_ORG_SOLRSEARCH_SELECT_Q_S_START_0_ROWS_20, encode);
    } else if (parts.size() == 1) {
      String encode = parts.get(0) + SPACE + last;
      return String.format(HTTPS_SEARCH_MAVEN_ORG_SOLRSEARCH_SELECT_Q_S_START_0_ROWS_20, encode);
    } else if (parts.size() == 0) {
      String encode = last;
      return String.format(HTTPS_SEARCH_MAVEN_ORG_SOLRSEARCH_SELECT_Q_S_START_0_ROWS_20, encode);
    }
    return "";
  }
}


text:
package edu.clemson.cs.r2jt.typeandpopulate.programtypes;

import edu.clemson.cs.r2jt.typeandpopulate.MTCartesian;
import edu.clemson.cs.r2jt.typeandpopulate.MTCartesian.Element;
import edu.clemson.cs.r2jt.typeandpopulate.MTType;
import edu.clemson.cs.r2jt.typeandpopulate.entry.FacilityEntry;
import edu.clemson.cs.r2jt.typereasoning.TypeGraph;
import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author hamptos
 */
public class PTRecord extends PTType {

    private final Map<String, PTType> myFields = new HashMap<String, PTType>();

    private final MTType myMathTypeAlterEgo;

    public PTRecord(TypeGraph g, Map<String, PTType> types) {
        super(g);

        myFields.putAll(types);

        Element[] elements = new Element[types.size()];
        int index = 0;
        for (Map.Entry<String, PTType> field : types.entrySet()) {
            elements[index] =
                    new Element(field.getKey(), field.getValue().toMath());
            index++;
        }
        myMathTypeAlterEgo = new MTCartesian(g, elements);
    }

    public PTType getFieldType(String name) {
        return myFields.get(name);
    }

    @Override
    public MTType toMath() {
        return myMathTypeAlterEgo;
    }

    @Override
    public PTType instantiateGenerics(
            Map<String, PTType> genericInstantiations,
            FacilityEntry instantiatingFacility) {

        Map<String, PTType> newFields = new HashMap<String, PTType>();
        for (Map.Entry<String, PTType> type : myFields.entrySet()) {
            newFields.put(type.getKey(), type.getValue().instantiateGenerics(
                    genericInstantiations, instantiatingFacility));
        }

        return new PTRecord(getTypeGraph(), newFields);
    }

    @Override
    public String toString() {
        return "Record " + myFields;
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true">

    <android.support.design.widget.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="256dp"
        android:fitsSystemWindows="true">
        <android.support.design.widget.CollapsingToolbarLayout
            android:id="@+id/collapsing_toolbar_layout"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:contentScrim="#30469b"
            app:expandedTitleMarginStart="48dp"
            app:layout_scrollFlags="scroll|exitUntilCollapsed">

            <ImageView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:scaleType="centerCrop"
                android:src="@drawable/p1"
                app:layout_collapseMode="parallax"
                app:layout_collapseParallaxMultiplier="0.7"  />

            <android.support.v7.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                app:layout_collapseMode="pin" />
        </android.support.design.widget.CollapsingToolbarLayout>
    </android.support.design.widget.AppBarLayout>
</android.support.design.widget.CoordinatorLayout>


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Collections.Generic;
using Xunit;

namespace System.ComponentModel.Primitives.Tests
{
    public class RefreshPropertiesAttributeTests
    {
        [Fact]
        public void Equals_DifferentValues()
        {
            Assert.False(RefreshPropertiesAttribute.All.Equals(RefreshPropertiesAttribute.Repaint));
        }

        [Fact]
        public void Equals_Null()
        {
            Assert.False(RefreshPropertiesAttribute.All.Equals(null));
        }

        [Fact]
        public void Equals_SameValue()
        {
            Assert.True(RefreshPropertiesAttribute.Default.Equals(RefreshPropertiesAttribute.Default));
        }

        [Theory]
        [InlineData(RefreshProperties.All)]
        [InlineData(RefreshProperties.None)]
        [InlineData(RefreshProperties.Repaint)]
        public void GetRefreshProperties(RefreshProperties value)
        {
            var attribute = new RefreshPropertiesAttribute(value);

            Assert.Equal(value, attribute.RefreshProperties);
        }

        [Theory]
        [MemberData(nameof(RefreshPropertiesAttributeData))]
        public void NameTests(RefreshPropertiesAttribute attribute, RefreshProperties refreshProperties)
        {
            Assert.Equal(refreshProperties, attribute.RefreshProperties);
        }

        private static IEnumerable<object[]> RefreshPropertiesAttributeData()
        {
            yield return new object[] { RefreshPropertiesAttribute.Default, RefreshProperties.None };
            yield return new object[] { RefreshPropertiesAttribute.All, RefreshProperties.All };
            yield return new object[] { RefreshPropertiesAttribute.Repaint, RefreshProperties.Repaint };
        }
    }
}


text:
function w = Faddeeva(z)
% Faddeeva
%  Computes the Faddeeva function or the Kramp function, which is a scaled
%  complex complementary error function, in complex argument z. The
%  algorithm Faddeeva was adapted from the original algorithm fadf.m
%  written by Sanjar M. Abrarov and Brendan M. Quine.
%
%  The Faddeeva function is defined as
%   w(z) = exp(-z^2) * erfc(-1i*z)
%        = exp(-z^2) * (1 - erf(-1i*z))
%        = exp(-z^2) * (1 + 2i/sqrt(pi) * int_0^z exp(t^2)dt),
%  where erf(z) is the complex error function and erfc(z) is the complex
%  complementary error function.
%
%  In particular, the following relations hold true:
%   erfcx(z)  = exp(z^2) * erfc(z)
%             = w(1i*z)
%   erfc(z)   = exp(-z^2) * w(1i*z)
%   erf(z)    = 1 - erfc(z)
%             = 1 - exp(-z^2) * w(1i*z)
%   erfi(z)   = -1i * erf(1i*z)
%             = -1i * (1 - exp(-z^2) * w(1i*z))
%   Dawson(z) = sqrt(pi)/2 * exp(-z^2) * erfi(z)
%             = 1i * sqrt(pi)/2 * (exp(-z^2) - w(z)).
%
%  The algorithmic implementation utilizes the approximations based on the
%  Fourier expansion and the Laplace continued fraction. The code covers
%  with high-accuracy the entire complex plain required for practical
%  applications. The code remains highly accurate even at vanishing
%  imaginary argument y -> 0, where y = Im[z]. The worst detected accuracy
%  is ~10^-13.
%
%  For more details see also
%  http://ab-initio.mit.edu/wiki/index.php/Faddeeva_Package
%
%  SYNTAX:
%   w = Faddeeva(z)
%
%  INPUTS:
%   z      - possibly complex input argument (vector or array),
%
%  OUTPUTS:
%   w      - values of the Faddeeva function
%
%  EXAMPLE 1:
%  % Faddeeva function
%  z = 1i + linspace(-5,5);
%  w = Faddeeva(z);
%  plot(w)
%
%  EXAMPLE 2:
%  % erfc(z) is the complex complementary error function.
%  z    = 1i + linspace(-5,5);
%  erfc = @(z) exp(-z.^2) .* Faddeeva(1i*z);
%  f    = erfc(z);
%  plot(f)
%
%  EXAMPLE 3:
%  % erf(z) is the complex error function.
%  z    = 1i + linspace(-5,5);
%  erf  = @(z) 1 - exp(-z.^2) .* Faddeeva(1i*z);
%  f    = erf(z);
%  plot(f)
%
%  EXAMPLE 4:
%  % erfi(z) is the imaginari complex error function.
%  z    = 1i + linspace(-5,5);
%  erfi  = @(z) -1i * (1 - exp(z.^2) .* Faddeeva(-z));
%  f    = erfi(z);
%  plot(f)
%
%  EXAMPLE 5:
%  % Dawson(z) is the Dawson complex function.
%  z    = 1i + linspace(-5,5);
%  Dawson  = @(z) 1i * sqrt(pi)/2 * (exp(-z.^2) - Faddeeva(z)));
%  f    = Dawson(z);
%  plot(f)
%
%  REFERENCES:
%  [1] S. M. Abrarov and B. M. Quine, Appl. Math. Comput., Efficient
%      algorithmic implementation of the Voigt/complex error function based
%      on exponential series approximation, 218 (2011) 1894-1902.
%      http://doi.org/10.1016/j.amc.2011.06.072
%  [2] S. M. Abrarov and B. M. Quine, On the Fourier expansion method
%      for highly accurate computation of the Voigt/complex error function
%      in a rapid algorithm, arXiv:1205.1768v1 (2012).
%      http://arxiv.org/abs/1205.1768
%  [3] W. Gautschi, Efficient computation of the complex error function,
%      SIAM J. Numer. Anal., 7 (1970) 187-198.
%      http://www.jstor.org/stable/2949591
%  [4] T. M. Karbach, G. Raven and M. Schiller, Decay time integrals in
%      neutral meson mixing and their efficient evaluation,
%      arXiv:1407.0748v1 (2014).
%      http://arxiv.org/abs/1407.0748
%
%  AUTHOR/CREDITS:
%   This is adapted version of the original algorithm fadf.m  written by
%   Sanjar M. Abrarov and Brendan M. Quine, York University, Canada. For
%   more details see the LICENCE.
%   github.com/aoeftiger/faddeevas/blob/master/cernlib_root_extended/fadf.m
%
%  LICENCE:
%  Copyright (c) 2016, Sanjar Abrarov
%  All rights reserved.
%
%  Redistribution and use in source and binary forms, with or without
%  modification, are permitted provided that the following conditions are
%  met:
%
%      * Redistributions of source code must retain the above copyright
%        notice, this list of conditions and the following disclaimer.
%      * Redistributions in binary form must reproduce the above copyright
%        notice, this list of conditions and the following disclaimer in
%        the documentation and/or other materials provided with the
%        distribution
%
%  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
%  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
%  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
%  PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
%  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
%  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
%  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
%  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
%  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
%  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
%  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

% This is modified version of the original MATLAB code fadf.m by Sanjar M.
% Abrarov and Brendan M. Quine
% Viktor Witkovsky (witkovsky@gmail.com)
% Ver.: 20-Sep-2019 20:26:55

%% FUNCTION CALL
% w = Faddeeva(z)

%% CHECK THE INPUT PARAMETERS
narginchk(1,1);
sz = size(z);
z  = z(:);

%% ALGORITHM
ind_neg    = imag(z)<0;        % if some imag(z) values are negative, then
z(ind_neg) = conj(z(ind_neg)); % bring them to the upper-half plane
ind_ext    = abs(z)>15;        % external indices
ind_band   = abs(z)<=15 & imag(z)<10^-5; % narrow band indices
w          = zeros(size(z));   % define array

% internal area. This area is the most difficult for accurate computation
w(~ind_ext & ~ind_band) = fexp(z(~ind_ext & ~ind_band));
w(ind_ext)              = contfr(z(ind_ext)); % external area
w(ind_band)             = smallim(z(ind_band)); % narrow band

% Convert for negative imag(z) values
w(ind_neg) = conj(2*exp(-z(ind_neg).^2) - w(ind_neg));
w = reshape(w,sz);
end
%% FUNCTION FEXP
function FE = fexp(z,tauM)
% FEXP - the Fourier expansion approximation

if nargin == 1
    tauM = 12; % default margin value
end
maxN = 23; % number of summation terms

n  = 1:maxN;
aN = 2*sqrt(pi)/tauM*exp(-n.^2*pi^2/tauM^2); % Fourier coefficients

z1 = exp(1i*tauM*z); % define first repeating array
z2 = tauM^2*z.^2;    % define second repeating array

FE = sqrt(pi)/tauM*(1 - z1)./z2; % initiate array FE
for n = 1:maxN
    FE = FE + (aN(n)*((-1)^n*z1 - 1)./(n^2*pi^2 - z2));
end
FE = 1i*tauM^2*z/sqrt(pi).*FE;
end

%% FUNCTION CONTFR
function CF = contfr(z)
% CONTFR - the Laplace continued fraction approximation

aN = 8; % initial integer
aN = 1:2*aN;
aN = aN/2;

CF = aN(end)./z; % start computing from the last aN
for n = 1:length(aN) - 1
    CF = aN(end-n)./(z - CF);
end
CF = 1i/sqrt(pi)./(z - CF);
end

%% FUNCTION SMALLIM
function SIm = smallim(z)
% SMALLIM - approximation at small imag(z)

ind_0 = abs(real(z))<=1e-3; % indices near origin
ind_4 = abs(real(z))>4; % indices for |Re[z]| > 4

% If 10^-3 < |Re[z]| <= 4, then:
SIm(~ind_0 & ~ind_4) = fexp(z(~ind_0 & ~ind_4),12.1);

% else if |Re[z]| <= 10^-3, then:
SIm(ind_0) = (1-z(ind_0).^2).*(1+2i/sqrt(pi)*z(ind_0));

del    = 10^-5; % assign delta
z_del  = real(z(ind_4)) + 1i*del; % incorporate delta
zr     = imag(z(ind_4))./del; % assign ratio
ff_ref = fexp(z_del); % assign reference of the Faddeeva function

% Finally, for |Re[z]| > 4 apply
SIm(ind_4) = zr.*real(ff_ref) + (1 - zr).*exp(-real(z_del).^2) ...
    + 1i*imag(ff_ref);
end


text:
package com.lidroid.xutils.bitmap.callback;

/**
 * Author: wyouflf
 * Date: 13-11-1
 * Time: 下午8:17
 */
public enum BitmapLoadFrom {
    MEMORY_CACHE, DISK_CACHE, URI
}


text:
{% extends "site_base.html" %}

{% load i18n %}

{% block head_title %}{% trans "Statistics" %}{% endblock %}

{% block extra_head %}
    <link type="text/css" rel="stylesheet" media="all" href="{{ STATIC_URL }}external/daterangepicker/ui.daterangepicker.css" />
    <link type="text/css" rel="stylesheet" media="all" href="{{ STATIC_URL }}external/daterangepicker/ui.datepicker.css" />
    <link type="text/css" rel="stylesheet" media="all" href="{{ STATIC_URL }}external/daterangepicker/ui.core.css" />
    <link type="text/css" rel="stylesheet" media="all" href="{{ STATIC_URL }}external/daterangepicker/ui.theme.css" />
{% endblock %}

{% block content %}

        {% include "statistics/navigation.html" %}

{% trans "Billing index" %}

{% blocktrans with user as user %}Statistics for user {{ user }}{% endblocktrans %}

{% trans "Get billing for user: " %}{{ sellected_user }}

        <form method="POST" action="" class="form">

            {% trans "Get billing by sellecting a start day and a number of weeks you would like to see." %}
            {% trans "Note that a week is 7 whole days, like friday to thursday." %}

            {% trans "Start date" %}
            <input id="billing-date" type="textfield" name="start-date"/>

            {% trans "number of weeks (max 4)" %}
            <input type="textfield" name="number-of-weeks" value=""/>

            <input type="submit" value="{% trans 'Get' %}"/>

        </form>
        <form method="POST" action="" class="form">

            {% trans "Get billing by selecting a from and to date. Use the date picker for a fast selection of a time period of your choosing." %}

          {{ form.errors }}

            {{ form.date.errors }}
            {% trans "Date" %}
            {{ form.date }}

            <input type="submit" value="{% trans 'Get' %}"/>

        </form>

{% endblock %}

{% block closure %}

{% endblock %}


text:
Create a representation of the Berlin Clock for a given time (hh::mm:ss).

## Overview:

The Berlin Uhr (Clock) is a rather strange way to show the time. On the top of the clock there is a yellow lamp that blinks on/off every two seconds. The time is calculated by adding rectangular lamps.

The top two rows of lamps are red. These indicate the hours of a day. In the top row there are 4 red lamps. Every lamp represents 5 hours. In the lower row of red lamps every lamp represents 1 hour. So if two lamps of the first row and three of the second row are switched on that indicates 5+5+3=13h or 1 pm.

The two rows of lamps at the bottom count the minutes. The first of these rows has 11 lamps, the second 4. In the first row every lamp represents 5 minutes. In this first row the 3rd, 6th and 9th lamp are red and indicate the first quarter, half and last quarter of an hour. The other lamps are yellow. In the last row with 4 lamps every lamp represents 1 minute.

The lamps are switched on from left to right.

## Test Scenarios

*** Reference: ***  (Y = Yellow, R = Red, O = Off)

**Input:** 00:00:00 - **Result:** Y OOOO OOOO OOOOOOOOOOO OOOO

**Input:** 13:17:01 - **Result:** O RROO RRRO YYROOOOOOOO YYOO

**Input:** 23:59:59 - **Result:** O RRRR RRRO YYRYYRYYRYY YYYY

**Input:** 24:00:00 - **Result:** Y RRRR RRRR OOOOOOOOOOO OOOO

## Build:

In order to build the project, follow these steps:

- Clone the git repository

```bash
~$ git clone git@github.com:mmonti/berlin-clock.git
```
- Run

```bash
~$ cd berlin-clock
~/berlin-clock$ mvn clean package
```

The previous steps genereate a jar file under: `./target/berlin-clock-1.0-SNAPSHOT.jar`

## Run:

To run and test the application:

```bash
~/berlin-clock$ cd target
~/berlin-clock/target$ java -jar berlin-clock-1.0-SNAPSHOT.jar -i 23:33:09 -p BERLIN
```

###Input Parameters:

 argument | required     | type    | description
:---------|:------------:|:-------:|:------------
 -i       | **required** | String  |  input time (any time with the following format: HH:mm:ss)
 -p       | optional     | String  | processing strategy (SIMPLE, BERLIN) - default: SIMPLE.

```
~/berlin-clock/target$ java -jar berlin-clock-1.0-SNAPSHOT.jar -i 00:00:00 -p Berlin
~/berlin-clock/target$ java -jar berlin-clock-1.0-SNAPSHOT.jar -i 13:17:01 -p berlin
~/berlin-clock/target$ java -jar berlin-clock-1.0-SNAPSHOT.jar -i 23:59:59 -p Berlin
~/berlin-clock/target$ java -jar berlin-clock-1.0-SNAPSHOT.jar -i 24:00:00 -p Berlin
```

## Notes

1. Argument -p is case insensitive.
2. To enable logs, change log level in `log4j.properties` to ***DEBUG***


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="net.t32leaves.pebblelightlogger"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="7" android:targetSdkVersion="17" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="net.t32leaves.pebblelightlogger.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <!-- receiver android:name=".LightLoggerStarter">
            <intent-filter>
                <action android:name="net.t32leaves.intent.startlightLogger" />
                <action android:name="android.intent.action.BOOT_COMPLETED"/>
            </intent-filter>
        </receiver -->
        <receiver android:name=".LogMessageReceiver">
            <intent-filter>
                <action android:name="com.getpebble.action.app.RECEIVE" />
            </intent-filter>
        </receiver>
    </application>

</manifest>


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:gravity="center_vertical|center"
    android:orientation="horizontal">

    <TextView
        android:id="@+id/solar_day"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="" />

    <TextView
        android:id="@+id/lunar_day"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="2dp"
        android:ems="1"
        android:text="" />

</LinearLayout>


text:
module ActiveRecord
  module EavHashes
    # Used instead of nil when a nil value is assigned
    # (otherwise, the value will try to deserialize itself and
    #  that would break everything horrifically)
    class NilPlaceholder; end

    # Represent an EAV row. This class should NOT be used directly, instead it should be inherited from
    # by the class generated by eav_hash_for.
    class EavEntry < ActiveRecord::Base
      # prevent activerecord from thinking we're trying to do STI
      self.abstract_class = true

      # Tell ActiveRecord to convert the value to its DB storable format
      before_save :serialize_value

      # Let the key be assignable only once on creation
      attr_readonly :entry_key

      # Contains the values the value_type column should have based on the type of the value being stored
      SUPPORTED_TYPES = {
          :String     => 0,
          :Symbol     => 1,
          :Integer    => 2,
          :Fixnum     => 2,
          :Bignum     => 2,
          :Float      => 3,
          :Complex    => 4,
          :Rational   => 5,
          :Boolean    => 6, # For code readability
          :TrueClass  => 6,
          :FalseClass => 6,
          :Object     => 7 # anything else (including Hashes, Arrays) will be serialized to yaml and saved as Object
      }

      # Does some sanity checks.
      def after_initialize
        raise "key should be a string or symbol!" unless key.is_a? String or key.is_a? Symbol
        raise "value should not be empty!" if @value.is_a? String and value.empty?
        raise "value should not be nil!" if @value.nil?
      end

      # Gets the EAV row's value
      def value
        return nil if @value.is_a? NilPlaceholder
        @value.nil? ? deserialize_value : @value
      end

      # Sets the EAV row's value
      # @param [Object] val the value
      def value= (val)
        @value = (val.nil? ? NilPlaceholder.new : val)
      end

      def key
        k = read_attribute :entry_key
        (read_attribute :symbol_key) ? k.to_sym : k
      end

      # Raises an error if you try changing the key (unless no key is set)
      def key= (val)
        raise "Keys are immutable!" if read_attribute(:entry_key)
        raise "Key must be a string!" unless val.is_a?(String) or val.is_a?(Symbol)
        write_attribute :entry_key, val.to_s
        write_attribute :symbol_key, (val.is_a? Symbol)
      end

      # Gets the value_type column's value for the type of value passed
      # @param [Object] val the object whose value_type to determine
      def self.get_value_type (val)
        return nil if val.nil?
        ret = SUPPORTED_TYPES[val.class.name.to_sym]
        if ret.nil?
          ret = SUPPORTED_TYPES[:Object]
        end
        ret
      end

    private
      # Sets the value_type column to the appropriate value based on the value's type
      def update_value_type
        write_attribute :value_type, EavEntry.get_value_type(@value)
      end

      # Converts the value to its database-storable form and tells ActiveRecord that it's been changed (if it has)
      def serialize_value
        # Returning nil will prevent the row from being saved, to save some time since the EavHash that manages this
        # entry will have marked it for deletion.
        raise "Tried to save with a nil value!" if @value.nil? or @value.is_a? NilPlaceholder

        update_value_type
        if value_type == SUPPORTED_TYPES[:Object]
          write_attribute :value, YAML::dump(@value)
        else
          write_attribute :value, @value.to_s
        end

        read_attribute :value
      end

      # Converts the value from it's database representation to the type specified in the value_type column.
      def deserialize_value
        if @value.nil?
          @value = read_attribute :value
        end

        case value_type
          when SUPPORTED_TYPES[:Object] # or Hash, Array, etc.
            @value = YAML::load @value
          when SUPPORTED_TYPES[:Symbol]
            @value = @value.to_sym
          when SUPPORTED_TYPES[:Integer] # or Fixnum, Bignum
            @value = @value.to_i
          when SUPPORTED_TYPES[:Float]
            @value = @value.to_f
          when SUPPORTED_TYPES[:Complex]
            @value = Complex @value
          when SUPPORTED_TYPES[:Rational]
            @value = Rational @value
          when SUPPORTED_TYPES[:Boolean]
            @value = (@value == "true")
          else
            @value
        end
      end
    end
  end
end


text:
#include "lapacke_utils.h"

lapack_int LAPACKE_clauum( int matrix_layout, char uplo, lapack_int n,
                           lapack_complex_float* a, lapack_int lda )
{
    if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
        LAPACKE_xerbla( "LAPACKE_clauum", -1 );
        return -1;
    }
#ifndef LAPACK_DISABLE_NAN_CHECK
    /* Optionally check input matrices for NaNs */
    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
        return -4;
    }
#endif
    return LAPACKE_clauum_work( matrix_layout, uplo, n, a, lda );
}


text:
package com.github.lquiroli.menupager.annotation;

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

/**
 * Use this annotation to decorate a String inside your custom class. This will be used by {@link com.github.lquiroli.menupager.widget.SimpleMenuFragmentAdapter}
 * during creation of the menu pages and by {@link com.github.lquiroli.menupager.widget.SimpleMenuRecyclerAdapter} during creation of menu items
 *
Created by lorenzo.quiroli

 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface Label {

}


text:
""" 58 zhengzhou ershou house information """
from scrapy.spiders import Spider
from scrapy import Request
from scrapy.exceptions import CloseSpider, DropItem
from five8.items import Five8Item
import re
from five8.mydb import db_context

class ErshouHouseSpider(Spider):
    name = '58ershou'
    allowed_domains = ['58.com']

    count = 0
    item_count = 0

    start_urls = \
        ['http://zz.58.com/ershoufang/0/?\
        PGTID=0d30000c-0015-675a-6e79-8562022fa87f&ClickID=1']

    custom_settings = {
        'ITEM_PIPELINES':{
            'five8.pipelines.Five8ToDbPipeline': 400
        },
        'DOWNLOADER_MIDDLEWARES': {
            'five8.middlewares.Five8SpiderMiddleware': 543,
        }
    }

    # count for item had been crawled.
    duplicated_count = 0

    def parse(self, response):
        """ parse url from summary page. """
        info_urls = response.xpath('//h2[@class="title"]/a/@href').extract()

        for info_url in info_urls:
            if not db_context.exists_five8_houseurl(info_url):
                print('start requesting next item. url:' + info_url)
                yield Request(info_url, callback=self.parse_item)
            else:
                self.duplicated_count += 1
                print('this is url has been crawled. url:' + info_url)

        for next_page in response.xpath('//div[@class="pager"]/a[@class="next"]/@href').extract():
            if self.count < 100:
                self.count += 1
                print("start requesting next page:", self.count)
                yield Request(next_page, callback=self.parse)

    def parse_item(self, response):
        """ parse house item from info page. """
        self.item_count += 1
        five8Item = Five8Item()
        five8Item['phone'] = \
            response.xpath('//p[@class="phone-num"]/text()').extract_first()
        five8Item['phone_belong'] = \
            response.xpath('//p[@class="phone-belong"]/span/text()').extract_first()
        five8Item['expense'] = \
            response.xpath('//div[@class="general-item general-expense"]').extract_first()
        five8Item['situation'] = \
            response.xpath('//div[@class="general-item general-situation"]').extract_first()
        five8Item['description'] = \
            response.xpath('//p[@class="pic-desc-word"]').extract_first()
        five8Item['owner'] = \
            response.xpath('//div[contains(@class, "agent-info")]\
                /p[contains(@class, "agent-name")]/a/text()').extract_first()

        five8Item['district'] = \
            response.xpath('//div[contains(@class,"nav-top-bar")]/a[2]/text()').extract_first()
        five8Item['sub_district'] = \
            response.xpath('//div[contains(@class,"nav-top-bar")]/a[3]/text()').extract_first()

        if five8Item['owner'] is None:
            five8Item['owner'] = \
            response.xpath('//div[contains(@class, "agent-info")]/div/a/text()').extract_first()
        print('extract five8item:' + str(five8Item))
        return five8Item


text:
/* ** GENEREATED FILE - DO NOT MODIFY ** */
package com.wilutions.mslib.outlook.impl;
import com.wilutions.com.*;

@SuppressWarnings("all")
@CoClass(guid="{C091A96C-A463-DB41-5DAE-69E7A5F7FCBC}")
public class AttachmentImpl extends Dispatch implements com.wilutions.mslib.outlook.Attachment {
  @DeclDISPID(61440)  public com.wilutions.mslib.outlook._Application getApplication() throws ComException {
    final Object obj = this._dispatchCall(61440,"Application", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return Dispatch.as(obj, com.wilutions.mslib.outlook.impl._ApplicationImpl.class);
  }
  @DeclDISPID(61450)  public com.wilutions.mslib.outlook.OlObjectClass getClass_() throws ComException {
    final Object obj = this._dispatchCall(61450,"Class", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return com.wilutions.mslib.outlook.OlObjectClass.valueOf((Integer)obj);
  }
  @DeclDISPID(61451)  public com.wilutions.mslib.outlook._NameSpace getSession() throws ComException {
    final Object obj = this._dispatchCall(61451,"Session", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return Dispatch.as(obj, com.wilutions.mslib.outlook.impl._NameSpaceImpl.class);
  }
  @DeclDISPID(113)  public IDispatch getParent() throws ComException {
    final Object obj = this._dispatchCall(113,"Parent", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (IDispatch)obj;
  }
  @DeclDISPID(12289)  public String getDisplayName() throws ComException {
    final Object obj = this._dispatchCall(12289,"DisplayName", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (String)obj;
  }
  @DeclDISPID(12289)  public void setDisplayName(final String value) throws ComException {
    assert(value != null);
    this._dispatchCall(12289,"DisplayName", DISPATCH_PROPERTYPUT,value);
  }
  @DeclDISPID(14084)  public String getFileName() throws ComException {
    final Object obj = this._dispatchCall(14084,"FileName", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (String)obj;
  }
  @DeclDISPID(91)  public Integer getIndex() throws ComException {
    final Object obj = this._dispatchCall(91,"Index", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (Integer)obj;
  }
  @DeclDISPID(14088)  public String getPathName() throws ComException {
    final Object obj = this._dispatchCall(14088,"PathName", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (String)obj;
  }
  @DeclDISPID(114)  public Integer getPosition() throws ComException {
    final Object obj = this._dispatchCall(114,"Position", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (Integer)obj;
  }
  @DeclDISPID(114)  public void setPosition(final Integer value) throws ComException {
    assert(value != null);
    this._dispatchCall(114,"Position", DISPATCH_PROPERTYPUT,value);
  }
  @DeclDISPID(14085)  public com.wilutions.mslib.outlook.OlAttachmentType getType() throws ComException {
    final Object obj = this._dispatchCall(14085,"Type", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return com.wilutions.mslib.outlook.OlAttachmentType.valueOf((Integer)obj);
  }
  @DeclDISPID(105)  public void Delete() throws ComException {
    this._dispatchCall(105,"Delete", DISPATCH_METHOD,null);
  }
  @DeclDISPID(104)  public void SaveAsFile(final String Path) throws ComException {
    assert(Path != null);
    this._dispatchCall(104,"SaveAsFile", DISPATCH_METHOD,null,Path);
  }
  @DeclDISPID(64253)  public com.wilutions.mslib.outlook.PropertyAccessor getPropertyAccessor() throws ComException {
    final Object obj = this._dispatchCall(64253,"PropertyAccessor", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    final Dispatch disp = (Dispatch)obj;
    return disp.as(com.wilutions.mslib.outlook.PropertyAccessor.class);
  }
  @DeclDISPID(64489)  public Integer getSize() throws ComException {
    final Object obj = this._dispatchCall(64489,"Size", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (Integer)obj;
  }
  @DeclDISPID(64536)  public com.wilutions.mslib.outlook.OlAttachmentBlockLevel getBlockLevel() throws ComException {
    final Object obj = this._dispatchCall(64536,"BlockLevel", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return com.wilutions.mslib.outlook.OlAttachmentBlockLevel.valueOf((Integer)obj);
  }
  @DeclDISPID(64634)  public String GetTemporaryFilePath() throws ComException {
    final Object obj = this._dispatchCall(64634,"GetTemporaryFilePath", DISPATCH_METHOD,null);
    if (obj == null) return null;
    return (String)obj;
  }
  public AttachmentImpl(String progId) throws ComException {
    super(progId, "{00063007-0000-0000-C000-000000000046}");
  }
  protected AttachmentImpl(long ndisp) {
    super(ndisp);
  }
  public String toString() {
    return "[AttachmentImpl" + super.toString() + "]";
  }
}


text:
<?php

namespace app\models\master;

use Yii;

/**
 * This is the model class for table "{{%orgn}}".
 *
 * @property integer $id
 * @property string $code
 * @property string $name
 * @property integer $created_at
 * @property integer $created_by
 * @property integer $updated_at
 * @property integer $updated_by
 *
 * @property Branch[] $branches
 */
class Orgn extends \app\classes\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%orgn}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['code', 'name'], 'required'],
            [['code'], 'string', 'max' => 20],
            [['name'], 'string', 'max' => 64],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'code' => 'Code',
            'name' => 'Name',
            'created_at' => 'Created At',
            'created_by' => 'Created By',
            'updated_at' => 'Updated At',
            'updated_by' => 'Updated By',
        ];
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getBranches()
    {
        return $this->hasMany(Branch::className(), ['orgn_id' => 'id']);
    }

    /**
     * @inheritdoc
     */
    public function behaviors()
    {
        return [
            'yii\behaviors\TimestampBehavior',
            'yii\behaviors\BlameableBehavior',
        ];
    }
}


text:
<?php

use Illuminate\Database\Seeder;

class RoleTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        DB::table('roles')->insert([
            'name' => 'admin',
            'display_name' => 'Administrador',
            'created_at' => Carbon\Carbon::now(),
            'updated_at' => Carbon\Carbon::now(),
        ]);
        DB::table('roles')->insert([
            'name' => 'administrativo',
            'display_name' => 'Gestor Administrativo',
            'created_at' => Carbon\Carbon::now(),
            'updated_at' => Carbon\Carbon::now(),
        ]);
        DB::table('roles')->insert([
            'name' => 'financiero',
            'display_name' => 'Administrador Financiero',
            'created_at' => Carbon\Carbon::now(),
            'updated_at' => Carbon\Carbon::now(),
        ]);
    }
}


text:
#include <Furrovine++/Strings.h>
#include <Furrovine++/Graphics/ShaderSource.h>

namespace Furrovine { namespace Graphics {

	struct ShaderPassDescription {
	public:
		String PassName;
		ShaderSource VertexSource;
		ShaderSource HullSource;
		ShaderSource DomainSource;
		ShaderSource GeometrySource;
		ShaderSource PixelSource;

		furrovineapi ShaderPassDescription( );

		furrovineapi ShaderPassDescription( ShaderSource vertex, ShaderSource pixel );

		furrovineapi ShaderPassDescription( ShaderSource vertex,
			ShaderSource geometry, ShaderSource hull,
			ShaderSource domain, ShaderSource pixel );

		furrovineapi ShaderPassDescription( ShaderSource vertex,
			ShaderSource geometry,
			ShaderSource pixel );

		furrovineapi ShaderPassDescription( const ShaderSource& compute );

		furrovineapi ShaderSource& operator[] ( ShaderStage method );

	};

}}


text:
class Admin::DashboardController < Admin::BaseController
  inherit_resources
  defaults  resource_class: Statistics
  actions :index
end


text:
package org.assertj.core.api.iterable;

import static java.util.Arrays.asList;
import static org.assertj.core.api.Assertions.assertThat;

import java.util.List;

import org.junit.Ignore;
import org.junit.Test;

/**
 * @author Johannes Schneider (js@cedarsoft.com)
 */
public class Iterable_generics_with_varargs_Test {

  @SuppressWarnings({ "unchecked", "rawtypes" })
  @Test
  public void testWithoutGenerics() {
	List strings = asList("a", "b", "c");
	assertThat(strings).contains("a", "b");
  }

  @Test
  public void testConcreteType() {
	List<String> strings = asList("a", "b", "c");
	assertThat(strings).contains("a", "b");
  }

  @Test @Ignore
  public void testListAssertWithGenerics() {
    // List<? extends String> strings = asList("a", "b", "c");
    // does not compile as Java 8 is stricter with generics ...
    // assertThat(strings).contains("a", "b");
  }
}


text:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

#GearVRf Samples and Demos

To get the GearVR Framework Samples and Demos, clone the following repository in the same directory as where you did the clone for the framework source code:

```
$ git clone https://github.com/gearvrf/GearVRf-Demos.git -b release_v3.2
```

!!!Note You should put both GearVRf/ and GearVRf-Demos/ in the same directory.

##Sample GearVRf Applications

Sample GearVRf applications, available in the GearVRf SDK, can provide you with valuable insight into writing your own VR applications.

A minimal sample showing how to display an equirectangular (360) photo.

A minimal sample showing how to display an equirectangular (360) video using either Android's MediaPlayer class or the ExoPlayer class.

A simplified version of the gvr-3dcursor sample that shows how to use the 3DCursor plugin.

Shows how to use GearVRf's accessibility classes. For example: InvertedColors, TextToSpeech, and Zoom.

Simple sample showing how to use GearVRf with the Bullet Physics plugin.

Simple sample showing how to use the camera2 api along with renderscript for use with the passthrough camera.

Simple example of Spatial Audio using GoogleVR's audio library (previously used cardboard's audio library).

A simple sample which can contain as many Stanford bunnies as we want to make it complex

A simple sample that demostrates how to use VR controller.

A nice demo that shows input from both the gamepad and touchpad to control a character.

A simple example to show how to load in a cubemap and use it for the background as well as a reflection on an object.

An example showing how to display Android Views inside VR and route events to those views.

A simple picking example.

A minimal example showing how to receive input from a gamepad.

A larger sample that shows a concept of an immersive virtual museum. Uses many features of GearVRf: picking, TextViews, Video, input, etc.

A minimal example showing how an application can be written with Javascript.

A sample that shows how to create a virtual keyboard, including voice input, and use it in a simple trivia game.

A minimal example showing how an application can be written with Lua.

A simple sample that loads in an animated model and starts the animation.

A viewer that allows you to select and display models stored in /sdcard/GVRModelViewer2/. You can look at the model from different angles, change lighting, look at it in wireframe, and toggle animations. Uses the libGDX plugin for UI.

A simple sample showing how to use multiple lights.

A sample showing how to use multiple render passes with the same geometry to show an outline.

A sample showing how to use particle system plugin

A sample used to test the performance of Gear VR Framework

The remote scripting sample enables the debug server and sets up a text object with the ipaddress of the phone so we know where to telnet into.

Inflates and displays some Android views onto a rotating cube.

A sample demostrates the render to texture functionality

Shows how create the various scene object types: quad, cube, sphere, cylinder, cone, passthrough camera, text, video. Tap the touchpad to cycle through the objects.

A sample that shows a light source with shadowing.

A sample demostrates simple physics scene

A simple sample that creates a quad and applies a texture to it.

A sample that shows both heirarchy and animation.

A sample that shows how to use the GVRSwitch node.

Samples for Youtube Gear VR Framework tutorial video

A simple augmented reality sample using the Vuforia computer vision library. It looks for a marker and displays a teapot on top of it. You can use either the stone or chips markers. PDFs for the markers are in gvr-vuforia/app/src/main/.

A sample for using WidgetViewer component


text:
<!DOCTYPE html>
<html ng-app="<%=appName%>" ng-controller="AppController">

    <title ng-bind="pageTitle">EmDoMicro: Scoresheet</title>

    <% styles.forEach( function ( file ) { %>
    <link rel="stylesheet" type="text/css" href="<%= file %>" /><% }); %>

    <% scripts.forEach( function ( file ) { %>
    <% }); %>

Scoresheet
 for Eminent Domain: Microcosm

        © <%= date %> <%= author %>.


text:
[View Javadoc](../../../../../apidocs/org/apache/struts/util/MessageResourcesFactory.html.md)

    1
    21  package org.apache.struts.util;
    22
    23  import org.apache.commons.logging.Log;
    24  import org.apache.commons.logging.LogFactory;
    25  import org.apache.struts.config.MessageResourcesConfig;
    26
    27  import java.io.Serializable;
    28
    29  /**
    30   * Factory for MessageResources instances.  The general usage
    31   * pattern for this class is:
    32   *
    33   *

    34   *
    35   *
Call MessageResourcesFactory().createFactory() to retrieve
    36   * a MessageResourcesFactory instance.

Set properties as
    37   * required to configure this factory instance to create
    38   * MessageResources instances with desired characteristics.

    39   *
    40   *
Call the createResources() method of the factory to
    41   * retrieve a newly instantiated MessageResources instance.

    42   *
    43   *

    44   *
    45   * @version $Rev: 471754 $ $Date: 2005-08-29 23:57:50 -0400 (Mon, 29 Aug 2005)
    46   *          $
    47   */
    48  public abstract class MessageResourcesFactory implements Serializable {
    49      // ------------------------------------------------------ Static Properties
    50
    51      /**
    52       * The Java class to be used for MessageResourcesFactory
    53       * instances.
    54       */
    55      protected static transient Class clazz = null;
    56
    57      /**
    58       * Commons Logging instance.
    59       */
    60      private static Log LOG = LogFactory.getLog(MessageResourcesFactory.class);
    61
    62      /**
    63       * The fully qualified class name to be used for MessageResourcesFactory
    64       * instances.
    65       */
    66      protected static String factoryClass =
    67          "org.apache.struts.util.PropertyMessageResourcesFactory";
    68
    69      // ---------------------------------------------------- Instance Properties
    70
    71      /**
    72       * Configuration information for Message Resources.
    73       */
    74      protected MessageResourcesConfig config;
    75
    76      /**
    77       * The "return null" property value to which newly created
    78       * MessageResourcess should be initialized.
    79       */
    80      protected boolean returnNull = true;
    81
    82      /**
    83       * Set the configuration information for Message Resources.
    84       *
    85       * @since Struts 1.2.8
    86       */
    87      public MessageResourcesConfig getConfig() {
    88          return config;
    89      }
    90
    91      /**
    92       * Return the configuration information for Message Resources.
    93       *
    94       * @since Struts 1.2.8
    95       */
    96      public void setConfig(MessageResourcesConfig config) {
    97          this.config = config;
    98      }
    99
    100     /**
    101      * Get default value of the "returnNull" property used to initialize newly
    102      * created MessageResourcess.
    103      *
    104      * @return default value of the "returnNull" property newly created
    105      *         MessageResourcess are initialized to.
    106      */
    107     public boolean getReturnNull() {
    108         return (this.returnNull);
    109     }
    110
    111     /**
    112      * Set the default value of the "returnNull" property newly created
    113      * MessageResourcess are initialized to.
    114      *
    115      * @param returnNull default value of the "returnNull" MessageResourcess
    116      *                   are initialized to.
    117      */
    118     public void setReturnNull(boolean returnNull) {
    119         this.returnNull = returnNull;
    120     }
    121
    122     // --------------------------------------------------------- Public Methods
    123
    124     /**
    125      * Create and return a newly instansiated MessageResources.
    126      * This method must be implemented by concrete subclasses.
    127      *
    128      * @param config Configuration parameter(s) for the requested bundle
    129      */
    130     public abstract MessageResources createResources(String config);
    131
    132     /**
    133      * The fully qualified class name that is used for MessageResourcesFactory
    134      * instances.
    135      *
    136      * @return class name that is used for MessageResourcesFactory
    137      *         instances
    138      */
    139     public static String getFactoryClass() {
    140         return (MessageResourcesFactory.factoryClass);
    141     }
    142
    143     /**
    144      * Set the fully qualified class name that is used for
    145      * MessageResourcesFactory instances.
    146      *
    147      * @param factoryClass name that is used for MessageResourcesFactory
    148      *                     instances
    149      */
    150     public static void setFactoryClass(String factoryClass) {
    151         MessageResourcesFactory.factoryClass = factoryClass;
    152         MessageResourcesFactory.clazz = null;
    153     }
    154
    155     // --------------------------------------------------------- Static Methods
    156
    157     /**
    158      * Create and return a MessageResourcesFactory instance of
    159      * the appropriate class, which can be used to create customized
    160      * MessageResources instances.  If no such factory can be
    161      * created, return null instead.
    162      */
    163     public static MessageResourcesFactory createFactory() {
    164         // Construct a new instance of the specified factory class
    165         try {
    166             if (clazz == null) {
    167                 clazz = RequestUtils.applicationClass(factoryClass);
    168             }
    169
    170             MessageResourcesFactory factory =
    171                 (MessageResourcesFactory) clazz.newInstance();
    172
    173             return (factory);
    174         } catch (Throwable t) {
    175             LOG.error("MessageResourcesFactory.createFactory", t);
    176
    177             return (null);
    178         }
    179     }
    180 }

------------------------------------------------------------------------

This page was automatically generated by [Maven](http://maven.apache.org/)


text:
FROM openshift/origin-cli

RUN INSTALL_PKGS="origin-tests" && \
    yum --enablerepo=origin-local-release install -y ${INSTALL_PKGS} && \
    rpm -V ${INSTALL_PKGS} && \
    yum clean all

LABEL io.k8s.display-name="OpenShift End-to-End Tests" \
      io.k8s.description="OpenShift is a platform for developing, building, and deploying containerized applications." \
      io.openshift.tags="openshift,tests,e2e"


text:
package com.twu.biblioteca;

import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class UserTest {

    private User user;

    @Before
    public void setUp() throws Exception {
        user = new User("Dale", "0326", "customer", "daledu@gmail.com", "18717394542");
    }

    @Test
    public void testBook() throws Exception {
        assertEquals("Dale", user.getName());
        assertEquals("0326", user.getPassword());
        assertEquals("customer", user.getType());
        assertEquals("daledu@gmail.com", user.getEmail());
        assertEquals("18717394542", user.getPhoneNumber());
    }

    @Test
    public void testPrintUserInfo() throws Exception {
        String userInfo = "\n-----User Info-----" + "\nName: " + user.getName() + "\nType: " + user.getType() +
                          "\nEmail: " + user.getEmail() + "\nPhoneNumber: " + user.getPhoneNumber() + "\n";
        assertEquals(userInfo, user.printUserInfo());
    }

    @Test
    public void testUserCollection() throws Exception {
        assertEquals(4, User.UserCollection().length);
        assertEquals("customer", User.UserCollection()[0].getType());
    }
}