text:
<?xml version="1.0" encoding="utf-8"?>
<resources name="en" flag="gb" title="English">
	<string name="_sys_module_googlecon"><![CDATA[Google Connect]]></string>
	<string name="_bx_googlecon"><![CDATA[Google Connect]]></string>
	<string name="_bx_googlecon_settings"><![CDATA[Google Connect]]></string>
	<string name="_bx_googlecon_information_block"><![CDATA[

This module can be used to login to this site using your Google account credentials.

To make it work, follow these instructions on how to create Google Project, when creating a project specify the following info:

Redirect URL: {0}

            Then enter generated Client ID & Secret pair in this module settings.

]]></string>
	<string name="_bx_googlecon_profile_error_api_keys"><![CDATA[Please configure the module in admin panel (can't define Client ID & Secret)]]></string>
	<string name="_bx_googlecon_auth_title"><![CDATA[Google Connect]]></string>

    <string name="_bx_googlecon_adm_stg_cpt_type"><![CDATA[Google Connect]]></string>
    <string name="_bx_googlecon_option_app_id"><![CDATA[Client ID]]></string>
    <string name="_bx_googlecon_option_app_secret"><![CDATA[Client Secret]]></string>

	<string name="_bx_googlecon_et_password_generated"><![CDATA[Google connect temporary password]]></string>
	<string name="_bx_googlecon_et_password_generated_subject"><![CDATA[Temporary password]]></string>
	<string name="_bx_googlecon_et_password_generated_body"><![CDATA[{email_header}

Temporary password - {password}

Change it after logging-in.

{email_footer}]]></string>
</resources>


text:
import type { Prng } from '@dicebear/core';
import type { Options } from '../options';
import type { ColorPickCollection } from '../static-types';
import { pickColor } from './pickColor';

type Props = {
  prng: Prng;
  options: Options;
};

export function getColors({ prng, options }: Props): ColorPickCollection {
  return {
    accessories: pickColor({
      prng,
      group: 'accessories',
      values: options.accessoriesColor,
    }),
    clothes: pickColor({
      prng,
      group: 'clothes',
      values: options.clothesColor,
    }),
    hat: pickColor({
      prng,
      group: 'hat',
      values: options.hatColor,
    }),
    hair: pickColor({
      prng,
      group: 'hair',
      values: options.hairColor,
    }),
    skin: pickColor({
      prng,
      group: 'skin',
      values: options.skinColor,
    }),
    facialHair: pickColor({
      prng,
      group: 'facialHair',
      values: options.facialHairColor,
    }),
    background: pickColor({
      prng,
      group: 'background',
      values: options.backgroundColor,
    }),
  };
}

redpajama_set_name: RedPajamaGithub


text:
<?php

/* SonataAdminBundle:Helper:short-object-description.html.twig */
class __TwigTemplate_248ba98557c4424ad3b16b68db6ccb16c6ec5ffc36f0a0560d3900ffa730993c extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = false;

        $this->blocks = array(
        );
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        // line 1
        echo "
    ";
        // line 2
        if ((((isset($context["object"]) ? $context["object"] : $this->getContext($context, "object")) && $this->getAttribute((isset($context["admin"]) ? $context["admin"] : $this->getContext($context, "admin")), "hasRoute", array(0 => "edit"), "method")) && $this->getAttribute((isset($context["admin"]) ? $context["admin"] : $this->getContext($context, "admin")), "isGranted", array(0 => "EDIT"), "method"))) {
            // line 3
            echo "        env, $this->getAttribute((isset($context["admin"]) ? $context["admin"] : $this->getContext($context, "admin")), "generateObjectUrl", array(0 => "edit", 1 => (isset($context["object"]) ? $context["object"] : $this->getContext($context, "object")), 2 => (isset($context["link_parameters"]) ? $context["link_parameters"] : $this->getContext($context, "link_parameters"))), "method"), "html", null, true);
            echo "\" target=\"new\">";
            echo twig_escape_filter($this->env, (isset($context["description"]) ? $context["description"] : $this->getContext($context, "description")), "html", null, true);
            echo "
    ";
        } else {
            // line 5
            echo "        ";
            echo twig_escape_filter($this->env, (isset($context["description"]) ? $context["description"] : $this->getContext($context, "description")), "html", null, true);
            echo "
    ";
        }
        // line 7
        echo "
";
    }

    public function getTemplateName()
    {
        return "SonataAdminBundle:Helper:short-object-description.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  38 => 7,  32 => 5,  24 => 3,  22 => 2,  19 => 1,);
    }

    /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
    public function getSource()
    {
        @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);

        return $this->getSourceContext()->getCode();
    }

    public function getSourceContext()
    {
        return new Twig_Source("
    {% if object and admin.hasRoute('edit') and admin.isGranted('EDIT') %}
        {{ description }}
    {% else %}
        {{ description }}
    {% endif %}

", "SonataAdminBundle:Helper:short-object-description.html.twig", "C:\\Program Files (x86)\\WampServer\\wamp\\www\\tutolympique\\vendor\\sonata-project\\admin-bundle/Resources/views/Helper/short-object-description.html.twig");
    }
}


text:
<databaseChangeLog
  xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.10.xsd">

  <changeSet author="honnel" id="add-vacation-type-visible-to-everyone">
    <preConditions>
      <tableExists tableName="vacation_type"/>
      <not>
        <columnExists tableName="vacation_type" columnName="visible_to_everyone"/>
      </not>
    </preConditions>

    <addColumn tableName="vacation_type">
      <column name="visible_to_everyone" type="BIT(1)" defaultValueBoolean="false">
        <constraints nullable="false"/>
      </column>
    </addColumn>

  </changeSet>
</databaseChangeLog>


text:
using LinqToDB;
using LinqToDB.Data;
using LinqToDB.DataProvider.PostgreSQL;
using Npgsql;
using NUnit.Framework;
using System.Linq;

namespace Tests.UserTests
{
	[TestFixture]
	public class Issue1438Tests : TestBase
	{
		public class Client
		{
			public int Id { get; set; }

			public bool Has { get; set; }
		}

		[Test]
		[ActiveIssue(":NEW as parameter", Configuration = ProviderName.OracleNative)]
		public void GeneralTest([DataSources] string context)
		{
			using (var db = GetDataContext(context))
			{
				db.MappingSchema.GetFluentMappingBuilder()
					.Entity<Client>()
						.HasTableName("Issue1438")
						.Property(x => x.Id)
							.IsPrimaryKey()
							.IsIdentity();

				using (var tbl = db.CreateLocalTable<Client>())
				{
					var id = db.InsertWithInt32Identity(new Client()
					{
						Has = true
					});

					var record = tbl.Where(_ => _.Id == id).Single();

					Assert.AreEqual(id, record.Id);
					Assert.True(record.Has);
				}
			}
		}

		[Test]
		public void SpecificTest([IncludeDataSources(TestProvName.AllPostgreSQL)] string context, [Values] bool avoidProviderSpecificApi)
		{
			using (new AvoidSpecificDataProviderAPI(avoidProviderSpecificApi))
			{
				var provider = new PostgreSQLDataProvider(PostgreSQLVersion.v95);
				var cs = DataConnection.GetConnectionString(context);
				using (var cn = new NpgsqlConnection(cs))
				using (var db = new DataConnection(provider, cn))
				{
					db.MappingSchema.GetFluentMappingBuilder()
						.Entity<Client>()
							.HasTableName("Issue1438")
							.Property(x => x.Id)
								.IsPrimaryKey()
								.IsIdentity();

					using (var tbl = db.CreateLocalTable<Client>())
					{
						var id = db.InsertWithInt32Identity(new Client()
						{
							Has = true
						});

						var record = tbl.Where(_ => _.Id == id).Single();

						Assert.AreEqual(id, record.Id);
						Assert.True(record.Has);
					}
				}
			}
		}
	}
}


text:
This project is an extension of the original `SignExtender` example. That project will not be explained again here.

## Enhancements

The packets have an additional text field of fixed length.

If this text field contains a specified substring, then the packet will be forwarded on via UDP.

Whether it matches or not, it is still processed as before.

## Building

### Bitstreams

Open the bitstream Java Project.

Open `SignExtManager.maxj` and execute the `main()` function.

### Runtime

Copy the maxfile output from the Bitstream to the `runtime` directory.

```
$ source config.sh
$ cd runtime
$ ./build.py
/network-raid/opt/maxcompiler-2014.1.1/bin/sliccompile SignExt.max SignExt.o
Processing maxfile for MAX4AB24B_SIM from 'SignExt.max'.
gcc -std=gnu99 -Wall -Werror -fno-guess-branch-probability -frandom-seed=foo -Wno-unused-variable -Wno-unused-function -fPIC -I /network-raid/opt/maxcompiler-2014.1.1/include/slic -DMAXFILE_INC="/home/mhaslehurst/Workspaces/networking-examples/PacketProcessing/SignExtender/hostcode/SignExt.max" -DSLIC_NO_DESTRUCTORS -c /network-raid/opt/maxcompiler-2014.1.1/src/slicinterface/MaxFileInit.c -o SignExt.o
Copying .max file C object into '/home/mhaslehurst/Workspaces/networking-examples/PacketProcessing/SignExtender/hostcode'
gcc -ggdb -O2 -fPIC -std=gnu99 -Wall -Werror -DDESIGN_NAME=SignExt -I. -I/network-raid/opt/maxcompiler-2014.1.1/lib/maxeleros-sim/include -I/network-raid/opt/maxcompiler-2014.1.1/include/slic -c signext.c -o signext.o
gcc signext.o -L/network-raid/opt/maxcompiler-2014.1.1/lib -L/network-raid/opt/maxcompiler-2014.1.1/lib/maxeleros-sim/lib -lslic -lmaxeleros -lm -lpthread SignExt.o -o signext
$ cd ..
```

### Packet sender

Build the auxiliary application, used to send the packets.

```
$ cd sender
$ ./build.py
gcc -ggdb -O2 -fPIC -std=gnu99 -Wall -Werror -c sender.c -o sender.o
gcc sender.o -o sender
$ cd ..
```

## Running

```
$ cd runtime
$ ./run.py
<...>
Listening on 172.16.50.1 port 2000
Waiting for kernel response...
```

Then open a new terminal and inject some packets:

```
$ ./sender/sender
All frames sent
```

In the first terminal, you should see the received packet details:

```
Kernel got: aSz = 3, bSz = 0, cSz = 1
Kernel got: aSz = 6, bSz = 1, cSz = 3
CPU: Got output frame 1 - size 20 bytes
Frame [1] Word[0]: 0xffffffffff800201
Frame [1] Word[1]: 0x7766554433221100
Frame [1] Word[2]: 0xffffff80
CPU: Got output frame 2 - size 20 bytes
Frame [2] Word[0]: 0xffff800102030405
Frame [2] Word[1]: 0x78
Frame [2] Word[2]: 0xff818283
```

The application will continue to wait for more packets, so when you are finished, hit ctrl + c to exit.

## Verifying output

Returning to the terminal where the sender is running, it should show the following, as the first packet was forwarded back. Note that the data matches that originally sent.

```
Got response '0x430102800011223344556677806162635945533030'
```

The application will continue to wait for more packets, so when you are finished, hit ctrl + c to exit.

### Viewing all traffic

This requires that *wireshark* is installed.

Verify that a network trace has been captured by running `ls` and looking for `top1.pcap`.

```
$ ls
<...>
top1.pcap
<...>
$ wireshark top1.pcap &
```

You can view only the packets of interest by filtering with the search term `ip.dst==172.16.50.1 || ip.dst==172.16.50.10`.


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

<title>SearchServiceException (Google App Engine API for Java)</title>
<meta name="date" content="2019-04-08">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

com.google.appengine.api.search

Class SearchServiceException

java.lang.Object

java.lang.Throwable

java.lang.Exception

java.lang.RuntimeException

com.google.appengine.api.search.SearchServiceException

All Implemented Interfaces:

java.io.Serializable

public class SearchServiceException
extends java.lang.RuntimeException

Thrown to indicate that a search service failure occurred.

See Also:

Serialized Form

Constructor Summary

Constructors

Constructor and Description

SearchServiceException(java.lang.String detail)

Constructs an exception which indicates an internal error
 occurred in the search service.

SearchServiceException(java.lang.String detail,
                      java.lang.Exception e)

Constructs an exception which indicates an internal error
 occurred in the search service.

Method Summary

Methods inherited from class java.lang.Throwable

addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SearchServiceException

public SearchServiceException(java.lang.String detail)

Constructs an exception which indicates an internal error
 occurred in the search service.

Parameters:

detail - the error message detail to associate with the
 internal error

SearchServiceException

public SearchServiceException(java.lang.String detail,
                              java.lang.Exception e)

Constructs an exception which indicates an internal error
 occurred in the search service.

Parameters:

detail - the error message detail to associate with the
 internal error

e - the causing Exception

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Java is a registered trademark of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


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

<title>RangeTombstone (apache-cassandra API)</title>
<meta name="date" content="2015-05-13">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

org.apache.cassandra.db

Class RangeTombstone

java.lang.Object

org.apache.cassandra.utils.Interval<java.nio.ByteBuffer,DeletionTime>

org.apache.cassandra.db.RangeTombstone

All Implemented Interfaces:

OnDiskAtom

public class RangeTombstone
extends Interval<java.nio.ByteBuffer,DeletionTime>
implements OnDiskAtom

Nested Class Summary

Nested Classes

Modifier and Type
Class and Description

static class
RangeTombstone.Serializer

static class
RangeTombstone.Tracker

Field Summary

Fields

Modifier and Type
Field and Description

static RangeTombstone.Serializer
serializer

Fields inherited from class org.apache.cassandra.utils.Interval

data, max, min

Constructor Summary

Constructors

Constructor and Description

RangeTombstone(java.nio.ByteBuffer start,
              java.nio.ByteBuffer stop,
              DeletionTime delTime)

RangeTombstone(java.nio.ByteBuffer start,
              java.nio.ByteBuffer stop,
              long markedForDeleteAt,
              int localDeletionTime)

Method Summary

Methods

Modifier and Type
Method and Description

int
getLocalDeletionTime()

long
maxTimestamp()

long
minTimestamp()

For a standard column, this is the same as timestamp().

java.nio.ByteBuffer
name()

int
serializedSize(TypeSizes typeSizes)

long
serializedSizeForSSTable()

boolean
supersedes(RangeTombstone rt,
          java.util.Comparator<java.nio.ByteBuffer> comparator)

This tombstone supersedes another one if it is more recent and cover a
 bigger range than rt.

void
updateDigest(java.security.MessageDigest digest)

void
validateFields(CFMetaData metadata)

Methods inherited from class org.apache.cassandra.utils.Interval

create, create, equals, hashCode, toString

Methods inherited from class java.lang.Object

clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

serializer

public static final RangeTombstone.Serializer serializer

Constructor Detail

RangeTombstone

public RangeTombstone(java.nio.ByteBuffer start,
              java.nio.ByteBuffer stop,
              long markedForDeleteAt,
              int localDeletionTime)

RangeTombstone

public RangeTombstone(java.nio.ByteBuffer start,
              java.nio.ByteBuffer stop,
              DeletionTime delTime)

Method Detail

name

public java.nio.ByteBuffer name()

Specified by:

name in interface OnDiskAtom

getLocalDeletionTime

public int getLocalDeletionTime()

Specified by:

getLocalDeletionTime in interface OnDiskAtom

minTimestamp

public long minTimestamp()

Description copied from interface: OnDiskAtom

For a standard column, this is the same as timestamp().
 For a super column, this is the min/max column timestamp of the sub columns.

Specified by:

minTimestamp in interface OnDiskAtom

maxTimestamp

public long maxTimestamp()

Specified by:

maxTimestamp in interface OnDiskAtom

serializedSize

public int serializedSize(TypeSizes typeSizes)

Specified by:

serializedSize in interface OnDiskAtom

serializedSizeForSSTable

public long serializedSizeForSSTable()

Specified by:

serializedSizeForSSTable in interface OnDiskAtom

validateFields

public void validateFields(CFMetaData metadata)
                    throws MarshalException

Specified by:

validateFields in interface OnDiskAtom

Throws:

MarshalException

updateDigest

public void updateDigest(java.security.MessageDigest digest)

Specified by:

updateDigest in interface OnDiskAtom

supersedes

public boolean supersedes(RangeTombstone rt,
                 java.util.Comparator<java.nio.ByteBuffer> comparator)

This tombstone supersedes another one if it is more recent and cover a
 bigger range than rt.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

Copyright © 2015 The Apache Software Foundation


text:
<?php

namespace OpenCFP\Test\Infrastructure\Persistence;

use OpenCFP\Infrastructure\Persistence\IlluminateAirportInformationDatabase;
use OpenCFP\Test\DatabaseTestCase;

/**
 * Tests integration with illuminate/database and airports table to implement
 * an AirportInfromationDatabase
 */
class IlluminateAirportInformationDatabaseTest extends DatabaseTestCase
{
    private $airports;

    protected function setUp()
    {
        parent::setUp();

        $this->airports = $this->getAirportInformationDatabase();
    }

    /** @test */
    public function it_queries_airports_table_by_code()
    {
        $airport = $this->airports->withCode('RDU');

        $this->assertEquals('RDU', $airport->code);
        $this->assertEquals('Raleigh/Durham (NC)', $airport->name);
        $this->assertEquals('USA', $airport->country);
    }

    /** @test */
    public function it_squawks_when_airport_is_not_found()
    {
        $this->setExpectedException(\Exception::class, 'not found');

        $this->airports->withCode('foobarbaz');
    }

    /**
     * @return IlluminateAirportInformationDatabase
     */
    private function getAirportInformationDatabase()
    {
        return new IlluminateAirportInformationDatabase($this->getCapsule());
    }
}


text:
public class Foo {
    public void fails() {
        final String    ORIGIN      =   "";
        final String[] expected = {ORIGIN};
    }
}


text:
package app.components.semanticui

import japgolly.scalajs.react
import japgolly.scalajs.react.Children
import japgolly.scalajs.react.vdom.VdomNode

import scala.scalajs.js

object Container {
  val component = react.JsComponent[js.Object, Children.Varargs, Null](SemanticUiComponents.Container)

  def apply()(children: VdomNode*) = {
    val props = js.Dynamic.literal(
    )
    component(props)(children:_*)
  }
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>su — sets the Fluidinfo user — fish 4.33 documentation</title>

    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />

    <link rel="top" title="fish 4.33 documentation" href="index.html" />
    <link rel="next" title="whoami — prints the name of the current Fluidinfo user" href="whoami.html" />
    <link rel="prev" title="version — prints fish's version number" href="version.html" />

Navigation

          index

          next |

          previous |

fish 4.33 documentation »

su — sets the Fluidinfo user¶

Set user: changes the set of credentials in use by <tt class="docutils literal">fish</tt>.

FORM

[fish] su userspec

EXAMPLES

$ fish su bert

The <tt class="docutils literal">fish</tt> command expects user credentials for Fluidinfo to be stored
in a file in the users’s home directory.   On unix systems, this file
is <tt class="docutils literal">~/.fluidDBcredentials</tt>; on Windows systems it is
<tt class="docutils literal">fluiddbcredentials.ini</tt> in the user’s home folder..

The the user has access to more than on Fluidinfo account, multiple
credentials may be stored in variant files.   In unix systems,
these files have names like <tt class="docutils literal">~/.fluidDBcredentials.bert</tt>;
on windows they have names like <tt class="docutils literal">fluiddbcredentials-bert.ini</tt>.

A different set of credentials can be used for any one-off command
by adding <tt class="docutils literal">-u bert</tt> to the command line; this will cause the credentials
in the <tt class="docutils literal">bert</tt> variant of the file to be used.

The <tt class="docutils literal">fish su command</tt> changes the default set of credentials to be used
by copying the specified variant file over the default file.
Because it is a simple copy, this is a global change, i.e. it affects
all sessions, not just one in the current shell.    So on unix,

su alice

is exactly equivalent to

cp ~/.fluidDBcredentials.alice ~/.fluidDBcredentials

Previous topic

version — prints fish’s version number

Next topic

whoami — prints the name of the current Fluidinfo user

This Page

Show Source

Quick search

    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>

    Enter search terms or a module, class or function name.

Navigation

          index

          next |

          previous |

fish 4.33 documentation »

        © Copyright 2011-2012, Nicholas J. Radcliffe.
      Created using Sphinx 1.1.2.


text:
DataFrames are useful constructs for data scientists, popularized by [R] and [pandas].

[pandas]:http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.html
[R]:http://www.r-tutor.com/r-introduction/data-frame
[https://github.com/AyasdiOpenSource/spark]:https://github.com/AyasdiOpenSource/spark
Implementations of these packages are not natively distributed - their DataFrames struggle with big data. bigdf is a dataframe on top of Apache Spark. It is written as an internal Scala DSL with the look and feel of Pandas to make it easy for those familiar with Pandas to use it.

A gentle(but outdated) introduction is available at:
> http://www.slideshare.net/codeninja4086/df-38948475?utm_source=slideshow03&utm_medium=ssemail&utm_campaign=iupload_share_slideshow

### How to get it
- Choose a repos directory (make one if it doesn't exist)
```sh
export $REPOS = ~/Documents/repos
```
- Install scala and sbt (brew instructions below)
```sh
$ brew install scala
$ brew install sbt
```
- clone the bigdf repo
```sh
$ cd $REPOS
$ git clone git@bitbucket.org:ayasdi/bigdf.git
```
- sbt update, package, and test(optional) in the bigdf directory.
```sh
$ cd bigdf
$ sbt update
$ sbt test
$ sbt assembly
```
- Start a shell and begin playing. You need spark 1.4.x
```sh
$ cd $REPOS
$ ./spark/bin/spark-shell --jars ./bigdf/target/scala-2.10/bigdf-assembly-*.jar
```
- https://github.com/AyasdiOpenSource/bigdf/wiki/ for examples
- Look at DFTest.scala for usage

### Use with ipython notebook
```sh
$cd $REPOS
$git clone git@github.com:mattpap/IScala.git
$cd IScala
$sbt
>++ 2.10.4
>assembly
>^D
```

```sh
$ipython profile create scala
```
Add the following line to the three files ~/.ipython/profile_scala/ipython*_config.py

```sh
c.KernelManager.kernel_cmd = ["java", "-jar", "$ISCALA_PATH/lib/IScala.jar", "--connection-file", "{connection_file}", "--parent"]"
```

To start notebook
```sh
$cd <my notebooks directory>
$ipython notebook --profile scala
```

To install spark and bigdf to your local mvn repos
```sh
$brew install maven
$mvn install:install-file -Dfile=$REPOS/bigdf-transforms/lib/spark-assembly-1.2.0-SNAPSHOT-hadoop1.0.4.jar -DgroupId=org.apache -DartifactId=spark-assembly_2.10 -Dversion=1.2.0-SNAPSHOT-hadoop1.0.4 -Dpackaging=jar
$ mvn install:install-file -Dfile=$REPOS/bigdf-transforms/bigdf/target/scala-2.10/bigdf-assembly-0.2.jar -DgroupId=com.ayasdi -DartifactId=bigdf-assembly_2.10 -Dversion=0.2 -Dpackaging=jar
```

To start using bigdf in a notebook
```sh
%libraryDependencies += "org.apache" %% "spark-assembly" % "1.2.0-SNAPSHOT-hadoop1.0.4"
%libraryDependencies += "com.ayasdi" %% "bigdf-assembly" % "0.2"
%resolvers += "Local Maven Repository" at "file:///Users/mohit/.m2/repository"
%update
```

```sh
import org.apache.spark.SparkContext
import org.apache.spark.SparkContext._
import com.ayasdi.bigdf._

val sc = new SparkContext("local[*]", "bigdf-intro")
val df = DF(sc, "/Users/mohit/Downloads/faredata2013/trip_fare_1.csv", ',', true)
```


text:
package net.runelite.client.plugins.fairyring;

import com.google.common.base.Strings;
import com.google.common.eventbus.Subscribe;
import com.google.inject.Provides;
import java.util.Collection;
import java.util.Map;
import java.util.TreeMap;
import javax.annotation.Nullable;
import javax.inject.Inject;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Client;
import net.runelite.api.ScriptID;
import net.runelite.api.SoundEffectID;
import net.runelite.api.SpriteID;
import net.runelite.api.Varbits;
import net.runelite.api.WidgetType;
import net.runelite.api.events.GameTick;
import net.runelite.api.events.MenuOptionClicked;
import net.runelite.api.events.VarbitChanged;
import net.runelite.api.events.WidgetLoaded;
import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetID;
import net.runelite.api.widgets.WidgetInfo;
import net.runelite.client.callback.ClientThread;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.game.ChatboxInputManager;
import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.util.Text;

@Slf4j
@PluginDescriptor(
	name = "Fairy Rings",
	description = "Show the location of the fairy ring teleport",
	tags = {"teleportation"}
)
public class FairyRingPlugin extends Plugin
{
	private static final String[] leftDial = new String[]{"A", "D", "C", "B"};
	private static final String[] middleDial = new String[]{"I", "L", "K", "J"};
	private static final String[] rightDial = new String[]{"P", "S", "R", "Q"};

	private static final int ENTRY_PADDING = 3;

	private static final String MENU_OPEN = "Open";
	private static final String MENU_CLOSE = "Close";

	@Inject
	private Client client;

	@Inject
	private FairyRingConfig config;

	@Inject
	private ChatboxInputManager chatboxInputManager;

	@Inject
	private ClientThread clientThread;

	private Widget searchBtn;
	private boolean chatboxOpenLastTick = false;
	private Collection<CodeWidgets> codes = null;

	@Data
	private static class CodeWidgets
	{
		// The fairy hideout has both of these null, because its not the same as the rest of them
		@Nullable
		private Widget favorite;

		@Nullable
		private Widget code;

		private Widget description;
	}

	@Provides
	FairyRingConfig getConfig(ConfigManager configManager)
	{
		return configManager.getConfig(FairyRingConfig.class);
	}

	@Subscribe
	public void onVarbitChanged(VarbitChanged event)
	{
		setWidgetTextToDestination();
	}

	@Subscribe
	public void onWidgetLoaded(WidgetLoaded widgetLoaded)
	{
		if (widgetLoaded.getGroupId() == WidgetID.FAIRY_RING_PANEL_GROUP_ID)
		{
			setWidgetTextToDestination();

			Widget header = client.getWidget(WidgetInfo.FAIRY_RING_HEADER);
			if (header != null)
			{
				searchBtn = header.createChild(-1, WidgetType.GRAPHIC);
				searchBtn.setSpriteId(SpriteID.GE_SEARCH);
				searchBtn.setOriginalWidth(17);
				searchBtn.setOriginalHeight(17);
				searchBtn.setOriginalX(11);
				searchBtn.setOriginalY(11);
				searchBtn.setOnOpListener(ScriptID.NULL);
				searchBtn.setHasListener(true);
				searchBtn.setAction(1, MENU_OPEN);
				searchBtn.setName("Search");
				searchBtn.revalidate();

				codes = null;

				if (config.autoOpen())
				{
					openSearch();
				}
			}
		}
	}

	@Subscribe
	public void onMenuOptionClicked(MenuOptionClicked ev)
	{
		if (searchBtn != null && searchBtn.getId() == ev.getWidgetId())
		{
			switch (ev.getMenuOption())
			{
				case MENU_OPEN:
					ev.consume();
					openSearch();
					client.playSoundEffect(SoundEffectID.UI_BOOP);
					break;
				case MENU_CLOSE:
					ev.consume();
					updateFilter("");
					searchBtn.setAction(1, MENU_OPEN);
					chatboxInputManager.closeInputWindow();
					client.playSoundEffect(SoundEffectID.UI_BOOP);
					break;
			}
		}
	}

	private void setWidgetTextToDestination()
	{
		Widget fairyRingTeleportButton = client.getWidget(WidgetInfo.FAIRY_RING_TELEPORT_BUTTON);
		if (fairyRingTeleportButton != null && !fairyRingTeleportButton.isHidden())
		{
			String destination;
			try
			{
				FairyRings fairyRingDestination = getFairyRingDestination(client.getVar(Varbits.FAIRY_RING_DIAL_ADCB),
					client.getVar(Varbits.FAIRY_RIGH_DIAL_ILJK), client.getVar(Varbits.FAIRY_RING_DIAL_PSRQ));
				destination = fairyRingDestination.getDestination();
			}
			catch (IllegalArgumentException ex)
			{
				destination = "Invalid location";
			}

			fairyRingTeleportButton.setText(destination);
		}
	}

	private FairyRings getFairyRingDestination(int varbitValueDialLeft, int varbitValueDialMiddle, int varbitValueDialRight)
	{
		return FairyRings.valueOf(leftDial[varbitValueDialLeft] + middleDial[varbitValueDialMiddle] + rightDial[varbitValueDialRight]);
	}

	private void openSearch()
	{
		updateFilter("");
		searchBtn.setAction(1, MENU_CLOSE);
		chatboxInputManager.openInputWindow("Filter fairy rings", "", ChatboxInputManager.NO_LIMIT,
			s -> clientThread.invokeLater(() -> updateFilter(s)),
			s ->
			{
				clientThread.invokeLater(() -> updateFilter(""));
				searchBtn.setAction(1, MENU_OPEN);
			});
	}

	@Subscribe
	public void onGameTick(GameTick t)
	{
		// This has to happen because the only widget that gets hidden is the tli one
		Widget fairyRingTeleportButton = client.getWidget(WidgetInfo.FAIRY_RING_TELEPORT_BUTTON);
		boolean fairyRingWidgetOpen = fairyRingTeleportButton != null && !fairyRingTeleportButton.isHidden();
		boolean chatboxOpen = chatboxInputManager.isOpen();

		if (!fairyRingWidgetOpen && chatboxOpen && chatboxOpenLastTick)
		{
			searchBtn.setAction(1, MENU_OPEN);
			chatboxInputManager.closeInputWindow();
		}

		chatboxOpenLastTick = chatboxOpen && fairyRingWidgetOpen;
	}

	private void updateFilter(String filter)
	{
		filter = filter.toLowerCase();
		final Widget list = client.getWidget(WidgetInfo.FAIRY_RING_LIST);
		final Widget favorites = client.getWidget(WidgetInfo.FAIRY_RING_FAVORITES);

		if (list == null)
		{
			return;
		}

		if (codes != null)
		{
			// Check to make sure the list hasn't been rebuild since we were last her
			// Do this by making sure the list's dynamic children are the same as when we last saw them
			if (codes.stream().noneMatch(w ->
			{
				Widget codeWidget = w.getCode();
				if (codeWidget == null)
				{
					return false;
				}
				return list.getChild(codeWidget.getIndex()) == codeWidget;
			}))
			{
				codes = null;
			}
		}

		if (codes == null)
		{
			// Find all of the widgets that we care about, grouping by their Y value
			Map<Integer, CodeWidgets> codeMap = new TreeMap<>();

			for (Widget w : list.getStaticChildren())
			{
				if (w.isSelfHidden())
				{
					continue;
				}

				if (w.getSpriteId() != -1)
				{
					codeMap.computeIfAbsent(w.getRelativeY(), k -> new CodeWidgets()).setFavorite(w);
				}
				else if (!Strings.isNullOrEmpty(w.getText()))
				{
					codeMap.computeIfAbsent(w.getRelativeY(), k -> new CodeWidgets()).setDescription(w);
				}
			}

			for (Widget w : list.getDynamicChildren())
			{
				if (w.isSelfHidden())
				{
					continue;
				}

				CodeWidgets c = codeMap.computeIfAbsent(w.getRelativeY(), k -> new CodeWidgets());
				c.setCode(w);
			}

			codes = codeMap.values();
		}

		// Relayout the panel
		int y = 0;

		if (favorites != null)
		{
			boolean hide = !filter.isEmpty();
			favorites.setHidden(hide);
			if (!hide)
			{
				y += favorites.getOriginalHeight() + ENTRY_PADDING;
			}
		}

		for (CodeWidgets c : codes)
		{
			String code = Text.removeTags(c.getDescription().getName()).replaceAll(" ", "");
			String tags = null;

			if (code.length() > 0)
			{
				try
				{
					FairyRings ring = FairyRings.valueOf(code);
					tags = ring.getTags();
				}
				catch (IllegalArgumentException e)
				{
					log.warn("Unable to find ring with code '{}'", code, e);
				}
			}

			boolean hidden = !(filter.isEmpty()
				|| Text.removeTags(c.getDescription().getText()).toLowerCase().contains(filter)
				|| code.toLowerCase().contains(filter)
				|| tags != null && tags.contains(filter));

			if (c.getCode() != null)
			{
				c.getCode().setHidden(hidden);
				c.getCode().setOriginalY(y);
			}

			if (c.getFavorite() != null)
			{
				c.getFavorite().setHidden(hidden);
				c.getFavorite().setOriginalY(y);
			}

			c.getDescription().setHidden(hidden);
			c.getDescription().setOriginalY(y);

			if (!hidden)
			{
				y += c.getDescription().getHeight() + ENTRY_PADDING;
			}
		}

		y -= ENTRY_PADDING;

		if (y < 0)
		{
			y = 0;
		}

		list.setScrollHeight(y);
		list.revalidateScroll();
		client.runScript(
			ScriptID.UPDATE_SCROLLBAR,
			WidgetInfo.FAIRY_RING_LIST_SCROLLBAR.getId(),
			WidgetInfo.FAIRY_RING_LIST.getId(),
			0
		);
	}
}


text:
cvmfs_test_name="Recover from corrupted LRU DB"

cvmfs_run_test() {
  logfile=$1

  setup_atlaslhcb || return 1
  ls /cvmfs/atlas.cern.ch >> $logfile 2>&1 || return 2

  numBefore=`sudo grep "LRU database corrupted" /var/log/messages | grep cvmfs2 | wc -l`

  sudo umount /cvmfs/atlas.cern.ch >> $logfile 2>&1 || return 3
  sudo sh -c "echo bla > /var/lib/cvmfs/atlas.cern.ch/cvmfscatalog.cache" || return 4

  ls /cvmfs/atlas.cern.ch >> $logfile 2>&1 || return 5

  sync
  numAfter=`sudo grep "LRU database corrupted" /var/log/messages | grep cvmfs2 | wc -l`

  if [ $[$numAfter-$numBefore] -ne 1 ]; then
    return 6
  fi

  return 0
}


text:
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Assets.Core.Configuration;
using Assets.Core.InteractableObjects;
using Assets.Core.LevelMaster;
using UnityEngine;

namespace Assets.Environment.Plank.Scripts
{
    public class PlankMovement : MonoBehaviour
    {

        public GameObject[] Interactables;
        public float MovementSpeed;

        private List<IInteractable> _interactables;

        private Vector3 _startPosition;
        private Vector3 _endPosistion;
        private bool _plankIsShown;

        public GameObject obstacle;

        // Use this for initialization
        void Start()
        {
            // Sliding positions
            _startPosition = transform.localPosition;
            _endPosistion = new Vector3(_startPosition.x, _startPosition.y + transform.localScale.y + 2, _startPosition.z);

            // Get all IInteractables
            _interactables = new List<IInteractable>();
            foreach (var interactable in Interactables)
                _interactables.Add(interactable.GetComponent<IInteractable>());

            StartCoroutine(CheckForInputs());
        }

        void Update()
        {
            transform.localPosition = Vector3.MoveTowards(transform.localPosition, _plankIsShown ? _endPosistion : _startPosition, Time.deltaTime * MovementSpeed);
        }

        IEnumerator CheckForInputs()
        {
            while (true)
            {
                if (_interactables.All(i => i.HasBeenActivated()))
                {
                    _plankIsShown = true;
                    obstacle.SetActive(false);
                    //GameObject.FindGameObjectWithTag(Constants.Tags.GameMaster).GetComponent<RoomManager>().SetCurrentRoom(1);
                }
                else
                {
                    _plankIsShown = false;
                    obstacle.SetActive(true);
                }
                yield return new WaitForSeconds(0.2f);
            }
        }
    }
}


text:
[![Version](http://allthebadges.io/itriage/hipaa-crypt/badge_fury.png)](http://allthebadges.io/itriage/hipaa-crypt/badge_fury)
[![Dependencies](http://allthebadges.io/itriage/hipaa-crypt/gemnasium.png)](http://allthebadges.io/itriage/hipaa-crypt/gemnasium)
[![Build Status](http://allthebadges.io/itriage/hipaa-crypt/travis.png)](http://allthebadges.io/itriage/hipaa-crypt/travis)
[![Coverage](http://allthebadges.io/itriage/hipaa-crypt/coveralls.png)](http://allthebadges.io/itriage/hipaa-crypt/coveralls)
[![Code Climate](http://allthebadges.io/itriage/hipaa-crypt/code_climate.png)](http://allthebadges.io/itriage/hipaa-crypt/code_climate)

**State:** Prototype *`-(in progress to)>`* Version 1.0.0-stable

## Goal

Provide an encryption library with zero external dependencies. It should be built in pure Ruby and use the
[OpenSSL::Cipher](http://www.ruby-doc.org/stdlib-1.9.3/libdoc/openssl/rdoc/OpenSSL/Cipher.html) library included
in Ruby's Standard Library.

### AttrEncrypted (the old method)
[AttrEncrypted](https://github.com/attr-encrypted/attr_encrypted) was found to have a code climate score of
[![Code Climate](http://allthebadges.io/attr-encrypted/attr_encrypted/code_climate.png)](http://allthebadges.io/attr-encrypted/attr_encrypted/code_climate)
and proved to be a poor implementation of encryption and and overly complex code base. @gerred found that it used all 0s for an initialization
vector. While it seems that future versions have addressed this issue, the overall complexity of the
gem has not improved. After discussion with architecture and core product we have devised a plan to wholly
own the method of encryption.

## Functionality

### Encryption [Done]

Encryption should be handled by a wrapper class containing an easy to use DSL over the built in OpenSSL library.
The class dubbed `HipaaCrypt::Encryptor` should be initialized with options used to handle the encryption. At the
very least the requirment is to implement options with a key and cipher (defaulting to aes 256). Further options may
be implemented.

The Encryptor itself must adhere to the following standards:

* it must be initialized with an options hash containing a key.
* it must respond to encrypt, an implementation resulting in the return of an encrypted string.
* it must respond to decrypt, an implementation succesfully able to decrypt a string returned by encrypt.
* encrypt_return_value **must eq** decrypt_input_value
* decrypt_return_value **must eq** encrypt_input_value

### Plain Old Ruby Object (PORO) Attribute Mixins [In Progress]

A module that when included within a ruby object provides methods to assign attributes for encryption.

A sample implementation may look like this:
```ruby
class Poro
  include HippaCrypt::Attributes

  encrypt :foo, :bar,
    key: ENV['ENCRYPTION_KEY'], # required
    cipher: { name: :AES, key_length: 256, mode: :CBC }, # optional
    iv: nil, # optional
    before_encrypt: ->(value){ value.to_s }, # optional
    after_decrypt: ->(value){ value.to_s }, # optional
    prefix: :encrypted_, # optional
    encryptor: HippaCrypt::Encryptor # optional

end
```

## ORM Specific Auto Mixins [To Do]

Modules that upon inclusion of the standard mixin will detect the ancestors of the base class and be automatically included.

### ActiveRecord

The active record mixin should provide the following features.

* Rails 3 dynamic finders
  * `find_by_attr_name('foo')`
  * `find_or_initialize_by_attr_name('foo')`
  * `find_or_create_by_attr_name('foo')`
* Rails 4 find_by methods
  * `find_by(attr_name: 'foo')`
  * `find_or_initialize_by(attr_name: 'foo')`
  * `find_or_create_by(attr_name: 'foo')`
* AREL query support
  * `where(attr_name: 'foo')`
  * etc...

## Re-Encryption Support [To Do]

The ability to pass previous options to a `re_encrypt` method, therefor decrypting with the old options and encrypting
with the new.

**example:**

```ruby
irb> Poro.re_encrypt :foo, :bar,
       key: "my old key",
       cipher: { name: :AES, key_length: 256, mode: :CBC }
```
## MuliEncryptor

   The HipaaCrypt::MultiEncryptor allows you to specify a default encryptor with options as well as a chain of encryptors.
   The MultiEncryptor will first trying decrypting an attribute with the default options. If decryption fails,
   the MultiEncryptor will then try to decrypt the attribute with each encryptor in the chain until it is able to successfully decrypt a value (or until it runs out of encryptors to decrypt with).

   Using the MultiEncryptor is optional. You can choose to use the MultiEncryptor by specifying it in the config. The defaults and key chain can also be specified in the config. Here's an example:

   	KEYCHAIN = ENV['PHI_KEYS'].split(',')

   	HippaCrypt.config do |config|
   	  config.encryptor = HipaaCrypt::MultiEncryptor
   	  config.defaults = { encryptor: HipaaCrypt::Encryptor, key: KEYCHAIN.first }
   	  config.chain = [
   	    *KEYCHAIN.map { |key| { key: key } }, # try all the keys using the default option.
   	    { encryptor: HipaaCrypt::AttrEncryptedEncryptor, key: KEYCHAIN.last, iv: nil }
   	  ]
   	end

   When a new MultiEncryptor is initialized, it takes an `options` hash. This `options` hash will contain the defaults and key chain. Any local options passed directly to the MultiEncryptor will override those in the global config **that are not** included in the defaults.

   If the MultiEncryptor fails to decrypt an attribute with the default encryptor and options, it will then try decrypting with the encryptors in the chain. Each encryptor in the chain will have it's own options that will be used for decryption.

-

***fin***


text:
//------------------------------------------------------------------------------
/// \unit
///
/// !Purpose
///
/// Interface for configuration the Segment LCD Controller (SLCDC) peripheral.
///
/// !Usage
///
/// -# Initializes the Segment LCD controller using SLCDC_Configure().
/// -# Clears the SLCD display buffer using SLCDC_Clear().
/// -# Enable & disable SLCD controller using SLCDC_Enable() and SLCDC_Disable().
/// -# Enables & disable the SLCD low power mode using SLCDC_EnableLowPowerMode ()
/// and SLCDC_DisableLowPowerMode().
/// -# Adjusts the frame frequency using SLCDC_SetFrameFreq().
/// -# Sets the display mode (normal/force off/force on/blinking) using
/// SLCDC_SetDisplayMode().
/// -# Adjusts the display blinking frequency using SLCDC_SetBlinkFreq().
/// -# Enables & disable the selected SLCDC interrupt sources using
/// SLCDC_EnableInterrupts() and SLCDC_DisableInterrupts().
//------------------------------------------------------------------------------

#ifndef SLCDC_H
#define SLCDC_H

//------------------------------------------------------------------------------
//         Global definitions
//------------------------------------------------------------------------------

/// Number of segments in SLCD.
#define S7LEKLCD_NUM_SEGMENTS       40
/// Number of commons in SLCD.
#define S7LEKLCD_NUM_COMMONS        10

//------------------------------------------------------------------------------
//         Global functions
//------------------------------------------------------------------------------

extern void SLCDC_Configure(
    unsigned int commons,
    unsigned int segments,
    unsigned int bias,
    unsigned int timeSetting);

extern void SLCDC_Clear(void);

extern void SLCDC_Enable(void);

extern void SLCDC_Disable(void);

extern void SLCDC_SetFrameFreq(
    unsigned int prescalerValue,
    unsigned int dividerValue);

extern void SLCDC_SetDisplayMode(unsigned int mode);

extern void SLCDC_SetBlinkFreq(unsigned int frequency);

extern void SLCDC_EnableInterrupts(unsigned int sources);

extern void SLCDC_DisableInterrupts(unsigned int sources);

#endif //#ifndef SLCDC_H


text:
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// 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.
// ----------------------------------------------------------------------------------

using Microsoft.Azure.Commands.Network.Models;
using System.Collections.Generic;
using System.Management.Automation;

namespace Microsoft.Azure.Commands.Network
{
    public class AzureApplicationGatewayWebApplicationFirewallConfigurationBase : NetworkBaseCmdlet
    {
        [Parameter(
               Mandatory = true,
               HelpMessage = "Whether web application firewall functionality is enabled or not.")]
        [ValidateNotNullOrEmpty]
        public bool Enabled { get; set; }

        [Parameter(
               Mandatory = true,
               HelpMessage = "Web application firewall mode")]
        [ValidateSet("Detection", "Prevention", IgnoreCase = true)]
        [ValidateNotNullOrEmpty]
        public string FirewallMode { get; set; }

        [Parameter(
               Mandatory = false,
               HelpMessage = "The type of the web application firewall rule set.")]
        [ValidateSet("OWASP")]
        public string RuleSetType { get; set; }

        [Parameter(
               Mandatory = false,
               HelpMessage = "The version of the rule set type.")]
        [ValidateSet("3.0", "2.2.9")]
        public string RuleSetVersion { get; set; }

        [Parameter(
               Mandatory = false,
               HelpMessage = "The disabled rule groups.")]
        [ValidateNotNullOrEmpty]
        public List<PSApplicationGatewayFirewallDisabledRuleGroup> DisabledRuleGroups { get; set; }

        public override void ExecuteCmdlet()
        {
            base.ExecuteCmdlet();

            if (!this.MyInvocation.BoundParameters.ContainsKey("RuleSetType"))
            {
                this.RuleSetType = "OWASP";
            }
            if (!this.MyInvocation.BoundParameters.ContainsKey("RuleSetVersion"))
            {
                this.RuleSetVersion = "3.0";
            }
        }
    }
}


text:
Templates for basic user account settings like changing passwords or verifying
emails. Works with Meteor's accounts-password package.

Installation
------------
`meteor add fongandrew:user-settings`

Usage
-----
Just include the `accountSettings` template.

Known Limitations
-----------------
Currently only supports one e-mail address per user.


text:
#define type		long double
#define	roundit		roundl
#define dtype		long
#define	DTYPE_MIN	LONG_MIN
#define	DTYPE_MAX	LONG_MAX
#define	fn		lroundl

#include "s_lround.c"


text:
package org.apache.oodt.cas.resource.jobrepo;

/**
 * @author mattmann
 * @version $Revision$
 *
 * <p>
 * A Factory for creating {@link JobRepository}s
 * </p>.
 */
public interface JobRepositoryFactory {

  /**
   * Creates new {@link JobRepository} implementations.
   *
   * @return A new {@link JobRepository} implementation.
   */
  public JobRepository createRepository();

}


text:
package com.example.android.support.content.demos;

import android.content.ContentProvider;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.MatrixCursor;
import android.net.Uri;

/**
 * Provides test data for Content Pager Demo app.
 */
public class UnpagedDemoDataProvider extends ContentProvider {

    public static final Uri URI =
            Uri.parse("content://com.example.androidx.contentpager.content.demos/poodles");

    static final int TOTAL_SIZE = 100;
    private static final String[] COLUMNS = new String[] {
            "id",
            "name",
            "time"
    };

    @Override
    public boolean onCreate() {
        return true;
    }

    @Override
    public Cursor query(Uri uri, String[] projection, String selection,
            String[] selectionArgs, String sortOrder) {
        MatrixCursor cursor = new MatrixCursor(COLUMNS);
        Object[] values = new Object[3];

        for (int i = 0; i < TOTAL_SIZE; i++) {
            values[0] = i;
            values[1] = "I'm row number " + i;
            values[2] = System.currentTimeMillis();
            cursor.addRow(values);
        }

        return cursor;
    }

    @Override
    public int delete(Uri uri, String selection, String[] selectionArgs) {
        throw new UnsupportedOperationException("Not yet implemented");
    }

    @Override
    public String getType(Uri uri) {
        throw new UnsupportedOperationException("Not yet implemented");
    }

    @Override
    public Uri insert(Uri uri, ContentValues values) {
        throw new UnsupportedOperationException("Not yet implemented");
    }

    @Override
    public int update(Uri uri, ContentValues values, String selection,
            String[] selectionArgs) {
        throw new UnsupportedOperationException("Not yet implemented");
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.IO;
using System.Collections;
using System.Runtime.Serialization.Json;
using System.Runtime.Serialization;
using YunfuModel;
using YunfuTools;

namespace YunfuDAL
{
    public class AlipayDAL
    {
        protected string server_url = "http://YOUR DOMAINS/yunfu/index.php/";

        /// <summary>
        /// 公共方法,组装参数
        /// </summary>
        /// <param name="data"></param>
        /// <param name="url"></param>
        /// <returns></returns>
        protected string Post(SortedDictionary<string, string> sParaTemp, string url)
        {
            CashierModel cashier = new CashierDAL().getConfig();
            DeviceModel device = new DeviceDAL().getConfig();

            sParaTemp.Add("device_no", device.device_no);
            sParaTemp.Add("cashier_id", cashier.cashier_id);

            string result = PostData.BuildRequest(sParaTemp,url);
            return result;
        }

        /// <summary>
        /// 验证
        /// </summary>
        /// <returns></returns>
        public string verify()
        {
            string url = server_url + "YunfuApi/Alipay/verify";
            SortedDictionary<string, string> sParaTemp = new SortedDictionary<string, string>();
            return Post(sParaTemp, url);
        }

        /// <summary>
        /// 付款接口
        /// </summary>
        /// <param name="dym_id"></param>
        /// <param name="total_fee"></param>
        /// <returns></returns>
        public string pay(string dym_id, string total_fee)
        {
            SortedDictionary<string, string> sParaTemp = new SortedDictionary<string, string>();
            sParaTemp.Add("dym_id", dym_id);
            sParaTemp.Add("total_fee", total_fee);

            string url = server_url + "YunfuApi/Alipay/pay";
            string result = Post(sParaTemp,url);
            return result;
        }

        /// <summary>
        /// 获取付款状态
        /// </summary>
        /// <param name="orderid"></param>
        /// <returns></returns>
        public string paystatus(string out_trade_no)
        {
            SortedDictionary<string, string> sParaTemp = new SortedDictionary<string, string>();
            sParaTemp.Add("out_trade_no", out_trade_no);

            string url = server_url + "YunfuApi/Alipay/getPayStatus";
            string result = Post(sParaTemp, url);
            return result;
        }

    }
}


text:
class TheSilverSearcher < Formula
  homepage "https://github.com/ggreer/the_silver_searcher"
  head "https://github.com/ggreer/the_silver_searcher.git"
  url "https://github.com/ggreer/the_silver_searcher/archive/0.29.1.tar.gz"
  sha1 "128c27749b7166800c00879b427a117dd4a17804"

  bottle do
    cellar :any
    sha1 "b1e44c0d9cd3a37ab20f56c9ccb8a7c969e76b53" => :yosemite
    sha1 "4fa6040bf03a04b94504c0259d0c92d9d168a9eb" => :mavericks
    sha1 "5d1fcee7e46abcea478b3549a8b824ac9d84da2d" => :mountain_lion
  end

  depends_on "autoconf" => :build
  depends_on "automake" => :build

  depends_on "pkg-config" => :build
  depends_on "pcre"
  depends_on "xz"

  # Edit bash completion script to not require bash-completion
  # The `have ag` test is redundant in any case, since the script will only
  # be installed if Ag itself is installed. See:
  # https://github.com/ggreer/the_silver_searcher/issues/208
  # https://github.com/Homebrew/homebrew/issues/27418
  patch do
    url "https://github.com/thomasf/the_silver_searcher/commit/867dff8631bc80d760268f653265e4d3caf44f16.diff"
    sha1 "09502c60a11658d9a08a6825e78defad96318bd9"
  end

  def install
    # Stable tarball does not include pre-generated configure script
    system "aclocal", "-I #{HOMEBREW_PREFIX}/share/aclocal"
    system "autoconf"
    system "autoheader"
    system "automake", "--add-missing"

    system "./configure", "--disable-dependency-tracking",
                          "--prefix=#{prefix}"
    system "make"
    system "make", "install"

    bash_completion.install "ag.bashcomp.sh"
  end

  test do
    (testpath/"Hello.txt").write("Hello World!")
    system "#{bin}/ag", "Hello World!", testpath
  end
end


text:
#ifndef _ACTIVEMQ_TRANSPORT_DISCOVERY_DISCOVERYAGENTREGISTRYTEST_H_
#define _ACTIVEMQ_TRANSPORT_DISCOVERY_DISCOVERYAGENTREGISTRYTEST_H_

#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>

namespace activemq {
namespace transport {
namespace discovery {

    class DiscoveryAgentRegistryTest : public CppUnit::TestFixture {

        CPPUNIT_TEST_SUITE( DiscoveryAgentRegistryTest );
        CPPUNIT_TEST( test );
        CPPUNIT_TEST_SUITE_END();

    public:

        DiscoveryAgentRegistryTest();
        virtual ~DiscoveryAgentRegistryTest();

        void test();

    };

}}}

#endif /* _ACTIVEMQ_TRANSPORT_DISCOVERY_DISCOVERYAGENTREGISTRYTEST_H_ */


text:
#include "ItemGroupCheckbox.hpp"

#include <boost/foreach.hpp>
#include <Wt/WCheckBox>
#include <Wt/WTable>
#include <Wt/WPushButton>

#include "../application.hpp"

ItemGroupCheckbox::ItemGroupCheckbox(string shopName, Wt::WContainerWidget *parent)
:Wt::WPanel(parent),
total(0)
{
	Wt::WContainerWidget *root = new Wt::WContainerWidget();
	setCentralWidget(root);

	Session& dbSession = static_cast<ShareBuy*>(Wt::WApplication::instance())->dbSession;
	dbo::Transaction transaction(dbSession);
	// user_id, item count, total price
	typedef boost::tuple<int, string, int, double> QueryTuple;
	dbo::Query<QueryTuple> query = dbSession.query<QueryTuple>(
		"select auth_info.user_id as userID, auth_identity.identity as name, sum(item.count) as count, sum(item.count*item.price) as total "
		"from auth_identity, auth_info, item "
		"where auth_identity.auth_info_id = auth_info.id "
		"and auth_info.user_id = item.user_id "
		"and item.shop_name = ? "
		"and item.ordering_id is null "
		"group by userID"
		).bind(shopName);

	dbo::collection<QueryTuple> result = query; // execute query

	if(result.size() == 0)
	{
		new Wt::WText("Currently nobody wants anything from "+shopName, root);
	}
	else
	{
		Wt::WTable *table = new Wt::WTable(root);
		table->setHeaderCount(1);
		table->setWidth(Wt::WLength("50%"));
		table->setStyleClass("table");

		table->elementAt(0, 0)->addWidget(new Wt::WText("user"));
		table->elementAt(0, 1)->addWidget(new Wt::WText("items"));
		table->elementAt(0, 2)->addWidget(new Wt::WText("total"));
		table->elementAt(0, 3)->addWidget(new Wt::WText("order for this user"));

		totalField = new Wt::WText("0.00");

		Wt::WPushButton *btnOrder = new Wt::WPushButton("order");
		btnOrder->setEnabled(false);
		btnOrder->clicked().connect([ this, &dbSession, shopName ](Wt::WMouseEvent)
		{
			dbo::Transaction transaction(dbSession);
			dbo::ptr<Order> order = dbSession.add(new Order());
			order.modify()->user = dbSession.user();
			transaction.commit();

			dbo::Transaction transaction2(dbSession);
			BOOST_FOREACH(int userId, selectedUserIds)
			{
				dbSession.execute("update item set ordering_id = ? where item.user_id = ? and item.ordering_id is null and item.shop_name = ? ").bind(order.id()).bind(userId).bind(shopName);
			}

			Wt::WApplication::instance()->setInternalPath("/user/orders", true);
		});

		size_t row=1;
		BOOST_FOREACH(auto tuple, result)
		{
			int userId = tuple.get<0>();
			double userTotal = tuple.get<3>();
			Wt::WCheckBox *checkbox = new Wt::WCheckBox();
			checkbox->changed().connect([this, checkbox, userId, userTotal, btnOrder](Wt::NoClass)
			{
				if(checkbox->checkState() == Wt::Checked)
				{
					selectedUserIds.insert(userId);
					total += userTotal;
					btnOrder->setEnabled(true);
				}
				else
				{
					selectedUserIds.erase(userId);
					total -= userTotal;
					if(selectedUserIds.empty())
						btnOrder->setEnabled(false);
				}
				totalField->setText((boost::format(priceFmt) % total).str());
			});
			table->elementAt(row,3)->addWidget(checkbox);
			table->elementAt(row,0)->addWidget(new Wt::WAnchor(Wt::WLink(Wt::WLink::Type::InternalPath, "/user/profile/"+boost::lexical_cast<string>(userId)),tuple.get<1>()));
			table->elementAt(row,1)->addWidget(new Wt::WText(boost::lexical_cast<string>(tuple.get<2>())));
			table->elementAt(row,2)->addWidget(new Wt::WText((boost::format(priceFmt) % tuple.get<3>()).str()));

			/*
			std::cout<<"userID: "<<tuple.get<0>()<<"\n";
			std::cout<<"username: "<<tuple.get<1>()<<"\n";
			std::cout<<"count: "<<tuple.get<2>()<<"\n";
			std::cout<<"total: "<<tuple.get<3>()<<"\n";
			*/

			row++;
		}
		table->elementAt(row,2)->addWidget(totalField);
		table->elementAt(row,3)->addWidget(btnOrder);

	}
}

/*std::set<string> ItemGroupCheckbox::selectedUserIds()
{
}*/


text:
package cn.howardliu.gear.monitor.core.unit;

import cn.howardliu.gear.commons.utils.StringUtilsEx;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.*;
import java.util.concurrent.TimeUnit;

/**
 * <br>created at 17-2-21
 *
 * @author liuxh
 * @since 1.0.2
 */
public class TimeValue implements Comparable<TimeValue> {
    private Logger logger = LoggerFactory.getLogger(this.getClass());

    public static final long NANO_SEC_PER_MILLI_SEC = TimeUnit.NANOSECONDS.convert(1, TimeUnit.MILLISECONDS);

    private static Map<TimeUnit, Byte> TIME_UNIT_BYTE_MAP;
    private static Map<Byte, TimeUnit> BYTE_TIME_UNIT_MAP;

    public static final TimeValue MINUS_ONE = timeValueMillis(-1);
    public static final TimeValue ZERO = timeValueMillis(0);

    private final long duration;
    private final TimeUnit timeUnit;

    private static final long C0 = 1L;
    private static final long C1 = C0 * 1000L;
    private static final long C2 = C1 * 1000L;
    private static final long C3 = C2 * 1000L;
    private static final long C4 = C3 * 60L;
    private static final long C5 = C4 * 60L;
    private static final long C6 = C5 * 24L;

    static {
        final Map<TimeUnit, Byte> timeUnitByteMap = new HashMap<>();
        timeUnitByteMap.put(TimeUnit.NANOSECONDS, (byte)0);
        timeUnitByteMap.put(TimeUnit.MICROSECONDS, (byte)1);
        timeUnitByteMap.put(TimeUnit.MILLISECONDS, (byte)2);
        timeUnitByteMap.put(TimeUnit.SECONDS, (byte)3);
        timeUnitByteMap.put(TimeUnit.MINUTES, (byte)4);
        timeUnitByteMap.put(TimeUnit.HOURS, (byte)5);
        timeUnitByteMap.put(TimeUnit.DAYS, (byte)6);

        final Set<Byte> bytes = new HashSet<>();
        for (TimeUnit value : TimeUnit.values()) {
            assert timeUnitByteMap.containsKey(value) : value;
            assert bytes.add(timeUnitByteMap.get(value));
        }

        final Map<Byte, TimeUnit> byteTimeUnitMap = new HashMap<>();
        for (Map.Entry<TimeUnit, Byte> entry : timeUnitByteMap.entrySet()) {
            byteTimeUnitMap.put(entry.getValue(), entry.getKey());
        }

        TIME_UNIT_BYTE_MAP = Collections.unmodifiableMap(timeUnitByteMap);
        BYTE_TIME_UNIT_MAP = Collections.unmodifiableMap(byteTimeUnitMap);
    }

    public TimeValue(long millis) {
        this(millis, TimeUnit.MILLISECONDS);
    }

    public TimeValue(long duration, TimeUnit timeUnit) {
        this.duration = duration;
        this.timeUnit = timeUnit;
    }

    public static TimeValue timeValueNanos(long nanos) {
        return new TimeValue(nanos, TimeUnit.NANOSECONDS);
    }

    public static TimeValue timeValueMillis(long millis) {
        return new TimeValue(millis, TimeUnit.MILLISECONDS);
    }

    public static TimeValue timeValueSeconds(long seconds) {
        return new TimeValue(seconds, TimeUnit.SECONDS);
    }

    public static TimeValue timeValueMinutes(long minutes) {
        return new TimeValue(minutes, TimeUnit.MINUTES);
    }

    public static TimeValue timeValueHours(long hours) {
        return new TimeValue(hours, TimeUnit.HOURS);
    }

    public long nanos() {
        return timeUnit.toNanos(duration);
    }

    public long getNanos() {
        return nanos();
    }

    public long micros() {
        return timeUnit.toMicros(duration);
    }

    public long getMicros() {
        return micros();
    }

    public long millis() {
        return timeUnit.toMillis(duration);
    }

    public long getMillis() {
        return millis();
    }

    public long seconds() {
        return timeUnit.toSeconds(duration);
    }

    public long getSeconds() {
        return seconds();
    }

    public long minutes() {
        return timeUnit.toMinutes(duration);
    }

    public long getMinutes() {
        return minutes();
    }

    public long hours() {
        return timeUnit.toHours(duration);
    }

    public long getHours() {
        return hours();
    }

    public long days() {
        return timeUnit.toDays(duration);
    }

    public long getDays() {
        return days();
    }

    public double microsFrac() {
        return ((double) nanos()) / C1;
    }

    public double getMicrosFrac() {
        return microsFrac();
    }

    public double millisFrac() {
        return ((double) nanos()) / C2;
    }

    public double getMillisFrac() {
        return millisFrac();
    }

    public double secondsFrac() {
        return ((double) nanos()) / C3;
    }

    public double getSecondsFrac() {
        return secondsFrac();
    }

    public double minutesFrac() {
        return ((double) nanos()) / C4;
    }

    public double getMinutesFrac() {
        return minutesFrac();
    }

    public double hoursFrac() {
        return ((double) nanos()) / C5;
    }

    public double getHoursFrac() {
        return hoursFrac();
    }

    public double daysFrac() {
        return ((double) nanos()) / C6;
    }

    public double getDaysFrac() {
        return daysFrac();
    }

    public long getDuration() {
        return this.duration;
    }

    @Override
    public boolean equals(Object o) {
        return this == o || !(o == null || getClass() != o.getClass()) && this.compareTo(((TimeValue) o)) == 0;
    }

    @Override
    public int hashCode() {
        return Double.valueOf(((double) duration) * timeUnit.toNanos(1)).hashCode();
    }

    public static long nsecToMSec(long ns) {
        return ns / NANO_SEC_PER_MILLI_SEC;
    }

    @Override
    public int compareTo(TimeValue timeValue) {
        double thisValue = ((double) duration) * timeUnit.toNanos(1);
        double otherValue = ((double) timeValue.duration) * timeValue.timeUnit.toNanos(1);
        return Double.compare(thisValue, otherValue);
    }

    @Override
    public String toString() {
        if (duration < 0) {
            return Long.toString(duration);
        }
        long nanos = nanos();
        if (nanos == 0) {
            return "0s";
        }
        double value = nanos;
        String suffix = "nanos";
        if (nanos >= C6) {
            value = daysFrac();
            suffix = "d";
        } else if (nanos >= C5) {
            value = hoursFrac();
            suffix = "h";
        } else if (nanos >= C4) {
            value = minutesFrac();
            suffix = "m";
        } else if (nanos >= C3) {
            value = secondsFrac();
            suffix = "s";
        } else if (nanos >= C2) {
            value = millisFrac();
            suffix = "ms";
        } else if (nanos >= C1) {
            value = microsFrac();
            suffix = "micros";
        }
        return StringUtilsEx.format1Decimals(value, suffix);
    }
}


text:
module Transit
  module Model
    module Owners

      extend ActiveSupport::Concern

      included do
        belongs_to :user
        User.send(:has_many, :"#{self.name.pluralize.underscore}")
      end

    end
  end
end


text:
package com.karuslabs.commons.animation.particles.effects;

import com.karuslabs.commons.animation.particles.Particles;
import com.karuslabs.commons.animation.particles.effect.Context;
import com.karuslabs.commons.world.BoundLocation;

import java.util.concurrent.ThreadLocalRandom;

import org.bukkit.Location;
import org.bukkit.util.Vector;

public class StubContext<Origin extends BoundLocation, Target extends BoundLocation> implements Context<Origin, Target> {

    Origin origin;
    Target target;
    long current;
    long iterations;
    Location location;
    ThreadLocalRandom random;
    Vector vector;

    public StubContext(Origin origin, Target target, long current, long iterations) {
        this.origin = origin;
        this.target = target;
        this.current = current;
        this.iterations = iterations;
        this.random = ThreadLocalRandom.current();
    }

    @Override
    public void render(Particles particles, Location location) {
        this.location = location.clone();
    }

    @Override
    public Origin getOrigin() {
        return origin;
    }

    @Override
    public Target getTarget() {
        return target;
    }

    @Override
    public Vector getVector() {
        if (vector == null) {
            vector = new Vector();
        }
        return vector;
    }

    @Override
    public long getCurrent() {
        return current;
    }

    @Override
    public long getIterations() {
        return iterations;
    }

    @Override
    public void cancel() {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

}


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="ro.pub.cs.systems.pdsd.lab10.googlemaps"
    android:versionCode="1"
    android:versionName="1.0" >

    <permission
        android:name="ro.pub.cs.systems.pdsd.lab10.googlemaps.permission.MAPS_RECEIVE"
        android:protectionLevel="signature" />

    <uses-permission
        android:name="ro.pub.cs.systems.pdsd.lab10.googlemaps.permission.MAPS_RECEIVE" />

    <uses-sdk
        android:minSdkVersion="16"
        android:targetSdkVersion="16" />

    <uses-permission
        android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission
        android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission
        android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission
        android:name="android.permission.INTERNET" />
    <uses-permission
        android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
    <uses-permission
        android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <uses-feature
        android:glEsVersion="0x00020000"
        android:required="true" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".graphicuserinterface.GoogleMapsActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".graphicuserinterface.GoogleMapsGeofenceEventActivity"
            android:parentActivityName=".graphicuserinterface.GoogleMapsActivity">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value=".graphicuserinterface.GoogleMapsActivity"/>
        </activity>
        <service
            android:name=".service.GeofenceTrackerIntentService"
            android:exported="false" />
        <meta-data
            android:name="com.google.android.maps.v2.API_KEY"
            android:value="AIzaSyCQf8H4Dsv4nNQyrHmJUuvw8HYlLtDPMCg" />
        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />
    </application>

</manifest>


text:
<!doctype html>

	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>jQuery UI Datepicker - Animations</title>
	<link rel="stylesheet" href="../../themes/base/all.css">
	<link rel="stylesheet" href="../demos.css">

Date: <input type="text" id="datepicker" size="30"/>

Animations:

	<select id="anim">
		<option value="show">Show (default)</option>
		<option value="slideDown">Slide down</option>
		<option value="fadeIn">Fade in</option>
		<option value="blind">Blind (UI Effect)</option>
		<option value="bounce">Bounce (UI Effect)</option>
		<option value="clip">Clip (UI Effect)</option>
		<option value="drop">Drop (UI Effect)</option>
		<option value="fold">Fold (UI Effect)</option>
		<option value="slide">Slide (UI Effect)</option>
		<option value="">None</option>
	</select>

Use different animations when opening or closing the datepicker.  Choose an animation from the dropdown, then click on the input to see its effect.  You can use one of the three standard animations or any of the UI Effects.


text:
import os
import sys
import time

from threading import Thread, Lock

'''
        @author: msune
	@organization: i2CAT, OFELIA FP7

	Resolver class
	Attemps to resolve keywords agains values/actions through mappings
'''

#Resolvers dictionary
_resolvers = {}

'''Resolver class'''
class Resolver():

	#Class attributes
	_mappings = None
	_mutex = None
	#Constructor
	def __init__(self,mappings):
		self._mutex=Lock()
		self._mappings =mappings
		pass

	#set mappings
	#@mappings: dictionary containing name <-> mapping (object...)
	def setMappings(self,mappings):
		with self._mutex:
			self._mappings = mappings

	#Get or generate the resolver
	@staticmethod
	def getOrGenerateResolver(theId,mappings=None):
		if theId in _resolvers:
			return _resolvers[theId]

		if mappings == None:
			raise Exception("Could not find the resolver with id:"+theId)

		instance = Resolver(mappings)
		#Save instance
		_resolvers[theId] = instance

		return instance

	#Try to parse as a number
	def _getNumericValue(self,string):
		try:
			#Try to parse integer
			return int(string)
		except:
			#Try a floating point
			try:
				return float(string)
			except:
				return string

	#Resolve a key
	def resolve(self, key, metaObj):
		with self._mutex:
			#print "mappings: %s\n mmmmmmmmmmmmmmmmmmmmmmmm" % self._mappings
			if not (isinstance(key,str) or  isinstance(key,unicode)):
				raise Exception("Only string keys are able to be resolved")

			if key not in self._mappings:
				#print "[DEBUG] "+str(self._getNumericValue(key))
				return self._getNumericValue(key)

			if isinstance(self._mappings[key],str):
				#print "aaaaaaaaaaaaaaaaaa[DEBUG] resolved"+str(eval(self._mappings[key]))
				return eval(self._mappings[key])
			else:
				#print "[DEBUG] Action: %s" % self._mappings[key]
				return self._mappings[key](metaObj)

#resolver = Resolver.getOrGenerateResolver("hola",{"test":"metaObj","test2":2})
#metaObj = 3
#print "Value:"+str(resolver.resolve("test",metaObj))
#print "Value:"+str(resolver.resolve("test2",metaObj))


text:
/**
 * Provides access to library events.
 * @author Johannes Donath <johannesd@evil-co.com>
 * @copyright Copyright (C) 2014 Evil-Co <http://www.evil-co.com>
 */
package org.evilco.network.rcon.common.event;


text:
extern CGFloat const kElementViewLineWidth;

static CGFloat const dashedLengths[]	= { 10, 4 };
static size_t const dashedLengthsSize	= sizeof(dashedLengths) / sizeof(float);

@interface ElementView : UIView

- (id)initWithElement:(Element *)element fontGeometry:(FontGeometry *)fontGeometry zoom:(NSInteger)zoom;

@property (nonatomic)CGRect boundingRect;

@property (strong, nonatomic)Element * element;
@property (nonatomic)CGFloat scaleFactor;

@property (strong, nonatomic, readonly)NSMutableArray * additionalAttributesPoints;
@property (strong, nonatomic, readonly)NSMutableArray * text;
@property (strong, nonatomic, readonly)UIColor * backgroundColor;
@property (strong, nonatomic, readonly)UIColor * foregroundColor;
@property (strong, nonatomic)FontGeometry * fontGeometry;

@property (strong, nonatomic)NSString * lt;
@property (strong, nonatomic)NSString * bt;
@property (strong, nonatomic)TextLine * m1;
@property (strong, nonatomic)TextLine * m2;
@property (strong, nonatomic)TextLine * r1;
@property (strong, nonatomic)TextLine * r2;
@property (strong, nonatomic)TextLine * q1;
@property (strong, nonatomic)TextLine * q2;
@property (strong, nonatomic)TextLine * p1;
@property (strong, nonatomic)TextLine * p2;
@property (nonatomic)BOOL activeClass;

- (void)drawTextVerticallyInContext:(CGContextRef)context;
- (void)drawTextInContext:(CGContextRef)context firstLineAt:(CGFloat)offset;
- (void)drawLeftJustifiedInContext:(CGContextRef)context;

- (void)drawText:(TextLine *)textLine inContext:(CGContextRef)context atX:(CGFloat)x atY:(CGFloat)y;
- (void)drawText:(TextLine *)textLine inContext:(CGContextRef)context centerAtX:(CGFloat)x centerAtY:(CGFloat)y;
- (void)drawText:(TextLine *)textLine inContext:(CGContextRef)context centerAtPoint:(CGPoint)point;

- (const char *)fontNameByStyle:(FontStyle)style;

@end


text:
<?xml version="1.0" encoding="utf-8"?>
<layer-list
  xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:id="@android:id/background" android:drawable="@drawable/pb_normal" />
    <item android:id="@android:id/progress" android:drawable="@drawable/pb_first_bg" />
</layer-list>


text:
package me.etki.grac.implementation.transport.asynchttpclient;

import com.google.common.net.MediaType;
import me.etki.grac.common.Action;
import me.etki.grac.transport.Payload;
import me.etki.grac.transport.ResponseStatus;
import me.etki.grac.transport.ServerRequest;
import me.etki.grac.transport.ServerResponse;
import me.etki.grac.transport.Transport;
import org.asynchttpclient.AsyncHttpClient;
import org.asynchttpclient.DefaultAsyncHttpClient;
import org.asynchttpclient.Param;
import org.asynchttpclient.Request;
import org.asynchttpclient.RequestBuilder;
import org.asynchttpclient.Response;
import org.asynchttpclient.uri.Uri;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
import java.util.function.Function;
import java.util.stream.Collectors;

/**
 * todo quick implementation
 *
 * @author Etki {@literal <etki@etki.name>}
 * @version %I%, %G%
 * @since 0.1.0
 */
public class AsyncHttpClientTransport implements Transport {

    private static final Logger LOGGER = LoggerFactory.getLogger(AsyncHttpClientTransport.class);

    private final AsyncHttpClient client;

    public AsyncHttpClientTransport(AsyncHttpClient client) {
        this.client = client;
    }

    public AsyncHttpClientTransport() {
        this(new DefaultAsyncHttpClient());
    }

    @Override
    public CompletableFuture<ServerResponse> execute(ServerRequest serverRequest) {
        Request request = convertRequest(serverRequest);
        return client
                .executeRequest(request)
                .toCompletableFuture()
                .thenApply(response -> postprocess(request, response))
                .thenApply(this::convertResponse);
    }

    protected Response postprocess(Request request, Response response) {
        if (response.getStatusCode() == 404 && request.getMethod().equals("GET")) {
            return new ResponseWrapper(response) {
                @Override
                public int getStatusCode() {
                    return 200;
                }
            };
        }
        return response;
    }

    @Override
    public boolean supports(String protocol) {
        return "http".equals(protocol) || "https".equals(protocol);
    }

    private Request convertRequest(ServerRequest request) {
        String resource = request.getResource();
        if (!resource.startsWith("/")) {
            resource = "/" + resource;
        }
        String host = request.getServer().getAddress().getHostString();
        int port = request.getServer().getAddress().getPort();
        Uri uri = new Uri(request.getServer().getProtocol(), null, host, port, resource, null);
        RequestBuilder requestBuilder = new RequestBuilder(convertAction(request.getAction()))
                .setQueryParams(convertParameters(request.getParameters()))
                .setHeaders(convertMetadata(request.getMetadata()))
                .setUri(uri)
                .setRequestTimeout(request.getTimeout().intValue());
        if (request.getPayload().isPresent()) {
            //noinspection OptionalGetWithoutIsPresent
            requestBuilder.setBody(request.getPayload().get().getContent());
            //noinspection OptionalGetWithoutIsPresent
            requestBuilder.addHeader("Content-Type", request.getPayload().get().getMimeType().toString());
        }
        if (!request.getAcceptedMimeTypes().isEmpty()) {
            requestBuilder.addHeader("Accept", assembleAcceptsHeader(request.getAcceptedMimeTypes()));
        }
        if (!request.getAcceptedLocales().isEmpty()) {
            requestBuilder.addHeader("Accept-Language", String.join(", ", request.getAcceptedLocales()));
        }
        if (request.getClientIdentifier().isPresent()) {
            //noinspection OptionalGetWithoutIsPresent
            requestBuilder.setHeader("User-Agent", request.getClientIdentifier().get());
        }
        return requestBuilder.build();
    }

    private Map<String, Collection<String>> convertMetadata(Map<String, List<Object>> metadata) {
        Function<Map.Entry<String, List<Object>>, Collection<String>> transformer
                = e -> e.getValue().stream().map(Object::toString).collect(Collectors.toList());
        return metadata.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, transformer));
    }

    private List<Param> convertParameters(Map<String, List<Object>> parameters) {
        return parameters.entrySet().stream()
                .flatMap(entry -> entry.getValue().stream().map(value -> new Param(entry.getKey(), value.toString())))
                .collect(Collectors.toList());
    }

    private String assembleAcceptsHeader(List<MediaType> acceptedMimeTypes) {
        return acceptedMimeTypes.stream()
                .map(MediaType::withoutParameters)
                .map(MediaType::toString)
                .collect(Collectors.joining(", "));
    }

    private ServerResponse convertResponse(Response response) {
        ServerResponse serverResponse = new ServerResponse()
                .setDescription(response.getStatusText());
        if (response.getStatusCode() > 499) {
            serverResponse.setStatus(ResponseStatus.SERVER_ERROR);
        } else if (response.getStatusCode() > 399) {
            serverResponse.setStatus(ResponseStatus.CLIENT_ERROR);
        } else {
            serverResponse.setStatus(ResponseStatus.OK);
        }
        if (response.hasResponseBody()) {
            MediaType mimeType = Optional.ofNullable(response.getContentType())
                    .map(MediaType::parse)
                    .orElse(MediaType.OCTET_STREAM);
            Long size = Optional.ofNullable(response.getHeader("Content-Length")).map(Long::valueOf).orElse(null);
            Payload payload = new Payload()
                    .setMimeType(mimeType)
                    .setSize(size)
                    .setContent(response.getResponseBodyAsStream());
            serverResponse.setPayload(payload);
        }
        Map<String, List<Object>> metadata = new HashMap<>();
        for (Map.Entry<String, String> entry : response.getHeaders()) {
            metadata.putIfAbsent(entry.getKey(), new ArrayList<>());
            metadata.get(entry.getKey()).add(entry.getValue());
        }
        return serverResponse.setMetadata(metadata);
    }

    private String convertAction(Action action) {
        switch (action) {
            case INSPECT:
                return "HEAD";
            case READ:
                return "GET";
            case CREATE:
                return "POST";
            case SET:
                return "PUT";
            case MODIFY:
                return "PATCH";
            case DELETE:
                return "DELETE";
            default:
                throw new IllegalArgumentException("Unknown action " + action);
        }
    }
}


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.

// Adapted from binary-trees C# .NET Core #5 program
// http://benchmarksgame.alioth.debian.org/u64q/program.php?test=binarytrees&lang=csharpcore&id=5
// aka (as of 2017-09-01) rev 1.1 of https://alioth.debian.org/scm/viewvc.php/benchmarksgame/bench/binarytrees/binarytrees.csharp-5.csharp?root=benchmarksgame&view=log
// Best-scoring C# .NET Core version as of 2017-09-01

/* The Computer Language Benchmarks Game
   http://benchmarksgame.alioth.debian.org/

   contributed by Marek Safar
   *reset*
   concurrency added by Peperud
   minor improvements by Alex Yakunin
*/

using System;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using Microsoft.Xunit.Performance;

[assembly: OptimizeForBenchmarks]
[assembly: MeasureGCCounts]

namespace BenchmarksGame
{
    public sealed class BinaryTrees_5
    {
        public const int MinDepth = 4;

        public static int Main(string[] args)
        {
            var n = args.Length == 0 ? 0 : int.Parse(args[0]);

            int check = Bench(n, true);
            int expected = 4398;

            // Return 100 on success, anything else on failure.
            return check - expected + 100;
        }

        [Benchmark(InnerIterationCount = 7)]
        public static void RunBench()
        {
            Benchmark.Iterate(() => Bench(16, false));
        }

        static int Bench(int n, bool verbose)
        {
            var maxDepth = n < (MinDepth + 2) ? MinDepth + 2 : n;
            var stretchDepth = maxDepth + 1;

            var stretchDepthTask = Task.Run(() => TreeNode.CreateTree(stretchDepth).CountNodes());
            var maxDepthTask = Task.Run(() => TreeNode.CreateTree(maxDepth).CountNodes());

            var tasks = new Task<string>[(maxDepth - MinDepth) / 2 + 1];
            for (int depth = MinDepth, ti = 0; depth <= maxDepth; depth += 2, ti++)
            {
                var iterationCount = 1 << (maxDepth - depth + MinDepth);
                var depthCopy = depth; // To make sure closure value doesn't change
                tasks[ti] = Task.Run(() =>
                {
                    var count = 0;
                    if (depthCopy >= 17)
                    {
                        // Parallelized computation for relatively large tasks
                        var miniTasks = new Task<int>[iterationCount];
                        for (var i = 0; i < iterationCount; i++)
                            miniTasks[i] = Task.Run(() => TreeNode.CreateTree(depthCopy).CountNodes());
                        Task.WaitAll(miniTasks);
                        for (var i = 0; i < iterationCount; i++)
                            count += miniTasks[i].Result;
                    }
                    else
                    {
                        // Sequential computation for smaller tasks
                        for (var i = 0; i < iterationCount; i++)
                            count += TreeNode.CreateTree(depthCopy).CountNodes();
                    }
                    return $"{iterationCount}\t trees of depth {depthCopy}\t check: {count}";
                });
            }
            Task.WaitAll(tasks);

            if (verbose)
            {
                int count = 0;
                Action<string> printAndSum = (string s) =>
                {
                    Console.WriteLine(s);
                    count += int.Parse(s.Substring(s.LastIndexOf(':') + 1).TrimStart());
                };

                printAndSum(String.Format("stretch tree of depth {0}\t check: {1}",
                    stretchDepth, stretchDepthTask.Result));
                foreach (var task in tasks)
                    printAndSum(task.Result);
                printAndSum(String.Format("long lived tree of depth {0}\t check: {1}",
                    maxDepth, maxDepthTask.Result));

                return count;
            }

            return 0;
        }
    }

    public struct TreeNode
    {
        public sealed class NodeData
        {
            public TreeNode Left, Right;

            public NodeData(TreeNode left, TreeNode right)
            {
                Left = left;
                Right = right;
            }
        }

        public NodeData Data;

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public TreeNode(TreeNode left, TreeNode right)
        {
            Data = new NodeData(left, right);
        }

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static TreeNode CreateTree(int depth)
        {
            return depth <= 0
                ? default(TreeNode)
                : new TreeNode(CreateTree(depth - 1), CreateTree(depth - 1));
        }

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public int CountNodes()
        {
            if (ReferenceEquals(Data, null))
                return 1;
            return 1 + Data.Left.CountNodes() + Data.Right.CountNodes();
        }
    }
}