text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.jenkins-ci.plugins</groupId>
    <artifactId>plugin</artifactId>
    <version>1.570</version><!-- which version of Jenkins is this plugin built against? -->
  </parent>

  <groupId>testrail</groupId>
  <artifactId>testrail</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>hpi</packaging>

  <!-- get every artifact through repo.jenkins-ci.org, which proxies all the artifacts that we need -->
  <repositories>
    <repository>
      <id>repo.jenkins-ci.org</id>
      <url>http://repo.jenkins-ci.org/public/</url>
    </repository>
  </repositories>

  <dependencies>
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient</artifactId>
      <version>4.3.2</version>
    </dependency>
    <dependency>
        <groupId>org.json</groupId>
          <artifactId>json</artifactId>
            <version>20140107</version>
          </dependency>
    <dependency>
      <groupId>org.codehaus.woodstox</groupId>
      <artifactId>woodstox-core-asl</artifactId>
      <version>4.1.4</version>
    </dependency>
      <dependency>
          <groupId>javax.xml.bind</groupId>
          <artifactId>jaxb-api</artifactId>
          <version>2.1</version>
      </dependency>
      <dependency>
          <groupId>org.mockito</groupId>
          <artifactId>mockito-all</artifactId>
          <version>1.8.5</version>
          <scope>test</scope>
      </dependency>
      <dependency>
          <groupId>org.jenkins-ci.main</groupId>
          <artifactId>jenkins-test-harness</artifactId>
          <version>1.509.4</version>
      </dependency>
      <dependency>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>0.7.0.201403182114</version>
      </dependency>
  </dependencies>

  <pluginRepositories>
    <pluginRepository>
      <id>repo.jenkins-ci.org</id>
      <url>http://repo.jenkins-ci.org/public/</url>
    </pluginRepository>
  </pluginRepositories>

  <distributionManagement>
    <site>
      <id>https://github.com/simplymeasured/testrail-jenkins-plugin</id>
      <url>gitsite:git@github.com/jenkinsci/testrail-jenkins-plugin</url>
    </site>
  </distributionManagement>

  <properties>
    <!-- define all plugin versions -->
    <maven.version>3.0.1</maven.version>
    <maven-antrun-plugin.version>1.6</maven-antrun-plugin.version>
    <maven-assembly-plugin.version>2.2</maven-assembly-plugin.version>
    <maven-changelog-plugin.version>2.2</maven-changelog-plugin.version>
    <maven-checkstyle-plugin.version>2.6</maven-checkstyle-plugin.version>
    <maven-clean-plugin.version>2.4.1</maven-clean-plugin.version>
    <maven-compiler-plugin.version>2.3.2</maven-compiler-plugin.version>
    <maven-dependency-plugin.version>2.1</maven-dependency-plugin.version>
    <maven-deploy-plugin.version>2.5</maven-deploy-plugin.version>
    <maven-doap-plugin.version>1.0</maven-doap-plugin.version>
    <maven-eclipse-plugin.version>2.8</maven-eclipse-plugin.version>
    <maven-enforcer-plugin.version>1.0</maven-enforcer-plugin.version>
    <maven-help-plugin.version>2.1.1</maven-help-plugin.version>
    <maven-install-plugin.version>2.3.1</maven-install-plugin.version>
    <maven-javadoc-plugin.version>2.7</maven-javadoc-plugin.version>
    <maven-jar-plugin.version>2.3.1</maven-jar-plugin.version>
    <maven-jetty-plugin.version>6.1.26</maven-jetty-plugin.version>
    <maven-jxr-plugin.version>2.2</maven-jxr-plugin.version>
    <maven-pmd-plugin.version>2.5</maven-pmd-plugin.version>
    <maven-project-info-reports-plugin.version>2.3.1</maven-project-info-reports-plugin.version>
    <maven-plugin-plugin.version>2.4.3</maven-plugin-plugin.version>
    <maven-reactor-plugin.version>1.0</maven-reactor-plugin.version>
    <maven-release-plugin.version>2.1</maven-release-plugin.version>
    <maven-remote-resources-plugin.version>1.1</maven-remote-resources-plugin.version>
    <maven-resources-plugin.version>2.4.3</maven-resources-plugin.version>
    <maven-site-plugin.version>2.1.1</maven-site-plugin.version>
    <maven-source-plugin.version>2.1.2</maven-source-plugin.version>
    <maven-surefire-plugin.version>2.7.2</maven-surefire-plugin.version>
    <maven-surefire-report-plugin.version>2.7.2</maven-surefire-report-plugin.version>
    <maven-war-plugin.version>2.1.1</maven-war-plugin.version>
    <apt-maven-plugin.version>1.0-alpha-4</apt-maven-plugin.version>
    <axistools-maven-plugin.version>1.4</axistools-maven-plugin.version>
    <buildnumber-maven-plugin.version>1.0-beta-4</buildnumber-maven-plugin.version>
    <build-helper-maven-plugin.version>1.5</build-helper-maven-plugin.version>
    <cargo-maven2-plugin.version>1.0.5</cargo-maven2-plugin.version>
    <cobertura-maven-plugin.version>2.4</cobertura-maven-plugin.version>
    <exec-maven-plugin.version>1.2</exec-maven-plugin.version>
    <findbugs-maven-plugin.version>2.3.1</findbugs-maven-plugin.version>
    <gwt-maven-plugin.version>2.1.0-1</gwt-maven-plugin.version>
    <javancss-maven-plugin.version>2.0</javancss-maven-plugin.version>
    <jdepend-maven-plugin.version>2.0-beta-2</jdepend-maven-plugin.version>
    <openjpa-maven-plugin.version>1.2</openjpa-maven-plugin.version>
    <taglist-maven-plugin.version>2.4</taglist-maven-plugin.version>
    <versions-maven-plugin.version>1.2</versions-maven-plugin.version>
    <xml-maven-plugin.version>1.0-beta-3</xml-maven-plugin.version>
    <jacoco.version>0.7.0.201403182114</jacoco.version>
  </properties>

  <build>
    <extensions>
      <extension>
        <groupId>org.apache.maven.scm</groupId>
        <artifactId>maven-scm-provider-gitexe</artifactId>
        <version>1.3</version>
      </extension>
      <extension>
        <groupId>org.apache.maven.scm</groupId>
        <artifactId>maven-scm-manager-plexus</artifactId>
        <version>1.3</version>
      </extension>
      <extension>
        <groupId>org.kathrynhuxtable.maven.wagon</groupId>
        <artifactId>wagon-gitsite</artifactId>
        <version>0.3.1</version>
      </extension>
    </extensions>
    <plugins>
     <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <excludes>
              <exclude>InjectedTest.java</exclude>
            </excludes>
          </configuration>
     </plugin>
     <plugin>
        <artifactId>maven-site-plugin</artifactId>
        <version>${maven-site-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${jacoco.version}</version>
        <executions>
          <execution>
            <id>default-prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>default-prepare-agent-integration</id>
            <goals>
              <goal>prepare-agent-integration</goal>
            </goals>
          </execution>
          <execution>
            <id>default-report</id>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
          <execution>
            <id>default-report-integration</id>
            <goals>
              <goal>report-integration</goal>
            </goals>
          </execution>
          <execution>
            <id>default-check</id>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <rules>
                <rule>
                  <element>BUNDLE</element>
                  <limits>
                    <limit>
                      <counter>COMPLEXITY</counter>
                      <value>COVEREDRATIO</value>
                      <minimum>0.60</minimum>
                    </limit>
                  </limits>
                </rule>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <artifactId>maven-changelog-plugin</artifactId>
        <version>${maven-changelog-plugin.version}</version>
      </plugin>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>${maven-checkstyle-plugin.version}</version>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${maven-javadoc-plugin.version}</version>
      </plugin>
      <plugin>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>${maven-jxr-plugin.version}</version>
      </plugin>
      <plugin>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>${maven-pmd-plugin.version}</version>
      </plugin>
      <plugin>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>${maven-plugin-plugin.version}</version>
      </plugin>
      <plugin>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>${maven-project-info-reports-plugin.version}</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>cim</report>
              <report>distribution-management</report>
              <report>index</report>
              <report>issue-tracking</report>
              <report>license</report>
              <report>mailing-list</report>
              <report>project-team</report>
              <report>scm</report>
              <report>summary</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-report-plugin</artifactId>
          <version>${maven-surefire-report-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>${cobertura-maven-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>${findbugs-maven-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>javancss-maven-plugin</artifactId>
        <version>${javancss-maven-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>jdepend-maven-plugin</artifactId>
        <version>${jdepend-maven-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>taglist-maven-plugin</artifactId>
        <version>${taglist-maven-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${jacoco.version}</version>
      </plugin>
    </plugins>
  </reporting>
</project>


text:
\hypertarget{test_subtracting_8md}{}\section{docs/test\+Subtracting.md File Reference}
\label{test_subtracting_8md}\index{docs/test\+Subtracting.\+md@{docs/test\+Subtracting.\+md}}

redpajama_set_name: RedPajamaGithub


text:
angular.module('umbraco.security.retryQueue', []);
angular.module('umbraco.security.interceptor', ['umbraco.security.retryQueue']);
angular.module('umbraco.security', ['umbraco.security.retryQueue', 'umbraco.security.interceptor']);


text:
package org.workcraft.gui.properties;

import org.workcraft.gui.actions.Action;
import org.workcraft.gui.actions.ActionUtils;
import org.workcraft.gui.controls.FlatTextField;

import javax.swing.*;
import javax.swing.table.TableCellRenderer;
import java.awt.*;
import java.awt.event.MouseEvent;

public class TextActionCellRenderer extends JPanel implements TableCellRenderer {

    private final JTextField text = new FlatTextField();
    private final JButton leftButton = new JButton();
    private final JButton rightButton = new JButton();

    public TextActionCellRenderer() {
        leftButton.setFocusable(false);
        leftButton.setVisible(false);
        leftButton.setMargin(PropertyHelper.BUTTON_INSETS);

        text.setFocusable(true);

        rightButton.setFocusable(false);
        rightButton.setVisible(false);
        rightButton.setMargin(PropertyHelper.BUTTON_INSETS);

        setLayout(new BorderLayout());
        add(leftButton, BorderLayout.WEST);
        add(text, BorderLayout.CENTER);
        add(rightButton, BorderLayout.EAST);
        setFocusable(false);
    }

    @Override
    public Component getTableCellRendererComponent(JTable table, Object value,
            boolean isSelected, boolean hasFocus, int row, int column) {

        if (value instanceof TextAction) {
            TextAction textAction = (TextAction) value;

            Action leftAction = textAction.getLeftAction();
            if (leftAction != null) {
                leftButton.setVisible(true);
                leftButton.setText(leftAction.getTitle());
                leftButton.setToolTipText(ActionUtils.getActionTooltip(leftAction));
            }

            text.setFont(table.getFont());
            text.setText(textAction.getText());

            Color foreground = textAction.getForeground();
            if (foreground != null) {
                text.setForeground(foreground);
            }

            Color background = textAction.getBackground();
            if (background != null) {
                text.setBackground(background);
            }

            Action rightAction = textAction.getRightAction();
            if (rightAction != null) {
                rightButton.setVisible(true);
                rightButton.setText(rightAction.getTitle());
                rightButton.setToolTipText(ActionUtils.getActionTooltip(rightAction));
            }
        }
        return this;
    }

    @Override
    public String getToolTipText(MouseEvent event) {
        if (event != null) {
            int x = event.getX();
            if (leftButton.isVisible() && (x >= leftButton.getX()) && (x < leftButton.getX() + leftButton.getWidth())) {
                return leftButton.getToolTipText(event);
            }
            if (rightButton.isVisible() && (x >= rightButton.getX()) && (x < rightButton.getX() + rightButton.getWidth())) {
                return rightButton.getToolTipText(event);
            }
        }
        return super.getToolTipText(event);
    }

}


text:
/**
 * Mimo communicates with Java/Swift via MimoApp, which loads the front-end into a webview.
 * - Cute is used for eventing.
 * - Beams is used for client-sever communication.
 *
 * @use cute/cute.js
 * @use beams/scripts/beams-cute.js
 * @//use porta/scripts/porta-cute.js
 */

// Expose Mimo at the window level so MimoApp can emit events to it.
var Mimo = window.Mimo = {}

// Track how many commands Mimo has sent to MimoApp.
// This number is used to change the location hash, signaling the webview.
Mimo.commandCount = 0

// Hold commandQueue to be transferred to MimoApp.
Mimo.commandQueue = []

/**
 * Read commandQueue into MimoApp one at a time.
 *
 * @return {String}  String of the form "command/callbackId" for MimoApp.
 */
Mimo.read = function () {
  return Mimo.commandQueue.shift() || ''
}

/**
 * Get information from MimoApp using a command name.
 *
 * @param  {String}   command  Command name that MimoApp listens for.
 * @param  {Function} fn       Callback to be excecuted when MimoApp returns data.
 */
Mimo.get = function (command, fn) {
  var platform = window._platform
  if (platform && platform !== 'web') {
    var commandCount = ++Mimo.commandCount
    var href = location.href.replace(/(#.*)?$/, '#' + commandCount)
    Mimo.commandQueue.push(command + '/' + commandCount)
    if (fn) {
      Cute.once(Mimo, command + commandCount, fn)
    }
    window.location = href
  }
}

/**
 * Listen for events that can be emitted by MimoApp.
 *
 * @param  {String}   type  Type of event to listen for.
 * @param  {Function} fn    Function to be called when the event occurs.
 */
Mimo.on = function (type, fn) {
  Cute.on(Mimo, type, fn)
}

/**
 * Emit an event on the Mimo object.
 *
 * @param  {String} type  Type of event to emit.
 * @param  {Object} data  Event data to send.
 */
Mimo.emit = function (type, data) {
  Cute.emit(type, Mimo, data)
}

// Calculate how much we should zoom in for larger screens.
var mimoArea = Cute.getViewport()
var mimoZoom = Math.round(Math.min(mimoArea[0], mimoArea[1]) / 240) / 2
window._zoom = Math.max(1, Math.min(2.5, mimoZoom))

// Before the app unloads, let the page unload.
Mimo.on('unload', function () {
  Cute.emit('beforeunload', window)
})

// When the app returns from background, mimic window focus.
Mimo.on('resume', function () {
  Cute.emit('focus', window)
})

// When the app goes to background, mimic window blur.
Mimo.on('pause', function () {
  Cute.emit('blur', window)
})

// When we connect to the server, report this app's platform to it.
Beams.on('connect', function () {
  Beams.emit('mimo:platform', window._platform)
})

// When the server has a new url, load it.
Beams.on('mimo:load', function (url) {
  Cute.emit('beforeunload', window)
  window.location = url
})

// When the server has new html, load it.
Beams.on('mimo:html', function (html) {
  Cute.emit('beforeunload', window)
  Beams.log(html.length)
  Cute.persist('x.html', html)
  Mimo.get('html')
})


text:
(function() {
  var lang, message;

  exports.set - (lang = require(setLang.coffee));

  exports.set - error - (message = require(setLang.coffee));

}).call(this);


text:
using Newtonsoft.Json;

namespace Alexa.NET.Management.SkillDevelopment
{
    public class SubscriptionEndpointAuthorization
    {
        public SubscriptionEndpointAuthorization(string arn)
        {
            ARN = arn;
        }

        [JsonProperty("type")] public string Type => "AWS_IAM";

        [JsonProperty("arn")]
        public string ARN { get; set; }
    }
}


text:
local tag = "AFK"

afk = {}
afk.AFKTime = CreateConVar("mp_afktime", "90", { FCVAR_ARCHIVE, FCVAR_REPLICATED, FCVAR_NOTIFY }, "The time it takes for a player to become AFK while inactive.")

local PLAYER = FindMetaTable("Player")
function PLAYER:IsAFK()
	return self.isAFK
end
function PLAYER:AFKTime()
	return self.afkTime
end

if SERVER then
	util.AddNetworkString(tag)

	net.Receive(tag, function(_, ply)
		local is = net.ReadBool()
		ply.isAFK = is
		ply.afkTime = is and CurTime() - afk.AFKTime:GetInt() or nil
		hook.Run("AFK", ply, is)
		net.Start(tag)
			net.WriteUInt(ply:EntIndex(), 8)
			net.WriteBool(is)
		net.Broadcast()
	end)

	hook.Add("AFK", "AFKSound", function(ply, is)
		ply:EmitSound(not is and "replay/cameracontrolmodeentered.wav" or "replay/cameracontrolmodeexited.wav")
	end)
elseif CLIENT then
	afk.Mouse = { x = 0, y = 0 }
	afk.Focus = system.HasFocus()
	afk.Is = false

	hook.Add("RenderScene", tag, function()
		if LocalPlayer() == NULL or not LocalPlayer() then return end
		afk.When = CurTime() + afk.AFKTime:GetInt()
		hook.Remove("RenderScene", tag)
	end)
	local function Input()
		if not afk.When then return end
		afk.When = CurTime() + afk.AFKTime:GetInt()
		if afk.Is then
			net.Start(tag)
				net.WriteBool(false)
			net.SendToServer()
		end
		afk.Is = false
	end
	hook.Add("StartCommand", tag, function(ply, cmd)
		if ply ~= LocalPlayer() or not afk.When then return end
		local mouseMoved = (system.HasFocus() and (afk.Mouse.x ~= gui.MouseX() or afk.Mouse.y ~= gui.MouseY()) or false)
		if  mouseMoved or
			cmd:GetMouseX() ~= 0 or
			cmd:GetMouseY() ~= 0 or
			cmd:GetButtons() ~= 0 or
			(afk.Focus == false and afk.Focus ~= system.HasFocus())
		then
			Input()
		end
		if afk.When < CurTime() and not afk.Is then
			afk.Is = true
			net.Start(tag)
				net.WriteBool(true)
			net.SendToServer()
		end
	end)
	hook.Add("KeyPress", tag, Input)
	hook.Add("KeyRelease", tag, Input)
	hook.Add("PlayerBindPress", tag, Input)
	local function getAFKtime()
		return math.abs(math.max(CurTime() - afk.When, 0))
	end

	net.Receive(tag, function()
		local ply = Entity(net.ReadUInt(8))
		local is = net.ReadBool()
		ply.isAFK = is
		ply.afkTime = is and CurTime() - afk.AFKTime:GetInt() or nil
		hook.Run("AFK", ply, is)
	end)

	surface.CreateFont(tag, {
		font = "Roboto Cn",
		size = 36,
		italic = true,
		weight = 800,
	})
	surface.CreateFont(tag .. "Normal", {
		font = "Roboto Bk",
		size = 48,
		italic = false,
		weight = 800,
	})

	local function plural(num)
		return ((num > 1 or num == 0) and "s" or "")
	end
	local function DrawTranslucentText(txt, x, y, a, col)
		surface.SetTextPos(x + 2, y + 2)
		surface.SetTextColor(Color(0, 0, 0, 127 * (a / 255)))
		surface.DrawText(txt)

		surface.SetTextPos(x, y)
		if col then
			surface.SetTextColor(Color(col.r, col.g, col.b, 190 * (a / 255)))
		else
			surface.SetTextColor(Color(255, 255, 255, 190 * (a / 255)))
		end
		surface.DrawText(txt)
	end
	local a = 0
	afk.Draw = CreateConVar("cl_afk_hud_draw", "1", { FCVAR_ARCHIVE }, "Should we draw the AFK HUD?")
	hook.Add("HUDPaint", tag, function()
		if not afk.Draw:GetBool() then return end
		afk.Focus = system.HasFocus()
		if not afk.Is then a = 0 return end

		a = math.Clamp(a + FrameTime() * 120, 0, 255)

		local AFKTime = getAFKtime()
		--[[
		local h = math.floor(AFKTime / 60 / 60)
		local m = math.floor(AFKTime / 60 - h * 60)
		local s = math.floor(AFKTime - m * 60 - h * 60 * 60)

		local timeString = ""
		if h > 0 then
			timeString = timeString .. h .. " hour" .. plural(h) .. ", "
		end
		if m > 0 then
			timeString = timeString .. m .. " minute" .. plural(m) .. ", "
		end
		timeString = timeString .. s .. " second" .. plural(s)
		]]
		local timeString = string.NiceTime(AFKTime)

		surface.SetFont(tag)
		local txt = "You've been away for"
		local txtW, txtH = surface.GetTextSize(txt)
		surface.SetFont(tag .. "Normal")
		local timeW, timeH = surface.GetTextSize(timeString)
		local wH = txtH + timeH

		surface.SetDrawColor(Color(0, 0, 0, 127 * (a / 255)))
		surface.DrawRect(0, ScrH() * 0.5 * 0.5 - wH * 0.5 - txtH * 0.33, ScrW(), wH + txtH * 0.33 * 2 - 3)

		surface.SetFont(tag)
		DrawTranslucentText(txt, ScrW() / 2 - txtW / 2, ScrH() / 2 / 2 - wH / 2, a * 0.5)

		surface.SetFont(tag .. "Normal")
		DrawTranslucentText(timeString, ScrW() / 2 - timeW / 2, ScrH() / 2 / 2 - wH / 2 + txtH, a, Color(197, 167, 255))
	end)

end


text:
namespace ash {

// View for the Switch Access menu.
class SwitchAccessMenuView : public views::View {
 public:
  SwitchAccessMenuView();
  ~SwitchAccessMenuView() override;

  SwitchAccessMenuView(const SwitchAccessMenuView&) = delete;
  SwitchAccessMenuView& operator=(const SwitchAccessMenuView&) = delete;

  int GetBubbleWidthDip() const;
  void SetActions(std::vector<std::string> actions);

  // views::View:
  void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
  const char* GetClassName() const override;

 private:
  friend class SwitchAccessMenuBubbleControllerTest;
};

}  // namespace ash

#endif  // ASH_SYSTEM_ACCESSIBILITY_SWITCH_ACCESS_SWITCH_ACCESS_MENU_VIEW_H_


text:
$.extend($.fn.datagrid.defaults, {
	autoUpdateDetail: true  // Define if update the row detail content when update a row
});

var detailview = $.extend({}, $.fn.datagrid.defaults.view, {
	render: function(target, container, frozen){
		var state = $.data(target, 'datagrid');
		var opts = state.options;
		if (frozen){
			if (!(opts.rownumbers || (opts.frozenColumns && opts.frozenColumns.length))){
				return;
			}
		}

		var rows = state.data.rows;
		var fields = $(target).datagrid('getColumnFields', frozen);
		var table = [];
		table.push('

');
		for(var i=0; i<rows.length; i++) {
			// get the class and style attributes for this row
			var css = opts.rowStyler ? opts.rowStyler.call(target, i, rows[i]) : '';
			var classValue = '';
			var styleValue = '';
			if (typeof css == 'string'){
				styleValue = css;
			} else if (css){
				classValue = css['class'] || '';
				styleValue = css['style'] || '';
			}

			var cls = 'class="datagrid-row ' + (i % 2 && opts.striped ? 'datagrid-row-alt ' : ' ') + classValue + '"';
			var style = styleValue ? 'style="' + styleValue + '"' : '';
			var rowId = state.rowIdPrefix + '-' + (frozen?1:2) + '-' + i;
			table.push('
');
			table.push(this.renderRow.call(this, target, fields, frozen, i, rows[i]));
			table.push('
');

			table.push('
');
			if (frozen){
				table.push('');
			} else {
				table.push('');
			}

			table.push('
');
			if (frozen){
				table.push(' ');
			} else {
				table.push(opts.detailFormatter.call(target, i, rows[i]));
			}
			table.push('
');

			table.push('	');
			table.push('
');

		}
		table.push('

');

		$(container).html(table.join(''));
	},

	renderRow: function(target, fields, frozen, rowIndex, rowData){
		var opts = $.data(target, 'datagrid').options;

		var cc = [];
		if (frozen && opts.rownumbers){
			var rownumber = rowIndex + 1;
			if (opts.pagination){
				rownumber += (opts.pageNumber-1)*opts.pageSize;
			}
			cc.push('
'+rownumber+'
	');
		}
		for(var i=0; i<fields.length; i++){
			var field = fields[i];
			var col = $(target).datagrid('getColumnOption', field);
			if (col){
				var value = rowData[field];	// the field value
				var css = col.styler ? (col.styler(value, rowData, rowIndex)||'') : '';
				var classValue = '';
				var styleValue = '';
				if (typeof css == 'string'){
					styleValue = css;
				} else if (cc){
					classValue = css['class'] || '';
					styleValue = css['style'] || '';
				}
				var cls = classValue ? 'class="' + classValue + '"' : '';
				var style = col.hidden ? 'style="display:none;' + styleValue + '"' : (styleValue ? 'style="' + styleValue + '"' : '');

				cc.push('');

				if (col.checkbox){
					style = '';
				} else if (col.expander){
					style = "text-align:center;height:16px;";
				} else {
					style = styleValue;
					if (col.align){style += ';text-align:' + col.align + ';'}
					if (!opts.nowrap){
						style += ';white-space:normal;height:auto;';
					} else if (opts.autoRowHeight){
						style += ';height:auto;';
					}
				}

				cc.push('
');

				if (col.checkbox){
					cc.push('<input type="checkbox" name="' + field + '" value="' + (value!=undefined ? value : '') + '">');
				} else if (col.expander) {
					//cc.push('
');
					cc.push('');
					//cc.push('
');
				} else if (col.formatter){
					cc.push(col.formatter(value, rowData, rowIndex));
				} else {
					cc.push(value);
				}

				cc.push('
');
				cc.push('	');
			}
		}
		return cc.join('');
	},

	insertRow: function(target, index, row){
		var opts = $.data(target, 'datagrid').options;
		var dc = $.data(target, 'datagrid').dc;
		var panel = $(target).datagrid('getPanel');
		var view1 = dc.view1;
		var view2 = dc.view2;

		var isAppend = false;
		var rowLength = $(target).datagrid('getRows').length;
		if (rowLength == 0){
			$(target).datagrid('loadData',{total:1,rows:[row]});
			return;
		}

		if (index == undefined || index == null || index >= rowLength) {
			index = rowLength;
			isAppend = true;
			this.canUpdateDetail = false;
		}

		$.fn.datagrid.defaults.view.insertRow.call(this, target, index, row);

		_insert(true);
		_insert(false);

		this.canUpdateDetail = true;

		function _insert(frozen){
			var tr = opts.finder.getTr(target, index, 'body', frozen?1:2);
			if (isAppend){
				var detail = tr.next();
				var newDetail = tr.next().clone();
				tr.insertAfter(detail);
			} else {
				var newDetail = tr.next().next().clone();
			}
			newDetail.insertAfter(tr);
			newDetail.hide();
			if (!frozen){
				newDetail.find('div.datagrid-row-detail').html(opts.detailFormatter.call(target, index, row));
			}
		}
	},

	deleteRow: function(target, index){
		var opts = $.data(target, 'datagrid').options;
		var dc = $.data(target, 'datagrid').dc;
		var tr = opts.finder.getTr(target, index);
		tr.next().remove();
		$.fn.datagrid.defaults.view.deleteRow.call(this, target, index);
		dc.body2.triggerHandler('scroll');
	},

	updateRow: function(target, rowIndex, row){
		var dc = $.data(target, 'datagrid').dc;
		var opts = $.data(target, 'datagrid').options;
		var cls = $(target).datagrid('getExpander', rowIndex).attr('class');
		$.fn.datagrid.defaults.view.updateRow.call(this, target, rowIndex, row);
		$(target).datagrid('getExpander', rowIndex).attr('class',cls);

		// update the detail content
		if (opts.autoUpdateDetail && this.canUpdateDetail){
			var row = $(target).datagrid('getRows')[rowIndex];
			var detail = $(target).datagrid('getRowDetail', rowIndex);
			detail.html(opts.detailFormatter.call(target, rowIndex, row));
		}
	},

	bindEvents: function(target){
		var state = $.data(target, 'datagrid');

		if (state.ss.bindDetailEvents){return;}
		state.ss.bindDetailEvents = true;

		var dc = state.dc;
		var opts = state.options;
		var body = dc.body1.add(dc.body2);
		var clickHandler = ($.data(body[0],'events')||$._data(body[0],'events')).click[0].handler;
		body.unbind('click').bind('click', function(e){
			var tt = $(e.target);
			var tr = tt.closest('tr.datagrid-row');
			if (!tr.length){return}
			if (tt.hasClass('datagrid-row-expander')){
				var rowIndex = parseInt(tr.attr('datagrid-row-index'));
				if (tt.hasClass('datagrid-row-expand')){
					$(target).datagrid('expandRow', rowIndex);
				} else {
					$(target).datagrid('collapseRow', rowIndex);
				}
				$(target).datagrid('fixRowHeight');

			} else {
				clickHandler(e);
			}
			e.stopPropagation();
		});
	},

	onBeforeRender: function(target){
		var state = $.data(target, 'datagrid');
		var opts = state.options;
		var dc = state.dc;
		var t = $(target);
		var hasExpander = false;
		var fields = t.datagrid('getColumnFields',true).concat(t.datagrid('getColumnFields'));
		for(var i=0; i<fields.length; i++){
			var col = t.datagrid('getColumnOption', fields[i]);
			if (col.expander){
				hasExpander = true;
				break;
			}
		}
		if (!hasExpander){
			if (opts.frozenColumns && opts.frozenColumns.length){
				opts.frozenColumns[0].splice(0,0,{field:'_expander',expander:true,width:24,resizable:false,fixed:true});
			} else {
				opts.frozenColumns = [[{field:'_expander',expander:true,width:24,resizable:false,fixed:true}]];
			}

			var t = dc.view1.children('div.datagrid-header').find('table');
			var td = $('

	');
			if ($('tr',t).length == 0){
				td.wrap('

').parent().appendTo($('tbody',t));
			} else if (opts.rownumbers){
				td.insertAfter(t.find('td:has(div.datagrid-header-rownumber)'));
			} else {
				td.prependTo(t.find('tr:first'));
			}
		}

		// if (!state.bindDetailEvents){
		// 	state.bindDetailEvents = true;
		// 	var that = this;
		// 	setTimeout(function(){
		// 		that.bindEvents(target);
		// 	},0);
		// }
	},

	onAfterRender: function(target){
		var that = this;
		var state = $.data(target, 'datagrid');
		var dc = state.dc;
		var opts = state.options;
		var panel = $(target).datagrid('getPanel');

		$.fn.datagrid.defaults.view.onAfterRender.call(this, target);

		if (!state.onResizeColumn){
			state.onResizeColumn = opts.onResizeColumn;
			opts.onResizeColumn = function(field, width){
				if (!opts.fitColumns){
					resizeDetails();
				}
				var rowCount = $(target).datagrid('getRows').length;
				for(var i=0; i<rowCount; i++){
					$(target).datagrid('fixDetailRowHeight', i);
				}

				// call the old event code
				state.onResizeColumn.call(target, field, width);
			};
		}
		if (!state.onResize){
			state.onResize = opts.onResize;
			opts.onResize = function(width, height){
				if (opts.fitColumns){
					resizeDetails();
				}
				state.onResize.call(panel, width, height);
			};
		}

		// function resizeDetails(){
		// 	var details = dc.body2.find('>table.datagrid-btable>tbody>tr>td>div.datagrid-row-detail:visible');
		// 	if (details.length){
		// 		var ww = 0;
		// 		dc.header2.find('.datagrid-header-check:visible,.datagrid-cell:visible').each(function(){
		// 			ww += $(this).outerWidth(true) + 1;
		// 		});
		// 		if (ww != details.outerWidth(true)){
		// 			details._outerWidth(ww);
		// 			details.find('.easyui-fluid').trigger('_resize');
		// 		}
		// 	}
		// }
		function resizeDetails(){
			var details = dc.body2.find('>table.datagrid-btable>tbody>tr>td>div.datagrid-row-detail:visible');
			if (details.length){
				var ww = 0;
				// dc.header2.find('.datagrid-header-check:visible,.datagrid-cell:visible').each(function(){
				// 	ww += $(this).outerWidth(true) + 1;
				// });
				dc.body2.find('>table.datagrid-btable>tbody>tr:visible:first').find('.datagrid-cell-check:visible,.datagrid-cell:visible').each(function(){
					ww += $(this).outerWidth(true) + 1;
				});
				if (ww != details.outerWidth(true)){
					details._outerWidth(ww);
					details.find('.easyui-fluid').trigger('_resize');
				}
			}
		}

		this.canUpdateDetail = true;	// define if to update the detail content when 'updateRow' method is called;

		var footer = dc.footer1.add(dc.footer2);
		footer.find('span.datagrid-row-expander').css('visibility', 'hidden');
		$(target).datagrid('resize');

		this.bindEvents(target);
		var detail = dc.body1.add(dc.body2).find('div.datagrid-row-detail');
		detail.unbind().bind('mouseover mouseout click dblclick contextmenu scroll', function(e){
			e.stopPropagation();
		});
	}
});

$.extend($.fn.datagrid.methods, {
	fixDetailRowHeight: function(jq, index){
		return jq.each(function(){
			var opts = $.data(this, 'datagrid').options;
			if (!(opts.rownumbers || (opts.frozenColumns && opts.frozenColumns.length))){
				return;
			}
			var dc = $.data(this, 'datagrid').dc;
			var tr1 = opts.finder.getTr(this, index, 'body', 1).next();
			var tr2 = opts.finder.getTr(this, index, 'body', 2).next();
			// fix the detail row height
			if (tr2.is(':visible')){
				tr1.css('height', '');
				tr2.css('height', '');
				var height = Math.max(tr1.height(), tr2.height());
				tr1.css('height', height);
				tr2.css('height', height);
			}
			dc.body2.triggerHandler('scroll');
		});
	},
	getExpander: function(jq, index){	// get row expander object
		var opts = $.data(jq[0], 'datagrid').options;
		return opts.finder.getTr(jq[0], index).find('span.datagrid-row-expander');
	},
	// get row detail container
	getRowDetail: function(jq, index){
		var opts = $.data(jq[0], 'datagrid').options;
		var tr = opts.finder.getTr(jq[0], index, 'body', 2);
		// return tr.next().find('div.datagrid-row-detail');
		return tr.next().find('>td>div.datagrid-row-detail');
	},
	expandRow: function(jq, index){
		return jq.each(function(){
			var opts = $(this).datagrid('options');
			var dc = $.data(this, 'datagrid').dc;
			var expander = $(this).datagrid('getExpander', index);
			if (expander.hasClass('datagrid-row-expand')){
				expander.removeClass('datagrid-row-expand').addClass('datagrid-row-collapse');
				var tr1 = opts.finder.getTr(this, index, 'body', 1).next();
				var tr2 = opts.finder.getTr(this, index, 'body', 2).next();
				tr1.show();
				tr2.show();
				$(this).datagrid('fixDetailRowHeight', index);
				if (opts.onExpandRow){
					var row = $(this).datagrid('getRows')[index];
					opts.onExpandRow.call(this, index, row);
				}
			}
		});
	},
	collapseRow: function(jq, index){
		return jq.each(function(){
			var opts = $(this).datagrid('options');
			var dc = $.data(this, 'datagrid').dc;
			var expander = $(this).datagrid('getExpander', index);
			if (expander.hasClass('datagrid-row-collapse')){
				expander.removeClass('datagrid-row-collapse').addClass('datagrid-row-expand');
				var tr1 = opts.finder.getTr(this, index, 'body', 1).next();
				var tr2 = opts.finder.getTr(this, index, 'body', 2).next();
				tr1.hide();
				tr2.hide();
				dc.body2.triggerHandler('scroll');
				if (opts.onCollapseRow){
					var row = $(this).datagrid('getRows')[index];
					opts.onCollapseRow.call(this, index, row);
				}
			}
		});
	}
});

$.extend($.fn.datagrid.methods, {
	subgrid: function(jq, conf){
		return jq.each(function(){
			createGrid(this, conf);

			function createGrid(target, conf, prow){
				var queryParams = $.extend({}, conf.options.queryParams||{});
				// queryParams[conf.options.foreignField] = prow ? prow[conf.options.foreignField] : undefined;
				if (prow){
					var fk = conf.options.foreignField;
					if ($.isFunction(fk)){
						$.extend(queryParams, fk.call(conf, prow));
					} else {
						queryParams[fk] = prow[fk];
					}
				}

				var plugin = conf.options.edatagrid ? 'edatagrid' : 'datagrid';

				$(target)[plugin]($.extend({}, conf.options, {
					subgrid: conf.subgrid,
					view: (conf.subgrid ? detailview : undefined),
					queryParams: queryParams,
					detailFormatter: function(index, row){
						return '

';
					},
					onExpandRow: function(index, row){
						var opts = $(this).datagrid('options');
						var rd = $(this).datagrid('getRowDetail', index);
						var dg = getSubGrid(rd);
						if (!dg.data('datagrid')){
							createGrid(dg[0], opts.subgrid, row);
						}
						rd.find('.easyui-fluid').trigger('_resize');
						setHeight(this, index);
						if (conf.options.onExpandRow){
							conf.options.onExpandRow.call(this, index, row);
						}
					},
					onCollapseRow: function(index, row){
						setHeight(this, index);
						if (conf.options.onCollapseRow){
							conf.options.onCollapseRow.call(this, index, row);
						}
					},
					onResize: function(){
						var dg = $(this).children('div.datagrid-view').children('table')
						setParentHeight(this);
					},
					onResizeColumn: function(field, width){
						setParentHeight(this);
						if (conf.options.onResizeColumn){
							conf.options.onResizeColumn.call(this, field, width);
						}
					},
					onLoadSuccess: function(data){
						setParentHeight(this);
						if (conf.options.onLoadSuccess){
							conf.options.onLoadSuccess.call(this, data);
						}
					}
				}));
			}
			function getSubGrid(rowDetail){
				var div = $(rowDetail).children('div');
				if (div.children('div.datagrid').length){
					return div.find('>div.datagrid>div.panel-body>div.datagrid-view>table.datagrid-subgrid');
				} else {
					return div.find('>table.datagrid-subgrid');
				}
			}
			function setParentHeight(target){
				var tr = $(target).closest('div.datagrid-row-detail').closest('tr').prev();
				if (tr.length){
					var index = parseInt(tr.attr('datagrid-row-index'));
					var dg = tr.closest('div.datagrid-view').children('table');
					setHeight(dg[0], index);
				}
			}
			function setHeight(target, index){
				$(target).datagrid('fixDetailRowHeight', index);
				$(target).datagrid('fixRowHeight', index);
				var tr = $(target).closest('div.datagrid-row-detail').closest('tr').prev();
				if (tr.length){
					var index = parseInt(tr.attr('datagrid-row-index'));
					var dg = tr.closest('div.datagrid-view').children('table');
					setHeight(dg[0], index);
				}
			}
		});
	},
	getSelfGrid: function(jq){
		var grid = jq.closest('.datagrid');
		if (grid.length){
			return grid.find('>.datagrid-wrap>.datagrid-view>.datagrid-f');
		} else {
			return null;
		}
	},
	getParentGrid: function(jq){
		var detail = jq.closest('div.datagrid-row-detail');
		if (detail.length){
			return detail.closest('.datagrid-view').children('.datagrid-f');
		} else {
			return null;
		}
	},
	getParentRowIndex: function(jq){
		var detail = jq.closest('div.datagrid-row-detail');
		if (detail.length){
			var tr = detail.closest('tr').prev();
			return parseInt(tr.attr('datagrid-row-index'));
		} else {
			return -1;
		}
	}
});


text:
export * from './Actor';
export * from './AnswersQuestions';
export * from './CanHaveAbilities';
export * from './CollectsArtifacts';
export * from './PerformsActivities';
export * from './UsesAbilities';


text:
namespace {

const std::string kSpritePath("TextBox");
const units::Game kSourceWhiteY = 7 * units::kHalfTile;
const units::Game kSourceRedY = 8 * units::kHalfTile;

const units::Game kPlusSourceX = 4 * units::kHalfTile;
const units::Game kMinusSourceX = 5 * units::kHalfTile;
const units::Game kOpSourceY = 6 * units::kHalfTile;

const units::Game kSourceWidth = units::kHalfTile;
const units::Game kSourceHeight = units::kHalfTile;

const int kRadix = 10;

}

NumberSprite::NumberSprite(
      Graphics& graphics, int number, int num_digits, ColorType color, OperatorType op) :
   padding_(0.0f)
{
   assert(number >= 0);

   units::Game source_y = color == RED ? kSourceRedY : kSourceWhiteY;
   int digit_count = 0;
   do {
      const int digit = number % kRadix;
      reversed_glyphs_.push_back(boost::shared_ptr<Sprite>(new Sprite(
         graphics, kSpritePath,
         units::gameToPixel(digit*units::kHalfTile), units::gameToPixel(source_y),
         units::gameToPixel(kSourceWidth), units::gameToPixel(kSourceHeight))));
      number /= kRadix;
      ++digit_count;
   } while (number != 0);
   // if num_digits is 0, no shifting
   // if num_digits is digit_count, no shifting
   assert(num_digits == 0 || num_digits >= digit_count);
   padding_ = num_digits == 0 ? 0.0f : units::kHalfTile * (num_digits - digit_count);
   switch (op) {
      case PLUS:
         reversed_glyphs_.push_back(boost::shared_ptr<Sprite>(new Sprite(
            graphics, kSpritePath,
            units::gameToPixel(kPlusSourceX), units::gameToPixel(kOpSourceY),
            units::gameToPixel(kSourceWidth), units::gameToPixel(kSourceHeight))));
         break;
      case MINUS:
         reversed_glyphs_.push_back(boost::shared_ptr<Sprite>(new Sprite(
            graphics, kSpritePath,
            units::gameToPixel(kMinusSourceX), units::gameToPixel(kOpSourceY),
            units::gameToPixel(kSourceWidth), units::gameToPixel(kSourceHeight))));
         break;
      case NONE:
         break;
   }
}

void NumberSprite::draw(Graphics& graphics, units::Game x, units::Game y) {
   for (size_t i = 0; i < reversed_glyphs_.size(); ++i) {
      // when i == reversed_glyphs_.size() - 1, offset = 0
      // when 0 == reversed_glyphs_.size() - 1 - i, offset = 0
      const units::Game offset = units::kHalfTile * (reversed_glyphs_.size() - 1 - i);
      reversed_glyphs_[i]->draw(graphics, x + offset + padding_, y);
   }
}


text:
<?php

// AviJobBundle:Default:index.html.twig
return array (
);


text:
<?php

namespace eXistenZNL\PermCheck\Message;

use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use PHPUnit\Framework\TestCase;

class BagTest extends TestCase
{
    use MockeryPHPUnitIntegration;

    /**
     * @var Bag
     */
    protected $bag;

    /**
     * PHPUnit setup
     */
    public function setUp(): void
    {
        $this->bag = new Bag();
    }

    /**
     * PHPUnit teardown
     */
    public function tearDown(): void
    {
        unset($this->bag);
    }

    public function testIfWeCanSeeIfWeHaveAMessage()
    {
        $this->assertEquals(false, $this->bag->hasMessages());
        $this->bag->addMessage('message 1', 'error');
        $this->assertEquals(true, $this->bag->hasMessages());
    }

    public function testIfWeCanRetrieveTheMessageWeSetBefore()
    {
        $this->bag->addMessage('foo', 'bar');
        $this->assertEquals(
            $this->bag->getMessages('bar'),
            array(
                'foo',
            )
        );
    }

    public function testIfWeGetAnEmptyArrayWhenRetrievingABogusMessageType()
    {
        $this->bag->addMessage('foo', 'bar');
        $messages = $this->bag->getMessages('baz');
        $this->assertEquals(array(), $messages);
    }

    public function testIfWeHaveMessages()
    {
        $this->assertFalse($this->bag->hasMessages());
        $this->bag->addMessage('foo', 'bar');
        $this->assertTrue($this->bag->hasMessages());
        $this->bag->getMessages('bar');
        $this->assertTrue($this->bag->hasMessages());
    }

    /**
     * @dataProvider crappyAddMessageArgumentsProvider
     */
    public function testIfStoringCrapWorks($message, $type)
    {
        $this->expectException(\InvalidArgumentException::class);

        $this->bag->addMessage($message, $type);
    }

    public function crappyAddMessageArgumentsProvider()
    {
        return array(
            array(null, null),
            array('message', ''),
            array('', 'warning'),
            array(array(), 'error'),
            array('test', array()),
        );
    }
}


text:
/* @flow */
/* eslint-disable no-console */
/* eslint-disable import/global-require */
/* eslint-disable import/prefer-default-export */
/* eslint-disable no-underscore-dangle */

// This resolves the correct configuration source based on the execution
// environment.  For node we use the standard config file, however, for browsers
// we need to access the configuration object that would have been bound to
// the "window" by our "reactApplication" middleware.
let configCache;
function resolveConfigForExecutionEnv() {
  if (configCache) {
    return configCache;
  }

  // NOTE: By using the "process.env.IS_NODE" flag here this block of code
  // will be removed when "process.env.IS_NODE === true".
  // If no "IS_NODE" env var is undefined we can assume that we are running outside
  // of a webpack run, and will therefore return the config file.
  if (typeof process.env.IS_NODE === 'undefined' || process.env.IS_NODE) {
    // i.e. running in our server/node process.
    configCache = require('../../../config').default;
    return configCache;
  }

  // To get here we are likely running in the browser.

  if (typeof window !== 'undefined'
    && typeof window.__CLIENT_CONFIG__ === 'object') {
    configCache = window.__CLIENT_CONFIG__;
  } else {
    // To get here we must be running in the browser.
    console.warn('No client configuration object was bound to the window.');
    configCache = {};
  }

  return configCache;
}

/**
 * This function wraps up the boilerplate needed to access the correct
 * configuration depending on whether your code will get executed in the
 * browser/node.
 *
 * i.e.
 *  - For the browser the config values are available at window.__CLIENT_CONFIG__
 *  - For a node process they are within the "./config" root project folder.
 *
 * To request a configuration value you must provide the repective path. For
 * example, f you had the following configuration structure:
 *   {
 *     foo: {
 *       bar: [1, 2, 3]
 *     },
 *     bob: 'bob'
 *   }
 *
 * You could use this function to access "bar" like so:
 *   import { safeConfigGet } from '../config';
 *   const value = safeConfigGet(['foo', 'bar']);
 *
 * And you could access "bob" like so:
 *   import { safeConfigGet } from '../config';
 *   const value = safeConfigGet(['bob']);
 *
 * If any part of the path isn't available as a configuration key/value then
 * an error will be thrown indicating that a respective configuration value
 * could not be found at the given path.
 */
export function safeConfigGet(path : Array<string>) : any {
  if (path.length === 0) {
    throw new Error('You must provide the path to the configuration value you would like to consume.');
  }
  let result = resolveConfigForExecutionEnv();
  for (let i = 0; i < path.length; i += 1) {
    if (result === undefined) {
      const errorMessage = `Failed to resolve configuration value at "${path.join('.')}".`;
      // This "if" block gets stripped away by webpack for production builds.
      if (process.env.NODE_ENV === 'development' && process.env.IS_CLIENT) {
        throw new Error(`${errorMessage} We have noticed that you are trying to access this configuration value from the client bundle (i.e. browser) though.  For configuration values to be exposed to the client bundle you must ensure that the path is added to the client configuration filter file, which is located at "config/clientConfigFilter.js".`);
      }
      throw new Error(errorMessage);
    }
    result = result[path[i]];
  }
  return result;
}


text:
package jp.ac.titech.cs.se.fwit.webapp.fwmodels.struts.actions;

import java.util.List;

import jp.ac.titech.cs.se.fwit.core.model.fw.FrameworkTemplate;
import jp.ac.titech.cs.se.fwit.core.model.req.RAction;
import jp.ac.titech.cs.se.fwit.core.model.req.RTransitionWrapper;
import jp.ac.titech.cs.se.fwit.core.model.req.action.VariableAction;
import jp.ac.titech.cs.se.fwit.webapp.fwmodels.WebApp;
import jp.ac.titech.cs.se.fwit.webapp.fwmodels.actions.WebAppInnerAction;
import jp.ac.titech.cs.se.fwit.webapp.fwmodels.struts.StrutsTemplate;
import jp.ac.titech.cs.se.fwit.webapp.fwmodels.struts.elements.ActionElement;
import jp.ac.titech.cs.se.fwit.webapp.fwmodels.struts.elements.ActionExecute;
import jp.ac.titech.cs.se.fwit.webapp.fwmodels.struts.elements.ActionForm;

public class ExecuteAction extends WebAppInnerAction {

    public ExecuteAction() {
        this.label = "execute";
    }

    @Override
    public FrameworkTemplate applyCustomizeOperation(FrameworkTemplate fw,
            RTransitionWrapper reqTransition) {
        final StrutsTemplate struts = (StrutsTemplate) fw;
        final String request = reqTransition
        .getSingletonDomainVariableValue(WebApp.REQUEST_DOMAIN_VARIABLE);
        final ActionElement actionElement = struts.getActionElement(request);
        final ActionExecute actionClass = struts
        .getActionExecute((String) actionElement.get("type"));
        actionClass.addRTransition(ActionExecute.EXECUTE_METHOD,
                reqTransition.getTransition());

        final ActionForm form = struts.getActionForm(actionElement.getName());
        final List<RAction> actions = reqTransition.getTransition().getRAction()
        .getActions();
        for (final RAction action : actions) {
            VariableAction var;
            if (action instanceof VariableAction) {
                var = (VariableAction) action;
                if (form.hasField(var.getLabel())) {
                    actionClass.addFormVariable(var.getLabel(), var.getType());
                }
            }
        }
        struts.setActionExecute(actionClass);
        return struts;
    }
}


text:
<?php

namespace djs\expr;

/**
 * Expression représentant un contenu de méthode de classe
 * @author hakurou
 * @version 1.0.0
 */
class DjsClassMethodContent extends Exp
{
    protected $content;
    protected $className;

	/**
	 * Constructeur
	 * @param String $className					Nom de la classe
	 * @param Array<Token>						Liste de token représentant le contenu
	 */
    public function __construct($className = null, $value = null)
    {
    	parent::__construct(\djs\analysis\Lexer::TT_METHOD_CONTENT);
        $this->content = $value;
        $this->className= $className;
    }

	/**
	 * @see Exp::interpret
	 */
    public function interpret($parser)
    {
    	$str = '';

		if($this->content != null && count($this->content) > 0)
		{
			foreach($this->content as $c)
				$str .= $c->interpret($parser);
		}

		return $str;
    }

	/**
	 * @see Exp::parse
	 */
	public function parse($parser)
	{
		$exprs = array();

		for( ; ; )
		{
			$e = $parser->parseExpr();

			if($e->getType() == \djs\analysis\Lexer::TT_WORD_SUPER)
			{
				$s = new DjsSuper($this->className);
				$e = $s->parse($parser);
			}

			if($e != null && $e->getType() != \djs\analysis\Lexer::TT_RIGHT_BRACE)
				$exprs[] = $e;

			if($e == null || $e->getType() == \djs\analysis\Lexer::TT_RIGHT_BRACE)
				break;
		}

		return new self($this->className, $exprs);
	}
}

?>


text:
SELECT *
FROM sys.tables WHERE name = ?;


text:
/**
 * Stupid test class that resides in the default package
 *
 * This is to assist in testing ClassUtil
 */
public class DefaultPackageTestClass
{

}


text:
title: Angles PI Over 4
---
## Angles PI Over 4

This is a stub. Help our community expand it.

This quick style guide will help ensure your pull request gets accepted.

#### More Information:


text:
bundled_commands=(rackup rake shotgun rails)

_bundler-installed() {
  which bundle > /dev/null 2>&1
}

_within-bundled-project() {
  local check_dir=$PWD
  while [ $check_dir != "/" ]; do
    [ -f "$check_dir/Gemfile" ] && return
    check_dir="$(dirname $check_dir)"
  done
  false
}

_run-with-bundler() {
  if _bundler-installed && _within-bundled-project; then
    bundle exec $@
  else
    $@
  fi
}

for cmd in $bundled_commands; do
  eval "function bundled_$cmd () { _run-with-bundler $cmd \$@}"
  alias $cmd=bundled_$cmd

  if which _$cmd > /dev/null 2>&1; then
        compdef _$cmd bundled_$cmd=$cmd
  fi
done


text:
"""
Script that trains multitask models on Delaney dataset.
"""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals

import os
import shutil
import numpy as np
import deepchem as dc
from delaney_datasets import load_delaney

# Only for debug!
np.random.seed(123)

# Load Delaney dataset
n_features = 1024
delaney_tasks, delaney_datasets, transformers = load_delaney()
train_dataset, valid_dataset, test_dataset = delaney_datasets

# Fit models
metric = dc.metrics.Metric(dc.metrics.pearson_r2_score, np.mean)

model = dc.models.TensorflowMultiTaskRegressor(
    len(delaney_tasks), n_features, layer_sizes=[1000], dropouts=[.25],
    learning_rate=0.001, batch_size=50, verbosity="high")

# Fit trained model
model.fit(train_dataset)
model.save()

print("Evaluating model")
train_scores = model.evaluate(train_dataset, [metric], transformers)
valid_scores = model.evaluate(valid_dataset, [metric], transformers)

print("Train scores")
print(train_scores)

print("Validation scores")
print(valid_scores)


text:
<?php

use yii\db\Schema;
use yii\db\Migration;

class m130524_201442_init extends Migration {

	public function up(){

		$tableOptions = null;
		if ($this->db->driverName === 'mysql') {
			// http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
			$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
		}

		$this->createTable('{{%user}}', [
			'id'					=> Schema::TYPE_PK,
			'username'				=> Schema::TYPE_STRING	. '(250) COLLATE utf8_unicode_ci NOT NULL',
			'auth_key'				=> Schema::TYPE_STRING	. '(32)	COLLATE utf8_unicode_ci NOT NULL',
			'password_hash'			=> Schema::TYPE_STRING	. '(255) COLLATE utf8_unicode_ci NOT NULL',
			'password_reset_token'	=> Schema::TYPE_STRING	. '(255) COLLATE utf8_unicode_ci DEFAULT NULL',
			'email'					=> Schema::TYPE_STRING	. '(50)	COLLATE utf8_unicode_ci NOT NULL',
			'status'				=> Schema::TYPE_SMALLINT. '(6) NOT NULL DEFAULT 10',
			'created_at'			=> Schema::TYPE_INTEGER	. ' NOT NULL',
			'updated_at'			=> Schema::TYPE_INTEGER	. ' NOT NULL',
			'first_name'			=> Schema::TYPE_STRING	. '(50) COLLATE utf8_unicode_ci NOT NULL',
			'last_name'				=> Schema::TYPE_STRING	. '(50) COLLATE utf8_unicode_ci NOT NULL',
		], $tableOptions);
	}

	public function down(){
		$this->dropTable('{{%user}}');
	}
}


text:
require "spec_helper"

RSpec.describe FakeFS::Magick::RealImage do

  let(:local_file) { file = File.join( File.dirname(__FILE__), "support", "image.png" ) }

  describe "::fake?" do
    it do
      expect( described_class ).not_to be_fake
    end
  end

  describe "#faked?" do
    it do
      expect( described_class.new(100,100) ).not_to be_faked
      expect(
        described_class.read(local_file).respond_to?(:faked) &&
        described_class.read(local_file).faked?
      ).to be false
    end
  end

end


text:
require File.dirname(__FILE__) + "/spec_helper"
require "tempfile"

describe Konjac::Config do
  before :all do
    @config_path = File.expand_path("~/.konjac/config.yml")
    @backup_path = File.expand_path("~/.konjac/config.yml.bak")
    FileUtils.mv @config_path, @backup_path if File.exists?(@config_path)
    @env_language = ENV["LANG"]
  end

  # Restore the original configuration file
  after :all do
    FileUtils.mv @backup_path, @config_path if File.exists?(@backup_path)
    ENV["LANG"] = @env_language || ""
  end

  describe "when the configuration file is blank" do
    # Create a new configuration file before each test
    before :each do
      File.open(@config_path, "w") do |file|
        file.puts "--- {}"
      end
    end

    it "should default to English when no system language is found" do
      ENV["LANG"] = ""
      Konjac::Config.load
      Konjac::Config.language.should == :en
    end

    it "should default to English when specified" do
      ENV["LANG"] = "en"
      Konjac::Config.load
      Konjac::Config.language.should == :en
    end

    it "should default to a foreign language when specified" do
      ENV["LANG"] = "ja"
      Konjac::Config.load
      Konjac::Config.language.should == :ja
    end

    it "should default to dict as the default dictionary" do
      Konjac::Config.dictionary.should == "dict"
    end

    it "should list the available dictionaries, including dict as default" do
      Konjac::Config.list.should include "*** dict"
    end
  end
end


text:
#ifndef OBUDEC_H_
#define OBUDEC_H_

#include "./tools_common.h"

#ifdef __cplusplus
extern "C" {
#endif

// Assign this value to last_layer_id when the application wants full
// temporal units regardless of the presence of enhancement layers.
#define IGNORE_ENHANCEMENT_LAYERS 8

struct ObuDecInputContext {
  struct AvxInputContext *avx_ctx;
  uint8_t *buffer;
  size_t buffer_capacity;
  size_t bytes_buffered;
  int is_annexb;
  int last_layer_id;
};

// Returns 1 when file data starts (if Annex B stream, after reading the
// size of the OBU) with what appears to be a Temporal Delimiter
// OBU as defined by Section 5 of the AV1 bitstream specification.
int file_is_obu(struct ObuDecInputContext *obu_ctx);

// Reads one Temporal Unit from the input file. Returns 0 when a TU is
// successfully read, 1 when end of file is reached, and less than 0 when an
// error occurs. Stores TU data in 'buffer'. Reallocs buffer to match TU size,
// returns buffer capacity via 'buffer_size', and returns size of buffered data
// via 'bytes_read'.
int obudec_read_temporal_unit(struct ObuDecInputContext *obu_ctx,
                              uint8_t **buffer, size_t *bytes_read,
                              size_t *buffer_size);

void obudec_free(struct ObuDecInputContext *obu_ctx);

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif  // OBUDEC_H_


text:
using System;
using System.Collections.Generic;
using System.Diagnostics;
using ProtoSharp.Performance.Messages;

namespace ProtoSharp.Performance.Benchmarks
{
    class StringSerializationBenchmark : SerializationBenchmarkBase<MessageWithString>
    {
        public StringSerializationBenchmark(int count, int seed, int iterations)
            : base(count, seed, iterations)
        { }

        protected override string Name { get { return "String Serialization"; } }

        protected override void Serialize(IBenchmarkAdapter target, MessageWithString value)
        {
            target.Serialize(value);
        }

        protected override MessageWithString Generate(Random rand)
        {
            return new MessageWithString() { Value = new string('*', rand.Next(0, 1 << 6)) };
        }
    }
}


text:
namespace swift {
struct SupplementaryOutputPaths {
  /// The path to which we should emit an Objective-C header for the module.
  ///
  /// Currently only makes sense when the compiler has whole module knowledge.
  /// The modes for which it makes sense incuide both WMO and the "merge
  /// modules" job that happens after the normal compilation jobs. That's where
  /// the header is emitted in single-file mode, since it needs whole-module
  /// information.
  ///
  /// \sa swift::printAsObjC
  std::string ObjCHeaderOutputPath;

  /// The path to which we should emit a serialized module.
  /// It is valid whenever there are any inputs.
  ///
  /// This binary format is used to describe the interface of a module when
  /// imported by client source code. The swiftmodule format is described in
  /// docs/Serialization.rst.
  ///
  /// \sa swift::serialize
  std::string ModuleOutputPath;

  /// The path to which we should emit a module source information file.
  /// It is valid whenever there are any inputs.
  ///
  /// This binary format stores source locations and other information about the
  /// declarations in a module.
  ///
  /// \sa swift::serialize
  std::string ModuleSourceInfoOutputPath;

  /// The path to which we should emit a module documentation file.
  /// It is valid whenever there are any inputs.
  ///
  /// This binary format stores doc comments and other information about the
  /// declarations in a module.
  ///
  /// \sa swift::serialize
  std::string ModuleDocOutputPath;

  /// The path to which we should output a Make-style dependencies file.
  /// It is valid whenever there are any inputs.
  ///
  /// Swift's compilation model means that Make-style dependencies aren't
  /// well-suited to model fine-grained dependencies. See docs/Driver.md for
  /// more information.
  ///
  /// \sa ReferenceDependenciesFilePath
  std::string DependenciesFilePath;

  /// The path to which we should output a Swift "reference dependencies" file.
  /// It is valid whenever there are any inputs.
  ///
  /// "Reference dependencies" track dependencies on a more fine-grained level
  /// than just "this file depends on that file". With Swift's "implicit
  /// visibility" within a module, that becomes very important for any sort of
  /// incremental build. These files are consumed by the Swift driver to decide
  /// whether a source file needs to be recompiled during a build. See
  /// docs/DependencyAnalysis.rst for more information.
  ///
  /// \sa swift::emitReferenceDependencies
  /// \sa DependencyGraph
  std::string ReferenceDependenciesFilePath;

  /// The path to which we should output a Swift "unparsed ranges" file.
  /// It is valid whenever there are any inputs.
  ///
  /// "Unparsed ranges" track source ranges in non-primary files whose parsing
  /// was skipped
  /// (a.k.a. "delayed).\
  /// These files are consumed by the Swift driver (or will be someday) to
  /// decide whether a source file needs to be recompiled during a build.
  ///
  /// \sa swift::emitSwiftRanges
  std::string SwiftRangesFilePath;

  /// The path to which we should save the source code of a primary source file
  /// to be compiled. Used to diff sources of primary inputs.
  std::string CompiledSourceFilePath;

  /// Path to a file which should contain serialized diagnostics for this
  /// frontend invocation.
  ///
  /// This uses the same serialized diagnostics format as Clang, for tools that
  /// want machine-parseable diagnostics. There's a bit more information on
  /// how clients might use this in docs/Driver.md.
  ///
  /// \sa swift::serialized_diagnostics::createConsumer
  std::string SerializedDiagnosticsPath;

  /// The path to which we should output fix-its as source edits.
  ///
  /// This is a JSON-based format that is used by the migrator, but is not
  /// really vetted for anything else.
  ///
  /// \sa swift::writeEditsInJson
  std::string FixItsOutputPath;

  /// The path to which we should output a loaded module trace file.
  /// It is valid whenever there are any inputs.
  ///
  /// The file is appended to, and consists of line-delimited JSON objects,
  /// where each line is of the form `{ "name": NAME, "target": TARGET,
  /// "swiftmodules": [PATH, PATH, ...] }`, representing the (real-path) PATHs
  /// to each .swiftmodule that was loaded while building module NAME for target
  /// TARGET. This format is subject to arbitrary change, however.
  std::string LoadedModuleTracePath;

  /// The path to which we should output a TBD file.
  ///
  /// "TBD" stands for "text-based dylib". It's a YAML-based format that
  /// describes the public ABI of a library, which clients can link against
  /// without having an actual dynamic library binary.
  ///
  /// Only makes sense when the compiler has whole-module knowledge.
  ///
  /// \sa swift::writeTBDFile
  std::string TBDPath;

  /// The path to which we should emit a module interface, which can
  /// be used by a client source file to import this module.
  ///
  /// This format is similar to the binary format used for #ModuleOutputPath,
  /// but is intended to be stable across compiler versions.
  ///
  /// Currently only makes sense when the compiler has whole-module knowledge.
  ///
  /// \sa swift::emitSwiftInterface
  std::string ModuleInterfaceOutputPath;

  /// The path to a .c file where we should declare $ld$add symbols for those
  /// symbols moved to the current module.
  /// When symbols are moved to this module, this module declares them as HIDE
  /// for the OS versions prior to when the move happened. On the other hand, the
  /// original module should ADD them for these OS versions. An executable
  /// can choose the right library to link against depending on the deployment target.
  /// This is a walk-around that linker directives cannot specify other install
  /// name per symbol, we should eventually remove this.
  std::string LdAddCFilePath;

  SupplementaryOutputPaths() = default;
  SupplementaryOutputPaths(const SupplementaryOutputPaths &) = default;

  bool empty() const {
    return ObjCHeaderOutputPath.empty() && ModuleOutputPath.empty() &&
           ModuleDocOutputPath.empty() && DependenciesFilePath.empty() &&
           ReferenceDependenciesFilePath.empty() &&
           SerializedDiagnosticsPath.empty() && LoadedModuleTracePath.empty() &&
           TBDPath.empty() && ModuleInterfaceOutputPath.empty() &&
           ModuleSourceInfoOutputPath.empty() && LdAddCFilePath.empty();
  }
};
} // namespace swift

#endif // SWIFT_FRONTEND_SUPPLEMENTARYOUTPUTPATHS_H


text:
GloBI is sourced from, and integrates with, many existing external datasets. As datasets are independently managed, GloBI
        continually discovers and revisits data sources to include recent updates or changes. This page gives you some
        insight into which datasets are indexed, where they are located, and what their status is. If you are
        interested to learn about dataset management, please go here, or perhaps read the blog post "Life stages of Species Interaction Datasets".

Please submit an issue for suggestions
        or bugs.

loading...

           status
           dataset stats, config and citation


text:
var __ = require('underscore'),
  Backbone = require('backbone'),
  $ = require('jquery'),
  colorbox = require('jquery-colorbox'),
  loadTemplate = require('../utils/loadTemplate'),
  sanitizeHTML = require('sanitize-html'),
  RatingCl = require('../collections/ratingCl'),
  baseVw = require('./baseVw'),
  buyWizardVw = require('./buyWizardVw'),
  ReviewsVw = require('./reviewsVw');

module.exports = baseVw.extend({

  events: {
    'click .js-descriptionTab': 'descriptionClick',
    'click .js-reviewsTab': 'reviewsClick',
    'click .js-shippingTab': 'shippingClick',
    'click .js-buyButton': 'buyClick',
    'click .js-photoGallery': 'photoGalleryClick',
    'click .js-itemRating': 'clickItemRating'
  },

  initialize: function(options){
    var self = this;

    this.options = options || {};
    /* expected options are:
    userModel: this is set by main.js, then by a call to the settings API.
     */
    //don't render immediately, wait for the model to update itself with converted prices
    this.userModel = options.userModel;
    this.listenTo(this.model, 'change:priceSet', this.onPriceSet);
    this.activeTab = 'description';
    this.ratingCl = new RatingCl();

    this.listenTo(this.ratingCl, 'reset', function() {
      this.fetchingRatings = false;
      this.render();
      this.reviewsVw && this.reviewsVw.render();
    });

    this.listenTo(this.ratingCl, 'request', function() {
      this.fetchingRatings = true;
    });
  },

  onPriceSet: function() {
    var itemOwnerGuid = this.model.get('page').profile.guid,
        loggedInUserGuid = this.model.get('user'). guid,
        data = {
          contract_id: this.model.id
        };

    if (itemOwnerGuid !== loggedInUserGuid) {
      data['guid'] = itemOwnerGuid;
    }

    this.ratingCl.fetch({
      data: data,
      reset: true
    });

    this.render();
  },

  getAverageRating: function() {
    var ratingsSum = 0,
        avgRating;

    this.ratingCl.each(function(ratingMd) {
      ratingsSum += ratingMd.get('feedback');
    });

    avgRating = (ratingsSum / this.ratingCl.length).toFixed(2);
    avgRating = avgRating.endsWith('.00') ? avgRating.slice(0, avgRating.length - 3) : avgRating;
    // round to the nearest quarter
    avgRating = Math.round(avgRating * 4) / 4;

    return avgRating;
  },

  render: function(){
    var self = this;
    __.each(self.model.get('vendor_offer').listing.item.image_hashes, function(imageHash, i){
      "use strict";
      var imageExtension = self.model.get('imageExtension') || "";
    });

    //el must be passed in from the parent view
    loadTemplate('./js/templates/item.html', function(loadedTemplate) {
      loadTemplate('./js/templates/ratingStars.html', function(starsTemplate) {
        self.$el.html(
          loadedTemplate(
            __.extend({}, self.model.toJSON(), {
              totalReviews: self.ratingCl.length,
              avgRating: self.getAverageRating(),
              starsTemplate: starsTemplate,
              activeTab: self.activeTab,
              fetchingRatings: self.fetchingRatings,
              userCountry: self.userModel.get('displayCountry')
            })
          )
        );

        if (!self.reviewsVw) {
          self.reviewsVw = new ReviewsVw({ collection: self.ratingCl });
          self.registerChild(self.reviewsVw);
          self.$('.js-reviewsContainer ').html(self.reviewsVw.render().el);
        } else {
          self.$('.js-reviewsContainer ').html(self.reviewsVw.el);
        }

        self.$itemRating = self.$('.js-itemRating');
      });
    });

    return this;
  },

  photoGalleryClick: function(e){
    $('.js-photoGallery').colorbox({
      'transition': 'fade',
      'rel': 'js-photoGallery',
      'photo': true,
      'fadeOut': 0,
      'previous': '',
      'next': '',
      'current': '{current} ' + window.polyglot.t('of') + ' {total}',
      'close': window.polyglot.t('Close'),
      'maxHeight': '620px',
      'opacity': '.95',
      'speed': 50,
      onOpen:function(){
        // we need to append colorbox to obContainer to prevent it from covering the header
        $("#colorbox").appendTo("#obContainer");
        $("#cboxOverlay").appendTo("#obContainer");
        $('#content').addClass('blur');
      },
      onClosed:function(){
        $('#content').removeClass('blur');
      }
    });
  },

  descriptionClick: function(e){
    this.setTab('description');
  },

  reviewsClick: function(e){
    this.setTab('reviews');
  },

  shippingClick: function(e){
    this.setTab('shipping');
  },

  setTab: function(activeTab) {
    if (activeTab) {
      this.$('.js-tab').removeClass('active');
      this.$(`.js-${activeTab}Tab`).addClass('active');
      this.$('.js-tabTarg').addClass('hide');
      this.$(`.js-${activeTab}`).removeClass('hide');
      this.activeTab = activeTab;
    }
  },

  buyClick: function(){
    "use strict";
    var self = this;
    this.buyWizardView && this.buyWizardView.remove();
    this.buyWizardView = new buyWizardVw({model:this.model, userModel: this.options.userModel});
    this.registerChild(this.buyWizardView);
    $('#modalHolder').html(this.buyWizardView.el).fadeIn(300); //add to DOM first, or accordion will have zero width when initialized
    this.buyWizardView.render();
    $('#obContainer').addClass('blur');
  },

  clickItemRating: function(e) {
    this.setTab('reviews');
    $('#obContainer').animate({
      scrollTop: this.$('.js-reviewsContainer').offset().top
    }, 200);
  },

  remove: function() {
    $('#obContainer').removeClass('overflowHidden').removeClass('blur');

    baseVw.prototype.remove.apply(this, arguments);
  }
});


text:
using System.Collections.ObjectModel;
using System.Windows.Input;
using WPAppStudio.Controls;
using WPAppStudio.Entities;
using WPAppStudio.Entities.Base;

namespace WPAppStudio.ViewModel.Interfaces
{
    /// <summary>
    /// ThePlace_Info ViewModel interface.
    /// </summary>
    [System.Runtime.CompilerServices.CompilerGenerated]
    [System.CodeDom.Compiler.GeneratedCode("Radarc", "4.0")]
    public interface IThePlace_InfoViewModel
    {
        /// <summary>
        /// Gets/Sets the CurrentThePlace_InfoHtmlControl property.
        /// </summary>
		string CurrentThePlace_InfoHtmlControl { get; set; }

        /// <summary>
        /// Gets/Sets the Photos_AlbumListControlCollection property.
        /// </summary>
		ObservableCollection<photosCollectionSchema> Photos_AlbumListControlCollection { get; set; }

        /// <summary>
        /// Gets/Sets the Selectedphotos_AlbumListControlCollection property.
        /// </summary>
		photosCollectionSchema Selectedphotos_AlbumListControlCollection { get; set; }

        /// <summary>
        /// Gets/Sets the Diary_ListListControlCollection property.
        /// </summary>
		ObservableCollection<diarySchema> Diary_ListListControlCollection { get; set; }

        /// <summary>
        /// Gets/Sets the Selecteddiary_ListListControlCollection property.
        /// </summary>
		diarySchema Selecteddiary_ListListControlCollection { get; set; }

        /// <summary>
        /// Gets/Sets the Fellows_ListListControlCollection property.
        /// </summary>
		ObservableCollection<fellowsSchema> Fellows_ListListControlCollection { get; set; }

        /// <summary>
        /// Gets/Sets the Selectedfellows_ListListControlCollection property.
        /// </summary>
		fellowsSchema Selectedfellows_ListListControlCollection { get; set; }

        /// <summary>
        /// Gets/Sets the TheNextOne_ListListControlCollection property.
        /// </summary>
		ObservableCollection<TheNextOneSchema> TheNextOne_ListListControlCollection { get; set; }

        /// <summary>
        /// Gets/Sets the SelectedTheNextOne_ListListControlCollection property.
        /// </summary>
		TheNextOneSchema SelectedTheNextOne_ListListControlCollection { get; set; }

        /// <summary>
        /// Gets the RefreshTheNextOne_ListListControlCollection command.
        /// </summary>
		ICommand RefreshTheNextOne_ListListControlCollection { get; }

        /// <summary>
        /// Gets the SetLockScreenCommand command.
        /// </summary>
		ICommand SetLockScreenCommand { get; }

	}
}


text:
import java.util.function.Function;

class Test<A> {
  class P {
    {
      g(P::<error descr="Cannot resolve method 'aa'">aa</error>);
    }
  }
  <R> void g(Function<R, String> r){}
}


text:
<!DOCTYPE html>

  <title>PHP/MySQL Cache Storm App</title>

  <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" rel="stylesheet">

Top 10 Pages

Code	Hits

		  <? foreach($data as $r): ?>

<?= $r['code'] ?>	<?= number_format($r["ct"]) ?>

		<? endforeach; ?>


text:
package org.jboss.resteasy.test.util.resource;

public class TypesGenericAnotherFooBar implements TypesGenericAnotherFoo<Integer> {
    @Override
    public void foo(Integer integer) {
    }

    @Override
    public void bar(int i) {
    }
}


text:
/*
 * Skin: material
 * ------------
 */
.skin-material .main-header{
  border-top: 3px solid #39a5dc;
}

.skin-material .main-header .navbar {
  background-color: #030303;
}
.skin-material .main-header .navbar .nav > li > a {
  color: #ffffff;
}
.skin-material .main-header .navbar .nav > li > a:hover,
.skin-material .main-header .navbar .nav > li > a:active,
.skin-material .main-header .navbar .nav > li > a:focus,
.skin-material .main-header .navbar .nav .open > a,
.skin-material .main-header .navbar .nav .open > a:hover,
.skin-material .main-header .navbar .nav .open > a:focus {
  //background: rgba(0, 0, 0, 0.1);
  background-color:#374850;
  color: #f6f6f6;
}
.skin-material .main-header .navbar .sidebar-toggle {
  color: #ffffff;
}
.skin-material .main-header .navbar .sidebar-toggle:hover {
  color: #f6f6f6;
  background: rgba(0, 0, 0, 0.1);
}
.skin-material .main-header .navbar .sidebar-toggle {
  color: #fff;
}
.skin-material .main-header .navbar .sidebar-toggle:hover {
  background-color: #374850;
}
@media (max-width: 767px) {
  .skin-material .main-header .navbar .dropdown-menu li.divider {
    background-color: rgba(255, 255, 255, 0.1);
  }
  .skin-material .main-header .navbar .dropdown-menu li a {
    color: #fff;
  }
  .skin-material .main-header .navbar .dropdown-menu li a:hover {
    background: #374850;
  }
}
.skin-material .main-header .logo {
  background-color: #030303;
  color: #ffffff;
  border-bottom: 0px solid transparent;
}
.skin-material .main-header .logo:hover {
  background: #374850;
}
.skin-material .main-header li.user-header {
  background-color: #605ca8;
}
.skin-material .content-header {
  background: transparent;
}
.skin-material .wrapper,
.skin-material .main-sidebar,
.skin-material .left-side {
  background-color: #292E34;
}
.skin-material .user-panel > .info,
.skin-material .user-panel > .info > a {
  color: #fff;
}
.skin-material .sidebar-menu > li.header {
  color: #4b646f;
  background: #1a2226;
}
.skin-material .sidebar-menu > li > a {
  border-left: 3px solid transparent;
  margin-right: 1px;
  cursor: pointer;
}
.skin-material .sidebar-menu > li:hover > a,
.skin-material .sidebar-menu > li.active > a {
  color: #ffffff;
  background: #393F44;
  border-left: solid 3px #39A5DC;
  border-top:solid 1px #030303;
  border-bottom:solid 1px #030303;
}
.skin-material .sidebar-menu > li > .treeview-menu {
  margin: 0 1px;
  background: #393F44;
}
.skin-material .sidebar a {
  color: #ffffff;
}
.skin-material .sidebar a:hover {
  text-decoration: none;
}
.skin-material .treeview-menu > li > a {
  color: #ffffff;
  border:solid #030303 1px 0px ;

}
.skin-material .treeview-menu > li.active > a,
.skin-material .treeview-menu > li > a:hover {
  color: #ffffff;
  cursor: pointer;
  border-left: solid 3px #39A5DC;
}
.skin-material .sidebar-form {
  border-radius: 3px;
  border: 1px solid #374850;
  margin: 10px 10px;
}
.skin-material .sidebar-form input[type="text"],
.skin-material .sidebar-form .btn {
  box-shadow: none;
  background-color: #374850;
  border: 1px solid transparent;
  height: 35px;
  -webkit-transition: all 0.3s ease-in-out;
  -o-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
}
.skin-material .sidebar-form input[type="text"] {
  color: #666;
  border-top-left-radius: 2px !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-bottom-left-radius: 2px !important;
}
.skin-material .sidebar-form input[type="text"]:focus,
.skin-material .sidebar-form input[type="text"]:focus + .input-group-btn .btn {
  background-color: #fff;
  color: #666;
}
.skin-material .sidebar-form input[type="text"]:focus + .input-group-btn .btn {
  border-left-color: #fff;
}
.skin-material .sidebar-form .btn {
  color: #999;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 2px !important;
  border-bottom-right-radius: 2px !important;
  border-bottom-left-radius: 0 !important;
}


text:
package com.omottec.demoapp.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.FragmentActivity;
import android.view.View;
import android.widget.TextView;

import com.omottec.demoapp.R;

/**
 * Created by qinbingbing on 9/21/16.
 */
public class AnimActivity extends FragmentActivity {
    TextView mTv;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.full_screen_text);
        mTv = (TextView) findViewById(R.id.tv);
        mTv.setText("AnimActivity");
        mTv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(AnimActivity.this, AnimActivity1.class);
                startActivity(intent);
                overridePendingTransition(R.anim.down_2_up, R.anim.up_2_down);
            }
        });
    }

    @Override
    public void finish() {
        super.finish();
    }
}


text:
layout: default
scripts:
  - "https://code.jquery.com/jquery-3.1.1.min.js"
  - "/js/main.js"
---

                Barcelona Free Software is a meetup
                and an open space for coders and users who love free software (w/ — members!)

Come to our next meeting to discover new projects and have a drink.

Anything to say? Please, contact us directly.

You can also follow us on Mastodon and Twitter.

Linux App Summit 2019

Upcoming meetups

Last meetups

Patrons

Want to help us? We have sponsorships available.


text:
"""
Utility routines for rosmaster.
"""

try:
    from urllib.parse import urlparse
except ImportError:
    from urlparse import urlparse
try:
    from xmlrpc.client import ServerProxy
except ImportError:
    from xmlrpclib import ServerProxy

_proxies = {} #cache ServerProxys
def xmlrpcapi(uri):
    """
    @return: instance for calling remote server or None if not a valid URI
    @rtype: xmlrpc.client.ServerProxy
    """
    if uri is None:
        return None
    uriValidate = urlparse(uri)
    if not uriValidate[0] or not uriValidate[1]:
        return None
    if not uri in _proxies:
        _proxies[uri] = ServerProxy(uri)
    return _proxies[uri]

def remove_server_proxy(uri):
    if uri in _proxies:
        del _proxies[uri]


text:
package branch

import (
	"go/ast"
	"go/types"

	"github.com/zimmski/go-mutesting/astutil"
	"github.com/zimmski/go-mutesting/mutator"
)

func init() {
	mutator.Register("branch/else", MutatorElse)
}

// MutatorElse implements a mutator for else branches.
func MutatorElse(pkg *types.Package, info *types.Info, node ast.Node) []mutator.Mutation {
	n, ok := node.(*ast.IfStmt)
	if !ok {
		return nil
	}
	// We ignore else ifs and nil blocks
	_, ok = n.Else.(*ast.IfStmt)
	if ok || n.Else == nil {
		return nil
	}

	old := n.Else

	return []mutator.Mutation{
		{
			Change: func() {
				n.Else = astutil.CreateNoopOfStatement(pkg, info, old)
			},
			Reset: func() {
				n.Else = old
			},
		},
	}
}


text:
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Playnite;
using Playnite.SDK.Models;
using Newtonsoft.Json;
using Playnite.SDK.Data;

namespace Playnite.Tests
{
    [TestFixture]
    public class CloneObjectTests
    {
        class TestObject : ObservableObject
        {
            private int prop1;
            public int Prop1
            {
                get => prop1;
                set
                {
                    prop1 = value;
                    OnPropertyChanged();
                }
            }

            private string prop2;
            public string Prop2
            {
                get => prop2;
                set
                {
                    prop2 = value;
                    OnPropertyChanged();
                }
            }

            private List<int> prop3;
            public List<int> Prop3
            {
                get => prop3;
                set
                {
                    prop3 = value;
                    OnPropertyChanged();
                }
            }

            private TestObject prop4;
            public TestObject Prop4
            {
                get => prop4;
                set
                {
                    prop4 = value;
                    OnPropertyChanged();
                }
            }

            private long prop6;
            public long Prop6
            {
                get => prop6;
                set
                {
                    prop6 = value;
                    OnPropertyChanged();
                }
            }
        }

        public class JsonTestObject
        {
            public int Prop1 { get; set; }

            [JsonIgnore]
            public int Prop2 { get; set; }

            [DontSerialize]
            public int Prop3 { get; set; }
        }

        [Test]
        public void JsonIgnoreTest()
        {
            var source = new JsonTestObject()
            {
                Prop1 = 10,
                Prop2 = 20,
                Prop3 = 30
            };

            var target = new JsonTestObject();
            source.CopyProperties(target, false, null, true);
            Assert.AreEqual(10, target.Prop1);
            Assert.AreNotEqual(20, target.Prop2);
            Assert.AreNotEqual(30, target.Prop3);

            target = new JsonTestObject();
            source.CopyProperties(target, false, null, false);
            Assert.AreEqual(10, target.Prop1);
            Assert.AreEqual(20, target.Prop2);
            Assert.AreEqual(30, target.Prop3);
        }

        [Test]
        public void CopyPropertiesTest()
        {
            var source = new TestObject
            {
                Prop1 = 2,
                Prop2 = "test",
                Prop3 = new List<int>() { 1, 2 },
                Prop4 = new TestObject() { Prop2 = "test2" }
            };

            var target = new TestObject();

            // Standard copy of all properties
            source.CopyProperties(target, true);
            Assert.AreEqual(source.Prop1, target.Prop1);
            Assert.AreEqual(source.Prop2, target.Prop2);
            Assert.IsNotNull(target.Prop3);
            Assert.AreEqual(1, target.Prop3.First());
            Assert.IsNotNull(target.Prop4);
            Assert.AreEqual(source.Prop4.Prop3, target.Prop4.Prop3);

            // Null copy
            source.Prop2 = null;
            source.Prop3 = null;
            source.Prop4 = null;
            source.CopyProperties(target, true);
            Assert.IsNull(target.Prop2);
            Assert.IsNull(target.Prop3);
            Assert.IsNull(target.Prop4);

            // Diff only
            var changed = new List<string>();
            source = new TestObject
            {
                Prop1 = 2,
                Prop2 = "test",
                Prop3 = new List<int>() { 1, 2 },
                Prop4 = new TestObject() { Prop2 = "test2" },
                Prop6 = 20
            };

            target = new TestObject
            {
                Prop1 = 2,
                Prop2 = "test",
                Prop6 = 0
            };

            target.PropertyChanged += (s, e) => changed.Add(e.PropertyName);
            source.CopyProperties(target, true);
            Assert.AreEqual(3, changed.Count);
            Assert.AreEqual("Prop3", changed[0]);
            Assert.AreEqual("Prop4", changed[1]);
            Assert.AreEqual("Prop6", changed[2]);

            changed = new List<string>();
            target = new TestObject
            {
                Prop1 = 2,
                Prop2 = "test"
            };

            target.PropertyChanged += (s, e) => changed.Add(e.PropertyName);
            source.CopyProperties(target, false);
            Assert.AreEqual(5, changed.Count);
        }
    }
}


text:
from flask import current_app
from gcloud import datastore

builtin_list = list

def init_app(app):
    pass

def get_client():
    return datastore.Client(current_app.config['PROJECT_ID'])

# [START from_datastore]
def from_datastore(entity):
    """Translates Datastore results into the format expected by the
    application.

    Datastore typically returns:
        [Entity{key: (kind, id), prop: val, ...}]

    This returns:
        {id: id, prop: val, ...}
    """
    if not entity:
        return None
    if isinstance(entity, builtin_list):
        entity = entity.pop()

    entity['id'] = entity.key.id
    return entity
# [END from_datastore]

# [START list]
def list(limit=10, cursor=None):
    ds = get_client()
    query = ds.query(kind='Book', order=['title'])
    it = query.fetch(limit=limit, start_cursor=cursor)
    entities, more_results, cursor = it.next_page()
    entities = builtin_list(map(from_datastore, entities))
    return entities, cursor if len(entities) == limit else None
# [END list]

def read(id):
    ds = get_client()
    key = ds.key('Book', int(id))
    results = ds.get(key)
    return from_datastore(results)

# [START update]
def update(data, id=None):
    ds = get_client()
    if id:
        key = ds.key('Book', int(id))
    else:
        key = ds.key('Book')

    entity = datastore.Entity(
        key=key,
        exclude_from_indexes=['description'])

    entity.update(data)
    ds.put(entity)
    return from_datastore(entity)

create = update
# [END update]

def delete(id):
    ds = get_client()
    key = ds.key('Book', int(id))
    ds.delete(key)


text:
namespace boost {
namespace asio {
namespace detail {

#define Protocol boost::asio::local::stream_protocol

template<>
class resolver_service<Protocol> : public resolver_service_base
{
public:
  // The implementation type of the resolver. A cancellation token is used to
  // indicate to the background thread that the operation has been cancelled.
  typedef socket_ops::shared_cancel_token_type implementation_type;

  // The endpoint type.
  typedef typename Protocol::endpoint endpoint_type;

  // The query type.
  typedef boost::asio::ip::basic_resolver_query<Protocol> query_type;

  // The iterator type.
  typedef boost::asio::ip::basic_resolver_iterator<Protocol> iterator_type;

  // Constructor.
  resolver_service(boost::asio::io_service& io_service)
    : resolver_service_base(io_service)
  {
    //LOG(ERROR) << "Constructing resolver_service()";
  }

  // Resolve a query to a list of entries.
  iterator_type resolve(implementation_type&, const query_type& query,
      boost::system::error_code& ec)
  {
    //LOG(ERROR) << "resolve() " << query.host_name();
    std::string path = ::network::detail::decode(query.host_name());
    //LOG(ERROR) << "decoded " << path;
    struct stat buffer;
    int result = stat(path.c_str(), &buffer);
    if (result || !S_ISSOCK(buffer.st_mode)) {
      LOG(ERROR) << "resolve: unable to stat or not a socket " << path;
      ec = boost::asio::error::host_not_found;
    } else {
      //LOG(ERROR) << "resolve: everything ok with " << path;
      ec = boost::system::error_code();
    }
    return ec ? iterator_type() : iterator_type::create(
        endpoint_type(path), path, query.service_name());
  }

  // Asynchronously resolve a query to a list of entries.
  template <typename Handler>
  void async_resolve(implementation_type& impl,
      const query_type& query, Handler& handler)
  {
    // Allocate and construct an operation to wrap the handler.
    typedef resolve_op<Protocol, Handler> op;
    typename op::ptr p = { boost::asio::detail::addressof(handler),
      boost_asio_handler_alloc_helpers::allocate(
        sizeof(op), handler), 0 };
    p.p = new (p.v) op(impl, query, io_service_impl_, handler);

    BOOST_ASIO_HANDLER_CREATION((p.p, "resolver", &impl, "async_resolve"));

    start_resolve_op(p.p);
    p.v = p.p = 0;
  }

  // Resolve an endpoint to a list of entries.
  iterator_type resolve(implementation_type&,
      const endpoint_type& endpoint, boost::system::error_code& ec)
  {
    // An existing endpoint always resolves.
    return iterator_type::create(endpoint, "", "");
  }

  // Asynchronously resolve an endpoint to a list of entries.
  template <typename Handler>
  void async_resolve(implementation_type& impl,
      const endpoint_type& endpoint, Handler& handler)
  {
    // Allocate and construct an operation to wrap the handler.
    typedef resolve_endpoint_op<Protocol, Handler> op;
    typename op::ptr p = { boost::asio::detail::addressof(handler),
      boost_asio_handler_alloc_helpers::allocate(
        sizeof(op), handler), 0 };
    p.p = new (p.v) op(impl, endpoint, io_service_impl_, handler);

    BOOST_ASIO_HANDLER_CREATION((p.p, "resolver", &impl, "async_resolve"));

    start_resolve_op(p.p);
    p.v = p.p = 0;
  }
};

#undef Protocol

} // namespace detail
} // namespace asio
} // namespace boost

#include <boost/asio/detail/pop_options.hpp>

#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)

#endif // BOOST_ASIO_DETAIL_LOCAL_RESOLVER_SERVICE_HPP


text:
"""This class will incorporate the PhishingDatabase feed into yeti."""

from datetime import timedelta, datetime
import logging

from core.observables import Url
from core.feed import Feed
from core.errors import ObservableValidationError

class PhishingDatabase(Feed):
    """This class will pull the PhishingDatabase feed from github on a 12 hour interval."""

    default_values = {
        "frequency": timedelta(hours=12),
        "name": "PhishingDatabase",
        "source": "https://raw.githubusercontent.com/mitchellkrogza/Phishing.Database/master/phishing-links-NEW-today.txt",
        "description": "Phishing Domains, urls websites and threats database.",
    }

    def update(self):
        for url in self.update_lines():
            self.analyze(url)

    def analyze(self, url):
        context = {"source": self.name, "date_added": datetime.utcnow()}

        try:
            url = Url.get_or_create(value=url)
            url.add_context(context, dedup_list=["date_added"])
            url.add_source(self.name)
            url.tag(["phishing"])
            url.tag(["phishing_database"])
        except ObservableValidationError as e:
            logging.error(e)


text:
layout: page
title: Price Tough Technologies Party
date: 2016-05-24
author: Patrick Cain
tags: weekly links, java
status: published
summary: Vestibulum eu risus massa. Praesent sit.
banner: images/banner/wedding.jpg
booking:
  startDate: 10/11/2016
  endDate: 10/12/2016
  ctyhocn: ONTBRHX
  groupCode: PTTP
published: true
---
Morbi ac efficitur tellus, in semper quam. Nulla lacinia feugiat urna, at semper urna aliquam id. Cras efficitur neque ac semper commodo. Vestibulum vulputate leo et ultricies semper. Integer aliquam nisi eu magna euismod lacinia. Quisque tincidunt scelerisque libero, a porttitor nisl lobortis non. Nullam tristique tempus odio id scelerisque. Donec in maximus neque, sit amet luctus odio.

* Ut sit amet purus vel enim euismod auctor
* Sed et justo a risus tempor varius.

Phasellus ornare laoreet ante, sed ullamcorper dui ullamcorper ut. Nulla tincidunt massa non volutpat pretium. Suspendisse dolor neque, feugiat faucibus vehicula et, egestas sit amet massa. Sed volutpat, dui ac pretium posuere, odio lectus ultricies dolor, eu finibus nunc ex in arcu. Etiam elit risus, iaculis ut maximus et, feugiat ut nulla. Quisque nec laoreet tellus. Fusce commodo lorem vel risus mattis ultrices. Nam leo eros, maximus et accumsan nec, auctor quis felis. Sed mattis pretium eros et cursus. Nulla vehicula sed urna in finibus. Aenean tempus orci ipsum, non porta libero feugiat varius. Cras hendrerit venenatis turpis, nec viverra leo mollis eu. Ut lobortis vehicula diam, ut rhoncus nisl pharetra eget.