text:
import random
import time
import copy

# The main class for a gift exchange
class GiftExchange(object):
    """Class GiftExchange
       A GiftExchange takes a set of participants and arranges them into
       giver/receiver pairs so that every participant is a giver and a
       receiver exactly once.
       In addition, this has a concept of families.  Each participant is
       a member of a family and may not give to or receive from a member
       of his or her family (or to/from him/herself).

       The class starts off having no participants.  Then, to initialize the
       exchange, families are added one at a time using the add_family()
       method.  A family is just a list of names.

       There are 2 methods for generating a complete exchange:
       1) generate_exchange().  This method uses constraint propagation and
          searching to generate the giver/receiver pairs.  If no pairing
          of names meets the criteria, this method will return False;
          otherwise it will return true, and the self.recips variable will
          have a dictionary mapping givers (key) to recipients (value).
       2) generate_pairing().  This method is much less sophisticated.
          It simply generates random permutations of all the participants'
          names until one of the pairings meets the constraints.  If no
          pairing of names matches the criteria, this method will continue
          trying forever.

       A gift exchange will reject addition of a family if any of the names
       in that family are duplicates (either of existing names in the exchange
       or of another name in the same family).

       Typical usage of the class looks like this:
           # Create a member of the class.
           ge = GiftExchange()
           # Add the participants, one family at at time.
           ge.add_family(['name1', 'name2', 'name3'])
           ge.add_family(['name4', 'name5'])
           ge.add_family(['name6', 'name7', 'name8'])
           ge.add_family(['name9', 'name10', 'name11', 'name12'])
           # Create the mapping.
           ge.generate_exchange()
           # Show everything about the class (including the exchange)
           ge.show()

        Class Methods:
            __init__(self):
                Initialize the class instance variables.
            show(self):
                Print the class instance variables in a nice format
            add_family(self, family):
                Add a family to the exchange.
                A family is a list of names.
            assign(self, giver, recip):
                Assign the recipient to the giver in the exchange.
            eliminate(self, giver, recip):
                Remove the recipient from the giver's list of possible
                recipients in the exchange.
            reset_exchange(self):
                Reset the recips dictionary to its initial state.
                This means that each giver's list of possible recipients is
                everyone not in that giver's family.
            generate_exchange(self):
                Given an initialized recips dictionary, generate a random
                exchange with each participant giving to and receiving from
                a single other participant.
                This routine can be called multiple times, but will only
                generate a new exchange if the exchange is reset (via the
                reset_exchange() method), between calls.
            generate_pairing(self):
                Generates random permutations of the participants until one
                of them meets the constraints (no one gives to herself or
                to a family member).
                This routine can be called repeatedly, and will generate a new
                pairing each time.
            show_pairing(self):
                Show the exchange's current pairing.  If generate_pairing() has
                not been called, yet, then will show "None."

        Debugging:
            The show() method on the class shows all the current state.
            Setting the verbose variable to True will enable printing of
            debugging information for some methods (currently just
            generate_exchange()).
            An exchange can be reset to default state by calling the
            reset_exchange() method.
            Extra constraints on an exchange can be applied by calling the
            assign() and eliminate() methods directly."""

    def __init__(self):
        print "Initializing new GiftExchange."
        self.namelist = []
        self.family_list = []
        self.family_dict = {}
        self.num_families = 0
        self.pairing = None
        self.tries = 0
        self.recips = {}
        self.verbose = False

    def show(self):
        print "Exchange participants:"
        print "    %s" % ", ".join(self.namelist)

        print "Families (%d):" % self.num_families
        for (index,f) in enumerate(self.family_list):
            print "  %d: %s" % (index, ", ".join(f))

        print "Possible recipients:"
        for name in self.namelist:
            print "  %s: %s" % (name, self.recips[name])

        if self.pairing:
            print "Here is the exchange:"
            self.show_pairing()
            print "Pairing took %d tries." % self.tries

    def add_family(self, family):
        # Do a bit of sanity checking on the input before adding the family.
        if len(family) == 0:
            # throw exception
            print "Ignoring empty family input list."
            return
        for name in family:
            if name in self.namelist:
                # throw exception
                print "Ignoring new family with duplicate name: %s." % name
                return
        # Add each member of new family to the list of possible recipients
        # for everyeone already in the exchange.
        for giver in self.namelist:
            for recipient in family:
                self.recips[giver].append(recipient)
        # For each member of the new family, make the list of possible
        # recipients the same as the list of everyone already in the exchange.
        for giver in family:
            self.recips[giver] = list(self.namelist)

        # Add the new family to the family list.
        self.family_list.append(family)

        # Add each member of the new family to the lists.
        for name in family:
            self.namelist.append(name)
            self.family_dict[name] = self.num_families
        self.num_families += 1

    def assign(self, giver, recip):
        """Eliminate alll other recipients but the given one and propagate.
           return True if successful, False if there is a contradiction."""
        other_recips = [r for r in self.recips[giver] if r != recip]
        return all(self.eliminate(giver, r) for r in other_recips)

    def eliminate(self, giver, recip):
        if not recip in self.recips[giver]:
            return True
        self.recips[giver].remove(recip)
        if len(self.recips[giver]) == 0:
            return False
        elif len(self.recips[giver]) == 1:
            r2 = self.recips[giver][0]
            if not all (self.eliminate(g2, r2) for g2 in self.namelist if g2 != giver):
                return False

        poss_givers = [g for g in self.namelist if recip in self.recips[g]]
        if len(poss_givers) == 0:
            return False
        elif len(poss_givers) == 1:
            return self.assign(poss_givers[0], recip)
        return True

    def reset_exchange(self):
        for giver in self.namelist:
            self.recips[giver] = \
                [r for r in self.namelist if self.family_dict[giver] != self.family_dict[r]]

    def generate_exchange(self):
        """generate_exchange:
           Given the current set of possible giver->recipient combinations, search
           for a pairing.  This assumes that the primary constraints have already been
           applied (giver doesn't give to him/her self, giver doesn't give to a family
           member), so we just try to get a list where each giver has a single
           recipient, and each recipient has a single giver."""

        # Is the exchange already screwed up?
        if any(len(self.recips[g])==0 for g in self.namelist):
            return False
        # Is the exchange already solved?
        if all(len(self.recips[g])==1 for g in self.namelist):
            return True

        # Start making guesses.
        # Start with one of the givers who has the least number of possible recipients.
        #  (To exercise the code paths, change the below to max(...).
        #  I have never found a case that was possible to solve that wasn't solved on the
        #  first guess at each step when using min(...).
        n,g = min((len(self.recips[g]), g) for g in self.namelist if len(self.recips[g]) > 1)
        # saved_recips = self.recips.copy()
        saved_recips = copy.deepcopy(self.recips)
        rlist = saved_recips[g]
        random.shuffle(rlist)
        if self.verbose: print "  Going to try %s gives to %s" % (g,rlist)
        for r in rlist:
            # Always start from the same spot.
            # self.recips = saved_recips.copy()
            self.recips = copy.deepcopy(saved_recips)
            if self.verbose:
                print "  Trying %s gives to %s" % (g,r)
                if False:
                    for name in self.namelist:
                        print "  %s: %s" % (name, self.recips[name])
            if not self.assign(g,r):
                # if self.verbose: print "  Done trying %s gives to %s" % (g,r)
                continue
            if self.generate_exchange():
                # if self.verbose: print "  Trying %s gives to %s succeeded." % (g,r)
                return True
            # if self.verbose: print "  Done trying %s gives to %s (next)" % (g,r)
        return False

    # Create random pairings (just permutations of the name list), until one of them
    # meets the necessary criteria.
    # Current criteria are:
    #    - No one gives to a family member
    #    - No one gives to herself.  (Which is taken care of by the above.)
    def generate_pairing(self):
        def is_good(pairing):
            for (giver, recipient) in pairing:
                if self.family_dict[giver] == self.family_dict[recipient]:
                    return False
            return(True)
        def gen_random_pairing(giver_list):
            # Copy the list, randomize (permute) the copy, and make the pairs.
            recipient_list = list(giver_list)
            random.shuffle(recipient_list)
            return zip(giver_list, recipient_list)

        tries = 0
        pairing = gen_random_pairing(self.namelist)
        while not is_good(pairing):
            pairing = gen_random_pairing(self.namelist)
            tries += 1

        self.pairing = pairing
        self.tries = tries

    # Print a pairing nicely.
    def show_pairing(self):
        if self.pairing == None:
            print "%8s" % "None"
            return
        for p in self.pairing:
            print "%8s gives to %s." % p

if __name__ == "__main__":
    # Edit this list to set the participants in the exchange.
    family_list = [["Alia", "Tanya"],
                   ["Nick", "Ariana", "Max"],
                   ["Paige", "Ian", "Kendra"]
                  ]
    ge = GiftExchange()
    for f in family_list:
        ge.add_family(f)
    ge.show()
    ge.generate_pairing()
    ge.show()


text:
namespace autofill {

// |arg| must be of type AutofillProfile.
MATCHER_P2(AutofillProfileHasInfo, type, expected_value, "") {
  return arg.GetRawInfo(type) == expected_value;
}

class MockEditAddressProfileDialogController
    : public EditAddressProfileDialogController {
 public:
  MOCK_METHOD(std::u16string, GetWindowTitle, (), (const, override));
  MOCK_METHOD(std::u16string, GetOkButtonLabel, (), (const, override));
  MOCK_METHOD(const AutofillProfile&, GetProfileToEdit, (), (const, override));
  MOCK_METHOD(void,
              OnUserDecision,
              (AutofillClient::SaveAddressProfileOfferUserDecision decision,
               const AutofillProfile& profile),
              (override));
  MOCK_METHOD(void, OnDialogClosed, (), (override));
};

class EditAddressProfileViewTest : public ChromeViewsTestBase {
 public:
  EditAddressProfileViewTest() = default;
  ~EditAddressProfileViewTest() override = default;

  void CreateViewAndShow();

  void SetUp() override {
    feature_list_.InitAndEnableFeature(
        features::kAutofillAddressProfileSavePrompt);
    ChromeViewsTestBase::SetUp();

    address_profile_to_edit_ = test::GetFullProfile();
    test_web_contents_ =
        content::WebContentsTester::CreateTestWebContents(&profile_, nullptr);
  }

  void TearDown() override {
    widget_->Close();
    parent_widget_.reset();
    ChromeViewsTestBase::TearDown();
  }

  const AutofillProfile& address_profile_to_edit() {
    return address_profile_to_edit_;
  }
  EditAddressProfileView* dialog() { return dialog_; }
  MockEditAddressProfileDialogController* mock_controller() {
    return &mock_controller_;
  }

 private:
  base::test::ScopedFeatureList feature_list_;
  TestingProfile profile_;
  AutofillProfile address_profile_to_edit_;
  // This enables uses of TestWebContents.
  content::RenderViewHostTestEnabler test_render_host_factories_;
  std::unique_ptr<content::WebContents> test_web_contents_;
  std::unique_ptr<views::Widget> parent_widget_;
  raw_ptr<views::Widget> widget_ = nullptr;
  raw_ptr<EditAddressProfileView> dialog_;
  testing::NiceMock<MockEditAddressProfileDialogController> mock_controller_;
};

void EditAddressProfileViewTest::CreateViewAndShow() {
  ON_CALL(*mock_controller(), GetWindowTitle())
      .WillByDefault(testing::Return(std::u16string()));
  ON_CALL(*mock_controller(), GetProfileToEdit())
      .WillByDefault(testing::ReturnRef(address_profile_to_edit()));

  dialog_ = new EditAddressProfileView(mock_controller());
  dialog_->ShowForWebContents(test_web_contents_.get());

  gfx::NativeView parent = gfx::kNullNativeView;
#if defined(OS_MAC)
  // We need a native view parent for the dialog to avoid a DCHECK
  // on Mac.
  parent_widget_ = CreateTestWidget();
  parent = parent_widget_->GetNativeView();
#endif
  widget_ =
      views::DialogDelegate::CreateDialogWidget(dialog_, GetContext(), parent);
  widget_->SetVisibilityChangedAnimationsEnabled(false);
  widget_->Show();
#if defined(OS_MAC)
  // Necessary for Mac. On other platforms this happens in the focus
  // manager, but it's disabled for Mac due to crbug.com/650859.
  parent_widget_->Activate();
  widget_->Activate();
#endif
}

TEST_F(EditAddressProfileViewTest, Sanity) {
  CreateViewAndShow();
  // Check that both OK and cancel button are enabled.
  EXPECT_TRUE(dialog()->IsDialogButtonEnabled(ui::DIALOG_BUTTON_OK));
  EXPECT_TRUE(dialog()->IsDialogButtonEnabled(ui::DIALOG_BUTTON_CANCEL));
}

TEST_F(EditAddressProfileViewTest, SaveInvokesTheCallbackWithEditedFullname) {
  CreateViewAndShow();
  const std::u16string kNewFirstName = u"New First Name";
  const std::string locale = g_browser_process->GetApplicationLocale();
  // Confirm that the new name is indeed different from the original one from
  // the controller.
  ASSERT_NE(kNewFirstName, address_profile_to_edit().GetInfo(
                               autofill::ServerFieldType::NAME_FULL, locale));
  AddressEditorView* editor_view = dialog()->GetAddressEditorViewForTesting();
  DCHECK(editor_view);

  editor_view->SetTextInputFieldValueForTesting(
      autofill::ServerFieldType::NAME_FULL, kNewFirstName);

  EXPECT_CALL(
      *mock_controller(),
      OnUserDecision(
          AutofillClient::SaveAddressProfileOfferUserDecision::kEditAccepted,
          AutofillProfileHasInfo(autofill::ServerFieldType::NAME_FULL,
                                 kNewFirstName)));
  dialog()->Accept();
}

TEST_F(EditAddressProfileViewTest,
       SaveInvokesTheCallbackWithEditedInvalidPhoneNumber) {
  CreateViewAndShow();
  const std::u16string kNewPhoneNumber = u"123456789";
  const std::string locale = g_browser_process->GetApplicationLocale();
  // Confirm that the new phone number is indeed different from the original one
  // from the controller.
  ASSERT_NE(kNewPhoneNumber,
            address_profile_to_edit().GetInfo(
                autofill::ServerFieldType::PHONE_HOME_WHOLE_NUMBER, locale));

  // Set the phone number in the editor to the new invalid value. Make sure that
  // this value is respected and sent to the backend.
  AddressEditorView* editor_view = dialog()->GetAddressEditorViewForTesting();
  DCHECK(editor_view);

  editor_view->SetTextInputFieldValueForTesting(
      autofill::ServerFieldType::PHONE_HOME_WHOLE_NUMBER, kNewPhoneNumber);

  EXPECT_CALL(
      *mock_controller(),
      OnUserDecision(
          AutofillClient::SaveAddressProfileOfferUserDecision::kEditAccepted,
          AutofillProfileHasInfo(
              autofill::ServerFieldType::PHONE_HOME_WHOLE_NUMBER,
              kNewPhoneNumber)));
  dialog()->Accept();
}

TEST_F(EditAddressProfileViewTest, SaveInvokesTheCallbackWithEditedEmail) {
  CreateViewAndShow();
  const std::u16string kNewEmail = u"abc@xyz.com";
  const std::string locale = g_browser_process->GetApplicationLocale();
  // Confirm that the new email is indeed different from the original one
  // from the controller.
  ASSERT_NE(kNewEmail, address_profile_to_edit().GetInfo(
                           autofill::ServerFieldType::EMAIL_ADDRESS, locale));
  AddressEditorView* editor_view = dialog()->GetAddressEditorViewForTesting();
  DCHECK(editor_view);

  editor_view->SetTextInputFieldValueForTesting(
      autofill::ServerFieldType::EMAIL_ADDRESS, kNewEmail);

  EXPECT_CALL(
      *mock_controller(),
      OnUserDecision(
          AutofillClient::SaveAddressProfileOfferUserDecision::kEditAccepted,
          AutofillProfileHasInfo(autofill::ServerFieldType::EMAIL_ADDRESS,
                                 kNewEmail)));
  dialog()->Accept();
}

}  // namespace autofill

redpajama_set_name: RedPajamaGithub


text:
'use strict';

describe('vAccordion', function () {

  var dependencies = [];

  var hasModule = function(module) {
    return dependencies.indexOf(module) >= 0;
  };

  beforeEach(function () {
    dependencies = angular.module('vAccordion').requires;
  });

  it('should load config module', function () {
    expect(hasModule('vAccordion.config')).toBe(true);
  });

  it('should load directives module', function () {
    expect(hasModule('vAccordion.directives')).toBe(true);
  });

});


text:
<?php

declare(strict_types=1);

namespace Sonata\AdminBundle\Twig;

use Sonata\AdminBundle\FieldDescription\FieldDescriptionInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use Twig\Extension\RuntimeExtensionInterface;

final class XEditableRuntime implements RuntimeExtensionInterface
{
    public const FIELD_DESCRIPTION_MAPPING = [
        FieldDescriptionInterface::TYPE_CHOICE => 'select',
        FieldDescriptionInterface::TYPE_BOOLEAN => 'select',
        FieldDescriptionInterface::TYPE_TEXTAREA => 'textarea',
        FieldDescriptionInterface::TYPE_HTML => 'textarea',
        FieldDescriptionInterface::TYPE_EMAIL => 'email',
        FieldDescriptionInterface::TYPE_STRING => 'text',
        FieldDescriptionInterface::TYPE_INTEGER => 'number',
        FieldDescriptionInterface::TYPE_FLOAT => 'number',
        FieldDescriptionInterface::TYPE_CURRENCY => 'number',
        FieldDescriptionInterface::TYPE_PERCENT => 'number',
        FieldDescriptionInterface::TYPE_URL => 'url',
    ];

    /**
     * @var string[]
     */
    private array $xEditableTypeMapping = [];

    private TranslatorInterface $translator;

    /**
     * @param string[] $xEditableTypeMapping
     *
     * @internal This class should only be used through Twig
     */
    public function __construct(
        TranslatorInterface $translator,
        array $xEditableTypeMapping = self::FIELD_DESCRIPTION_MAPPING
    ) {
        $this->translator = $translator;
        $this->xEditableTypeMapping = $xEditableTypeMapping;
    }

    /**
     * @return string|bool
     */
    public function getXEditableType(?string $type)
    {
        if (null === $type) {
            return false;
        }

        return $this->xEditableTypeMapping[$type] ?? false;
    }

    /**
     * Return xEditable choices based on the field description choices options & catalogue options.
     * With the following choice options:
     *     ['Status1' => 'Alias1', 'Status2' => 'Alias2']
     * The method will return:
     *     [['value' => 'Status1', 'text' => 'Alias1'], ['value' => 'Status2', 'text' => 'Alias2']].
     *
     * @phpstan-return array<array{value: string, text: string}>
     */
    public function getXEditableChoices(FieldDescriptionInterface $fieldDescription): array
    {
        $choices = $fieldDescription->getOption('choices', []);
        \assert(\is_array($choices));
        // NEXT_MAJOR: Remove the fallback on catalogue
        $catalogue = $fieldDescription->getOption('choice_translation_domain', $fieldDescription->getOption('catalogue'));

        reset($choices);
        $first = current($choices);
        if (\is_array($first)) {
            // the choice are already in the right format
            $xEditableChoices = $choices;
        } else {
            $xEditableChoices = [];
            foreach ($choices as $value => $text) {
                if (\is_array($text)) {
                    // the choice is already in the right format
                    $xEditableChoices[] = $text;
                    break;
                }

                if (\is_string($catalogue)) {
                    $text = $this->translator->trans($text, [], $catalogue);
                }

                $xEditableChoices[] = [
                    'value' => $value,
                    'text' => $text,
                ];
            }
        }

        if (
            false === $fieldDescription->getOption('required', true)
            && false === $fieldDescription->getOption('multiple', false)
        ) {
            $xEditableChoices = array_merge([[
                'value' => '',
                'text' => '',
            ]], $xEditableChoices);
        }

        return $xEditableChoices;
    }
}


text:
module Authentasaurus
  def self.evaluate_method(method, *args, &block)
    case method
      when Symbol
        object = args.shift
        object.send(method, *args, &block)
      when String
        eval(method, args.first.instance_eval { binding })
      when Proc, Method
        method.call(*args, &block)
      else
        if method == true || method == false
          return method
        else
          raise ArgumentError,
            "Callbacks must be a symbol denoting the method to call, a string to be evaluated, " +
            "a block to be invoked, or a condition."
        end
    end
  end
end


text:
import React from 'react';
import _ from 'lodash';

export interface IUseListData<T> {
  totalCount: number;
  data: Array<T>;
}

export interface IUseListOptions<T> {
  getData: (params: object) => Promise<IUseListData<T>>;
}

export type IUseListParams<P> = P & {
  pageNum: number;
  pageCount: number;
};

export function useList<T, P = {}>(
  defaultParams: IUseListParams<P>,
  options: IUseListOptions<T>
) {
  const { getData } = options;

  const [loading, setLoading] = React.useState(false);
  const [loadingMore, setLoadingMore] = React.useState(false);
  const [params, setParams] = React.useState(defaultParams);
  const [list, setList] = React.useState<Array<T>>([]);
  const [data, setData] = React.useState<IUseListData<T>>({
    data: [],
    totalCount: 0,
  });

  const hasMore = React.useMemo(
    () => params.pageCount * params.pageNum < data.totalCount,
    [params, data]
  );

  const onLoad = React.useCallback(
    _.debounce(async () => {
      setLoading(true);

      try {
        const targetParams = Object.keys(params).reduce((p, c) => {
          const v = params[c];
          if (v !== '' && v !== undefined) {
            p[c] = v;
          }
          return p;
        }, {});

        const data = await getData(targetParams);
        setData(data);

        if (loadingMore) {
          setList(list.concat(data.data));
        } else {
          setList(data.data);
        }
      } finally {
        setLoading(false);
        setLoadingMore(false);
      }
    }, 200),
    [params, list, setList, setData, setLoading, loadingMore, setLoadingMore]
  );

  const onRefresh = React.useCallback(
    _.debounce(() => {
      setParams({ ...params, pageNum: 1 });
    }, 200),
    [params]
  );

  const onLoadMore = React.useCallback(
    _.debounce(() => {
      setLoadingMore(true);
      setParams({ ...params, pageNum: params.pageNum + 1 });
    }, 200),
    [params]
  );

  React.useEffect(() => {
    onLoad();
  }, [params]);

  return {
    loading,
    setLoading,
    loadingMore,
    setLoadingMore,
    data,
    setData,
    list,
    setList,
    params,
    setParams,
    onLoad,
    onRefresh,
    onLoadMore,
    hasMore,
  };
}


text:
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Collections;
using System.Collections.Generic;
using System.Text;

namespace LiteDB.Tests
{
    [TestClass]
    public class MemoryStreamTest
    {
        [TestMethod]
        public void MemoryStream_Test()
        {
            var mem = new MemoryStream();

            using (var db = new LiteEngine(mem))
            {
                db.Insert("col", new BsonDocument { { "_id", 1 } , { "name", "John" } });
                db.Insert("col", new BsonDocument { { "_id", 2 }, { "name", "Doe" } });
            }

            using (var db = new LiteEngine(mem))
            {
                var john = db.Find("col", Query.EQ("_id", 1)).FirstOrDefault();
                var doe = db.Find("col", Query.EQ("_id", 2)).FirstOrDefault();

                Assert.AreEqual("John", john["name"].AsString);
                Assert.AreEqual("Doe", doe["name"].AsString);
            }
        }
    }
}


text:
var geddy = require('geddy');

console.log("-------starting server in " + (process.env.NODE_ENV || 'development_mongo') + " mode------------");

process.env.NODE_ENV = 'development';

geddy.start({
  environment: process.env.NODE_ENV || 'development_mongo'
});


text:
layout: page
parent_title: What You Did
title: Outcome Stories
permalink: what-you-did/impact-stories/
identifier: what-you-did
order: 1

gallery_item:
    caption_header: Outcome Stories
    caption: A revolution in technology is happening and it's changing everything we do. Never before has so much data been collected and analysed. This year, the Open Knowledge Festival, brought together over 1,000 people from 60 countries to share their skills and experiences in order to ensure that the knowledge and insights derived from this data are open and publicly accessible to all.

---

## Outcome Stories

A revolution in technology is happening and it's changing everything we do. Never before has so much data been collected and analysed. This year, the Open Knowledge Festival, brought together over 1,000 people from 60 countries to share their skills and experiences in order to ensure that the knowledge and insights derived from this data are open and publicly accessible to all. If we as a society are going to find solutions to our shared challenges, it is imperative that everyone from citizens and scientists to entrepreneurs and activists has access to the information they need to shape the societies they want. However, in order to gain access to this wealth of information currently locked behind paywalls or held by governments, institutions and corporations, we need to come together to break down knowledge silos, share our expertise and build a cohesive, global open knowledge movement.

{% include image.html filename="14736486182_bd35c7d8ce_z.jpg" alt="Open Knowledge Festival Session" caption="Group Work at Open Knowledge Festival, photo by Gregor Fisher" %}

At the root of change lies passionate people with inspired ideas but it can be challenging to translate ideas into actions and as such the aim of OKFestival was to translate open minds into tangible outcomes that are having a real impact on the world. With over 85 sessions, 30 fringe events, a parallel unconference and countless breakout sessions, discussions and meet-ups, we came away from OKFestival with a vibrant anthology of stories to tell!

In the weeks that followed the festival we talked with governments, funders, technologists and NGOs who had attended the festival to get a better idea of their experience at the event. We sat down with community leaders, government representatives and a few of the OKFestival sponsors to find out more about their experience at OKFestival, why they chose to participate and the outcomes and impact of the sessions they helped to facilitate and participated in! Here is what we learned.

---


text:
/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.managedidentities.v1.model;

/**
 * ListSqlIntegrationsResponse is the response message for ListSqlIntegrations method.
 *
 *
 This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Managed Service for Microsoft Active Directory API.
 * For a detailed explanation see:
 * https://developers.google.com/api-client-library/java/google-http-java-client/json
 *

 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class ListSqlIntegrationsResponse extends com.google.api.client.json.GenericJson {

  /**
   * Token to retrieve the next page of results, or empty if there are no more results in the list.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String nextPageToken;

  /**
   * A list of SQLIntegrations of a domain.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<SqlIntegration> sqlIntegrations;

  /**
   * A list of locations that could not be reached.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> unreachable;

  /**
   * Token to retrieve the next page of results, or empty if there are no more results in the list.
   * @return value or {@code null} for none
   */
  public java.lang.String getNextPageToken() {
    return nextPageToken;
  }

  /**
   * Token to retrieve the next page of results, or empty if there are no more results in the list.
   * @param nextPageToken nextPageToken or {@code null} for none
   */
  public ListSqlIntegrationsResponse setNextPageToken(java.lang.String nextPageToken) {
    this.nextPageToken = nextPageToken;
    return this;
  }

  /**
   * A list of SQLIntegrations of a domain.
   * @return value or {@code null} for none
   */
  public java.util.List<SqlIntegration> getSqlIntegrations() {
    return sqlIntegrations;
  }

  /**
   * A list of SQLIntegrations of a domain.
   * @param sqlIntegrations sqlIntegrations or {@code null} for none
   */
  public ListSqlIntegrationsResponse setSqlIntegrations(java.util.List<SqlIntegration> sqlIntegrations) {
    this.sqlIntegrations = sqlIntegrations;
    return this;
  }

  /**
   * A list of locations that could not be reached.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getUnreachable() {
    return unreachable;
  }

  /**
   * A list of locations that could not be reached.
   * @param unreachable unreachable or {@code null} for none
   */
  public ListSqlIntegrationsResponse setUnreachable(java.util.List<java.lang.String> unreachable) {
    this.unreachable = unreachable;
    return this;
  }

  @Override
  public ListSqlIntegrationsResponse set(String fieldName, Object value) {
    return (ListSqlIntegrationsResponse) super.set(fieldName, value);
  }

  @Override
  public ListSqlIntegrationsResponse clone() {
    return (ListSqlIntegrationsResponse) super.clone();
  }

}


text:
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.

using System.Collections.Generic;

namespace IdentityServer4.Quickstart.UI.Models
{
    public class LoginViewModel : LoginInputModel
    {
        public bool EnableLocalLogin { get; set; }
        public IEnumerable<ExternalProvider> ExternalProviders { get; set; }
    }

    public class ExternalProvider
    {
        public string DisplayName { get; set; }
        public string AuthenticationScheme { get; set; }
    }
}


text:
/**
 * Autogenerated by Thrift Compiler (0.9.3)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package org.apache.accumulo.core.security.thrift;

import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;

import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticationKey, TAuthenticationKey._Fields>, java.io.Serializable, Cloneable, Comparable<TAuthenticationKey> {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TAuthenticationKey");

  private static final org.apache.thrift.protocol.TField SECRET_FIELD_DESC = new org.apache.thrift.protocol.TField("secret", org.apache.thrift.protocol.TType.STRING, (short)1);
  private static final org.apache.thrift.protocol.TField KEY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("keyId", org.apache.thrift.protocol.TType.I32, (short)2);
  private static final org.apache.thrift.protocol.TField EXPIRATION_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("expirationDate", org.apache.thrift.protocol.TType.I64, (short)3);
  private static final org.apache.thrift.protocol.TField CREATION_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("creationDate", org.apache.thrift.protocol.TType.I64, (short)4);

  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
  static {
    schemes.put(StandardScheme.class, new TAuthenticationKeyStandardSchemeFactory());
    schemes.put(TupleScheme.class, new TAuthenticationKeyTupleSchemeFactory());
  }

  public ByteBuffer secret; // required
  public int keyId; // optional
  public long expirationDate; // optional
  public long creationDate; // optional

  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
    SECRET((short)1, "secret"),
    KEY_ID((short)2, "keyId"),
    EXPIRATION_DATE((short)3, "expirationDate"),
    CREATION_DATE((short)4, "creationDate");

    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

    static {
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
        byName.put(field.getFieldName(), field);
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, or null if its not found.
     */
    public static _Fields findByThriftId(int fieldId) {
      switch(fieldId) {
        case 1: // SECRET
          return SECRET;
        case 2: // KEY_ID
          return KEY_ID;
        case 3: // EXPIRATION_DATE
          return EXPIRATION_DATE;
        case 4: // CREATION_DATE
          return CREATION_DATE;
        default:
          return null;
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, throwing an exception
     * if it is not found.
     */
    public static _Fields findByThriftIdOrThrow(int fieldId) {
      _Fields fields = findByThriftId(fieldId);
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
      return fields;
    }

    /**
     * Find the _Fields constant that matches name, or null if its not found.
     */
    public static _Fields findByName(String name) {
      return byName.get(name);
    }

    private final short _thriftId;
    private final String _fieldName;

    _Fields(short thriftId, String fieldName) {
      _thriftId = thriftId;
      _fieldName = fieldName;
    }

    public short getThriftFieldId() {
      return _thriftId;
    }

    public String getFieldName() {
      return _fieldName;
    }
  }

  // isset id assignments
  private static final int __KEYID_ISSET_ID = 0;
  private static final int __EXPIRATIONDATE_ISSET_ID = 1;
  private static final int __CREATIONDATE_ISSET_ID = 2;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.KEY_ID,_Fields.EXPIRATION_DATE,_Fields.CREATION_DATE};
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
  static {
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
    tmpMap.put(_Fields.SECRET, new org.apache.thrift.meta_data.FieldMetaData("secret", org.apache.thrift.TFieldRequirementType.DEFAULT,
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
    tmpMap.put(_Fields.KEY_ID, new org.apache.thrift.meta_data.FieldMetaData("keyId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.EXPIRATION_DATE, new org.apache.thrift.meta_data.FieldMetaData("expirationDate", org.apache.thrift.TFieldRequirementType.OPTIONAL,
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.CREATION_DATE, new org.apache.thrift.meta_data.FieldMetaData("creationDate", org.apache.thrift.TFieldRequirementType.OPTIONAL,
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    metaDataMap = Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TAuthenticationKey.class, metaDataMap);
  }

  public TAuthenticationKey() {
  }

  public TAuthenticationKey(
    ByteBuffer secret)
  {
    this();
    this.secret = org.apache.thrift.TBaseHelper.copyBinary(secret);
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TAuthenticationKey(TAuthenticationKey other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetSecret()) {
      this.secret = org.apache.thrift.TBaseHelper.copyBinary(other.secret);
    }
    this.keyId = other.keyId;
    this.expirationDate = other.expirationDate;
    this.creationDate = other.creationDate;
  }

  public TAuthenticationKey deepCopy() {
    return new TAuthenticationKey(this);
  }

  @Override
  public void clear() {
    this.secret = null;
    setKeyIdIsSet(false);
    this.keyId = 0;
    setExpirationDateIsSet(false);
    this.expirationDate = 0;
    setCreationDateIsSet(false);
    this.creationDate = 0;
  }

  public byte[] getSecret() {
    setSecret(org.apache.thrift.TBaseHelper.rightSize(secret));
    return secret == null ? null : secret.array();
  }

  public ByteBuffer bufferForSecret() {
    return org.apache.thrift.TBaseHelper.copyBinary(secret);
  }

  public TAuthenticationKey setSecret(byte[] secret) {
    this.secret = secret == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(secret, secret.length));
    return this;
  }

  public TAuthenticationKey setSecret(ByteBuffer secret) {
    this.secret = org.apache.thrift.TBaseHelper.copyBinary(secret);
    return this;
  }

  public void unsetSecret() {
    this.secret = null;
  }

  /** Returns true if field secret is set (has been assigned a value) and false otherwise */
  public boolean isSetSecret() {
    return this.secret != null;
  }

  public void setSecretIsSet(boolean value) {
    if (!value) {
      this.secret = null;
    }
  }

  public int getKeyId() {
    return this.keyId;
  }

  public TAuthenticationKey setKeyId(int keyId) {
    this.keyId = keyId;
    setKeyIdIsSet(true);
    return this;
  }

  public void unsetKeyId() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __KEYID_ISSET_ID);
  }

  /** Returns true if field keyId is set (has been assigned a value) and false otherwise */
  public boolean isSetKeyId() {
    return EncodingUtils.testBit(__isset_bitfield, __KEYID_ISSET_ID);
  }

  public void setKeyIdIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __KEYID_ISSET_ID, value);
  }

  public long getExpirationDate() {
    return this.expirationDate;
  }

  public TAuthenticationKey setExpirationDate(long expirationDate) {
    this.expirationDate = expirationDate;
    setExpirationDateIsSet(true);
    return this;
  }

  public void unsetExpirationDate() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXPIRATIONDATE_ISSET_ID);
  }

  /** Returns true if field expirationDate is set (has been assigned a value) and false otherwise */
  public boolean isSetExpirationDate() {
    return EncodingUtils.testBit(__isset_bitfield, __EXPIRATIONDATE_ISSET_ID);
  }

  public void setExpirationDateIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXPIRATIONDATE_ISSET_ID, value);
  }

  public long getCreationDate() {
    return this.creationDate;
  }

  public TAuthenticationKey setCreationDate(long creationDate) {
    this.creationDate = creationDate;
    setCreationDateIsSet(true);
    return this;
  }

  public void unsetCreationDate() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATIONDATE_ISSET_ID);
  }

  /** Returns true if field creationDate is set (has been assigned a value) and false otherwise */
  public boolean isSetCreationDate() {
    return EncodingUtils.testBit(__isset_bitfield, __CREATIONDATE_ISSET_ID);
  }

  public void setCreationDateIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATIONDATE_ISSET_ID, value);
  }

  public void setFieldValue(_Fields field, Object value) {
    switch (field) {
    case SECRET:
      if (value == null) {
        unsetSecret();
      } else {
        setSecret((ByteBuffer)value);
      }
      break;

    case KEY_ID:
      if (value == null) {
        unsetKeyId();
      } else {
        setKeyId((Integer)value);
      }
      break;

    case EXPIRATION_DATE:
      if (value == null) {
        unsetExpirationDate();
      } else {
        setExpirationDate((Long)value);
      }
      break;

    case CREATION_DATE:
      if (value == null) {
        unsetCreationDate();
      } else {
        setCreationDate((Long)value);
      }
      break;

    }
  }

  public Object getFieldValue(_Fields field) {
    switch (field) {
    case SECRET:
      return getSecret();

    case KEY_ID:
      return getKeyId();

    case EXPIRATION_DATE:
      return getExpirationDate();

    case CREATION_DATE:
      return getCreationDate();

    }
    throw new IllegalStateException();
  }

  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
  public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case SECRET:
      return isSetSecret();
    case KEY_ID:
      return isSetKeyId();
    case EXPIRATION_DATE:
      return isSetExpirationDate();
    case CREATION_DATE:
      return isSetCreationDate();
    }
    throw new IllegalStateException();
  }

  @Override
  public boolean equals(Object that) {
    if (that == null)
      return false;
    if (that instanceof TAuthenticationKey)
      return this.equals((TAuthenticationKey)that);
    return false;
  }

  public boolean equals(TAuthenticationKey that) {
    if (that == null)
      return false;

    boolean this_present_secret = true && this.isSetSecret();
    boolean that_present_secret = true && that.isSetSecret();
    if (this_present_secret || that_present_secret) {
      if (!(this_present_secret && that_present_secret))
        return false;
      if (!this.secret.equals(that.secret))
        return false;
    }

    boolean this_present_keyId = true && this.isSetKeyId();
    boolean that_present_keyId = true && that.isSetKeyId();
    if (this_present_keyId || that_present_keyId) {
      if (!(this_present_keyId && that_present_keyId))
        return false;
      if (this.keyId != that.keyId)
        return false;
    }

    boolean this_present_expirationDate = true && this.isSetExpirationDate();
    boolean that_present_expirationDate = true && that.isSetExpirationDate();
    if (this_present_expirationDate || that_present_expirationDate) {
      if (!(this_present_expirationDate && that_present_expirationDate))
        return false;
      if (this.expirationDate != that.expirationDate)
        return false;
    }

    boolean this_present_creationDate = true && this.isSetCreationDate();
    boolean that_present_creationDate = true && that.isSetCreationDate();
    if (this_present_creationDate || that_present_creationDate) {
      if (!(this_present_creationDate && that_present_creationDate))
        return false;
      if (this.creationDate != that.creationDate)
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    List<Object> list = new ArrayList<Object>();

    boolean present_secret = true && (isSetSecret());
    list.add(present_secret);
    if (present_secret)
      list.add(secret);

    boolean present_keyId = true && (isSetKeyId());
    list.add(present_keyId);
    if (present_keyId)
      list.add(keyId);

    boolean present_expirationDate = true && (isSetExpirationDate());
    list.add(present_expirationDate);
    if (present_expirationDate)
      list.add(expirationDate);

    boolean present_creationDate = true && (isSetCreationDate());
    list.add(present_creationDate);
    if (present_creationDate)
      list.add(creationDate);

    return list.hashCode();
  }

  @Override
  public int compareTo(TAuthenticationKey other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetSecret()).compareTo(other.isSetSecret());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSecret()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.secret, other.secret);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetKeyId()).compareTo(other.isSetKeyId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetKeyId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keyId, other.keyId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetExpirationDate()).compareTo(other.isSetExpirationDate());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetExpirationDate()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.expirationDate, other.expirationDate);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCreationDate()).compareTo(other.isSetCreationDate());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCreationDate()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creationDate, other.creationDate);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }

  public _Fields fieldForId(int fieldId) {
    return _Fields.findByThriftId(fieldId);
  }

  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
  }

  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder("TAuthenticationKey(");
    boolean first = true;

    sb.append("secret:");
    if (this.secret == null) {
      sb.append("null");
    } else {
      org.apache.thrift.TBaseHelper.toString(this.secret, sb);
    }
    first = false;
    if (isSetKeyId()) {
      if (!first) sb.append(", ");
      sb.append("keyId:");
      sb.append(this.keyId);
      first = false;
    }
    if (isSetExpirationDate()) {
      if (!first) sb.append(", ");
      sb.append("expirationDate:");
      sb.append(this.expirationDate);
      first = false;
    }
    if (isSetCreationDate()) {
      if (!first) sb.append(", ");
      sb.append("creationDate:");
      sb.append(this.creationDate);
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    // check for sub-struct validity
  }

  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
    try {
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
    try {
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
      __isset_bitfield = 0;
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private static class TAuthenticationKeyStandardSchemeFactory implements SchemeFactory {
    public TAuthenticationKeyStandardScheme getScheme() {
      return new TAuthenticationKeyStandardScheme();
    }
  }

  private static class TAuthenticationKeyStandardScheme extends StandardScheme<TAuthenticationKey> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TAuthenticationKey struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField schemeField;
      iprot.readStructBegin();
      while (true)
      {
        schemeField = iprot.readFieldBegin();
        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
          break;
        }
        switch (schemeField.id) {
          case 1: // SECRET
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.secret = iprot.readBinary();
              struct.setSecretIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // KEY_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.keyId = iprot.readI32();
              struct.setKeyIdIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // EXPIRATION_DATE
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.expirationDate = iprot.readI64();
              struct.setExpirationDateIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // CREATION_DATE
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.creationDate = iprot.readI64();
              struct.setCreationDateIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot, TAuthenticationKey struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.secret != null) {
        oprot.writeFieldBegin(SECRET_FIELD_DESC);
        oprot.writeBinary(struct.secret);
        oprot.writeFieldEnd();
      }
      if (struct.isSetKeyId()) {
        oprot.writeFieldBegin(KEY_ID_FIELD_DESC);
        oprot.writeI32(struct.keyId);
        oprot.writeFieldEnd();
      }
      if (struct.isSetExpirationDate()) {
        oprot.writeFieldBegin(EXPIRATION_DATE_FIELD_DESC);
        oprot.writeI64(struct.expirationDate);
        oprot.writeFieldEnd();
      }
      if (struct.isSetCreationDate()) {
        oprot.writeFieldBegin(CREATION_DATE_FIELD_DESC);
        oprot.writeI64(struct.creationDate);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

  private static class TAuthenticationKeyTupleSchemeFactory implements SchemeFactory {
    public TAuthenticationKeyTupleScheme getScheme() {
      return new TAuthenticationKeyTupleScheme();
    }
  }

  private static class TAuthenticationKeyTupleScheme extends TupleScheme<TAuthenticationKey> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TAuthenticationKey struct) throws org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetSecret()) {
        optionals.set(0);
      }
      if (struct.isSetKeyId()) {
        optionals.set(1);
      }
      if (struct.isSetExpirationDate()) {
        optionals.set(2);
      }
      if (struct.isSetCreationDate()) {
        optionals.set(3);
      }
      oprot.writeBitSet(optionals, 4);
      if (struct.isSetSecret()) {
        oprot.writeBinary(struct.secret);
      }
      if (struct.isSetKeyId()) {
        oprot.writeI32(struct.keyId);
      }
      if (struct.isSetExpirationDate()) {
        oprot.writeI64(struct.expirationDate);
      }
      if (struct.isSetCreationDate()) {
        oprot.writeI64(struct.creationDate);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TAuthenticationKey struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(4);
      if (incoming.get(0)) {
        struct.secret = iprot.readBinary();
        struct.setSecretIsSet(true);
      }
      if (incoming.get(1)) {
        struct.keyId = iprot.readI32();
        struct.setKeyIdIsSet(true);
      }
      if (incoming.get(2)) {
        struct.expirationDate = iprot.readI64();
        struct.setExpirationDateIsSet(true);
      }
      if (incoming.get(3)) {
        struct.creationDate = iprot.readI64();
        struct.setCreationDateIsSet(true);
      }
    }
  }

}


text:
source ~/.profile
nvm use 0.10.12
./node_modules/grunt-cli/bin/grunt server


text:
package org.elasticsearch.spark.sql

import scala.collection.JavaConverters.mapAsJavaMapConverter
import scala.collection.Map

import org.apache.spark.annotation.AlphaComponent
import org.apache.spark.annotation.DeveloperApi
import org.apache.spark.api.java.JavaRDD.fromRDD
import org.apache.spark.sql.SQLContext
import org.apache.spark.sql.DataFrame
import org.elasticsearch.hadoop.cfg.ConfigurationOptions.ES_QUERY
import org.elasticsearch.hadoop.cfg.ConfigurationOptions.ES_RESOURCE_READ
import org.elasticsearch.hadoop.cfg.ConfigurationOptions.ES_RESOURCE_WRITE
import org.elasticsearch.hadoop.cfg.PropertiesSettings
import org.elasticsearch.spark.cfg.SparkSettingsManager

object EsSparkSQL {

  def esDF(sc: SQLContext): DataFrame = esDF(sc, Map.empty[String, String])
  def esDF(sc: SQLContext, resource: String): DataFrame = esDF(sc, Map(ES_RESOURCE_READ -> resource))
  def esDF(sc: SQLContext, resource: String, query: String): DataFrame = esDF(sc, Map(ES_RESOURCE_READ -> resource, ES_QUERY -> query))
  def esDF(sc: SQLContext, cfg: Map[String, String]): DataFrame = {
    val rowRDD = new ScalaEsRowRDD(sc.sparkContext, cfg)
    val schema = MappingUtils.discoverMapping(rowRDD.esCfg)
    sc.createDataFrame(rowRDD, schema)
  }

  def saveToEs(srdd: DataFrame, resource: String) {
    saveToEs(srdd, Map(ES_RESOURCE_WRITE -> resource))
  }
  def saveToEs(srdd: DataFrame, resource: String, cfg: Map[String, String]) {
    saveToEs(srdd, collection.mutable.Map(cfg.toSeq: _*) += (ES_RESOURCE_WRITE -> resource))
  }
  def saveToEs(srdd: DataFrame, cfg: Map[String, String]) {
    val sparkCtx = srdd.sqlContext.sparkContext
    val sparkCfg = new SparkSettingsManager().load(sparkCtx.getConf)
    val esCfg = new PropertiesSettings().load(sparkCfg.save())
    esCfg.merge(cfg.asJava)

    sparkCtx.runJob(srdd.rdd, new EsDataFrameWriter(srdd.schema, esCfg.save()).write _)
  }
}


text:
using System;
using System.Threading;
using Mono.Collections.Generic;

using Mono.Cecil.Metadata;

namespace Mono.Cecil {

	public sealed class GenericParameter : TypeReference, ICustomAttributeProvider {

		internal int position;
		internal GenericParameterType type;
		internal IGenericParameterProvider owner;

		ushort attributes;
		GenericParameterConstraintCollection constraints;
		Collection<CustomAttribute> custom_attributes;

		public GenericParameterAttributes Attributes {
			get { return (GenericParameterAttributes) attributes; }
			set { attributes = (ushort) value; }
		}

		public int Position {
			get { return position; }
		}

		public GenericParameterType Type {
			get { return type; }
		}

		public IGenericParameterProvider Owner {
			get { return owner; }
		}

		public bool HasConstraints {
			get {
				if (constraints != null)
					return constraints.Count > 0;

				return HasImage && Module.Read (this, (generic_parameter, reader) => reader.HasGenericConstraints (generic_parameter));
			}
		}

		public Collection<GenericParameterConstraint> Constraints {
			get {
				if (constraints != null)
					return constraints;

				if (HasImage)
					return Module.Read (ref constraints, this, (generic_parameter, reader) => reader.ReadGenericConstraints (generic_parameter));

				Interlocked.CompareExchange (ref constraints, new GenericParameterConstraintCollection (this), null);
				return constraints;
			}
		}

		public bool HasCustomAttributes {
			get {
				if (custom_attributes != null)
					return custom_attributes.Count > 0;

				return this.GetHasCustomAttributes (Module);
			}
		}

		public Collection<CustomAttribute> CustomAttributes {
			get { return custom_attributes ?? (this.GetCustomAttributes (ref custom_attributes, Module)); }
		}

		public override IMetadataScope Scope {
			get {
				if (owner == null)
					return null;

				return owner.GenericParameterType == GenericParameterType.Method
					? ((MethodReference) owner).DeclaringType.Scope
					: ((TypeReference) owner).Scope;
			}
			set { throw new InvalidOperationException (); }
		}

		public override TypeReference DeclaringType {
			get { return owner as TypeReference; }
			set { throw new InvalidOperationException (); }
		}

		public MethodReference DeclaringMethod {
			get { return owner as MethodReference; }
		}

		public override ModuleDefinition Module {
			get { return module ?? owner.Module; }
		}

		public override string Name {
			get {
				if (!string.IsNullOrEmpty (base.Name))
					return base.Name;

				return base.Name = (type == GenericParameterType.Method ? "!!" : "!") + position;
			}
		}

		public override string Namespace {
			get { return string.Empty; }
			set { throw new InvalidOperationException (); }
		}

		public override string FullName {
			get { return Name; }
		}

		public override bool IsGenericParameter {
			get { return true; }
		}

		public override bool ContainsGenericParameter {
			get { return true; }
		}

		public override MetadataType MetadataType {
			get { return (MetadataType) etype; }
		}

		#region GenericParameterAttributes

		public bool IsNonVariant {
			get { return attributes.GetMaskedAttributes ((ushort) GenericParameterAttributes.VarianceMask, (ushort) GenericParameterAttributes.NonVariant); }
			set { attributes = attributes.SetMaskedAttributes ((ushort) GenericParameterAttributes.VarianceMask, (ushort) GenericParameterAttributes.NonVariant, value); }
		}

		public bool IsCovariant {
			get { return attributes.GetMaskedAttributes ((ushort) GenericParameterAttributes.VarianceMask, (ushort) GenericParameterAttributes.Covariant); }
			set { attributes = attributes.SetMaskedAttributes ((ushort) GenericParameterAttributes.VarianceMask, (ushort) GenericParameterAttributes.Covariant, value); }
		}

		public bool IsContravariant {
			get { return attributes.GetMaskedAttributes ((ushort) GenericParameterAttributes.VarianceMask, (ushort) GenericParameterAttributes.Contravariant); }
			set { attributes = attributes.SetMaskedAttributes ((ushort) GenericParameterAttributes.VarianceMask, (ushort) GenericParameterAttributes.Contravariant, value); }
		}

		public bool HasReferenceTypeConstraint {
			get { return attributes.GetAttributes ((ushort) GenericParameterAttributes.ReferenceTypeConstraint); }
			set { attributes = attributes.SetAttributes ((ushort) GenericParameterAttributes.ReferenceTypeConstraint, value); }
		}

		public bool HasNotNullableValueTypeConstraint {
			get { return attributes.GetAttributes ((ushort) GenericParameterAttributes.NotNullableValueTypeConstraint); }
			set { attributes = attributes.SetAttributes ((ushort) GenericParameterAttributes.NotNullableValueTypeConstraint, value); }
		}

		public bool HasDefaultConstructorConstraint {
			get { return attributes.GetAttributes ((ushort) GenericParameterAttributes.DefaultConstructorConstraint); }
			set { attributes = attributes.SetAttributes ((ushort) GenericParameterAttributes.DefaultConstructorConstraint, value); }
		}

		#endregion

		public GenericParameter (IGenericParameterProvider owner)
			: this (string.Empty, owner)
		{
		}

		public GenericParameter (string name, IGenericParameterProvider owner)
			: base (string.Empty, name)
		{
			if (owner == null)
				throw new ArgumentNullException ();

			this.position = -1;
			this.owner = owner;
			this.type = owner.GenericParameterType;
			this.etype = ConvertGenericParameterType (this.type);
			this.token = new MetadataToken (TokenType.GenericParam);

		}

		internal GenericParameter (int position, GenericParameterType type, ModuleDefinition module)
			: base (string.Empty, string.Empty)
		{
			Mixin.CheckModule (module);

			this.position = position;
			this.type = type;
			this.etype = ConvertGenericParameterType (type);
			this.module = module;
			this.token = new MetadataToken (TokenType.GenericParam);
		}

		static ElementType ConvertGenericParameterType (GenericParameterType type)
		{
			switch (type) {
			case GenericParameterType.Type:
				return ElementType.Var;
			case GenericParameterType.Method:
				return ElementType.MVar;
			}

			throw new ArgumentOutOfRangeException ();
		}

		public override TypeDefinition Resolve ()
		{
			return null;
		}
	}

	sealed class GenericParameterCollection : Collection<GenericParameter> {

		readonly IGenericParameterProvider owner;

		internal GenericParameterCollection (IGenericParameterProvider owner)
		{
			this.owner = owner;
		}

		internal GenericParameterCollection (IGenericParameterProvider owner, int capacity)
			: base (capacity)
		{
			this.owner = owner;
		}

		protected override void OnAdd (GenericParameter item, int index)
		{
			UpdateGenericParameter (item, index);
		}

		protected override void OnInsert (GenericParameter item, int index)
		{
			UpdateGenericParameter (item, index);

			for (int i = index; i < size; i++)
				items[i].position = i + 1;
		}

		protected override void OnSet (GenericParameter item, int index)
		{
			UpdateGenericParameter (item, index);
		}

		void UpdateGenericParameter (GenericParameter item, int index)
		{
			item.owner = owner;
			item.position = index;
			item.type = owner.GenericParameterType;
		}

		protected override void OnRemove (GenericParameter item, int index)
		{
			item.owner = null;
			item.position = -1;
			item.type = GenericParameterType.Type;

			for (int i = index + 1; i < size; i++)
				items[i].position = i - 1;
		}
	}

	public sealed class GenericParameterConstraint : ICustomAttributeProvider {

		internal GenericParameter generic_parameter;
		internal MetadataToken token;

		TypeReference constraint_type;
		Collection<CustomAttribute> custom_attributes;

		public TypeReference ConstraintType {
			get { return constraint_type; }
			set { constraint_type = value; }
		}

		public bool HasCustomAttributes {
			get {
				if (custom_attributes != null)
					return custom_attributes.Count > 0;

				if (generic_parameter == null)
					return false;

				return this.GetHasCustomAttributes (generic_parameter.Module);
			}
		}

		public Collection<CustomAttribute> CustomAttributes {
			get {
				if (generic_parameter == null) {
					if (custom_attributes == null)
						Interlocked.CompareExchange (ref custom_attributes, new Collection<CustomAttribute> (), null);
					return custom_attributes;
				}

				return custom_attributes ?? (this.GetCustomAttributes (ref custom_attributes, generic_parameter.Module));
			}
		}

		public MetadataToken MetadataToken {
			get { return token; }
			set { token = value; }
		}

		internal GenericParameterConstraint (TypeReference constraintType, MetadataToken token)
		{
			this.constraint_type = constraintType;
			this.token = token;
		}

		public GenericParameterConstraint (TypeReference constraintType)
		{
			Mixin.CheckType (constraintType, Mixin.Argument.constraintType);

			this.constraint_type = constraintType;
			this.token = new MetadataToken (TokenType.GenericParamConstraint);
		}
	}

	class GenericParameterConstraintCollection : Collection<GenericParameterConstraint>
	{
		readonly GenericParameter generic_parameter;

		internal GenericParameterConstraintCollection (GenericParameter genericParameter)
		{
			this.generic_parameter = genericParameter;
		}

		internal GenericParameterConstraintCollection (GenericParameter genericParameter, int length)
			: base (length)
		{
			this.generic_parameter = genericParameter;
		}

		protected override void OnAdd (GenericParameterConstraint item, int index)
		{
			item.generic_parameter = generic_parameter;
		}

		protected override void OnInsert (GenericParameterConstraint item, int index)
		{
			item.generic_parameter = generic_parameter;
		}

		protected override void OnSet (GenericParameterConstraint item, int index)
		{
			item.generic_parameter = generic_parameter;
		}

		protected override void OnRemove (GenericParameterConstraint item, int index)
		{
			item.generic_parameter = null;
		}
	}
}


text:
#ifndef __DES_CRYPT_H__
#define __DES_CRYPT_H__ 1

#include <features.h>

__BEGIN_DECLS

#define DES_MAXDATA 8192	/* max bytes encrypted in one call */
#define DES_DIRMASK (1 << 0)
#define DES_ENCRYPT (0*DES_DIRMASK)	/* Encrypt */
#define DES_DECRYPT (1*DES_DIRMASK)	/* Decrypt */

#define DES_DEVMASK (1 << 1)
#define	DES_HW (0*DES_DEVMASK)	/* Use hardware device */
#define DES_SW (1*DES_DEVMASK)	/* Use software device */

#define DESERR_NONE 0	/* succeeded */
#define DESERR_NOHWDEVICE 1	/* succeeded, but hw device not available */
#define DESERR_HWERROR 2	/* failed, hardware/driver error */
#define DESERR_BADPARAM 3	/* failed, bad parameter to call */

#define DES_FAILED(err) \
	((err) > DESERR_NOHWDEVICE)

/*
 * cbc_crypt()
 * ecb_crypt()
 *
 * Encrypt (or decrypt) len bytes of a buffer buf.
 * The length must be a multiple of eight.
 * The key should have odd parity in the low bit of each byte.
 * ivec is the input vector, and is updated to the new one (cbc only).
 * The mode is created by oring together the appropriate parameters.
 * DESERR_NOHWDEVICE is returned if DES_HW was specified but
 * there was no hardware to do it on (the data will still be
 * encrypted though, in software).
 */

/*
 * Cipher Block Chaining mode
 */
extern int cbc_crypt (char *__key, char *__buf, unsigned __len,
		      unsigned __mode, char *__ivec) __THROW;

/*
 * Electronic Code Book mode
 */
extern int ecb_crypt (char *__key, char *__buf, unsigned __len,
		      unsigned __mode) __THROW;

/*
 * Set des parity for a key.
 * DES parity is odd and in the low bit of each byte
 */
extern void des_setparity (char *__key) __THROW;

__END_DECLS

#endif


text:
import { TestBed, inject } from '@angular/core/testing';

import { Service39Service } from './service-39.service';

describe('Service39Service', () => {
  beforeEach(() => {
    TestBed.configureTestingModule({
      providers: [Service39Service]
    });
  });

  it('should ...', inject([Service39Service], (service: Service39Service) => {
    expect(service).toBeTruthy();
  }));
});


text:
<?php

namespace IPS;

/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
	header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
	exit;
}

/**
 * HTTP Request Class
 */
class _Request extends \IPS\Patterns\Singleton
{
	/**
	 * @brief	Singleton Instance
	 */
	protected static $instance = NULL;

	/**
	 * @brief	Cookie data
	 */
	public $cookie = array();

	/**
	 * Constructor
	 *
	 * @return	void
	 * @note	We do not unset $_COOKIE as it is needed by session handling
	 */
	public function __construct()
	{
		if ( isset( $_SERVER['REQUEST_METHOD'] ) AND $_SERVER['REQUEST_METHOD'] == 'PUT' )
		{
			parse_str( file_get_contents('php://input'), $params );
			$this->parseIncomingRecursively( $params );
		}
		else
		{
			$this->parseIncomingRecursively( $_GET );
			$this->parseIncomingRecursively( $_POST );
		}

		array_walk_recursive( $_COOKIE, array( $this, 'clean' ) );

		/* If we have a cookie prefix, we have to strip it first */
		if( \IPS\COOKIE_PREFIX !== NULL )
		{
			foreach( $_COOKIE as $key => $value )
			{
				if( \IPS\COOKIE_PREFIX !== null )
				{
					if( mb_strpos( $key, \IPS\COOKIE_PREFIX ) === 0 )
					{
						$this->cookie[ preg_replace( "/^" . \IPS\COOKIE_PREFIX . "(.+?)/", "$1", $key ) ]	= $value;
					}
				}
				else
				{
					$this->cookie[ $key ]	= $value;
				}
			}
		}
		else
		{
			$this->cookie = $_COOKIE;
		}
	}

	/**
	 * Parse Incoming Data
	 *
	 * @param	array	$data	Data
	 * @return	void
	 */
	protected function parseIncomingRecursively( $data )
	{
		foreach( $data as $k => $v )
		{
			if ( is_array( $v ) )
			{
				array_walk_recursive( $v, array( $this, 'clean' ) );
			}
			else
			{
				$this->clean( $v, $k );
			}

			/* We used to call $this->$k = $v but that resulted in breaking our cookie array if a &cookie=1 parameter was passed in the URL */
			$this->data[ $k ] = $v;
		}
	}

	/**
	 * Clean Value
	 *
	 * @param	mixed	$v	Value
	 * @param	mixed	$k	Key
	 * @return	mixed
	 */
	protected function clean( &$v, $k )
	{
		/* Remove NULL bytes and the RTL control byte */
		$v = str_replace( array( "\0", "\u202E" ), '', $v );

		/* Undo magic quote madness */
		if ( get_magic_quotes_gpc() === 1 )
		{
			$v = stripslashes( $v );
		}
	}

	/**
	 * Get value from array
	 *
	 * @param	string	Key with square brackets (e.g. "foo[bar]")
	 * @return	mixed	Value
	 */
	public function valueFromArray( $key )
	{
		$array = $this->data;

		while ( $pos = mb_strpos( $key, '[' ) )
		{
			preg_match( '/^(.+?)\[([^\]]+?)?\](.*)?$/', $key, $matches );

			if ( !array_key_exists( $matches[1], $array ) )
			{
				return NULL;
			}

			$array = $array[ $matches[1] ];
			$key = $matches[2] . $matches[3];
		}

		if ( !isset( $array[ $key ] ) )
		{
			return NULL;
		}

		return $array[ $key ];
	}

	/**
	 * Is this an AJAX request?
	 *
	 * @return	bool
	 */
	public function isAjax()
	{
		return ( isset( $_SERVER['HTTP_X_REQUESTED_WITH'] ) and $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest' );
	}

	/**
	 * Is this an SSL/Secure request?
	 *
	 * @return	bool
	 * @see		Load balancer SSL
	 * @note	A common technique to check for SSL is to look for $_SERVER['SERVER_PORT'] == 443, however this is not a correct check. Nothing requires SSL to be on port 443, or http to be on port 80.
	 * @see		Zeus load balancers set HTTP_SSLSESSIONID
	 */
	public function isSecure()
	{
		if( !empty( $_SERVER['HTTPS'] ) AND mb_strtolower( $_SERVER['HTTPS'] ) == 'on' )
		{
			return TRUE;
		}
		else if( !empty( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) AND mb_strtolower( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) == 'https' )
		{
			return TRUE;
		}
		else if( !empty( $_SERVER['HTTP_CLOUDFRONT_FORWARDED_PROTO'] ) AND mb_strtolower( $_SERVER['HTTP_CLOUDFRONT_FORWARDED_PROTO'] ) == 'https' )
		{
			return TRUE;
		}
		else if ( !empty( $_SERVER['HTTP_X_FORWARDED_HTTPS'] ) AND mb_strtolower( $_SERVER['HTTP_X_FORWARDED_HTTPS'] ) == 'https' )
		{
			return TRUE;
		}
		else if( !empty( $_SERVER['HTTP_FRONT_END_HTTPS'] ) AND mb_strtolower( $_SERVER['HTTP_FRONT_END_HTTPS'] ) == 'on' )
		{
			return TRUE;
		}
		else if( !empty( $_SERVER['HTTP_SSLSESSIONID'] ) )
		{
			return TRUE;
		}

		return FALSE;
	}

	/**
	 * @brief	Cached URL
	 */
	protected $_url	= NULL;

	/**
	 * Get current URL
	 *
	 * @return	\IPS\Http\Url
	 * @see		init.php
	 */
	public function url()
	{
		if( $this->_url === NULL )
		{
			$url = $this->isSecure() ? 'https' : 'http';
			$url .= '://';
			$url .= ( !empty( $_SERVER['HTTP_HOST'] ) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'] );

			if ( $_SERVER['QUERY_STRING'] AND mb_strpos( $_SERVER['REQUEST_URI'], $_SERVER['QUERY_STRING'] ) !== FALSE )
			{
				$url .= mb_substr( $_SERVER['REQUEST_URI'], 0, -mb_strlen( $_SERVER['QUERY_STRING'] ) );
			}
			else
			{
				$url .= $_SERVER['REQUEST_URI'];
			}
			$url .= $_SERVER['QUERY_STRING'];

			return $this->_url = \IPS\Http\Url::createFromString( $url, TRUE, TRUE );
		}

		return $this->_url;
	}

	/**
	 * Get IP Address
	 *
	 * @return	string
	 */
	public function ipAddress()
	{
		$addrs = array();

		if ( \IPS\Settings::i()->xforward_matching )
		{
			if( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) )
			{
				foreach( explode( ',', $_SERVER['HTTP_X_FORWARDED_FOR'] ) as $x_f )
				{
					$addrs[] = trim( $x_f );
				}
			}

			if( isset( $_SERVER['HTTP_CLIENT_IP'] ) )
			{
				$addrs[] = $_SERVER['HTTP_CLIENT_IP'];
			}

			if( isset( $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'] ) )
			{
				$addrs[] = $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];
			}

			if( isset( $_SERVER['HTTP_PROXY_USER'] ) )
			{
				$addrs[] = $_SERVER['HTTP_PROXY_USER'];
			}
		}

		if ( isset( $_SERVER['REMOTE_ADDR'] ) )
		{
			$addrs[] = $_SERVER['REMOTE_ADDR'];
		}

		foreach ( $addrs as $ip )
		{
			if ( filter_var( $ip, FILTER_VALIDATE_IP ) )
			{
				return $ip;
			}
		}

		return '';
	}

	/**
	 * IP address is banned?
	 *
	 * @return	bool
	 */
	public function ipAddressIsBanned()
	{
		if ( isset( \IPS\Data\Store::i()->bannedIpAddresses ) )
		{
			$bannedIpAddresses = \IPS\Data\Store::i()->bannedIpAddresses;
		}
		else
		{
			$bannedIpAddresses = iterator_to_array( \IPS\Db::i()->select( 'ban_content', 'core_banfilters', array( "ban_type=?", 'ip' ) ) );
			\IPS\Data\Store::i()->bannedIpAddresses = $bannedIpAddresses;
		}
		foreach ( $bannedIpAddresses as $ip )
		{
			if ( preg_match( '/^' . str_replace( '\*', '.*', preg_quote( trim( $ip ), '/' ) ) . '$/', $this->ipAddress() ) )
			{
				return TRUE;
			}
		}

		return FALSE;
	}

	/**
	 * Set a cookie
	 *
	 * @param	string				$name		Name
	 * @param	mixed				$value		Value
	 * @param	\IPS\DateTime|null	$expire		Expiration date, or NULL for on session end
	 * @param	bool				$httpOnly	When TRUE the cookie will be made accessible only through the HTTP protocol
	 * @param	string|null			$domain		Domain to set to. If NULL, will be detected automatically.
	 * @param	string|null			$path		Path to set to. If NULL, will be detected automatically.
	 * @return	bool
	 */
	public function setCookie( $name, $value, $expire=NULL, $httpOnly=TRUE, $domain=NULL, $path=NULL )
	{
		/* Work out the path and if cookies should be SSL only */
		$sslOnly	= FALSE;

		if( \IPS\COOKIE_PATH !== NULL AND $path === NULL )
		{
			$path	= \IPS\COOKIE_PATH;
		}

		if ( $path === NULL )
		{
			$path = mb_substr( \IPS\Settings::i()->base_url, mb_strpos( \IPS\Settings::i()->base_url, ( !empty( $_SERVER['SERVER_NAME'] ) ) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'] ) + mb_strlen( ( !empty( $_SERVER['SERVER_NAME'] ) ) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'] ) );
			$path = mb_substr( $path, mb_strpos( $path, '/' ) );
		}

		if( mb_substr( \IPS\Settings::i()->base_url, 0, 5 ) == 'https' AND \IPS\COOKIE_BYPASS_SSLONLY !== TRUE )
		{
			$sslOnly	= TRUE;
		}

		/* Are we forcing a cookie domain? */
		if( \IPS\COOKIE_DOMAIN !== NULL AND $domain === NULL )
		{
			$domain	= \IPS\COOKIE_DOMAIN;
		}

		$realName = $name;

		/* What about a prefix? */
		if( \IPS\COOKIE_PREFIX !== NULL )
		{
			$name	= \IPS\COOKIE_PREFIX . $name;
		}

		/* Set the cookie */
		if ( setcookie( $name, $value, $expire ? $expire->getTimestamp() : 0, $path, $domain ?: '', $sslOnly, $httpOnly ) === TRUE )
		{
			$this->cookie[ $realName ] = $value;

			return TRUE;
		}
		return FALSE;
	}

	/**
	 * Returns the request method
	 *
	 * @return boolean
	 */
	public function requestMethod()
	{
		return mb_strtoupper( $_SERVER['REQUEST_METHOD'] );
	}

	/**
	 * Flood Check
	 *
	 * @return	void
	 */
	public static function floodCheck()
	{
		/* Flood control */
		if( \IPS\Member::loggedIn()->group['g_search_flood'] )
		{
			if( isset( $_SESSION['lastSearch'] ) and ( time() - $_SESSION['lastSearch'] ) < \IPS\Member::loggedIn()->group['g_search_flood'] )
			{
				$secondsToWait = \IPS\Member::loggedIn()->group['g_search_flood'] - ( time() - $_SESSION['lastSearch'] );
				\IPS\Output::i()->error( \IPS\Member::loggedIn()->language()->addToStack( 'search_flood_error', FALSE, array( 'pluralize' => array( $secondsToWait ) ) ), '1C205/3', 429, \IPS\Member::loggedIn()->language()->addToStack( 'search_flood_error_admin', FALSE, array( 'pluralize' => array( $secondsToWait ) ) ), array( 'Retry-After' => \IPS\DateTime::create()->add( new \DateInterval( 'PT' . $secondsToWait . 'S' ) )->format('r') ) );
			}

			$_SESSION['lastSearch'] = time();
		}
	}

	/**
	 * Confirmation check
	 *
	 * @param	string		$title		Lang string key for title
	 * @param	string		$message	Lang string key for confirm message
	 * @param	string		$submit		Lang string key for submit button
	 * @return	void
	 */
	public function confirmedDelete( $title = 'delete_confirm', $message = 'delete_confirm_detail', $submit = 'delete' )
	{
		/* The confirmation dialogs will send form_submitted=1, as will displaying a form, so we check for this.
			If the admin (or user) simply visited a delete URL directly, this would not be included in the request. */
		if ( ! isset( \IPS\Request::i()->wasConfirmed ) )
		{
			$form = new \IPS\Helpers\Form( 'form', $submit );
			$form->hiddenValues['wasConfirmed']	= 1;
			$form->addMessage( $message, 'ipsMessage ipsMessage_warning' );

			/* We call sendOutput() to show the form now */
			\IPS\Output::i()->output = $form;
			\IPS\Output::i()->title	 = \IPS\Member::loggedIn()->language()->addToStack( $title );

			if ( \IPS\Request::i()->isAjax() )
			{
				\IPS\Output::i()->sendOutput( \IPS\Theme::i()->getTemplate( 'global', 'core', 'front' )->genericBlock( $form, \IPS\Output::i()->title ), 200, 'text/html', \IPS\Output::i()->httpHeaders );
			}
			else
			{
				\IPS\Output::i()->sendOutput( \IPS\Theme::i()->getTemplate( 'global', 'core' )->globalTemplate( \IPS\Output::i()->title, \IPS\Output::i()->output, array( 'app' => \IPS\Dispatcher::i()->application->directory, 'module' => \IPS\Dispatcher::i()->module->key, 'controller' => \IPS\Dispatcher::i()->controller ) ), 200, 'text/html', \IPS\Output::i()->httpHeaders );
			}
		}

		/* If we are here, we're all good! */
		return TRUE;
	}

	/**
	 * Old IPB escape-on-input routine
	 *
	 * @param	string	$val	The unescaped text
	 * @return	string			The IPB3-style escaped text
	 */
	public static function legacyEscape( $val )
	{
    	$val = str_replace( "&"			, "&"         , $val );
    	$val = str_replace( ""		, "-->"       , $val );
    	$val = str_ireplace( "


text:
        <mat-icon>keyboard_arrow_up</mat-icon>
        Groups

            <mat-icon>{{group.visible ? 'check_box' : 'check_box_outline_blank'}}</mat-icon>
            {{group.name}}

      <mat-icon>{{showVersions ? 'call_split' : 'call_merge'}}</mat-icon>
      Show different used versions

      <mat-icon>{{'device_hub' }}</mat-icon>
      Combine inheritance into one node


text:
$usage = qq{

    fieldSwapTsv.pl <tsvMulticol> <fieldToSwap> <tsv2col> <fieldOld> <fieldNew>

	<tsvMulticol> TSV file with one field you want to swap
        <fieldToSwap> The field you want to swap (0,1,2,...)
        <tsv2col> TSV file with two columns, usually matching,new
        <fieldOld> The field that matches up to existing file (0 or 1)
        <fieldNew> The field that contains the new string to use (0 or 1)

        General script for replacing names, etc. in one field with a corresponding
        set of new names.

};

die "$usage" unless @ARGV == 5;

$file1 = $ARGV[0];
$fieldSwap = $ARGV[1];
$file2 = $ARGV[2];
$fieldOld = $ARGV[3];
$fieldNew = $ARGV[4];

open (FILE, $file1) or die "Cannot open $file1!";
@data1 = <FILE>;
close FILE;

open (FILE, $file2) or die "Cannot open $file2!";
@data2 = <FILE>;
close FILE;

foreach $line (@data2) {
    chomp $line;
    @fields = split(/\t/, $line);
    $old = $fields[$fieldOld];
    $new = $fields[$fieldNew];
    $hashMatch{$old} = $new;
}

foreach $line (@data1) {
    chomp $line;
    @fields = split(/\t/, $line);
    if ($hashMatch{$fields[$fieldSwap]}) {
	$fields[$fieldSwap] = $hashMatch{$fields[$fieldSwap]};
    } else {
	$fields[$fieldSwap] = "nomatch";
    }
    $newline = join("\t", @fields);
    print "$newline\n";
}

exit;


text:
import java.util.Random;
import jcuda.*;
import jcuda.runtime.*;
import jcuda.driver.*;
import static jcuda.driver.JCudaDriver.*;

public class GPMatrix {

  public static int verbose = 0; // level 0,1,2
  public static int size;

  public static void main(String[] args) {

    // Params handling
    if(args.length < 1) {
      System.err.println("Needs size argument");
      System.exit(0);
    }
    size = Integer.valueOf(args[0]);

    // Matrix declaration
    double[] A = new double[size * size];
    double[] B = new double[size * size];
    double[] C = new double[size * size];

    matrixInit(A,B);

    // Enable exception
    JCudaDriver.setExceptionsEnabled(true);

    // Initialize the driver and create a context for the first device
    cuInit(0);
    CUdevice device = new CUdevice();
    cuDeviceGet(device, 0);
    CUcontext context = new CUcontext();
    cuCtxCreate(context, 0, device);

    // Load the CUDA kernel ptx file
    CUmodule module = new CUmodule();
    cuModuleLoad(module, "../JCudaMatrix.ptx");

    // Obtain a function pointer to the kernel function
    CUfunction function = new CUfunction();
    cuModuleGetFunction(function, module, "mul");

    // Allocate the device input data, and copy the host input data
    // to the device
    int ptrSize = size * size * Sizeof.DOUBLE;
    CUdeviceptr deviceInputA = new CUdeviceptr();
    cuMemAlloc(deviceInputA, ptrSize);
    cuMemcpyHtoD(deviceInputA, Pointer.to(A), ptrSize);

    CUdeviceptr deviceInputB = new CUdeviceptr();
    cuMemAlloc(deviceInputB, ptrSize);
    cuMemcpyHtoD(deviceInputB, Pointer.to(B), ptrSize);

    CUdeviceptr deviceOutput = new CUdeviceptr();
    cuMemAlloc(deviceOutput, ptrSize);

    // Set up the kernel parameters: A pointer to an array
    // of pointers which points to the actual values
    Pointer kernelParameters = Pointer.to(
      Pointer.to(deviceInputA),
      Pointer.to(deviceInputB),
      Pointer.to(deviceOutput),
      Pointer.to(new int[]{size})
    );

    // Kernel call parameters
    int blockSizeX = 256;
    int gridSizeX = (int)Math.ceil((double)size / blockSizeX);

    // --------------------------------
    long startTime = System.currentTimeMillis();
    // --- Start of benchmark zone --->
    cuLaunchKernel(function,
      gridSizeX, 1, 1,       // Grid dimension
      blockSizeX, 1, 1,     // Block dimension
      0, null,              // Shared memory size and stream
      kernelParameters, null // Kernel and extra parameters
    );
    cuCtxSynchronize();
    // <--- End of benchmark zone -----
    long stopTime = System.currentTimeMillis();
    // --------------------------------

    // Benchmark time elapsed computation
    long elapsedTime = stopTime - startTime;

    // Allocate the output memory and copy output from device to host
    // cuMemcpyDtoH(Pointer.to(C), deviceOutput, ptrSize);
    //
    // printMatrix(C, size);

    // Output
    if(verbose > 0) System.out.println("Time elapsed: " + elapsedTime/1000 + "s");
    System.out.println(elapsedTime/1000);

  }

  // Matrix random initialization of A and B
  public static void matrixInit(double[] A, double[] B) {
    Random r = new Random(1);
    for(int row=0; row < size; row++) {
      for(int col=0; col < size; col++) {
        A[ (row*size)+col ] = r.nextDouble();
        B[ (row*size)+col ] = r.nextDouble();
      }
    }
  }

  // Computes matrix multiplication C = AB
  public static void matrixMul(double[][] A, double[][] B, double[][] C) {
    for(int i=0; i < size; i++) {
      for(int j=0; j < size; j++) {
        double sum = 0.0;
        for(int k=0; k < size; k++) {
          sum += A[i][k] * B[k][j];
        }
        C[i][j] = sum;
        if(verbose > 1) System.out.print("\t" + C[i][j]);
      }
      if(verbose > 1) System.out.print("\n");
    }
  }

  // Displays the content of matrix A
  public static void printMatrix(double[] A, int size) {
    for(int row=0; row < size; row++) {
      for(int col=0; col < size; col++) {
        System.out.print("\t" + A[ (row*size)+col]);
      }
      System.out.print("\n");
    }
  }

}


text:
package com.pacific.domain.dto.jvm;

import com.alibaba.fastjson.annotation.JSONField;

import java.util.Date;

/**
 * Created by Fe on 16/7/20.
 */
public class WebUrlInfo {
    @JSONField(name = "URL")
    private String url;

    @JSONField(name = "RunningCount")
    private int    runningCount;
    // 最大并发

    @JSONField(name = "ConcurrentMax")
    private int    concurrentMax;

    // 总数
    @JSONField(name = "Count")
    private long   count;

    @JSONField(name = "ErrorCount")
    private long   errorCount;

    // 总耗时
    @JSONField(name = "NanoTotal")
    private long   nanoTotal;

    // 最大耗时
    @JSONField(name = "NanoMax")
    private long   nanoMax;

    @JSONField(name = "LastErrorMessage")
    private String lastErrorMsg;

    @JSONField(name = "LastErrorTime")
    private Date lastErrorTime;

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public int getRunningCount() {
        return runningCount;
    }

    public void setRunningCount(int runningCount) {
        this.runningCount = runningCount;
    }

    public int getConcurrentMax() {
        return concurrentMax;
    }

    public void setConcurrentMax(int concurrentMax) {
        this.concurrentMax = concurrentMax;
    }

    public long getCount() {
        return count;
    }

    public void setCount(long count) {
        this.count = count;
    }

    public long getErrorCount() {
        return errorCount;
    }

    public void setErrorCount(long errorCount) {
        this.errorCount = errorCount;
    }

    public long getNanoTotal() {
        return nanoTotal;
    }

    public void setNanoTotal(long nanoTotal) {
        this.nanoTotal = nanoTotal;
    }

    public long getNanoMax() {
        return nanoMax;
    }

    public void setNanoMax(long nanoMax) {
        this.nanoMax = nanoMax;
    }

    public String getLastErrorMsg() {
        return lastErrorMsg;
    }

    public void setLastErrorMsg(String lastErrorMsg) {
        this.lastErrorMsg = lastErrorMsg;
    }

    public Date getLastErrorTime() {
        return lastErrorTime;
    }

    public void setLastErrorTime(Date lastErrorTime) {
        this.lastErrorTime = lastErrorTime;
    }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Lichen squamatus Dicks.

### Remarks
null


text:
package io.datarouter.storage.node.tableconfig;

public class NodewatchConfigurationBuilder{

	public static final int DEFAULT_SAMPLE_SIZE = 1_000_000;
	public static final int DEFAULT_BATCH_SIZE = 1_000;

	private boolean enabled;
	private int sampleSize;
	private int batchSize;
	private boolean enabledPercentageAlert;
	private boolean enabledThresholdAlert;
	private Long threshold;

	public NodewatchConfigurationBuilder(){
		this.enabled = true;
		this.sampleSize = DEFAULT_SAMPLE_SIZE;
		this.batchSize = DEFAULT_BATCH_SIZE;
		this.enabledPercentageAlert = true;
		this.enabledThresholdAlert = true;
	}

	public NodewatchConfigurationBuilder withSampleSize(int sampleSize){
		this.sampleSize = sampleSize;
		return this;
	}

	public NodewatchConfigurationBuilder withBatchSize(int batchSize){
		this.batchSize = batchSize;
		return this;
	}

	public NodewatchConfigurationBuilder withThreshold(Long threshold){
		this.threshold = threshold;
		return this;
	}

	public NodewatchConfigurationBuilder disable(){
		this.enabled = false;
		return this;
	}

	public NodewatchConfigurationBuilder disablePercentChangeAlert(){
		this.enabledPercentageAlert = false;
		return this;
	}

	public NodewatchConfigurationBuilder disableMaxThresholdAlert(){
		this.enabledThresholdAlert = false;
		return this;
	}

	public NodewatchConfiguration create(ClientTableEntityPrefixNameWrapper wrapper){
		return new NodewatchConfiguration(
				wrapper,
				threshold,
				sampleSize,
				batchSize,
				enabled,
				enabledPercentageAlert,
				enabledThresholdAlert);
	}

}


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

#nullable disable

namespace Microsoft.CodeAnalysis.Host.Mef
{
    /// <summary>
    /// A factory that creates instances of a specific <see cref="ILanguageService"/>.
    ///
    /// Implement a <see cref="ILanguageServiceFactory"/> when you want to provide <see cref="ILanguageService"/> instances that use other services.
    /// </summary>
    public interface ILanguageServiceFactory
    {
        /// <summary>
        /// Creates a new <see cref="ILanguageService"/> instance.
        /// </summary>
        /// <param name="languageServices">The <see cref="HostLanguageServices"/> that can be used to access other services.</param>
        ILanguageService CreateLanguageService(HostLanguageServices languageServices);
    }
}


text:
class Roman_int {
public:
    Roman_int();
    Roman_int(int n);
    int as_int() const;
    void set_val(int v);
private:
    int val;
};

ostream& operator<<(ostream& os, const Roman_int& r);
istream& operator>>(istream& is, Roman_int& r);
Roman_int operator+(const Roman_int& r1, const Roman_int& r2);
Roman_int operator-(const Roman_int& r1, const Roman_int& r2);
Roman_int operator-(const Roman_int& r);
Roman_int operator*(const Roman_int& r1, const Roman_int& r2);
Roman_int operator/(const Roman_int& r1, const Roman_int& r2);
Roman_int operator%(const Roman_int& r1, const Roman_int& r2);
bool operator==(const Roman_int& r1, const Roman_int& r2);
bool operator!=(const Roman_int& r1, const Roman_int& r2);
bool operator<(const Roman_int& r1, const Roman_int& r2);
bool operator>(const Roman_int& r1, const Roman_int& r2);
bool operator<=(const Roman_int& r1, const Roman_int& r2);
bool operator>=(const Roman_int& r1, const Roman_int& r2);

const char N = 'N';
const char I = 'I';
const char V = 'V';
const char X = 'X';
const char L = 'L';
const char C = 'C';
const char D = 'D';
const char M = 'M';

// determines if a character can be part of a roman numeral
bool is_valid_char(char ch);

// return value of single letter Roman numeral
int get_value(char ch);

// test if letter has been repeated too often
bool counter_illegal(int counter, char ch);

// test if string is valid roman numeral, calculate its value
int roman_int_to_int(const string& s);

// return value of single letter Roman numeral
int get_value(char ch);

// test if letter has been repeated too often
bool counter_illegal(int counter, char ch);

// test if string is valid roman numeral, calculate its value
int roman_int_to_int(const string& s);


text:
<?php
use fay\models\Setting;
use fay\helpers\Html;
use fay\models\Option;
?>
<!DOCTYPE html>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link type="text/css" rel="stylesheet" href="<?php echo $this->url()?>css/font-awesome.min.css" />
<link type="text/css" rel="stylesheet" href="<?php echo $this->url()?>css/admin/style-responsive.css" />

<title><?php echo $subtitle?> | <?php echo Option::get('sitename')?>后台</title>

	<?php $this->renderPartial('layouts/_sidebar_menu', array(
		'current_directory'=>$current_directory,
	))?>

<?php
				echo isset($subtitle) ? $subtitle : '无标题';
				if(isset($sublink)){
					$html_options = isset($sublink['html_options']) ? $sublink['html_options'] : array();
					$html_options['prepend'] = '';
					if(isset($html_options['class'])){
						$html_options['class'] .= ' sub-link';
					}else{
						$html_options['class'] = ' sub-link';
					}

					echo Html::link($sublink['text'], $sublink['uri'], $html_options);
				}?>

				<?php if(isset($_setting_panel)){
					echo Html::link('', '#ffsetting-content', array(
						'class'=>'fa fa-cog ffsetting-link',
					));
				}?>

		<?php if(isset($_setting_panel)){?>

<?php $this->renderPartial($_setting_panel);?>

		<?php }?>

			<?php echo F::app()->flash->get();?>

<?php echo $content?>

<img src="<?php echo $this->url()?>images/throbber.gif" class="hide" />
<img src="<?php echo $this->url()?>images/ajax-loading.gif" class="hide" />


text:
from typing import Any, Dict, Sequence

import _pytest
import pytest

from .coverage import Coverage

_coverage = Coverage()
_marks: Dict[str, Sequence[Any]] = {}

def _add_mark(mark: Any, bucket: str) -> None:
    proto = mark.args[0]
    if isinstance(proto, list):
        assert len(proto) == 1
        proto = proto[0]
    if proto is not None:
        _coverage.add_proto(proto, bucket, mark.args[1] == "RealModel")

def pytest_runtest_call(item: _pytest.nodes.Item) -> None:
    mark = item.get_closest_marker("onnx_coverage")
    if mark:
        assert item.nodeid not in _marks
        _marks[item.nodeid] = mark

def pytest_runtest_logreport(report: Any) -> None:
    if report.when == "call" and report.outcome == "passed" and report.nodeid in _marks:
        mark = _marks[report.nodeid]
        _add_mark(mark, "passed")

@pytest.hookimpl(trylast=True)  # type: ignore
def pytest_terminal_summary(
    terminalreporter: _pytest.terminal.TerminalReporter, exitstatus: int
) -> None:
    for mark in _marks.values():
        _add_mark(mark, "loaded")
    _coverage.report_text(terminalreporter)


text:
layout: default
title: "Animal Welfare"

---

{% include interests/animal-welfare.md %}

### Who is interested in Animal Welfare?

* [Ann Clwyd]({{ site.baseurl }}/members/ann-clwyd.html)
* [Tracey Crouch]({{ site.baseurl }}/members/tracey-crouch.html)
* [Nic Dakin]({{ site.baseurl }}/members/nic-dakin.html)
* [Jim Dowd]({{ site.baseurl }}/members/jim-dowd.html)
* [Jim Fitzpatrick]({{ site.baseurl }}/members/jim-fitzpatrick.html)
* [Paul Flynn]({{ site.baseurl }}/members/paul-flynn.html)
* [Sir Roger Gale]({{ site.baseurl }}/members/sir-roger-gale.html)
* [Mr Mike Hancock]({{ site.baseurl }}/members/mr-mike-hancock.html)
* [Diana Johnson]({{ site.baseurl }}/members/diana-johnson.html)
* [Tim Loughton]({{ site.baseurl }}/members/tim-loughton.html)
* [Caroline Lucas]({{ site.baseurl }}/members/caroline-lucas.html)
* [Neil Parish]({{ site.baseurl }}/members/neil-parish.html)
* [Mark Pritchard]({{ site.baseurl }}/members/mark-pritchard.html)
* [Andrew Rosindell]({{ site.baseurl }}/members/andrew-rosindell.html)
* [Sir Bob Russell]({{ site.baseurl }}/members/sir-bob-russell.html)
* [Mark Tami]({{ site.baseurl }}/members/mark-tami.html)
* [Mrs Theresa Villiers]({{ site.baseurl }}/members/mrs-theresa-villiers.html)
* [Chris Williamson]({{ site.baseurl }}/members/chris-williamson.html)