text:
package io.redlink.smarti.migration;

import org.springframework.boot.context.properties.ConfigurationProperties;

import java.nio.file.Path;
import java.util.regex.Pattern;

@ConfigurationProperties(prefix = "smarti.migration.mongo")
public class MongoDbMigrationProperties {

    /**
     * Directory to load the database-migration scripts from
     */
    private Path scriptHome = null;
    /**
     * Pattern of migration-scripts to apply
     */
    private Pattern pattern = Pattern.compile("^migrate-\\d+");

    public Path getScriptHome() {
        return scriptHome;
    }

    public void setScriptHome(Path scriptHome) {
        this.scriptHome = scriptHome;
    }

    public Pattern getPattern() {
        return pattern;
    }

    public void setPattern(Pattern pattern) {
        this.pattern = pattern;
    }

    public void setPattern(String pattern) {
        this.pattern = Pattern.compile(pattern);
    }
}


text:
using UnityEngine;
using System.Collections;

public class SimpleGUI : MonoBehaviour {

	public GUISkin skin;

	static SimpleGUI self;

	void Awake () {
		self = this;
	}

	void OnDestroy () {
		self = null;
	}

	public static bool CheckMouseOver(Rect position) {
		position.width += 1;
		position.height += 1;
		bool overPosition = position.Contains(Event.current.mousePosition);
		CameraControl.MouseOverGUI |= overPosition;
		return overPosition;
	}

	public static bool Label(Rect position, string text, GUIStyle style) {
		GUI.Label(position, text, style);
		return CheckMouseOver(position);
	}

	public static bool Label(Rect position, string text, GUIStyle style, GUIStyle overStyle) {
		bool isOver = CheckMouseOver(position);
		GUI.Label(position, text, isOver?overStyle:style);
		return isOver;
	}

	public static bool Label(Rect position, Texture image, GUIStyle style) {
		GUI.Label(position, image, style);
		return CheckMouseOver(position);
	}

	public static bool Label(Rect position, Texture image) {
		GUI.Label(position, image, GUIStyle.none);
		return CheckMouseOver(position);
	}

	public static bool Button(Rect position, string text, GUIStyle style) {
		CheckMouseOver(position);
		return GUI.Button(position, text, style);
	}

	public static bool Button(Rect position, string text, GUIStyle style, GUIStyle overStyle) {
		bool isOver = CheckMouseOver(position);
		return GUI.Button(position, text, isOver?overStyle:style);
	}

	public static bool Button(Rect position, Texture image, GUIStyle style) {
		CheckMouseOver(position);
		return GUI.Button(position, image, style);
	}

	public static bool Button(Rect position, Texture image, Texture imageOver) {
		bool isOver = CheckMouseOver(position);
		return GUI.Button(position, isOver?imageOver:image, GUIStyle.none);
	}

	public static bool Button(Rect position, Texture image, Texture imageOver, GUIStyle style) {
		bool isOver = CheckMouseOver(position);
		return GUI.Button(position, isOver?imageOver:image, style);
	}

	public static bool Button(Rect position, Texture image, Texture imageOver, GUIStyle style, GUIStyle overStyle) {
		bool isOver = CheckMouseOver(position);
		return GUI.Button(position, isOver?imageOver:image, isOver?overStyle:style);
	}

	public static string TextField(Rect position, string text, GUIStyle style) {
		CheckMouseOver(position);
		return GUI.TextField(position, (text == null)?"(null)":text, style);
	}

	public static string TextField(Rect position, string text, int maxLength, GUIStyle style) {
		CheckMouseOver(position);
		return GUI.TextField(position, (text == null)?"(null)":text, maxLength, style);
	}

	public static float Slider (Rect position, float val, float min, float max) {
		CheckMouseOver(position);
		return GUI.HorizontalSlider (position, val, min, max, self.skin.horizontalSlider, self.skin.horizontalSliderThumb);
	}
}

redpajama_set_name: RedPajamaGithub


text:
package May2021Leetcode;

import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.TreeMap;

public class _0987VerticalOrderTraversalOfABinaryTree {

	public static void main(String[] args) {
		TreeNode tn = new TreeNode(3);
		tn.left = new TreeNode(9);
		tn.right = new TreeNode(20);
		tn.right.left = new TreeNode(15);
		tn.right.right = new TreeNode(7);
		System.out.println(verticalTraversal(tn));

		tn = new TreeNode(1);
		tn.left = new TreeNode(2);
		tn.right = new TreeNode(3);
		tn.left.left = new TreeNode(4);
		tn.left.right = new TreeNode(5);
		tn.right.left = new TreeNode(6);
		tn.right.right = new TreeNode(7);
		System.out.println(verticalTraversal(tn));
	}

	static public class TreeNode {
		int val;
		TreeNode left;
		TreeNode right;

		TreeNode() {
		}

		TreeNode(int val) {
			this.val = val;
		}

		TreeNode(int val, TreeNode left, TreeNode right) {
			this.val = val;
			this.left = left;
			this.right = right;
		}
	}

	static class Node {
		TreeNode tn;
		int level;

		public Node(TreeNode tn, int level) {
			this.tn = tn;
			this.level = level;
		}
	}

	public static List<List<Integer>> verticalTraversal(TreeNode root) {
		List<List<Integer>> output = new ArrayList<List<Integer>>();
		if (root == null)
			return output;

		TreeMap<Integer, List<Integer>> map = new TreeMap<Integer, List<Integer>>();
		Queue<Node> q = new LinkedList<Node>();
		q.offer(new Node(root, 0));
		while (!q.isEmpty()) {
			int size = q.size();
			TreeMap<Integer, List<Integer>> tempMap = new TreeMap<Integer, List<Integer>>();
			for (int i = 0; i < size; i++) {

				Node node = q.poll();
				int currLevel = node.level;
				TreeNode tn = node.tn;

				if (!tempMap.containsKey(currLevel)) {
					tempMap.put(currLevel, new ArrayList<Integer>());
				}
				tempMap.get(currLevel).add(tn.val);

				if (tn.left != null) {
					q.offer(new Node(tn.left, currLevel - 1));
				}

				if (tn.right != null) {
					q.offer(new Node(tn.right, currLevel + 1));
				}
			}

			for (Map.Entry<Integer, List<Integer>> entry : tempMap.entrySet()) {
				if (!map.containsKey(entry.getKey())) {
					map.put(entry.getKey(), new ArrayList<Integer>());
				}

				Collections.sort(entry.getValue());
				map.get(entry.getKey()).addAll(entry.getValue());
			}
		}

		for (Map.Entry<Integer, List<Integer>> entry : map.entrySet()) {
			output.add(entry.getValue());
		}
		return output;
	}
}


text:
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is mozilla.org code.
 *
 * The Initial Developer of the Original Code is
 * Netscape Communications Corporation.
 * Portions created by the Initial Developer are Copyright (C) 1998
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *
 * Alternatively, the contents of this file may be used under the terms of
 * either of the GNU General Public License Version 2 or later (the "GPL"),
 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 * in which case the provisions of the GPL or the LGPL are applicable instead
 * of those above. If you wish to allow use of your version of this file only
 * under the terms of either the GPL or the LGPL, and not to allow others to
 * use your version of this file under the terms of the MPL, indicate your
 * decision by deleting the provisions above and replace them with the notice
 * and other provisions required by the GPL or the LGPL. If you do not delete
 * the provisions above, a recipient may use your version of this file under
 * the terms of any one of the MPL, the GPL or the LGPL.
 *
 * ***** END LICENSE BLOCK ***** */

#ifndef nsTime_h__
#define nsTime_h__

#include "prtime.h"
#include "nsInt64.h"
#include "nscore.h"

/**
 * This class encapsulates full 64-bit time functionality and
 * provides simple arithmetic and conversion operations.
 */

// If you ever decide that you need to add a non-inline method to this
// class, be sure to change the class declaration to "class NS_BASE
// nsTime".

class nsTime : public nsInt64
{
public:
    /**
     * Construct the current time.
     */
    nsTime(void) : nsInt64(PR_Now()) {
    }

    /**
     * Construct the time from a string.
     */
    nsTime(const char* dateStr, PRBool defaultToGMT) {
        PRInt64 theTime;
        PRStatus status = PR_ParseTimeString(dateStr, defaultToGMT, &theTime);
        if (status == PR_SUCCESS)
            mValue = theTime;
        else
            mValue = LL_ZERO;
    }

    /**
     * Construct a time from a PRTime.
     */
    nsTime(const PRTime aTime) : nsInt64(aTime) {
    }

    /**
     * Construct a time from a 64-bit value.
     */
    nsTime(const nsInt64& aTime) : nsInt64(aTime) {
    }

    /**
     * Construct a time from another time.
     */
    nsTime(const nsTime& aTime) : nsInt64(aTime.mValue) {
    }

    // ~nsTime(void) -- XXX destructor unnecessary

    /**
     * Assign one time to another.
     */
    const nsTime& operator =(const nsTime& aTime) {
        mValue = aTime.mValue;
        return *this;
    }

    /**
     * Convert a nsTime object to a PRTime
     */
    operator PRTime(void) const {
        return mValue;
    }
};

/**
 * Determine if one time is strictly less than another
 */
inline const PRBool
operator <(const nsTime& aTime1, const nsTime& aTime2) {
    return aTime1.mValue < aTime2.mValue;
}

/**
 * Determine if one time is less than or equal to another
 */
inline const PRBool
operator <=(const nsTime& aTime1, const nsTime& aTime2) {
    return aTime1.mValue <= aTime2.mValue;
}

/**
 * Determine if one time is strictly greater than another
 */
inline const PRBool
operator >(const nsTime& aTime1, const nsTime& aTime2) {
    return aTime1.mValue > aTime2.mValue;
}

/**
 * Determine if one time is greater than or equal to another
 */
inline const PRBool
operator >=(const nsTime& aTime1, const nsTime& aTime2) {
    return aTime1.mValue >= aTime2.mValue;
}

#endif // nsTime_h__


text:
using System;
using OpenCvSharp.Face;
using Xunit;

namespace OpenCvSharp.Tests.Face;

// ReSharper disable once InconsistentNaming
public class FacemarkAAMTest : TestBase
{
    //private const string CascadeFile = "_data/text/haarcascade_frontalface_default.xml";

    [Fact]
    public void CreateAndDispose()
    {
        using (var facemark = FacemarkAAM.Create())
        {
            GC.KeepAlive(facemark);
        }
    }

    [Fact]
    public void CreateAndDisposeWithParameter()
    {
        using (var parameter = new FacemarkAAM.Params())
        using (var facemark = FacemarkAAM.Create(parameter))
        {
            GC.KeepAlive(facemark);
        }
    }

    /*
    /// <summary>
    /// https://docs.opencv.org/trunk/d5/dd8/tutorial_facemark_aam.html
    /// </summary>
    [Fact]
    public void GetFaces()
    {
        using (var parameter = new FacemarkAAM.Params())
        {
            parameter.ModelFilename = CascadeFile;
            parameter.Scales = new float[] {2, 4};

            using (var facemark = FacemarkAAM.Create(parameter))
            using (var img = Image("lenna.png"))
            {
                bool ret = facemark.GetFaces(img, out var faces);
                Assert.True(ret);
                Assert.NotEmpty(faces);

                if (Debugger.IsAttached)
                {
                    foreach (var face in faces)
                    {
                        img.Rectangle(face, Scalar.Red, 2);
                    }
                    Window.ShowImages(img);
                }
            }
        }
    }*/

    [Fact]
    public void ParameterModelFilename()
    {
        const string value = "foo";

        using (var parameter = new FacemarkAAM.Params())
        {
            parameter.ModelFilename = value;
            Assert.Equal(value, parameter.ModelFilename);
        }
    }

    [Fact]
    public void ParameterM()
    {
        const int value = 12345;

        using (var parameter = new FacemarkAAM.Params())
        {
            parameter.M = value;
            Assert.Equal(value, parameter.M);
        }
    }

    [Fact]
    public void ParameterN()
    {
        const int value = 12345;

        using (var parameter = new FacemarkAAM.Params())
        {
            parameter.N = value;
            Assert.Equal(value, parameter.N);
        }
    }

    [Fact]
    public void ParameterNIter()
    {
        const int value = 12345;

        using (var parameter = new FacemarkAAM.Params())
        {
            parameter.NIter = value;
            Assert.Equal(value, parameter.NIter);
        }
    }

    [Fact]
    public void ParameterScales()
    {
        float[] value = { 1, 2, 3 };

        using (var parameter = new FacemarkAAM.Params())
        {
            parameter.Scales = value;
            Assert.Equal(value, parameter.Scales);
        }
    }

    [Fact]
    public void ParameterSaveModel()
    {
        using (var parameter = new FacemarkAAM.Params())
        {
            parameter.SaveModel = true;
            Assert.True(parameter.SaveModel);
            parameter.SaveModel = false;
            Assert.False(parameter.SaveModel);
        }
    }

    [Fact]
    public void ParameterVerbose()
    {
        using (var parameter = new FacemarkAAM.Params())
        {
            parameter.Verbose = true;
            Assert.True(parameter.Verbose);
            parameter.Verbose = false;
            Assert.False(parameter.Verbose);
        }
    }
}


text:
{% extends "base.html" %}

{% block body %}

{% include "base_quotelist.html" %}
{% include "base_quoteinfo.html" %}

{% endblock %}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <!--
      Licensed to the Apache Software Foundation (ASF) under one or more
      contributor license agreements. See the NOTICE file distributed with
      this work for additional information regarding copyright ownership.
      The ASF licenses this file to You under the Apache License, Version 2.0
      (the "License"); you may not use this file except in compliance with
      the License. You may obtain a copy of the License at
      http://www.apache.org/licenses/LICENSE-2.0
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.
    -->
    <parent>
        <artifactId>nifi-easyrules-bundle</artifactId>
        <groupId>org.apache.nifi</groupId>
        <version>1.19.0-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>nifi-easyrules-service</artifactId>
    <packaging>jar</packaging>
    <properties>
        <easy.rules.version>4.1.0</easy.rules.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.apache.nifi</groupId>
            <artifactId>nifi-rules-engine-service-api</artifactId>
            <version>1.19.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.yaml</groupId>
            <artifactId>snakeyaml</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.nifi</groupId>
            <artifactId>nifi-utils</artifactId>
            <version>1.19.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.jeasy</groupId>
            <artifactId>easy-rules-core</artifactId>
            <version>${easy.rules.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jeasy</groupId>
            <artifactId>easy-rules-mvel</artifactId>
            <version>${easy.rules.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jeasy</groupId>
            <artifactId>easy-rules-spel</artifactId>
            <version>${easy.rules.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-jexl3</artifactId>
            <version>3.2.1</version>
            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <!-- test -->
        <dependency>
            <groupId>org.apache.nifi</groupId>
            <artifactId>nifi-mock</artifactId>
            <version>1.19.0-SNAPSHOT</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.rat</groupId>
                <artifactId>apache-rat-plugin</artifactId>
                <configuration>
                    <excludes combine.children="append">
                        <exclude>src/test/resources/test_nifi_rules.json</exclude>
                        <exclude>src/test/resources/test_nifi_rules.yml</exclude>
                        <exclude>src/test/resources/test_nifi_rules_filter.json</exclude>
                        <exclude>src/test/resources/test_mvel_rules.json</exclude>
                        <exclude>src/test/resources/test_mvel_rules.yml</exclude>
                        <exclude>src/test/resources/test_spel_rules.json</exclude>
                        <exclude>src/test/resources/test_bad_spel_rules.json</exclude>
                        <exclude>src/test/resources/test_spel_rules.yml</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>


text:
#!/usr/bin/env node
/**
 * View file
 * @template index
 */
var fs  = require("fs");
var url = require("url");
var Config = require("../../config")();
var DHCPServer = require("../../dhcpserver");
var Iptables = require("../../iptables");

function View()
{
var self = this;
var iptables = new Iptables();
var dhcpserver = new DHCPServer();

self.getData = function(IP, URL, GET, POST, language, section, configuration)
	{
	/*var splash = true;
	try {
		var lease = dhcpserver.getDHCPLeaseByIP(IP);															// Show splash if mac is not in the accepted list
		if(lease)
			splash = !iptables.hasSplashMAC(lease.mac_or_duid);
		}
	catch(err)
		{}*/
	var splash = false;

	return { language: language.code, kiwiLanguage: language.kiwiLanguage, smartyLanguage: language.smartyLanguage, kiwiConfiguration: configuration.kiwiConfiguration, smartyConfiguration: configuration.smartyConfiguration, splash: splash };
	}

}

module.exports = new View();


text:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <extension
         point="org.eclipse.ui.editors">
      <editor
            class="raven.sqdev.editors.BasicCodeEditor"
            default="false"
            id="Raven.SQDev.Editors.BasicCodeEditor"
            name="BasicCodeEditor">
      </editor>
      <editor
            class="raven.sqdev.editors.sqdevEditor.SQDevFileEditor"
            default="true"
            extensions="sqdev"
            icon="platform:plugin/raven.sqdev.misc/resources/icons/sqdevFileIcon.png"
            id="raven.sqdev.editors.sqdevfileeditor"
            name="SQDevFileEditor">
      </editor>
      <editor
            class="raven.sqdev.editors.stringTableEditor.StringTableEditor"
            default="true"
            filenames="stringtable.xml"
            icon="platform:plugin/raven.sqdev.misc/resources/icons/StringTableIcon.png"
            id="raven.sqdev.editors.stringtableeditor"
            name="StringTableEditor">
      </editor>
      <editor
            class="raven.sqdev.editors.other.ConfigEditor"
            default="true"
            extensions="cpp, hpp, sqm, ext"
            id="raven.sqdev.editors.configEditor"
            name="ConfigEditor">
      </editor>
   </extension>

</plugin>


text:
package com.orm;

// Generated 2015-4-1 10:16:49 by Hibernate Tools 3.2.2.GA

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * SystemUser generated by hbm2java
 */
@Entity
@Table(name = "SYSTEM_USER", schema = "FINANCE")
public class SystemUser implements java.io.Serializable {

	private Integer userid;
	private String usercode;
	private String username;
	private Integer userage;
	private String userkey;
	private String usertel;
	private String usersex;
	private String account;
	private String password;
	private String userrolename;
	private SystemRole systemrole;

	public SystemUser() {
	}

	public SystemUser(Integer userid) {
		this.userid = userid;
	}

	public SystemUser(Integer userid, String username, String usercode, Integer userage,
			String userkey, String usertel, String usersex, String account,
			String password,SystemRole systemrole, String userrolename) {
		this.userid = userid;
		this.usercode=usercode;
		this.username = username;
		this.userage = userage;
		this.userkey = userkey;
		this.usertel = usertel;
		this.usersex = usersex;
		this.account = account;
		this.password = password;
		this.systemrole=systemrole;
		this.userrolename=userrolename;
	}

	@Id
	@SequenceGenerator(name="sequenceUser",sequenceName="SEQ")
	@GeneratedValue(generator="sequenceUser",strategy=GenerationType.SEQUENCE)
	@Column(name = "USERID", unique = true, nullable = false, precision = 22, scale = 0)
	public Integer getUserid() {
		return this.userid;
	}

	public void setUserid(Integer userid) {
		this.userid = userid;
	}

	@Column(name = "USERNAME", length = 30)
	public String getUsername() {
		return this.username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	@Column(name = "USERAGE", precision = 22, scale = 0)
	public Integer getUserage() {
		return this.userage;
	}

	public void setUserage(Integer userage) {
		this.userage = userage;
	}

	@Column(name = "USERKEY", length = 30)
	public String getUserkey() {
		return this.userkey;
	}

	public void setUserkey(String userkey) {
		this.userkey = userkey;
	}

	@Column(name = "USERTEL", length = 15)
	public String getUsertel() {
		return this.usertel;
	}

	public void setUsertel(String usertel) {
		this.usertel = usertel;
	}

	@Column(name = "USERSEX", length = 5)
	public String getUsersex() {
		return this.usersex;
	}

	public void setUsersex(String usersex) {
		this.usersex = usersex;
	}

	@Column(name = "ACCOUNT", unique = true, nullable = false, length = 20)
	public String getAccount() {
		return this.account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	@Column(name = "PASSWORD", length = 100)
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "ROLE")
	public SystemRole getSystemrole() {
		return systemrole;
	}

	public void setSystemrole(SystemRole systemrole) {
		this.systemrole = systemrole;
	}

	@Column(name = "USERCODE", length = 20)
	public String getUsercode() {
		return usercode;
	}

	public void setUsercode(String usercode) {
		this.usercode = usercode;
	}
	@Column(name = "USERROLENAME", length = 20)
	public String getUserrolename() {
		return userrolename;
	}

	public void setUserrolename(String userrolename) {
		this.userrolename = userrolename;
	}

}


text:
package org.bgp4j.config.global;

import org.bgp4j.config.nodes.PeerConfiguration;

/**
 * @author Rainer Bieniek (Rainer.Bieniek@web.de)
 *
 */
public class PeerConfigurationEvent extends TypedEvent {

	private PeerConfiguration former;
	private PeerConfiguration current;

	public PeerConfigurationEvent(EventType type, PeerConfiguration former, PeerConfiguration current) {
		super(type);

		this.former = former;
		this.current = current;
	}

	/**
	 * @return the configuration
	 */
	public PeerConfiguration getFormer() {
		return former;
	}

	/**
	 * @return the current
	 */
	public PeerConfiguration getCurrent() {
		return current;
	}
}


text:
package core

import (
	"reflect"
	"sync"
	"testing"

	"k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/kubernetes/pkg/scheduler/util"
)

var mediumPriority = (lowPriority + highPriority) / 2
var highPriorityPod, medPriorityPod, unschedulablePod = v1.Pod{
	ObjectMeta: metav1.ObjectMeta{
		Name:      "hpp",
		Namespace: "ns1",
	},
	Spec: v1.PodSpec{
		Priority: &highPriority,
	},
},
	v1.Pod{
		ObjectMeta: metav1.ObjectMeta{
			Name:      "mpp",
			Namespace: "ns2",
			Annotations: map[string]string{
				NominatedNodeAnnotationKey: "node1", "annot2": "val2",
			},
		},
		Spec: v1.PodSpec{
			Priority: &mediumPriority,
		},
	},
	v1.Pod{
		ObjectMeta: metav1.ObjectMeta{
			Name:      "up",
			Namespace: "ns1",
			Annotations: map[string]string{
				NominatedNodeAnnotationKey: "node1", "annot2": "val2",
			},
		},
		Spec: v1.PodSpec{
			Priority: &lowPriority,
		},
		Status: v1.PodStatus{
			Conditions: []v1.PodCondition{
				{
					Type:   v1.PodScheduled,
					Status: v1.ConditionFalse,
					Reason: v1.PodReasonUnschedulable,
				},
			},
		},
	}

func TestPriorityQueue_Add(t *testing.T) {
	q := NewPriorityQueue()
	q.Add(&medPriorityPod)
	q.Add(&unschedulablePod)
	q.Add(&highPriorityPod)
	if p, err := q.Pop(); err != nil || p != &highPriorityPod {
		t.Errorf("Expected: %v after Pop, but got: %v", highPriorityPod.Name, p.Name)
	}
	if p, err := q.Pop(); err != nil || p != &medPriorityPod {
		t.Errorf("Expected: %v after Pop, but got: %v", medPriorityPod.Name, p.Name)
	}
	if p, err := q.Pop(); err != nil || p != &unschedulablePod {
		t.Errorf("Expected: %v after Pop, but got: %v", unschedulablePod.Name, p.Name)
	}
}

func TestPriorityQueue_Pop(t *testing.T) {
	q := NewPriorityQueue()
	wg := sync.WaitGroup{}
	wg.Add(1)
	go func() {
		defer wg.Done()
		if p, err := q.Pop(); err != nil || p != &highPriorityPod {
			t.Errorf("Expected: %v after Pop, but got: %v", highPriorityPod.Name, p.Name)
		}
	}()
	q.Add(&highPriorityPod)
	wg.Wait()
}

func TestPriorityQueue_Update(t *testing.T) {
	q := NewPriorityQueue()
	q.Update(&highPriorityPod)
	if _, exists, _ := q.activeQ.Get(&highPriorityPod); !exists {
		t.Errorf("Expected %v to be added to activeQ.", highPriorityPod.Name)
	}
	q.Update(&highPriorityPod)
	if q.activeQ.data.Len() != 1 {
		t.Error("Expected only one item in activeQ.")
	}
	// Updating an unschedulable pod which is not in any of the two queues, should
	// add the pod to activeQ.
	q.Update(&unschedulablePod)
	if _, exists, _ := q.activeQ.Get(&unschedulablePod); !exists {
		t.Errorf("Expected %v to be added to activeQ.", unschedulablePod.Name)
	}
	// Updating a pod that is already in unschedulableQ, should move the pod to
	// activeQ.
	q.Update(&unschedulablePod)
	if len(q.unschedulableQ.pods) != 0 {
		t.Error("Expected unschedulableQ to be empty.")
	}
	if _, exists, _ := q.activeQ.Get(&unschedulablePod); !exists {
		t.Errorf("Expected: %v to be added to activeQ.", unschedulablePod.Name)
	}
	if p, err := q.Pop(); err != nil || p != &highPriorityPod {
		t.Errorf("Expected: %v after Pop, but got: %v", highPriorityPod.Name, p.Name)
	}
}

func TestPriorityQueue_Delete(t *testing.T) {
	q := NewPriorityQueue()
	q.Update(&highPriorityPod)
	q.Add(&unschedulablePod)
	q.Delete(&highPriorityPod)
	if _, exists, _ := q.activeQ.Get(&unschedulablePod); !exists {
		t.Errorf("Expected %v to be in activeQ.", unschedulablePod.Name)
	}
	if _, exists, _ := q.activeQ.Get(&highPriorityPod); exists {
		t.Errorf("Didn't expect %v to be in activeQ.", highPriorityPod.Name)
	}
}

func TestPriorityQueue_MoveAllToActiveQueue(t *testing.T) {
	q := NewPriorityQueue()
	q.Add(&medPriorityPod)
	q.unschedulableQ.Add(&unschedulablePod)
	q.unschedulableQ.Add(&highPriorityPod)
	q.MoveAllToActiveQueue()
	if q.activeQ.data.Len() != 3 {
		t.Error("Expected all items to be in activeQ.")
	}
}

// TestPriorityQueue_AssignedPodAdded tests AssignedPodAdded. It checks that
// when a pod with pod affinity is in unschedulableQ and another pod with a
// matching label is added, the unschedulable pod is moved to activeQ.
func TestPriorityQueue_AssignedPodAdded(t *testing.T) {
	affinityPod := unschedulablePod.DeepCopy()
	affinityPod.Name = "afp"
	affinityPod.Spec = v1.PodSpec{
		Affinity: &v1.Affinity{
			PodAffinity: &v1.PodAffinity{
				RequiredDuringSchedulingIgnoredDuringExecution: []v1.PodAffinityTerm{
					{
						LabelSelector: &metav1.LabelSelector{
							MatchExpressions: []metav1.LabelSelectorRequirement{
								{
									Key:      "service",
									Operator: metav1.LabelSelectorOpIn,
									Values:   []string{"securityscan", "value2"},
								},
							},
						},
						TopologyKey: "region",
					},
				},
			},
		},
		Priority: &mediumPriority,
	}
	labelPod := v1.Pod{
		ObjectMeta: metav1.ObjectMeta{
			Name:      "lbp",
			Namespace: affinityPod.Namespace,
			Labels:    map[string]string{"service": "securityscan"},
		},
		Spec: v1.PodSpec{NodeName: "machine1"},
	}

	q := NewPriorityQueue()
	q.Add(&medPriorityPod)
	// Add a couple of pods to the unschedulableQ.
	q.unschedulableQ.Add(&unschedulablePod)
	q.unschedulableQ.Add(affinityPod)
	// Simulate addition of an assigned pod. The pod has matching labels for
	// affinityPod. So, affinityPod should go to activeQ.
	q.AssignedPodAdded(&labelPod)
	if q.unschedulableQ.Get(affinityPod) != nil {
		t.Error("affinityPod is still in the unschedulableQ.")
	}
	if _, exists, _ := q.activeQ.Get(affinityPod); !exists {
		t.Error("affinityPod is not moved to activeQ.")
	}
	// Check that the other pod is still in the unschedulableQ.
	if q.unschedulableQ.Get(&unschedulablePod) == nil {
		t.Error("unschedulablePod is not in the unschedulableQ.")
	}
}

func TestUnschedulablePodsMap(t *testing.T) {
	var pods = []*v1.Pod{
		{
			ObjectMeta: metav1.ObjectMeta{
				Name:      "p0",
				Namespace: "ns1",
				Annotations: map[string]string{
					NominatedNodeAnnotationKey: "node1", "annot2": "val2",
				},
			},
		},
		{
			ObjectMeta: metav1.ObjectMeta{
				Name:      "p1",
				Namespace: "ns1",
				Annotations: map[string]string{
					"annot": "val",
				},
			},
		},
		{
			ObjectMeta: metav1.ObjectMeta{
				Name:      "p2",
				Namespace: "ns2",
				Annotations: map[string]string{
					NominatedNodeAnnotationKey: "node3", "annot2": "val2", "annot3": "val3",
				},
			},
		},
		{
			ObjectMeta: metav1.ObjectMeta{
				Name:      "p3",
				Namespace: "ns4",
				Annotations: map[string]string{
					NominatedNodeAnnotationKey: "node1",
				},
			},
		},
	}
	var updatedPods = make([]*v1.Pod, len(pods))
	updatedPods[0] = pods[0].DeepCopy()
	updatedPods[0].Annotations[NominatedNodeAnnotationKey] = "node3"
	updatedPods[1] = pods[1].DeepCopy()
	updatedPods[1].Annotations[NominatedNodeAnnotationKey] = "node3"
	updatedPods[3] = pods[3].DeepCopy()
	delete(updatedPods[3].Annotations, NominatedNodeAnnotationKey)

	tests := []struct {
		podsToAdd                    []*v1.Pod
		expectedMapAfterAdd          map[string]*v1.Pod
		expectedNominatedAfterAdd    map[string][]string
		podsToUpdate                 []*v1.Pod
		expectedMapAfterUpdate       map[string]*v1.Pod
		expectedNominatedAfterUpdate map[string][]string
		podsToDelete                 []*v1.Pod
		expectedMapAfterDelete       map[string]*v1.Pod
		expectedNominatedAfterDelete map[string][]string
	}{
		{
			podsToAdd: []*v1.Pod{pods[0], pods[1], pods[2], pods[3]},
			expectedMapAfterAdd: map[string]*v1.Pod{
				util.GetPodFullName(pods[0]): pods[0],
				util.GetPodFullName(pods[1]): pods[1],
				util.GetPodFullName(pods[2]): pods[2],
				util.GetPodFullName(pods[3]): pods[3],
			},
			expectedNominatedAfterAdd: map[string][]string{
				"node1": {util.GetPodFullName(pods[0]), util.GetPodFullName(pods[3])},
				"node3": {util.GetPodFullName(pods[2])},
			},
			podsToUpdate: []*v1.Pod{updatedPods[0]},
			expectedMapAfterUpdate: map[string]*v1.Pod{
				util.GetPodFullName(pods[0]): updatedPods[0],
				util.GetPodFullName(pods[1]): pods[1],
				util.GetPodFullName(pods[2]): pods[2],
				util.GetPodFullName(pods[3]): pods[3],
			},
			expectedNominatedAfterUpdate: map[string][]string{
				"node1": {util.GetPodFullName(pods[3])},
				"node3": {util.GetPodFullName(pods[2]), util.GetPodFullName(pods[0])},
			},
			podsToDelete: []*v1.Pod{pods[0], pods[1]},
			expectedMapAfterDelete: map[string]*v1.Pod{
				util.GetPodFullName(pods[2]): pods[2],
				util.GetPodFullName(pods[3]): pods[3],
			},
			expectedNominatedAfterDelete: map[string][]string{
				"node1": {util.GetPodFullName(pods[3])},
				"node3": {util.GetPodFullName(pods[2])},
			},
		},
		{
			podsToAdd: []*v1.Pod{pods[0], pods[3]},
			expectedMapAfterAdd: map[string]*v1.Pod{
				util.GetPodFullName(pods[0]): pods[0],
				util.GetPodFullName(pods[3]): pods[3],
			},
			expectedNominatedAfterAdd: map[string][]string{
				"node1": {util.GetPodFullName(pods[0]), util.GetPodFullName(pods[3])},
			},
			podsToUpdate: []*v1.Pod{updatedPods[3]},
			expectedMapAfterUpdate: map[string]*v1.Pod{
				util.GetPodFullName(pods[0]): pods[0],
				util.GetPodFullName(pods[3]): updatedPods[3],
			},
			expectedNominatedAfterUpdate: map[string][]string{
				"node1": {util.GetPodFullName(pods[0])},
			},
			podsToDelete:                 []*v1.Pod{pods[0], pods[3]},
			expectedMapAfterDelete:       map[string]*v1.Pod{},
			expectedNominatedAfterDelete: map[string][]string{},
		},
		{
			podsToAdd: []*v1.Pod{pods[1], pods[2]},
			expectedMapAfterAdd: map[string]*v1.Pod{
				util.GetPodFullName(pods[1]): pods[1],
				util.GetPodFullName(pods[2]): pods[2],
			},
			expectedNominatedAfterAdd: map[string][]string{
				"node3": {util.GetPodFullName(pods[2])},
			},
			podsToUpdate: []*v1.Pod{updatedPods[1]},
			expectedMapAfterUpdate: map[string]*v1.Pod{
				util.GetPodFullName(pods[1]): updatedPods[1],
				util.GetPodFullName(pods[2]): pods[2],
			},
			expectedNominatedAfterUpdate: map[string][]string{
				"node3": {util.GetPodFullName(pods[2]), util.GetPodFullName(updatedPods[1])},
			},
			podsToDelete: []*v1.Pod{pods[2], pods[3]},
			expectedMapAfterDelete: map[string]*v1.Pod{
				util.GetPodFullName(pods[1]): updatedPods[1],
			},
			expectedNominatedAfterDelete: map[string][]string{
				"node3": {util.GetPodFullName(updatedPods[1])},
			},
		},
	}

	for i, test := range tests {
		upm := newUnschedulablePodsMap()
		for _, p := range test.podsToAdd {
			upm.Add(p)
		}
		if !reflect.DeepEqual(upm.pods, test.expectedMapAfterAdd) {
			t.Errorf("#%d: Unexpected map after adding pods. Expected: %v, got: %v",
				i, test.expectedMapAfterAdd, upm.pods)
		}
		if !reflect.DeepEqual(upm.nominatedPods, test.expectedNominatedAfterAdd) {
			t.Errorf("#%d: Unexpected nominated map after adding pods. Expected: %v, got: %v",
				i, test.expectedNominatedAfterAdd, upm.nominatedPods)
		}
		if len(test.podsToUpdate) > 0 {
			for _, p := range test.podsToUpdate {
				upm.Update(p)
			}
			if !reflect.DeepEqual(upm.pods, test.expectedMapAfterUpdate) {
				t.Errorf("#%d: Unexpected map after updating pods. Expected: %v, got: %v",
					i, test.expectedMapAfterUpdate, upm.pods)
			}
			if !reflect.DeepEqual(upm.nominatedPods, test.expectedNominatedAfterUpdate) {
				t.Errorf("#%d: Unexpected nominated map after updating pods. Expected: %v, got: %v",
					i, test.expectedNominatedAfterUpdate, upm.nominatedPods)
			}
		}
		for _, p := range test.podsToDelete {
			upm.Delete(p)
		}
		if !reflect.DeepEqual(upm.pods, test.expectedMapAfterDelete) {
			t.Errorf("#%d: Unexpected map after deleting pods. Expected: %v, got: %v",
				i, test.expectedMapAfterDelete, upm.pods)
		}
		if !reflect.DeepEqual(upm.nominatedPods, test.expectedNominatedAfterDelete) {
			t.Errorf("#%d: Unexpected nominated map after deleting pods. Expected: %v, got: %v",
				i, test.expectedNominatedAfterDelete, upm.nominatedPods)
		}
		upm.Clear()
		if len(upm.pods) != 0 {
			t.Errorf("Expected the map to be empty, but has %v elements.", len(upm.pods))
		}
	}
}


text:
package org.kie.remote.client.documentation;

import java.net.MalformedURLException;
import java.net.URL;

import org.kie.api.runtime.manager.RuntimeEngine;
import org.kie.remote.client.api.RemoteJmsRuntimeEngineFactory;
import org.kie.remote.client.api.RemoteRuntimeEngineFactory;

//TODO: changed, add to documentation
public class MigrationFrom6_0To6_2Example {

    /**
     * In the 6.0.x code, we did this:
     *
     *  // Setup remote JMS runtime engine factory
     *  RemoteJmsRuntimeEngineFactory remoteJmsFactory
     *      = new RemoteJmsRuntimeEngineFactory(deploymentId, serverUrl, user, password);
     *
     *  // Create runtime engine
     *  RuntimeEngine engine = remoteJmsFactory.newRuntimeEngine();
     */
    public void createJmsRuntimeEngine(String deploymentId, URL serverUrl, String user, String password) {
        // Now we just do this:
        RuntimeEngine engine = RemoteRuntimeEngineFactory.newJmsBuilder()
                .addDeploymentId(deploymentId)
                .addJbossServerHostName(serverUrl.getHost())
                .addUserName(user)
                .addPassword(password)
                .build();

        // If you still want to use the factory to create multiple instances, you can always still do this:
        RemoteJmsRuntimeEngineFactory jmsRuntimeFactory = RemoteRuntimeEngineFactory.newJmsBuilder()
                .addDeploymentId(deploymentId)
                .addJbossServerHostName(serverUrl.getHost())
                .addUserName(user)
                .addPassword(password)
                .buildFactory();

        engine = jmsRuntimeFactory.newRuntimeEngine();
    }

    /**
     * With the introduction of the fluent/builder API in 6.0.x, we could do this:
     *
     *   RemoteRestRuntimeEngineFactory factory =
     *          RemoteRestRuntimeEngineFactory.newBuilder()
     *          .addUserName("user")
     *          .addPassword("pass")
     *          .addUrl(new URL("http://localhost:8080/business-central"))
     *          .build();
     *
     *   RuntimeEngine runtimeEngine = factory.newRuntimeEngine();
     *
     * With the 6.0.x code, we built a factory, that we then used to create the runtime..
     *
     * Why not just build the runtime immediately? :)
     */
    public void createRestRuntimeEngineWithBuilder() throws MalformedURLException {
        // unfortunately, this breaks backward compatibility, but the improvement and clarity in the API is worth the risk
        RuntimeEngine runtimeEngine =
               RemoteRuntimeEngineFactory.newRestBuilder()
               .addUserName("user")
               .addPassword("pass")
               .addUrl(new URL("http://localhost:8080/business-central"))
               .build();

    }
}


text:
using Newtonsoft.Json;
using SimpleSlack.WebAPI.Core.Converters;
using SimpleSlack.WebAPI.Models;

namespace SimpleSlack.WebAPI.Requests.Groups
{
    internal class GroupsHistoryRequest : BaseRequest
    {
        internal override string Command => "groups.history";

        [JsonProperty("channel")]
        public string Channel { get; set; }

        [JsonProperty("count")]
        public int? Count { get; set; }

        [JsonProperty("inclusive")]
        public bool? Inclusive { get; set; }

        [JsonProperty("latest")]
        [JsonConverter(typeof(AccurateDateTimeConverter))]
        public AccurateDateTime Latest { get; set; }

        [JsonProperty("oldest")]
        [JsonConverter(typeof(AccurateDateTimeConverter))]
        public AccurateDateTime Oldest { get; set; }

        [JsonProperty("unreads")]
        public bool? Unreads { get; set; }
    }
}


text:
<?php

namespace PHP\Math\BigIntegerTest;

use PHP\Math\BigInteger\BigInteger;
use PHPUnit_Framework_TestCase;

class BigIntegerFactorialTest extends PHPUnit_Framework_TestCase
{
    public function testFactorial()
    {
        // Arrange
        $bigInteger = new BigInteger('5');

        // Act
        $bigIntegerValue = $bigInteger->factorial();

        // Assert
        $this->assertInternalType('string', $bigIntegerValue->getValue());
        $this->assertEquals('120', $bigIntegerValue->getValue());
    }

    public function testWithMutableFalse()
    {
        // Arrange
        $bigInteger = new BigInteger('5', false);

        // Act
        $newBigInteger = $bigInteger->factorial();

        // Assert
        $this->assertInstanceOf('PHP\Math\BigInteger\BigInteger', $bigInteger);
        $this->assertInstanceOf('PHP\Math\BigInteger\BigInteger', $newBigInteger);
        $this->assertEquals('5', $bigInteger->getValue());
        $this->assertEquals('120', $newBigInteger->getValue());
    }

    public function testWithMutableTrue()
    {
        // Arrange
        $bigInteger = new BigInteger('5', true);

        // Act
        $newBigInteger = $bigInteger->factorial();

        // Assert
        $this->assertInstanceOf('PHP\Math\BigInteger\BigInteger', $bigInteger);
        $this->assertInstanceOf('PHP\Math\BigInteger\BigInteger', $newBigInteger);
        $this->assertEquals('120', $bigInteger->getValue());
        $this->assertEquals('120', $newBigInteger->getValue());
    }
}


text:
import use_package_before_def

if __name__ == "__main__":
    use_package_before_def.call_main()


text:
(function(){
  'use strict';

  angular
  .module('lsv')
  .controller('NavCtrl', function ($scope, $rootScope, $mdSidenav, $route, $location, SensorService){
    var self = this;
    // self.plant = SensorService.getStats();

    self.currentView = $location.path();

    self.registered = false;

    self.toggleSideNav = function (name){
      $mdSidenav(name).toggle();
    }

    $scope.$on('$routeChangeStart', function(){
      $mdSidenav('left').close();
    });
    $scope.$on('$routeChangeSuccess', function(){
      self.current = $location.path();
      self.registered = SensorService.isRegistered();
    })
  })
  .controller('WelcomeCtrl', function ($http, SensorService, $mdDialog){
    if(SensorService.isRegistered()){
      // Lame ...
      window.location = '#/plant';
    }
    var self = this;

    self.registerPlant = function(){
      var alert = $mdDialog.alert({
        title: 'Enregistre ta plante',
        template:
         '<md-dialog aria-label="List dialog">' +
         '  <md-content>'+
         '    <md-input-container>'+
         '       Nom de la plante'+
         '       <input ng-model="plantName" required type="text">'+
         '     </md-input-container>'+
         '  </md-content>' +
         '
' +
         '    <md-button ng-click="submitDialog()">' +
         '      Ok' +
         '    </md-button>' +
         '
' +
         '</md-dialog>',
        controller: DialogController
      });
      $mdDialog
        .show(alert)
        .finally(function() {
          alert = null;
        });
      function DialogController(scope, $mdDialog) {
        scope.submitDialog = function() {
          console.log(scope.plantName);
          if(scope.plantName.length){
            SensorService.pushPlant(scope.plantName, function(){
              $mdDialog.hide();
              window.location = '#/plant';
            });
          }
        }
      }
    }

    self.tryGetSensor = function(){
      SensorService.getSensor().success(function (data){
        self.registerPlant();
      });
    }
  })
  .controller('PlantCtrl', function (SensorService, FactsService){
    var self = this;
    var plantPromise = SensorService.getStats();
    plantPromise.then(function(plant){
      self.plant = plant;
      console.log(self.plant);
    })

    this.showFact = function(){
      FactsService.getRandomFact();
    }
  })
  .controller('SettingsCtrl', function ($mdSidenav){
  })

})();


text:
package org.mindinformatics.gwt.domeo.plugins.annotation.micropubs.model;

import org.mindinformatics.gwt.domeo.model.selectors.MSelector;

/**
 * @author Paolo Ciccarese <paolo.ciccarese@gmail.com>
 */
public class MMpElement {

	protected MSelector selector;

	public MSelector getSelector() {
		return selector;
	}

	public void setSelector(MSelector selector) {
		this.selector = selector;
	}
}


text:
from cliff import command
from cliff import lister
from cliff import show

from gnocchiclient import utils

class CliArchivePolicyList(lister.Lister):
    """List archive policies."""

    COLS = ('name',
            'back_window', 'definition', 'aggregation_methods')

    def take_action(self, parsed_args):
        policies = utils.get_client(self).archive_policy.list()
        if parsed_args.formatter == 'table':
            for ap in policies:
                utils.format_archive_policy(ap)
        return utils.list2cols(self.COLS, policies)

class CliArchivePolicyShow(show.ShowOne):
    """Show an archive policy."""

    def get_parser(self, prog_name):
        parser = super(CliArchivePolicyShow, self).get_parser(prog_name)
        parser.add_argument("name",
                            help="Name of the archive policy")
        return parser

    def take_action(self, parsed_args):
        ap = utils.get_client(self).archive_policy.get(
            name=parsed_args.name)
        if parsed_args.formatter == 'table':
            utils.format_archive_policy(ap)
        return self.dict2columns(ap)

def archive_policy_definition(string):
    parts = string.split(",")
    defs = {}
    for part in parts:
        attr, __, value = part.partition(":")
        if (attr not in ['granularity', 'points', 'timespan'] or
           value is None):
            raise ValueError
        defs[attr] = value
    if len(defs) < 2:
        raise ValueError
    return defs

class CliArchivePolicyWriteBase(show.ShowOne):
    def get_parser(self, prog_name):
        parser = super(CliArchivePolicyWriteBase, self).get_parser(prog_name)
        parser.add_argument("name", help="name of the archive policy")
        parser.add_argument("-d", "--definition", action='append',
                            required=True, type=archive_policy_definition,
                            metavar="<DEFINITION>",
                            help=("two attributes (separated by ',') of an "
                                  "archive policy definition with its name "
                                  "and value separated with a ':'"))
        return parser

class CliArchivePolicyCreate(CliArchivePolicyWriteBase):
    """Create an archive policy."""

    def get_parser(self, prog_name):
        parser = super(CliArchivePolicyCreate, self).get_parser(prog_name)
        parser.add_argument("-b", "--back-window", dest="back_window",
                            type=int,
                            help="back window of the archive policy")
        parser.add_argument("-m", "--aggregation-method",
                            action="append",
                            dest="aggregation_methods",
                            help="aggregation method of the archive policy")
        return parser

    def take_action(self, parsed_args):
        archive_policy = utils.dict_from_parsed_args(
            parsed_args, ['name', 'back_window', 'aggregation_methods',
                          'definition'])
        ap = utils.get_client(self).archive_policy.create(
            archive_policy=archive_policy)
        if parsed_args.formatter == 'table':
            utils.format_archive_policy(ap)
        return self.dict2columns(ap)

class CliArchivePolicyUpdate(CliArchivePolicyWriteBase):
    """Update an archive policy."""

    def take_action(self, parsed_args):
        archive_policy = utils.dict_from_parsed_args(
            parsed_args, ['definition'])
        ap = utils.get_client(self).archive_policy.update(
            name=parsed_args.name, archive_policy=archive_policy)
        if parsed_args.formatter == 'table':
            utils.format_archive_policy(ap)
        return self.dict2columns(ap)

class CliArchivePolicyDelete(command.Command):
    """Delete an archive policy."""

    def get_parser(self, prog_name):
        parser = super(CliArchivePolicyDelete, self).get_parser(prog_name)
        parser.add_argument("name",
                            help="Name of the archive policy")
        return parser

    def take_action(self, parsed_args):
        utils.get_client(self).archive_policy.delete(name=parsed_args.name)


text:
package net.java.cargotracker.interfaces.booking.web;

import net.java.cargotracker.domain.model.airport.Airport;
import net.java.cargotracker.domain.model.carrier.Carrier;
import net.java.cargotracker.domain.model.flight.Flight;
import net.java.cargotracker.interfaces.booking.facade.AirServiceFacade;

import javax.annotation.PostConstruct;
import javax.enterprise.context.RequestScoped;
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
import javax.inject.Inject;
import javax.inject.Named;
import java.util.ArrayList;
import java.util.List;

/**
 * Handles listing flights.
 *
 * Operates against a dedicated service facade.
 *
 * ToDo: include filters for different views.
 *
 */

@Named
@RequestScoped
public class ListFlights {

    private List<Flight> allFlights;
    private List<Airport> allPorts;
    private List<Carrier> allLines;

    @Inject
    private AirServiceFacade airService;

    public List<Flight> getAllFlights() {
        return allFlights;
    }

    public List<Airport> getAllPorts() {
        return allPorts;
    }

    public List<Carrier> getAllLines() { return allLines; }

    @PostConstruct
    public void init() {
        allFlights = airService.listAllFlights();
        allPorts = airService.listAirports();
        allLines = airService.listCarriers();
    }

    public void cancelFlight(int number) {
        airService.cxlFlight(number);
    }

}


text:
package com.spider.proxy.processer;

import com.spider.proxy.domain.Proxy;
import com.spider.proxy.service.ProxyService;
import com.spider.proxy.utils.ProxyValidater;
import com.spider.proxy.vo.ProxyVo;
import org.springframework.stereotype.Component;
import us.codecraft.webmagic.Page;
import us.codecraft.webmagic.Site;
import us.codecraft.webmagic.Spider;
import us.codecraft.webmagic.processor.PageProcessor;
import us.codecraft.webmagic.selector.Selectable;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * Created by wangke on 2017/10/9.
 */
@Component
public class SixSixIpProcesser implements PageProcessor{

    private Site site = Site.me().setRetryTimes(5).setSleepTime(1000).setTimeOut(10000);

    /**
     * Main page
     */
    private String mainPage;

    /**
     * Page No.
     */
    private static int pageNo;

    @Resource
    private ProxyService proxyService;

    private Set<String> proxySet = new HashSet<String>();

    public String get66IpMainPage() {
        return mainPage;
    }

    public void set66IpMainPage(String mainPage) {
        this.mainPage = mainPage;
        pageNo = 1;
    }

    @Override
    public void process(Page page) {
        List<Selectable> nodes = page.getHtml().xpath("//div[@id='footer']/div/table/tbody/tr/allText()").nodes();
        for (int index=1; index<nodes.size(); index++){
            String proxyInfo = nodes.get(index).toString();
            String[] infos = proxyInfo.split(" ");
            if (infos.length>=6){
                ProxyVo proxyVo = new ProxyVo();
                proxyVo.setIp(infos[0]);
                proxyVo.setPort(infos[1]);
                proxyVo.setAddress(infos[2]);
                proxyVo.setAnonymous(infos[3]);
                proxyVo.setVerifyTime(infos[4]);

                ProxyThreadPool.post(new Runnable() {
                    private String ip;

                    private String port;

                    @Override
                    public void run() {
                        boolean isValidProxy = ProxyValidater.checkProxy(ip, port);
                        String proxy = ip + ":" + port;
                        if (isValidProxy && !proxySet.contains(proxy)){
                            proxySet.add(proxy);
                            //FileUtil.saveProxy("/proxy", proxy);

                            Proxy proxy1 = new Proxy();
                            proxy1.setIp(ip);
                            proxy1.setPort(Integer.valueOf(port));
                            proxyService.saveProxy(proxy1);
                            System.out.println("Successed to add new proxy," + proxy);
                        }
                        else {
                            System.out.println("Failed to add new proxy," + ","+ proxy);
                        }
                    }

                    public Runnable init(String ip, String port) {
                        this.ip = ip;
                        this.port = port;
                        return this;
                    }
                }.init(proxyVo.getIp(), proxyVo.getPort()));

            }
        }
        List links = new ArrayList<String>();
        if (pageNo<=5) {
            links.add(String.format(this.get66IpMainPage(), ++pageNo));
            page.addTargetRequests(links);
        }
    }

    @Override
    public Site getSite() {
        return site;
    }

    public static void main(String[] args){
        String sixIp = "http://www.66ip.cn/areaindex_35/%d.html";

        SixSixIpProcesser processor = new SixSixIpProcesser();
        processor.set66IpMainPage(sixIp);
        String url = String.format(sixIp, 1);
        Spider.create(processor).addUrl(url).thread(20).run();
    }
}


text:
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE LambdaCase #-}

import           BuildInfo_ambiata_mismi_cli
import           DependencyInfo_ambiata_mismi_cli

import           Control.Lens (over, set)
import           Control.Monad.IO.Class (MonadIO, liftIO)
import           Control.Monad.Trans.Resource (runResourceT)

import qualified Data.ByteString as BS
import           Data.Conduit ((=$=), ($$), ($$+-))
import qualified Data.Conduit.List as DC
import qualified Data.List as List
import           Data.Map (Map)
import qualified Data.Map.Strict as Map
import           Data.String (String)
import qualified Data.Text as T
import qualified Data.Text.IO as T

import           Mismi.Amazonka (serviceRetry, retryAttempts, exponentBase, configure)
import qualified Mismi.Environment as C
import qualified Mismi.OpenSSL as O
import           Mismi.S3
import           Mismi.S3.Amazonka (s3)

import           P hiding (All)

import           System.IO (BufferMode (..), FilePath, IO, hSetBuffering, print, stderr, stdout)
import           System.Environment (lookupEnv)
import           System.Exit (ExitCode (..), exitFailure, exitSuccess)
import qualified System.FilePath as FP
import           System.Posix.Signals (Handler (..), installHandler, sigINT, sigQUIT, sigTERM)
import           System.Posix.Process (exitImmediately)

import           Text.Printf (printf)

import           X.Control.Monad.Trans.Either.Exit (orDie)
import           X.Control.Monad.Trans.Either (EitherT, eitherT, runEitherT, firstEitherT)
import           X.Options.Applicative (Completer, Parser, RunType (..), SafeCommand (..)
                                       , action, auto, command', flag, flag', help, long, metavar
                                       , pOption, option, short, value)
import qualified X.Options.Applicative as XOA

data Recursive =
    NotRecursive
  | Recursive
    deriving (Eq, Show)

rec :: a -> a -> Recursive -> a
rec notrecursive recursive r =
  case r of
    NotRecursive ->
      notrecursive
    Recursive ->
      recursive

data Detail =
    All
  | Summary
    deriving (Eq, Show)

data UnitPrefix =
    NoPrefix
  | IEC
  | Metric
    deriving (Eq, Show)

data Command =
    Upload Recursive FilePath Address WriteMode Int
  | Download Recursive Address FilePath
  | Copy Address Address WriteMode
  | Concat [Address] Address WriteMode Int
  | Move Address Address
  | Exists Address
  | Delete Address Recursive
  | Write Address Text WriteMode
  | Read Address
  | Cat Address
  | Size Address Recursive Detail UnitPrefix
  | Sync Address Address SyncMode Int
  | List Address Recursive
  deriving (Eq, Show)

data Force =
    NotForce
  | Force
    deriving (Eq, Show)

parseForce :: Maybe String -> Force
parseForce f =
  case f of
    Just "true" ->
      Force
    _ ->
      NotForce

main :: IO ()
main = do
  hSetBuffering stdout LineBuffering
  hSetBuffering stderr LineBuffering
  forM_ [sigINT, sigTERM, sigQUIT] $ \s ->
    installHandler s (Catch . void . exitImmediately $ ExitFailure 111) Nothing

  f <- lookupEnv "AWS_FORCE"
  XOA.dispatch (mismi $ parseForce f) >>= \case
      VersionCommand ->
        T.putStrLn ("s3: " <> T.pack buildInfoVersion) >> exitSuccess
      DependencyCommand ->
        mapM (T.putStrLn . T.pack)  dependencyInfo >> exitSuccess
      RunCommand DryRun c ->
        print c >> exitSuccess
      RunCommand RealRun c ->
        run c

run :: Command -> IO ()
run c = do
  openssl <- fmap (maybe False (\s -> s == "true" || s == "1")) $ lookupEnv "AWS_OPENSSL"

  e <- case openssl of
    True ->
      orDie O.renderRegionError O.discoverAWSEnv
    False ->
      orDie C.renderRegionError C.discoverAWSEnv
  let
    e' = configure (over serviceRetry (set retryAttempts 10 . set exponentBase 0.6) s3) e
  orDie O.renderError . O.runAWS e' $ case c of
    Upload NotRecursive s d m _ ->
      uploadWithModeOrFail m s d
    Upload Recursive s d m f ->
      uploadRecursiveWithModeOrFail m s d f
    Download NotRecursive s d ->
      renderExit renderDownloadError . download s . optAppendFileName d $ key s
    Download Recursive s d ->
      renderExit renderDownloadError $ downloadRecursive s d
    Copy s d m ->
      renderExit renderCopyError $ copyWithMode m s d
    Concat ss d m f ->
      renderExit renderConcatError $ concatMultipart m f ss d
    Move s d ->
      renderExit renderCopyError $ move s d
    Exists a ->
      exists a >>= liftIO . flip unless exitFailure
    Delete a r ->
      rec (delete a) (listRecursively' a $$ DC.mapM_ delete) r
    Write a t w ->
      writeWithModeOrFail w a t
    Read a -> do
      liftIO $ T.hPutStrLn stderr "Warning: `s3 read` is deprecated. Use `s3 cat` instead."
      read a >>= \md -> liftIO $ maybe exitFailure pure md >>= T.putStrLn
    Cat a ->
      read' a >>= \md -> liftIO $ maybe exitFailure pure md >>= runResourceT . ($$+- DC.mapM_ (liftIO . BS.putStr))
    Size a NotRecursive _ u ->
      size a >>= liftIO . maybe exitFailure (T.putStrLn . renderSize u)
    Size a Recursive d u ->
      sizeRecursive a d u
    Sync s d m f ->
      renderExit renderSyncError $ syncWithMode m s d f
    List a rq ->
      rec (list' a) (listRecursively' a) rq $$ DC.mapM_ (liftIO . T.putStrLn . addressToText)

sizeRecursive :: Address -> Detail -> UnitPrefix -> AWS ()
sizeRecursive root d p =
  case d of
    All ->
      sizeRecursively' root $$ DC.mapM_ (liftIO . T.putStrLn . renderSizedAddress p)
    Summary -> do
      bytes <- sizeRecursively' root $$ DC.map sizedBytes =$= DC.fold (+) 0
      liftIO . T.putStrLn $ renderSizedAddress p (Sized bytes root)

renderSizedAddress :: UnitPrefix -> Sized Address -> Text
renderSizedAddress p (Sized bytes address) =
  let
    separator =
      case p of
        NoPrefix ->
          "\t"
        IEC ->
          " "
        Metric ->
          " "
  in
    renderSize p bytes <> separator <> addressToText address

renderSize :: UnitPrefix -> Bytes -> Text
renderSize p bytes =
  case p of
    NoPrefix ->
      T.pack (show $ unBytes bytes)
    IEC ->
      renderUnit iec bytes
    Metric ->
      renderUnit metric bytes

iec :: Scale Bytes
iec =
  mkScale "B" [
    -- The threshold here is not obvious. The cutoff is lower than you might
    -- expect. This is so that we only ever render a maximum of 3 characters
    -- for a value: e.g. 1000-1023 MiB are rendered as 1.0 GiB
      Suffix (1000 * pow 1024 0) (pow 1024 1) "KiB"
    , Suffix (1000 * pow 1024 1) (pow 1024 2) "MiB"
    , Suffix (1000 * pow 1024 2) (pow 1024 3) "GiB"
    , Suffix (1000 * pow 1024 3) (pow 1024 4) "TiB"
    , Suffix (1000 * pow 1024 4) (pow 1024 5) "PiB"
    , Suffix (1000 * pow 1024 5) (pow 1024 6) "EiB"
    ]

metric :: Scale Bytes
metric =
  mkScale "B" [
      Suffix (pow 1000 1) (pow 1000 1) "kB"
    , Suffix (pow 1000 2) (pow 1000 2) "MB"
    , Suffix (pow 1000 3) (pow 1000 3) "GB"
    , Suffix (pow 1000 4) (pow 1000 4) "TB"
    , Suffix (pow 1000 5) (pow 1000 5) "PB"
    , Suffix (pow 1000 6) (pow 1000 6) "EB"
    ]

pow :: Bytes -> Int64 -> Bytes
pow b p =
  b ^ p

data Scale a =
  Scale {
      scaleOne :: Suffix a
    , scaleTable :: Map a (Suffix a)
    } deriving (Show)

data Suffix a =
  Suffix {
      suffixThreshold :: a
    , suffixMagnitude :: a
    , suffixText :: Text
    } deriving (Show)

mapText :: (Text -> Text) -> Suffix a -> Suffix a
mapText f (Suffix t m x) =
  Suffix t m (f x)

mkScale :: (Ord a, Num a) => Text -> [Suffix a] -> Scale a
mkScale one0 table0 =
  let
    len =
      List.maximum .
      fmap T.length $
      one0 : fmap suffixText table0

    one =
      T.justifyLeft len ' ' one0

    table =
      fmap (\s -> (suffixThreshold s, s)) $
      fmap (mapText $ T.justifyLeft len ' ') table0
  in
    Scale (Suffix 1 1 one) $
    Map.fromList table

lookupSuffix :: Ord a => a -> Scale a -> Suffix a
lookupSuffix n scale =
  case Map.splitLookup n $ scaleTable scale of
    (xs, Nothing, _) ->
      fromMaybe
        (scaleOne scale)
        (fmap fst $ Map.maxView xs)
    (_, Just x, _) ->
      x

renderUnit :: Scale Bytes -> Bytes -> Text
renderUnit scale n0 =
  let
    suffix =
      lookupSuffix n0 scale

    n :: Double
    n =
      fromIntegral n0 / fromIntegral (suffixMagnitude suffix)
  in
    if suffixMagnitude suffix == 1 || n >= 10 then
      T.pack (printf "%3.0f" n) <> " " <> suffixText suffix
    else
      T.pack (printf "%3.1f" n) <> " " <> suffixText suffix

renderExit :: MonadIO m => (e -> Text) -> EitherT e m a -> m a
renderExit f =
  eitherT (\e -> liftIO $ (T.hPutStrLn stderr $ f e) >> exitFailure) return

optAppendFileName :: FilePath -> Key -> FilePath
optAppendFileName f k = fromMaybe f $ do
  fp <- valueOrEmpty (FP.hasTrailingPathSeparator f || FP.takeFileName f == ".") (FP.takeDirectory f)
  bn <- basename k
  pure . FP.combine fp $ T.unpack bn

mismi :: Force -> Parser (SafeCommand Command)
mismi f =
  XOA.safeCommand (commandP' f <|> deprecatedCommandP')

commandP' :: Force -> Parser Command
commandP' f = XOA.subparser $
     command' "upload"
              "Upload a file to s3."
              (Upload <$> recursive' <*> filepath' <*> address' <*> writeMode' f <*> fork')
  <> command' "download"
              "Download a file from s3."
              (Download <$> recursive' <*> address' <*> filepath')
  <> command' "copy"
              "Copy a file from an S3 address to another S3 address."
              (Copy <$> address' <*> address' <*> writeMode' f)
  <> command' "concat"
              "Concatenate many files together into one S3 address."
              (Concat <$> some address' <*> outputAddress' <*> writeMode' f <*> fork')
  <> command' "move"
              "Move an S3 address to another S3 address"
              (Move <$> address' <*> address')
  <> command' "exists"
              "Check if an address exists."
              (Exists <$> address')
  <> command' "delete"
              "Delete an address."
              (Delete <$> address' <*> recursive')
  <> command' "write"
              "Write to an address."
              (Write <$> address' <*> text' <*> writeMode' f)
  <> command' "cat"
              "Read raw data from an address and write it to stdout."
              (Cat <$> address')
  <> command' "size"
              "Get the size of an address."
              (Size <$> address' <*> recursive' <*> detail' <*> prefix')
  <> command' "sync"
              "Sync between two prefixes."
              (Sync <$> address' <*> address' <*> syncMode' <*> fork')
  <> command' "ls"
              "Stream a recursively list of objects on a prefix."
              (List <$> address' <*> recursive')

deprecatedCommandP' :: Parser Command
deprecatedCommandP' = XOA.subparser $
  XOA.internal <> command'
    "read"
    "Read from an address. (Deprecated in favour of `s3 cat`.)"
    (Read <$> address')

recursive' :: Parser Recursive
recursive' =
  flag NotRecursive Recursive $
       short 'r'
    <> long "recursive"
    <> help "Recursively list"

prefix' :: Parser UnitPrefix
prefix' =
  iec' <|> metric' <|> pure NoPrefix

iec' :: Parser UnitPrefix
iec' =
  flag' IEC $
       short 'h'
    <> long "iec"
    <> help "Human-readable output, using IEC unit prefixes, i.e. 1024^n"

metric' :: Parser UnitPrefix
metric' =
  flag' Metric $
       short 'm'
    <> long "metric"
    <> help "Human-readable output, using metric unit prefixes, i.e. 1000^n"

detail' :: Parser Detail
detail' =
  flag All Summary $
       short 's'
    <> long "summary"
    <> help "Display only the combined total for a prefix."

address' :: Parser Address
address' = XOA.argument (pOption s3Parser) $
     metavar "S3URI"
  <> help "An s3 uri, i.e. s3://bucket/prefix/key"
  <> XOA.completer addressCompleter

outputAddress' :: Parser Address
outputAddress' = option (pOption s3Parser) $
     long "output"
  <> metavar "S3URI"
  <> help "An s3 uri, i.e. s3://bucket/prefix/key"
  <> XOA.completer addressCompleter

filepath' :: Parser FilePath
filepath' = XOA.strArgument $
     metavar "FILEPATH"
  <> help "Absolute file path, i.e. /tmp/fred"
  <> action "file"

text' :: Parser Text
text' = T.pack <$> (XOA.strArgument $
     metavar "STRING"
  <> help "Data to write to S3 address.")

writeMode' :: Force -> Parser WriteMode
writeMode' ff = do
  flip fmap (flag Fail Overwrite $ long "overwrite" <> help "WriteMode") $ \f ->
    case f of
      Overwrite ->
        Overwrite
      Fail ->
        case ff of
          Force ->
            Overwrite
          NotForce ->
            Fail

syncMode' :: Parser SyncMode
syncMode' =
      pure FailSync
  <|> (flag' SkipSync $ long "skip" <> help "Skip over files that already exist in the target location.")
  <|> (flag' OverwriteSync $ long "overwrite" <> help "Overwrite files that already exist in the target location.")

fork' :: Parser Int
fork' = XOA.option auto $
     long "fork"
  <> metavar "INT"
  <> help "Number of threads to fork CopyObject call by."
  <> value 8

addressCompleter :: Completer
addressCompleter = XOA.mkCompleter $ \s -> do
  res <- runEitherT (go s)
  case res of
    Left   _ -> pure []
    Right xs -> pure xs
  where
    go :: String -> EitherT () IO [String]
    go s = do
      e <- forget O.discoverAWSEnv
      forget $ O.runAWS e $ do
        x <- case addressFromText (T.pack s) of
          Nothing ->
            pure []
          Just a ->
            let a' = withKey dirname a
            in  fmap (T.unpack . addressToText) <$> list a'
        let x' = filter (isPrefixOf s) x
        pure x'
    forget = firstEitherT (const ())


text:
using System.Data.Entity;

namespace EF.Interception
{
    /// <summary>
    /// The interception context.
    /// </summary>
    /// <typeparam name="TEntity">The type of entities to intercept.</typeparam>
    public interface IContext<out TEntity> : IHideObjectMembers
    {
        /// <summary>
        /// Gets the entity that's being intercepted.
        /// </summary>
        /// <value>The entity.</value>
        TEntity Entity { get; }

        /// <summary>
        /// Gets or sets the entity's state.
        /// </summary>
        /// <value>The state.</value>
        EntityState State { get; set; }

        /// <summary>
        /// Gets the validation result.
        /// </summary>
        /// <value>The validation result.</value>
        IValidationResult ValidationResult { get; }
    }
}


text:
import type { Container } from "./Core/Container";
import type { MainSlim } from "./main.slim";
declare const initPjs: (main: MainSlim) => {
    particlesJS: any;
    pJSDom: Container[];
};
export { initPjs };


text:
package org.zmlx.hg4idea.command;

import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.util.text.DateFormatUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.zmlx.hg4idea.HgFile;
import org.zmlx.hg4idea.HgRevisionNumber;
import org.zmlx.hg4idea.HgVcs;
import org.zmlx.hg4idea.execution.HgCommandExecutor;
import org.zmlx.hg4idea.execution.HgCommandResult;
import org.zmlx.hg4idea.provider.annotate.HgAnnotationLine;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class HgAnnotateCommand {

  private static final Logger LOG = Logger.getInstance(HgAnnotateCommand.class);
  private static final Pattern LINE_PATTERN = Pattern.compile(
    "\\s*(.+)\\s+([0-9]+)\\s+([0-9a-fA-F]+)\\s+([a-zA-Z]{3}\\s+[a-zA-Z]{3}\\s+[0-9]{2}\\s+.*[0-9]{4}.+):\\s*([0-9]+):\\s(.*)"
  );

  private static final int USER_GROUP = 1;
  private static final int REVISION_GROUP = 2;
  private static final int CHANGESET_GROUP = 3;
  private static final int DATE_GROUP = 4;
  private static final int LINE_NUMBER_GROUP = 5;
  private static final int CONTENT_GROUP = 6;

  private final Project myProject;

  public HgAnnotateCommand(Project project) {
    myProject = project;
  }

  public List<HgAnnotationLine> execute(@NotNull HgFile hgFile, @Nullable HgRevisionNumber revision) {
    final List<String> arguments = new ArrayList<String>();
    arguments.add("-cvnudl");
    HgVcs vcs = HgVcs.getInstance(myProject);
    if (vcs != null &&
        vcs.getProjectSettings().isWhitespacesIgnoredInAnnotations() &&
        vcs.getVersion().isIgnoreWhitespaceDiffInAnnotationsSupported()) {
      arguments.add("-w");
    }
    if (revision != null) {
      arguments.add("-r");
      arguments.add(revision.getChangeset());
    }
    arguments.add(hgFile.getRelativePath());
    final HgCommandResult result = new HgCommandExecutor(myProject).executeInCurrentThread(hgFile.getRepo(), "annotate", arguments);

    if (result == null) {
      return Collections.emptyList();
    }

    List<String> outputLines = result.getOutputLines();
    return parse(outputLines);
  }

  private static List<HgAnnotationLine> parse(List<String> outputLines) {
    List<HgAnnotationLine> annotations = new ArrayList<HgAnnotationLine>(outputLines.size());
    for (String line : outputLines) {
      Matcher matcher = LINE_PATTERN.matcher(line);
      if (matcher.matches()) {
        String user = matcher.group(USER_GROUP).trim();
        HgRevisionNumber rev = HgRevisionNumber.getInstance(matcher.group(REVISION_GROUP), matcher.group(CHANGESET_GROUP));
        String dateGroup = matcher.group(DATE_GROUP).trim();
        SimpleDateFormat dateFormat = new SimpleDateFormat("EEE MMM dd HH:mm:ss yyyy", Locale.US);
        String date = "";
        try {
          date = DateFormatUtil.formatPrettyDate(dateFormat.parse(dateGroup));
        }
        catch (ParseException e) {
          LOG.error("Couldn't parse annotation date ", e);
        }
        Integer lineNumber = Integer.valueOf(matcher.group(LINE_NUMBER_GROUP));
        String content = matcher.group(CONTENT_GROUP);
        HgAnnotationLine annotationLine = new HgAnnotationLine(
          user, rev, date, lineNumber, content
        );
        annotations.add(annotationLine);
      }
    }
    return annotations;
  }

}


text:
<TITLE>Review for Blast from the Past (1999)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">

Blast from the Past (1999)

reviewed by
Mark O'Hara

Blast From the Past (1999)

A Film Review by Mark O'Hara

Visit Online Film Critics Society at http://www.ofcs.org

I suppose people who wear rose-tinted glasses see the world in shades of
pink, as pink as the fabrics that covered the walls and chairs of
American houses in Life magazine ads, circa 1960.  Yes, pink is the
color of nostalgia.

And we are reminded of the importance of nostalgia by Hugh Wilson's
'Blast from the Past'.  Its story begins outside of Los Angeles in a
neighborhood of picture-perfect tract houses.  Professor Calvin Weber
(Christopher Walken) is an eccentric and rich scientist who has secretly
built a fallout shelter large enough to contain a replica of his house.
As the Cuban missile crisis reaches its worst moments and nuclear war
seems imminent, Dr. Weber drags his pregnant wife (Sissy Spacek) down
into the shelter, which is equipped to sustain a family of three for 35
years.  The plot gimmick that causes the family to stay underground for
the entire time is a plane crash:  just as the Webers are safe in the
shelter, a military plane plows into the back yard, and the bespectacled
schlump sets the irreversible locks.  Convinced a holocaust has
destroyed the city and perhaps the greater part of the world, the Webers
recreate a polite and perfect microcosm with their new son Adam (Brendan
Fraser, when the boy reaches adulthood).

Of course we have seen all this before.  Think of Marty McFly in
reverse, transported into the future.  Even Brendan Fraser has been
there, in 'Encino Man' and, in the same fish-out-of-water sense, 'George
of the Jungle' (itself a text from the 1960's).  But the filmmakers know
how we love to gaze longingly at our history.  In its own way, the film
manages to serve as a history lesson, imparting a good deal of cultural
as well as political knowledge.  What is puzzling about fondness for the
past is the blind faith that those years were better than these, that
people were happier, in every important way, than we are.(It's ironic
that we would look through those lenses of distorting pinkness at a time
that engendered a near-nuclear confrontation.)  Yet the formula works,
and 'Blast from the Past' supplies us with laughs and a romantic
relationship that is at times witty and original.  When Adam must
venture into what he thinks is a post-nuclear, mutated world, he takes
up with a rather rootless woman (Alicia Silverstone), who is conscious
of her lack of depth, but who is also oddly principled.

Brendan Fraser turns in a solid performance as the walking anachronism.
Indeed the movie milks his out-of-place experiences for all it can;
Fraser for the most part plays along with a dry and naïve humor, though
at times he does look blank or even stunned.  We know that his character
is in love with Alicia Silverstone's Eve, but he is simply too polite
and mild to pursue her affections meaningfully.  Fraser is at his best
when Adam shows sudden inspired bits of accomplishment - when he speaks
French and later swing-dances skillfully at a dance club.  He's likable
all the time, but especially when he displays his tenderness toward his
parents and his would-be girlfriend.

Alicia Silverstone is very watchable as well, although our early
impressions of Eve approach a stereotype:  she's the cynical and spoiled
girl-woman, street-smart and smart-mouthed, a darker version of the
shallow Cher from 'Clueless.'  Why is her performance good?  Because
Silverstone knows her way around the camera, seeming very comfortable
and assured as she commands Adam's attention during the ups and downs of
their relationship.  This young actress has denounced phoniness in her
everyday life, and seems to be applying the same credo to her acting.

Christopher Walken can appear in any movie I pay for, especially in his
quirky characterizations.  We care about Calvin Weber the loving father
and husband, and we're willing to laugh at his paranoid, commie-hating
craziness.  Sissy Spacek is underused, but in her short scenes dominates
in the dry humor department.  Mrs. Weber walks outside the "house" to
scream, and imbibes the cooking sherry in her advertisement-perfect
kitchen.

Set design is tricky in this film.  Most memorable is the interior
decoration of the Webers' houses, both above and below the ground,
meccas of post-war pastel luxuries, kitchens full of wondrous modern
appliances, living rooms packed with fringed furniture.  A hilarious
sight gag involves the land above the fallout shelter, a block that
undergoes massive change in the decades following the plane crash.
Directly above the Webers' elevator are a sleazy bar and its owner, who
thinks the beings crashing through his floor are three incarnations of
supreme beings.  The mantra the grungy bar owner adopts is "Leave my
elevator alone," and his cult of the homeless in one of the funnier
running gags.

The score brims with period songs, the rhythm of the vintage music
helping to move the narrative along.  Over the closing credits we hear a
song by written and sung by Randy Newman, a piece of cutesy doggerel
relating to the film's premise.  Aren't we getting a bit over-exposed,
Randy?

'Blast from the Past' is certainly a good date movie, and it has enough
laughs to recommend it for theater viewing.  Unfortunately it has one
'f-word' and a slew of 's-word' jokes, as well as a few seconds of the
characters' visiting adult video stores: hence the PG-13 rating.  Why,
Mr. Wilson, couldn't a few seconds be excised in pursuit of a plain PG?
It's not a must-see, but it is a pleasant way to pass two hours, the
haze of nostalgia simmering like dry ice along the theater floor.

Get Your Private, Free Email at http://www.hotmail.com

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).

The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.

Please direct comments/criticisms of the review to relevant newsgroups.

Broken URLs inthe reviews are the responsibility of the author.

The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.

Related links: index of all rec.arts.movies.reviews reviews


text:
import typemap_ns_using

if typemap_ns_using.spam(37) != 37:
    raise RuntimeError


text:
from __future__ import absolute_import
import os
import tempfile
import unittest
import json
import six

from telemetry import project_config
from telemetry import decorators
from telemetry.core import util
from telemetry.internal.util import binary_manager
from telemetry.testing import run_tests
from telemetry.testing import unittest_runner

class MockArgs():
  def __init__(self):
    self.positional_args = []
    self.test_filter = ''
    self.exact_test_filter = True
    self.run_disabled_tests = False
    self.skip = []

class MockPossibleBrowser():
  def __init__(self, browser_type, os_name, os_version_name,
               supports_tab_control):
    self.browser_type = browser_type
    self.platform = MockPlatform(os_name, os_version_name)
    self.supports_tab_control = supports_tab_control

  def GetTypExpectationsTags(self):
    return []

class MockPlatform():
  def __init__(self, os_name, os_version_name):
    self.os_name = os_name
    self.os_version_name = os_version_name

  def GetOSName(self):
    return self.os_name

  def GetOSVersionName(self):
    return self.os_version_name

  def GetOSVersionDetailString(self):
    return ''

def _MakeTestFilter(tests):
  return '::'.join(tests)

class RunTestsUnitTest(unittest.TestCase):
  def setUp(self):
    self._test_result = {}

  def _ExtractTestResults(self, test_result):
    delimiter = test_result['path_delimiter']
    failures = []
    successes = []
    skips = []
    def _IsLeafNode(node):
      test_dict = node[1]
      return ('expected' in test_dict and
              isinstance(test_dict['expected'], six.string_types))
    node_queues = []
    for t in test_result['tests']:
      node_queues.append((t, test_result['tests'][t]))
    while node_queues:
      node = node_queues.pop()
      full_test_name, test_dict = node
      if _IsLeafNode(node):
        if all(res not in test_dict['expected'].split() for res in
               test_dict['actual'].split()):
          failures.append(full_test_name)
        elif test_dict['actual'] == 'SKIP':
          skips.append(full_test_name)
        else:
          successes.append(full_test_name)
      else:
        for k in test_dict:
          node_queues.append(
              ('%s%s%s' % (full_test_name, delimiter, k),
               test_dict[k]))
    return set(successes), set(failures), set(skips)

  def _RunTest(
      self, expected_failures, expected_successes, expected_skips,
      expected_return_code=0, test_name='', extra_args=None, no_browser=True):
    extra_args = extra_args or []
    config = project_config.ProjectConfig(
        top_level_dir=os.path.join(util.GetTelemetryDir(), 'examples'),
        client_configs=[],
        benchmark_dirs=[
            os.path.join(util.GetTelemetryDir(), 'examples', 'browser_tests')]
    )
    temp_file = tempfile.NamedTemporaryFile(delete=False)
    temp_file.close()
    temp_file_name = temp_file.name
    try:
      passed_args = [
          # We don't want the underlying tests to report their results to
          # ResultDB.
          '--disable-resultsink',
          # These tests currently rely on some information sticking around
            # between tests, so we need to use the older global process pool
            # approach instead of having different pools scoped for
            # parallel/serial execution.
            '--use-global-pool',
      ]
      if test_name:
        passed_args.append(test_name)
      if no_browser:
        passed_args.append('--no-browser')
      passed_args.append('--write-full-results-to=%s' % temp_file_name)
      args = unittest_runner.ProcessConfig(config, passed_args + extra_args)
      test_runner = run_tests.RunTestsCommand()
      with binary_manager.TemporarilyReplaceBinaryManager(None):
        ret = test_runner.main(args=args)
      assert ret == expected_return_code, (
          'actual return code %d, does not equal the expected return code %d' %
          (ret, expected_return_code))
      with open(temp_file_name) as f:
        self._test_result = json.load(f)
      (actual_successes,
       actual_failures,
       actual_skips) = self._ExtractTestResults(self._test_result)

      # leave asserts below because we may miss tests
      # that are running when they are not supposed to
      self.assertEqual(set(actual_failures), set(expected_failures))
      self.assertEqual(set(actual_successes), set(expected_successes))
      self.assertEqual(set(actual_skips), set(expected_skips))
    finally:
      os.remove(temp_file_name)
    return actual_failures, actual_successes, actual_skips

  def _RunTestsWithExpectationsFile(
      self, full_test_name, expectations, test_tags='foo', extra_args=None,
      expected_exit_code=0):
    extra_args = extra_args or []
    test_expectations = (('# tags: [ foo bar mac ]\n'
                          '# results: [ {expectations} ]\n'
                          'crbug.com/123 [ {tags} ] {test} [ {expectations} ]')
                         .format(expectations=expectations, tags=test_tags,
                                 test=full_test_name))
    expectations_file = tempfile.NamedTemporaryFile(delete=False, mode='w+')
    expectations_file.write(test_expectations)
    results = tempfile.NamedTemporaryFile(delete=False)
    results.close()
    expectations_file.close()
    config = project_config.ProjectConfig(
        top_level_dir=os.path.join(util.GetTelemetryDir(), 'examples'),
        client_configs=[],
        expectations_files=[expectations_file.name],
        benchmark_dirs=[
            os.path.join(util.GetTelemetryDir(), 'examples', 'browser_tests')]
    )
    try:
      passed_args = ([full_test_name, '--no-browser',
                      ('--write-full-results-to=%s' % results.name)] +
                     ['--tag=%s' % tag for tag in test_tags.split()])
      args = unittest_runner.ProcessConfig(config, passed_args + extra_args)
      test_runner = run_tests.RunTestsCommand()
      with binary_manager.TemporarilyReplaceBinaryManager(None):
        ret = test_runner.main(args=args)
      self.assertEqual(ret, expected_exit_code)
      with open(results.name) as f:
        self._test_result = json.load(f)
    finally:
      os.remove(expectations_file.name)
      os.remove(results.name)
    return self._test_result

  @decorators.Disabled('chromeos')  # crbug.com/696553
  def testIncludeGlobsInTestFilterListWithOutBrowser(self):
    test_prefix = 'unit_tests_test.ExampleTests.%s'
    expected_failure = test_prefix % 'test_fail'
    expected_success = test_prefix % 'test_pass'
    expected_skip = test_prefix % 'test_skip'
    test_filter = _MakeTestFilter(
        [expected_failure, test_prefix % 'test_sk*', expected_success])
    self._RunTest(
        [expected_failure], [expected_success], [expected_skip],
        expected_return_code=1, extra_args=['--skip=*skip',
                                            '--test-filter=%s' % test_filter])

  @decorators.Disabled('chromeos')  # crbug.com/696553
  def testIncludeGlobsInTestFilterListWithBrowser(self):
    test_prefix = 'unit_tests_test.ExampleTests.%s'
    expected_failure = test_prefix % 'test_fail'
    expected_success = test_prefix % 'test_pass'
    expected_skip = test_prefix % 'test_skip'
    runner = run_tests.typ.Runner()
    runner.args.test_filter = _MakeTestFilter(
        [expected_failure, test_prefix % 'test_sk*', expected_success])
    runner.top_level_dirs = [os.path.join(util.GetTelemetryDir(), 'examples')]
    possible_browser = MockPossibleBrowser(
        'system', 'mac', 'mavericks', True)
    runner.classifier = run_tests.GetClassifier(runner, possible_browser)
    _, test_set = runner.find_tests(runner.args)
    self.assertEqual(len(test_set.parallel_tests), 3)
    test_names_found = [test.name for test in test_set.parallel_tests]
    self.assertIn(expected_failure, test_names_found)
    self.assertIn(expected_success, test_names_found)
    self.assertIn(expected_skip, test_names_found)

  @decorators.Disabled('chromeos')  # crbug.com/696553
  def testSkipOnlyWhenTestMatchesTestFilterWithBrowser(self):
    test_name = 'unit_tests_test.ExampleTests.test_also_fail'
    runner = run_tests.typ.Runner()
    runner.args.test_filter = test_name
    runner.args.skip.append('*fail')
    runner.top_level_dirs = [os.path.join(util.GetTelemetryDir(), 'examples')]
    possible_browser = MockPossibleBrowser(
        'system', 'mac', 'mavericks', True)
    runner.classifier = run_tests.GetClassifier(runner, possible_browser)
    _, test_set = runner.find_tests(runner.args)
    self.assertEqual(len(test_set.tests_to_skip), 1)
    self.assertEqual(test_set.tests_to_skip[0].name, test_name)

  @decorators.Disabled('chromeos')  # crbug.com/696553
  def testSkipOnlyWhenTestMatchesTestFilterWithoutBrowser(self):
    test_name = 'unit_tests_test.ExampleTests.test_also_fail'
    _, _, actual_skips = self._RunTest(
        [], [], [test_name],
        test_name=test_name,
        extra_args=['--skip=*fail'])
    self.assertEqual(actual_skips, {test_name})

  @decorators.Disabled('chromeos')  # crbug.com/696553
  def testTestFailsAllRetryOnFailureRetriesAndIsNotARegression(self):
    self._RunTestsWithExpectationsFile(
        'unit_tests_test.ExampleTests.test_fail', 'RetryOnFailure Failure',
        extra_args=['--retry-limit=3', '--retry-only-retry-on-failure-tests'],
        expected_exit_code=0)
    results = (self._test_result['tests']['unit_tests_test']
               ['ExampleTests']['test_fail'])
    self.assertEqual(results['actual'], 'FAIL FAIL FAIL FAIL')
    self.assertEqual(results['expected'], 'FAIL')
    self.assertNotIn('is_unexpected', results)
    self.assertNotIn('is_regression', results)

  @decorators.Disabled('chromeos')  # crbug.com/696553
  def testDoNotRetryExpectedFailure(self):
    self._RunTestsWithExpectationsFile(
        'unit_tests_test.ExampleTests.test_fail', 'Failure',
        extra_args=['--retry-limit=3'])
    test_result = (self._test_result['tests']['unit_tests_test']['ExampleTests']
                   ['test_fail'])
    self.assertEqual(test_result['actual'], 'FAIL')
    self.assertEqual(test_result['expected'], 'FAIL')
    self.assertNotIn('is_unexpected', test_result)
    self.assertNotIn('is_regression', test_result)

  @decorators.Disabled('chromeos')  # crbug.com/696553
  def testRetryOnFailureExpectationWithPassingTest(self):
    self._RunTestsWithExpectationsFile(
        'unit_tests_test.ExampleTests.test_pass', 'RetryOnFailure')
    test_result = (self._test_result['tests']['unit_tests_test']['ExampleTests']
                   ['test_pass'])
    self.assertEqual(test_result['actual'], 'PASS')
    self.assertEqual(test_result['expected'], 'PASS')
    self.assertNotIn('is_unexpected', test_result)
    self.assertNotIn('is_regression', test_result)

  @decorators.Disabled('chromeos')  # crbug.com/696553
  def testSkipTestCmdArgNoExpectationsFile(self):
    test_name = 'unit_tests_test.ExampleTests.test_pass'
    _, _, actual_skips = self._RunTest(
        [], [], ['unit_tests_test.ExampleTests.test_pass'], test_name=test_name,
        extra_args=['--skip=*test_pass'])
    test_result = (self._test_result['tests']['unit_tests_test']
                   ['ExampleTests']['test_pass'])
    self.assertEqual(actual_skips, {test_name})
    self.assertEqual(test_result['expected'], 'SKIP')
    self.assertEqual(test_result['actual'], 'SKIP')
    self.assertNotIn('is_unexpected', test_result)
    self.assertNotIn('is_regression', test_result)

  @decorators.Disabled('chromeos')  # crbug.com/696553
  def testSkipTestNoExpectationsFile(self):
    test_name = 'unit_tests_test.ExampleTests.test_skip'
    _, _, actual_skips = self._RunTest(
        [], [], [test_name], test_name=test_name)
    result = (self._test_result['tests']['unit_tests_test']
              ['ExampleTests']['test_skip'])
    self.assertEqual(actual_skips, {test_name})
    self.assertEqual(result['actual'], 'SKIP')
    self.assertEqual(result['expected'], 'SKIP')
    self.assertNotIn('is_unexpected', result)
    self.assertNotIn('is_regression', result)

  @decorators.Disabled('chromeos')  # crbug.com/696553
  def testSkipTestWithExpectationsFileWithSkipExpectation(self):
    self._RunTestsWithExpectationsFile(
        'unit_tests_test.ExampleTests.test_pass', 'Skip Failure Crash')
    test_result = (self._test_result['tests']['unit_tests_test']['ExampleTests']
                   ['test_pass'])
    self.assertEqual(test_result['actual'], 'SKIP')
    self.assertEqual(test_result['expected'], 'SKIP')
    self.assertNotIn('is_unexpected', test_result)
    self.assertNotIn('is_regression', test_result)

  @decorators.Disabled('chromeos')  # crbug.com/696553
  def testSkipTestCmdArgsWithExpectationsFile(self):
    self._RunTestsWithExpectationsFile(
        'unit_tests_test.ExampleTests.test_pass', 'Crash Failure',
        extra_args=['--skip=*test_pass'])
    test_result = (self._test_result['tests']['unit_tests_test']['ExampleTests']
                   ['test_pass'])
    self.assertEqual(test_result['actual'], 'SKIP')
    self.assertEqual(test_result['expected'], 'SKIP')
    self.assertNotIn('is_unexpected', test_result)
    self.assertNotIn('is_regression', test_result)

  def _GetEnabledTests(self, browser_type, os_name, os_version_name,
                       supports_tab_control, runner=None):
    if not runner:
      runner = run_tests.typ.Runner()
    host = runner.host
    runner.top_level_dirs = [util.GetTelemetryDir()]
    runner.args.tests = [
        host.join(util.GetTelemetryDir(), 'telemetry', 'testing',
                  'disabled_cases.py')
    ]
    possible_browser = MockPossibleBrowser(
        browser_type, os_name, os_version_name, supports_tab_control)
    runner.classifier = run_tests.GetClassifier(runner, possible_browser)
    _, test_set = runner.find_tests(runner.args)
    return set(test.name.split('.')[-1] for test in test_set.parallel_tests)

  def testSystemMacMavericks(self):
    self.assertEqual(
        {
            'testAllEnabled', 'testAllEnabledVersion2', 'testMacOnly',
            'testMavericksOnly', 'testNoChromeOS', 'testNoWinLinux',
            'testSystemOnly', 'testHasTabs'
        }, self._GetEnabledTests('system', 'mac', 'mavericks', True))

  def testSystemMacLion(self):
    self.assertEqual(
        {
            'testAllEnabled', 'testAllEnabledVersion2', 'testMacOnly',
            'testNoChromeOS', 'testNoMavericks', 'testNoWinLinux',
            'testSystemOnly', 'testHasTabs'
        }, self._GetEnabledTests('system', 'mac', 'lion', True))

  def testCrosGuestChromeOS(self):
    self.assertEqual(
        {
            'testAllEnabled', 'testAllEnabledVersion2', 'testChromeOSOnly',
            'testNoMac', 'testNoMavericks', 'testNoSystem', 'testNoWinLinux',
            'testHasTabs'
        }, self._GetEnabledTests('cros-guest', 'chromeos', '', True))

  def testCanaryWindowsWin7(self):
    self.assertEqual(
        {
            'testAllEnabled', 'testAllEnabledVersion2', 'testNoChromeOS',
            'testNoMac', 'testNoMavericks', 'testNoSystem',
            'testWinOrLinuxOnly', 'testHasTabs'
        }, self._GetEnabledTests('canary', 'win', 'win7', True))

  def testDoesntHaveTabs(self):
    self.assertEqual(
        {
            'testAllEnabled', 'testAllEnabledVersion2', 'testNoChromeOS',
            'testNoMac', 'testNoMavericks', 'testNoSystem', 'testWinOrLinuxOnly'
        }, self._GetEnabledTests('canary', 'win', 'win7', False))

  def testSkip(self):
    runner = run_tests.typ.Runner()
    runner.args.skip = [
        'telemetry.*testNoMac', '*NoMavericks',
        'telemetry.testing.disabled_cases.DisabledCases.testNoSystem']
    self.assertEqual(
        {
            'testAllEnabled', 'testAllEnabledVersion2', 'testNoChromeOS',
            'testWinOrLinuxOnly', 'testHasTabs'
        }, self._GetEnabledTests('canary', 'win', 'win7', True, runner))

  def testtPostionalArgsTestFiltering(self):
    runner = run_tests.typ.Runner()
    runner.args.partial_match_filter = ['testAllEnabled']
    self.assertEqual({'testAllEnabled', 'testAllEnabledVersion2'},
                     self._GetEnabledTests('system', 'win', 'win7', True,
                                           runner))

  def testPostionalArgsTestFiltering(self):
    runner = run_tests.typ.Runner()
    runner.args.test_filter = (
        'telemetry.testing.disabled_cases.DisabledCases.testAllEnabled::'
        'telemetry.testing.disabled_cases.DisabledCases.testNoMavericks::'
        'testAllEnabledVersion2')  # Partial test name won't match
    self.assertEqual({'testAllEnabled', 'testNoMavericks'},
                     self._GetEnabledTests('system', 'win', 'win7', True,
                                           runner))


text:
Strategic Objective

                Objective {{i+1}}: {{g.objective}}

                  SPI {{j+1}}:  {{spi.spi}}

                  CurrentLevel : {{spi.currentLevel}}

                  Target Digital

                        {{y.year}}

                        {{td.expectedLevel}}

              <button type="button" class="btn btn-info pull-right" [routerLink]="['/new-spi',g.id]" (click)="shareObjective(g.objective)">Add Spi</button>
              <button type="button" class="btn btn-info pull-right" [routerLink]="['/goal-initiative',g.id]" (click)="shareObjective(g.objective)">View/Add Initiative</button>

  <button class="btn btn-info btn-lg center-block" type="button" [routerLink]="['/new-goal']">
    Add New Objective
  </button>


text: require 'ruby-mpns'


text:
SEI - Semana da Engenharia Informática, our Computer Engineering Week is an eventful week, fully organized by students for students.

This is the website for the 2017 Edition.

# Deploying
Change branch to master `git checkout master`

Then run the rake file  `rake site:publish`

# Known Issues
When deploying with the rake file sometimes you need to force reset the branch `gh-pages`

To fix it, before deploying run

`git checkout gh-pages`

`git reset --hard origin/gh-pages`

and then deploy.

# Bugs and Issues

Please take into account that this website is still a work in progress. And we can still use your help!
Found a bug or an issue? [Open a new issue](https://github.com/cesium/2017.seium.org/issues) here on GitHub.

# Contributors

This website was made with :heart: by:

* [André Gonçalves](https://github.com/Simbs38)
* [Martinho Aragão](https://github.com/martinhoaragao)
* [João Costa] (https://github.com/joaofcosta)
* [Daniel Tinoco] (https://github.com/0urobor0s)
* [Miguel Lobo] (https://github.com/MLobo1997)
* [Fernando Mendes] (https://github.com/frmendes)
* [André Brandão] (https://github.com/andrebrandao21)
* [Miguel Pinto] (https://github.com/miguelpinto98)
* [João Pereira] (https://github.com/jcp19)
* [Bruno Ferraz] (https://github.com/brunomaf)
* [Marco Gonçalves] (https://github.com/Barca88)
* [Francisco Neves] (https://github.com/fntneves)
* [Hugo Gonçalves] (https://github.com/Hugainz)
* [Nuno Rafael Rocha] (https://github.com/nunorafaelrocha)

[See more Contributors](https://github.com/cesium/2017.seium.org/graphs/contributors)

Design made by [Jorge Simão](https://www.linkedin.com/in/jorgepedrosimao)