text:
layout: documentation
title: Configurable build attributes
---

# Configurable build attributes

**_Configurable attributes_**, commonly known as [`select()`](
be/functions.html#select), is a Bazel feature that lets users toggle the values
of BUILD rule attributes at the command line.

This can be used, for example, for a multiplatform library that automatically
chooses the appropriate implementation for the architecture, or for a
feature-configurable binary that can be customized at build time.

## Example

```python
# myapp/BUILD

cc_binary(
    name = "mybinary",
    srcs = ["main.cc"],
    deps = select({
        ":arm_build": [":arm_lib"],
        ":x86_debug_build": [":x86_dev_lib"],
        "//conditions:default": [":generic_lib"],
    }),
)

config_setting(
    name = "arm_build",
    values = {"cpu": "arm"},
)

config_setting(
    name = "x86_debug_build",
    values = {
        "cpu": "x86",
        "compilation_mode": "dbg",
    },
)
```

This declares a `cc_binary` that "chooses" its deps based on the flags at the
command line. Specficially, `deps` becomes:

    Command
    deps =

    bazel build //myapp:mybinary --cpu=arm
    [":arm_lib"]

    bazel build //myapp:mybinary -c dbg --cpu=x86
    [":x86_dev_lib"]

    bazel build //myapp:mybinary --cpu=ppc
    [":generic_lib"]

    bazel build //myapp:mybinary -c dbg --cpu=ppc
    [":generic_lib"]

`select()` serves as a placeholder for a value that will be chosen based on
*configuration conditions*. These conditions are labels that refer to
[`config_setting`](be/general.html#config_setting) targets. By using `select()`
in a configurable attribute, the attribute effectively takes on different values
when different conditions hold.

Matches must be unambiguous: either exactly one condition must match or, if
multiple conditions match, one's `values` must be a strict superset of all
others'. For example, `values = {"cpu": "x86", "compilation_mode": "dbg"}` is an
unambiguous specialization of `values = {"cpu": "x86"}`. The built-in condition
[`//conditions:default`](#defaults) automatically matches when nothing else
does.

This example uses `deps`. But `select()` works just as well on `srcs`,
`resources`, `cmd`, or practically any other attribute. Only a small number of
attributes are *non-configurable*, and those are clearly annotated; for
instance, `config_setting`'s own
[`values`](be/general.html#config_setting.values) attribute is non-configurable.

Certain attributes, like the `tools` of a `genrule`, have the effect of changing
the build parameters (such as the cpu) for all targets that transitively appear
beneath them. This will affect how conditions are matched within those targets
but not within the attribute that causes the change. That is, a `select` in the
`tools` attribute of a `genrule` will work the same as a `select` in the `srcs`.

## Configuration conditions

Each key in a configurable attribute is a label reference to a
[`config_setting`](be/general.html#config_setting) target. This is just a
collection of expected command line flag settings. By encapsulating these in a
target, it's easy to maintain "standard" conditions that can be referenced
across targets and BUILD files.

The core `config_setting` syntax is:

```python
config_setting(
    name = "meaningful_condition_name",
    values = {
        "flag1": "expected_value1",
        "flag2": "expected_value2",
        ...
    },
)
```

`flagN` is an arbitrary Bazel command line flag. `value` is the expected value
for that flag. A `config_setting` matches when *all* of its flags match (order
is irrelevant).

`values` entries use the same parsing logic as at the actual command line. This
means:

*  `values = { "compilation_mode": "opt" }` matches `bazel build -c opt ...`
*  `values = { "java_header_compilation": "true" }` matches `bazel build
--java_header_compilation=1 ...`
*  `values = { "java_header_compilation": "0" }` matches `bazel build
--nojava_header_compilation ...`

`config_setting` only works with flags that affect build rule output. For
example, [`--show_progress`](user-manual.html#flag--show_progress) isn't allowed
because this only affects how Bazel reports progress to the user.

`config_setting` semantics are intentionally simple. For example, there's no
direct support for `OR` chaining (although a
[convenience function](#or-chaining) provides this).  Consider writing
macros for complicated flag logic.

## Defaults

The built-in condition `//conditions:default` matches when no other condition
matches.

Because of the "exactly one match" rule, a configurable attribute with no match
and no default condition triggers a `"no matching conditions"` error. This can
protect against silent failures from unexpected build flags:

```python
# foo/BUILD

config_setting(
    name = "foobar",
    values = {"define": "foo=bar"},
)

cc_library(
    name = "my_lib",
    srcs = select({
        ":foobar": ["foobar_lib.cc"],
    }),
)
```

```sh
$ bazel build //foo:my_lib --define foo=baz
ERROR: Configurable attribute "srcs" doesn't match this configuration (would
a default condition help?).
Conditions checked:
  //foo:foobar
```

`select()` can include a [`no_match_error`](#custom-error-messages) for custom
failure messages.

## Custom keys

Since `config_setting` currently only supports built-in Bazel flags, the level
of custom conditioning it can support is limited. For example, there's no Bazel
flag for `IncludeSpecialProjectFeatureX`.

Plans for [truly custom flags](
https://docs.google.com/document/d/1vc8v-kXjvgZOdQdnxPTaV0rrLxtP2XwnD2tAZlYJOqw/edit?usp=sharing)
are underway. In the meantime, [`--define`](user-manual.html#flag--define) is
the best approach for these purposes.
`--define` is a bit awkward to use and wasn't originally designed for this
purpose. We recommend using it sparingly until true custom flags are available.
For example, don't use `--define` to specify multiple variants of top-level
binary. Just use multiple targets instead.

To trigger an arbitrary condition with `--define`, write

```python
config_setting(
    name = "bar",
    values = {"define": "foo=bar"},
)

config_setting(
    name = "baz",
    values = {"define": "foo=baz"},
)
```

and run `$ bazel build //my:target --define foo=baz`.

The `values` attribute can't contain multiple `define`s. This is
because each instance has the same dictionary key. To solve this, use
`define_values`:

```python
config_setting(
    name = "bar_and_baz",
    define_values = {
        "foo": "bar",  # matches --define foo=bar
        "baz": "bat",  # matches --define baz=bat
    },
)
```

When `define`s appear in both `values` and `define_values`, all must match for
the `config_setting` to match.

## Platforms

While the ability to specify multiple flags on the command line provides
flexibility, it can also be burdensome to individually set each one every time
you want to build a target.
   [Platforms](platforms.html)
allow you to consolidate these into simple bundles.

```python
# myapp/BUILD

sh_binary(
    name = "my_rocks",
    srcs = select({
        ":basalt": ["pyroxene.sh"],
        ":marble": ["calcite.sh"],
        "//conditions:default": ["feldspar.sh"],
    }),
)

config_setting(
    name = "basalt",
    constraint_values = [
        ":black",
        ":igneous",
    ],
)

config_setting(
    name = "marble",
    constraint_values = [
        ":white",
        ":metamorphic",
    ],
)

# constraint_setting acts as an enum type, and constraint_value as an enum value.
constraint_setting(name = "color")
constraint_value(name = "black", constraint_setting = "color")
constraint_value(name = "white", constraint_setting = "color")
constraint_setting(name = "texture")
constraint_value(name = "smooth", constraint_setting = "texture")
constraint_setting(name = "type")
constraint_value(name = "igneous", constraint_setting = "type")
constraint_value(name = "metamorphic", constraint_setting = "type")

platform(
    name = "basalt_platform",
    constraint_values = [
        ":black",
        ":igneous",
    ],
)

platform(
    name = "marble_platform",
    constraint_values = [
        ":white",
        ":smooth",
        ":metamorphic",
    ],
)
```

The platform can be specified on the command line. It activates the
`config_setting`s that contain a subset of the platform's `constraint_values`,
allowing those `config_setting`s to match in `select()` expressions.

For example, in order to set the `srcs` attribute of `my_rocks` to `calcite.sh`,
we can simply run

```sh
bazel build //my_app:my_rocks --platforms=//myapp:marble_platform
```

Without platforms, this might look something like

```sh
bazel build //my_app:my_rocks --define color=white --define texture=smooth --define type=metamorphic
```

Platforms are still under development. See the [documentation](platforms.html)
and [roadmap](https://bazel.build/roadmaps/platforms.html) for details.

## Short keys

Since configuration keys are target labels, their names can get long and
unwieldy. This can be mitigated with local variable definitions:

Before:

```python
sh_binary(
    name = "my_target",
    srcs = select({
        "//my/project/my/team/configs:config1": ["my_target_1.sh"],
        "//my/project/my/team/configs:config2": ["my_target_2.sh"],
    }),
)
```

After:

```python
CONFIG1="//my/project/my/team/configs:config1"
CONFIG2="//my/project/my/team/configs:config2"

sh_binary(
    name = "my_target",
    srcs = select({
        CONFIG1: ["my_target_1.sh"],
        CONFIG2: ["my_target_2.sh"],
    })
)
```

For more complex expressions, you can use [macros](skylark/macros.md):

Before:

```python
# foo/BUILD

genrule(
    name = "my_target",
    srcs = [],
    outs = ["my_target.out"],
    cmd = select({
        "//my/project/my/team/configs/config1": "echo custom val: this > $@",
        "//my/project/my/team/configs/config2": "echo custom val: that > $@",
        "//conditions:default": "echo default output > $@",
    }),
)
```

After:

```python
# foo/genrule_select.bzl

def select_echo(input_dict):
    echo_cmd = "echo %s > $@"
    out_dict = {"//conditions:default": echo_cmd % "default output"}
    for (key, val) in input_dict.items():
        cmd = echo_cmd % ("custom val: " + val)
        out_dict["//my/project/my/team/configs/config" + key] = cmd
    return select(out_dict)
```

```python
# foo/BUILD

load("//foo:genrule_select.bzl", "select_echo")

genrule(
    name = "my_target",
    srcs = [],
    outs = ["my_target.out"],
    cmd = select_echo({
        "1": "this",
        "2": "that",
    }),
)
```

## Multiple `select` functions

`select` can appear multiple times in the same attribute:

```python
sh_binary(
    name = "my_target",
    srcs = ["always_include.sh"] +
           select({
               ":armeabi_mode": ["armeabi_src.sh"],
               ":x86_mode": ["x86_src.sh"],
           }) +
           select({
               ":opt_mode": ["opt_extras.sh"],
               ":dbg_mode": ["dbg_extras.sh"],
           }),
)
```

`select` cannot appear inside another `select`. If you need to nest `selects`
use an intermediate target:

```python
sh_binary(
    name = "my_target",
    srcs = ["always_include.sh"],
    deps = select({
        ":armeabi_mode": [":armeabi_lib"],
        ...
    }),
)

sh_library(
    name = "armeabi_lib",
    srcs = select({
        ":opt_mode": ["armeabi_with_opt.sh"],
        ...
    }),
)
```

Note that this approach doesn't work for non-deps attributes (like
[genrule:cmd](be/general.html#genrule.cmd)).

If you just need a `select` to match when multiple conditions match, see [AND
chaining](#and-chaining).

## OR chaining

Consider the following:

```python
sh_binary(
    name = "my_target",
    srcs = ["always_include.sh"],
    deps = select({
        ":config1": [":standard_lib"],
        ":config2": [":standard_lib"],
        ":config3": [":standard_lib"],
        ":config4": [":special_lib"],
    }),
)
```

Most conditions evaluate to the same dep. But this syntax is verbose, hard to
maintain, and refactoring-unfriendly. It would be nice to not have to repeat
`[":standard_lib"]` over and over.

One option is to predefine the declaration as a BUILD variable:

```python
STANDARD_DEP = [":standard_lib"]

sh_binary(
    name = "my_target",
    srcs = ["always_include.sh"],
    deps = select({
        ":config1": STANDARD_DEP,
        ":config2": STANDARD_DEP,
        ":config3": STANDARD_DEP,
        ":config4": [":special_lib"],
    }),
)
```

This makes it easier to manage the dependency. But it still adds unnecessary
duplication.

For more direct support, use one of the following:

### `selects.with_or`

The
[with_or](https://github.com/bazelbuild/bazel-skylib/blob/master/docs/selects_doc.md#selectswith_or)
macro in [Skylib](https://github.com/bazelbuild/bazel-skylib)'s
[`selects`](https://github.com/bazelbuild/bazel-skylib/blob/master/docs/selects_doc.md)
module supports `OR`ing conditions directly inside a `select`:

```python
load("@bazel_skylib//lib:selects.bzl", "selects")
```

```python
sh_binary(
    name = "my_target",
    srcs = ["always_include.sh"],
    deps = selects.with_or({
        (":config1", ":config2", ":config3"): [":standard_lib"],
        ":config4": [":special_lib"],
    }),
)
```

### `selects.config_setting_group`

The
[config_setting_group](https://github.com/bazelbuild/bazel-skylib/blob/master/docs/selects_doc.md#selectsconfig_setting_group)
macro in [Skylib](https://github.com/bazelbuild/bazel-skylib)'s
[`selects`](https://github.com/bazelbuild/bazel-skylib/blob/master/docs/selects_doc.md)
module supports `OR`ing multiple `config_setting`s:

```python
load("@bazel_skylib//lib:selects.bzl", "selects")
```

```python
config_setting(
    name = "config1",
    values = {"cpu": "arm"},
)
config_setting(
    name = "config2",
    values = {"compilation_mode": "dbg"},
)
selects.config_setting_group(
    name = "config1_or_2",
    match_any = [":config1", ":config2"],
)
sh_binary(
    name = "my_target",
    srcs = ["always_include.sh"],
    deps = select({
        ":config1_or_2": [":standard_lib"],
        "//conditions:default": [":other_lib"],
    }),
)
```

Unlike `selects.with_or`, different rules can `select` on `:config1_or_2`
with different values.

Note that it's an error for multiple conditions to match unless one is a
"specialization" of the other. See [select()](be/functions.html#select)
documentation for details.

## And chaining

If you need a `select` path to match when multiple conditions match, use the
[Skylib](https://github.com/bazelbuild/bazel-skylib) macro
[config_setting_group](https://github.com/bazelbuild/bazel-skylib/blob/master/docs/selects_doc.md#selectsconfig_setting_group):

```python
load("@bazel_skylib//lib:selects.bzl", "selects")
```

```python
config_setting(
    name = "config1",
    values = {"cpu": "arm"},
)
config_setting(
    name = "config2",
    values = {"compilation_mode": "dbg"},
)
selects.config_setting_group(
    name = "config1_and_2",
    match_all = [":config1", ":config2"],
)
sh_binary(
    name = "my_target",
    srcs = ["always_include.sh"],
    deps = select({
        ":config1_and_2": [":standard_lib"],
        "//conditions:default": [":other_lib"],
        }),
)
```

Unlike OR chaining, existing `config_setting`s can't be `AND`ed together
directly inside a `select`: you have to explicitly declare the
`config_setting_group`.

## Custom error messages

By default, when no condition matches, the owning target fails with the error:

```sh
ERROR: Configurable attribute "deps" doesn't match this configuration (would
a default condition help?).
Conditions checked:
  //tools/cc_target_os:darwin
  //tools/cc_target_os:android
```

This can be customized with [`no_match_error`](be/functions.html#select):

```python
cc_library(
    name = "my_lib",
    deps = select(
        {
            "//tools/cc_target_os:android": [":android_deps"],
            "//tools/cc_target_os:windows": [":windows_deps"],
        },
        no_match_error = "Please build with an Android or Windows toolchain",
    ),
)
```

```sh
$ bazel build //foo:my_lib
ERROR: Configurable attribute "deps" doesn't match this configuration: Please
build with an Android or Windows toolchain
```

## Rules compatibility
Rule implementations receive the *resolved values* of configurable
attributes. For example, given:

```python
# myproject/BUILD

some_rule(
    name = "my_target",
    some_attr = select({
        ":foo_mode": [":foo"],
        ":bar_mode": [":bar"],
    }),
)
```

```sh
$ bazel build //myproject/my_target --define mode=foo
```

Rule implementation code sees `ctx.attr.some_attr` as `[":foo"]`.

Macros can accept `select()` clauses and pass them through to native
rules. But *they cannot directly manipulate them*. For example, there's no way
for a macro to convert

```python
select({"foo": "val"}, ...)
```

to

```python
select({"foo": "val_with_suffix"}, ...)
```

This is for two reasons.

First, macros that need to know which path a `select` will choose *cannot work*
because macros are evaluated in Bazel's [loading phase](user-manual.html#loading-phase),
which occurs before flag values are known.
This is a core Bazel design restriction that's unlikely to change any time soon.

Second, macros that just need to iterate over *all* `select` paths, while
technically feasible, lack a coherent UI. Further design is necessary to change
this.

## Bazel query and cquery
Bazel `query` operates over Bazel's [loading phase](
user-manual.html#loading-phase). This means it doesn't know what command line
flags will be applied to a target since those flags aren't evaluated until later
in the build (during the [analysis phase](user-manual.html#analysis-phase)). So
the [`query`](query.html) command can't accurately determine which path a
configurable attribute will follow.

[Bazel `cquery`](cquery.html) has the advantage of being able to parse build
flags and operating post-analysis phase so it correctly resolves configurable
attributes. It doesn't have full feature parity with query but supports most
major functionality and is actively being worked on.
Querying the following build file...

```python
# myproject/BUILD

cc_library(
    name = "my_lib",
    deps = select({
        ":long": [":foo_dep"],
        ":short": [":bar_dep"],
    }),
)

config_setting(
    name = "long",
    values = {"define": "dog=dachshund"},
)

config_setting(
    name = "short",
    values = {"define": "dog=pug"},
)
```

...would return the following results.

```sh
$ bazel query 'deps(//myproject:my_lib)'
//myproject:my_lib
//myproject:foo_dep
//myproject:bar_dep

$ bazel cquery 'deps(//myproject:my_lib)' --define dog=pug
//myproject:my_lib
//myproject:bar_dep
```

## FAQ

### Why doesn't select() work in macros?
select() *does* work in rules! See [Rules compatibility](#rules) for
details.

The key issue this question usually means is that select() doesn't work in
*macros*. These are different than *rules*. See the
documentation on [rules](skylark/rules.html) and [macros](skylark/macros.html)
to understand the difference.
Here's an end-to-end example:

Define a rule and macro:

```python
# myproject/defs.bzl

# Rule implementation: when an attribute is read, all select()s have already
# been resolved. So it looks like a plain old attribute just like any other.
def _impl(ctx):
    name = ctx.attr.name
    allcaps = ctx.attr.my_config_string.upper()  # This works fine on all values.
    print("My name is " + name + " with custom message: " + allcaps)

# Rule declaration:
my_custom_bazel_rule = rule(
    implementation = _impl,
    attrs = {"my_config_string": attr.string()},
)

# Macro declaration:
def my_custom_bazel_macro(name, my_config_string):
    allcaps = my_config_string.upper()  # This line won't work with select(s).
    print("My name is " + name + " with custom message: " + allcaps)
```

Instantiate the rule and macro:

```python
# myproject/BUILD

load("//myproject:defs.bzl", "my_custom_bazel_rule")
load("//myproject:defs.bzl", "my_custom_bazel_macro")

my_custom_bazel_rule(
    name = "happy_rule",
    my_config_string = select({
        "//tools/target_cpu:x86": "first string",
        "//tools/target_cpu:ppc": "second string",
    }),
)

my_custom_bazel_macro(
    name = "happy_macro",
    my_config_string = "fixed string",
)

my_custom_bazel_macro(
    name = "sad_macro",
    my_config_string = select({
        "//tools/target_cpu:x86": "first string",
        "//tools/target_cpu:ppc": "other string",
    }),
)
```

Building fails because `sad_macro` can't process the `select()`:

```sh
$ bazel build //myproject:all
ERROR: /myworkspace/myproject/BUILD:17:1: Traceback
  (most recent call last):
File "/myworkspace/myproject/BUILD", line 17
my_custom_bazel_macro(name = "sad_macro", my_config_stri..."}))
File "/myworkspace/myproject/defs.bzl", line 4, in
  my_custom_bazel_macro
my_config_string.upper()
type 'select' has no method upper().
ERROR: error loading package 'myproject': Package 'myproject' contains errors.
```

Building succeeds when we comment out `sad_macro`:

```sh
# Comment out sad_macro so it doesn't mess up the build.
$ bazel build //myproject:all
DEBUG: /myworkspace/myproject/defs.bzl:5:3: My name is happy_macro with custom message: FIXED STRING.
DEBUG: /myworkspace/myproject/hi.bzl:15:3: My name is happy_rule with custom message: FIRST STRING.
```

This is impossible to change because *by definition* macros are evaluated before
Bazel reads the build's command line flags. That means there isn't enough
information to evaluate select()s.

Macros can, however, pass `select()`s as opaque blobs to rules:

```python
# myproject/defs.bzl

def my_custom_bazel_macro(name, my_config_string):
    print("Invoking macro " + name)
    my_custom_bazel_rule(
        name = name + "_as_target",
        my_config_string = my_config_string,
    )
```

```sh
$ bazel build //myproject:sad_macro_less_sad
DEBUG: /myworkspace/myproject/defs.bzl:23:3: Invoking macro sad_macro_less_sad.
DEBUG: /myworkspace/myproject/defs.bzl:15:3: My name is sad_macro_less_sad with custom message: FIRST STRING.
```

### Why does select() always return true?
Because *macros* (but not rules) by definition
[can't evaluate select(s)](#macros-select), any attempt to do so
usually produces an error:

```sh
ERROR: /myworkspace/myproject/BUILD:17:1: Traceback
  (most recent call last):
File "/myworkspace/myproject/BUILD", line 17
my_custom_bazel_macro(name = "sad_macro", my_config_stri..."}))
File "/myworkspace/myproject/defs.bzl", line 4, in
  my_custom_bazel_macro
my_config_string.upper()
type 'select' has no method upper().
```

Booleans are a special case that fail silently, so you should be particularly
vigilant with them:

```sh
$ cat myproject/defs.bzl
def my_boolean_macro(boolval):
  print("TRUE" if boolval else "FALSE")

$ cat myproject/BUILD
load("//myproject:defs.bzl", "my_boolean_macro")
my_boolean_macro(
    boolval = select({
        "//tools/target_cpu:x86": True,
        "//tools/target_cpu:ppc": False,
    }),
)

$ bazel build //myproject:all --cpu=x86
DEBUG: /myworkspace/myproject/defs.bzl:4:3: TRUE.
$ bazel build //myproject:all --cpu=ppc
DEBUG: /myworkspace/myproject/defs.bzl:4:3: TRUE.
```

This happens because macros don't understand the contents of `select()`.
So what they're really evaluting is the `select()` object itself. According to
[Pythonic](https://docs.python.org/release/2.5.2/lib/truth.html) design
standards, all objects aside from a very small number of exceptions
automatically return true.
### Can I read select() like a dict?
Fine. Macros [can't](#macros-select) evaluate select(s) because
macros are evaluated before Bazel knows what the command line flags are.

Can macros at least read the `select()`'s dictionary, say, to add an extra
suffix to each branch?

Conceptually this is possible. But this isn't yet implemented and is not
currently prioritized.
What you *can* do today is prepare a straight dictionary, then feed it into a
`select()`:

```sh
$ cat myproject/defs.bzl
def selecty_genrule(name, select_cmd):
  for key in select_cmd.keys():
    select_cmd[key] += " WITH SUFFIX"
  native.genrule(
      name = name,
      outs = [name + ".out"],
      srcs = [],
      cmd = "echo " + select(select_cmd + {"//conditions:default": "default"})
        + " > $@"
  )

$ cat myproject/BUILD
selecty_genrule(
    name = "selecty",
    select_cmd = {
        "//tools/target_cpu:x86": "x86 mode",
    },
)

$ bazel build //testapp:selecty --cpu=x86 && cat bazel-genfiles/testapp/selecty.out
x86 mode WITH SUFFIX
```

If you'd like to support both `select()` and native types, you can do this:

```sh
$ cat myproject/defs.bzl
def selecty_genrule(name, select_cmd):
    cmd_suffix = ""
    if type(select_cmd) == "string":
        cmd_suffix = select_cmd + " WITH SUFFIX"
    elif type(select_cmd) == "dict":
        for key in select_cmd.keys():
            select_cmd[key] += " WITH SUFFIX"
        cmd_suffix = select(select_cmd + {"//conditions:default": "default"})

    native.genrule(
        name = name,
        outs = [name + ".out"],
        srcs = [],
        cmd = "echo " + cmd_suffix + "> $@",
    )
```

### Why doesn't select() work with bind()?

Because [`bind()`](be/workspace.html#bind) is a WORKSPACE rule, not a BUILD rule.

Workspace rules do not have a specific configuration, and aren't evaluated in
the same way as BUILD rules. Therefore, a `select()` in a `bind()` can't
actually evaluate to any specific branch.

Instead, you should use [`alias()`](be/general.html#alias), with a `select()` in
the `actual` attribute, to perform this type of run-time determination. This
works correctly, since `alias()` is a BUILD rule, and is evaluated with a
specific configuration.

You can even have a `bind()` target point to an `alias()`, if needed.

```sh
$ cat WORKSPACE
workspace(name = "myproject")
bind(name = "openssl", actual = "//:ssl")
http_archive(name = "alternative", ...)
http_archive(name = "boringssl", ...)

$ cat BUILD
config_setting(
    name = "alt_ssl",
    define_values = {
        "ssl_library": "alternative",
    },
)

alias(
    name = "ssl",
    actual = select({
        "//:alt_ssl": "@alternative//:ssl",
        "//conditions:default": "@boringssl//:ssl",
    }),
)
```

With this setup, you can pass `--define ssl_library=alternative`, and any target
that depends on either `//:ssl` or `//external:ssl` will see the alternative
located at `@alternative//:ssl`.


text:
namespace ax {
namespace System {
namespace IO {

enum class FileMode {
	CreateNew,
	OpenExists,
	OpenOrCreate,
};

enum class FileAccess {
	Read,
	ReadWrite,
	WriteOnly,
};

enum class FileShareMode {
	None,
	Read,
	Write,
	ReadWrite,
};

typedef	int64_t	FileSize;

struct File : public StaticClass {

	static	bool 		Exists 				( const ax_string & filename );
	static	void		Remove				( const ax_string & filename );

	static	void		Rename				( const ax_string & old_name, const ax_string & new_name );

	static	String		ReadText			( const ax_string & filename );
	static	void		ReadTextToBuffer	( MutString  & buf, const ax_string & filename );

	static	StringA		ReadUtf8			( const ax_string & filename );
	static	void		ReadUtf8ToBuffer	( MutStringA & buf, const ax_string & filename );

	static	void		WriteText			( const ax_string & filename, const ax_string	 & text );
	static	void		WriteUtf8			( const ax_string & filename, const StringA  	 & text );
	static	void		WriteUtf8			( const ax_string & filename, const MutStringA   & text );
};

}}} //namespace

#endif

redpajama_set_name: RedPajamaGithub


text:
package org.elasticsearch.cluster.action.index;

import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.admin.indices.mapping.put.PutMappingRequestBuilder;
import org.elasticsearch.action.admin.indices.mapping.put.PutMappingResponse;
import org.elasticsearch.client.Client;
import org.elasticsearch.client.IndicesAdminClient;
import org.elasticsearch.common.component.AbstractComponent;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.index.mapper.MapperService;
import org.elasticsearch.index.mapper.Mapping;
import org.elasticsearch.node.settings.NodeSettingsService;

import java.util.concurrent.TimeoutException;

/**
 * Called by shards in the cluster when their mapping was dynamically updated and it needs to be updated
 * in the cluster state meta data (and broadcast to all members).
 */
public class MappingUpdatedAction extends AbstractComponent {

    public static final String INDICES_MAPPING_DYNAMIC_TIMEOUT = "indices.mapping.dynamic_timeout";

    private IndicesAdminClient client;
    private volatile TimeValue dynamicMappingUpdateTimeout;

    class ApplySettings implements NodeSettingsService.Listener {
        @Override
        public void onRefreshSettings(Settings settings) {
            TimeValue current = MappingUpdatedAction.this.dynamicMappingUpdateTimeout;
            TimeValue newValue = settings.getAsTime(INDICES_MAPPING_DYNAMIC_TIMEOUT, current);
            if (!current.equals(newValue)) {
                logger.info("updating " + INDICES_MAPPING_DYNAMIC_TIMEOUT + " from [{}] to [{}]", current, newValue);
                MappingUpdatedAction.this.dynamicMappingUpdateTimeout = newValue;
            }
        }
    }

    @Inject
    public MappingUpdatedAction(Settings settings, NodeSettingsService nodeSettingsService) {
        super(settings);
        this.dynamicMappingUpdateTimeout = settings.getAsTime(INDICES_MAPPING_DYNAMIC_TIMEOUT, TimeValue.timeValueSeconds(30));
        nodeSettingsService.addListener(new ApplySettings());
    }

    public void setClient(Client client) {
        this.client = client.admin().indices();
    }

    private PutMappingRequestBuilder updateMappingRequest(String index, String type, Mapping mappingUpdate, final TimeValue timeout) {
        if (type.equals(MapperService.DEFAULT_MAPPING)) {
            throw new IllegalArgumentException("_default_ mapping should not be updated");
        }
        return client.preparePutMapping(index).setType(type).setSource(mappingUpdate.toString())
            .setMasterNodeTimeout(timeout).setTimeout(timeout);
    }

    public void updateMappingOnMaster(String index, String type, Mapping mappingUpdate, final TimeValue timeout, final MappingUpdateListener listener) {
        final PutMappingRequestBuilder request = updateMappingRequest(index, type, mappingUpdate, timeout);
        if (listener == null) {
            request.execute();
        } else {
            final ActionListener<PutMappingResponse> actionListener = new ActionListener<PutMappingResponse>() {
                @Override
                public void onResponse(PutMappingResponse response) {
                    if (response.isAcknowledged()) {
                        listener.onMappingUpdate();
                    } else {
                        listener.onFailure(new TimeoutException("Failed to acknowledge the mapping response within [" + timeout + "]"));
                    }
                }

                @Override
                public void onFailure(Throwable e) {
                    listener.onFailure(e);
                }
            };
            request.execute(actionListener);
        }
    }

    public void updateMappingOnMasterAsynchronously(String index, String type, Mapping mappingUpdate) throws Throwable {
        updateMappingOnMaster(index, type, mappingUpdate, dynamicMappingUpdateTimeout, null);
    }

    /**
     * Same as {@link #updateMappingOnMasterSynchronously(String, String, Mapping, TimeValue)}
     * using the default timeout.
     */
    public void updateMappingOnMasterSynchronously(String index, String type, Mapping mappingUpdate) throws Throwable {
        updateMappingOnMasterSynchronously(index, type, mappingUpdate, dynamicMappingUpdateTimeout);
    }

    /**
     * Update mappings synchronously on the master node, waiting for at most
     * {@code timeout}. When this method returns successfully mappings have
     * been applied to the master node and propagated to data nodes.
     */
    public void updateMappingOnMasterSynchronously(String index, String type, Mapping mappingUpdate, TimeValue timeout) throws Throwable {
        if (updateMappingRequest(index, type, mappingUpdate, timeout).get().isAcknowledged() == false) {
            throw new TimeoutException("Failed to acknowledge mapping update within [" + timeout + "]");
        }
    }

    /**
     * A listener to be notified when the mappings were updated
     */
    public static interface MappingUpdateListener {

        void onMappingUpdate();

        void onFailure(Throwable t);
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <parent>
        <groupId>net.ripe.db</groupId>
        <artifactId>whois</artifactId>
        <version>1.69.1-APNICv1r8-SNAPSHOT</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <groupId>net.ripe.db</groupId>
    <artifactId>whois-commons</artifactId>
    <version>1.69.1-APNICv1r8-SNAPSHOT</version>
    <packaging>jar</packaging>

    <dependencies>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-net</groupId>
            <artifactId>commons-net</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jul-to-slf4j</artifactId>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>apache-log4j-extras</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty</artifactId>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
        </dependency>
        <dependency>
            <groupId>c3p0</groupId>
            <artifactId>c3p0</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
        </dependency>
        <!-- jflex lexical analyser -->
        <dependency>
            <groupId>de.jflex</groupId>
            <artifactId>jflex</artifactId>
        </dependency>
        <dependency>
            <groupId>de.jflex</groupId>
            <artifactId>maven-jflex-plugin</artifactId>
        </dependency>
        <dependency>
            <groupId>com.googlecode.java-diff-utils</groupId>
            <artifactId>diffutils</artifactId>
        </dependency>
        <!-- test -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-compress</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.ostermiller</groupId>
            <artifactId>utils</artifactId>
            <version>1.07.00</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/version.properties</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
                <excludes>
                    <exclude>**/version.properties</exclude>
                </excludes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.2.1</version>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <!-- @TODO generateByaccs - this needs to be converted to an ant script -->
                    <!-- Maybe use CUP or JavaCC and remove platform binaries  -->
                    <!-- If running build on *nix x64 -->
                    <!-- UBUNTU: sudo apt-get install ia32-libs-multiarch -->
                    <!-- CENTOS: yum install xulrunner.i686 -->
                    <!-- WINDOWS: cygwin -->
                    <executable>bash</executable>
                    <arguments>
                        <argument>src/main/resources/bin/generateByaccs</argument>
                        <argument>${os.name}</argument>
                    </arguments>
                </configuration>
            </plugin>
            <plugin>
                <groupId>de.jflex</groupId>
                <artifactId>maven-jflex-plugin</artifactId>
                <version>1.4.3-r1</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <lexDefinitions>
                                <lexDefinition>src/main/resources/jflex</lexDefinition>
                            </lexDefinitions>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>


text:
#region --- License ---

#endregion

using System;
using System.Collections.Generic;
using System.Text;

namespace OpenTK.Input
{
    /// <summary>
    /// Defines the interface for MouseDevice drivers.
    /// </summary>
    [Obsolete]
    public interface IMouseDriver
    {
        /// <summary>
        /// Gets the list of available MouseDevices.
        /// </summary>
        IList<MouseDevice> Mouse { get; }
    }
}


text:
namespace policy {

// The following const strings are used to parse the
// DataLeakPreventionRules policy pref value.
namespace dlp {

constexpr char kClipboardRestriction[] = "CLIPBOARD";
constexpr char kScreenshotRestriction[] = "SCREENSHOT";
constexpr char kPrintingRestriction[] = "PRINTING";
constexpr char kPrivacyScreenRestriction[] = "PRIVACY_SCREEN";
constexpr char kScreenShareRestriction[] = "SCREEN_SHARE";
constexpr char kFilesRestriction[] = "FILES";

constexpr char kArc[] = "ARC";
constexpr char kCrostini[] = "CROSTINI";
constexpr char kPluginVm[] = "PLUGIN_VM";
constexpr char kDrive[] = "DRIVE";
constexpr char kUsb[] = "USB";

constexpr char kAllowLevel[] = "ALLOW";
constexpr char kBlockLevel[] = "BLOCK";
constexpr char kWarnLevel[] = "WARN";
constexpr char kReportLevel[] = "REPORT";

// Link to the Help Center article about Data Leak Prevention.
constexpr char kDlpLearnMoreUrl[] =
    "https://support.google.com/chrome/a/?p=chromeos_datacontrols";

}  // namespace dlp

}  // namespace policy

#endif  // CHROME_BROWSER_CHROMEOS_POLICY_DLP_DLP_POLICY_CONSTANTS_H_


text:
package com.guidestone.wifi.streamer.controllers;

import com.guidestone.wifi.streamer.entities.UserEntity;
import com.guidestone.wifi.streamer.services.UsersService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.web.PagedResourcesAssembler;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

//@EnableWebMvc
@RestController
@RequestMapping("/api/wifistreamer/v1/users")
@EnableAutoConfiguration
@ComponentScan
public class UsersController {

    private static final Logger LOG = LoggerFactory.getLogger(UsersController.class);
    @Autowired
    UsersService usersService;

    @RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
    public ResponseEntity<?> addUsers(@RequestHeader HttpHeaders headers, @RequestBody List<UserEntity> users) throws Exception {

        LOG.debug("Users to add {}", users);
        return new ResponseEntity<>(usersService.addUsers(users), HttpStatus.OK);
    }

    @RequestMapping(method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
    public ResponseEntity<?> getUsers(@RequestHeader HttpHeaders headers,
            Pageable pageable, PagedResourcesAssembler assembler) throws Exception {

        Page<UserEntity> users = usersService.getUsers(pageable);
        return new ResponseEntity<>(assembler.toResource(users), HttpStatus.OK);
    }

    @RequestMapping(value = "/{id}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
    public ResponseEntity<?> getUser(@RequestHeader HttpHeaders headers, @PathVariable Double id) throws Exception {
        return new ResponseEntity<>(usersService.getUser(id), HttpStatus.OK);
    }

    @RequestMapping(value = "/{id}", method = RequestMethod.PUT, produces = MediaType.APPLICATION_JSON_VALUE)
    public ResponseEntity<?> addUser(@RequestHeader HttpHeaders headers, @RequestBody UserEntity user) throws Exception {
        return new ResponseEntity<>(usersService.addUser(user), HttpStatus.OK);
    }
}


text:
bindings='late'
bags='8 32 256 2048'

experiment='.'
data='AIMES_Swift_Experiments'
raw='AIMES_Swift_Experiments/raw'
plots='AIMES_Swift_Experiments/plots'
analysis='AIMES_Swift_Experiments/analysis'

if [ ! -d ${raw} ]; then
    mkdir -p ${raw}
fi

if [ ! -d ${plots} ]; then
    mkdir -p ${plots}
fi

if [ ! -d ${analysis} ]; then
    mkdir -p ${analysis}
fi

declare -A counters

#Initialize counters to 0
for binding in $bindings; do
    for bag in $bags; do
        tag=${bag}_${binding}
        counters["c_${tag}"]=0
    done
done

#Set counters to the current maximum value
for binding in $bindings; do
    for bag in $bags; do

        tag=${bag}_${binding}
        for dir in $(find $raw -type d -name "run-${tag}_*"); do

            cutoff="run-${tag}_"
            n_iteration=${dir:${#cutoff}+${#raw}+1}

            if (( $n_iteration > "${counters["c_${tag}"]}" )); then
                counters["c_${tag}"]=${n_iteration}
            fi
        done
    done
done

echo "Set counters for current max iteration for each run type..."
for counter in "${!counters[@]}"; do echo "$counter - ${counters["$counter"]}"; done

echo
echo "Copy local runs to raw data archive..."
for binding in $bindings; do
    for bag in $bags; do

        tag=${bag}_${binding}

        for run in $(find $experiment -type d -name "exp-*"); do
            if (( `cat $experiment/$run/metadata.json | python -c 'import sys, json; print json.load(sys.stdin)["n_tasks"]' ` == ${bag} )); then

                n_iteration=$((${counters["c_${tag}"]} + 1))

                echo "cp -rpi $run $raw/run-${tag}_${n_iteration}"
                cp -rpni $run $raw/run-${tag}_${n_iteration}

                counters["c_${tag}"]=${n_iteration}

            fi
        done
    done
done

echo
echo "Copying swift log file for analysis..."
for binding in $bindings; do
    for bag in $bags; do

        tag=${bag}_${binding}

        for run in $(find ${raw} -type d -name "run-${tag}_*"); do

            if [ ! -d ${analysis}/${binding}/${bag} ] ; then
                mkdir -p ${analysis}/${binding}/${bag}
            fi

            cp -pnv ${run}/swift.log ${analysis}/${binding}/${bag}/swift.`gdate +%s%N`.log

        done
    done
done

echo "Done."


text:
<!DOCTYPE html>

<meta charset="utf-8">
<meta name="HandheldFriendly" content="True">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="no-referrer-when-downgrade">

<title>La vista cansada</title>
<meta name="description" content="">

<link rel="icon" type="image/x-icon" href="https://carlesbellver.github.io/favicon.ico">
<link rel="apple-touch-icon-precomposed" href="https://carlesbellver.github.io/favicon.png">

<link rel="stylesheet" href="https://carlesbellver.github.io/css/light.css?rnd=1602439751" />

<link rel="stylesheet" href="https://carlesbellver.github.io/css/style.css?rnd=1602439751" />

<meta property="og:title" content="" />
<meta property="og:description" content="📎 A Prisoner Who Briefly Died Argues That He's Served His Life Sentence
Un tribunal d'Iowa va determinar que l'assassí, que va ser ressuscitat, "encara és viu, i en aquest cas ha de romandre a la presó, o realment és mort, i en aquest cas el recurs és irrellevant." />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://carlesbellver.github.io/2019/11/09/a-court-in.html" />
<meta property="article:published_time" content="2019-11-10T07:13:00+00:00" />
<meta property="article:modified_time" content="2019-11-10T07:13:00+00:00" />

<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content=""/>
<meta name="twitter:description" content="📎 A Prisoner Who Briefly Died Argues That He's Served His Life Sentence
Un tribunal d'Iowa va determinar que l'assassí, que va ser ressuscitat, "encara és viu, i en aquest cas ha de romandre a la presó, o realment és mort, i en aquest cas el recurs és irrellevant."/>

    Anar al contingut principal

    La vista cansada

        Informació

        Etiquetes

📎 A Prisoner Who Briefly Died Argues That He's Served His Life Sentence

Un tribunal d'Iowa va determinar que l'assassí, que va ser ressuscitat, "encara és viu, i en aquest cas ha de romandre a la presó, o realment és mort, i en aquest cas el recurs és irrellevant."

En Detective Comics #64 ("The Joker Walks the Last Mile", 1942), el Joker confessa els seus crims i és executat a la cadira elèctrica. Llavors, seguint un pla preconcebut, els seus sicaris recuperen el cos i el ressusciten mitjançant un sèrum que havia preparat ell mateix. El Joker torna i no serveix de res que Batman el capturi, perquè ja ha pagat pels seus crims.

2019-11-10

#retalls

Carles Bellver Torlà

    <button class="theme-switcher">
        Tema fosc
    </button>


text:
require "vagrant"

module VagrantPlugins
  module TiktalikVagrant
    class Config < Vagrant.plugin("2", :config)
      attr_accessor :api_key
      attr_accessor :image
      attr_accessor :size
      attr_accessor :ssh_key
      attr_accessor :api_secret
      attr_accessor :ca_file
      attr_accessor :networks

      def initialize
        @api_key    = UNSET_VALUE
        @image      = UNSET_VALUE
        @size       = UNSET_VALUE
        @ssh_key    = UNSET_VALUE
        @api_secret = UNSET_VALUE
        @ca_file    = UNSET_VALUE
        @networks   = UNSET_VALUE
      end

      def finalize!
        @api_key    = ENV['TIKTALIK_API_KEY'] if @api_key == UNSET_VALUE
        @image      = nil if @image == UNSET_VALUE
        @size       = 0.5 if @size == UNSET_VALUE
        @ssh_key    = nil if @ssh_key == UNSET_VALUE
        @api_secret = ENV['TIKTALIK_API_SECRET'] if @api_secret == UNSET_VALUE
        @ca_file    = nil if @ca_file == UNSET_VALUE
        @networks   = nil if @networks == UNSET_VALUE
      end

      def validate(machine)
        errors = []

        errors << I18n.t("vagrant_tiktalik.config.api_key_required") if config.api_key.nil?
        errors << I18n.t("vagrant_tiktalik.config.api_secret_required") if config.api_secret.nil?
        errors << I18n.t("vagrant_tiktalik.config.image_required") if config.image.nil?
        errors << I18n.t("vagrant_tiktalik.config.ssh_key_required") if !@ssh_key

        # TODO validate network

        { "Tiktalik Provider" => errors }
      end
    end
  end
end


text:
from temboo.core.choreography import Choreography
from temboo.core.choreography import InputSet
from temboo.core.choreography import ResultSet
from temboo.core.choreography import ChoreographyExecution

import json

class SearchJournalEntries(Choreography):

    def __init__(self, temboo_session):
        """
        Create a new instance of the SearchJournalEntries Choreo. A TembooSession object, containing a valid
        set of Temboo credentials, must be supplied.
        """
        super(SearchJournalEntries, self).__init__(temboo_session, '/Library/Kiva/JournalEntries/SearchJournalEntries')

    def new_input_set(self):
        return SearchJournalEntriesInputSet()

    def _make_result_set(self, result, path):
        return SearchJournalEntriesResultSet(result, path)

    def _make_execution(self, session, exec_id, path):
        return SearchJournalEntriesChoreographyExecution(session, exec_id, path)

class SearchJournalEntriesInputSet(InputSet):
    """
    An InputSet with methods appropriate for specifying the inputs to the SearchJournalEntries
    Choreo. The InputSet object is used to specify input parameters when executing this Choreo.
    """
    def set_AppID(self, value):
        """
        Set the value of the AppID input for this Choreo. ((optional, string) Your unique application ID, usually in reverse DNS notation.)
        """
        super(SearchJournalEntriesInputSet, self)._set_input('AppID', value)
    def set_Page(self, value):
        """
        Set the value of the Page input for this Choreo. ((optional, integer) The page position of results to return. Defaults to 1.)
        """
        super(SearchJournalEntriesInputSet, self)._set_input('Page', value)
    def set_Query(self, value):
        """
        Set the value of the Query input for this Choreo. ((optional, string) Word or phrase used to search for in the journals' content.)
        """
        super(SearchJournalEntriesInputSet, self)._set_input('Query', value)
    def set_ResponseType(self, value):
        """
        Set the value of the ResponseType input for this Choreo. ((optional, string) Output returned can be XML or JSON. Defaults to JSON.)
        """
        super(SearchJournalEntriesInputSet, self)._set_input('ResponseType', value)
    def set_SortBy(self, value):
        """
        Set the value of the SortBy input for this Choreo. ((optional, string) The order by which to return the results. Acceptable values: newest, oldest, recommendation_count, comment_count. Defaults to newest.)
        """
        super(SearchJournalEntriesInputSet, self)._set_input('SortBy', value)

class SearchJournalEntriesResultSet(ResultSet):
    """
    A ResultSet with methods tailored to the values returned by the SearchJournalEntries Choreo.
    The ResultSet object is used to retrieve the results of a Choreo execution.
    """

    def getJSONFromString(self, str):
        return json.loads(str)

    def get_Response(self):
        """
        Retrieve the value for the "Response" output from this Choreo execution. (The response from Kiva.)
        """
        return self._output.get('Response', None)

class SearchJournalEntriesChoreographyExecution(ChoreographyExecution):

    def _make_result_set(self, response, path):
        return SearchJournalEntriesResultSet(response, path)


text:
package slogo.backend.impl.evaluation;

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

import slogo.backend.evaluation.IEvaluator;
import slogo.backend.evaluation.IExecutionContext;
import slogo.backend.evaluation.MalformedSyntaxException;
import slogo.backend.parsing.ISyntaxNode;

public class Evaluator implements IEvaluator {

    @Override
    public IExecutionContext evaluate (ISyntaxNode current, IExecutionContext previous)
            throws MalformedSyntaxException {
        if (current.children().size() == 0) {
            List<IExecutionContext> previousList = new ArrayList<>();
            previousList.add(previous);
            IExecutionContext result = current.operation().execute(previousList, previous, current);
            return result;
        }
        List<IExecutionContext> results = new ArrayList<>();
        for (ISyntaxNode child : current.children()) {
            IExecutionContext result = evaluate(child, previous);
            results.add(result);
        }
        IExecutionContext result = current.operation().execute(results, previous, current);
        return result;
    }
}


text:
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: #EAEAEA;
}

/* Webfont */
@import url(https://fonts.google.com/specimen/Crimson+Text);
@import url(https://fonts.google.com/specimen/Roboto);

/* Navigation */
.container{
    width:100%;
    margin:0 auto;
}
#main-navigation-wrapper * {
    box-sizing: border-box;
    background-color: #2D2D2D;
}
#main-navigation {
    display:block;
    font-family: 'Crimson Text', serif;
    font-size:14pt;
}
#main-navigation > ul {
    list-style:none;
    margin:0;
    float: right;
}
#main-navigation > ul > li {
    display:block;
    float:left;
}
#main-navigation > ul > li > a {
    display:block;
    text-decoration:none;
    padding:15px 25px;
    color:#FFF;
}
#main-navigation > ul > li > a:hover,
#main-navigation > ul > li > a:focus,
#main-navigation > ul > li.active > a
{
    color:#C9A24B;
    transition:all 360ms ease-in 0s;
}
.logo{
    width: 150px;
    align: left;
    padding: 10px;
}
.footer-wrapper{
  box-sizing: border-box;
  background-color: #2D2D2D;
  color: #FFF;
  padding:15px 25px;
  font-size:10pt;
}
#project{
  font-size:14pt;
}
.button {
    display: inline-block;
    font-weight: bold;
    font-size:12pt;
    padding: .25em .5em;
    text-decoration: none;
}
.button--default,
.button--default:active,
.button--default:visited {
    background-color: #C9A24B;
    color: black;
    font-family: 'Roboto';
}
h1{
    font-family: 'Roboto', sans-serif;
    font-weight: bold;
    text-decoration: underline;
    font-size: 24pt;
}
h2{
    font-family: 'Crimson Text', serif;
    font-size: 22pt;
    color: #C9A24B;
}
.teamleden{
    margin: auto;
}
.grid__column-6{
    float: left;
    display: inline-block;
    text-align: center;
    height: 455px;
    background-color: #EAEAEA;
    border: 1px solid #CECECE;
}
p{
    font-size: 12pt;
    line-height: 20pt;
}
.wrapper {
   background-color: #CECECE;
}
.grid__column-12 > ul >li {

   list-style: none;
   float: left;
   display: inline-block;
   padding-top: 20px;
   padding-bottom: 20px;
   padding-left: 70px;
   padding-right: 70px;
   text-align: center;
}
#statistiekentitel{
    color: #000;
}


text:
import React, { Component } from "react";
import { Instructions } from "../../components";

class Activity extends Component {
  render() {
    const { task } = this.props;
    return (

        Task: {task}

        Instructions:
        <Instructions number>{this.props.children}</Instructions>

    );
  }
}

export { Activity };


text:
from six.moves import range

from congress.datalog import base
from congress.datalog import compile
from congress.datalog import topdown
from congress.datalog import unify
from congress.datalog import utility
from congress import exception

##############################################################################
# Concrete Theory: Database
##############################################################################
class Database(topdown.TopDownTheory):
    class Proof(object):
        def __init__(self, binding, rule):
            self.binding = binding
            self.rule = rule

        def __str__(self):
            return "apply({}, {})".format(str(self.binding), str(self.rule))

        def __eq__(self, other):
            result = (self.binding == other.binding and
                      self.rule == other.rule)
            # LOG.debug("Pf: Comparing %s and %s: %s", self, other, result)
            # LOG.debug("Pf: %s == %s is %s",
            #     self.binding, other.binding, self.binding == other.binding)
            # LOG.debug("Pf: %s == %s is %s",
            #     self.rule, other.rule, self.rule == other.rule)
            return result

    class ProofCollection(object):
        def __init__(self, proofs):
            self.contents = list(proofs)

        def __str__(self):
            return '{' + ",".join(str(x) for x in self.contents) + '}'

        def __isub__(self, other):
            if other is None:
                return
            # LOG.debug("PC: Subtracting %s and %s", self, other)
            remaining = []
            for proof in self.contents:
                if proof not in other.contents:
                    remaining.append(proof)
            self.contents = remaining
            return self

        def __ior__(self, other):
            if other is None:
                return
            # LOG.debug("PC: Unioning %s and %s", self, other)
            for proof in other.contents:
                # LOG.debug("PC: Considering %s", proof)
                if proof not in self.contents:
                    self.contents.append(proof)
            return self

        def __getitem__(self, key):
            return self.contents[key]

        def __len__(self):
            return len(self.contents)

        def __ge__(self, iterable):
            for proof in iterable:
                if proof not in self.contents:
                    # LOG.debug("Proof %s makes %s not >= %s",
                    #     proof, self, iterstr(iterable))
                    return False
            return True

        def __le__(self, iterable):
            for proof in self.contents:
                if proof not in iterable:
                    # LOG.debug("Proof %s makes %s not <= %s",
                    #     proof, self, iterstr(iterable))
                    return False
            return True

        def __eq__(self, other):
            return self <= other and other <= self

    class DBTuple(object):
        def __init__(self, iterable, proofs=None):
            self.tuple = tuple(iterable)
            if proofs is None:
                proofs = []
            self.proofs = Database.ProofCollection(proofs)

        def __eq__(self, other):
            return self.tuple == other.tuple

        def __str__(self):
            return str(self.tuple) + str(self.proofs)

        def __len__(self):
            return len(self.tuple)

        def __getitem__(self, index):
            return self.tuple[index]

        def __setitem__(self, index, value):
            self.tuple[index] = value

        def match(self, atom, unifier):
            # LOG.debug("DBTuple matching %s against atom %s in %s",
            #     self, iterstr(atom.arguments), unifier)
            if len(self.tuple) != len(atom.arguments):
                return None
            changes = []
            for i in range(0, len(atom.arguments)):
                val, binding = unifier.apply_full(atom.arguments[i])
                # LOG.debug("val(%s)=%s at %s; comparing to object %s",
                #     atom.arguments[i], val, binding, self.tuple[i])
                if val.is_variable():
                    changes.append(binding.add(
                        val, compile.Term.create_from_python(self.tuple[i]),
                        None))
                else:
                    if val.name != self.tuple[i]:
                        unify.undo_all(changes)
                        return None
            return changes

    def __init__(self, name=None, abbr=None, theories=None, schema=None):
        super(Database, self).__init__(
            name=name, abbr=abbr, theories=theories, schema=schema)
        self.data = {}
        self.kind = base.DATABASE_POLICY_TYPE

    def str2(self):
        def hash2str(h):
            s = "{"
            s += ", ".join(["{} : {}".format(str(key), str(h[key]))
                           for key in h])
            return s

        def hashlist2str(h):
            strings = []
            for key in h:
                s = "{} : ".format(key)
                s += '['
                s += ', '.join([str(val) for val in h[key]])
                s += ']'
                strings.append(s)
            return '{' + ", ".join(strings) + '}'

        return hashlist2str(self.data)

    def __eq__(self, other):
        return self.data == other.data

    def __sub__(self, other):
        def add_tuple(table, dbtuple):
            new = [table]
            new.extend(dbtuple.tuple)
            results.append(new)

        results = []
        for table in self.data:
            if table not in other.data:
                for dbtuple in self.data[table]:
                    add_tuple(table, dbtuple)
            else:
                for dbtuple in self.data[table]:
                    if dbtuple not in other.data[table]:
                        add_tuple(table, dbtuple)
        return results

    def __or__(self, other):
        def add_db(db):
            for table in db.data:
                for dbtuple in db.data[table]:
                    result.insert(compile.Literal.create_from_table_tuple(
                        table, dbtuple.tuple), proofs=dbtuple.proofs)
        result = Database()
        add_db(self)
        add_db(other)
        return result

    def __getitem__(self, key):
        # KEY must be a tablename
        return self.data[key]

    def content(self, tablenames=None):
        """Return a sequence of Literals representing all the table data."""
        results = []
        if tablenames is None:
            tablenames = self.data.keys()
        for table in tablenames:
            if table not in self.data:
                continue
            for dbtuple in self.data[table]:
                results.append(compile.Literal.create_from_table_tuple(
                    table, dbtuple.tuple))
        return results

    def is_noop(self, event):
        """Returns T if EVENT is a noop on the database."""
        # insert/delete same code but with flipped return values
        # Code below is written as insert, except noop initialization.
        if event.is_insert():
            noop = True
        else:
            noop = False
        if event.formula.table.table not in self.data:
            return not noop
        event_data = self.data[event.formula.table.table]
        raw_tuple = tuple(event.formula.argument_names())
        for dbtuple in event_data:
            if dbtuple.tuple == raw_tuple:
                if event.proofs <= dbtuple.proofs:
                    return noop
        return not noop

    def __contains__(self, formula):
        if not compile.is_atom(formula):
            return False
        if formula.table.table not in self.data:
            return False
        event_data = self.data[formula.table.table]
        raw_tuple = tuple(formula.argument_names())
        return any((dbtuple.tuple == raw_tuple for dbtuple in event_data))

    def explain(self, atom):
        if atom.table.table not in self.data or not atom.is_ground():
            return self.ProofCollection([])
        args = tuple([x.name for x in atom.arguments])
        for dbtuple in self.data[atom.table.table]:
            if dbtuple.tuple == args:
                return dbtuple.proofs

    def tablenames(self, body_only=False):
        """Return all table names occurring in this theory."""
        if body_only:
            return []
        return self.data.keys()

    # overloads for TopDownTheory so we can properly use the
    #    top_down_evaluation routines
    def defined_tablenames(self):
        return self.data.keys()

    def head_index(self, table, match_literal=None):
        if table not in self.data:
            return []
        return self.data[table]

    def head(self, thing):
        return thing

    def body(self, thing):
        return []

    def bi_unify(self, dbtuple, unifier1, atom, unifier2, theoryname):
        """THING1 is always a ground DBTuple and THING2 is always an ATOM."""
        return dbtuple.match(atom, unifier2)

    def atom_to_internal(self, atom, proofs=None):
        return atom.table.table, self.DBTuple(atom.argument_names(), proofs)

    def insert(self, atom, proofs=None):
        """Inserts ATOM into the DB.  Returns changes."""
        return self.modify(compile.Event(formula=atom, insert=True,
                                         proofs=proofs))

    def delete(self, atom, proofs=None):
        """Deletes ATOM from the DB.  Returns changes."""
        return self.modify(compile.Event(formula=atom, insert=False,
                                         proofs=proofs))

    def update(self, events):
        """Applies all of EVENTS to the DB.

        Each event is either an insert or a delete.
        """
        changes = []
        for event in events:
            changes.extend(self.modify(event))
        return changes

    def update_would_cause_errors(self, events):
        """Return a list of Policyxception.

        Return a list of PolicyException if we were
        to apply the events EVENTS to the current policy.
        """
        self.log(None, "update_would_cause_errors %s", utility.iterstr(events))
        errors = []
        for event in events:
            if not compile.is_atom(event.formula):
                errors.append(exception.PolicyException(
                    "Non-atomic formula is not permitted: {}".format(
                        str(event.formula))))
            else:
                errors.extend(compile.fact_errors(
                    event.formula, self.theories, self.name))
        return errors

    def modify(self, event):
        """Insert/Delete atom.

        Inserts/deletes ATOM and returns a list of changes that
        were caused. That list contains either 0 or 1 Event.
        """
        assert compile.is_atom(event.formula), "Modify requires Atom"
        atom = event.formula
        self.log(atom.table.table, "Modify: %s", atom)
        if self.is_noop(event):
            self.log(atom.table.table, "Event %s is a noop", event)
            return []
        if event.insert:
            self.insert_actual(atom, proofs=event.proofs)
        else:
            self.delete_actual(atom, proofs=event.proofs)
        return [event]

    def insert_actual(self, atom, proofs=None):
        """Workhorse for inserting ATOM into the DB.

        Along with proofs explaining how ATOM was computed from other tables.
        """
        assert compile.is_atom(atom), "Insert requires Atom"
        table, dbtuple = self.atom_to_internal(atom, proofs)
        self.log(table, "Insert: %s", atom)
        if table not in self.data:
            self.data[table] = [dbtuple]
            self.log(atom.table.table, "First tuple in table %s", table)
            return
        else:
            for existingtuple in self.data[table]:
                assert existingtuple.proofs is not None
                if existingtuple.tuple == dbtuple.tuple:
                    assert existingtuple.proofs is not None
                    existingtuple.proofs |= dbtuple.proofs
                    assert existingtuple.proofs is not None
                    return
            self.data[table].append(dbtuple)

    def delete_actual(self, atom, proofs=None):
        """Workhorse for deleting ATOM from the DB.

        Along with the proofs that are no longer true.
        """
        assert compile.is_atom(atom), "Delete requires Atom"
        self.log(atom.table.table, "Delete: %s", atom)
        table, dbtuple = self.atom_to_internal(atom, proofs)
        if table not in self.data:
            return
        for i in range(0, len(self.data[table])):
            existingtuple = self.data[table][i]
            if existingtuple.tuple == dbtuple.tuple:
                existingtuple.proofs -= dbtuple.proofs
                if len(existingtuple.proofs) == 0:
                    del self.data[table][i]
                return

    def policy(self):
        """Return the policy for this theory.

        No policy in this theory; only data.
        """
        return []

    def get_arity_self(self, tablename):
        if tablename not in self.data:
            return None
        if len(self.data[tablename]) == 0:
            return None
        return len(self.data[tablename][0].tuple)

    def content_string(self):
        s = ""
        for lit in self.content():
            s += str(lit) + '\n'
        return s + '\n'


text:
#include <stddef.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
#include <assert.h>
#include <malloc.h>
#include <string.h>
#include <time.h>
#include <stdarg.h>
#include <signal.h>
#include <pthread.h>
#include <sys/stat.h>
#include <errno.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <netinet/udp.h>
#include <arpa/inet.h>
#include <sys/sendfile.h>
#include <netdb.h>
#include <errno.h>
#include <math.h>

#include <ev.h>

#define VERSION "1.1"

#if (__SIZEOF_POINTER__==8)
typedef uint64_t int_to_ptr;
#else
typedef uint32_t int_to_ptr;
#endif

#define MEM_GUARD 128

struct config {
  int num_connections;
  int num_requests;
  int num_threads;
  int progress_step;
  struct addrinfo *saddr;
  const char* uri_path;
  const char* uri_host;
  char* request_data;
  int request_length;

  int keep_alive:1;
  int secure:1;

  char _padding1[MEM_GUARD]; // guard from false sharing
  volatile int request_counter;
  char _padding2[MEM_GUARD];
};

static struct config config;

enum connection_state {C_CONNECTING, C_WRITING, C_READING};

#define CONN_BUF_SIZE 32768

typedef struct connection {
  struct ev_loop* loop;
  struct thread_config* tdata;
  int fd;
  ev_io watch_read;
  ev_io watch_write;
  ev_tstamp last_activity;

  int write_pos;
  int read_pos;
  int bytes_to_read;
  int bytes_received;
  int alive_count;
  int success_count;
  int time_index;

  int keep_alive:1;
  int done:1;

  char buf[CONN_BUF_SIZE];
  char* body_ptr;

  int id;
  enum connection_state state;
} connection;

typedef struct read_time {
   double delta;
   int wrote;
} read_time;

typedef struct thread_config {
  pthread_t tid;
  connection *conns;
  int id;
  int num_conn;
  struct ev_loop* loop;
  ev_tstamp start_time;
  ev_timer watch_heartbeat;

  int shutdown_in_progress;

  int num_success;
  int num_fail;
  long num_bytes_received;
  long num_overhead_received;
  int num_connect;
  ev_tstamp avg_req_time;

  read_time* read_times;
  int num_times;

} thread_config;

void nxweb_die(const char* fmt, ...) {
  va_list ap;
  fprintf(stderr, "FATAL: ");
  va_start(ap, fmt);
  vfprintf(stderr, fmt, ap);
  va_end(ap);
  fputc('\n', stderr);
  exit(EXIT_FAILURE);
}

static inline const char* get_current_time(char* buf, int max_buf_size) {
  time_t t;
  struct tm tm;
  time(&t);
  localtime_r(&t, &tm);
  strftime(buf, max_buf_size, "%F %T", &tm); // %F=%Y-%m-%d %T=%H:%M:%S
  return buf;
}

void nxweb_log_error(const char* fmt, ...) {
  char cur_time[32];
  va_list ap;

  get_current_time(cur_time, sizeof(cur_time));
  flockfile(stderr);
  fprintf(stderr, "%s [%u:%p]: ", cur_time, getpid(), (void*)pthread_self());
  va_start(ap, fmt);
  vfprintf(stderr, fmt, ap);
  va_end(ap);
  fputc('\n', stderr);
  fflush(stderr);
  funlockfile(stderr);
}

static inline int setup_socket(int fd) {
  int flags=fcntl(fd, F_GETFL);
  if (flags<0) return flags;
  if (fcntl(fd, F_SETFL, flags|=O_NONBLOCK)<0) return -1;

  struct timeval timeout;
  timeout.tv_sec = 15;
  timeout.tv_usec = 0;

  if( setsockopt( fd, SOL_SOCKET, SO_SNDTIMEO, (char*)&timeout, sizeof(timeout) ) < 0 )
     return -1;

  if( setsockopt( fd, SOL_SOCKET, SO_RCVTIMEO, (char*)&timeout, sizeof(timeout) ) < 0 )
     return -1;

  return 0;
}

static inline void _nxweb_close_good_socket(int fd) {
  close(fd);
}

static inline void _nxweb_close_bad_socket(int fd) {
  struct linger linger;
  linger.l_onoff=1;
  linger.l_linger=0; // timeout for completing writes
  setsockopt(fd, SOL_SOCKET, SO_LINGER, &linger, sizeof(linger));
  close(fd);
}

static inline void sleep_ms(int ms) {
  struct timespec req;
  time_t sec=ms/1000;
  ms%=1000;
  req.tv_sec=sec;
  req.tv_nsec=ms*1000000L;
  while(nanosleep(&req, &req)==-1) continue;
}

#define CONN_SUCCESS 1
#define CONN_FAILURE 2

static inline void time_start( connection* conn ) {
  struct timespec ts;
  clock_gettime (CLOCK_REALTIME, &ts);

  conn->time_index = __sync_add_and_fetch( &conn->tdata->num_times, 1 );

  //printf("[%p] open %d\n", conn->tdata, conn->tdata->num_connect);
  conn->tdata->read_times[ conn->time_index ].delta = (double)ts.tv_sec + ((double)ts.tv_nsec * 1e-9);
  conn->tdata->read_times[ conn->time_index ].wrote = 0;
}

static inline void time_end( connection* conn, int status ) {

   if( conn->tdata->read_times[ conn->time_index ].wrote == 0 ) {
      conn->tdata->read_times[ conn->time_index ].wrote = status;

      struct timespec ts;
      clock_gettime (CLOCK_REALTIME, &ts);

      conn->tdata->read_times[ conn->time_index ].delta = (double)ts.tv_sec + ((double)ts.tv_nsec * 1e-9) - conn->tdata->read_times[ conn->time_index ].delta;
      //printf( "[%p] delta[%d] = %ld\n", conn->tdata, conn->time_index, conn->tdata->read_times[ conn->time_index ].delta );
   }
}

static inline void inc_success(connection* conn) {
  conn->success_count++;
  conn->tdata->num_success++;
  conn->tdata->num_bytes_received+=conn->bytes_received;
  conn->tdata->num_overhead_received+=(conn->body_ptr-conn->buf);

  time_end( conn, CONN_SUCCESS );
}

static inline void inc_fail(connection* conn) {
  conn->tdata->num_fail++;

  time_end( conn, CONN_FAILURE );
}

static inline void inc_connect(connection* conn) {
  conn->tdata->num_connect++;
  time_start( conn );
}

enum {ERR_AGAIN=-2, ERR_ERROR=-1, ERR_RDCLOSED=-3};

static inline ssize_t conn_read(connection* conn, void* buf, size_t size) {
   ssize_t ret=read(conn->fd, buf, size);
   if (ret>0) return ret;
   if (ret==0) return ERR_RDCLOSED;
   if (errno==EAGAIN) return ERR_AGAIN;
   return ERR_ERROR;
}

static inline ssize_t conn_write(connection* conn, void* buf, size_t size) {
   ssize_t ret=write(conn->fd, buf, size);
   if (ret>=0) return ret;
   if (errno==EAGAIN) return ERR_AGAIN;
   return ERR_ERROR;
}

static inline void conn_close(connection* conn, int good) {
  if (good) _nxweb_close_good_socket(conn->fd);
  else _nxweb_close_bad_socket(conn->fd);
}

static int open_socket(connection* conn);
static void rearm_socket(connection* conn);

static void write_cb(struct ev_loop *loop, ev_io *w, int revents) {
  connection *conn=((connection*)(((char*)w)-offsetof(connection, watch_write)));

  if (conn->state==C_CONNECTING) {
    conn->last_activity=ev_now(loop);
    conn->state=C_WRITING;
  }

  if (conn->state==C_WRITING) {
    int bytes_avail, bytes_sent;
    do {
      bytes_avail=config.request_length-conn->write_pos;
      if (!bytes_avail) {
        conn->state=C_READING;
        conn->read_pos=0;
        ev_io_stop(conn->loop, &conn->watch_write);
        //ev_io_set(&conn->watch_read, conn->fd, EV_READ);
        ev_io_start(conn->loop, &conn->watch_read);
        ev_feed_event(conn->loop, &conn->watch_read, EV_READ);
        return;
      }
      bytes_sent=conn_write(conn, config.request_data+conn->write_pos, bytes_avail);
      if (bytes_sent<0) {
        if (bytes_sent!=ERR_AGAIN) {
          strerror_r(errno, conn->buf, CONN_BUF_SIZE);
          nxweb_log_error("[%d] conn_write() returned %d: %d %s; sent %d of %d bytes total", conn->id, bytes_sent, errno, conn->buf, conn->write_pos, config.request_length);
          conn_close(conn, 0);
          inc_fail(conn);
          open_socket(conn);
          return;
        }
        return;
      }
      if (bytes_sent) conn->last_activity=ev_now(loop);
      conn->write_pos+=bytes_sent;
    } while (bytes_sent==bytes_avail);
    return;
  }
}

static void read_cb(struct ev_loop *loop, ev_io *w, int revents) {
  connection *conn=((connection*)(((char*)w)-offsetof(connection, watch_read)));

  if (conn->state==C_READING) {
    int room_avail, bytes_received;

    do {
      room_avail=CONN_BUF_SIZE;
      if (conn->bytes_to_read>0) {
        int bytes_left=conn->bytes_to_read - conn->bytes_received;
        if (bytes_left<room_avail) room_avail=bytes_left;
      }
      bytes_received=conn_read(conn, conn->buf, room_avail);
      if (bytes_received<=0) {
        if (bytes_received==ERR_AGAIN) return;
        if (bytes_received==ERR_RDCLOSED) {
          nxweb_log_error("body [%d] read connection closed", conn->alive_count);
          conn_close(conn, 0);
          inc_fail(conn);
          open_socket(conn);
          return;
        }
        strerror_r(errno, conn->buf, CONN_BUF_SIZE);
        nxweb_log_error("body [%d] conn_read() returned %d error: %d %s", conn->alive_count, bytes_received, errno, conn->buf);
        conn_close(conn, 0);
        inc_fail(conn);
        open_socket(conn);
        return;
      }

      conn->last_activity=ev_now(loop);
      conn->bytes_received+=bytes_received;
      if (conn->bytes_received>=conn->bytes_to_read) {
         // read all
         rearm_socket(conn);
         return;
      }

    } while (bytes_received==room_avail);
    return;
  }
}

static void shutdown_thread(thread_config* tdata) {
  int i;
  connection* conn;
  ev_tstamp now=ev_now(tdata->loop);
  ev_tstamp time_limit=5.;

  //fprintf(stderr, "[%.6lf]", time_limit);
  for (i=0; i<tdata->num_conn; i++) {
    conn=&tdata->conns[i];
    if (!conn->done) {
      if (ev_is_active(&conn->watch_read) || ev_is_active(&conn->watch_write)) {

        if ( (now - conn->last_activity) > time_limit) {
          // kill this connection
          if (ev_is_active(&conn->watch_write)) ev_io_stop(conn->loop, &conn->watch_write);
          if (ev_is_active(&conn->watch_read)) ev_io_stop(conn->loop, &conn->watch_read);
          conn_close(conn, 0);
          nxweb_log_error("forcibly shutting down [%p] : %d : %d", tdata, conn->id, conn->fd);
          inc_fail(conn);
          conn->done=1;
          //fprintf(stderr, "*");
        }
        else {
          // don't kill this yet, but wake it up
          if (ev_is_active(&conn->watch_read)) {
            ev_feed_event(tdata->loop, &conn->watch_read, EV_READ);
          }
          if (ev_is_active(&conn->watch_write)) {
            ev_feed_event(tdata->loop, &conn->watch_write, EV_WRITE);
          }
          //fprintf(stderr, ".");
        }
      }
      else {
         conn->done = 1;
      }
    }
  }
}

static int more_requests_to_run() {
  int rc=__sync_add_and_fetch(&config.request_counter, 1);
  if (rc>config.num_requests) {
    return 0;
  }
  if (config.progress_step>=10 && (rc%config.progress_step==0 || rc==config.num_requests)) {
    printf("%d requests launched\n", rc);
  }
  return rc;
}

static void heartbeat_cb(struct ev_loop *loop, ev_timer *w, int revents) {
  if (config.request_counter>config.num_requests) {
    thread_config *tdata=((thread_config*)(((char*)w)-offsetof(thread_config, watch_heartbeat)));
    if (!tdata->shutdown_in_progress) {
      ev_tstamp now=ev_now(tdata->loop);
      tdata->avg_req_time=tdata->num_success? (now-tdata->start_time) * tdata->num_conn / tdata->num_success : 0.1;
      if (tdata->avg_req_time>1.) tdata->avg_req_time=1.;
      tdata->shutdown_in_progress=1;
      printf("shutdown thread\n");
    }
    shutdown_thread(tdata);
  }
}

static void rearm_socket(connection* conn) {
  if (ev_is_active(&conn->watch_write)) ev_io_stop(conn->loop, &conn->watch_write);
  if (ev_is_active(&conn->watch_read)) ev_io_stop(conn->loop, &conn->watch_read);

  inc_success(conn);

  if (!config.keep_alive || !conn->keep_alive) {
    conn_close(conn, 1);
    open_socket(conn);
  }
  else {
    int nc = more_requests_to_run();
    if (!nc) {
      conn_close(conn, 1);
      conn->done=1;
      ev_feed_event(conn->tdata->loop, &conn->tdata->watch_heartbeat, EV_TIMER);
      return;
    }
    conn->alive_count++;
    conn->state=C_WRITING;
    conn->write_pos=0;
    conn->id = nc;
    time_start(conn);
    ev_io_start(conn->loop, &conn->watch_write);
    ev_feed_event(conn->loop, &conn->watch_write, EV_WRITE);
  }
}

static int open_socket(connection* conn) {

  if (ev_is_active(&conn->watch_write)) ev_io_stop(conn->loop, &conn->watch_write);
  if (ev_is_active(&conn->watch_read)) ev_io_stop(conn->loop, &conn->watch_read);

  int nc = more_requests_to_run();
  if (!nc) {
    conn->done=1;
    ev_feed_event(conn->tdata->loop, &conn->tdata->watch_heartbeat, EV_TIMER);
    return 1;
  }

  inc_connect(conn);
  conn->id = nc;
  conn->fd=socket(config.saddr->ai_family, config.saddr->ai_socktype, config.saddr->ai_protocol);
  if (conn->fd==-1) {
    strerror_r(errno, conn->buf, CONN_BUF_SIZE);
    nxweb_log_error("can't open socket [%d] %s", errno, conn->buf);
    return -1;
  }
  if (setup_socket(conn->fd)) {
    nxweb_log_error("can't setup socket");
    return -1;
  }
  if (connect(conn->fd, config.saddr->ai_addr, config.saddr->ai_addrlen)) {
    if (errno!=EINPROGRESS && errno!=EALREADY && errno!=EISCONN) {
      nxweb_log_error("can't connect %d", errno);
      return -1;
    }
  }

  conn->state=C_CONNECTING;
  conn->write_pos=0;
  conn->alive_count=0;
  conn->done=0;
  ev_io_set(&conn->watch_write, conn->fd, EV_WRITE);
  ev_io_set(&conn->watch_read, conn->fd, EV_READ);
  ev_io_start(conn->loop, &conn->watch_write);
  ev_feed_event(conn->loop, &conn->watch_write, EV_WRITE);
  return 0;
}

static void* thread_main(void* pdata) {

  thread_config* tdata=(thread_config*)pdata;

  ev_timer_init(&tdata->watch_heartbeat, heartbeat_cb, 0.1, 0.1);
  ev_timer_start(tdata->loop, &tdata->watch_heartbeat);
  ev_unref(tdata->loop); // don't keep loop running just for heartbeat
  ev_run(tdata->loop, 0);

  ev_loop_destroy(tdata->loop);

  if (config.num_threads>1) {
    printf("thread %d: %d connect, %d requests, %d success, %d fail, %ld bytes, %ld overhead\n",
         tdata->id, tdata->num_connect, tdata->num_success+tdata->num_fail,
         tdata->num_success, tdata->num_fail, tdata->num_bytes_received,
         tdata->num_overhead_received);
  }

  return 0;
}

static int resolve_host(struct addrinfo** saddr, const char *host_and_port) {
  char* host=strdup(host_and_port);
  char* port=strchr(host, ':');
  if (port) *port++='\0';
  else port=config.secure? "443":"80";

	struct addrinfo hints, *res, *res_first, *res_last;

	memset(&hints, 0, sizeof(hints));
	hints.ai_family=PF_UNSPEC;
	hints.ai_socktype=SOCK_DGRAM;

	if (getaddrinfo(host, port, &hints, &res_first)) goto ERR1;

	// search for an ipv4 address, no ipv6 yet
	res_last=0;
	for (res=res_first; res; res=res->ai_next) {
		if (res->ai_family==AF_INET) break;
		res_last=res;
	}

	if (!res) goto ERR2;
	if (res!=res_first) {
		// unlink from list and free rest
		res_last->ai_next = res->ai_next;
		freeaddrinfo(res_first);
		res->ai_next=0;
	}

  free(host);
  *saddr=res;
	return 0;

ERR2:
	freeaddrinfo(res_first);
ERR1:
  free(host);
  return -1;
}

static void show_help(void) {
	printf( "httpress <options> <url>\n"
          "  -n num         number of requests     (default: 1)\n"
          "  -t num         number of threads      (default: 1)\n"
          "  -c num         concurrent connections (default: 1)\n"
          "  -k             keep socket open       (default: no)\n"
          "  -h             show this help\n"
          "  -R file        File containing raw information to send\n"
          //"  -v       show version\n"
          "\n"
          "example: httpress -n 10000 -c 100 -t 4 -k localhost:8080\n\n");
}

static char host_buf[1024];

int time_compar( const void* a1, const void* a2 ) {
   if( ((read_time*)a1)->delta < ((read_time*)a2)->delta )
      return -1;
   if( ((read_time*)a1)->delta > ((read_time*)a2)->delta )
      return 1;
   return 0;
}

static int parse_uri(const char* uri) {
  const char* p=strchr(uri, '/');
  if (!p) {
    config.uri_host=uri;
    config.uri_path="/";
    return 0;
  }
  if ((p-uri)>sizeof(host_buf)-1) return -1;
  strncpy(host_buf, uri, (p-uri));
  host_buf[(p-uri)]='\0';
  config.uri_host=host_buf;
  config.uri_path=p;
  return 0;
}

int main(int argc, char* argv[]) {

  config.num_connections=1;
  config.num_requests=1;
  config.num_threads=1;
  config.keep_alive=0;
  config.uri_path=0;
  config.uri_host=0;
  config.request_counter=0;

  char const* raw_file = NULL;

  int c;
  while ((c=getopt(argc, argv, ":hvkn:t:c:z:R:"))!=-1) {
    switch (c) {
      case 'h':
        show_help();
        return 0;
      case 'v':
        printf("version:    " VERSION "\n");
        printf("build-date: " __DATE__ " " __TIME__ "\n\n");
        return 0;
      case 'k':
        config.keep_alive=1;
        break;
      case 'n':
        config.num_requests=atoi(optarg);
        break;
      case 't':
        config.num_threads=atoi(optarg);
        break;
      case 'c':
        config.num_connections=atoi(optarg);
        break;
      case 'R':
        raw_file=optarg;
        break;
      case '?':
        fprintf(stderr, "unkown option: -%c\n\n", optopt);
        show_help();
        return EXIT_FAILURE;
    }
  }

  if ((argc-optind)<1) {
    fprintf(stderr, "missing url argument\n\n");
    show_help();
    return EXIT_FAILURE;
  }
  else if ((argc-optind)>1) {
    fprintf(stderr, "too many arguments\n\n");
    show_help();
    return EXIT_FAILURE;
  }

  if (config.num_requests<1 || config.num_requests>1000000000) nxweb_die("wrong number of requests");
  if (config.num_connections<1 || config.num_connections>1000000 || config.num_connections>config.num_requests) nxweb_die("wrong number of connections");
  if (config.num_threads<1 || config.num_threads>100000 || config.num_threads>config.num_connections) nxweb_die("wrong number of threads");

  config.progress_step=config.num_requests/4;
  if (config.progress_step>50000) config.progress_step=50000;

  if (parse_uri(argv[optind])) nxweb_die("can't parse url: %s", argv[optind]);

  // Block signals for all threads
  sigset_t set;
  sigemptyset(&set);
  sigaddset(&set, SIGTERM);
  sigaddset(&set, SIGPIPE);
  sigaddset(&set, SIGINT);
  sigaddset(&set, SIGQUIT);
  sigaddset(&set, SIGHUP);
  if (pthread_sigmask(SIG_BLOCK, &set, NULL)) {
    nxweb_log_error("can't set pthread_sigmask");
    exit(EXIT_FAILURE);
  }

  if (resolve_host(&config.saddr, config.uri_host)) {
    nxweb_log_error("can't resolve host %s", config.uri_host);
    exit(EXIT_FAILURE);
  }

  if( raw_file ) {
      FILE* raw_fh = fopen( raw_file, "r" );
      if( !raw_fh ) {
         int errsv = errno;
         nxweb_log_error("Could not open %s, errno = %d\n", raw_file, errsv );
         exit(1);
      }

      struct stat sb;
      int rc = fstat( fileno(raw_fh), &sb );
      if( rc != 0 ) {
         int errsv = errno;
         nxweb_log_error("Could not stat %s, errno = %d\n", raw_file, errsv );
         exit(1);
      }

      config.request_data = calloc( sb.st_size, 1 );
      fread( config.request_data, 1, sb.st_size, raw_fh );
      config.request_length = sb.st_size;
      fclose( raw_fh );
  }
  else {
     config.request_data = calloc( 8192, 1 );
     config.request_length=1;
  }

  printf("<<<<<<<<<<<<<< %d <<<<<<<<<<<<<<\n%s\n<<<<<<<<<<<<<< %d <<<<<<<<<<<<<<\n", config.request_length, config.request_data, config.request_length );

  thread_config** threads=calloc(config.num_threads, sizeof(thread_config*));
  if (!threads) nxweb_die("can't allocate thread pool");

  ev_tstamp ts_start=ev_time();
  int i, j;
  int conns_allocated=0;
  thread_config* tdata;
  for (i=0; i<config.num_threads; i++) {
    threads[i]=
    tdata=memalign(MEM_GUARD, sizeof(thread_config)+MEM_GUARD);
    if (!tdata) nxweb_die("can't allocate thread data");
    memset(tdata, 0, sizeof(thread_config));
    tdata->id=i+1;
    tdata->start_time=ts_start;
    tdata->num_conn=(config.num_connections-conns_allocated)/(config.num_threads-i);
    conns_allocated+=tdata->num_conn;
    tdata->conns=memalign(MEM_GUARD, tdata->num_conn*sizeof(connection)+MEM_GUARD);
    if (!tdata->conns) nxweb_die("can't allocate thread connection pool");
    memset(tdata->conns, 0, tdata->num_conn*sizeof(connection));

    tdata->read_times=memalign(MEM_GUARD, config.num_requests*sizeof(read_time)+MEM_GUARD);
    if (!tdata->read_times) nxweb_die("can't allocate thread read times");
    memset(tdata->read_times, 0, config.num_requests*sizeof(read_time));

    tdata->loop=ev_loop_new(0);

    connection* conn;
    for (j=0; j<tdata->num_conn; j++) {
      conn=&tdata->conns[j];
      conn->tdata=tdata;
      conn->loop=tdata->loop;
      ev_io_init(&conn->watch_write, write_cb, -1, EV_WRITE);
      ev_io_init(&conn->watch_read, read_cb, -1, EV_READ);
      open_socket(conn);
    }

    pthread_create(&tdata->tid, 0, thread_main, tdata);
    //sleep_ms(10);
  }

  // Unblock signals for the main thread;
  // other threads have inherited sigmask we set earlier
  sigdelset(&set, SIGPIPE); // except SIGPIPE
  if (pthread_sigmask(SIG_UNBLOCK, &set, NULL)) {
    nxweb_log_error("can't unset pthread_sigmask");
    exit(EXIT_FAILURE);
  }

  int total_success=0;
  int total_fail=0;
  long total_bytes=0;
  long total_overhead=0;
  int total_connect=0;

  for (i=0; i<config.num_threads; i++) {
    tdata=threads[i];
    pthread_join(threads[i]->tid, 0);
    total_success+=tdata->num_success;
    //total_success+=tdata->num_connect;
    total_fail+=tdata->num_fail;
    total_bytes+=tdata->num_bytes_received;
    total_overhead+=tdata->num_overhead_received;
    total_connect+=tdata->num_connect;
  }

  int real_concurrency=0;
  int real_concurrency1=0;
  int real_concurrency1_threshold=config.num_requests/config.num_connections/10;
  if (real_concurrency1_threshold<2) real_concurrency1_threshold=2;
  for (i=0; i<config.num_threads; i++) {
    tdata=threads[i];
    for (j=0; j<tdata->num_conn; j++) {
      connection* conn=&tdata->conns[j];
      if (conn->success_count) real_concurrency++;
      if (conn->success_count>=real_concurrency1_threshold) real_concurrency1++;
    }
  }

  ev_tstamp ts_end=ev_time();
  if (ts_end<=ts_start) ts_end=ts_start+0.00001;
  ev_tstamp duration=ts_end-ts_start;
  int sec=duration;
  duration=(duration-sec)*1000;
  int millisec=duration;
  duration=(duration-millisec)*1000;
  //int microsec=duration;
  int rps=total_success/(ts_end-ts_start);
  int kbps=(total_bytes+total_overhead) / (ts_end-ts_start) / 1024;
  ev_tstamp avg_req_time=total_success? (ts_end-ts_start) * config.num_connections / total_success : 0;

  printf("\nTOTALS:  %d connect, %d requests, %d success, %d fail, %d (%d) real concurrency\n",
         total_connect, total_success+total_fail, total_success, total_fail, real_concurrency, real_concurrency1);
  printf("TRAFFIC: %ld avg bytes, %ld avg overhead, %ld bytes, %ld overhead\n",
         total_success?total_bytes/total_success:0L, total_success?total_overhead/total_success:0L, total_bytes, total_overhead);
  printf("TIMING:  %d.%03d seconds, %d rps, %d kbps, %.1f ms avg req time\n",
         sec, millisec, /*microsec,*/ rps, kbps, (float)(avg_req_time*1000));

  size_t num_xfer = total_success + total_fail;
  printf(" total transfers = %ld\n", num_xfer );

  read_time* all_times = calloc( num_xfer * sizeof(read_time), 1 );
  int k = 0;
  for( i = 0; i < config.num_threads; i++ ) {
     for( j = 0; j < threads[i]->num_times; j++ ) {
        all_times[k] = threads[i]->read_times[j];
        k++;
     }
  }

  double total = 0;
  qsort( all_times, num_xfer, sizeof(read_time), time_compar );

  FILE* f = fopen( "all-time.txt", "w" );
  for( i = 0; i < num_xfer; i++ ) {
     total += all_times[i].delta;

     char c = 'U';
     if( all_times[i].wrote == CONN_SUCCESS )
        c = 'S';
     else if( all_times[i].wrote == CONN_FAILURE )
        c = 'F';

     fprintf( f, "%c %lf\n", c, all_times[i].delta );
  }
  fclose( f );

  total /= num_xfer;

  printf("All-time average (ms):   %lf\n", total * 1000 );
  printf("All-time median (ms):    %lf\n", all_times[ num_xfer / 2 ].delta * 1000 );
  printf("All-time 90th time (ms): %lf\n", all_times[ num_xfer * 9 / 10 ].delta * 1000 );
  printf("All-time 99th time (ms): %lf\n", all_times[ num_xfer * 99 / 100 ].delta * 1000 );

  freeaddrinfo(config.saddr);
  for (i=0; i<config.num_threads; i++) {
    tdata=threads[i];
    free(tdata->conns);
    free(tdata);
  }
  free(threads);

  return EXIT_SUCCESS;
}


text:
package main

import (
	"os"
	"testing"
)

func cleanBuildTargetDir(path string) {
	os.RemoveAll(path)
}

func TestCreateBuildTargetDir(t *testing.T) {
	targetDir := "test_tmp_dir"
	err := createBuildTargetDir(targetDir)
	if err != nil {
		t.Fatal(err)
	}
	defer cleanBuildTargetDir(targetDir)

	s, err := os.Stat(targetDir)
	if err != nil {
		t.Fatal(err)
	}
	if s.Name() != targetDir {
		t.Errorf("expected %s but got %s", targetDir, s.Name())
	}
}

func TestBuilderBuild(t *testing.T) {
	targetDir := "test_tmp_dir"
	err := createBuildTargetDir(targetDir)
	if err != nil {
		t.Fatal(err)
	}
	defer cleanBuildTargetDir(targetDir)

	os.Setenv("WBS_TEST_SERVER_ROOT", "test_tmp_dir")
	config, err := NewConfig("./wbs.example.toml")
	if err != nil {
		t.Fatal(err)
	}
	builder, err := NewBuilder(config)
	if err != nil {
		t.Fatal(err)
	}

	if err := builder.Build(); err != nil {
		t.Errorf("failed to execute: %s", err)
	}
}


text:
/**
 * @author Richard Searle
 */
package cognitiveentity.xml.sax.interop

import _root_.org.specs2.mutable._

import java.io._
import javax.xml.parsers._
import javax.xml.transform._
import javax.xml.transform.sax._
import javax.xml.transform.stream._
import scala.xml._

object dumper extends Specification {

  "complex" in {
    val xml = <Outside> <Y xmlns="http://y"/> <X a="12" c="21" xmlns:h="http://com.com" xmlns:q="http://q"  >xxx < <y xmlns:g="http://example.com"  h:b="13"/> </X> </Outside>
    """<Outside> <Y xmlns="http://y"></Y> <X c="21" a="12" xmlns:q="http://q" xmlns:h="http://com.com">xxx < <y h:b="13" xmlns:g="http://example.com"></y> </X> </Outside>""" must beEqualTo (xml.toString)
    """<?xml version="1.0" encoding="UTF-8"?><Outside> <Y xmlns="http://y"/> <X xmlns:q="http://q" xmlns:h="http://com.com" c="21" a="12">xxx < <y xmlns:g="http://example.com" h:b="13"/> </X> </Outside>""" must beEqualTo (gen(xml))

  }

  "simple" in {
    val xml = <Outside></Outside>
    """<?xml version="1.0" encoding="UTF-8"?><Outside/>""" must beEqualTo(gen(xml) )
  }

  "comment" in {
    val xml = <Outside><!--comment--></Outside>
    """<?xml version="1.0" encoding="UTF-8"?><Outside><!--comment--></Outside>""" must beEqualTo(gen(xml) )
  }

  "simple with blank PCDATA" in {
    val xml = <Outside> </Outside>
    """<?xml version="1.0" encoding="UTF-8"?><Outside> </Outside>""" must beEqualTo(gen(xml) )
  }

  "simple with PI" in {
    val xml = <Outside><?name pidata?></Outside>
    """<Outside><?name pidata?></Outside>""" must beEqualTo(xml toString)
    """<?xml version="1.0" encoding="UTF-8"?><Outside><?name pidata?></Outside>""" must beEqualTo(gen(xml) )
  }

  "simple with CDATA" in {
    val xml = <Outside>{PCData("xxxx")}</Outside>
    """<Outside><![CDATA[xxxx]]></Outside>""" must beEqualTo(xml toString)
    """<?xml version="1.0" encoding="UTF-8"?><Outside><![CDATA[xxxx]]></Outside>""" must beEqualTo(gen(xml) )
  }

   "simple with <" in {
    val xml = <Outside><</Outside>
    """<Outside><</Outside>""" must beEqualTo(xml toString)
    """<?xml version="1.0" encoding="UTF-8"?><Outside><</Outside>""" must beEqualTo(gen(xml) )
  }

   "simple with EntityRef" in {
    val xml = <Outside>{EntityRef("lt")}</Outside>
    """<Outside><</Outside>""" must beEqualTo(xml toString)
    """<?xml version="1.0" encoding="UTF-8"?><Outside><</Outside>""" must beEqualTo(gen(xml) )
  }

  private def gen(xml:scala.xml.Elem) =  {
    val transformerFactory = (TransformerFactory.newInstance).asInstanceOf[SAXTransformerFactory]
    val xformer = transformerFactory.newTransformerHandler
    val sw = new StringWriter
    xformer.setResult(new StreamResult(sw))

    val dumper = new XMLDumper(xformer)

    dumper.toXML(xml)

    sw.toString
  }

}


text:
package de.ppi.samples.fuwesta.dbunit;

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

/**
 * Testclass to generate some files.
 *
 */

public class ProjectSetup extends AbstractFuWeStaSampleDbUnitTest {

    /**
     * Print all TableNames.
     *
     * @throws Exception if something goes wrong.
     */
    @Test
    @Ignore("Only for project-setup")
    public void printTableNames() throws Exception {
        getFuWeStaSampleDatabase().printTableNames();
    }

    /**
     * @see de.ppi.samples.fuwesta.dbunit.FuWeStaSampleDatabase#generateRowBuilder()
     */
    @Test
    @Ignore("Only for project-setup")
    public void generateRowBuilder() {
        getFuWeStaSampleDatabase().generateRowBuilder();
    }

    /**
     * @see de.ppi.samples.fuwesta.dbunit.FuWeStaSampleDatabase#generateRowBuilder()
     */
    @Test
    @Ignore("Only for project-setup")
    public void dumpData() {
        getFuWeStaSampleDatabase().dumpResult("Dump");
    }

}