text:
<?php

namespace Hautelook\AliceBundle\HttpKernel;

use Hautelook\AliceBundle\NotCallableTrait;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\KernelInterface;

/**
 * @author Théo FIDRY <theo.fidry@gmail.com>
 */
class DummyKernel implements KernelInterface
{
    use NotCallableTrait;

    /**
     * {@inheritdoc}
     */
    public function serialize()
    {
        $this->__call(__METHOD__, \func_get_args());
    }

    /**
     * {@inheritdoc}
     */
    public function unserialize($serialized)
    {
        $this->__call(__METHOD__, \func_get_args());
    }

    /**
     * {@inheritdoc}
     */
    public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true)
    {
        $this->__call(__METHOD__, \func_get_args());
    }

    /**
     * {@inheritdoc}
     */
    public function registerBundles()
    {
        $this->__call(__METHOD__, \func_get_args());
    }

    /**
     * {@inheritdoc}
     */
    public function registerContainerConfiguration(\Symfony\Component\Config\Loader\LoaderInterface $loader)
    {
        $this->__call(__METHOD__, \func_get_args());
    }

    /**
     * {@inheritdoc}
     */
    public function boot()
    {
        // Do nothing
    }

    /**
     * {@inheritdoc}
     */
    public function shutdown()
    {
        $this->__call(__METHOD__, \func_get_args());
    }

    /**
     * {@inheritdoc}
     */
    public function getBundles()
    {
        return [];
    }

    /**
     * {@inheritdoc}
     */
    public function getBundle($name, $first = true)
    {
        $this->__call(__METHOD__, \func_get_args());
    }

    /**
     * {@inheritdoc}
     */
    public function locateResource($name, $dir = null, $first = true)
    {
        $this->__call(__METHOD__, \func_get_args());
    }

    /**
     * {@inheritdoc}
     */
    public function getName()
    {
        return 'fake';
    }

    /**
     * {@inheritdoc}
     */
    public function getEnvironment()
    {
        return 'fake_env';
    }

    /**
     * {@inheritdoc}
     */
    public function isDebug()
    {
        return true;
    }

    /**
     * {@inheritdoc}
     */
    public function getRootDir()
    {
        $this->__call(__METHOD__, \func_get_args());
    }

    /**
     * {@inheritdoc}
     */
    public function getContainer()
    {
        return new Container();
    }

    /**
     * {@inheritdoc}
     */
    public function getStartTime()
    {
        $this->__call(__METHOD__, \func_get_args());
    }

    /**
     * {@inheritdoc}
     */
    public function getCacheDir()
    {
        $this->__call(__METHOD__, \func_get_args());
    }

    /**
     * {@inheritdoc}
     */
    public function getLogDir()
    {
        $this->__call(__METHOD__, \func_get_args());
    }

    /**
     * {@inheritdoc}
     */
    public function getCharset()
    {
        $this->__call(__METHOD__, \func_get_args());
    }

    /**
     * {@inheritdoc}
     */
    public function isClassInActiveBundle($class)
    {
        $this->__call(__METHOD__, \func_get_args());
    }

    /**
     * {@inheritdoc}
     */
    public function getProjectDir()
    {
        $this->__call(__METHOD__, \func_get_args());
    }
}


text:
package org.ovirt.engine.ui.webadmin.section.main.view.popup.host;

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

import org.ovirt.engine.ui.common.view.popup.AbstractModelBoundPopupView;
import org.ovirt.engine.ui.common.widget.Align;
import org.ovirt.engine.ui.common.widget.RadioButtonsHorizontalPanel;
import org.ovirt.engine.ui.common.widget.dialog.InfoIcon;
import org.ovirt.engine.ui.common.widget.dialog.SimpleDialogPanel;
import org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor;
import org.ovirt.engine.ui.uicommonweb.models.hosts.HostSetupNetworksModel;
import org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel;
import org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel;
import org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel;
import org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkLabelModel;
import org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperation;
import org.ovirt.engine.ui.uicommonweb.models.hosts.network.OperationCandidateEventArgs;
import org.ovirt.engine.ui.uicompat.Event;
import org.ovirt.engine.ui.uicompat.EventArgs;
import org.ovirt.engine.ui.uicompat.IEventListener;
import org.ovirt.engine.ui.webadmin.ApplicationConstants;
import org.ovirt.engine.ui.webadmin.ApplicationMessages;
import org.ovirt.engine.ui.webadmin.ApplicationResources;
import org.ovirt.engine.ui.webadmin.ApplicationTemplates;
import org.ovirt.engine.ui.webadmin.gin.AssetProvider;
import org.ovirt.engine.ui.webadmin.section.main.presenter.popup.host.HostSetupNetworksPopupPresenterWidget;
import org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ExternalNetworkPanel;
import org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.InternalNetworkPanel;
import org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.InternalNetworksPanel;
import org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkGroup;
import org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkLabelPanel;
import org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkLabelPanel.NewNetworkLabelPanel;
import org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkPanel;
import org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkPanelsStyle;
import org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.SimpleNetworkItemsPanel;
import org.ovirt.engine.ui.webadmin.widget.editor.AnimatedVerticalPanel;
import org.ovirt.engine.ui.webadmin.widget.footer.StatusPanel;

import com.google.gwt.core.client.GWT;
import com.google.gwt.editor.client.SimpleBeanEditorDriver;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Panel;
import com.google.gwt.user.client.ui.ScrollPanel;
import com.google.inject.Inject;

public class HostSetupNetworksPopupView extends AbstractModelBoundPopupView<HostSetupNetworksModel> implements HostSetupNetworksPopupPresenterWidget.ViewDef {

    interface Driver extends SimpleBeanEditorDriver<HostSetupNetworksModel, HostSetupNetworksPopupView> {
    }

    interface ViewUiBinder extends UiBinder<SimpleDialogPanel, HostSetupNetworksPopupView> {
        ViewUiBinder uiBinder = GWT.create(ViewUiBinder.class);
    }

    @UiField
    RadioButtonsHorizontalPanel networksOrLabels;

    @UiField
    Panel networksPanel;

    @UiField
    Panel labelsPanel;

    @UiField
    InternalNetworksPanel internalNetworkList;

    @UiField
    SimpleNetworkItemsPanel<NetworkPanel> externalNetworkList;

    @UiField
    SimpleNetworkItemsPanel<NetworkLabelPanel> labelsList;

    @UiField(provided = true)
    InfoIcon externalNetworksInfo;

    @UiField
    AnimatedVerticalPanel nicList; /* if this panel is contained within a scroll panel, we need to add extra handling for drag-and-drop auto-scrolling. */

    @UiField
    @Ignore
    StatusPanel statusPanel;

    @UiField
    NetworkPanelsStyle style;

    @UiField(provided = true)
    @Path(value = "checkConnectivity.entity")
    EntityModelCheckBoxEditor checkConnectivity;

    @UiField(provided = true)
    @Path(value = "commitChanges.entity")
    EntityModelCheckBoxEditor commitChanges;

    @UiField(provided = true)
    InfoIcon checkConnInfo;

    @UiField(provided = true)
    InfoIcon commitChangesInfo;

    private final Driver driver = GWT.create(Driver.class);
    private final EventBus eventBus;

    private boolean rendered = false;
    private boolean keepStatusText;

    private final static ApplicationTemplates templates = AssetProvider.getTemplates();
    private final static ApplicationResources resources = AssetProvider.getResources();
    private final static ApplicationConstants constants = AssetProvider.getConstants();
    private final static ApplicationMessages messages = AssetProvider.getMessages();

    @Inject
    public HostSetupNetworksPopupView(EventBus eventBus) {
        super(eventBus);
        this.eventBus = eventBus;

        checkConnectivity = new EntityModelCheckBoxEditor(Align.RIGHT);
        commitChanges = new EntityModelCheckBoxEditor(Align.RIGHT);
        externalNetworksInfo = new InfoIcon(templates.italicText(constants.externalNetworksInfo()));
        checkConnInfo = new InfoIcon(templates.italicTwoLines(constants.checkConnectivityInfoPart1(), constants.checkConnectivityInfoPart2()));
        commitChangesInfo = new InfoIcon(templates.italicTwoLines(constants.commitChangesInfoPart1(), constants.commitChangesInfoPart2()));

        initWidget(ViewUiBinder.uiBinder.createAndBindUi(this));
        initStatusPanel();
        checkConnectivity.setContentWidgetContainerStyleName(style.checkCon());
        commitChanges.setContentWidgetContainerStyleName(style.commitChanges());
        initUnassignedItemsPanel();
        localize();

        setupNicListAutoScrolling();
        driver.initialize(this);
    }

    private void initUnassignedItemsPanel() {
        internalNetworkList.setStyle(style);
        externalNetworkList.setStyle(style);
        labelsList.setStyle(style);

        networksOrLabels.addRadioButton(constants.networksPanel(), true, true, new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                onRadioButtonSelection(true);
            }
        });
        networksOrLabels.addRadioButton(constants.labelsPanel(), false, true, new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                onRadioButtonSelection(false);
            }
        });
    }

    private void onRadioButtonSelection(boolean networksPanelSelected) {
        networksPanel.setVisible(networksPanelSelected);
        labelsPanel.setVisible(!networksPanelSelected);
    }

    private void localize() {
        checkConnectivity.setLabel(constants.checkConHostPopup());
        commitChanges.setLabel(constants.saveNetConfigHostPopup());
    }

    // Create an auto-scroll adapter for the nicList's parent ScrollPanel
    private void setupNicListAutoScrolling() {
        if (nicList.getParent() instanceof ScrollPanel) {
            ScrollPanel sp = (ScrollPanel)nicList.getParent();
            new AutoScrollAdapter(eventBus, sp);
        }
    }

    @Override
    public void edit(HostSetupNetworksModel uicommonModel) {
        driver.edit(uicommonModel);
        uicommonModel.getNicsChangedEvent().addListener(new IEventListener<EventArgs>() {
            @Override
            public void eventRaised(Event<? extends EventArgs> ev, Object sender, EventArgs args) {
                // this is called after both networks and nics were retrieved
                HostSetupNetworksModel model = (HostSetupNetworksModel) sender;
                if (!keepStatusText) {
                    initStatusPanel();
                }
                keepStatusText = false;
                updateNetworks(model.getNetworks());
                updateLabels(model.getNewNetworkLabelModel(), model.getLabels());
                updateNics(model.getNics());
                // mark as rendered
                rendered = true;
            }
        });

        uicommonModel.getOperationCandidateEvent().addListener(new IEventListener<OperationCandidateEventArgs>() {
            @Override
            public void eventRaised(Event<? extends OperationCandidateEventArgs> ev,
                    Object sender,
                    OperationCandidateEventArgs args) {

                NetworkOperation candidate = args.getCandidate();
                NetworkItemModel<?> op1 = args.getOp1();
                NetworkItemModel<?> op2 = args.getOp2();

                if (candidate == null) {
                    setErrorStatus(constants.noValidActionSetupNetwork());
                } else {
                    if (candidate.isErroneousOperation()) {
                        setErrorStatus(candidate.getMessage(op1, op2));
                    } else {
                        if (candidate.isDisplayNetworkAffected(op1, op2)) {
                            setWarningStatus(messages.moveDisplayNetworkWarning(candidate.getMessage(op1,
                                    op2)));
                        } else {
                            setValidStatus(candidate.getMessage(op1, op2));
                        }
                    }
                }
            }
        });

        internalNetworkList.setSetupModel(uicommonModel);
        externalNetworkList.setSetupModel(uicommonModel);
        labelsList.setSetupModel(uicommonModel);
    }

    @Override
    public HostSetupNetworksModel flush() {
        return driver.flush();
    }

    private void updateNetworks(List<LogicalNetworkModel> allNetworks) {
        internalNetworkList.clear();
        externalNetworkList.clear();
        Collections.sort(allNetworks);
        List<NetworkPanel> staticNetworkPanels = new ArrayList<>();
        List<NetworkPanel> dynamicNetworkPanels = new ArrayList<>();
        for (LogicalNetworkModel network : allNetworks) {
            if (network.getNetwork().isExternal()) {
                dynamicNetworkPanels.add(new ExternalNetworkPanel(network, style));
            } else if (!network.isAttached()) {
                staticNetworkPanels.add(new InternalNetworkPanel(network, style));
            }
        }
        internalNetworkList.addAll(staticNetworkPanels, !rendered);
        externalNetworkList.addAll(dynamicNetworkPanels, !rendered);
    }

    private void updateLabels(NetworkLabelModel newLabelModel, List<NetworkLabelModel> labels) {
        labelsList.clear();

        List<NetworkLabelPanel> labelPanels = new ArrayList<>();
        labelPanels.add(new NewNetworkLabelPanel(newLabelModel, style));

        Collections.sort(labels);
        for (NetworkLabelModel label : labels) {
            if (!label.isAttached()) {
                labelPanels.add(new NetworkLabelPanel(label, style));
            }
        }
        labelsList.addAll(labelPanels, !rendered);
    }

    private void updateNics(List<NetworkInterfaceModel> nics) {
        nicList.clear();
        Collections.sort(nics);
        List<NetworkGroup> groups = new ArrayList<NetworkGroup>();
        for (NetworkInterfaceModel nic : nics) {
            groups.add(new NetworkGroup(nic, eventBus, style));
        }
        nicList.addAll(groups, !rendered);
    }

    private void initStatusPanel() {
        setValidStatus(constants.dragToMakeChangesSetupNetwork());
    }

    private void setValidStatus(String message) {
        keepStatusText = false;
        statusPanel.setTextAndStyle(message, style.statusPanel(), style.statusLabel());
    }

    private void setWarningStatus(String message) {
        keepStatusText = true;
        statusPanel.setTextAndStyle(message, style.warningPanel(), style.warningLabel());
    }

    private void setErrorStatus(String message) {
        keepStatusText = false;
        statusPanel.setTextAndStyle(message, style.errorPanel(), style.errorLabel());
    }
}

redpajama_set_name: RedPajamaGithub


text:
use indy_crypto::cl::MasterSecret as CryptoMasterSecret;

use named_type::NamedType;

#[derive(Debug, Deserialize, Serialize, NamedType)]
pub struct MasterSecret {
    pub value: CryptoMasterSecret,
}


text:
package org.jenerator.function;

public interface ByteToIntFunction {
    int applyAsInt(byte t);
}


text:
<!doctype html>

    <meta charset="utf-8">

    <title>Update v2.0.0</title>

    <link rel="stylesheet" href="common.css">

Welcome to "GitHub Contributions" v2.0.0!

        Thanks for updating and using v1!

        v2.0.0 allows you to customize GitHub's contribution view, instead
        of just providing the longest yearly streak.

        Be sure to select your
                preferences!

        Now, by default, the extension doesn't modify contribution views.

        You get to pick and choose which information is displayed, and how.

        You can read more in-depth here.

        You can select your preferences under
        options in your Chrome Extensions
        tab (chrome://extensions).

        Or by clicking the browser bar icon.


text:
lifx is a PHP package for the LIFX HTTP API.

The author is not affiliated with LIFX and LIFX is not involved in the development of this package.

## Synopsis

This wrapper allows users to execute basic calls to the LIFX HTTP REST API through PHP.

## Code Example

``` php
$arr=array(
	'power'=>'on',
	'color'=>'red',
	'brightness'=>0.5,
	'duration'=>5
);
$lights=new Lifx();
$lights->states($arr);
```

## Motivation

This project was started as a means for communicating results in a PHP/MySQL web portal to the physical world via a light bulb.

https://www.youtube.com/watch?v=fyV9ejrJONw

## Installation

1. Sign up via app and connect light(s).
2. Sign in to LIFX Cloud (https://cloud.lifx.com/sign_in)
3. Click email in top right and then click settings.
4. Generate new API token
5. include "lifx.php" in your PHP script & create object.

``` php
include "lifx.php"
```

``` php
//Pass in API token
$lights=new Lifx("YOUR_API_KEY");

//Or set API token in lifx.php class
$lights=new Lifx();
```

## Additional Notes

Moving a bulb to a different network caused some issues.  After doing this I had to claim my bulb via the mobile app or the API would not find it.  This URL helped out a lot.

https://support.lifx.com/hc/en-us/articles/203711234-Connecting-your-LIFX-to-the-Cloud

## API Reference

Refer to the LIFX API documentation for additional help.

https://api.developer.lifx.com/docs/

## Contributors

This is open for anyone to contribute.  It is pretty basic but I am looking at making a mashup of this with the Alexa Voice Service API.

## Credits

- [Gene Kelly](https://github.com/ewkcoder)

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.


text:
make_helper(inv);
make_helper(nemu_trap);

#endif


text:
using System;
using System.Linq;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Diagnostics;

#if NETFX_CORE || WINDOWS_PHONE
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
#elif DROID
using NUnit.Framework;
using TestClassAttribute = NUnit.Framework.TestFixtureAttribute;
using TestInitializeAttribute = NUnit.Framework.SetUpAttribute;
using TestCleanupAttribute = NUnit.Framework.TearDownAttribute;
using TestMethodAttribute = NUnit.Framework.TestAttribute;
using TestContext = System.Console;
#else
using Microsoft.VisualStudio.TestTools.UnitTesting;
#if SILVERLIGHT
using Microsoft.Silverlight.Testing;
using System.IO.IsolatedStorage;
#endif
#endif

namespace Lex.Db
{
#if WINDOWS_PHONE || !SILVERLIGHT
  [AttributeUsage(AttributeTargets.Method)]
  public class AsynchronousAttribute : Attribute { }

  public class WorkItemTest
  {
    public void TestComplete() { }
  }
#endif

  [TestClass]
  public class DbTests : WorkItemTest
  {
#if !DROID
    public TestContext TestContext { get; set; }
#endif

    DbInstance db;
    DbTable<MyData> table;

    DbInstance Prepare()
    {
      var db = new DbInstance("MyDatabase");
      db.Map<MyData>().Automap(i => i.Id, true);
      db.Initialize();
      return db;
    }

    [TestMethod]
    public void TestPKTypes()
    {
      TestPKKey(i => i.KeyBool, (o, v) => o.KeyBool = v, true);
      TestPKKey(i => i.KeyBool, (o, v) => o.KeyBool = v, false);

      TestPKKey(i => i.KeyBoolN, (o, v) => o.KeyBoolN = v, null);
      TestPKKey(i => i.KeyBoolN, (o, v) => o.KeyBoolN = v, true);
      TestPKKey(i => i.KeyBoolN, (o, v) => o.KeyBoolN = v, false);

      TestPKKey(i => i.KeyGuid, (o, v) => o.KeyGuid = v, Guid.NewGuid());
      TestPKKey(i => i.KeyGuidN, (o, v) => o.KeyGuidN = v, Guid.NewGuid());
      TestPKKey(i => i.KeyGuidN, (o, v) => o.KeyGuidN = v, null);

    }

    public void TestPKKey<T>(Expression<Func<MyDataKeys, T>> pkGetter, Action<MyDataKeys, T> pkSetter, T key)
    {
      var db = new DbInstance("DbKeys");
      db.Map<MyDataKeys>().Key(pkGetter);
      db.Initialize();
      var getter = pkGetter.Compile();
      var obj1 = new MyDataKeys();
      pkSetter(obj1, key);
      db.Save(obj1);

      var obj2 = db.LoadByKey<MyDataKeys>(key);

      Assert.AreEqual(getter(obj1), getter(obj2));

      db.Purge();
    }
#if NETFX_CORE
    [TestMethod]
    public void TestPackageLocation()
    {
      using (var db = new DbInstance("TestPackage", Windows.ApplicationModel.Package.Current.InstalledLocation))
      {
        db.Map<MyData>().Automap(i => i.Id, true);
        db.Initialize();

        db.Save(new MyData());
      }
    }
#endif

    [TestInitialize]
    public void PurgeDb()
    {
      using (var i = Prepare())
        i.Purge();

      db = Prepare();
      table = db.Table<MyData>();
    }

    [TestCleanup]
    public void CleanUp()
    {
      Debugger.Break();
      db.Purge();
      db.Dispose();
    }

    [TestMethod]
    public void OpenDb()
    {
      var db = new DbInstance("My Database");
      db.Initialize();
    }

    [TestMethod]
    public void OpenDbComplexPath()
    {
      var db = new DbInstance(@"My Database\My Schema");
      db.Initialize();
    }

#if NETFX_CORE
    [TestMethod]
    public void OpenDbComplexPath2()
    {
      var db = new DbInstance(@"My Database\My Schema", Windows.Storage.ApplicationData.Current.TemporaryFolder);
      db.Initialize();
    }
#else
    public void OpenDbComplexPath2()
    {
      try
      {
        var db = new DbInstance(@"d:\test.db");
        db.Initialize();
      }
#if SILVERLIGHT
      catch (System.IO.IsolatedStorage.IsolatedStorageException)
      {
        // SL without ElevatedPriviliges does not allow absolute path access
      }
#endif
      finally
      {
      }
    }
#endif

    [TestMethod]
    //    [ExpectedException(typeof(InvalidOperationException))]
    public void DoubleOpenDbComplexPath()
    {
      try
      {
        var db = new DbInstance(@"My Database\My Schema");
        db.Initialize();
        db.Initialize();

        Assert.Fail("InvalidOperationException expected");
      }
      catch (InvalidOperationException)
      {
      }
    }

    [TestMethod]
    //    [ExpectedException(typeof(InvalidOperationException))]
    public void MapDb()
    {
      try
      {
        var db = new DbInstance(@"My Database\My Schema");
        db.Map<MyData>();

        db.Initialize();

        Assert.Fail("InvalidOperationException expected");
      }
      catch (InvalidOperationException)
      {
      }
    }

    [TestMethod]
    //    [ExpectedException(typeof(InvalidOperationException))]
    public void MapDbWrong()
    {
      try
      {
        var db = new DbInstance(@"My Database\My Schema");

        db.Initialize();

        db.Map<MyData>().Automap(i => i.Id);

        Assert.Fail("InvalidOperationException expected");
      }
      catch (InvalidOperationException)
      {
      }
    }

    [TestMethod]
    public void Indexing()
    {
      var db = new DbInstance(@"My Database\Indexing");

      db.Map<MyData>().Automap(i => i.Id, true)
        .WithIndex("LastName", i => i.Name, StringComparer.CurrentCulture)
        .WithIndex("LastNameText", i => i.Name, StringComparer.CurrentCultureIgnoreCase);
      db.Initialize();

      var table = db.Table<MyData>();
      table.Purge();

      db.BulkWrite(() =>
      {
        for (var s = 0; s < 100; s++)
          for (var i = 0; i < 10; i++)
            table.Save(new MyData { Name = "Test" + i });

        for (var s = 0; s < 100; s++)
          for (var i = 0; i < 10; i++)
            table.Save(new MyData { Name = "TeST" + i });
      });

      var list1count = table.IndexQueryByKey("LastName", "Test5").Count();
      var list2count = table.IndexQueryByKey("LastNameText", "TEst5").Count();

      Assert.AreEqual(list1count, 100);
      Assert.AreEqual(list2count, 200);
    }

    [TestMethod]
    public void IndexingDetails()
    {
      var db = new DbInstance(@"My Database\Indexing2");

      db.Map<MyData>().Automap(i => i.Id, true).WithIndex("Test", i => i.IntField);
      db.Initialize();

      var table = db.Table<MyData>();
      table.Purge();

      db.BulkWrite(() =>
      {
        table.Save(new MyData { IntField = 1 });
        table.Save(new MyData { IntField = 1 });
        table.Save(new MyData { IntField = 1 });
        table.Save(new MyData { IntField = 1 });
        table.Save(new MyData { IntField = 1 });
        table.Save(new MyData { IntField = 4 });
        table.Save(new MyData { IntField = 4 });
        table.Save(new MyData { IntField = 4 });
        table.Save(new MyData { IntField = 4 });
        table.Save(new MyData { IntField = 4 });
        table.Save(new MyData { IntField = 3 });
        table.Save(new MyData { IntField = 3 });
        table.Save(new MyData { IntField = 3 });
        table.Save(new MyData { IntField = 3 });
        table.Save(new MyData { IntField = 3 });
        table.Save(new MyData { IntField = 4 });
        table.Save(new MyData { IntField = 5 });
        table.Save(new MyData { IntField = 6 });
        table.Save(new MyData { IntField = 6 });
        table.Save(new MyData { IntField = 6 });
        table.Save(new MyData { IntField = 6 });
        table.Save(new MyData { IntField = 6 });
        table.Save(new MyData { IntField = 6 });
        table.Save(new MyData { IntField = 7 });
        table.Save(new MyData { IntField = 8 });
        table.Save(new MyData { IntField = 8 });
        table.Save(new MyData { IntField = 8 });
        table.Save(new MyData { IntField = 8 });
        table.Save(new MyData { IntField = 8 });
        table.Save(new MyData { IntField = 9 });
      });

      var list1 = table.LoadAll();

      var index = table.IndexQuery<int>("Test");

      Assert.AreEqual(index.Key(1).Count(), list1.Count(i => i.IntField == 1));
      Assert.AreEqual(index.Key(8).Count(), list1.Count(i => i.IntField == 8));

      Assert.AreEqual(index.GreaterThan(6, true).LessThan(8).Count(), list1.Count(i => i.IntField >= 6 && i.IntField < 8));

      IdSequenceEqual(index.GreaterThan(6).LessThan(8).ToList(), list1.Where(i => i.IntField > 6 && i.IntField < 8));
      IdSequenceEqual(index.LessThan(8).ToList(), list1.Where(i => i.IntField < 8));
      IdSequenceEqual(index.GreaterThan(6, true).ToList(), list1.Where(i => i.IntField >= 6));
      IdSequenceEqual(index.GreaterThan(7, true).LessThan(7).ToList(), list1.Where(i => i.IntField >= 7 && i.IntField < 7));
      IdSequenceEqual(index.GreaterThan(7).LessThan(7, true).ToList(), list1.Where(i => i.IntField > 7 && i.IntField <= 7));
    }

    static void IdSequenceEqual(IEnumerable<MyData> a, IEnumerable<MyData> b)
    {
      Assert.IsTrue(a.OrderBy(i => i.Id).Select(i => i.Id).SequenceEqual(b.OrderBy(i => i.Id).Select(i => i.Id)));
    }

    [TestMethod]
    public void LoadData()
    {
      var table = db.Table<MyData>();
      var items = table.LoadAll();
    }

    [TestMethod]
    public void SaveData()
    {
      var swatch = DateTime.Now;

      db.BulkWrite(() =>
      {
        table.Purge();
        var key = 1;
        var newObj = new MyData { Id = key, Name = "test" };
        table.Save(newObj);

        var obj = table.LoadByKey(key);

        Assert.AreEqual(newObj.Name, obj.Name);
#if !(NETFX_CORE || WINDOWS_PHONE)
        TestContext.WriteLine("Completed: " + (DateTime.Now - swatch).TotalMilliseconds);
#endif
      });
    }

    [TestMethod]
    public void SaveDataBulk()
    {
      db.Purge();
      db.BulkWrite(() =>
      {
        var cnt = DoSaveDataBulk();

        Assert.AreEqual(table.Count(), cnt);
      });
    }

    int DoSaveDataBulk()
    {
      table.Purge();
      var list = new List<MyData>();
      var cnt = 50000;
      for (int i = 0; i < cnt; i++)
        list.Add(new MyData { Name = "test " + i, LastName = "My Some Last Name " + i });

      table.Save(list);
      return cnt;
    }

    [TestMethod]
    public void LoadDataBulk()
    {
      db.BulkWrite(() =>
      {
        var cnt = DoSaveDataBulk();
        var load = table.LoadAll();
        Assert.AreEqual(cnt, load.Length);
      });
    }

    [TestMethod]
    public void Compact()
    {
      table.Compact();
    }

    [TestMethod]
    public void CheckInfo()
    {
      var info1 = table.GetInfo();
      var info2 = db.GetInfo();
    }

    [TestMethod]
    public void RountripNulls()
    {
      var obj = new MyData();

      table.Save(obj);

      var newObj = table.LoadByKey(obj.Id);

      Assert.AreEqual(obj.BoolNField, newObj.BoolNField);
      Assert.AreEqual(obj.IntNField, newObj.IntNField);
      Assert.AreEqual(obj.LongNField, newObj.LongNField);
      Assert.AreEqual(obj.DoubleNField, newObj.DoubleNField);
      Assert.AreEqual(obj.FloatNField, newObj.FloatNField);
      Assert.AreEqual(obj.DecimalNField, newObj.DecimalNField);
      Assert.AreEqual(obj.TimeSpanNField, newObj.TimeSpanNField);
      Assert.AreEqual(obj.DateTimeNField, newObj.DateTimeNField);
      Assert.AreEqual(obj.DateTimeOffsetNField, newObj.DateTimeOffsetNField);
      Assert.AreEqual(obj.GuidNField, newObj.GuidNField);
      Assert.AreEqual(obj.EnumNField, newObj.EnumNField);
      Assert.AreEqual(obj.Name, newObj.Name);

      var info = table.GetInfo();
      Assert.AreNotEqual(0, info.DataSize);
      Assert.AreNotEqual(0, info.IndexSize);
    }

#region Bool Rountrip Tests

    [TestMethod]
    public void RountripBool1()
    {
      var obj = new MyData { BoolField = true, BoolNField = false };

      table.Save(obj);

      var newObj = table.LoadByKey(obj.Id);

      Assert.AreEqual(obj.BoolField, newObj.BoolField);
      Assert.AreEqual(obj.BoolNField, newObj.BoolNField);
    }

    [TestMethod]
    public void RountripBool2()
    {
      var obj = new MyData { BoolField = false, BoolNField = true };

      table.Save(obj);

      var newObj = table.LoadByKey(obj.Id);

      Assert.AreEqual(obj.BoolField, newObj.BoolField);
      Assert.AreEqual(obj.BoolNField, newObj.BoolNField);
    }

#endregion

#region Int Rountrip Tests

    [TestMethod]
    public void RountripInt1()
    {
      var obj = new MyData { IntField = int.MaxValue, IntNField = int.MinValue };

      table.Save(obj);

      var newObj = table.LoadByKey(obj.Id);

      Assert.AreEqual(obj.IntField, newObj.IntField);
      Assert.AreEqual(obj.IntNField, newObj.IntNField);
    }

    [TestMethod]
    public void RountripInt2()
    {
      var obj = new MyData { IntField = int.MinValue, IntNField = int.MaxValue };

      table.Save(obj);

      var newObj = table.LoadByKey(obj.Id);

      Assert.AreEqual(obj.IntField, newObj.IntField);
      Assert.AreEqual(obj.IntNField, newObj.IntNField);
    }

#endregion

#region Long Rountrip Tests

    [TestMethod]
    public void RountripLong1()
    {
      var obj = new MyData { LongField = long.MaxValue, LongNField = long.MinValue };

      table.Save(obj);

      var newObj = table.LoadByKey(obj.Id);

      Assert.AreEqual(obj.LongField, newObj.LongField);
      Assert.AreEqual(obj.LongNField, newObj.LongNField);
    }

    [TestMethod]
    public void RountripLong2()
    {
      var obj = new MyData { LongField = long.MinValue, LongNField = long.MaxValue };

      table.Save(obj);

      var newObj = table.LoadByKey(obj.Id);

      Assert.AreEqual(obj.LongField, newObj.LongField);
      Assert.AreEqual(obj.LongNField, newObj.LongNField);
    }

#endregion

#region Float Rountrip Tests

    [TestMethod]
    public void RountripFloat1()
    {
      var obj = new MyData { FloatField = (float)Math.PI, FloatNField = (float)-Math.PI };

      table.Save(obj);

      var newObj = table.LoadByKey(obj.Id);

      Assert.AreEqual(obj.FloatField, newObj.FloatField);
      Assert.AreEqual(obj.FloatNField, newObj.FloatNField);
    }

#endregion

#region Double Rountrip Tests

    [TestMethod]
    public void RountripDouble1()
    {
      var obj = new MyData { DoubleField = Math.PI, DoubleNField = -Math.PI };

      table.Save(obj);

      var newObj = table.LoadByKey(obj.Id);

      Assert.AreEqual(obj.DoubleField, newObj.DoubleField);
      Assert.AreEqual(obj.DoubleNField, newObj.DoubleNField);
    }

#endregion

#region Decimal Rountrip Tests

    [TestMethod]
    public void RountripDecimal1()
    {
      var obj = new MyData { DecimalField = (decimal)Math.PI, DecimalNField = (decimal)-Math.PI };

      table.Save(obj);

      var newObj = table.LoadByKey(obj.Id);

      Assert.AreEqual(obj.DecimalField, newObj.DecimalField);
      Assert.AreEqual(obj.DecimalNField, newObj.DecimalNField);
    }

#endregion

#region String Rountrip Tests

    [TestMethod]
    public void RountripString1()
    {
      var obj = new MyData { Name = "Test ABC" };

      table.Save(obj);

      var newObj = table.LoadByKey(obj.Id);

      Assert.AreEqual(obj.Name, newObj.Name);
    }

#endregion

#region Guid Rountrip Tests

    [TestMethod]
    public void RountripGuid1()
    {
      var obj = new MyData { GuidField = Guid.NewGuid(), GuidNField = Guid.NewGuid() };

      table.Save(obj);

      var newObj = table.LoadByKey(obj.Id);

      Assert.AreEqual(obj.GuidField, newObj.GuidField);
      Assert.AreEqual(obj.GuidNField, newObj.GuidNField);
    }

#endregion

#region Enum Rountrip Tests

    [TestMethod]
    public void RountripEnum1()
    {
      var obj = new MyData { EnumField = TestEnum.EnumValue1, EnumNField = TestEnum.EnumValue2 };

      table.Save(obj);

      var newObj = table.LoadByKey(obj.Id);

      Assert.AreEqual(obj.EnumField, newObj.EnumField);
      Assert.AreEqual(obj.EnumNField, newObj.EnumNField);
    }

#endregion

#region TimeSpan Rountrip Tests

    [TestMethod]
    public void RountripTimeSpan1()
    {
      var obj = new MyData { TimeSpanField = new TimeSpan(1, 2, 3), TimeSpanNField = new TimeSpan(2, 3, 4) };

      table.Save(obj);

      var newObj = table.LoadByKey(obj.Id);

      Assert.AreEqual(obj.TimeSpanField, newObj.TimeSpanField);
      Assert.AreEqual(obj.TimeSpanNField, newObj.TimeSpanNField);
    }

#endregion

#region DateTime Rountrip Tests

    [TestMethod]
    public void RountripDateTime1()
    {
      var obj = new MyData { DateTimeField = new DateTime(1, 2, 3, 4, 5, 6), DateTimeNField = new DateTime(2, 3, 4, 5, 6, 7) };

      table.Save(obj);

      var newObj = table.LoadByKey(obj.Id);

      Assert.AreEqual(obj.DateTimeField, newObj.DateTimeField);
      Assert.AreEqual(obj.DateTimeNField, newObj.DateTimeNField);
    }

#endregion

#region DateTimeOffset Rountrip Tests

    [TestMethod]
    public void RountripDateTimeOffset1()
    {
      var obj = new MyData { DateTimeOffsetField = new DateTimeOffset(1, 2, 3, 4, 5, 6, TimeSpan.FromMinutes(60)), DateTimeOffsetNField = new DateTimeOffset(2, 3, 4, 5, 6, 7, TimeSpan.FromMinutes(120)) };

      table.Save(obj);

      var newObj = table.LoadByKey(obj.Id);

      Assert.AreEqual(obj.DateTimeOffsetField, newObj.DateTimeOffsetField);
      Assert.AreEqual(obj.DateTimeOffsetNField, newObj.DateTimeOffsetNField);
    }

#endregion

#region Lists Rountrip Tests

    [TestMethod]
    public void RountripLists1()
    {
      var obj = new MyData
      {
        ListField = new List<int> { 1, 2, 3, 4, 5 },
#if !SILVERLIGHT || WINDOWS_PHONE
        SortedSetField = new SortedSet<int> { 5, 2, 3, 4, 1 },
#endif
        DictField = new Dictionary<string, int> { { "test1", 111 }, { "test2", 222 }, { "test3", 333 } }
      };

      table.Save(obj);

      var newObj = table.LoadByKey(obj.Id);

      Assert.IsTrue(obj.ListField.SequenceEqual(newObj.ListField));
#if !SILVERLIGHT || WINDOWS_PHONE
      Assert.IsTrue(obj.SortedSetField.SequenceEqual(newObj.SortedSetField));
#endif
      Assert.IsTrue(obj.DictField.Keys.SequenceEqual(newObj.DictField.Keys));
      Assert.IsTrue(obj.DictField.Values.SequenceEqual(newObj.DictField.Values));
    }

#endregion

#region Bugfixes

#region github issue #9

    public class TemplateModel
    {
      public int Id { get; set; }
      public string ForeignIds { get; set; }
      public string Name { get; set; }
      public int Type { get; set; }
    }

    void TestDeleteBugfix()
    {
      var db = new DbInstance("test.fix1");

      //mapping done before init
      db.Map<TemplateModel>().Automap(i => i.Id, false).WithIndex<int>("Type", i => i.Type);

      db.Initialize();

      //testing this in a method
      db.Table<TemplateModel>().Save(new TemplateModel { Id = 66, Name = "test", Type = 3 });
      db.Table<TemplateModel>().Save(new TemplateModel { Id = 67, Name = "test2", Type = 3 });
      //The Type is 3 for both records
      //The first indexQuery returns 2 records, OK!
      var indexQuery = db.Table<TemplateModel>().IndexQueryByKey<int>("Type", 3).ToList();

      db.Table<TemplateModel>().DeleteByKey<int>(67);

      //allItems returns 1 record, OK!
      var allItems = db.Table<TemplateModel>().LoadAll().ToList();

      //indexQuery2 returns 0 records, wrong!
      var indexQuery2 = db.Table<TemplateModel>().IndexQueryByKey<int>("Type", 3).ToList();

      Assert.AreEqual(1, indexQuery2.Count());
    }

#endregion

#region github issue #10

    [TestMethod]
    public void TestLoadByKeyObj()
    {
      var obj = new MyData { GuidField = Guid.NewGuid() };

      table.Save(obj);

      var newObj = table.LoadByKey((object)obj.Id);

      Assert.AreEqual(obj.GuidField, newObj.GuidField);
    }

    [TestMethod]
    public void TestDeleteByKeyObj()
    {
      var obj = new MyData { GuidField = Guid.NewGuid() };

      table.Save(obj);

      Assert.IsTrue(table.DeleteByKey((object)obj.Id));

    }

#endregion

#endregion
  }
}


text:
package net.opengis.gml.impl;
/**
 * A document containing one id(@http://www.opengis.net/gml) attribute.
 *
 * This is a complex type.
 */
public class IdAttributeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.opengis.gml.IdAttribute
{
    private static final long serialVersionUID = 1L;

    public IdAttributeImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }

    private static final javax.xml.namespace.QName ID$0 =
        new javax.xml.namespace.QName("http://www.opengis.net/gml", "id");

    /**
     * Gets the "id" attribute
     */
    public java.lang.String getId()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ID$0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }

    /**
     * Gets (as xml) the "id" attribute
     */
    public org.apache.xmlbeans.XmlID xgetId()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlID target = null;
            target = (org.apache.xmlbeans.XmlID)get_store().find_attribute_user(ID$0);
            return target;
        }
    }

    /**
     * True if has "id" attribute
     */
    public boolean isSetId()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(ID$0) != null;
        }
    }

    /**
     * Sets the "id" attribute
     */
     public void setId(java.lang.String id)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ID$0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ID$0);
            }
            target.setStringValue(id);
        }
    }

    /**
     * Sets (as xml) the "id" attribute
     */
    public void xsetId(org.apache.xmlbeans.XmlID id)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlID target = null;
            target = (org.apache.xmlbeans.XmlID)get_store().find_attribute_user(ID$0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlID)get_store().add_attribute_user(ID$0);
            }
            target.set(id);
        }
    }

    /**
     * Unsets the "id" attribute
     */
    public void unsetId()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(ID$0);
        }
    }
}


text:
{% load i18n %}

{% trans "Preview:" %} {{ post_form.poll_question.value }}

							{% if post_form.poll_max_options.value == '1' %}
								{% blocktrans trimmed %}
									You may select 1 option
								{% endblocktrans %}
							{% else %}
								{% blocktrans trimmed with max_options=post_form.poll_max_options.value %}
									You may select up to {{ max_options }} options
								{% endblocktrans %}
							{% endif %}

							{% for inline_form in poll_options_previews %}
								{% if forloop.first or not forloop.counter|divisibleby:2 %}

								{% endif %}

										{% if post_form.poll_max_options.value == '1' %}

													<input type="radio" value="">
													{{ inline_form.text.value }}

										{% else %}

													<input type="checkbox" value="">
													{{ inline_form.text.value }}

										{% endif %}

								{% if forloop.last or forloop.counter|divisibleby:2 %}

								{% endif %}
							{% endfor %}


text:
<?php declare(strict_types=1);

namespace EB\PlantUMLBundle\Command;

use EB\PlantUMLBundle\Drawer\TwigDrawer;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

/**
 * Class DrawTwigCommand
 *
 * @author "Emmanuel BALLERY" <emmanuel.ballery@gmail.com>
 */
class DrawTwigCommand extends AbstractPlantUmlCommand
{
    /**
     * @var TwigDrawer
     */
    private $twigDrawer;

    /**
     * @param TwigDrawer $twigDrawer
     */
    public function __construct(TwigDrawer $twigDrawer)
    {
        $this->twigDrawer = $twigDrawer;
        parent::__construct();
    }

    /**
     * @inheritDoc
     */
    protected function configure(): void
    {
        $this
            ->setName('eb:uml:twig')
            ->setDescription('Draw twig inheritance tree')
            ->addArgument('file', InputArgument::OPTIONAL, 'Target file')
            ->addOption('format', 'f', InputOption::VALUE_OPTIONAL, 'Output format')
            ->addOption('includes', 'i', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL, 'Includes', [])
            ->addOption('excludes', 'x', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL, 'Excludes', []);
    }

    /**
     * @inheritDoc
     */
    protected function execute(InputInterface $input, OutputInterface $output): int
    {
        if (null === $file = $this->extractFile($input)) {
            $output->writeln('<error>Cannot open target file.</error>');
        }

        $format = $this->extractFormat($input);

        return $this->twigDrawer->draw(
            $file,
            $format,
            $input->getOption('includes'),
            $input->getOption('excludes')
        ) ? 0 : 1;
    }
}


text:
require 'spec_helper.rb'

describe 'The cookbook pci' do
  let(:chef_run) do
    ::ChefSpec::SoloRunner.new(platform: platform, version: platform_version).converge('pci')
  end

  { CentOS: '7.4.1708', Windows: '2016' }.each do |platform, platform_version|
    context "on #{platform} #{platform_version}" do
      let(:platform) { platform.to_s.downcase }
      let(:platform_version) { platform_version }

      context 'when ::Chef::Config[:pci_devices_disabled] is truthy' do
        before { ::Chef::Config[:pci_devices_disabled] = true }

        it 'does not load pci devices attributes' do
          expect(::PCI).not_to receive(:devices)
          expect(chef_run.node.automatic['pci']).not_to have_key 'devices'
        end
        it 'does not load pnp mapping' do
          expect(::PCI).not_to receive(:pnp_mapping)
          expect(chef_run.node.automatic['pci']).not_to have_key 'pnp_mapping'
        end
      end

      context 'when ::Chef::Config[:pci_devices_disabled] is false' do
        before { ::Chef::Config[:pci_devices_disabled] = false }

        it 'loads pci devices as an Automatic attribute: pci.devices' do
          result = double.as_null_object
          expect(::PCI).to receive(:devices).at_least(:once).and_return result
          expect(chef_run.node.automatic['pci']['devices']).to be result
        end

        if platform == :Windows
          it 'loads pnp mapping as an Automatic attribute: pci.pnp_mapping' do
            result = double.as_null_object
            expect(::PCI).to receive(:devices).and_return result
            expect(::PCI).to receive(:pnp_mapping).and_return result

            expect(chef_run.node.automatic['pci']['pnp_mapping']).to be result
          end
        end
      end
    end
  end
end


text:
package org.apache.camel.component.gae.http;

import java.lang.reflect.Proxy;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.google.appengine.api.urlfetch.HTTPRequest;
import com.google.appengine.api.urlfetch.HTTPResponse;
import com.google.appengine.api.urlfetch.URLFetchService;
import com.google.appengine.api.urlfetch.URLFetchServiceFactory;
import org.apache.camel.Exchange;
import org.apache.camel.Producer;
import org.apache.camel.component.gae.bind.HttpBindingInvocationHandler;
import org.apache.camel.component.gae.bind.InboundBinding;
import org.apache.camel.component.gae.bind.OutboundBinding;
import org.apache.camel.component.gae.bind.OutboundBindingSupport;
import org.apache.camel.component.servlet.ServletComponent;
import org.apache.camel.component.servlet.ServletEndpoint;
import org.apache.camel.http.common.HttpBinding;
import org.apache.camel.spi.UriEndpoint;
import org.apache.camel.util.URISupport;
import org.apache.camel.util.UnsafeUriCharactersEncoder;

/**
 * The ghttp component provides HTTP connectivity to the GAE.
 */
@UriEndpoint(scheme = "ghttp", extendsScheme = "servlet", title = "Google HTTP",
        syntax = "ghttp:httpUri", producerOnly = true, label = "cloud,paas", lenientProperties = true)
public class GHttpEndpoint extends ServletEndpoint implements OutboundBindingSupport<GHttpEndpoint, HTTPRequest, HTTPResponse> {

    public static final String GHTTP_SCHEME = "ghttp";
    public static final String GHTTPS_SCHEME = "ghttps";
    public static final String HTTP_SCHEME = "http";
    public static final String HTTPS_SCHEME = "https";

    private URLFetchService urlFetchService;

    private OutboundBinding<GHttpEndpoint, HTTPRequest, HTTPResponse> outboundBinding;
    private InboundBinding<GHttpEndpoint, HttpServletRequest, HttpServletResponse> inboundBinding;

    public GHttpEndpoint(String endpointUri, ServletComponent component, URI httpUri) throws URISyntaxException {
        // set the endpoint uri with httpUri as we need to create http producer here
        super(httpUri.toString(), component, httpUri);
        urlFetchService = URLFetchServiceFactory.getURLFetchService();
    }

    /**
     * Constructs a {@link URL} from an uri and an optional
     * query string. The encoding strategy follow those of the
     * Camel HTTP component.
     *
     * @param uri
     *            must be encoded with
     *            {@link UnsafeUriCharactersEncoder#encode(String)}.
     * @param query
     *            decoded query string. Replaces the query part of
     *            uri if not null.
     */
    static URL getEndpointUrl(String uri, String query) throws Exception {
        Map<String, Object> parameters = null;
        URI uriObj = new URI(uri);
        if (query == null) {
            parameters = URISupport.parseParameters(uriObj);
        } else {
            parameters = URISupport.parseQuery(query, false, true);
        }
        if (uriObj.getScheme().equals(GHTTPS_SCHEME)) {
            uriObj = new URI(HTTPS_SCHEME + ":" + uriObj.getRawSchemeSpecificPart());
        } else { // ghttp or anything else
            uriObj = new URI(HTTP_SCHEME + ":" + uriObj.getRawSchemeSpecificPart());
        }
        return URISupport.createRemainingURI(uriObj, parameters).toURL();
    }

    public URL getEndpointUrl() throws Exception {
        return getEndpointUrl(getEndpointUri(), null);
    }

    public URLFetchService getUrlFetchService() {
        return urlFetchService;
    }

    public void setUrlFetchService(URLFetchService urlFetchService) {
        this.urlFetchService = urlFetchService;
    }

    public OutboundBinding<GHttpEndpoint, HTTPRequest, HTTPResponse> getOutboundBinding() {
        return outboundBinding;
    }

    public void setOutboundBinding(OutboundBinding<GHttpEndpoint, HTTPRequest, HTTPResponse> outboundBinding) {
        this.outboundBinding = outboundBinding;
    }

    public InboundBinding<GHttpEndpoint, HttpServletRequest, HttpServletResponse> getInboundBinding() {
        return inboundBinding;
    }

    public void setInboundBinding(
            InboundBinding<GHttpEndpoint, HttpServletRequest, HttpServletResponse> inboundBinding) {
        this.inboundBinding = inboundBinding;
    }

    /**
     * Proxies the {@link org.apache.camel.http.common.HttpBinding} returned by {@link super#getBinding()}
     * with a dynamic proxy. The proxy's invocation handler further delegates to
     * {@link InboundBinding#readRequest(org.apache.camel.Endpoint, Exchange, Object)}
     * .
     *
     * @return proxied {@link org.apache.camel.http.common.HttpBinding}.
     */
    @Override
    public HttpBinding getBinding() {
        return (HttpBinding)Proxy.newProxyInstance(getClass().getClassLoader(), new Class[] {HttpBinding.class},
                new HttpBindingInvocationHandler<GHttpEndpoint, HttpServletRequest, HttpServletResponse>(
                        this, super.getBinding(), getInboundBinding()));
    }

    public Producer createProducer() throws Exception {
        return new GHttpProducer(this);
    }

    @Override
    public boolean isLenientProperties() {
        // GHttpEndpoint could not know about all it's options on the passed URI
        return true;
    }

}


text:
import numpy as np
import cupy as cp
import cupyx.scipy.sparse as csp
from cupyx.scipy.sparse.linalg import cg  # , spsolve, gmres, minres

from pySDC.core.Errors import ParameterError, ProblemError
from pySDC.core.Problem import ptype
from pySDC.implementations.datatype_classes.cupy_mesh import cupy_mesh, imex_cupy_mesh, comp2_cupy_mesh

# http://www.personal.psu.edu/qud2/Res/Pre/dz09sisc.pdf

# noinspection PyUnusedLocal
class allencahn_fullyimplicit(ptype):
    """
    Example implementing the Allen-Cahn equation in 2D with finite differences and periodic BC

    Attributes:
        A: second-order FD discretization of the 2D laplace operator
        dx: distance between two spatial nodes (same for both directions)
    """

    def __init__(self, problem_params, dtype_u=cupy_mesh, dtype_f=cupy_mesh):
        """
        Initialization routine

        Args:
            problem_params (dict): custom parameters for the example
            dtype_u: cupy_mesh data type (will be passed parent class)
            dtype_f: cupy_mesh data type (will be passed parent class)
        """

        # these parameters will be used later, so assert their existence
        essential_keys = ['nvars', 'nu', 'eps', 'newton_maxiter', 'newton_tol', 'lin_tol', 'lin_maxiter', 'radius']
        for key in essential_keys:
            if key not in problem_params:
                msg = 'need %s to instantiate problem, only got %s' % (key, str(problem_params.keys()))
                raise ParameterError(msg)

        # we assert that nvars looks very particular here.. this will be necessary for coarsening in space later on
        if len(problem_params['nvars']) != 2:
            raise ProblemError('this is a 2d example, got %s' % problem_params['nvars'])
        if problem_params['nvars'][0] != problem_params['nvars'][1]:
            raise ProblemError('need a square domain, got %s' % problem_params['nvars'])
        if problem_params['nvars'][0] % 2 != 0:
            raise ProblemError('the setup requires nvars = 2^p per dimension')

        # invoke super init, passing number of dofs, dtype_u and dtype_f
        super(allencahn_fullyimplicit, self).__init__(
            (problem_params['nvars'], None, cp.dtype('float64')), dtype_u, dtype_f, problem_params
        )

        # compute dx and get discretization matrix A
        self.dx = 1.0 / self.params.nvars[0]
        self.A = self.__get_A(self.params.nvars, self.dx)
        self.xvalues = cp.array([i * self.dx - 0.5 for i in range(self.params.nvars[0])])

        self.newton_itercount = 0
        self.lin_itercount = 0
        self.newton_ncalls = 0
        self.lin_ncalls = 0

    @staticmethod
    def __get_A(N, dx):
        """
        Helper function to assemble FD matrix A in sparse format

        Args:
            N (list): number of dofs
            dx (float): distance between two spatial nodes

        Returns:
             cupyx.scipy.sparse.csr_matrix: cupy-matrix A in CSR format
        """

        stencil = cp.asarray([-2, 1])
        A = stencil[0] * csp.eye(N[0], format='csr')
        for i in range(1, len(stencil)):
            A += stencil[i] * csp.eye(N[0], k=-i, format='csr')
            A += stencil[i] * csp.eye(N[0], k=+i, format='csr')
            A += stencil[i] * csp.eye(N[0], k=N[0] - i, format='csr')
            A += stencil[i] * csp.eye(N[0], k=-N[0] + i, format='csr')
        A = csp.kron(A, csp.eye(N[0])) + csp.kron(csp.eye(N[1]), A)
        A *= 1.0 / (dx**2)
        return A

    # noinspection PyTypeChecker
    def solve_system(self, rhs, factor, u0, t):
        """
        Simple Newton solver

        Args:
            rhs (dtype_f): right-hand side for the nonlinear system
            factor (float): abbrev. for the node-to-node stepsize (or any other factor required)
            u0 (dtype_u): initial guess for the iterative solver
            t (float): current time (required here for the BC)

        Returns:
            dtype_u: solution u
        """

        u = self.dtype_u(u0).flatten()
        z = self.dtype_u(self.init, val=0.0).flatten()
        nu = self.params.nu
        eps2 = self.params.eps**2

        Id = csp.eye(self.params.nvars[0] * self.params.nvars[1])

        # start newton iteration
        n = 0
        res = 99
        while n < self.params.newton_maxiter:

            # form the function g with g(u) = 0
            g = u - factor * (self.A.dot(u) + 1.0 / eps2 * u * (1.0 - u**nu)) - rhs.flatten()

            # if g is close to 0, then we are done
            res = cp.linalg.norm(g, np.inf)

            if res < self.params.newton_tol:
                break

            # assemble dg
            dg = Id - factor * (self.A + 1.0 / eps2 * csp.diags((1.0 - (nu + 1) * u**nu), offsets=0))

            # newton update: u1 = u0 - g/dg
            # u -= spsolve(dg, g)
            u -= cg(dg, g, x0=z, tol=self.params.lin_tol)[0]
            # increase iteration count
            n += 1
            # print(n, res)

        # if n == self.params.newton_maxiter:
        #     raise ProblemError('Newton did not converge after %i iterations, error is %s' % (n, res))

        me = self.dtype_u(self.init)
        me[:] = u.reshape(self.params.nvars)

        self.newton_ncalls += 1
        self.newton_itercount += n

        return me

    def eval_f(self, u, t):
        """
        Routine to evaluate the RHS

        Args:
            u (dtype_u): current values
            t (float): current time

        Returns:
            dtype_f: the RHS
        """
        f = self.dtype_f(self.init)
        v = u.flatten()
        f[:] = (self.A.dot(v) + 1.0 / self.params.eps**2 * v * (1.0 - v**self.params.nu)).reshape(self.params.nvars)

        return f

    def u_exact(self, t):
        """
        Routine to compute the exact solution at time t

        Args:
            t (float): current time

        Returns:
            dtype_u: exact solution
        """

        assert t == 0, 'ERROR: u_exact only valid for t=0'
        me = self.dtype_u(self.init, val=0.0)
        mx, my = cp.meshgrid(self.xvalues, self.xvalues)
        me[:] = cp.tanh((self.params.radius - cp.sqrt(mx**2 + my**2)) / (cp.sqrt(2) * self.params.eps))
        # print(type(me))
        return me

# noinspection PyUnusedLocal
class allencahn_semiimplicit(allencahn_fullyimplicit):
    """
    Example implementing the Allen-Cahn equation in 2D with finite differences, SDC standard splitting
    """

    def __init__(self, problem_params, dtype_u=cupy_mesh, dtype_f=imex_cupy_mesh):
        """
        Initialization routine

        Args:
            problem_params (dict): custom parameters for the example
            dtype_u: cupy_mesh data type (will be passed parent class)
            dtype_f: cupy_mesh data type with implicit and explicit parts (will be passed parent class)
        """

        # invoke super init, passing number of dofs, dtype_u and dtype_f
        super(allencahn_semiimplicit, self).__init__(problem_params, dtype_u, dtype_f)

    def eval_f(self, u, t):
        """
        Routine to evaluate the RHS

        Args:
            u (dtype_u): current values
            t (float): current time

        Returns:
            dtype_f: the RHS
        """
        f = self.dtype_f(self.init)
        v = u.flatten()
        f.impl[:] = self.A.dot(v).reshape(self.params.nvars)
        f.expl[:] = (1.0 / self.params.eps**2 * v * (1.0 - v**self.params.nu)).reshape(self.params.nvars)

        return f

    def solve_system(self, rhs, factor, u0, t):
        """
        Simple linear solver for (I-factor*A)u = rhs

        Args:
            rhs (dtype_f): right-hand side for the linear system
            factor (float): abbrev. for the local stepsize (or any other factor required)
            u0 (dtype_u): initial guess for the iterative solver
            t (float): current time (e.g. for time-dependent BCs)

        Returns:
            dtype_u: solution as mesh
        """

        class context:
            num_iter = 0

        def callback(xk):
            context.num_iter += 1
            return context.num_iter

        me = self.dtype_u(self.init)

        Id = csp.eye(self.params.nvars[0] * self.params.nvars[1])

        me[:] = cg(
            Id - factor * self.A,
            rhs.flatten(),
            x0=u0.flatten(),
            tol=self.params.lin_tol,
            maxiter=self.params.lin_maxiter,
            callback=callback,
        )[0].reshape(self.params.nvars)

        self.lin_ncalls += 1
        self.lin_itercount += context.num_iter

        return me

# noinspection PyUnusedLocal
class allencahn_semiimplicit_v2(allencahn_fullyimplicit):
    """
    Example implementing the Allen-Cahn equation in 2D with finite differences, AC splitting
    """

    def __init__(self, problem_params, dtype_u=cupy_mesh, dtype_f=imex_cupy_mesh):
        """
        Initialization routine

        Args:
            problem_params (dict): custom parameters for the example
            dtype_u: cupy_mesh data type (will be passed parent class)
            dtype_f: cupy_mesh data type with implicit and explicit parts (will be passed parent class)
        """

        # invoke super init, passing number of dofs, dtype_u and dtype_f
        super(allencahn_semiimplicit_v2, self).__init__(problem_params, dtype_u, dtype_f)

    def eval_f(self, u, t):
        """
        Routine to evaluate the RHS

        Args:
            u (dtype_u): current values
            t (float): current time

        Returns:
            dtype_f: the RHS
        """
        f = self.dtype_f(self.init)
        v = u.flatten()
        f.impl[:] = (self.A.dot(v) - 1.0 / self.params.eps**2 * v ** (self.params.nu + 1)).reshape(self.params.nvars)
        f.expl[:] = (1.0 / self.params.eps**2 * v).reshape(self.params.nvars)

        return f

    def solve_system(self, rhs, factor, u0, t):
        """
        Simple Newton solver

        Args:
            rhs (dtype_f): right-hand side for the nonlinear system
            factor (float): abbrev. for the node-to-node stepsize (or any other factor required)
            u0 (dtype_u): initial guess for the iterative solver
            t (float): current time (required here for the BC)

        Returns:
            dtype_u: solution u
        """

        u = self.dtype_u(u0).flatten()
        z = self.dtype_u(self.init, val=0.0).flatten()
        nu = self.params.nu
        eps2 = self.params.eps**2

        Id = csp.eye(self.params.nvars[0] * self.params.nvars[1])

        # start newton iteration
        n = 0
        res = 99
        while n < self.params.newton_maxiter:

            # form the function g with g(u) = 0
            g = u - factor * (self.A.dot(u) - 1.0 / eps2 * u ** (nu + 1)) - rhs.flatten()

            # if g is close to 0, then we are done
            res = cp.linalg.norm(g, np.inf)

            if res < self.params.newton_tol:
                break

            # assemble dg
            dg = Id - factor * (self.A - 1.0 / eps2 * csp.diags(((nu + 1) * u**nu), offsets=0))

            # newton update: u1 = u0 - g/dg
            # u -= spsolve(dg, g)
            u -= cg(dg, g, x0=z, tol=self.params.lin_tol)[0]
            # increase iteration count
            n += 1
            # print(n, res)

        # if n == self.params.newton_maxiter:
        #     raise ProblemError('Newton did not converge after %i iterations, error is %s' % (n, res))

        me = self.dtype_u(self.init)
        me[:] = u.reshape(self.params.nvars)

        self.newton_ncalls += 1
        self.newton_itercount += n

        return me

# noinspection PyUnusedLocal
class allencahn_multiimplicit(allencahn_fullyimplicit):
    """
    Example implementing the Allen-Cahn equation in 2D with finite differences, SDC standard splitting
    """

    def __init__(self, problem_params, dtype_u=cupy_mesh, dtype_f=comp2_cupy_mesh):
        """
        Initialization routine

        Args:
            problem_params (dict): custom parameters for the example
            dtype_u: mesh data type (will be passed parent class)
            dtype_f: mesh data type with 2 components (will be passed parent class)
        """

        # invoke super init, passing number of dofs, dtype_u and dtype_f
        super(allencahn_multiimplicit, self).__init__(problem_params, dtype_u, dtype_f)

    def eval_f(self, u, t):
        """
        Routine to evaluate the RHS

        Args:
            u (dtype_u): current values
            t (float): current time

        Returns:
            dtype_f: the RHS
        """
        f = self.dtype_f(self.init)
        v = u.flatten()
        f.comp1[:] = self.A.dot(v).reshape(self.params.nvars)
        f.comp2[:] = (1.0 / self.params.eps**2 * v * (1.0 - v**self.params.nu)).reshape(self.params.nvars)

        return f

    def solve_system_1(self, rhs, factor, u0, t):
        """
        Simple linear solver for (I-factor*A)u = rhs

        Args:
            rhs (dtype_f): right-hand side for the linear system
            factor (float): abbrev. for the local stepsize (or any other factor required)
            u0 (dtype_u): initial guess for the iterative solver
            t (float): current time (e.g. for time-dependent BCs)

        Returns:
            dtype_u: solution as mesh
        """

        class context:
            num_iter = 0

        def callback(xk):
            context.num_iter += 1
            return context.num_iter

        me = self.dtype_u(self.init)

        Id = csp.eye(self.params.nvars[0] * self.params.nvars[1])

        me[:] = cg(
            Id - factor * self.A,
            rhs.flatten(),
            x0=u0.flatten(),
            tol=self.params.lin_tol,
            maxiter=self.params.lin_maxiter,
            callback=callback,
        )[0].reshape(self.params.nvars)

        self.lin_ncalls += 1
        self.lin_itercount += context.num_iter

        return me

    def solve_system_2(self, rhs, factor, u0, t):
        """
        Simple Newton solver

        Args:
            rhs (dtype_f): right-hand side for the nonlinear system
            factor (float): abbrev. for the node-to-node stepsize (or any other factor required)
            u0 (dtype_u): initial guess for the iterative solver
            t (float): current time (required here for the BC)

        Returns:
            dtype_u: solution u
        """

        u = self.dtype_u(u0).flatten()
        z = self.dtype_u(self.init, val=0.0).flatten()
        nu = self.params.nu
        eps2 = self.params.eps**2

        Id = csp.eye(self.params.nvars[0] * self.params.nvars[1])

        # start newton iteration
        n = 0
        res = 99
        while n < self.params.newton_maxiter:

            # form the function g with g(u) = 0
            g = u - factor * (1.0 / eps2 * u * (1.0 - u**nu)) - rhs.flatten()

            # if g is close to 0, then we are done
            res = cp.linalg.norm(g, np.inf)

            if res < self.params.newton_tol:
                break

            # assemble dg
            dg = Id - factor * (1.0 / eps2 * csp.diags((1.0 - (nu + 1) * u**nu), offsets=0))

            # newton update: u1 = u0 - g/dg
            # u -= spsolve(dg, g)
            u -= cg(dg, g, x0=z, tol=self.params.lin_tol)[0]
            # increase iteration count
            n += 1
            # print(n, res)

        # if n == self.params.newton_maxiter:
        #     raise ProblemError('Newton did not converge after %i iterations, error is %s' % (n, res))

        me = self.dtype_u(self.init)
        me[:] = u.reshape(self.params.nvars)

        self.newton_ncalls += 1
        self.newton_itercount += n

        return me

# noinspection PyUnusedLocal
class allencahn_multiimplicit_v2(allencahn_fullyimplicit):
    """
    Example implementing the Allen-Cahn equation in 2D with finite differences, AC splitting
    """

    def __init__(self, problem_params, dtype_u=cupy_mesh, dtype_f=comp2_cupy_mesh):
        """
        Initialization routine

        Args:
            problem_params (dict): custom parameters for the example
            dtype_u: mesh data type (will be passed parent class)
            dtype_f: mesh data type with 2 components (will be passed parent class)
        """

        # invoke super init, passing number of dofs, dtype_u and dtype_f
        super(allencahn_multiimplicit_v2, self).__init__(problem_params, dtype_u, dtype_f)

    def eval_f(self, u, t):
        """
        Routine to evaluate the RHS

        Args:
            u (dtype_u): current values
            t (float): current time

        Returns:
            dtype_f: the RHS
        """
        f = self.dtype_f(self.init)
        v = u.flatten()
        f.comp1[:] = (self.A.dot(v) - 1.0 / self.params.eps**2 * v ** (self.params.nu + 1)).reshape(self.params.nvars)
        f.comp2[:] = (1.0 / self.params.eps**2 * v).reshape(self.params.nvars)

        return f

    def solve_system_1(self, rhs, factor, u0, t):
        """
        Simple Newton solver

        Args:
            rhs (dtype_f): right-hand side for the nonlinear system
            factor (float): abbrev. for the node-to-node stepsize (or any other factor required)
            u0 (dtype_u): initial guess for the iterative solver
            t (float): current time (required here for the BC)

        Returns:
            dtype_u: solution u
        """

        u = self.dtype_u(u0).flatten()
        z = self.dtype_u(self.init, val=0.0).flatten()
        nu = self.params.nu
        eps2 = self.params.eps**2

        Id = csp.eye(self.params.nvars[0] * self.params.nvars[1])

        # start newton iteration
        n = 0
        res = 99
        while n < self.params.newton_maxiter:

            # form the function g with g(u) = 0
            g = u - factor * (self.A.dot(u) - 1.0 / eps2 * u ** (nu + 1)) - rhs.flatten()

            # if g is close to 0, then we are done
            res = cp.linalg.norm(g, np.inf)

            if res < self.params.newton_tol:
                break

            # assemble dg
            dg = Id - factor * (self.A - 1.0 / eps2 * csp.diags(((nu + 1) * u**nu), offsets=0))

            # newton update: u1 = u0 - g/dg
            # u -= spsolve(dg, g)
            u -= cg(dg, g, x0=z, tol=self.params.lin_tol)[0]
            # increase iteration count
            n += 1
            # print(n, res)

        # if n == self.params.newton_maxiter:
        #     raise ProblemError('Newton did not converge after %i iterations, error is %s' % (n, res))

        me = self.dtype_u(self.init)
        me[:] = u.reshape(self.params.nvars)

        self.newton_ncalls += 1
        self.newton_itercount += n

        return me

    def solve_system_2(self, rhs, factor, u0, t):
        """
        Simple linear solver for (I-factor*A)u = rhs

        Args:
            rhs (dtype_f): right-hand side for the linear system
            factor (float): abbrev. for the local stepsize (or any other factor required)
            u0 (dtype_u): initial guess for the iterative solver
            t (float): current time (e.g. for time-dependent BCs)

        Returns:
            dtype_u: solution as mesh
        """

        me = self.dtype_u(self.init)

        me[:] = (1.0 / (1.0 - factor * 1.0 / self.params.eps**2) * rhs).reshape(self.params.nvars)
        return me


text:
using System;

public static partial class Extensions
{
    /// <summary>
    ///     An object extension method that converts this object to a nullable long or default.
    /// </summary>
    /// <param name="this">The @this to act on.</param>
    /// <returns>The given data converted to a long?</returns>
    public static long? ToNullableLongOrDefault(this object @this)
    {
        try
        {
            if (@this == null || @this == DBNull.Value)
            {
                return null;
            }

            return Convert.ToInt64(@this);
        }
        catch (Exception)
        {
            return default(long);
        }
    }

    /// <summary>
    ///     An object extension method that converts this object to a nullable long or default.
    /// </summary>
    /// <param name="this">The @this to act on.</param>
    /// <param name="defaultValue">The default value.</param>
    /// <returns>The given data converted to a long?</returns>
    public static long? ToNullableLongOrDefault(this object @this, long? defaultValue)
    {
        try
        {
            if (@this == null || @this == DBNull.Value)
            {
                return null;
            }

            return Convert.ToInt64(@this);
        }
        catch (Exception)
        {
            return defaultValue;
        }
    }

    /// <summary>
    ///     An object extension method that converts this object to a nullable long or default.
    /// </summary>
    /// <param name="this">The @this to act on.</param>
    /// <param name="defaultValueFactory">The default value factory.</param>
    /// <returns>The given data converted to a long?</returns>
    public static long? ToNullableLongOrDefault(this object @this, Func<long?> defaultValueFactory)
    {
        try
        {
            if (@this == null || @this == DBNull.Value)
            {
                return null;
            }

            return Convert.ToInt64(@this);
        }
        catch (Exception)
        {
            return defaultValueFactory();
        }
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" metadata-complete="true">
    <display-name>DP portlet application</display-name>
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/spring-context/portlet-application-context.xml</param-value>
    </context-param>
    <servlet>
        <servlet-name>ViewRendererServlet</servlet-name>
        <servlet-class>org.springframework.web.servlet.ViewRendererServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>ViewRendererServlet</servlet-name>
        <url-pattern>/WEB-INF/servlet/view</url-pattern>
    </servlet-mapping>
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <jsp-config>
        <taglib>
            <taglib-uri>http://www.ibacz.eu/tags/iba</taglib-uri>
            <taglib-location>/WEB-INF/tld/dp.tld</taglib-location>
        </taglib>
        <jsp-property-group>
            <url-pattern>*.jsp</url-pattern>
            <page-encoding>UTF-8</page-encoding>
        </jsp-property-group>
        <jsp-property-group>
            <url-pattern>*.jspf</url-pattern>
            <page-encoding>UTF-8</page-encoding>
        </jsp-property-group>

    </jsp-config>
</web-app>


text:
package taip.social.domain.entity;

/**
 * @author Catalin Manolescu <cc.manolescu@gmail.com>
 */
public enum Like {
    LIKE,
    DISLIKE
}


text:
import HTMLGenerator
import Keywords
import Lexer
from DispatchHandler import DispatchHandler
from _SilverCity import find_lexer_module_by_id, PropertySet, WordList
from ScintillaConstants import SCLEX_CPP
import LanguageInfo

class CPPLexer(Lexer.Lexer):
    def __init__(self, properties=PropertySet()):
        self._properties = properties
        self._lexer = find_lexer_module_by_id(SCLEX_CPP)
        self._keyword_lists = [
            WordList(Keywords.cpp_keywords),
            WordList(),  # User defined (important functions, constants, etc.)
            WordList(Keywords.doxygen_keywords),
            WordList(),  # "Fold header keywords" - whatever that is
            WordList(),  # Global classes and typedefs
        ]

class CPPHandler(DispatchHandler):
    def __init__(self):
        DispatchHandler.__init__(self, 'SCE_C')

class CPPHTMLGenerator(HTMLGenerator.SimpleHTMLGenerator, CPPHandler):
    name = 'cpp'
    description = 'C and C++'

    def __init__(self):
        CPPHandler.__init__(self)
        HTMLGenerator.SimpleHTMLGenerator.__init__(self, 'SCE_C')

    def generate_html(self, file, buffer, lexer=CPPLexer()):
        self._file = file

        lexer.tokenize_by_style(buffer, self.event_handler)

cpp_language_info = LanguageInfo.LanguageInfo(
    'C++',
    ['c', 'c+', 'c++', 'cpp', 'cxx', 'h', 'hpp'],
    [],
    [CPPHTMLGenerator]
)

LanguageInfo.register_language(cpp_language_info)


text:
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)

DESCRIPTOR = _descriptor.FileDescriptor(
  name='unique_position.proto',
  package='sync_pb',
  serialized_pb='\n\x15unique_position.proto\x12\x07sync_pb\"t\n\x0eUniquePosition\x12\r\n\x05value\x18\x01 \x01(\x0c\x12\x18\n\x10\x63ompressed_value\x18\x02 \x01(\x0c\x12\x1b\n\x13uncompressed_length\x18\x03 \x01(\x04\x12\x1c\n\x14\x63ustom_compressed_v1\x18\x04 \x01(\x0c\x42\x04H\x03`\x01')

_UNIQUEPOSITION = _descriptor.Descriptor(
  name='UniquePosition',
  full_name='sync_pb.UniquePosition',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  fields=[
    _descriptor.FieldDescriptor(
      name='value', full_name='sync_pb.UniquePosition.value', index=0,
      number=1, type=12, cpp_type=9, label=1,
      has_default_value=False, default_value="",
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
    _descriptor.FieldDescriptor(
      name='compressed_value', full_name='sync_pb.UniquePosition.compressed_value', index=1,
      number=2, type=12, cpp_type=9, label=1,
      has_default_value=False, default_value="",
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
    _descriptor.FieldDescriptor(
      name='uncompressed_length', full_name='sync_pb.UniquePosition.uncompressed_length', index=2,
      number=3, type=4, cpp_type=4, label=1,
      has_default_value=False, default_value=0,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
    _descriptor.FieldDescriptor(
      name='custom_compressed_v1', full_name='sync_pb.UniquePosition.custom_compressed_v1', index=3,
      number=4, type=12, cpp_type=9, label=1,
      has_default_value=False, default_value="",
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  options=None,
  is_extendable=False,
  extension_ranges=[],
  serialized_start=34,
  serialized_end=150,
)

DESCRIPTOR.message_types_by_name['UniquePosition'] = _UNIQUEPOSITION

class UniquePosition(_message.Message):
  __metaclass__ = _reflection.GeneratedProtocolMessageType
  DESCRIPTOR = _UNIQUEPOSITION

  # @@protoc_insertion_point(class_scope:sync_pb.UniquePosition)

DESCRIPTOR.has_options = True
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), 'H\003`\001')
# @@protoc_insertion_point(module_scope)


text:
package com.example.dell.app;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity implements View.OnClickListener{
    private static final String TAG = "MainActivity";
    private Button btn_broadcast;
    private Button btn_version;
    private Button btn_feedback;
    private Button btn_history;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        btn_broadcast = (Button)findViewById(R.id.broadcast);
        btn_broadcast.setOnClickListener(this);
        btn_version = (Button)findViewById(R.id.query_version);
        btn_version.setOnClickListener(this);
        btn_history = (Button)findViewById(R.id.history);
        btn_history.setOnClickListener(this);
        btn_feedback = (Button)findViewById(R.id.feedback);
        btn_feedback.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        Intent intent;
        switch (view.getId()){
            case R.id.broadcast:
                intent = new Intent(MainActivity.this, BroadcastActivity.class);
                startActivity(intent);
                break;
            case R.id.feedback:
                intent = new Intent(MainActivity.this, FeedbackActivity.class);
                startActivity(intent);
                break;
            case  R.id.history:
                break;
            case R.id.query_version:
                break;
            default:
                break;
        }
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }
}