// Copyright (c) 2014, Oracle and/or its affiliates.

// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle

// Licensed under the Boost Software License version 1.0.
// http://www.boost.org/users/license.html

#include <test_geometries/custom_lon_lat_point.hpp>

#include <boost/geometry/core/cs.hpp>
#include <boost/geometry/geometries/point.hpp>
#include <boost/geometry/geometries/concepts/check.hpp>

namespace bg = boost::geometry;

template <typename CoordinateSystem>
inline void test_coordinate_system()
{
    typedef bg::model::point<double, 2, CoordinateSystem> bg_double_point;
    typedef bg::model::point<int, 2, CoordinateSystem> bg_int_point;

    typedef rw_lon_lat_point<double, CoordinateSystem> rw_double_point;
    typedef ro_lon_lat_point<double, CoordinateSystem> ro_double_point;

    typedef rw_lon_lat_point<int, CoordinateSystem> rw_int_point;
    typedef ro_lon_lat_point<int, CoordinateSystem> ro_int_point;

    bg::concept::check<bg_int_point>();
    bg::concept::check<bg_int_point const>();

    bg::concept::check<bg_double_point>();
    bg::concept::check<bg_double_point const>();

    bg::concept::check<rw_int_point>();
    bg::concept::check<rw_int_point const>();
    bg::concept::check<ro_int_point const>();

    bg::concept::check<rw_double_point>();
    bg::concept::check<rw_double_point const>();
    bg::concept::check<ro_double_point const>();
}

int main()
{
    test_coordinate_system<bg::cs::geographic<bg::degree> >();
    test_coordinate_system<bg::cs::geographic<bg::radian> >();

    test_coordinate_system<bg::cs::spherical<bg::degree> >();
    test_coordinate_system<bg::cs::spherical<bg::radian> >();

    test_coordinate_system<bg::cs::spherical_equatorial<bg::degree> >();
    test_coordinate_system<bg::cs::spherical_equatorial<bg::radian> >();

    test_coordinate_system<bg::cs::polar<bg::degree> >();
    test_coordinate_system<bg::cs::polar<bg::radian> >();

    return 0;
}


package com.kerchin.yellownote.data.event;

/**
 * Created by hkq325800 on 2016/12/7.
 */

public class NoteDeleteErrorEvent {
    public String getStr() {
        return str;
    }

    public void setStr(String str) {
        this.str = str;
    }

    private String str;

    public NoteDeleteErrorEvent(String str) {
        this.str = str;
    }
}


class Room

  attr_accessor :name, :description, :paths

  def initialize(name, description)
    @name = name
    @description = description
    @paths = {}
  end

  def go(direction)
    @paths[direction]
  end

  def add_paths(paths)
    @paths.update(paths)
  end

end

central_corridor = Room.new("Central Corridor",
%q{
The Gothons of Planet Percal #25 have invaded your ship and destroyed
your entire crew.  You are the last surviving member and your last
mission is to get the neutron destruct bomb from the Weapons Armory,
put it in the bridge, and blow the ship up after getting into an
escape pod.

You're running down the central corridor to the Weapons Armory when
a Gothon jumps out, red scaly skin, dark grimy teeth, and evil clown costume
flowing around his hate filled body.  He's blocking the door to the
Armory and about to pull a weapon to blast you.
})

laser_weapon_armory = Room.new("Laser Weapon Armory",
%q{
  Lucky for you they made you learn Gothon insults in the academy.
You tell the one Gothon joke you know:
Lbhe zbgure vf fb sng, jura fur fvgf nebhaq gur ubhfr, fur fvgf nebhaq gur ubhfr.
The Gothon stops, tries not to laugh, then busts out laughing and can't move.
While he's laughing you run up and shoot him square in the head
putting him down, then jump through the Weapon Armory door.

You do a dive roll into the Weapon Armory, crouch and scan the room
for more Gothons that might be hiding.  It's dead quiet, too quiet.
You stand up and run to the far side of the room and find the
neutron bomb in its container.  There's a keypad lock on the box
and you need the code to get the bomb out.  If you get the code
wrong 10 times then the lock closes forever and you can't
get the bomb.  The code is 3 digits.
})

the_bridge = Room.new("The Bridge",
%q{
The container clicks open and the seal breaks, letting gas out.
You grab the neutron bomb and run as fast as you can to the
bridge where you must place it in the right spot.

You burst onto the Bridge with the neutron destruct bomb
under your arm and surprise 5 Gothons who are trying to
take control of the ship.  Each of them has an even uglier
clown costume than the last.  They haven't pulled their
weapons out yet, as they see the active bomb under your
arm and don't want to set it off.
})

escape_pod = Room.new("Escape Pod",
%q{
You point your blaster at the bomb under your arm
and the Gothons put their hands up and start to sweat.
You inch backward to the door, open it, and then carefully
place the bomb on the floor, pointing your blaster at it.
You then jump back through the door, punch the close button
and blast the lock so the Gothons can't get out.
Now that the bomb is placed you run to the escape pod to
get off this tin can.

You rush through the ship desperately trying to make it to
the escape pod before the whole ship explodes.  It seems like
hardly any Gothons are on the ship, so your run is clear of
interference.  You get to the chamber with the escape pods, and
now need to pick one to take.  Some of them could be damaged
but you don't have time to look.  There's 5 pods, which one
do you take?
})

the_end_winner = Room.new("The End",
%q{
You jump into pod 2 and hit the eject button.
The pod easily slides out into space heading to
the planet below.  As it flies to the planet, you look
back and see your ship implode then explode like a
bright star, taking out the Gothon ship at the same
time.  You won!
})

the_end_loser = Room.new("The End",
%q{
You jump into a random pod and hit the eject button.
The pod escapes out into the void of space, then
implodes as the hull ruptures, crushing your body
into jam jelly.
})

escape_pod.add_paths({
  '2' => the_end_winner,
  '*' => the_end_loser
})

central_corridor_shoot = Room.new("Death",
%q{
Quick on the draw you yank out your blaster and fire it at the Gothon.
His clown costume is flowing and moving around his body, which throws
off your aim. Your laser hits his costume but misses him entirely. This
completely ruins his brand new costume his mother bought him, which makes
him fly into an insane rage and blast you repeatedly in the face unitl you
are dead. Then he eats you.
})

central_corridor_dodge = Room.new("Death",
%q{
Like a world class boxer you dodge, weave, slip and slide right as the Gothon's
blaster cranks a laser past your head. In the middle of your artful dodge
your foot slips and you bang your head on the metal wall and pass out. You wake up
shortly after only to die as the Gothon stomps on your head and eats you.
})

the_bridge_bomb = Room.new("Death",
%q{
In a panic you throw the bomb at the group of Gothons and make a leap for the
door. Right as you drop it a Gothon shoots you right in hte back killing you.
As you die you see another Gothon frantically tyr to disarm the bomb. You die
knowing they will probably blow up when it goes off.
})

laser_weapon_armory_fail = Room.new("Death",
%q{
The lock buzzes one last time and then you hear a sickening melting sound
as the mechanism is fused together. You decide to sit there, and finally
the Gothons blow up the ship from their ship and you die.
})

the_bridge.add_paths({
  'throw the bomb' => the_bridge_bomb,
  'slowly place the bomb' => escape_pod
})

laser_weapon_armory.add_paths({
  '0132' => the_bridge,
  '*' => laser_weapon_armory_fail
})

central_corridor.add_paths({
  'shoot!' => central_corridor_shoot,
  'dodge!' => central_corridor_dodge,
  'tell a joke' => laser_weapon_armory
})

START = central_corridor

ROOMS = { "central_corridor"         => central_corridor,
          "central_corridor_shoot"   => central_corridor_shoot,
          "central_corridor_dodge"   => central_corridor_dodge,
          "laser_weapon_armory"      => laser_weapon_armory,
          "laser_weapon_armory_fail" => laser_weapon_armory_fail,
          "the_bridge"               => the_bridge,
          "the_bridge_bomb"          => the_bridge_bomb,
          "escape_pod"               => escape_pod,
          "the_end_winner"           => the_end_winner,
          "the_end_loser"            => the_end_loser }


var startgame = function(){
	 location.href = "http:localhost:8080/play";
};


export interface Middleware<T> {
  (context: T, next: ContinuationMiddleware<T>): any
}
export interface ContinuationMiddleware<T> {
  (context?: T, next?: Middleware<T>): any
}

const flatten = <T>(values: Array<T | Array<T>>) => ([] as any).concat(...values) as T[],
  noop = function noop() {
    return Promise.resolve()
  }

function throwIfHasBeenCalled(fn: any) {
  if (fn.__appbuildercalled) {
    throw new Error('Cannot call next more than once')
  }
  return (fn.__appbuildercalled = true)
}

function tryInvokeMiddleware<T>(context: T, middleware: Middleware<T>, next: ContinuationMiddleware<T> = noop) {
  try {
    return Promise.resolve(middleware ? middleware(context, next) : context)
  } catch (error) {
    return Promise.reject(error)
  }
}

export function functionList<T = any>(list: Function | Function[], ...args: any[]): Middleware<T>[] {
  const arrayList = Symbol.iterator in list ? Array.from(list as Function[]) : [list as Function]
  return arrayList.map((x) => {
    return (_: any, next: any) => Promise.resolve(x(...args)).then(next)
  })
}

/**
 * Create a function to invoke all passed middleware functions
 * with a single argument <T>context
 * @param middleware
 */
export function compose<T = any>(...middleware: (Middleware<T> | Middleware<T>[])[]): ContinuationMiddleware<T> {
  return flatten(middleware)
    .filter((x) => {
      if ('function' !== typeof x) {
        throw new TypeError(`${x}, must be a middleware function accpeting (context, next) arguments`)
      }
      return x
    })
    .reduceRight((composed: Middleware<T>, mw: Middleware<T>) => {
      return function (context: T, nextFn: ContinuationMiddleware<T>) {
        const next = () => throwIfHasBeenCalled(next) && composed(context, nextFn)
        return tryInvokeMiddleware(context, mw, next)
      }
    }, tryInvokeMiddleware) as ContinuationMiddleware<T>
}


/**
 * A simple custom row expander that does not add a "+" / "-" column.
 */
Ext.define('ExecDashboard.ux.plugin.RowExpander', {
    extend: 'Ext.grid.plugin.RowExpander',

    alias: 'plugin.ux-rowexpander',

    rowBodyTpl: [
        '
',
            '
',
                '
{paragraph}
',
                '
COLLAPSE
',
            '
',
        '
'
    ],

    // don't add the expander +/- because we will use a custom one instead
    addExpander: Ext.emptyFn,

    addCollapsedCls: {
        fn: function(out, values, parent) {
            var me = this.rowExpander;

            if (!me.recordsExpanded[values.record.internalId]) {
                values.itemClasses.push(me.rowCollapsedCls);
            } else {
                values.itemClasses.push('x-grid-row-expanded');
            }
            this.nextTpl.applyOut(values, out, parent);
        },

        syncRowHeights: function(lockedItem, normalItem) {
            this.rowExpander.syncRowHeights(lockedItem, normalItem);
        },

        // We need a high priority to get in ahead of the outerRowTpl
        // so we can setup row data
        priority: 20000
    }
});


using System;
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Online.Rooms;
using osu.Game.Screens.OnlinePlay;

namespace osu.Game.Tests.Visual.OnlinePlay
{
    /// <summary>
    /// A base test scene for all online play components and screens.
    /// </summary>
    public abstract class OnlinePlayTestScene : ScreenTestScene, IOnlinePlayTestSceneDependencies
    {
        public Bindable<Room> SelectedRoom => OnlinePlayDependencies?.SelectedRoom;
        public IRoomManager RoomManager => OnlinePlayDependencies?.RoomManager;
        public OngoingOperationTracker OngoingOperationTracker => OnlinePlayDependencies?.OngoingOperationTracker;
        public OnlinePlayBeatmapAvailabilityTracker AvailabilityTracker => OnlinePlayDependencies?.AvailabilityTracker;

        /// <summary>
        /// All dependencies required for online play components and screens.
        /// </summary>
        protected OnlinePlayTestSceneDependencies OnlinePlayDependencies => dependencies?.OnlinePlayDependencies;

        private DelegatedDependencyContainer dependencies;

        protected override Container<Drawable> Content => content;
        private readonly Container content;
        private readonly Container drawableDependenciesContainer;

        protected OnlinePlayTestScene()
        {
            base.Content.AddRange(new Drawable[]
            {
                drawableDependenciesContainer = new Container { RelativeSizeAxes = Axes.Both },
                content = new Container { RelativeSizeAxes = Axes.Both },
            });
        }

        protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
        {
            dependencies = new DelegatedDependencyContainer(base.CreateChildDependencies(parent));
            return dependencies;
        }

        [SetUp]
        public void Setup() => Schedule(() =>
        {
            // Reset the room dependencies to a fresh state.
            drawableDependenciesContainer.Clear();
            dependencies.OnlinePlayDependencies = CreateOnlinePlayDependencies();
            drawableDependenciesContainer.AddRange(OnlinePlayDependencies.DrawableComponents);
        });

        /// <summary>
        /// Creates the room dependencies. Called every <see cref="Setup"/>.
        /// </summary>
        /// <remarks>
        /// Any custom dependencies required for online play sub-classes should be added here.
        /// </remarks>
        protected virtual OnlinePlayTestSceneDependencies CreateOnlinePlayDependencies() => new OnlinePlayTestSceneDependencies();

        /// <summary>
        /// A <see cref="IReadOnlyDependencyContainer"/> providing a mutable lookup source for online play dependencies.
        /// </summary>
        private class DelegatedDependencyContainer : IReadOnlyDependencyContainer
        {
            /// <summary>
            /// The online play dependencies.
            /// </summary>
            public OnlinePlayTestSceneDependencies OnlinePlayDependencies { get; set; }

            private readonly IReadOnlyDependencyContainer parent;
            private readonly DependencyContainer injectableDependencies;

            /// <summary>
            /// Creates a new <see cref="DelegatedDependencyContainer"/>.
            /// </summary>
            /// <param name="parent">The fallback <see cref="IReadOnlyDependencyContainer"/> to use when <see cref="OnlinePlayDependencies"/> cannot satisfy a dependency.</param>
            public DelegatedDependencyContainer(IReadOnlyDependencyContainer parent)
            {
                this.parent = parent;
                injectableDependencies = new DependencyContainer(this);
            }

            public object Get(Type type)
                => OnlinePlayDependencies?.Get(type) ?? parent.Get(type);

            public object Get(Type type, CacheInfo info)
                => OnlinePlayDependencies?.Get(type, info) ?? parent.Get(type, info);

            public void Inject<T>(T instance)
                where T : class
                => injectableDependencies.Inject(instance);
        }
    }
}


/*
 * Created on May 6, 2005
 *
 */
namespace NPOI.SS.Formula.Functions
{
    using System;
    using NPOI.SS.Formula.Eval;

    /**
     * @author Amol S. Deshmukh < amolweb at ya hoo dot com >
     *
     */
    internal class True : Fixed0ArgFunction
    {
        public override ValueEval Evaluate(int srcRowIndex, int srcColumnIndex)
        {
            return BoolEval.TRUE;
        }

    }
}


#include "BaseLibInternals.h"

/**
  Multiples a 64-bit unsigned integer by a 32-bit unsigned integer and
  generates a 64-bit unsigned result.

  This function multiples the 64-bit unsigned value Multiplicand by the 32-bit
  unsigned value Multiplier and generates a 64-bit unsigned result. This 64-
  bit unsigned result is returned.

  @param  Multiplicand  A 64-bit unsigned value.
  @param  Multiplier    A 32-bit unsigned value.

  @return Multiplicand * Multiplier

**/
UINT64
EFIAPI
GlueMultU64x32 (
  IN      UINT64                    Multiplicand,
  IN      UINT32                    Multiplier
  )
{
  UINT64                            Result;

  Result = InternalMathMultU64x32 (Multiplicand, Multiplier);

  return Result;
}


import Notifications from './Notifications.js';
export default Notifications;


.class public Lcom/android/server/pm/PersistentPreferredIntentResolver;
.super Lcom/android/server/IntentResolver;
.source "PersistentPreferredIntentResolver.java"

# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/android/server/IntentResolver",
        "<",
        "Lcom/android/server/pm/PersistentPreferredActivity;",
        "Lcom/android/server/pm/PersistentPreferredActivity;",
        ">;"
    }
.end annotation

# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 23
    invoke-direct {p0}, Lcom/android/server/IntentResolver;-><init>()V

    return-void
.end method

# virtual methods
.method protected bridge synthetic isPackageForFilter(Ljava/lang/String;Landroid/content/IntentFilter;)Z
    .locals 1
    .param p1, "x0"    # Ljava/lang/String;
    .param p2, "x1"    # Landroid/content/IntentFilter;

    .prologue
    .line 23
    check-cast p2, Lcom/android/server/pm/PersistentPreferredActivity;

    .end local p2    # "x1":Landroid/content/IntentFilter;
    invoke-virtual {p0, p1, p2}, Lcom/android/server/pm/PersistentPreferredIntentResolver;->isPackageForFilter(Ljava/lang/String;Lcom/android/server/pm/PersistentPreferredActivity;)Z

    move-result v0

    return v0
.end method

.method protected isPackageForFilter(Ljava/lang/String;Lcom/android/server/pm/PersistentPreferredActivity;)Z
    .locals 1
    .param p1, "packageName"    # Ljava/lang/String;
    .param p2, "filter"    # Lcom/android/server/pm/PersistentPreferredActivity;

    .prologue
    .line 32
    iget-object v0, p2, Lcom/android/server/pm/PersistentPreferredActivity;->mComponent:Landroid/content/ComponentName;

    invoke-virtual {v0}, Landroid/content/ComponentName;->getPackageName()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    return v0
.end method

.method protected bridge synthetic newArray(I)[Landroid/content/IntentFilter;
    .locals 1
    .param p1, "x0"    # I

    .prologue
    .line 23
    invoke-virtual {p0, p1}, Lcom/android/server/pm/PersistentPreferredIntentResolver;->newArray(I)[Lcom/android/server/pm/PersistentPreferredActivity;

    move-result-object v0

    return-object v0
.end method

.method protected newArray(I)[Lcom/android/server/pm/PersistentPreferredActivity;
    .locals 1
    .param p1, "size"    # I

    .prologue
    .line 27
    new-array v0, p1, [Lcom/android/server/pm/PersistentPreferredActivity;

    return-object v0
.end method


export * from "./from-exports";


@interface demoUITests : XCTestCase

@end

@implementation demoUITests

- (void)setUp {
    [super setUp];

    // Put setup code here. This method is called before the invocation of each test method in the class.

    // In UI tests it is usually best to stop immediately when a failure occurs.
    self.continueAfterFailure = NO;
    // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
    [[[XCUIApplication alloc] init] launch];

    // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
}

- (void)tearDown {
    // Put teardown code here. This method is called after the invocation of each test method in the class.
    [super tearDown];
}

- (void)testExample {
    // Use recording to get started writing UI tests.
    // Use XCTAssert and related functions to verify your tests produce the correct results.
}

@end


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

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Lua-API++: Class Index</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

Lua-API++
    2015-02-12-3

Lua-API++ library

Main Page

Related Pages

Classes

Files

          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Class List

Class Index

Class Hierarchy

Class Members

Class Index

C | N | R | S | T | V

  C

  R

  T

	Valref (lua)

Valset (lua)

ClosureInfo (lua)   	Context::Registry (lua)   	Table (lua)   	Value (lua)

Context (lua)   	RegistryKey (lua)   	Temporary (lua)

  N

	Retval (lua)   	TypeID (lua)

  S

  V

Nil (lua)

	State (lua)   	Valobj (lua)

C | N | R | S | T | V

Generated by

     1.8.11


package com.lithiumsheep.jacketapp;

import org.junit.Test;

import static org.junit.Assert.assertEquals;

/**
 * Example local unit test, which will execute on the development machine (host).
 *
 * @see Testing documentation
 */
public class ExampleUnitTest {
    @Test
    public void addition_isCorrect() throws Exception {
        assertEquals(4, 2 + 2);
    }
}


<?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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.kie.server</groupId>
    <artifactId>kie-server-parent</artifactId>
    <version>7.0.0-SNAPSHOT</version>
  </parent>

  <artifactId>kie-server-controller</artifactId>
  <name>KIE :: Execution Server :: Controller</name>
  <description>KIE Execution Server Controller</description>
  <packaging>pom</packaging>

  <modules>
    <module>kie-server-controller-api</module>
    <module>kie-server-controller-impl</module>
    <module>kie-server-controller-rest</module>
    <module>kie-server-controller-test-war</module>
  </modules>

</project>


package com.unnamed.b.atv.sample.holder;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.TextView;

import com.github.johnkil.print.PrintView;
import com.unnamed.b.atv.model.TreeNode;
import com.unnamed.b.atv.sample.R;

/**
 * Created by Bogdan Melnychuk on 2/15/15, modified by Szigeti Peter 2/2/16.
 */
public class ArrowExpandSelectableHeaderHolder extends TreeNode.BaseNodeViewHolder<IconTreeItemHolder.IconTreeItem> {
    private TextView tvValue;
    private PrintView arrowView;
    private CheckBox nodeSelector;

    public ArrowExpandSelectableHeaderHolder(Context context) {
        super(context);
    }

    @Override
    public View createNodeView(final TreeNode node, IconTreeItemHolder.IconTreeItem value) {
        final LayoutInflater inflater = LayoutInflater.from(context);
        final View view = inflater.inflate(R.layout.layout_selectable_header, null, false);

        tvValue = (TextView) view.findViewById(R.id.node_value);
        tvValue.setText(value.text);

        final PrintView iconView = (PrintView) view.findViewById(R.id.icon);
        iconView.setIconText(context.getResources().getString(value.icon));

        arrowView = (PrintView) view.findViewById(R.id.arrow_icon);
        arrowView.setPadding(20,10,10,10);
        if (node.isLeaf()) {
            arrowView.setVisibility(View.GONE);
        }
        arrowView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                tView.toggleNode(node);
            }
        });

        nodeSelector = (CheckBox) view.findViewById(R.id.node_selector);
        nodeSelector.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
                node.setSelected(isChecked);
                for (TreeNode n : node.getChildren()) {
                    getTreeView().selectNode(n, isChecked);
                }
            }
        });
        nodeSelector.setChecked(node.isSelected());

        return view;
    }

    @Override
    public void toggle(boolean active) {
        arrowView.setIconText(context.getResources().getString(active ? R.string.ic_keyboard_arrow_down : R.string.ic_keyboard_arrow_right));
    }

    @Override
    public void toggleSelectionMode(boolean editModeEnabled) {
        nodeSelector.setVisibility(editModeEnabled ? View.VISIBLE : View.GONE);
        nodeSelector.setChecked(mNode.isSelected());
    }
}


using LmpClient.Base;
using LmpClient.Base.Interface;
using LmpClient.Extensions;
using LmpCommon.Enums;
using LmpCommon.Message.Data.Kerbal;
using LmpCommon.Message.Interface;
using LmpCommon.Message.Types;
using System.Collections.Concurrent;

namespace LmpClient.Systems.KerbalSys
{
    public class KerbalMessageHandler : SubSystem<KerbalSystem>, IMessageHandler
    {
        public ConcurrentQueue<IServerMessageBase> IncomingMessages { get; set; } = new ConcurrentQueue<IServerMessageBase>();

        public void HandleMessage(IServerMessageBase msg)
        {
            if (!(msg.Data is KerbalBaseMsgData msgData)) return;

            switch (msgData.KerbalMessageType)
            {
                case KerbalMessageType.Remove:
                    System.KerbalsToRemove.Enqueue(((KerbalRemoveMsgData)msgData).KerbalName);
                    break;
                case KerbalMessageType.Reply:
                    HandleKerbalReply(msgData as KerbalReplyMsgData);
                    break;
                case KerbalMessageType.Proto:
                    HandleKerbalProto(msgData as KerbalProtoMsgData);
                    break;
                default:
                    LunaLog.LogError("[LMP]: Invalid Kerbal message type");
                    break;
            }
        }

        /// <summary>
        /// Just load the received kerbal into game and refresh dialogs
        /// </summary>
        private static void HandleKerbalProto(KerbalProtoMsgData messageData)
        {
            ProcessKerbal(messageData.Kerbal.KerbalData, messageData.Kerbal.NumBytes);
        }

        /// <summary>
        /// Appends the received kerbal to the dictionary
        /// </summary>
        private static void ProcessKerbal(byte[] kerbalData, int numBytes)
        {
            var kerbalNode = kerbalData.DeserializeToConfigNode(numBytes);
            if (kerbalNode != null)
            {
                System.KerbalsToProcess.Enqueue(kerbalNode);
            }
            else
                LunaLog.LogError("[LMP]: Failed to load kerbal!");
        }

        /// <summary>
        /// We store all the kerbals in the KerbalProtoQueue dictionary so later once the game starts we load them
        /// </summary>
        /// <param name="messageData"></param>
        private static void HandleKerbalReply(KerbalReplyMsgData messageData)
        {
            for (var i = 0; i < messageData.KerbalsCount; i++)
            {
                ProcessKerbal(messageData.Kerbals[i].KerbalData, messageData.Kerbals[i].NumBytes);
            }

            LunaLog.Log("[LMP]: Kerbals Synced!");
            MainSystem.NetworkState = ClientState.KerbalsSynced;
        }
    }
}


import sys
from conftest import rvo_output, rvo_err
from click.testing import CliRunner
from rvo import cli

def test_add_all_parameters(isatty_true):
    options = ['add', '-t', 'test', '-c', 'test', '--content', 'test']
    output = ['Document "test" created.']
    rvo_output(options,output)

def test_add_tags(isatty_true):
    options = ['add', '-t', 'test', '--content', 'test']
    output = ['Document "test" created.']
    rvo_output(options,output)

def test_add_title_test(isatty_true):
    options = ['add', '-t', 'test', '--content', 'THIS IS A TITLE']
    output = ['Document "THIS IS A TITLE" created.']
    rvo_output(options,output)

def test_add_title_test_gnarf(isatty_true):
    runner = CliRunner()
    result = runner.invoke(cli.cli, ['add', '-c', 'töstcät', '-x', 'gnarf'])
    assert not result.exception
    assert result.output.strip().endswith('Document "gnarf" created.')

def test_add_title_test_gnarf(isatty_true):
    runner = CliRunner()
    result = runner.invoke(cli.cli, ['add', '-c', 'töstcät', '-x', 'gnarf\nfoo'])
    assert not result.exception
    assert result.output.strip().endswith('Document "gnarf" created.')

def test_add_title_test_hashtag(isatty_true):
    options = ['add', '-t', 'test', '--content', '# THIS IS A TITLE']
    output = ['Document "THIS IS A TITLE" created.']
    rvo_output(options,output)

def test_add_title_test_hashtag(isatty_true):
    options = ['add', '-t', 'test', '--content', '# THIS IS A TITLE\nmutliline']
    output = ['Document "THIS IS A TITLE" created.']
    rvo_output(options,output)

def test_add_very_long_title(isatty_true):
    options = ['add', '-t', 'test', '--content', '# THIS IS A VERY VERY LONG NEVER ENDING TITLE THAT EXCEEDS LIMITS']
    output = ['Document "THIS IS A VERY VERY LONG NEVER ENDING TITLE THAT E" created.']
    rvo_output(options,output)

def test_add_no_parameters(isatty_true):
    runner = CliRunner()
    result = runner.invoke(cli.cli, ['add'])
    assert result.output.strip().endswith('Document "TEST" created.')
    assert not result.exception

def test_add_one_parameters_tag(isatty_true):
    runner = CliRunner()
    result = runner.invoke(cli.cli, ['add', '-t', 'testtag'])
    assert result.output.strip().endswith('Document "TEST" created.')
    assert not result.exception

def test_add_utf8_cat(isatty_true):
    runner = CliRunner()
    result = runner.invoke(cli.cli, ['add', '-c', 'töstcät'])
    assert result.output.strip().endswith('Document "TEST" created.')
    assert not result.exception

def test_add_utf8_cat_multi(isatty_true):
    runner = CliRunner()
    result = runner.invoke(cli.cli, ['add', '-c', 'tüütüü', '-c', 'töstcät'])
    assert result.output.strip().endswith('Document "TEST" created.')
    assert not result.exception

def test_add_utf8_tag(isatty_true):
    runner = CliRunner()
    result = runner.invoke(cli.cli, ['add', '-t', 'töstcät'])
    assert result.output.strip().endswith('Document "TEST" created.')
    assert not result.exception

def test_add_utf8_tag_multi(isatty_true):
    runner = CliRunner()
    result = runner.invoke(cli.cli, ['add', '-t', 'tüütüü', '-t', 'töstcät'])
    assert result.output.strip().endswith('Document "TEST" created.')
    assert not result.exception

def test_add_encrypt_by_parameter_wrong_pw(isatty_true):
    runner = CliRunner()
    result = runner.invoke(cli.cli, ['add', '-e', '-p', 'thispasswordistotallywrong', '-t', 'encryption', '-c', 'test'])
    assert result.output.strip().endswith('Invalid Password')
    assert result.exception

def test_add_encrypt_by_parameter(isatty_true):
    runner = CliRunner()
    result = runner.invoke(cli.cli, ['add', '-e', '-p', 'test123', '-t', 'encryption', '-c', 'test'])
    assert result.output.strip().endswith('Document "TEST" created.')
    assert not result.exception

def test_add_encrypt_by_input(isatty_true):
    runner = CliRunner()
    result = runner.invoke(cli.cli, ['add', '-e', '-t', 'encryption', '-c', 'test'], input="test123\n")
    assert result.output.strip().endswith('Document "TEST" created.')
    assert not result.exception

def test_add_encrypt_by_input_with_content(isatty_true):
    runner = CliRunner()
    result = runner.invoke(cli.cli, ['add', '-e', '-t', 'encryption', '-x', 'TEST', '-c', 'test'], input="test123\n")
    assert result.output.strip().endswith('Document "TEST" created.')
    assert not result.exception

def test_add_encrypt_by_input_wrong_pw(isatty_true):
    runner = CliRunner()
    result = runner.invoke(cli.cli, ['add', '-e', '-t', 'encryption', '-c', 'test'], input="test2123\n")
    assert result.output.strip().endswith('Invalid Password')
    assert result.exception

def test_add_read_from_stdin(isatty_false):
    runner = CliRunner()
    result = runner.invoke(cli.cli, ['add'], input="Schwifty\nSchwifty..lol\nMorty\n\n")
    assert result.output.strip().endswith('Document "Schwifty" created.')
    assert not result.exception

def test_add_read_from_stdin_with_cat(isatty_false):
    runner = CliRunner()
    result = runner.invoke(cli.cli, ['add', '-c', 'test'], input="Schwifty\nSchwifty..lol\nMorty\n\n")
    assert result.output.strip().endswith('Document "Schwifty" created.')
    assert not result.exception

def test_add_read_from_stdin_with_tag(isatty_false):
    runner = CliRunner()
    result = runner.invoke(cli.cli, ['add', '-t', 'tag'], input="Schwifty\nSchwifty..lol\nMorty\n\n")
    assert not result.exception
    assert result.output.strip().endswith('Document "Schwifty" created.')

def test_add_conflicting_stdin_reading(isatty_false):
    runner = CliRunner()
    result = runner.invoke(cli.cli, ['add', '-e'], input="Schwifty\nSchwifty..lol\nMorty\n\n")
    assert result.exception
    assert result.output.strip().endswith('Invalid Password')

def test_add_location_germany(isatty_true):
    runner = CliRunner()
    result = runner.invoke(cli.cli, ['add', '-l', 'Nuremberg', '-c', 'test'])
    assert result.output.strip().endswith('Document "TEST" created.')
    assert not result.exception

def test_add_location_invalid(isatty_true):
    runner = CliRunner()
    result = runner.invoke(cli.cli, ['add', '-l', 'DOESNOTEXISTTOWNATLEASTIHOPE', '-c', 'test'])
    assert result.exception


package com.charlesbishop.webrest.util;

import java.io.Serializable;

import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

import com.charlesbishop.webrest.dao.AppUserDAO;
import com.charlesbishop.webrest.model.AppUser;

/**
 * @author charlie
 * This utility class contains helper methods that can assist in the creation of an AppUser object
 */
public class UserCreationUtil {

	private final static String ROLE_USER = "USER";
	private static BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();

	public static AppUser createUser(String username, String rawPassword){
		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring.xml");

		AppUser user = new AppUser();
		user.setUsername(username);
		user.setPassword(encoder.encode(rawPassword));
		user.setUserRole(ROLE_USER);

		AppUserDAO userDAO = context.getBean(AppUserDAO.class);
		Serializable id = userDAO.save(user);
		context.close();

		try {
			return (id != null) ? user: null;
		}
		catch (Exception e){
			return null;
		}
	}

	// Check if a password is valid or not
	public static boolean passwordIsValid(String password){
		boolean validLength = (password.length() >= 8 && password.length() <= 14);
		boolean hasSpecial   = !password.matches("[A-Za-z0-9 ]*");
		boolean hasUppercase = !password.equals(password.toLowerCase());
		boolean hasLowercase = !password.equals(password.toUpperCase());

		return validLength & hasSpecial & hasUppercase & hasLowercase;
	}
}


#import "GPAppDelegate.h"

int main(int argc, char *argv[]) {
    @autoreleasepool {
        return UIApplicationMain(argc, argv, nil, NSStringFromClass([GPAppDelegate class]));
    }
}

Giulio Petek/Giulio Petek/Supporting Files/main.m


package io.aeron.samples;

import io.aeron.*;
import io.aeron.driver.*;
import io.aeron.logbuffer.*;
import org.agrona.*;
import org.agrona.concurrent.*;

import java.nio.ByteBuffer;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.locks.LockSupport;

import static org.agrona.BitUtil.CACHE_LINE_LENGTH;
import static org.agrona.SystemUtil.loadPropertiesFiles;
import static org.agrona.UnsafeAccess.UNSAFE;

public class EmbeddedIpcThroughput
{
    public static final int BURST_LENGTH = 1_000_000;
    public static final int MESSAGE_LENGTH = SampleConfiguration.MESSAGE_LENGTH;
    public static final int MESSAGE_COUNT_LIMIT = SampleConfiguration.FRAGMENT_COUNT_LIMIT;
    public static final String CHANNEL = CommonContext.IPC_CHANNEL;
    public static final int STREAM_ID = SampleConfiguration.STREAM_ID;

    public static void main(final String[] args) throws Exception
    {
        loadPropertiesFiles(args);

        final AtomicBoolean running = new AtomicBoolean(true);
        SigInt.register(() -> running.set(false));

        final MediaDriver.Context ctx = new MediaDriver.Context()
            .threadingMode(ThreadingMode.SHARED)
            .sharedIdleStrategy(new NoOpIdleStrategy());

        try (MediaDriver ignore = MediaDriver.launch(ctx);
            Aeron aeron = Aeron.connect();
            Publication publication = aeron.addPublication(CHANNEL, STREAM_ID);
            Subscription subscription = aeron.addSubscription(CHANNEL, STREAM_ID))
        {
            final Subscriber subscriber = new Subscriber(running, subscription);
            final Thread subscriberThread = new Thread(subscriber);
            subscriberThread.setName("subscriber");
            final Thread publisherThread = new Thread(new Publisher(running, publication));
            publisherThread.setName("publisher");
            final Thread rateReporterThread = new Thread(new RateReporter(running, subscriber));
            rateReporterThread.setName("rate-reporter");

            rateReporterThread.start();
            subscriberThread.start();
            publisherThread.start();

            subscriberThread.join();
            publisherThread.join();
            rateReporterThread.join();
        }
    }

    public static final class RateReporter implements Runnable
    {
        private final AtomicBoolean running;
        private final Subscriber subscriber;

        public RateReporter(final AtomicBoolean running, final Subscriber subscriber)
        {
            this.running = running;
            this.subscriber = subscriber;
        }

        public void run()
        {
            long lastTimeStamp = System.currentTimeMillis();
            long lastTotalBytes = subscriber.totalBytes();

            while (running.get())
            {
                LockSupport.parkNanos(1_000_000_000);

                final long newTimeStamp = System.currentTimeMillis();
                final long newTotalBytes = subscriber.totalBytes();

                final long duration = newTimeStamp - lastTimeStamp;
                final long bytesTransferred = newTotalBytes - lastTotalBytes;

                System.out.format(
                    "Duration %dms - %,d messages - %,d payload bytes%n",
                    duration, bytesTransferred / MESSAGE_LENGTH, bytesTransferred);

                lastTimeStamp = newTimeStamp;
                lastTotalBytes = newTotalBytes;
            }
        }
    }

    public static final class Publisher implements Runnable
    {
        private final AtomicBoolean running;
        private final Publication publication;

        public Publisher(final AtomicBoolean running, final Publication publication)
        {
            this.running = running;
            this.publication = publication;
        }

        public void run()
        {
            final Publication publication = this.publication;
            final ByteBuffer byteBuffer = BufferUtil.allocateDirectAligned(
                publication.maxMessageLength(), CACHE_LINE_LENGTH);
            final UnsafeBuffer buffer = new UnsafeBuffer(byteBuffer);
            long backPressureCount = 0;
            long totalMessageCount = 0;

            outputResults:
            while (running.get())
            {
                for (int i = 0; i < BURST_LENGTH; i++)
                {
                    while (publication.offer(buffer, 0, MESSAGE_LENGTH) <= 0)
                    {
                        ++backPressureCount;
                        if (!running.get())
                        {
                            break outputResults;
                        }
                    }

                    ++totalMessageCount;
                }
            }

            final double backPressureRatio = backPressureCount / (double)totalMessageCount;
            System.out.format("Publisher back pressure ratio: %f%n", backPressureRatio);
        }
    }

    public static final class Subscriber implements Runnable, FragmentHandler
    {
        private static final long TOTAL_BYTES_OFFSET;

        static
        {
            try
            {
                TOTAL_BYTES_OFFSET = UNSAFE.objectFieldOffset(Subscriber.class.getDeclaredField("totalBytes"));
            }
            catch (final Exception ex)
            {
                throw new RuntimeException(ex);
            }
        }

        private final AtomicBoolean running;
        private final Subscription subscription;

        private volatile long totalBytes = 0;

        public Subscriber(final AtomicBoolean running, final Subscription subscription)
        {
            this.running = running;
            this.subscription = subscription;
        }

        public long totalBytes()
        {
            return totalBytes;
        }

        public void run()
        {
            while (!subscription.isConnected())
            {
                Thread.yield();
            }

            final Image image = subscription.imageAtIndex(0);

            long failedPolls = 0;
            long successfulPolls = 0;

            while (running.get())
            {
                final int fragmentsRead = image.poll(this, MESSAGE_COUNT_LIMIT);
                if (0 == fragmentsRead)
                {
                    ++failedPolls;
                }
                else
                {
                    ++successfulPolls;
                }
            }

            final double failureRatio = failedPolls / (double)(successfulPolls + failedPolls);
            System.out.format("Subscriber poll failure ratio: %f%n", failureRatio);
        }

        public void onFragment(final DirectBuffer buffer, final int offset, final int length, final Header header)
        {
            UNSAFE.putOrderedLong(this, TOTAL_BYTES_OFFSET, totalBytes + length);
        }
    }
}


package io.fabric8.activemq.facade;

import org.apache.activemq.command.ActiveMQDestination;

import java.util.Collection;

/**
 * A facade for either a local in JVM broker or a remote broker over JMX
 *
 *
 *
 */
public interface BrokerFacade {

    /**
     * @return a unique id for this resource, typically a JMX ObjectName
     * @throws Exception
     */
    String getId() throws Exception;

    /**
     * Returns all the available brokers.
     *
     * @return not null
     * @throws Exception
     */
    public BrokerFacade[] getBrokers() throws Exception;

	/**
	 * The name of the active broker (f.e. 'localhost' or 'my broker').
	 *
	 * @return not null
	 * @throws Exception
	 */
	String getBrokerName() throws Exception;

	/**
	 * Admin view of the broker.
	 *
	 * @return not null
	 * @throws Exception
	 */
	BrokerViewFacade getBrokerAdmin() throws Exception;

	/**
	 * All queues known to the broker.
	 *
	 * @return not null
	 * @throws Exception
	 */
	Collection<QueueViewFacade> getQueues() throws Exception;

	/**
	 * All topics known to the broker.
	 *
	 * @return not null
	 * @throws Exception
	 */
	Collection<TopicViewFacade> getTopics() throws Exception;

	/**
	 * All active consumers of a queue.
	 *
	 * @param queueName
	 *            the name of the queue, not null
	 * @return not null
	 * @throws Exception
	 */
	Collection<SubscriptionViewFacade> getQueueConsumers(String queueName)
			throws Exception;

    /**
     * Returns the consumers available on the given topic
     */
	Collection<SubscriptionViewFacade> getTopicConsumers(String topicName) throws Exception;

    /**
     * Returns the durable consumers available on the given topic
     */
    Collection<DurableSubscriptionViewFacade> getTopicDurableConsumers(String topicName) throws Exception;

    /**
     * Returns the producers available on the given queue
     */
    Collection<ProducerViewFacade> getQueueProducers(String queueName) throws Exception;

    /**
     * Returns the producers available on the given topic
     */
    Collection<ProducerViewFacade> getTopicProducers(String topicName) throws Exception;

	/**
	 * Active durable subscribers to topics of the broker.
	 *
	 * @return not null
	 * @throws Exception
	 */
	Collection<DurableSubscriptionViewFacade> getDurableTopicSubscribers()
			throws Exception;

	/**
	 * Inactive durable subscribers to topics of the broker.
	 *
	 * @return not null
	 * @throws Exception
	 */
	Collection<DurableSubscriptionViewFacade> getInactiveDurableTopicSubscribers()
			throws Exception;

	/**
	 * The names of all transport connectors of the broker (f.e. openwire, ssl)
	 *
	 * @return not null
	 * @throws Exception
	 */
	Collection<String> getConnectors() throws Exception;

	/**
	 * A transport connectors.
	 *
	 * @param name
	 *            name of the connector (f.e. openwire)
	 * @return null if not found
	 * @throws Exception
	 */
	ConnectorViewFacade getConnector(String name) throws Exception;

	/**
	 * All connections to all transport connectors of the broker.
	 *
	 * @return not null
	 * @throws Exception
	 */
	Collection<ConnectionViewFacade> getConnections() throws Exception;

	/**
	 * The names of all connections to a specific transport connectors of the
	 * broker.
	 *
	 * @see #getConnection(String)
	 * @param connectorName
	 *            not null
	 * @return not null
	 * @throws Exception
	 */
	Collection<String> getConnections(String connectorName) throws Exception;

	/**
	 * A specific connection to the broker.
	 *
	 * @param connectionName
	 *            the name of the connection, not null
	 * @return not null
	 * @throws Exception
	 */
	ConnectionViewFacade getConnection(String connectionName) throws Exception;
	/**
	 * Returns all consumers of a connection.
	 *
	 * @param connectionName
	 *            the name of the connection, not null
	 * @return not null
	 * @throws Exception
	 */
	Collection<SubscriptionViewFacade> getConsumersOnConnection(
			String connectionName) throws Exception;
	/**
	 * The brokers network connectors.
	 *
	 * @return not null
	 * @throws Exception
	 */
	Collection<NetworkConnectorViewFacade> getNetworkConnectors()
			throws Exception;

	/**
	 * The brokers network bridges.
	 *
	 * @return not null
	 * @throws Exception
	 */
    Collection<NetworkBridgeViewFacade> getNetworkBridges()
            throws Exception;

    /**
	 * Purges the given destination
	 *
	 * @param destination
	 * @throws Exception
	 */
	void purgeQueue(ActiveMQDestination destination) throws Exception;
	/**
	 * Get the view of the queue with the specified name.
	 *
	 * @param name
	 *            not null
	 * @return null if no queue with this name exists
	 * @throws Exception
	 */
	QueueViewFacade getQueue(String name) throws Exception;
	/**
	 * Get the view of the topic with the specified name.
	 *
	 * @param name
	 *            not null
	 * @return null if no topic with this name exists
	 * @throws Exception
	 */
	TopicViewFacade getTopic(String name) throws Exception;

	/**
	 * Get the JobScheduler MBean
	 * @return the jobScheduler or null if not configured
	 * @throws Exception
	 */
	JobSchedulerViewFacade getJobScheduler() throws Exception;

	/**
     * Get the JobScheduler MBean
     * @return the jobScheduler or null if not configured
     * @throws Exception
     */
    Collection<JobFacade> getScheduledJobs() throws Exception;

    boolean isJobSchedulerStarted();
}


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

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Arch Game Engine: Class Members - Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

Arch Game Engine
    0.2

Main Page

Classes

Files

          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Class List

Class Index

Class Hierarchy

Class Members

All

Functions

Variables

a

b

c

d

f

g

h

i

k

l

m

o

r

s

u

~

- m -

move()
: Level
, Object

moveTowards()
: Physics

moveX()
: Object

moveY()
: Object

<address class="footer">
Generated by

 1.8.11
</address>


using System;

public interface IExecutionScope : IDisposable
#if NATIVE_ASYNC
	, IAsyncDisposable
#endif
{
}


using System;
using System.Collections.Generic;
using System.ComponentModel.Design;
using Cirrious.MvvmCross.Plugins.Email;
using Cirrious.MvvmCross.Plugins.WebBrowser;
using codestuffers.MvvmCross.Plugins.FeedbackDialog.OpenCriteria;
using codestuffers.MvvmCross.Plugins.UserInteraction;
using FluentAssertions;
using Moq;
using NUnit.Framework;

namespace codestuffers.MvvmCross.Plugins.FeedbackDialog.Tests
{
    [TestFixture]
    public class MvxFeedbackDialogTests
    {
        private Mock<IMvxUserInteraction> _userInteraction;
        private Mock<IFeedbackDataService> _dataService;
        private Mock<IMvxComposeEmailTask> _emailTask;
        private Mock<IMvxWebBrowserTask> _webBrowser;
        private Mock<FeedbackData> _data;
        private FeedbackDialogConfiguration _configuration;
        private List<IOpenDialogCriteria> _criteria;
        private MvxFeedbackDialog _testObject;

        [SetUp]
        public void Setup()
        {
            _criteria = new List<IOpenDialogCriteria>();
            _data = new Mock<FeedbackData>();
            _data.SetupProperty(x => x.DialogWasShown);

            _userInteraction = new Mock<IMvxUserInteraction>();
            _dataService = new Mock<IFeedbackDataService>();
            _dataService.Setup(x => x.GetData()).Returns(() => _data.Object);

            _emailTask = new Mock<IMvxComposeEmailTask>();
            _webBrowser = new Mock<IMvxWebBrowserTask>();
            _configuration = new FeedbackDialogConfiguration {OpenCriteria = _criteria};

            _testObject = new MvxFeedbackDialog(_userInteraction.Object,
                _dataService.Object, _emailTask.Object, _webBrowser.Object);
            _testObject.SetConfiguration(_configuration);
        }

        [Test]
        public void RecordAppStart_ShouldNotRecordAppStart_WhenDialogHasAlreadyBeenOpened()
        {
            _data.Setup(x => x.DialogWasShown).Returns(true);
            _testObject.RecordAppStart();
            _data.Verify(x => x.AppHasOpened(), Times.Never());
        }

        [Test]
        public void RecordAppStart_ShouldRecordAppStart_WhenDialogHasNotBeenOpened()
        {
            _data.Setup(x => x.DialogWasShown).Returns(false);
            _testObject.RecordAppStart();
            _data.Verify(x => x.AppHasOpened(), Times.Once());
        }

        [Test]
        public void RecordAppStart_ShouldMarkDialogAsOpened_WhenAllCriteriaIsTrue()
        {
            var criteria1 = new Mock<IOpenDialogCriteria>();
            criteria1.Setup(x => x.ShouldOpen(It.IsAny<FeedbackData>())).Returns(true);
            var criteria2 = new Mock<IOpenDialogCriteria>();
            criteria2.Setup(x => x.ShouldOpen(It.IsAny<FeedbackData>())).Returns(true);

            _criteria.Add(criteria1.Object);
            _criteria.Add(criteria2.Object);

            _data.SetupSet(x => x.DialogWasShown = true);
            _testObject.RecordAppStart();
            _data.VerifySet(x => x.DialogWasShown = true);
        }

        [TestCase(false, true)]
        [TestCase(true, false)]
        [TestCase(false, false)]
        public void RecordAppStart_ShouldNotMarkDialogAsOpened_WhenAnyCriteriaIsFalse(bool crit1, bool crit2)
        {
            var criteria1 = new Mock<IOpenDialogCriteria>();
            criteria1.Setup(x => x.ShouldOpen(It.IsAny<FeedbackData>())).Returns(crit1);
            var criteria2 = new Mock<IOpenDialogCriteria>();
            criteria2.Setup(x => x.ShouldOpen(It.IsAny<FeedbackData>())).Returns(crit2);

            _criteria.Add(criteria1.Object);
            _criteria.Add(criteria2.Object);

            _data.SetupSet(x => x.DialogWasShown = false);
            _testObject.RecordAppStart();
            _data.VerifySet(x => x.DialogWasShown = false);
        }

        [Test]
        public void RecordAppStart_ShouldNotMarkDialogAsOpened_WhenThereAreNoCriteria()
        {
            _data.SetupProperty(x => x.DialogWasShown, false);
            _testObject.RecordAppStart();
            _data.Object.DialogWasShown.Should().BeFalse();
        }

        [Test]
        public void RecordAppStart_ShouldSaveData_WhenDialogHasNotBeenOpened()
        {
            _data.Setup(x => x.DialogWasShown).Returns(false);
            _testObject.RecordAppStart();
            _dataService.Verify(x => x.SaveData(_data.Object), Times.Once());
        }

        [Test]
        public void RecordAppStart_ShouldOpenDialog_WhenAllCriteriaIsTrue()
        {
            var criteria1 = new Mock<IOpenDialogCriteria>();
            criteria1.Setup(x => x.ShouldOpen(It.IsAny<FeedbackData>())).Returns(true);
            _criteria.Add(criteria1.Object);

            _testObject.RecordAppStart();
            _userInteraction.Verify(x => x.ShowDialog(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<Action>(), It.IsAny<Action>()));
        }
    }
}


/*
 * cs170 -- Rich wolski
 * producer-consumer example using kthreads
 * uses condition variables for full/empty conditions
 * uses condition variable to fulfill order
 * uses separate lock for each stock
 */
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "c-timer.h"
#include "kt.h"

#define RAND() (drand48())

struct order
{
	int stock_id;
	int quantity;
	int action;	/* buy or sell */
	kt_sem fulfilled;
};

struct order_que
{
	struct order **orders;
	int size;
	int head;
	int tail;
	kt_sem full;
	kt_sem empty;
};

struct stock
{
	int quantity;
};

struct market
{
	struct stock *stocks;
	int count;
};

struct order *InitOrder(int id, int quantity, int action)
{
	struct order *order;

	order = (struct order *)malloc(sizeof(struct order));
	if(order == NULL) {
		return(NULL);
	}
	order->stock_id = id;
	order->quantity = quantity;
	order->action = action;
	order->fulfilled = make_kt_sem(0);
	return(order);
}

void FreeOrder(struct order *order)
{
	kill_kt_sem(order->fulfilled);
	free(order);
}

struct order_que *InitOrderQue(int size)
{
	struct order_que *oq;

	oq = (struct order_que *)malloc(sizeof(struct order_que));
	if(oq == NULL) {
		return(NULL);
	}
	memset(oq,0,sizeof(struct order_que));

	oq->size = size+1; /* empty condition burns a slot */
	oq->orders = (struct order **)malloc(size*sizeof(struct order *));
	if(oq->orders == NULL) {
		free(oq);
		return(NULL);
	}
	memset(oq->orders,0,size*sizeof(struct order *));

	oq->full = make_kt_sem(size);
	oq->empty = make_kt_sem(0);

	return(oq);
}

void FreeOrderQue(struct order_que *oq)
{
	while(oq->head != oq->tail) {
		FreeOrder(oq->orders[oq->tail]);
		oq->tail = (oq->tail + 1) % oq->size;
	}

	kill_kt_sem(oq->full);
	kill_kt_sem(oq->empty);
	free(oq->orders);
	free(oq);
	return;
}

struct market *InitMarket(int stock_count, int init_quantity)
{
	struct market *m;
	int i;

	m = (struct market *)malloc(sizeof(struct market));
	if(m == NULL) {
		return(NULL);
	}
	m->count = stock_count;

	m->stocks = (struct stock *)malloc(stock_count*sizeof(struct stock));
	if(m->stocks == NULL) {
		free(m);
		return(NULL);
	}

	for(i=0; i < stock_count; i++) {
		m->stocks[i].quantity = init_quantity;
	}

	return(m);
}

void FreeMarket(struct market *m)
{
	free(m->stocks);
	free(m);
	return;
}

void PrintMarket(struct market *m)
{
	int i;
	for(i=0; i < m->count; i++) {
		printf("stock: %d, quantity: %d\n",
			i,m->stocks[i].quantity);
	}

	return;
}

struct client_arg
{
	int id;
	int order_count;
	struct order_que *order_que;
	int max_stock_id;
	int max_quantity;
	int verbose;
};

struct trader_arg
{
	int id;
	struct order_que *order_que;
	struct market *market;
	int *done;
	int verbose;
};

void ClientThread(void *arg)
{
	struct client_arg *ca = (struct client_arg *)arg;
	int i;
	int next;
	struct order *order;
	int stock_id;
	int quantity;
	int action;
	int queued;
	double now;

	for(i=0; i < ca->order_count; i++) {
		/*
		 * create an order for a random stock
		 */
		stock_id = (int)(RAND() * ca->max_stock_id);
		quantity = (int)(RAND() * ca->max_quantity);
		if(RAND() > 0.5) {
			action = 0; /* 0 => buy */
		} else {
			action = 1; /* 1 => sell */
		}
		order = InitOrder(stock_id,quantity,action);
		if(order == NULL) {
			fprintf(stderr,"no space for order\n");
			exit(1);
		}
		/*
		 * queue it for the traders
		 */
		P_kt_sem(ca->order_que->full);
		next = (ca->order_que->head + 1) % ca->order_que->size;
		/*
		 * there is space in the queue, add the order and bump
		 * the head
		 */
		if(ca->verbose == 1) {
			now = CTimer();
			printf("%10.0f client %d: ",now,ca->id);
			printf("queued stock %d, for %d, %s\n",
				order->stock_id,
				order->quantity,
				(order->action ? "SELL" : "BUY"));
		}
		ca->order_que->orders[next] = order;
		ca->order_que->head = next;
		/*
		 * signal traders that there is another order
		 */
		V_kt_sem(ca->order_que->empty);
		/*
		 * wait until the order is fulfilled
		 */
		P_kt_sem(order->fulfilled);
		/*
		 * done, free the order and repeat
		 */
		FreeOrder(order);
	}

	return;
}

void TraderThread(void *arg)
{
	struct trader_arg *ta = (struct trader_arg *)arg;
	int dequeued;
	struct order *order;
	int tail;
	double now;
	int next;
	struct stock *stock;

	while(1) {
		/*
		 * wait until there is a new order
		 */
		P_kt_sem(ta->order_que->empty);
		/*
		 * are we done? Tell the next trader and exit
		 */
		if(*(ta->done) == 1) {
			V_kt_sem(ta->order_que->empty);
			kt_exit();
		}
		/*
		 * get the next order
		 */
		next = (ta->order_que->tail + 1) % ta->order_que->size;
		order = ta->order_que->orders[next];
		ta->order_que->tail = next;
		/*
		 * tell the clients there is another free slot
		 */
		V_kt_sem(ta->order_que->full);
		/*
		 * have an order to process
		 */
		stock = &(ta->market->stocks[order->stock_id]);
		if(order->action == 1) { /* BUY */
			stock->quantity -= order->quantity;
			if(stock->quantity < 0) {
				stock->quantity = 0;
			}
		} else {
			stock->quantity += order->quantity;
		}
		if(ta->verbose == 1) {
			now = CTimer();
			printf("%10.0f trader: %d ",now,ta->id);
			printf("fulfilled stock %d for %d\n",
				order->stock_id,
				order->quantity);
		}
		/*
		 * tell the client the order is done
		 */
		V_kt_sem(order->fulfilled);
	}

	return;
}

#define ARGS "c:t:o:q:s:V"
char *Usage = "market1 -c clients -t traders -o orders -q queue-size -s stock-count -V <verbose on>\n";

#define INIT_COUNT 5000

int main(int argc, char **argv)
{
	int c;
	int client_threads;
	int trader_threads;
	int orders_per_client;
	int que_size;
	int max_stock;
	int verbose;
	struct client_arg *ca;
	struct trader_arg *ta;
	void **client_ids;
	void **trader_ids;
	struct order_que *order_que;
	struct market *market;
	int i;
	int done;
	int err;
	double start;
	double end;

	/*
	 * defaults
	 */
	client_threads = 1;
	trader_threads = 1;
	orders_per_client = 1;
	verbose = 0;
	que_size = 1;
	max_stock = 1;

	while((c = getopt(argc,argv,ARGS)) != EOF) {
		switch(c) {
			case 'c':
				client_threads = atoi(optarg);
				break;
			case 't':
				trader_threads = atoi(optarg);
				break;
			case 'o':
				orders_per_client = atoi(optarg);
				break;
			case 'q':
				que_size = atoi(optarg);
				break;
			case 's':
				max_stock = atoi(optarg);
				break;
			case 'V':
				verbose = 1;
				break;
			default:
				fprintf(stderr,
					"unrecognized command %c\n",
						(char)c);
				fprintf(stderr,"usage: %s",Usage);
				exit(1);
		}
	}

	client_ids = (void **)malloc(client_threads*sizeof(void *));
	if(client_ids == NULL) {
		exit(1);
	}

	ca = (struct client_arg *)malloc(client_threads*sizeof(struct client_arg));
	if(ca == NULL) {
		exit(1);
	}

	trader_ids = (void **)malloc(trader_threads*sizeof(void *));
	if(trader_ids == NULL) {
		exit(1);
	}

	ta = (struct trader_arg *)malloc(trader_threads*sizeof(struct trader_arg));
	if(ta == NULL) {
		exit(1);
	}

	order_que = InitOrderQue(que_size);
	if(order_que == NULL) {
		exit(1);
	}

	market = InitMarket(max_stock,INIT_COUNT);
	if(market == NULL) {
		exit(1);
	}

	start = CTimer();
	for(i=0; i < client_threads; i++) {
		ca[i].id = i;
		ca[i].order_count = orders_per_client;
		ca[i].max_stock_id = max_stock;
		ca[i].max_quantity = INIT_COUNT;
		ca[i].order_que = order_que;
		ca[i].verbose = verbose;
		client_ids[i] = kt_fork(ClientThread,(void *)&ca[i]);
		if(client_ids[i] == NULL) {
			fprintf(stderr,"client thread create %d failed\n",i);
			exit(1);
		}
	}

	done = 0;
	for(i=0; i < trader_threads; i++) {
		ta[i].id = i;
		ta[i].order_que = order_que;
		ta[i].market = market;
		ta[i].done = &done;
		ta[i].verbose = verbose;
		trader_ids[i] = kt_fork(TraderThread,(void *)&ta[i]);
		if(trader_ids[i] == NULL) {
			fprintf(stderr,"trader thread create %d failed\n",i);
			exit(1);
		}
	}

	/*
	 * wait for the clients to finish
	 */
	for(i=0; i < client_threads; i++) {
		kt_join(client_ids[i]);
	}

	/*
	 * tell the traders we are done
	 */
	done = 1;
	V_kt_sem(order_que->empty);

	for(i=0; i < trader_threads; i++) {
		kt_join(trader_ids[i]);
	}
	end = CTimer();

	if(verbose == 1) {
		PrintMarket(market);
	}

	printf("%f transactions / sec\n",
		(double)(orders_per_client*client_threads) / (end-start));

	free(ca);
	free(ta);
	free(client_ids);
	free(trader_ids);
	FreeMarket(market);
	FreeOrderQue(order_que);

	return(0);
}


package client

const (
	StatefulSetSpecType                               = "statefulSetSpec"
	StatefulSetSpecFieldActiveDeadlineSeconds         = "activeDeadlineSeconds"
	StatefulSetSpecFieldAutomountServiceAccountToken  = "automountServiceAccountToken"
	StatefulSetSpecFieldContainers                    = "containers"
	StatefulSetSpecFieldDNSConfig                     = "dnsConfig"
	StatefulSetSpecFieldDNSPolicy                     = "dnsPolicy"
	StatefulSetSpecFieldEnableServiceLinks            = "enableServiceLinks"
	StatefulSetSpecFieldEphemeralContainers           = "ephemeralContainers"
	StatefulSetSpecFieldFSGroupChangePolicy           = "fsGroupChangePolicy"
	StatefulSetSpecFieldFsgid                         = "fsgid"
	StatefulSetSpecFieldGids                          = "gids"
	StatefulSetSpecFieldHostAliases                   = "hostAliases"
	StatefulSetSpecFieldHostIPC                       = "hostIPC"
	StatefulSetSpecFieldHostNetwork                   = "hostNetwork"
	StatefulSetSpecFieldHostPID                       = "hostPID"
	StatefulSetSpecFieldHostname                      = "hostname"
	StatefulSetSpecFieldImagePullSecrets              = "imagePullSecrets"
	StatefulSetSpecFieldNodeID                        = "nodeId"
	StatefulSetSpecFieldObjectMeta                    = "metadata"
	StatefulSetSpecFieldOverhead                      = "overhead"
	StatefulSetSpecFieldPreemptionPolicy              = "preemptionPolicy"
	StatefulSetSpecFieldReadinessGates                = "readinessGates"
	StatefulSetSpecFieldRestartPolicy                 = "restartPolicy"
	StatefulSetSpecFieldRunAsGroup                    = "runAsGroup"
	StatefulSetSpecFieldRunAsNonRoot                  = "runAsNonRoot"
	StatefulSetSpecFieldRuntimeClassName              = "runtimeClassName"
	StatefulSetSpecFieldScale                         = "scale"
	StatefulSetSpecFieldScheduling                    = "scheduling"
	StatefulSetSpecFieldSeccompProfile                = "seccompProfile"
	StatefulSetSpecFieldSelector                      = "selector"
	StatefulSetSpecFieldServiceAccountName            = "serviceAccountName"
	StatefulSetSpecFieldSetHostnameAsFQDN             = "setHostnameAsFQDN"
	StatefulSetSpecFieldShareProcessNamespace         = "shareProcessNamespace"
	StatefulSetSpecFieldStatefulSetConfig             = "statefulSetConfig"
	StatefulSetSpecFieldSubdomain                     = "subdomain"
	StatefulSetSpecFieldSysctls                       = "sysctls"
	StatefulSetSpecFieldTerminationGracePeriodSeconds = "terminationGracePeriodSeconds"
	StatefulSetSpecFieldTopologySpreadConstraints     = "topologySpreadConstraints"
	StatefulSetSpecFieldUid                           = "uid"
	StatefulSetSpecFieldVolumes                       = "volumes"
	StatefulSetSpecFieldWindowsOptions                = "windowsOptions"
)

type StatefulSetSpec struct {
	ActiveDeadlineSeconds         *int64                         `json:"activeDeadlineSeconds,omitempty" yaml:"activeDeadlineSeconds,omitempty"`
	AutomountServiceAccountToken  *bool                          `json:"automountServiceAccountToken,omitempty" yaml:"automountServiceAccountToken,omitempty"`
	Containers                    []Container                    `json:"containers,omitempty" yaml:"containers,omitempty"`
	DNSConfig                     *PodDNSConfig                  `json:"dnsConfig,omitempty" yaml:"dnsConfig,omitempty"`
	DNSPolicy                     string                         `json:"dnsPolicy,omitempty" yaml:"dnsPolicy,omitempty"`
	EnableServiceLinks            *bool                          `json:"enableServiceLinks,omitempty" yaml:"enableServiceLinks,omitempty"`
	EphemeralContainers           []EphemeralContainer           `json:"ephemeralContainers,omitempty" yaml:"ephemeralContainers,omitempty"`
	FSGroupChangePolicy           string                         `json:"fsGroupChangePolicy,omitempty" yaml:"fsGroupChangePolicy,omitempty"`
	Fsgid                         *int64                         `json:"fsgid,omitempty" yaml:"fsgid,omitempty"`
	Gids                          []int64                        `json:"gids,omitempty" yaml:"gids,omitempty"`
	HostAliases                   []HostAlias                    `json:"hostAliases,omitempty" yaml:"hostAliases,omitempty"`
	HostIPC                       bool                           `json:"hostIPC,omitempty" yaml:"hostIPC,omitempty"`
	HostNetwork                   bool                           `json:"hostNetwork,omitempty" yaml:"hostNetwork,omitempty"`
	HostPID                       bool                           `json:"hostPID,omitempty" yaml:"hostPID,omitempty"`
	Hostname                      string                         `json:"hostname,omitempty" yaml:"hostname,omitempty"`
	ImagePullSecrets              []LocalObjectReference         `json:"imagePullSecrets,omitempty" yaml:"imagePullSecrets,omitempty"`
	NodeID                        string                         `json:"nodeId,omitempty" yaml:"nodeId,omitempty"`
	ObjectMeta                    *ObjectMeta                    `json:"metadata,omitempty" yaml:"metadata,omitempty"`
	Overhead                      map[string]string              `json:"overhead,omitempty" yaml:"overhead,omitempty"`
	PreemptionPolicy              string                         `json:"preemptionPolicy,omitempty" yaml:"preemptionPolicy,omitempty"`
	ReadinessGates                []PodReadinessGate             `json:"readinessGates,omitempty" yaml:"readinessGates,omitempty"`
	RestartPolicy                 string                         `json:"restartPolicy,omitempty" yaml:"restartPolicy,omitempty"`
	RunAsGroup                    *int64                         `json:"runAsGroup,omitempty" yaml:"runAsGroup,omitempty"`
	RunAsNonRoot                  *bool                          `json:"runAsNonRoot,omitempty" yaml:"runAsNonRoot,omitempty"`
	RuntimeClassName              string                         `json:"runtimeClassName,omitempty" yaml:"runtimeClassName,omitempty"`
	Scale                         *int64                         `json:"scale,omitempty" yaml:"scale,omitempty"`
	Scheduling                    *Scheduling                    `json:"scheduling,omitempty" yaml:"scheduling,omitempty"`
	SeccompProfile                *SeccompProfile                `json:"seccompProfile,omitempty" yaml:"seccompProfile,omitempty"`
	Selector                      *LabelSelector                 `json:"selector,omitempty" yaml:"selector,omitempty"`
	ServiceAccountName            string                         `json:"serviceAccountName,omitempty" yaml:"serviceAccountName,omitempty"`
	SetHostnameAsFQDN             *bool                          `json:"setHostnameAsFQDN,omitempty" yaml:"setHostnameAsFQDN,omitempty"`
	ShareProcessNamespace         *bool                          `json:"shareProcessNamespace,omitempty" yaml:"shareProcessNamespace,omitempty"`
	StatefulSetConfig             *StatefulSetConfig             `json:"statefulSetConfig,omitempty" yaml:"statefulSetConfig,omitempty"`
	Subdomain                     string                         `json:"subdomain,omitempty" yaml:"subdomain,omitempty"`
	Sysctls                       []Sysctl                       `json:"sysctls,omitempty" yaml:"sysctls,omitempty"`
	TerminationGracePeriodSeconds *int64                         `json:"terminationGracePeriodSeconds,omitempty" yaml:"terminationGracePeriodSeconds,omitempty"`
	TopologySpreadConstraints     []TopologySpreadConstraint     `json:"topologySpreadConstraints,omitempty" yaml:"topologySpreadConstraints,omitempty"`
	Uid                           *int64                         `json:"uid,omitempty" yaml:"uid,omitempty"`
	Volumes                       []Volume                       `json:"volumes,omitempty" yaml:"volumes,omitempty"`
	WindowsOptions                *WindowsSecurityContextOptions `json:"windowsOptions,omitempty" yaml:"windowsOptions,omitempty"`
}


$LOAD_PATH.unshift './lib'

require 'tilia/dav'
require 'rack'

Time.zone = 'Berlin'

testserver_root = File.join(File.dirname(__FILE__), 'testserver_root')
Dir.mkdir(testserver_root) unless File.exist?(testserver_root)

fail "could not create root directory #{testserver_root}" unless File.directory?(testserver_root)

app = proc do |env|
  root = Tilia::Dav::Fs::Directory.new(testserver_root)
  server = Tilia::Dav::Server.new(env, [root])

  server.add_plugin(Tilia::Dav::Browser::Plugin.new)

  server.exec
end

Rack::Handler::WEBrick.run app


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using iTextSharp.text;
using iTextSharp.text.pdf;
using SysAgropec.Class;
using SysAgropec.Models;

namespace SysAgropec.Class
{
    public class Relatorio : RelatorioHelper
    {

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

            PdfPTable table = new PdfPTable(5);
            BaseColor preto = new BaseColor(0, 0, 0);
            BaseColor fundo = new BaseColor(200, 200, 200);
            Font font = FontFactory.GetFont("Verdana", 8, Font.NORMAL, preto);
            Font titulo = FontFactory.GetFont("Verdana", 8, Font.BOLD, preto);

            float[] colsW = { 10, 10, 10, 10, 10 };
            table.SetWidths(colsW);
            table.HeaderRows = 1;
            table.WidthPercentage = 100f;

            table.DefaultCell.Border = PdfPCell.BOTTOM_BORDER;
            table.DefaultCell.BorderColor = preto;
            table.DefaultCell.BorderColorBottom = new BaseColor(255, 255, 255);
            table.DefaultCell.Padding = 10;

            if (TipoRelatorio == 0) {

                table.AddCell(getNewCell("Animal", titulo, Element.ALIGN_LEFT, 10, PdfPCell.BOTTOM_BORDER, preto, fundo));
                table.AddCell(getNewCell("Registro", titulo, Element.ALIGN_LEFT, 10, PdfPCell.BOTTOM_BORDER, preto, fundo));
                table.AddCell(getNewCell("Tatuagem", titulo, Element.ALIGN_LEFT, 10, PdfPCell.BOTTOM_BORDER, preto, fundo));
                table.AddCell(getNewCell("Sexo", titulo, Element.ALIGN_LEFT, 10, PdfPCell.BOTTOM_BORDER, preto, fundo));
                table.AddCell(getNewCell("Cadastrado Em:", titulo, Element.ALIGN_LEFT, 10, PdfPCell.BOTTOM_BORDER, preto, fundo));

                AnimalViewModel a = new AnimalViewModel();

                HttpContext httpContext = HttpContext.Current;

                int idfazenda =Convert.ToInt16( httpContext.ApplicationInstance.Session["idfazenda"].ToString());

                var animais = a.RelatorioAnimais(idfazenda, datIni, datFin);

                var animalOLD = 0;

                foreach(var an in animais)
                {

                    if (an.Raca_ID != animalOLD)
                    {
                        var cell = getNewCell("Raça: " + an.nomeraca, titulo, Element.ALIGN_LEFT, 10, PdfPCell.BOTTOM_BORDER);
                        cell.Colspan = 5;
                        table.AddCell(cell);
                        animalOLD = an.Raca_ID;
                    }

                    table.AddCell(getNewCell(an.Descricao, font, Element.ALIGN_LEFT, 5, PdfPCell.BOTTOM_BORDER));
                    table.AddCell(getNewCell(an.Registro, font, Element.ALIGN_LEFT, 5, PdfPCell.BOTTOM_BORDER));
                    table.AddCell(getNewCell(an.Tatuagem, font, Element.ALIGN_LEFT, 5, PdfPCell.BOTTOM_BORDER));
                    table.AddCell(getNewCell(an.descriSexo, font, Element.ALIGN_LEFT, 5, PdfPCell.BOTTOM_BORDER));
                    table.AddCell(getNewCell(an.Datacadastro.ToString("dd/MM/yyyy"), font, Element.ALIGN_LEFT, 5, PdfPCell.BOTTOM_BORDER));

                }

                var cell2 = getNewCell("Filtros de Pesquisa " + Filtros, titulo, Element.ALIGN_LEFT, 10, PdfPCell.BOTTOM_BORDER);
                cell2.Colspan = 5;
                table.AddCell(cell2);

            }
            else if(TipoRelatorio == 1)
            {
                table.AddCell(getNewCell("Medicamento", titulo, Element.ALIGN_LEFT, 5, PdfPCell.BOTTOM_BORDER, preto, fundo));
                table.AddCell(getNewCell("Qtd Mínima", titulo, Element.ALIGN_LEFT, 5, PdfPCell.BOTTOM_BORDER, preto, fundo));
                table.AddCell(getNewCell("Qtd Atual", titulo, Element.ALIGN_LEFT, 5, PdfPCell.BOTTOM_BORDER, preto, fundo));
                table.AddCell(getNewCell("Estocado Em:", titulo, Element.ALIGN_LEFT, 5, PdfPCell.BOTTOM_BORDER, preto, fundo));
                table.AddCell(getNewCell("", titulo, Element.ALIGN_LEFT, 5, PdfPCell.BOTTOM_BORDER, preto, fundo));

                Estoque_MedicamentoViewModel a = new Estoque_MedicamentoViewModel();

                var es = a.RelatorioEstoque(datIni, datFin);

                foreach (var an in es)
                {

                    table.AddCell(getNewCell(an.nomeMedicamento, font, Element.ALIGN_LEFT, 5, PdfPCell.BOTTOM_BORDER));
                    table.AddCell(getNewCell(Convert.ToString(an.Quantidademinima), font, Element.ALIGN_LEFT, 5, PdfPCell.BOTTOM_BORDER));
                    table.AddCell(getNewCell(Convert.ToString(an.Quantidadeatual), font, Element.ALIGN_LEFT, 5, PdfPCell.BOTTOM_BORDER));
                    table.AddCell(getNewCell(an.Data_Estocado.ToString("dd/MM/yyyy"), font, Element.ALIGN_LEFT, 5, PdfPCell.BOTTOM_BORDER));
                    table.AddCell(getNewCell("", font, Element.ALIGN_LEFT, 5, PdfPCell.BOTTOM_BORDER));

                }

                var cell2 = getNewCell("Filtros de Pesquisa " + Filtros, titulo, Element.ALIGN_LEFT, 10, PdfPCell.BOTTOM_BORDER);
                cell2.Colspan = 5;
                table.AddCell(cell2);
            }
            else
            {
                table.AddCell(getNewCell("Data de Produção", titulo, Element.ALIGN_LEFT, 5, PdfPCell.BOTTOM_BORDER, preto, fundo));
                table.AddCell(getNewCell("Qtd (KG)", titulo, Element.ALIGN_LEFT, 5, PdfPCell.BOTTOM_BORDER, preto, fundo));
                table.AddCell(getNewCell("Observação", titulo, Element.ALIGN_LEFT, 5, PdfPCell.BOTTOM_BORDER, preto, fundo));
                table.AddCell(getNewCell("", titulo, Element.ALIGN_LEFT, 5, PdfPCell.BOTTOM_BORDER, preto, fundo));
                table.AddCell(getNewCell("", titulo, Element.ALIGN_LEFT, 5, PdfPCell.BOTTOM_BORDER, preto, fundo));

                ProducaoViewModel prod = new ProducaoViewModel();

                var prods = prod.RelatorioAnimais(datIni, datFin);

                var prodOLD = 0;

                double totalProduzido = 0;
                double totalGeral = 0;
                int contador = 0;
                foreach (var pr in prods)
                {
                    int quantidadeRegistros = prods.Count;
                    contador++;

                    if (pr.Animail_ID != prodOLD)
                    {
                        if (totalProduzido > 0)
                        {
                            var cell1 = getNewCell("Total produzido: " + totalProduzido + " KG", titulo, Element.ALIGN_LEFT, 10, PdfPCell.BOTTOM_BORDER);
                            cell1.Colspan = 5;
                            table.AddCell(cell1);
                            totalGeral = totalGeral + totalProduzido;

                        }

                        var cell = getNewCell("Animal: " + pr.nomeAnimal, titulo, Element.ALIGN_LEFT, 10, PdfPCell.BOTTOM_BORDER);
                        cell.Colspan = 5;
                        table.AddCell(cell);
                        prodOLD = pr.Animail_ID;

                        totalProduzido = 0;
                    }

                    table.AddCell(getNewCell(pr.Datarealizada.ToShortDateString(), font, Element.ALIGN_LEFT, 5, PdfPCell.BOTTOM_BORDER));
                    table.AddCell(getNewCell(Convert.ToString(pr.Quantidade), font, Element.ALIGN_LEFT, 5, PdfPCell.BOTTOM_BORDER));
                    table.AddCell(getNewCell(pr.Observacao, font, Element.ALIGN_LEFT, 5, PdfPCell.BOTTOM_BORDER));
                    table.AddCell(getNewCell("", font, Element.ALIGN_LEFT, 5, PdfPCell.BOTTOM_BORDER));
                    table.AddCell(getNewCell("", font, Element.ALIGN_LEFT, 5, PdfPCell.BOTTOM_BORDER));
                    totalProduzido = totalProduzido + pr.Quantidade;

                    if (contador == quantidadeRegistros)
                    {
                        var cell1 = getNewCell("Total produzido: " + totalProduzido + " KG", titulo, Element.ALIGN_LEFT, 10, PdfPCell.BOTTOM_BORDER);
                        cell1.Colspan = 5;
                        table.AddCell(cell1);

                        totalGeral = totalGeral + totalProduzido;
                    }

                }

                var cell2 = getNewCell("Total Geral:  " + totalGeral + " KG", titulo, Element.ALIGN_LEFT, 10, PdfPCell.BOTTOM_BORDER);
                cell2.Colspan = 5;
                table.AddCell(cell2);

                var cell3 = getNewCell("Filtros de Pesquisa " + Filtros, titulo, Element.ALIGN_LEFT, 10, PdfPCell.BOTTOM_BORDER);
                cell3.Colspan = 5;
                table.AddCell(cell3);

            }

            doc.Add(table);
        }

    }
}


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

<TITLE>
Uses of Class org.apache.poi.hwpf.model.types.TBDAbstractType (POI API Documentation)
</TITLE>

<META NAME="date" CONTENT="2012-03-17">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Uses of Class
org.apache.poi.hwpf.model.types.TBDAbstractType

Packages that use TBDAbstractType

org.apache.poi.hwpf.model

Uses of TBDAbstractType in org.apache.poi.hwpf.model

Subclasses of TBDAbstractType in org.apache.poi.hwpf.model

 class
TabDescriptor

          Tab descriptor.

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

                Copyright 2012 The Apache Software Foundation or
        its licensors, as applicable.


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

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>V8 API Reference Guide for node.js v8.6.0: Member List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

V8 API Reference Guide for node.js v8.6.0

Main Page

Namespaces

Classes

Files

Examples

          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Class List

Class Index

Class Hierarchy

Class Members

v8

Task

v8::Task Member List

This is the complete list of members for v8::Task, including all inherited members.

Run()=0 (defined in v8::Task)	v8::Task	pure virtual

~Task()=default (defined in v8::Task)	v8::Task	virtual

<address class="footer">
Generated by

 1.8.11
</address>


title: Telerik.Web.UI.BreadcrumbClientEvents
page_title: Telerik.Web.UI.BreadcrumbClientEvents
description: Telerik.Web.UI.BreadcrumbClientEvents
---

# Telerik.Web.UI.BreadcrumbClientEvents

Defines the client events handlers.

## Inheritance Hierarchy

* System.Object
* Telerik.Web.StateManager : IMarkableStateManager, IStateManager
* Telerik.Web.UI.BreadcrumbClientEvents : IDefaultCheck

## Properties

###  OnChange `String`

Fires when the value of the Breadcrumb is changed.

###  OnClick `String`

Fires when an item or a rootitem is clicked.

###  OnInitialize `String`

Fired when the control is initialized.

###  OnLoad `String`

Fired when the control is loaded on the page.


            <form name="confirmFulfillment" novalidate>

Confirm Alumni Request Fulfillment for {{ orgName }}

                    <textarea class="mdl-textfield__input" type="text" ng-model="alumniNames" placeholder="Names of alumni that you have chosen (each on a different line)" required>
                        </textarea>

                    <textarea class="mdl-textfield__input" type="text" ng-model="alumniEmails" placeholder="Their emails in same order (each on a different line)" required>
                        </textarea>

                <button ng-disabled="confirmFulfillment.$invalid || numAlumni == 0" class="mdl-button mdl-shadow--2dp" ng-click="fulfill()">Fulfill!</button>
            </form>


package site.zhangqun.lanagina;

import org.junit.Test;

import static org.junit.Assert.*;

/**
 * Example local unit test, which will execute on the development machine (host).
 *
 * @see Testing documentation
 */
public class ExampleUnitTest {
    @Test
    public void addition_isCorrect() throws Exception {
        assertEquals(4, 2 + 2);
    }
}


"""
    relief.schema.meta
    ~~~~~~~~~~~~~~~~~~

    :copyright: 2013 by Daniel Neuhäuser
    :license: BSD, see LICENSE.rst for details
"""
from relief.utils import class_cloner
from relief.constants import Unspecified
from relief.schema.core import BaseElement

class Maybe(BaseElement):
    """
    A meta element that represents an element that is optional. The value of
    this element will be `None` unless the contained element's value is not
    `Unspecified`.

    >>> from relief import Unicode
    >>> Maybe.of(Unicode)().value
    None
    >>> Maybe.of(Unicode)(u'foobar').value
    u'foobar

    .. versionadded:: 2.1.0
    """
    member_schema = None

    @class_cloner
    def of(cls, schema):
        cls.member_schema = schema
        return cls

    def __init__(self, value=Unspecified):
        self.member = self.member_schema()
        super(Maybe, self).__init__(value)
        if self.member_schema is None:
            raise TypeError('member_schema is unknown')

    @property
    def value(self):
        return None if self.member.value is Unspecified else self.member.value

    @value.setter
    def value(self, new_value):
        if new_value is not Unspecified:
            raise AttributeError("can't set attribute")

    def serialize(self, value):
        if value is None:
            return Unspecified
        return self.member.serialize(value)

    def unserialize(self, raw_value):
        value = self.member.unserialize(raw_value)
        return None if value is Unspecified else value

    def set_from_raw(self, raw_value):
        self.raw_value = raw_value
        value = self.unserialize(raw_value)
        if value is None:
            self.member.set_from_raw(Unspecified)
        else:
            self.member.set_from_raw(raw_value)
        self.is_valid = None

    def set_from_native(self, value):
        self.member.set_from_native(value)
        self.raw_value = self.member.raw_value
        self.is_valid = None

    def validate(self, context=None):
        if context is None:
            context = {}
        self.is_valid = self.member.validate() or self.value is None
        return self.is_valid


package serialization

import (
	"github.com/cloudfoundry-incubator/receptor"
	"github.com/cloudfoundry-incubator/runtime-schema/models"
)

func ActualLRPToResponse(actualLRP models.ActualLRP, evacuating bool) receptor.ActualLRPResponse {
	return receptor.ActualLRPResponse{
		ProcessGuid:     actualLRP.ProcessGuid,
		InstanceGuid:    actualLRP.InstanceGuid,
		CellID:          actualLRP.CellID,
		Domain:          actualLRP.Domain,
		Index:           actualLRP.Index,
		Address:         actualLRP.Address,
		Ports:           PortMappingFromModel(actualLRP.Ports),
		State:           actualLRPStateToResponseState(actualLRP.State),
		PlacementError:  actualLRP.PlacementError,
		Since:           actualLRP.Since,
		CrashCount:      actualLRP.CrashCount,
		CrashReason:     actualLRP.CrashReason,
		Evacuating:      evacuating,
		ModificationTag: actualLRPModificationTagToResponseModificationTag(actualLRP.ModificationTag),
	}
}

func actualLRPStateToResponseState(state models.ActualLRPState) receptor.ActualLRPState {
	switch state {
	case models.ActualLRPStateUnclaimed:
		return receptor.ActualLRPStateUnclaimed
	case models.ActualLRPStateClaimed:
		return receptor.ActualLRPStateClaimed
	case models.ActualLRPStateRunning:
		return receptor.ActualLRPStateRunning
	case models.ActualLRPStateCrashed:
		return receptor.ActualLRPStateCrashed
	default:
		return receptor.ActualLRPStateInvalid
	}
}

func actualLRPModificationTagToResponseModificationTag(modificationTag models.ModificationTag) receptor.ModificationTag {
	return receptor.ModificationTag{
		Epoch: modificationTag.Epoch,
		Index: modificationTag.Index,
	}
}


package org.apache.webapp.admin.realm;

import java.io.IOException;
import java.net.URLEncoder;
import java.util.Locale;
import java.util.ArrayList;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.util.MessageResources;
import org.apache.webapp.admin.LabelValueBean;
import org.apache.webapp.admin.Lists;

/**
 * The Action that sets up Add Realm transactions.
 *
 * @author Manveen Kaur
 * @version $Revision: 1.5 $ $Date: 2002/08/13 22:35:20 $
 */

public class AddRealmAction extends Action {

    /**
     * The MessageResources we will be retrieving messages from.
     */
    private MessageResources resources = null;

    // the list for types of realms
    private ArrayList types = null;

    // --------------------------------------------------------- Public Methods

    /**
     * Process the specified HTTP request, and create the corresponding HTTP
     * response (or forward to another web component that will create it).
     * Return an ActionForward instance describing where and how
     * control should be forwarded, or null if the response has
     * already been completed.
     *
     * @param mapping The ActionMapping used to select this instance
     * @param actionForm The optional ActionForm bean for this request (if any)
     * @param request The HTTP request we are processing
     * @param response The HTTP response we are creating
     *
     * @exception IOException if an input/output error occurs
     * @exception ServletException if a servlet exception occurs
     */
    public ActionForward perform(ActionMapping mapping,
                                 ActionForm form,
                                 HttpServletRequest request,
                                 HttpServletResponse response)
        throws IOException, ServletException {

        // Acquire the resources that we need
        HttpSession session = request.getSession();
        Locale locale = (Locale) session.getAttribute(Action.LOCALE_KEY);
        if (resources == null) {
            resources = getServlet().getResources();
        }

        // Fill in the form values for display and editing

        String realmTypes[] = new String[4];
        realmTypes[0] = "UserDatabaseRealm";
        realmTypes[1] = "JNDIRealm";
        realmTypes[2] = "MemoryRealm";
        realmTypes[3] = "JDBCRealm";

        String parent = request.getParameter("parent");
        String type = request.getParameter("type");
        if (type == null)
            type = "UserDatabaseRealm";    // default type is UserDatabaseRealm

        types = new ArrayList();
        // the first element in the select list should be the type selected
        types.add(new LabelValueBean(type,
                "/admin/AddRealm.do?parent=" + URLEncoder.encode(parent)
                + "&type=" + type));
        for (int i=0; i< realmTypes.length; i++) {
            if (!type.equalsIgnoreCase(realmTypes[i])) {
                types.add(new LabelValueBean(realmTypes[i],
                "/admin/AddRealm.do?parent=" + URLEncoder.encode(parent)
                + "&type=" + realmTypes[i]));
            }
        }

        if ("UserDatabaseRealm".equalsIgnoreCase(type)) {
            createUserDatabaseRealm(session, parent);
        } else if ("JNDIRealm".equalsIgnoreCase(type)) {
            createJNDIRealm(session, parent);
        } else if ("MemoryRealm".equalsIgnoreCase(type)) {
            createMemoryRealm(session, parent);
        } else {
            //JDBC
            createJDBCRealm(session, parent);
        }
        // Forward to the realm display page
        return (mapping.findForward(type));

    }

    private void createUserDatabaseRealm(HttpSession session, String parent) {

        UserDatabaseRealmForm realmFm = new UserDatabaseRealmForm();
        session.setAttribute("userDatabaseRealmForm", realmFm);
        realmFm.setAdminAction("Create");
        realmFm.setObjectName("");
        realmFm.setParentObjectName(parent);
        String realmType = "UserDatabaseRealm";
        realmFm.setNodeLabel("Realm (" + realmType + ")");
        realmFm.setRealmType(realmType);
        realmFm.setDebugLvl("0");
        realmFm.setResource("");
        realmFm.setDebugLvlVals(Lists.getDebugLevels());
        realmFm.setRealmTypeVals(types);
    }

    private void createJNDIRealm(HttpSession session, String parent) {

        JNDIRealmForm realmFm = new JNDIRealmForm();
        session.setAttribute("jndiRealmForm", realmFm);
        realmFm.setAdminAction("Create");
        realmFm.setObjectName("");
        realmFm.setParentObjectName(parent);
        String realmType = "JNDIRealm";
        realmFm.setNodeLabel("Realm (" + realmType + ")");
        realmFm.setRealmType(realmType);
        realmFm.setDebugLvl("0");
        realmFm.setDigest("");
        realmFm.setRoleBase("");
        realmFm.setUserSubtree("false");
        realmFm.setRoleSubtree("false");
        realmFm.setRolePattern("");
        realmFm.setUserRoleName("");
        realmFm.setRoleName("");
        realmFm.setRoleBase("");
        realmFm.setContextFactory("");
        realmFm.setUserBase("");
        realmFm.setUserPattern("");
        realmFm.setUserSearch("");
        realmFm.setUserPassword("");
        realmFm.setConnectionName("");
        realmFm.setConnectionPassword("");
        realmFm.setConnectionURL("");
        realmFm.setDebugLvlVals(Lists.getDebugLevels());
        realmFm.setSearchVals(Lists.getBooleanValues());
        realmFm.setRealmTypeVals(types);
    }

    private void createMemoryRealm(HttpSession session, String parent) {

        MemoryRealmForm realmFm = new MemoryRealmForm();
        session.setAttribute("memoryRealmForm", realmFm);
        realmFm.setAdminAction("Create");
        realmFm.setObjectName("");
        realmFm.setParentObjectName(parent);
        String realmType = "MemoryRealm";
        realmFm.setNodeLabel("Realm (" + realmType + ")");
        realmFm.setRealmType(realmType);
        realmFm.setDebugLvl("0");
        realmFm.setPathName("");
        realmFm.setDebugLvlVals(Lists.getDebugLevels());
        realmFm.setRealmTypeVals(types);
    }

    private void createJDBCRealm(HttpSession session, String parent) {

        JDBCRealmForm realmFm = new JDBCRealmForm();
        session.setAttribute("jdbcRealmForm", realmFm);
        realmFm.setAdminAction("Create");
        realmFm.setObjectName("");
        realmFm.setParentObjectName(parent);
        String realmType = "JDBCRealm";
        realmFm.setNodeLabel("Realm (" + realmType + ")");
        realmFm.setRealmType(realmType);
        realmFm.setDebugLvl("0");
        realmFm.setDigest("");
        realmFm.setDriver("");
        realmFm.setRoleNameCol("");
        realmFm.setPasswordCol("");
        realmFm.setUserTable("");
        realmFm.setRoleTable("");
        realmFm.setConnectionName("");
        realmFm.setConnectionPassword("");
        realmFm.setConnectionURL("");
        realmFm.setDebugLvlVals(Lists.getDebugLevels());
        realmFm.setRealmTypeVals(types);
    }

}