text:
#ifndef CDBCOPY_H
#define CDBCOPY_H

#include "access/aosegfiles.h" /* for InvalidFileSegNumber const */
#include "lib/stringinfo.h"
#include "cdb/cdbgang.h"
#include "cdb/cdbquerycontextdispatching.h"
#include "cdb/dispatcher.h"

struct DispatchExecutors;

#define COPYOUT_CHUNK_SIZE 16 * 1024

typedef enum SegDbState
{
	/*
	 * (it is best to avoid names like OUT that are likely to be #define'd or
	 * typedef'd in some platform-dependent runtime library header file)
	 */
	SEGDB_OUT,					/* Not participating in COPY (invalid etc...) */
	SEGDB_IDLE,					/* Participating but COPY not yet started */
	SEGDB_COPY,					/* COPY in progress */
	SEGDB_DONE					/* COPY completed (with or without errors) */
}	SegDbState;

typedef struct CdbCopy
{
	int			partition_num;		/* total number of partition for copy. */
	QueryResource		*resource;
	DispatchDataResult	executors;
	bool		copy_in;		/* direction: true for COPY FROM false for COPY TO */
	bool		remote_data_err;/* data error occurred on a remote COPY session */
	bool		io_errors;		/* true if any I/O error occurred trying to
								 * communicate with segDB's */
	SegDbState		**segdb_state;

	StringInfoData	err_msg;		/* error message for cdbcopy operations */
	StringInfoData  err_context; /* error context from QE error */
	StringInfoData	copy_out_buf;/* holds a chunk of data from the database */

	List			*outseglist;    /* segs that currently take part in copy out.
									 * Once a segment gave away all it's data rows
									 * it is taken out of the list */
	PartitionNode *partitions;
	List		  *ao_segnos;
	HTAB		  *aotupcounts; /* hash of ao relation id to processed tuple count */
} CdbCopy;

/* global function declarations */
CdbCopy    *makeCdbCopy(bool copy_in, QueryResource *resource);
int			cdbCopyGetDbCount(int total_segs, int seg);
void		cdbCopyStart(CdbCopy *cdbCopy, char *copyCmd, Oid relid, Oid relerror, List *err_aosegnos);
void		cdbCopySendData(CdbCopy *c, int target_seg, const char *buffer, int nbytes);
void		cdbCopySendDataSingle(CdbCopy *c, int target_seg, const char *buffer, int nbytes);
bool		cdbCopyGetData(CdbCopy *c, bool cancel, uint64 *rows_processed);
int			cdbCopyEnd(CdbCopy *c);

#endif   /* CDBCOPY_H */


text:
using System;
using System.Net;
using Microsoft.SharePoint.Client;

namespace OfficeDevPnP.Core.Utilities
{
    public static class Utility
    {
        /// <summary>
        /// Check if the property is loaded on the site object, if not the site object will be reloaded
        /// </summary>
        /// <param name="cc">Context to execute upon</param>
        /// <param name="site">Site to execute upon</param>
        /// <param name="propertyToCheck">Property to check</param>
        /// <returns>A reloaded site object</returns>
        public static Site EnsureSite(ClientRuntimeContext cc, Site site, string propertyToCheck)
        {
            if (!site.IsObjectPropertyInstantiated(propertyToCheck))
            {
                // get instances to root web, since we are processing currently sub site
                cc.Load(site);
                cc.ExecuteQueryRetry();
            }
            return site;
        }

        /// <summary>
        /// Check if the property is loaded on the web object, if not the web object will be reloaded
        /// </summary>
        /// <param name="cc">Context to execute upon</param>
        /// <param name="web">Web to execute upon</param>
        /// <param name="propertyToCheck">Property to check</param>
        /// <returns>A reloaded web object</returns>
        public static Web EnsureWeb(ClientRuntimeContext cc, Web web, string propertyToCheck)
        {
            if (!web.IsObjectPropertyInstantiated(propertyToCheck))
            {
                // get instances to root web, since we are processing currently sub site
                cc.Load(web);
                cc.ExecuteQueryRetry();
            }
            return web;
        }

        /// <summary>
        /// Returns the healthscore for a SharePoint Server
        /// </summary>
        /// <param name="url"></param>
        /// <returns></returns>
        public static int GetHealthScore(string url)
        {
            int value = 0;
            Uri baseUri = new Uri(url);
            Uri checkUri = new Uri(baseUri, "_layouts/15/blank.htm");
            WebRequest webRequest = HttpWebRequest.Create(checkUri);
            webRequest.Method = "HEAD";
            webRequest.UseDefaultCredentials = true;
            using (WebResponse webResponse = webRequest.GetResponse())
            {
                foreach (string header in webResponse.Headers)
                {
                    if (header == "X-SharePointHealthScore")
                    {
                        value = Int32.Parse(webResponse.Headers[header]);
                        break;
                    }
                }
            }
            return value;
        }

        //public static string URLCombine(string baseUrl, string relativeUrl)
        //{
        //    if (baseUrl.Length == 0)
        //        return relativeUrl;
        //    if (relativeUrl.Length == 0)
        //        return baseUrl;
        //    return string.Format("{0}/{1}", baseUrl.TrimEnd(new char[] { '/', '\\' }), relativeUrl.TrimStart(new char[] { '/', '\\' }));
        //}

    }
}

redpajama_set_name: RedPajamaGithub


text:
require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper.rb')

describe Ohai::System, "Linux virtualization platform" do
  before(:each) do
    @plugin = get_plugin("linux/virtualization")
    allow(@plugin).to receive(:collect_os).and_return(:linux)

    # default to all requested Files not existing
    allow(File).to receive(:exists?).with("/proc/xen").and_return(false)
    allow(File).to receive(:exists?).with("/proc/xen/capabilities").and_return(false)
    allow(File).to receive(:exists?).with("/proc/modules").and_return(false)
    allow(File).to receive(:exists?).with("/proc/cpuinfo").and_return(false)
    allow(File).to receive(:exists?).with("/usr/sbin/dmidecode").and_return(false)
    allow(File).to receive(:exists?).with("/proc/self/status").and_return(false)
    allow(File).to receive(:exists?).with("/proc/bc/0").and_return(false)
    allow(File).to receive(:exists?).with("/proc/vz").and_return(false)
    allow(File).to receive(:exists?).with("/proc/self/cgroup").and_return(false)
    allow(File).to receive(:exists?).with("/.dockerenv").and_return(false)
    allow(File).to receive(:exists?).with("/.dockerinit").and_return(false)
  end

  describe "when we are checking for xen" do
    it "should set xen guest if /proc/xen exists but /proc/xen/capabilities does not" do
      expect(File).to receive(:exists?).with("/proc/xen").and_return(true)
      expect(File).to receive(:exists?).with("/proc/xen/capabilities").and_return(false)
      @plugin.run
      expect(@plugin[:virtualization][:system]).to eq("xen")
      expect(@plugin[:virtualization][:role]).to eq("guest")
      expect(@plugin[:virtualization][:systems][:xen]).to eq("guest")
    end

    it "should set xen host if /proc/xen/capabilities contains control_d " do
      expect(File).to receive(:exists?).with("/proc/xen").and_return(true)
      expect(File).to receive(:exists?).with("/proc/xen/capabilities").and_return(true)
      allow(File).to receive(:read).with("/proc/xen/capabilities").and_return("control_d")
      @plugin.run
      expect(@plugin[:virtualization][:system]).to eq("xen")
      expect(@plugin[:virtualization][:role]).to eq("host")
      expect(@plugin[:virtualization][:systems][:xen]).to eq("host")
    end

    it "should set xen guest if /proc/xen/capabilities exists but is empty" do
      expect(File).to receive(:exists?).with("/proc/xen").and_return(true)
      expect(File).to receive(:exists?).with("/proc/xen/capabilities").and_return(true)
      allow(File).to receive(:read).with("/proc/xen/capabilities").and_return("")
      @plugin.run
      expect(@plugin[:virtualization][:system]).to eq("xen")
      expect(@plugin[:virtualization][:role]).to eq("guest")
      expect(@plugin[:virtualization][:systems][:xen]).to eq("guest")
    end

    it "should not set virtualization if xen isn't there" do
      expect(File).to receive(:exists?).at_least(:once).and_return(false)
      @plugin.run
      expect(@plugin[:virtualization]).to eq({'systems' => {}})
    end
  end

  describe "when we are checking for kvm" do
    it "should set kvm host if /proc/modules contains kvm" do
      expect(File).to receive(:exists?).with("/proc/modules").and_return(true)
      allow(File).to receive(:read).with("/proc/modules").and_return("kvm 165872  1 kvm_intel")
      @plugin.run
      expect(@plugin[:virtualization][:system]).to eq("kvm")
      expect(@plugin[:virtualization][:role]).to eq("host")
      expect(@plugin[:virtualization][:systems][:kvm]).to eq("host")
    end

    it "should set kvm guest if /proc/cpuinfo contains QEMU Virtual CPU" do
      expect(File).to receive(:exists?).with("/proc/cpuinfo").and_return(true)
      allow(File).to receive(:read).with("/proc/cpuinfo").and_return("QEMU Virtual CPU")
      @plugin.run
      expect(@plugin[:virtualization][:system]).to eq("kvm")
      expect(@plugin[:virtualization][:role]).to eq("guest")
      expect(@plugin[:virtualization][:systems][:kvm]).to eq("guest")
    end

    it "should set kvm guest if /proc/cpuinfo contains Common KVM processor" do
      expect(File).to receive(:exists?).with("/proc/cpuinfo").and_return(true)
      allow(File).to receive(:read).with("/proc/cpuinfo").and_return("Common KVM processor")
      @plugin.run
      expect(@plugin[:virtualization][:system]).to eq("kvm")
      expect(@plugin[:virtualization][:role]).to eq("guest")
      expect(@plugin[:virtualization][:systems][:kvm]).to eq("guest")
    end

    it "should set kvm guest if /proc/cpuinfo contains Common 32-bit KVM processor" do
      expect(File).to receive(:exists?).with("/proc/cpuinfo").and_return(true)
      allow(File).to receive(:read).with("/proc/cpuinfo").and_return("Common 32-bit KVM processor")
      @plugin.run
      expect(@plugin[:virtualization][:system]).to eq("kvm")
      expect(@plugin[:virtualization][:role]).to eq("guest")
      expect(@plugin[:virtualization][:systems][:kvm]).to eq("guest")
    end

    it "should not set virtualization if kvm isn't there" do
      expect(File).to receive(:exists?).at_least(:once).and_return(false)
      @plugin.run
      expect(@plugin[:virtualization]).to eq({'systems' => {}})
    end
  end

  describe "when we are checking for VirtualBox" do
    it "should set vbox host if /proc/modules contains vboxdrv" do
      expect(File).to receive(:exists?).with("/proc/modules").and_return(true)
      allow(File).to receive(:read).with("/proc/modules").and_return("vboxdrv 268268 3 vboxnetadp,vboxnetflt")
      @plugin.run
      expect(@plugin[:virtualization][:system]).to eq("vbox")
      expect(@plugin[:virtualization][:role]).to eq("host")
      expect(@plugin[:virtualization][:systems][:vbox]).to eq("host")
    end

    it "should set vbox gues if /proc/modules contains vboxguest" do
      expect(File).to receive(:exists?).with("/proc/modules").and_return(true)
      allow(File).to receive(:read).with("/proc/modules").and_return("vboxguest 214901 2 vboxsf, Live 0xffffffffa00db000 (OF)")
      @plugin.run
      expect(@plugin[:virtualization][:system]).to eq("vbox")
      expect(@plugin[:virtualization][:role]).to eq("guest")
      expect(@plugin[:virtualization][:systems][:vbox]).to eq("guest")
    end

    it "should not set virtualization if vbox isn't there" do
      expect(File).to receive(:exists?).at_least(:once).and_return(false)
      @plugin.run
      expect(@plugin[:virtualization]).to eq({'systems' => {}})
    end
  end

  describe "when we are parsing dmidecode" do
    before(:each) do
      expect(File).to receive(:exists?).with("/usr/sbin/dmidecode").and_return(true)
    end

    it "should set virtualpc guest if dmidecode detects Microsoft Virtual Machine" do
      ms_vpc_dmidecode=<<-MSVPC
System Information
  Manufacturer: Microsoft Corporation
  Product Name: Virtual Machine
  Version: VS2005R2
  Serial Number: 1688-7189-5337-7903-2297-1012-52
  UUID: D29974A4-BE51-044C-BDC6-EFBC4B87A8E9
  Wake-up Type: Power Switch
MSVPC
      allow(@plugin).to receive(:shell_out).with("dmidecode").and_return(mock_shell_out(0, ms_vpc_dmidecode, ""))
      @plugin.run
      expect(@plugin[:virtualization][:system]).to eq("virtualpc")
      expect(@plugin[:virtualization][:role]).to eq("guest")
      expect(@plugin[:virtualization][:systems][:virtualpc]).to eq("guest")
    end

    it "should set vmware guest if dmidecode detects VMware Virtual Platform" do
      vmware_dmidecode=<<-VMWARE
System Information
  Manufacturer: VMware, Inc.
  Product Name: VMware Virtual Platform
  Version: None
  Serial Number: VMware-50 3f f7 14 42 d1 f1 da-3b 46 27 d0 29 b4 74 1d
  UUID: a86cc405-e1b9-447b-ad05-6f8db39d876a
  Wake-up Type: Power Switch
  SKU Number: Not Specified
  Family: Not Specified
VMWARE
      allow(@plugin).to receive(:shell_out).with("dmidecode").and_return(mock_shell_out(0, vmware_dmidecode, ""))
      @plugin.run
      expect(@plugin[:virtualization][:system]).to eq("vmware")
      expect(@plugin[:virtualization][:role]).to eq("guest")
      expect(@plugin[:virtualization][:systems][:vmware]).to eq("guest")
    end

    it "should set vbox guest if dmidecode detects Oracle Corporation" do
      vbox_dmidecode=<<-VBOX
Base Board Information
  Manufacturer: Oracle Corporation
  Product Name: VirtualBox
  Version: 1.2
  Serial Number: 0
  Asset Tag: Not Specified
  Features:
        Board is a hosting board
  Location In Chasis: Not Specified
  Type: Motherboard
  Contained Object Handles: 0
VBOX
      allow(@plugin).to receive(:shell_out).with("dmidecode").and_return(mock_shell_out(0, vbox_dmidecode, ""))
      @plugin.run
      expect(@plugin[:virtualization][:system]).to eq("vbox")
      expect(@plugin[:virtualization][:role]).to eq("guest")
      expect(@plugin[:virtualization][:systems][:vbox]).to eq("guest")
    end

    it "should set openstack guest if dmidecode detects OpenStack" do
      openstack_dmidecode=<<-OPENSTACK
System Information
        Manufacturer: Red Hat Inc.
        Product Name: OpenStack Nova
        Version: 2014.1.2-1.el6
        Serial Number: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
        UUID: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
        Wake-up Type: Power Switch
        SKU Number: Not Specified
        Family: Red Hat Enterprise Linux
OPENSTACK
      allow(@plugin).to receive(:shell_out).with("dmidecode").and_return(mock_shell_out(0, openstack_dmidecode, ""))
      @plugin.run
      expect(@plugin[:virtualization][:system]).to eq("openstack")
      expect(@plugin[:virtualization][:role]).to eq("guest")
      expect(@plugin[:virtualization][:systems][:openstack]).to eq("guest")
    end

    it "should run dmidecode and not set virtualization if nothing is detected" do
      allow(@plugin).to receive(:shell_out).with("dmidecode").and_return(mock_shell_out(0, "", ""))
      @plugin.run
      expect(@plugin[:virtualization]).to eq({'systems' => {}})
    end
  end

  describe "when we are checking for Linux-VServer" do
    it "should set Linux-VServer host if /proc/self/status contains s_context: 0" do
      expect(File).to receive(:exists?).with("/proc/self/status").and_return(true)
      allow(File).to receive(:read).with("/proc/self/status").and_return("s_context: 0")
      @plugin.run
      expect(@plugin[:virtualization][:system]).to eq("linux-vserver")
      expect(@plugin[:virtualization][:role]).to eq("host")
      expect(@plugin[:virtualization][:systems]['linux-vserver']).to eq("host")
    end

    it "should set Linux-VServer host if /proc/self/status contains VxID: 0" do
      expect(File).to receive(:exists?).with("/proc/self/status").and_return(true)
      allow(File).to receive(:read).with("/proc/self/status").and_return("VxID: 0")
      @plugin.run
      expect(@plugin[:virtualization][:system]).to eq("linux-vserver")
      expect(@plugin[:virtualization][:role]).to eq("host")
      expect(@plugin[:virtualization][:systems]['linux-vserver']).to eq("host")
    end

    it "should set Linux-VServer host if /proc/self/status contains multiple space VxID:   0" do
      expect(File).to receive(:exists?).with("/proc/self/status").and_return(true)
      allow(File).to receive(:read).with("/proc/self/status").and_return("VxID:   0")
      @plugin.run
      expect(@plugin[:virtualization][:system]).to eq("linux-vserver")
      expect(@plugin[:virtualization][:role]).to eq("host")
      expect(@plugin[:virtualization][:systems]['linux-vserver']).to eq("host")
    end

    it "should set Linux-VServer host if /proc/self/status contains tabbed VxID:\t0" do
      expect(File).to receive(:exists?).with("/proc/self/status").and_return(true)
      allow(File).to receive(:read).with("/proc/self/status").and_return("VxID:\t0")
      @plugin.run
      expect(@plugin[:virtualization][:system]).to eq("linux-vserver")
      expect(@plugin[:virtualization][:role]).to eq("host")
      expect(@plugin[:virtualization][:systems]['linux-vserver']).to eq("host")
    end

    it "should set Linux-VServer guest if /proc/self/status contains s_context > 0" do
      expect(File).to receive(:exists?).with("/proc/self/status").and_return(true)
      allow(File).to receive(:read).with("/proc/self/status").and_return("s_context: 2")
      @plugin.run
      expect(@plugin[:virtualization][:system]).to eq("linux-vserver")
      expect(@plugin[:virtualization][:role]).to eq("guest")
      expect(@plugin[:virtualization][:systems]['linux-vserver']).to eq("guest")
    end

    it "should set Linux-VServer guest if /proc/self/status contains VxID > 0" do
      expect(File).to receive(:exists?).with("/proc/self/status").and_return(true)
      allow(File).to receive(:read).with("/proc/self/status").and_return("VxID: 2")
      @plugin.run
      expect(@plugin[:virtualization][:system]).to eq("linux-vserver")
      expect(@plugin[:virtualization][:role]).to eq("guest")
      expect(@plugin[:virtualization][:systems]['linux-vserver']).to eq("guest")
    end

    it "should not set virtualization if Linux-VServer isn't there" do
      expect(File).to receive(:exists?).at_least(:once).and_return(false)
      @plugin.run
      expect(@plugin[:virtualization]).to eq({'systems' => {}})
    end
  end

  describe "when we are checking for openvz" do
    it "should set openvz host if /proc/bc/0 exists" do
      expect(File).to receive(:exists?).with("/proc/bc/0").and_return(true)
      @plugin.run
      expect(@plugin[:virtualization][:system]).to eq("openvz")
      expect(@plugin[:virtualization][:role]).to eq("host")
      expect(@plugin[:virtualization][:systems][:openvz]).to eq("host")
    end

    it "should set openvz guest if /proc/bc/0 doesn't exist and /proc/vz exists" do
      expect(File).to receive(:exists?).with("/proc/bc/0").and_return(false)
      expect(File).to receive(:exists?).with("/proc/vz").and_return(true)
      @plugin.run
      expect(@plugin[:virtualization][:system]).to eq("openvz")
      expect(@plugin[:virtualization][:role]).to eq("guest")
      expect(@plugin[:virtualization][:systems][:openvz]).to eq("guest")
    end

    it "should not set virtualization if openvz isn't there" do
      expect(File).to receive(:exists?).with("/proc/bc/0").and_return(false)
      expect(File).to receive(:exists?).with("/proc/vz").and_return(false)
      @plugin.run
      expect(@plugin[:virtualization]).to eq({'systems' => {}})
    end
  end

  describe "when we are checking for lxc" do
    it "should set lxc guest if /proc/self/cgroup exist and there are /lxc/<hexadecimal> mounts" do
      self_cgroup=<<-CGROUP
8:blkio:/lxc/baa660ed81bc81d262ac6e19486142aeec5fce2043e2a173eb2505c6fbed89bc
7:net_cls:/lxc/baa660ed81bc81d262ac6e19486142aeec5fce2043e2a173eb2505c6fbed89bc
6:freezer:/lxc/baa660ed81bc81d262ac6e19486142aeec5fce2043e2a173eb2505c6fbed89bc
5:devices:/lxc/baa660ed81bc81d262ac6e19486142aeec5fce2043e2a173eb2505c6fbed89bc
4:memory:/lxc/baa660ed81bc81d262ac6e19486142aeec5fce2043e2a173eb2505c6fbed89bc
3:cpuacct:/lxc/baa660ed81bc81d262ac6e19486142aeec5fce2043e2a173eb2505c6fbed89bc
2:cpu:/lxc/baa660ed81bc81d262ac6e19486142aeec5fce2043e2a173eb2505c6fbed89bc
1:cpuset:/
CGROUP
      expect(File).to receive(:exists?).with("/proc/self/cgroup").and_return(true)
      allow(File).to receive(:read).with("/proc/self/cgroup").and_return(self_cgroup)
      @plugin.run
      expect(@plugin[:virtualization][:system]).to eq("lxc")
      expect(@plugin[:virtualization][:role]).to eq("guest")
      expect(@plugin[:virtualization][:systems][:lxc]).to eq("guest")
    end

    it "should set lxc guest if /proc/self/cgroup exist and there are /lxc/<name> mounts" do
      self_cgroup=<<-CGROUP
8:blkio:/lxc/vanilla
7:net_cls:/lxc/vanilla
6:freezer:/lxc/vanilla
5:devices:/lxc/vanilla
4:memory:/lxc/vanilla
3:cpuacct:/lxc/vanilla
2:cpu:/lxc/vanilla
1:cpuset:/lxc/vanilla
CGROUP
      expect(File).to receive(:exists?).with("/proc/self/cgroup").and_return(true)
      allow(File).to receive(:read).with("/proc/self/cgroup").and_return(self_cgroup)
      @plugin.run
      expect(@plugin[:virtualization][:system]).to eq("lxc")
      expect(@plugin[:virtualization][:role]).to eq("guest")
      expect(@plugin[:virtualization][:systems][:lxc]).to eq("guest")
    end

    it "should set not set anything if /proc/self/cgroup exist and the cgroup is named arbitrarily, it isn't necessarily lxc." do
      self_cgroup=<<-CGROUP
8:blkio:/Charlie
7:net_cls:/Charlie
6:freezer:/Charlie
5:devices:/Charlie
4:memory:/Charlie
3:cpuacct:/Charlie
2:cpu:/Charlie
1:cpuset:/Charlie
CGROUP
      expect(File).to receive(:exists?).with("/proc/self/cgroup").and_return(true)
      allow(File).to receive(:read).with("/proc/self/cgroup").and_return(self_cgroup)
      @plugin.run
      expect(@plugin[:virtualization]).to eq({'systems' => {}})
    end

    context "/proc/self/cgroup only has / mounts" do
      before(:each) do
        self_cgroup=<<-CGROUP
8:blkio:/
7:net_cls:/
6:freezer:/
5:devices:/
4:memory:/
3:cpuacct:/
2:cpu:/
1:cpuset:/
CGROUP
        expect(File).to receive(:exists?).with("/proc/self/cgroup").and_return(true)
        allow(File).to receive(:read).with("/proc/self/cgroup").and_return(self_cgroup)
      end

      it "sets lxc host if lxc-version exists" do
        allow(@plugin).to receive(:lxc_version_exists?).and_return("/usr/bin/lxc-version")
        @plugin.run
        expect(@plugin[:virtualization][:system]).to eq("lxc")
        expect(@plugin[:virtualization][:role]).to eq("host")
        expect(@plugin[:virtualization][:systems][:lxc]).to eq("host")
      end

      it "does not set the old virtualization attributes if they are already set" do
        allow(@plugin).to receive(:lxc_version_exists?).and_return("/usr/bin/lxc-version")
        @plugin[:virtualization] = Mash.new
        @plugin[:virtualization][:system] = "the cloud"
        @plugin[:virtualization][:role] = "cumulonimbus"
        @plugin.run
        expect(@plugin[:virtualization][:system]).not_to eq("lxc")
        expect(@plugin[:virtualization][:role]).not_to eq("host")
      end

      it "does not set lxc host if lxc-version does not exist" do
        allow(@plugin).to receive(:lxc_version_exists?).and_return(false)
        @plugin.run
        expect(@plugin[:virtualization][:system]).to be_nil
        expect(@plugin[:virtualization][:role]).to be_nil
        expect(@plugin[:virtualization]).to eq({'systems' => {}})
      end

    end

    it "should not set virtualization if /proc/self/cgroup isn't there" do
      expect(File).to receive(:exists?).with("/proc/self/cgroup").and_return(false)
      @plugin.run
      expect(@plugin[:virtualization]).to eq({'systems' => {}})
    end
  end

  describe "when we are checking for docker" do
    it "should set docker guest if /proc/self/cgroup exist and there are /docker/<hexadecimal> mounts" do
      self_cgroup=<<-CGROUP
8:blkio:/docker/baa660ed81bc81d262ac6e19486142aeec5fce2043e2a173eb2505c6fbed89bc
7:net_cls:/docker/baa660ed81bc81d262ac6e19486142aeec5fce2043e2a173eb2505c6fbed89bc
6:freezer:/docker/baa660ed81bc81d262ac6e19486142aeec5fce2043e2a173eb2505c6fbed89bc
5:devices:/docker/baa660ed81bc81d262ac6e19486142aeec5fce2043e2a173eb2505c6fbed89bc
4:memory:/docker/baa660ed81bc81d262ac6e19486142aeec5fce2043e2a173eb2505c6fbed89bc
3:cpuacct:/docker/baa660ed81bc81d262ac6e19486142aeec5fce2043e2a173eb2505c6fbed89bc
2:cpu:/docker/baa660ed81bc81d262ac6e19486142aeec5fce2043e2a173eb2505c6fbed89bc
1:cpuset:/
CGROUP
      allow(File).to receive(:exists?).with("/proc/self/cgroup").and_return(true)
      allow(File).to receive(:read).with("/proc/self/cgroup").and_return(self_cgroup)
      @plugin.run
      expect(@plugin[:virtualization][:system]).to eq("docker")
      expect(@plugin[:virtualization][:role]).to eq("guest")
      expect(@plugin[:virtualization][:systems][:docker]).to eq("guest")
    end

    it "should set docker guest if /proc/self/cgroup exist and there are /docker/<name> mounts" do
      self_cgroup=<<-CGROUP
8:blkio:/docker/vanilla
7:net_cls:/docker/vanilla
6:freezer:/docker/vanilla
5:devices:/docker/vanilla
4:memory:/docker/vanilla
3:cpuacct:/docker/vanilla
2:cpu:/docker/vanilla
1:cpuset:/docker/vanilla
CGROUP
      allow(File).to receive(:exists?).with("/proc/self/cgroup").and_return(true)
      allow(File).to receive(:read).with("/proc/self/cgroup").and_return(self_cgroup)
      @plugin.run
      expect(@plugin[:virtualization][:system]).to eq("docker")
      expect(@plugin[:virtualization][:role]).to eq("guest")
      expect(@plugin[:virtualization][:systems][:docker]).to eq("guest")
    end

    it "should set not set anything if /proc/self/cgroup exist and the cgroup is named arbitrarily, it isn't necessarily lxc." do
      self_cgroup=<<-CGROUP
8:blkio:/Charlie
7:net_cls:/Charlie
6:freezer:/Charlie
5:devices:/Charlie
4:memory:/Charlie
3:cpuacct:/Charlie
2:cpu:/Charlie
1:cpuset:/Charlie
CGROUP
      allow(File).to receive(:exists?).with("/proc/self/cgroup").and_return(true)
      allow(File).to receive(:read).with("/proc/self/cgroup").and_return(self_cgroup)
      @plugin.run
      expect(@plugin[:virtualization]).to eq({'systems' => {}})
    end

    context "/proc/self/cgroup only has / mounts" do
      before(:each) do
        self_cgroup=<<-CGROUP
8:blkio:/
7:net_cls:/
6:freezer:/
5:devices:/
4:memory:/
3:cpuacct:/
2:cpu:/
1:cpuset:/
CGROUP
        allow(File).to receive(:exists?).with("/proc/self/cgroup").and_return(true)
        allow(File).to receive(:read).with("/proc/self/cgroup").and_return(self_cgroup)
        @plugin.run
        expect(@plugin[:virtualization]).to eq({'systems' => {}})
      end

    end

    it "does not set the old virtualization attributes if they are already set" do
      allow(@plugin).to receive(:docker_exists?).and_return("/usr/bin/docker")
      @plugin[:virtualization] = Mash.new
      @plugin[:virtualization][:system] = "the cloud"
      @plugin[:virtualization][:role] = "cumulonimbus"
      @plugin.run
      expect(@plugin[:virtualization][:system]).not_to eq("docker")
      expect(@plugin[:virtualization][:role]).not_to eq("host")
    end

    it "does not set docker host if docker does not exist" do
      allow(@plugin).to receive(:docker_exists?).and_return(false)
      @plugin.run
      expect(@plugin[:virtualization][:system]).to be_nil
      expect(@plugin[:virtualization][:role]).to be_nil
      expect(@plugin[:virtualization]).to eq({'systems' => {}})
    end

    it "should not set virtualization if /proc/self/cgroup isn't there" do
      allow(File).to receive(:exists?).with("/proc/self/cgroup").and_return(false)
      @plugin.run
      expect(@plugin[:virtualization]).to eq({'systems' => {}})
    end

    it "should set virtualization if /.dockerenv exists" do
      allow(File).to receive(:exists?).with("/.dockerenv").and_return(true)
      @plugin.run
      expect(@plugin[:virtualization][:system]).to eq("docker")
      expect(@plugin[:virtualization][:role]).to eq("guest")
      expect(@plugin[:virtualization][:systems][:docker]).to eq("guest")
    end

    it "should set virtualization if /.dockerinit exists" do
      allow(File).to receive(:exists?).with("/.dockerinit").and_return(true)
      @plugin.run
      expect(@plugin[:virtualization][:system]).to eq("docker")
      expect(@plugin[:virtualization][:role]).to eq("guest")
      expect(@plugin[:virtualization][:systems][:docker]).to eq("guest")
    end

    it "should not set virtualization if /.dockerenv or /.dockerinit doesn't exists" do
      allow(File).to receive(:exists?).with("/.dockerenv").and_return(false)
      allow(File).to receive(:exists?).with("/.dockerinit").and_return(false)
      @plugin.run
      expect(@plugin[:virtualization]).to eq({'systems' => {}})
    end

  end

  it "should not set virtualization if no tests match" do
    @plugin.run
    expect(@plugin[:virtualization]).to eq({'systems' => {}})
  end
end


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$PROJECT_DIR$/JPy.iml" filepath="$PROJECT_DIR$/JPy.iml" />
    </modules>
  </component>
</project>


text:
package org.elasticsearch.cloud.azure.classic.management;

import com.microsoft.windowsazure.core.utils.KeyStoreType;
import com.microsoft.windowsazure.management.compute.models.HostedServiceGetDetailedResponse;

import org.elasticsearch.common.settings.Setting;
import org.elasticsearch.common.settings.Setting.Property;
import org.elasticsearch.core.TimeValue;
import org.elasticsearch.discovery.azure.classic.AzureSeedHostsProvider;
import org.elasticsearch.discovery.azure.classic.AzureSeedHostsProvider.Deployment;

import java.net.URI;
import java.net.URISyntaxException;
import java.util.function.Function;

public interface AzureComputeService {

    final class Management {
        public static final Setting<String> SUBSCRIPTION_ID_SETTING = Setting.simpleString(
            "cloud.azure.management.subscription.id",
            Property.NodeScope,
            Property.Filtered
        );
        public static final Setting<String> SERVICE_NAME_SETTING = Setting.simpleString(
            "cloud.azure.management.cloud.service.name",
            Property.NodeScope
        );

        // Keystore settings
        public static final Setting<String> KEYSTORE_PATH_SETTING = Setting.simpleString(
            "cloud.azure.management.keystore.path",
            Property.NodeScope,
            Property.Filtered
        );
        public static final Setting<String> KEYSTORE_PASSWORD_SETTING = Setting.simpleString(
            "cloud.azure.management.keystore.password",
            Property.NodeScope,
            Property.Filtered
        );
        public static final Setting<KeyStoreType> KEYSTORE_TYPE_SETTING = new Setting<>(
            "cloud.azure.management.keystore.type",
            KeyStoreType.pkcs12.name(),
            KeyStoreType::fromString,
            Property.NodeScope,
            Property.Filtered
        );

        // so that it can overridden for tests
        public static final Setting<URI> ENDPOINT_SETTING = new Setting<URI>(
            "cloud.azure.management.endpoint",
            "https://management.core.windows.net/",
            s -> {
                try {
                    return new URI(s);
                } catch (URISyntaxException e) {
                    throw new IllegalArgumentException(e);
                }
            },
            Property.NodeScope
        );
    }

    final class Discovery {
        public static final Setting<TimeValue> REFRESH_SETTING = Setting.positiveTimeSetting(
            "discovery.azure.refresh_interval",
            TimeValue.timeValueSeconds(0),
            Property.NodeScope
        );
        public static final Setting<AzureSeedHostsProvider.HostType> HOST_TYPE_SETTING = new Setting<>(
            "discovery.azure.host.type",
            AzureSeedHostsProvider.HostType.PRIVATE_IP.name(),
            AzureSeedHostsProvider.HostType::fromString,
            Property.NodeScope
        );
        public static final Setting<String> ENDPOINT_NAME_SETTING = new Setting<>(
            "discovery.azure.endpoint.name",
            "elasticsearch",
            Function.identity(),
            Property.NodeScope
        );
        public static final Setting<String> DEPLOYMENT_NAME_SETTING = Setting.simpleString(
            "discovery.azure.deployment.name",
            Property.NodeScope
        );
        public static final Setting<Deployment> DEPLOYMENT_SLOT_SETTING = new Setting<>(
            "discovery.azure.deployment.slot",
            Deployment.PRODUCTION.name(),
            Deployment::fromString,
            Property.NodeScope
        );
    }

    HostedServiceGetDetailedResponse getServiceDetails();
}


text:
@interface AccountCreationViewController : UIViewController <FetchFinishedDelegate, CaptchaViewControllerRefresh, UITextFieldDelegate, UIScrollViewDelegate>

@property (weak, nonatomic) IBOutlet UITextField* usernameField;
@property (weak, nonatomic) IBOutlet UITextField* passwordField;
@property (weak, nonatomic) IBOutlet UITextField* passwordRepeatField;
@property (weak, nonatomic) IBOutlet UITextField* emailField;

@property (strong, nonatomic) CreateAccountFunnel* funnel;

@end


text:
<?xml version="1.0" encoding="UTF-8"?>
<rules rulesVersion="5.0.1-20141211">
	<database pdmPath="" dbProductName="MySQL" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost/rmdemo?jdbcCompliantTruncation=false" userName="root" password="" catalog="" schemaPattern="" tableNamePattern="">
		<!--定义目标表名xml的路径-->
		<tableTos>
			<tableTo xmlName="RM_FUNCTION_NODE.xml">RM_FUNCTION_NODE</tableTo>
		</tableTos>
	</database>
    <codegen baseProjectPath="" toTableNameKeyword="TableName">
       <mvms contextName="JavaEE标准版">
           <mvm>
               <contextName>JavaEE标准版</contextName>
               <codegenConfig>mvm-JavaEE-standard.xml</codegenConfig>
               <framework>jQuery-1.6 + Html + SpringMVC-3.2 + Spring-3.2 + MyBatis-3.2</framework>
               <configProjectClass>org.quickbundle.mda.gc.project.JavaEEStandardProject</configProjectClass>
           </mvm>
       </mvms>
    </codegen>
	<project>
		<javaPackageName>com.helloworld</javaPackageName>
		<javaPackageDir>com/helloworld</javaPackageDir>
		<jspSourcePath>helloworld</jspSourcePath>
		<webAppName>webapp</webAppName>
		<authorName>白小勇</authorName>
	</project>
	<dataType>
		<!--定义数据库类型-->
		<dbTypes>
			<dbType defaultDriver="com.mysql.jdbc.Driver" defaultUrl="jdbc:mysql://localhost/test?useUnicode=true&characterEncoding=UTF-8&jdbcCompliantTruncation=false&autoReconnect=true">MySQL</dbType>
			<dbType defaultDriver="oracle.jdbc.driver.OracleDriver" defaultUrl="jdbc:oracle:thin:@localhost:1521:test">Oracle</dbType>
			<dbType defaultDriver="com.ibm.db2.jcc.DB2Driver" defaultDriver.old="COM.ibm.db2.jdbc.app.DB2Driver" defaultUrl="jdbc:db2://localhost:50000/test">db2</dbType>
			<dbType defaultDriver="net.sourceforge.jtds.jdbc.Driver" defaultUrl="jdbc:jtds:sqlserver://localhost:1433/test;charset=GBK">SQL Server</dbType>
			<dbType defaultDriver="org.h2.Driver" defaultUrl="jdbc:h2:tcp://localhost/~/test">H2</dbType>
			<dbType defaultDriver="com.sybase.jdbc2.jdbc.SybDriver" defaultUrl="jdbc:sybase:Tds:localhost:2638/">Sybase</dbType>
			<dbType defaultDriver="com.informix.jdbc.IfxDriver" defaultUrl="jdbc:informix-sqli://localhost:1533/test:INFORMIXSERVER=myserver">informix</dbType>
			<dbType defaultDriver="org.postgresql.Driver" defaultUrl="jdbc:postgresql://localhost/test">PostgreSQL</dbType>
			<!--
			<dbType defaultDriver="sun.jdbc.odbc.JdbcOdbcDriver" defaultUrl="jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ=yourApplicationRealPath/Data/ReportDemo.mdb">access(*)</dbType>
			 -->
			<dbType defaultDriver="undefined driver" defaultUrl="undefined url">other</dbType>
		</dbTypes>
		<!--定义关键字的过滤类型-->
		<filterTypes>
			<filterType>default</filterType>
			<filterType>lowerCase</filterType>
			<filterType>minus</filterType>
			<filterType>specify</filterType>
		</filterTypes>
		<!--定义人性化展现的类型-->
		<humanDisplayTypes>
			<humanDisplayType>default</humanDisplayType>
			<humanDisplayType>rm.dictionary.select</humanDisplayType>
			<humanDisplayType>rm.dictionary.checkbox</humanDisplayType>
			<humanDisplayType>rm.fckEditor</humanDisplayType>
			<humanDisplayType>rm.listReference</humanDisplayType>
			<humanDisplayType>rm.orgReference</humanDisplayType>
			<humanDisplayType>rm.affix</humanDisplayType>
		</humanDisplayTypes>
		<!--定义默认列的表显示名称(即汉化),isBuild是默认是否选中-->
		<deployInterprets>
			<deployInterpret isBuild="false" displayName="数据可用状态">usable_status</deployInterpret>
			<deployInterpret isBuild="false" displayName="创建日期">create_date</deployInterpret>
			<deployInterpret isBuild="false" displayName="创建IP">create_ip</deployInterpret>
			<deployInterpret isBuild="false" displayName="创建用户ID">create_user_id</deployInterpret>
			<deployInterpret isBuild="false" displayName="创建用户名称">create_user_id_name</deployInterpret>
			<deployInterpret isBuild="false" displayName="修改日期">modify_date</deployInterpret>
			<deployInterpret isBuild="false" displayName="修改IP">modify_ip</deployInterpret>
			<deployInterpret isBuild="false" displayName="修改用户ID">modify_user_id</deployInterpret>
			<deployInterpret isBuild="false" displayName="修改用户名称">modify_user_id_name</deployInterpret>
			<deployInterpret isBuild="false" displayName="主键">id</deployInterpret>
			<deployInterpret isBuild="false" displayName="排序编码">order_code</deployInterpret>
			<deployInterpret isBuild="false" displayName="时间戳">ts</deployInterpret>
			<deployInterpret isBuild="false" displayName="删除标志">dr</deployInterpret>
			<deployInterpret isBuild="false" displayName="扩展字段1">attribute1</deployInterpret>
			<deployInterpret isBuild="false" displayName="扩展字段2">attribute2</deployInterpret>
			<deployInterpret isBuild="false" displayName="扩展字段3">attribute3</deployInterpret>
			<deployInterpret isBuild="false" displayName="扩展字段4">attribute4</deployInterpret>
			<deployInterpret isBuild="false" displayName="扩展字段5">attribute5</deployInterpret>
			<deployInterpret isBuild="false" displayName="扩展字段6">attribute6</deployInterpret>
			<deployInterpret isBuild="false" displayName="扩展字段7">attribute7</deployInterpret>
			<deployInterpret isBuild="false" displayName="扩展字段8">attribute8</deployInterpret>
			<deployInterpret isBuild="false" displayName="扩展字段9">attribute9</deployInterpret>
			<deployInterpret isBuild="false" displayName="扩展字段10">attribute10</deployInterpret>
			<deployInterpret isBuild="false" displayName="扩展字段11">attribute11</deployInterpret>
			<deployInterpret isBuild="false" displayName="扩展字段12">attribute12</deployInterpret>
			<deployInterpret isBuild="false" displayName="扩展字段13">attribute13</deployInterpret>
			<deployInterpret isBuild="false" displayName="扩展字段14">attribute14</deployInterpret>
			<deployInterpret isBuild="false" displayName="扩展字段15">attribute15</deployInterpret>
			<deployInterpret isBuild="false" displayName="扩展字段16">attribute16</deployInterpret>
			<deployInterpret isBuild="false" displayName="扩展字段17">attribute17</deployInterpret>
			<deployInterpret isBuild="false" displayName="扩展字段18">attribute18</deployInterpret>
			<deployInterpret isBuild="false" displayName="扩展字段19">attribute19</deployInterpret>
			<deployInterpret isBuild="false" displayName="扩展字段20">attribute20</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项1">vuserdef1</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项2">vuserdef2</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项3">vuserdef3</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项4">vuserdef4</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项5">vuserdef5</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项6">vuserdef6</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项7">vuserdef7</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项8">vuserdef8</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项9">vuserdef9</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项10">vuserdef10</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项11">vuserdef11</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项12">vuserdef12</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项13">vuserdef13</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项14">vuserdef14</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项15">vuserdef15</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项16">vuserdef16</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项17">vuserdef17</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项18">vuserdef18</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项19">vuserdef19</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项20">vuserdef20</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项1">def1</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项2">def2</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项3">def3</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项4">def4</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项5">def5</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项6">def6</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项7">def7</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项8">def8</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项9">def9</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项10">def10</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项11">def11</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项12">def12</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项13">def13</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项14">def14</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项15">def15</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项16">def16</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项17">def17</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项18">def18</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项19">def19</deployInterpret>
			<deployInterpret isBuild="false" displayName="自定义项20">def20</deployInterpret>
		</deployInterprets>
	</dataType>
	<!-- 个人化配置 -->
	<profileConfig>
		<!-- 关键列正则匹配 -->
		<keyColumnMatch>^title$|^name$</keyColumnMatch>
	</profileConfig>
	<customBundleCode>
		<!-- 可定制的组件列表 -->
		<bundle code="main" name="标准维护" null="true" checked="true">传统Form提交方式的增删改查标准维护,是其它功能的基础。不选则只生成Service层以下的后台代码</bundle>
		<bundle code="ajax" name="Ajax页" null="true" checked="true" depend="main">ExeJS风格的CRUD</bundle>
		<bundle code="importExport" name="导出导入页" null="true" checked="true" depend="main">Excel导出、导入功能</bundle>
		<bundle code="reference" name="参照页" null="true" checked="true" depend="main">作为列表查询的参照页</bundle>
		<bundle code="statistic" name="统计页" null="true" checked="true" depend="main">图表统计、二维表格统计</bundle>
		<bundle code="bootstrap" name="Bootstrap" null="true" checked="true">Bootstrap风格的完整页面</bundle>
	</customBundleCode>
</rules>


text:
package vektah.rust;

import javax.swing.Icon;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import com.intellij.openapi.fileTypes.LanguageFileType;
import vektah.rust.i18n.RustBundle;

public class RustFileType extends LanguageFileType
{
	public static final RustFileType INSTANCE = new RustFileType();

	private RustFileType()
	{
		super(RustLanguage.INSTANCE);
	}

	@NotNull
	@Override
	public String getName()
	{
		return RustBundle.message("file.type.name.rust");
	}

	@NotNull
	@Override
	public String getDescription()
	{
		return RustBundle.message("file.type.description.rust");
	}

	@NotNull
	@Override
	public String getDefaultExtension()
	{
		return "rs";
	}

	@Nullable
	@Override
	public Icon getIcon()
	{
		return RustIcons.Rust;
	}
}


text:
var gulp = require('./gulp');
var karma = require('./karma');

module.exports = {
	gulp: gulp,
	karma: karma,
};


text:
namespace oless {
	namespace excel {
		namespace records {

			class NameCmtRecord : public Record {
			public:
				NameCmtRecord(unsigned short type, std::vector<uint8_t> data) : Record(type, data) {

				}
			};
		}
	}
}


text:
<!DOCTYPE HTML>

        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

        <title></title>

        <link rel="stylesheet" type="text/css" href="/dev/css/sakai/main.css" />
        <link rel="stylesheet" type="text/css" href="/dev/css/sakai/sakai.corev1.css" />

        <link rel="stylesheet" type="text/css" href="/dev/css/sakai/sakai.error.css" />

<button>__MSG__SIGN_IN__</button>

__MSG__NO_ACCOUNT__ __MSG__SIGN_UP__

__MSG__ARE_YOU_LOOKING_FOR__

                                    __MSG__CONTENT__

                                    __MSG__PEOPLE__

__MSG__BROWSE_CATEGORIES__

__MSG__YOU_CAN_BROWSE_THIS_INSTITUTION__  __MSG__CATEGORIES_LC__ __MSG__WHERE_YOU_CAN_CONNECT_WITH_PEOPLE_VIEW_COURSE_DETAILS_SEARCH_FOR_CONTENT_AND_JOIN_GROUPS__

                                <button class="s3d-button s3d-overlay-button">__MSG__BROWSE_CATEGORIES__</button>

__MSG__OOPS_AN_ERROR_HAS_OCCURRED__

__MSG__WHAT_TO_DO_NOW_HERE_ARE_SOME_SUGGESTIONS__

                            <input type="text" tabindex_none="40" id="errorsearch_text" title="__MSG__SEARCH_FOR__" class="s3d-search-inputfield" maxlength="255"/>
                            <button type="button" class="s3d-button s3d-overlay-button s3d-search-button">

                            </button>


text:
using Intacct.SDK.Functions.Common;
using Intacct.SDK.Tests.Xml;
using Xunit;

namespace Intacct.SDK.Tests.Functions.Common
{
    public class LookupTest : XmlObjectTestHelper
    {
        [Fact]
        public void GetXmlTest()
        {
            string expected = @"<?xml version=""1.0"" encoding=""utf-8""?>
<function controlid=""unittest"">
    <lookup>
        <object>CLASS</object>
    </lookup>
</function>";

            Lookup record = new Lookup("unittest")
            {
                Object = "CLASS"
            };

            this.CompareXml(expected, record);
        }
    }
}


text:
<?php

class User extends Moloquent
{
    protected $connection = 'mongodb';

    protected $collection = 'users';

    protected $fillable = ['sid', 'name', 'deleted', 'color' ,'profile'];
}


text:
class NotesController < ApplicationController

  before_action :authenticate!
  before_action :set_note,                      only:   [:show, :edit, :update, :destroy]
  before_action :note_belongs_to_correct_user?, only:   [:show, :edit, :update, :destroy]

  # GET /notes
  def index
    @notes = current_user.notes.order(created_at: :desc).page(params[:page])
  end

  # GET /notes/1
  def show
  end

  # GET /notes/new
  def new
    @note = Note.new
  end

  # GET /notes/1/edit
  def edit
  end

  # POST /notes
  def create
    @note = current_user.notes.build(note_params)
    if @note.save
      flash[:success] = t "notes.created"
      redirect_to @note
    else
      render :new
    end
  end

  # PATCH/PUT /notes/1
  def update
    if @note.update(note_params)
      flash[:success] = t "notes.updated"
      redirect_to @note
    else
      render :edit
    end
  end

  # DELETE /notes/1
  def destroy
    @note.destroy
    flash[:success] = t "notes.deleted"
    redirect_to notes_url
  end

  def tag
    @notes = current_user.notes.where(tags: params[:tag]).page(params[:page])
  end

  private
    # Use callbacks to share common setup or constraints between actions.
    def set_note
      @note = Note.find(params[:id])
    end

    # Never trust parameters from the scary internet, only allow the white list through.
    def note_params
      params.require(:note).permit(:title, :content, :tag_list, :is_public)
    end

    def note_belongs_to_correct_user?
      page_403 if @note.user_id.to_s != current_user.id.to_s
    end
end


text:
package internal.org.springframework.content.commons.repository.factory;

import java.io.Serializable;
import java.nio.ByteBuffer;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.content.commons.property.PropertyPath;
import org.springframework.content.commons.repository.ReactiveContentStore;
import org.springframework.context.ApplicationEventPublisher;

import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

public class ReactiveStoreImpl implements ReactiveContentStore<Object, Serializable> {

    private static Log logger = LogFactory.getLog(ReactiveStoreImpl.class);

    private final ReactiveContentStore<Object, Serializable> delegate;
    private final ApplicationEventPublisher publisher;

    public ReactiveStoreImpl(ReactiveContentStore<Object, Serializable> delegate, ApplicationEventPublisher publisher) {
        this.delegate = delegate;
        this.publisher = publisher;
    }

    @Override
    public Mono<Object> setContent(Object entity, PropertyPath path, long contentLen, Flux<ByteBuffer> buffer) {
        try {
            Mono<Object> result = delegate.setContent(entity, path, contentLen, buffer);
            return result;
        }
        catch (Exception e) {
            throw e;
        }
    }

    @Override
    public Flux<ByteBuffer> getContent(Object entity, PropertyPath path) {
        return delegate.getContent(entity, path);
    }

    @Override
    public Mono<Object> unsetContent(Object entity, PropertyPath propertyPath) {
        return delegate.unsetContent(entity, propertyPath);
    }
}


text:
package io.sarl.lang;

import javax.inject.Inject;

import com.google.inject.Binder;
import com.google.inject.Injector;
import com.google.inject.Provider;
import com.google.inject.name.Names;
import org.eclipse.xtext.naming.IQualifiedNameConverter;
import org.eclipse.xtext.scoping.IScopeProvider;
import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider;
import org.eclipse.xtext.service.SingletonBinding;
import org.eclipse.xtext.validation.CompositeEValidator;
import org.eclipse.xtext.validation.IssueSeveritiesProvider;
import org.eclipse.xtext.xbase.typesystem.internal.DefaultReentrantTypeResolver;

import io.sarl.lang.bugfixes.bug356.Bug356ImportedNamespaceScopeProvider;
import io.sarl.lang.bugfixes.bug356.Bug356QualifiedNameConverter;
import io.sarl.lang.bugfixes.bug621.Bug621SARLValidator;
import io.sarl.lang.bugfixes.bug623.Bug623SARLReentrantTypeResolver;
import io.sarl.lang.bugfixes.xtext299.XtextBug299ConfigurableIssueSeveritiesProvider;
import io.sarl.lang.validation.ConfigurableIssueSeveritiesProvider;
import io.sarl.lang.validation.IConfigurableIssueSeveritiesProvider;
import io.sarl.lang.validation.SARLValidator;

/**
 * Use this class to register components to be used at runtime / without the
 * Equinox extension registry.
 *
 * <p>DOT NOT ADD BINDINGS IN THIS CLASS. PREFER TO UPDATE THE MWE2 SCRIPT.
 *
 * @author $Author: sgalland$
 * @author $Author: srodriguez$
 * @version $FullVersion$
 * @mavengroupid $GroupId$
 * @mavenartifactid $ArtifactId$
 */
public class SARLRuntimeModule extends io.sarl.lang.AbstractSARLRuntimeModule {

	/** Provider of {@link ConfigurableIssueSeveritiesProvider}.
	 *
	 * @author $Author: sgalland$
	 * @version $FullVersion$
	 * @mavengroupid $GroupId$
	 * @mavenartifactid $ArtifactId$
	 * @since 0.5
	 */
	private static class ConfigurableIssueSeveritiesProviderProvider implements Provider<ConfigurableIssueSeveritiesProvider> {

		private ConfigurableIssueSeveritiesProvider severityProvider;

		@Inject
		private Injector injector;

		ConfigurableIssueSeveritiesProviderProvider() {
			//
		}

		@Override
		public ConfigurableIssueSeveritiesProvider get() {
			if (this.severityProvider == null) {
				this.severityProvider = new XtextBug299ConfigurableIssueSeveritiesProvider();
				this.injector.injectMembers(this.severityProvider);
			}
			return this.severityProvider;
		}

	}

	@Override
	public void configure(Binder binder) {
		super.configure(binder);
		binder.bind(boolean.class).annotatedWith(Names.named(CompositeEValidator.USE_EOBJECT_VALIDATOR))
				.toInstance(false);
		// Configure a system singleton for issue severities provider
		final ConfigurableIssueSeveritiesProviderProvider provider = new ConfigurableIssueSeveritiesProviderProvider();
		binder.bind(ConfigurableIssueSeveritiesProvider.class).toProvider(provider);
		binder.bind(IssueSeveritiesProvider.class).toProvider(provider);
		binder.bind(IConfigurableIssueSeveritiesProvider.class).toProvider(provider);
	}

	@Override
	public void configureIScopeProviderDelegate(Binder binder) {
		binder.bind(IScopeProvider.class).annotatedWith(Names.named(AbstractDeclarativeScopeProvider.NAMED_DELEGATE))
				.to(Bug356ImportedNamespaceScopeProvider.class);
	}

	@Override
	public Class<? extends IQualifiedNameConverter> bindIQualifiedNameConverter() {
		return Bug356QualifiedNameConverter.class;
	}

	@Override
	@SingletonBinding(eager = true)
	public Class<? extends SARLValidator> bindSARLValidator() {
		return Bug621SARLValidator.class;
	}

	@Override
	public Class<? extends DefaultReentrantTypeResolver> bindDefaultReentrantTypeResolver() {
		return Bug623SARLReentrantTypeResolver.class;
	}

}


text:
/* DO NOT EDIT */
/* This file was generated from account.stone */

package com.dropbox.core.v2.account;

import com.dropbox.core.stone.StoneDeserializerLogger;
import com.dropbox.core.stone.StoneSerializers;
import com.dropbox.core.stone.StructSerializer;

import com.fasterxml.jackson.core.JsonGenerationException;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonToken;

import java.io.IOException;
import java.util.Arrays;

public class SetProfilePhotoResult {
    // struct account.SetProfilePhotoResult (account.stone)

    protected final String profilePhotoUrl;

    /**
     *
     * @param profilePhotoUrl  URL for the photo representing the user, if one
     *     is set. Must not be {@code null}.
     *
     * @throws IllegalArgumentException  If any argument does not meet its
     *     preconditions.
     */
    public SetProfilePhotoResult(String profilePhotoUrl) {
        if (profilePhotoUrl == null) {
            throw new IllegalArgumentException("Required value for 'profilePhotoUrl' is null");
        }
        this.profilePhotoUrl = profilePhotoUrl;
    }

    /**
     * URL for the photo representing the user, if one is set.
     *
     * @return value for this field, never {@code null}.
     */
    public String getProfilePhotoUrl() {
        return profilePhotoUrl;
    }

    @Override
    public int hashCode() {
        int hash = Arrays.hashCode(new Object [] {
            profilePhotoUrl
        });
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == this) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        // be careful with inheritance
        else if (obj.getClass().equals(this.getClass())) {
            SetProfilePhotoResult other = (SetProfilePhotoResult) obj;
            return (this.profilePhotoUrl == other.profilePhotoUrl) || (this.profilePhotoUrl.equals(other.profilePhotoUrl));
        }
        else {
            return false;
        }
    }

    @Override
    public String toString() {
        return Serializer.INSTANCE.serialize(this, false);
    }

    /**
     * Returns a String representation of this object formatted for easier
     * readability.
     *
     * <p> The returned String may contain newlines. </p>
     *
     * @return Formatted, multiline String representation of this object
     */
    public String toStringMultiline() {
        return Serializer.INSTANCE.serialize(this, true);
    }

    /**
     * For internal use only.
     */
    static class Serializer extends StructSerializer<SetProfilePhotoResult> {
        public static final Serializer INSTANCE = new Serializer();

        @Override
        public void serialize(SetProfilePhotoResult value, JsonGenerator g, boolean collapse) throws IOException, JsonGenerationException {
            if (!collapse) {
                g.writeStartObject();
            }
            g.writeFieldName("profile_photo_url");
            StoneSerializers.string().serialize(value.profilePhotoUrl, g);
            if (!collapse) {
                g.writeEndObject();
            }
        }

        @Override
        public SetProfilePhotoResult deserialize(JsonParser p, boolean collapsed) throws IOException, JsonParseException {
            SetProfilePhotoResult value;
            String tag = null;
            if (!collapsed) {
                expectStartObject(p);
                tag = readTag(p);
            }
            if (tag == null) {
                String f_profilePhotoUrl = null;
                while (p.getCurrentToken() == JsonToken.FIELD_NAME) {
                    String field = p.getCurrentName();
                    p.nextToken();
                    if ("profile_photo_url".equals(field)) {
                        f_profilePhotoUrl = StoneSerializers.string().deserialize(p);
                    }
                    else {
                        skipValue(p);
                    }
                }
                if (f_profilePhotoUrl == null) {
                    throw new JsonParseException(p, "Required field \"profile_photo_url\" missing.");
                }
                value = new SetProfilePhotoResult(f_profilePhotoUrl);
            }
            else {
                throw new JsonParseException(p, "No subtype found that matches tag: \"" + tag + "\"");
            }
            if (!collapsed) {
                expectEndObject(p);
            }
            StoneDeserializerLogger.log(value, value.toStringMultiline());
            return value;
        }
    }
}


text: Various Arduino sketches and experiments


text:
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using Mat.Common;
using Mat.Helpers;
using SignalR;

namespace Mat
{
    // Note: For instructions on enabling IIS6 or IIS7 classic mode,
    // visit http://go.microsoft.com/?LinkId=9394801

    public class WebApiApplication : HttpApplication
    {
        protected void Application_Start()
        {
            SourceLocator.GetInstance().ScanFolder(HttpContext.Current.Server.MapPath("~\\bin"));
            var sources = MatConfigurationSection.GetSettings().Sources.AsEnumerable<ISourceSettings>();
            SourceContainer.CreateInstanceIfNotExists(sources);

            AreaRegistration.RegisterAllAreas();

            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings.ContractResolver = new SignalRContractResolver(); ;
            var serializer = new JsonNetSerializer(GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings);
            GlobalHost.DependencyResolver.Register(typeof(IJsonSerializer), () => serializer);

            MediaTimer.Start();
        }
    }
}


text:
package gov.nih.nci.cagrid.introduce.test.unit;

import gov.nih.nci.cagrid.introduce.test.TestCaseInfo;
import gov.nih.nci.cagrid.introduce.test.TestCaseInfoLifetimeResource;
import gov.nih.nci.cagrid.introduce.test.TestCaseInfoMain;
import gov.nih.nci.cagrid.introduce.test.steps.AddMetadataStep;
import gov.nih.nci.cagrid.introduce.test.steps.AddServiceContextStep;
import gov.nih.nci.cagrid.introduce.test.steps.AddServicePropertiesStep;
import gov.nih.nci.cagrid.introduce.test.steps.AddSimpleMethodImplStep;
import gov.nih.nci.cagrid.introduce.test.steps.AddSimpleMethodStep;
import gov.nih.nci.cagrid.introduce.test.steps.CreateSkeletonStep;
import gov.nih.nci.cagrid.introduce.test.steps.ModifySimpleMethodStep;
import gov.nih.nci.cagrid.introduce.test.steps.RemoveSimpleMethodImplStep;
import gov.nih.nci.cagrid.introduce.test.steps.RemoveSkeletonStep;
import gov.nih.nci.cagrid.introduce.test.steps.ValidateWSDLStep;
import gov.nih.nci.cagrid.testing.system.haste.Story;

import java.io.File;
import java.util.Vector;

import junit.framework.TestResult;
import junit.framework.TestSuite;
import junit.textui.TestRunner;

import org.apache.log4j.PropertyConfigurator;

public class SyncToolsSmokeTest extends Story {

    private TestCaseInfo tci1;

    private TestCaseInfo tci2;

    public SyncToolsSmokeTest() {
        this.setName("Introduce Codegen System Test");
        PropertyConfigurator.configure("." + File.separator + "conf" + File.separator + "log4j.properties");
    }

    public String getName() {
        return "Introduce Codegen System Test";
    }

    public String getDescription() {
        return "Testing the Introduce code generation tools";
    }

    protected Vector steps() {
        Vector steps = new Vector();

        try {
            steps.add(new CreateSkeletonStep(tci1, true));
            steps.add(new AddServiceContextStep(tci2, true));
            steps.add(new AddMetadataStep(tci1, true));
            steps.add(new AddServicePropertiesStep(tci1, true));
            steps.add(new AddSimpleMethodStep(tci1, "newMethod", false));
            steps.add(new AddSimpleMethodImplStep(tci1, "newMethod", true));
            steps.add(new AddSimpleMethodStep(tci2, "newMethod2", true));
            steps.add(new RemoveSimpleMethodImplStep(tci1, "newMethod", true));
            steps.add(new ModifySimpleMethodStep(tci1, "newMethod", false));
            steps.add(new ModifySimpleMethodStep(tci2, "newMethod2", true));
            steps.add(new ValidateWSDLStep(tci1, false));
        } catch (Exception e) {
            e.printStackTrace();
            fail();
        }
        return steps;
    }

    protected boolean storySetUp() throws Throwable {
        tci1 = new TestCaseInfoMain();
        tci2 = new TestCaseInfoLifetimeResource();

        RemoveSkeletonStep step1 = new RemoveSkeletonStep(tci1);
        try {
            step1.runStep();
        } catch (Throwable e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return true;
    }

    protected void storyTearDown() throws Throwable {
        RemoveSkeletonStep step1 = new RemoveSkeletonStep(tci1);
        try {
            step1.runStep();
        } catch (Throwable e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }

    /**
     * Convenience method for running all the Steps in this Story.
     */
    public static void main(String args[]) {
        TestRunner runner = new TestRunner();
        TestResult result = runner.doRun(new TestSuite(SyncToolsSmokeTest.class));
        System.exit(result.errorCount() + result.failureCount());
    }

}


text:
'use strict';

module.exports = class Printer {
  constructor(config, logger, context) {
    this.config = config;
    this.logger = logger;
    this.context = context;
  }

  startRun() {
    if (!this.config.get('quiet')) {
      this.logger.bold('Running', this.hookScriptName(), 'hooks');
    }
  }

  nothingToRun() {
    this.logger.debug('✓ No applicable', this.hookScriptName(), 'hooks to run');
  }

  hookSkipped(hook) {
    this.logger.warn('Skipping', hook.hookName());
  }

  requiredHookNotSkipped(hook) {
    this.logger.warn('Cannot skip', hook.name, 'since it is required');
  }

  endHook(hook, status, output) {
    let endHookMsg = '';

    if ((!hook.isQuiet() && !this.config.get('quiet')) || status !== 'pass') {
      endHookMsg += this.hookHeader(hook);
    }

    this.printResult(hook, status, output, endHookMsg);
  }

  interruptTriggered() {
    this.logger.newline();
    this.logger.error('Interrupt signal received. Stopping hooks...');
  }

  runInterrupted() {
    this.logger.newline();
    this.logger.warn('⚠  Hook run interrupted by user');
    this.logger.newline();
  }

  runFailed() {
    this.logger.newline();
    this.logger.error('✗ One or more', this.hookScriptName(), 'hooks failed');
    this.logger.newline();
  }

  runWarned() {
    this.logger.newline();
    this.logger.warn('⚠ All', this.hookScriptName(), 'hooks passed, but with warnings');
    this.logger.newline();
  }

  runSucceeded() {
    if (this.config.get('quiet')) { return; }

    this.logger.newline();
    this.logger.success('✓ All', this.hookScriptName(), 'hooks passed');
    this.logger.newline();
  }

  hookScriptName() {
    return this.context.hookScriptName;
  }

  hookHeader(hook) {
    let hookName = '[' + hook.hookName() + ']';
    let hookDescription = hook.description();
    let numDots = Math.max(70 - hookDescription.length - hookName.length, 0);

    return hookDescription + '.'.repeat(numDots) + hookName;
  }

  printResult(hook, status, output, prefix) {
    prefix = prefix || '';

    switch (status) {
      case 'pass':
        if (!this.config.get('quite') && !hook.isQuiet()) {
          this.logger.success(prefix, 'OK');
        }
        return;

      case 'warn':
        this.logger.warn(prefix, 'WARNING');
        return this.printReport(output, 'warnBold');

      case 'fail':
        this.logger.error(prefix, 'FAILED');
        return this.printReport(output, 'errorBold');

      case 'interrrupt':
        this.logger.error(prefix, 'INTERRUPTED');
        return this.printReport(output, 'errorBold');

      default:
        this.logger.error(prefix, '???');
        return this.printReport(
          'Hook returned unknown status ' + status + ' -- ignoring.',
          'errorBold'
        );
    }
  }

  printReport(output, format) {
    if (output) {
      format = format || 'log';
      this.logger[format](output);
    }
  }
};


text:
module Fastlane
  module Actions
    module SharedValues
    end

    class UpdateProjectProvisioningAction < Action
      ROOT_CERTIFICATE_URL = "http://www.apple.com/appleca/AppleIncRootCertificate.cer"
      def self.run(params)
        Helper.log.info "You're updating provisioning profiles directly in your project, but have you considered easier ways to do code signing?"
        Helper.log.info "https://github.com/KrauseFx/fastlane/blob/master/docs/CodeSigning.md"

        # assign folder from parameter or search for xcodeproj file
        folder = params[:xcodeproj] || Dir["*.xcodeproj"].first

        # validate folder
        project_file_path = File.join(folder, "project.pbxproj")
        raise "Could not find path to project config '#{project_file_path}'. Pass the path to your project (not workspace)!".red unless File.exist?(project_file_path)

        # download certificate
        unless File.exist?(params[:certificate])
          Helper.log.info("Downloading root certificate from (#{ROOT_CERTIFICATE_URL}) to path '#{params[:certificate]}'")
          require 'open-uri'
          File.open(params[:certificate], "w") do |file|
            file.write(open(ROOT_CERTIFICATE_URL, "rb").read)
          end
        end

        # parsing mobileprovision file
        Helper.log.info("Parsing mobile provisioning profile from '#{params[:profile]}'")
        profile = File.read(params[:profile])
        p7 = OpenSSL::PKCS7.new(profile)
        store = OpenSSL::X509::Store.new
        raise "Could not find valid certificate at '#{params[:certificate]}'" unless File.size(params[:certificate]) > 0
        cert = OpenSSL::X509::Certificate.new(File.read(params[:certificate]))
        store.add_cert(cert)
        p7.verify([cert], store)
        data = Plist.parse_xml(p7.data)

        target_filter = params[:target_filter] || params[:build_configuration_filter]
        configuration = params[:build_configuration]

        # manipulate project file
        Helper.log.info("Going to update project '#{folder}' with UUID".green)
        require 'xcodeproj'

        project = Xcodeproj::Project.open(folder)
        project.targets.each do |target|
          if !target_filter || target.product_name.match(target_filter) || target.product_type.match(target_filter)
            Helper.log.info "Updating target #{target.product_name}...".green
          else
            Helper.log.info "Skipping target #{target.product_name} as it doesn't match the filter '#{target_filter}'".yellow
            next
          end

          target.build_configuration_list.build_configurations.each do |build_configuration|
            config_name = build_configuration.name
            if !configuration || config_name.match(configuration)
              Helper.log.info "Updating configuration #{config_name}...".green
            else
              Helper.log.info "Skipping configuration #{config_name} as it doesn't match the filter '#{configuration}'".yellow
              next
            end

            build_configuration.build_settings["PROVISIONING_PROFILE"] = data["UUID"]
          end
        end

        project.save

        # complete
        Helper.log.info("Successfully updated project settings in'#{params[:xcodeproj]}'".green)
      end

      def self.description
        "Update projects code signing settings from your profisioning profile"
      end

      def self.details
        [
          "This action retrieves a provisioning profile UUID from a provisioning profile (.mobileprovision) to set",
          "up the xcode projects' code signing settings in *.xcodeproj/project.pbxproj",
          "The `target_filter` value can be used to only update code signing for specified targets",
          "The `build_configuration` value can be used to only update code signing for specified build configurations of the targets passing through the `target_filter`",
          "Example Usage is the WatchKit Extension or WatchKit App, where you need separate provisioning profiles",
          "Example: `update_project_provisioning(xcodeproj: \"..\", target_filter: \".*WatchKit App.*\")"
        ].join("\n")
      end

      def self.available_options
        [
          FastlaneCore::ConfigItem.new(key: :xcodeproj,
                                       env_name: "FL_PROJECT_PROVISIONING_PROJECT_PATH",
                                       description: "Path to your Xcode project",
                                       optional: true,
                                       verify_block: proc do |value|
                                         raise "Path to xcode project is invalid".red unless File.exist?(value)
                                       end),
          FastlaneCore::ConfigItem.new(key: :profile,
                                       env_name: "FL_PROJECT_PROVISIONING_PROFILE_FILE",
                                       description: "Path to provisioning profile (.mobileprovision)",
                                       default_value: Actions.lane_context[SharedValues::SIGH_PROFILE_PATH],
                                       verify_block: proc do |value|
                                         raise "Path to provisioning profile is invalid".red unless File.exist?(value)
                                       end),
          FastlaneCore::ConfigItem.new(key: :target_filter,
                                       env_name: "FL_PROJECT_PROVISIONING_PROFILE_TARGET_FILTER",
                                       description: "A filter for the target name. Use a standard regex",
                                       optional: true),
          FastlaneCore::ConfigItem.new(key: :build_configuration_filter,
                                       env_name: "FL_PROJECT_PROVISIONING_PROFILE_FILTER",
                                       description: "Legacy option, use 'target_filter' instead",
                                       optional: true),
          FastlaneCore::ConfigItem.new(key: :build_configuration,
                                       env_name: "FL_PROJECT_PROVISIONING_PROFILE_BUILD_CONFIGURATION",
                                       description: "A filter for the build configuration name. Use a standard regex. Applied to all configurations if not specified",
                                       optional: true),
          FastlaneCore::ConfigItem.new(key: :certificate,
                                       env_name: "FL_PROJECT_PROVISIONING_CERTIFICATE_PATH",
                                       description: "Path to apple root certificate",
                                       default_value: "/tmp/AppleIncRootCertificate.cer")
        ]
      end

      def self.authors
        ["tobiasstrebitzer", "czechboy0"]
      end

      def self.is_supported?(platform)
        [:ios, :mac].include? platform
      end
    end
  end
end
# rubocop:enable Metrics/AbcSize


text:
titleBreadcrumb: Testa Kod
...
Testsida
==============================================

På denna sidan så kommer vi att testa lite kod framöver.

*Rubrik*

**Rubrik**

[Markdown syntax](https://daringfireball.net/projects/markdown/syntax)

Sidan är producerad utav Peder Tornberg (peder.tornberg@gmail.com).