text:
namespace Microsoft.VisualBasic.CompilerServices
{

using System;
using System.ComponentModel;
using System.Reflection;
using System.Globalization;
using System.Threading;
using System.Text;

[StandardModule]
#if CONFIG_COMPONENT_MODEL
[EditorBrowsable(EditorBrowsableState.Never)]
#endif
public sealed class Utils
{
	// Cannot instantiate this class.
	private Utils() {}

	// Copy the contents of an array.
	public static Array CopyArray(Array arySrc, Array aryDest)
			{
				if(arySrc != null)
				{
					// Check that the arrays have the same rank and dimensions.
					int rank = arySrc.Rank;
					if(rank != aryDest.Rank)
					{
						ThrowExceptionInternal
							(new InvalidCastException
								(S._("VB_MismatchedRanks")));
					}
					for(int dim = 0; dim < rank; ++dim)
					{
						if(arySrc.GetUpperBound(dim) !=
						   aryDest.GetUpperBound(dim))
						{
							ThrowExceptionInternal
								(new ArrayTypeMismatchException
									(S._("VB_MismatchedDimensions")));
						}
					}
					Array.Copy(arySrc, aryDest, arySrc.Length);
				}
				return aryDest;
			}

	// Append the VB form of a type name to a string builder.
	internal static void AppendType(StringBuilder builder, Type type)
			{
				if(type == typeof(System.Byte))
				{
					builder.Append("Byte");
				}
				else if(type == typeof(System.Int16))
				{
					builder.Append("Short");
				}
				else if(type == typeof(System.Int32))
				{
					builder.Append("Integer");
				}
				else if(type == typeof(System.Int64))
				{
					builder.Append("Long");
				}
				else if(type == typeof(System.Single))
				{
					builder.Append("Single");
				}
				else if(type == typeof(System.Double))
				{
					builder.Append("Double");
				}
				else if(type == typeof(System.Boolean))
				{
					builder.Append("Boolean");
				}
				else if(type == typeof(System.Char))
				{
					builder.Append("Char");
				}
				else if(type == typeof(System.String))
				{
					builder.Append("String");
				}
				else if(type == typeof(System.DateTime))
				{
					builder.Append("Date");
				}
				else if(type == typeof(System.Decimal))
				{
					builder.Append("Decimal");
				}
				else if(type == typeof(System.Object))
				{
					builder.Append("Object");
				}
				else if(type.IsArray)
				{
					Type elemType = type.GetElementType();
					while(elemType.IsArray)
					{
						elemType = elemType.GetElementType();
					}
					AppendType(builder, elemType);
					while(type != elemType)
					{
						builder.Append('(');
						int rank = type.GetArrayRank();
						while(rank > 1)
						{
							builder.Append(',');
							--rank;
						}
						builder.Append(')');
						type = type.GetElementType();
					}
				}
				else
				{
					builder.Append(type.FullName);
				}
			}

	// Convert a method name into a string, using VB-style syntax.
	public static String MethodToString(MethodBase Method)
			{
				bool isCtor;
				Type returnType;

				// Determine if the method is a constructor and get
				// the return type if it isn't.
				if(Method is ConstructorInfo)
				{
					isCtor = true;
					returnType = typeof(void);
				}
				else
				{
					isCtor = false;
					returnType = ((MethodInfo)Method).ReturnType;
				}

				// Create a string builder and output the access level.
				StringBuilder builder = new StringBuilder();
				if((Method.Attributes & MethodAttributes.Virtual) != 0)
				{
					if(Method.DeclaringType.IsInterface)
					{
						builder.Append("Overrides ");
					}
				}
				switch(Method.Attributes & MethodAttributes.MemberAccessMask)
				{
					case MethodAttributes.Private:
						builder.Append("Private "); break;

					case MethodAttributes.Assembly:
						builder.Append("Friend "); break;

					case MethodAttributes.Family:
						builder.Append("Protected "); break;

					case MethodAttributes.FamORAssem:
						builder.Append("Protected Friend "); break;

					case MethodAttributes.Public:
						builder.Append("Public "); break;
				}

				// Output the method kind and its name.
				if(isCtor)
				{
					builder.Append("Sub New ");
				}
				else if(returnType == typeof(void))
				{
					builder.Append("Sub ");
				}
				else
				{
					builder.Append("Function ");
				}
				builder.Append(Method.Name);

				// Output the method parameters.
				ParameterInfo[] parameters = Method.GetParameters();
				int index;
				Type type;
				String name;
				Object value;
				builder.Append(" (");
				for(index = 0; index < parameters.Length; ++index)
				{
					if(index > 0)
					{
						builder.Append(", ");
					}
					type = parameters[index].ParameterType;
					if((parameters[index].Attributes
							& ParameterAttributes.Optional) != 0)
					{
						builder.Append("Optional ");
					}
					if(type.IsByRef)
					{
						builder.Append("ByRef ");
					}
					else
					{
						builder.Append("ByVal ");
					}
				#if !ECMA_COMPAT
					if(type.IsArray && parameters[index].IsDefined
							(typeof(ParamArrayAttribute), false))
					{
						builder.Append("ParamArray ");
					}
				#endif
					name = parameters[index].Name;
					if(name != null)
					{
						builder.Append(name);
					}
					else
					{
						builder.Append(String.Format("_p{0}", index));
					}
					builder.Append(" As ");
					AppendType(builder, returnType);
				#if !ECMA_COMPAT
					if(parameters[index].IsOptional)
					{
						builder.Append(" = ");
						value = parameters[index].DefaultValue;
						if(value != null)
						{
							if(value is String)
							{
								builder.Append('"');
								builder.Append(value);
								builder.Append('"');
							}
							else
							{
								builder.Append(value.ToString());
							}
						}
						else
						{
							builder.Append("Nothing");
						}
					}
				#endif
				}
				builder.Append(")");

				// Output the return type for functions.
				if(returnType != typeof(void))
				{
					builder.Append(" As ");
					AppendType(builder, returnType);
				}

				// Return the final string to the caller.
				return builder.ToString();
			}

	// Set the culture information to use.
	public static Object SetCultureInfo(CultureInfo Culture)
			{
				CultureInfo prev = CultureInfo.CurrentCulture;
			#if !ECMA_COMPAT
				Thread.CurrentThread.CurrentCulture = Culture;
			#endif
				return prev;
			}

	// Throw an exception by number.
	public static void ThrowException(int hr)
			{
				Exception exception =
					ErrObject.CreateExceptionFromNumber(hr, null);
				SetErrorNumber(hr);
				throw exception;
			}

	// Throw a particular exception, after setting the error number.
	private static void ThrowExceptionInternal(Exception exception)
			{
				SetErrorNumber(ErrObject.GetNumberForException(exception));
				throw exception;
			}

	// Set a particular error number in the program's error object.
	private static void SetErrorNumber(int number)
			{
				ErrObject error = Information.Err();
				error.Clear();
				error.Number = number;
			}

	// Full width digit characters (0-9, A-F, a-f).
	private static char[] fullWidthDigits =
			{'\uFF10', '\uFF11', '\uFF12', '\uFF13', '\uFF14',
			 '\uFF15', '\uFF16', '\uFF17', '\uFF18', '\uFF19',
			 '\uFF21', '\uFF22', '\uFF23', '\uFF24', '\uFF25', '\uFF26',
			 '\uFF41', '\uFF42', '\uFF43', '\uFF44', '\uFF45', '\uFF46'};

	// Convert full-width digit characters into half-width digits.
	// This is useful in CJK locales where it is common for users to
	// expect that full-width forms of digits can be used interchangeably
	// with half-width forms.
	internal static String FixDigits(String str)
			{
				if(str == null)
				{
					return null;
				}
				if(str.IndexOfAny(fullWidthDigits) == -1)
				{
					return str;
				}
				StringBuilder builder = new StringBuilder(str.Length);
				foreach(char ch in str)
				{
					if(ch >= '\uFF10' && ch <= '\uFF19')
					{
						builder.Append((char)(ch - (0xFF10 + 0x0030)));
					}
					else if(ch >= '\uFF21' && ch <= '\uFF26')
					{
						builder.Append((char)(ch - (0xFF21 + 0x0041)));
					}
					else if(ch >= '\uFF41' && ch <= '\uFF46')
					{
						builder.Append((char)(ch - (0xFF41 + 0x0061)));
					}
					else
					{
						builder.Append(ch);
					}
				}
				return builder.ToString();
			}

	// Convert a string into its wide form.
	internal static String ToWide(String str)
			{
				int posn, len;
				char ch;
				len = str.Length;
				for(posn = 0; posn < len; ++posn)
				{
					ch = str[posn];
					if(ch >= '\u0021' && ch <= '\u007E')
					{
						break;
					}
				}
				if(posn >= len)
				{
					return str;
				}
				StringBuilder builder = new StringBuilder();
				for(posn = 0; posn < len; ++posn)
				{
					ch = str[posn];
					if(ch >= '\u0021' && ch <= '\u007E')
					{
						builder.Append((char)(ch - 0x0021 + 0xFF01));
					}
					else
					{
						builder.Append(ch);
					}
				}
				return builder.ToString();
			}

	// Convert a string into its narrow form.
	internal static String ToNarrow(String str)
			{
				int posn, len;
				char ch;
				len = str.Length;
				for(posn = 0; posn < len; ++posn)
				{
					ch = str[posn];
					if(ch >= '\uFF01' && ch <= '\uFF5E')
					{
						break;
					}
				}
				if(posn >= len)
				{
					return str;
				}
				StringBuilder builder = new StringBuilder();
				for(posn = 0; posn < len; ++posn)
				{
					ch = str[posn];
					if(ch >= '\uFF01' && ch <= '\uFF5E')
					{
						builder.Append((char)(ch - 0xFF01 + 0x0021));
					}
					else
					{
						builder.Append(ch);
					}
				}
				return builder.ToString();
			}

	// Convert katakana characters into hiragana.
	internal static String ToHiragana(String str)
			{
				int posn, len;
				char ch;
				len = str.Length;
				for(posn = 0; posn < len; ++posn)
				{
					ch = str[posn];
					if(ch >= '\u30A1' && ch <= '\u30FE')
					{
						break;
					}
				}
				if(posn >= len)
				{
					return str;
				}
				StringBuilder builder = new StringBuilder();
				for(posn = 0; posn < len; ++posn)
				{
					ch = str[posn];
					if(ch >= '\u30A1' && ch <= '\u30FE')
					{
						builder.Append((char)(ch - 0x30A1 + 0x3041));
					}
					else
					{
						builder.Append(ch);
					}
				}
				return builder.ToString();
			}

	// Convert hiragana characters into katakana.
	internal static String ToKatakana(String str)
			{
				int posn, len;
				char ch;
				len = str.Length;
				for(posn = 0; posn < len; ++posn)
				{
					ch = str[posn];
					if(ch >= '\u3041' && ch <= '\u309E')
					{
						break;
					}
				}
				if(posn >= len)
				{
					return str;
				}
				StringBuilder builder = new StringBuilder();
				for(posn = 0; posn < len; ++posn)
				{
					ch = str[posn];
					if(ch >= '\u3041' && ch <= '\u309E')
					{
						builder.Append((char)(ch - 0x3041 + 0x30A1));
					}
					else
					{
						builder.Append(ch);
					}
				}
				return builder.ToString();
			}

	// Base time for OLE Automation values (Midnight, Dec 30, 1899).
	private static readonly DateTime OLEBaseTime = new DateTime(1899, 12, 30);

	// Convert an OLE Automation date into a DateTime value.
	internal static DateTime FromOADate(double d)
			{
				// Convert the value into ticks, while checking for overflow.
				long ticks;
				checked
				{
					try
					{
						ticks = ((long)(d * (double)TimeSpan.TicksPerDay)) +
								OLEBaseTime.Ticks;
					}
					catch(OverflowException)
					{
						throw new ArgumentOutOfRangeException
							("d", S._("VB_DateTimeRange"));
					}
				}

				// Convert the ticks into a DateTime value, which will
				// perform additional range checking.
				return new DateTime(ticks);
			}

	// Convert this DateTime value into an OLE Automation date.
	internal static double ToOADate(DateTime d)
			{
				long value_ = d.Ticks;
				if(value_ == 0)
				{
					// Special case for uninitialized DateTime values.
					return 0.0;
				}
				else
				{
					return (((double)value_) / ((double)TimeSpan.TicksPerDay))
								- ((double)OLEBaseTime.Ticks);
				}
			}

}; // class Utils

}; // namespace Microsoft.VisualBasic.CompilerServices


text:
(function($){
	$.fn.sexyTooltip = function() {
		var e = $(this);

		// Check if the tooltip container exists...
		if (!$('#sexytooltip').length) {
			$('body').append('

');
		}
		else
		{
			$('#sexytooltip').hide();
		}

		// Shortcut for the tooltip container
		var tip = $('#sexytooltip');

		// Move the title attribute to data-tooltip
		// so the browser doesnt display the ugly one.
		if (e.attr('title')) {
			e.attr('data-tooltip', e.attr('title'));
			e.attr('title', null);
		}

		// Display it
		tip.html(e.attr('data-tooltip'))
			.css({
				left: (e.offset().left + e.width()) + 'px',
				top: (e.offset().top - (tip.height() / 2) + (e.height() / 2) - 2) + 'px',
			})
			.fadeIn('fast', function(){
				e.mouseleave(function(){ tip.stop(true, true).fadeOut('fast'); });
			})
	}

	// Add a hover event to all abbreviation elements inside
	// a form for sexy tooltips.
	$(document).on({
		mouseenter: function(){
			$(this).sexyTooltip();
		}
	}, '.sexytooltip');
})(jQuery);

redpajama_set_name: RedPajamaGithub


text:
/*globals Circsim */

Circsim.proceduresController = SC.ArrayController.create({

});


text:
<?php

namespace Model\Cluster\Schema\Table\Index;

class Primary extends Unique
{ }


text:
<!--
  Copyright 2016.  Dmitry Malkovich

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<resources>

    <style name="AppTheme.NoActionBar">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
        <item name="android:windowDrawsSystemBarBackgrounds">true</item>
    </style>

    <style name="Button.Red" parent="Button">
        <item name="android:colorButtonNormal">@color/red</item>
    </style>

    <style name="Button.ColorPrimary" parent="Button">
        <item name="android:colorButtonNormal">@color/colorPrimary</item>
    </style>

</resources>


text:
import React from 'react';
import { Route, IndexRedirect } from 'react-router';
import { requireAuthentication as restrict } from 'containers/AuthenticatedComponent';

import AppContainer from 'containers/AppContainer';
import HeroPageLayout from 'containers/HeroPageLayout';
import AdminPageLayout from 'containers/AdminPageLayout';
import LandingPage from 'pages/LandingPage/LandingPage';
import AboutPage from 'pages/AboutPage/AboutPage';
import ProfileEditPage from 'pages/ProfileEditPage/ProfileEditPage';

export default(
  // Route components without path will render their children...
  <Route component={AppContainer}>
    // until a match is found...
    <Route component={HeroPageLayout}>
      // here
      <Route path="/" component={LandingPage} />
      // Routes without a component will render their children:
      <Route path="/pages" >
        <IndexRedirect to="about-us" />
        <Route path="about-us" component={AboutPage} />
        <Route path="faq" component={AboutPage} />
      </Route>
    </Route>

    <Route path="/account" component={AdminPageLayout}>
      <Route path="/profile/edit" component={restrict(ProfileEditPage)} />
    </Route>
  </Route>
);


text:
namespace RGCCPP::Midi
{
    class Song;

    class TempoEvents
    {
    public:
        void add_tempo_event(int ppqn, double time);
        void add_time_sig_event(int numerator, int denominator, int compoundFactor, double time);

        std::vector<RGCCPP::TempoEvent*> &get_events(double start, double end);
        std::vector<RGCCPP::TempoEvent> &get_events();

    private:
        std::vector<RGCCPP::TempoEvent> m_tempo;
    };

    class Track
    {
    public:

        Track(Song* song);

        void add_note(RGCCPP::NoteType type, double time, int32_t pulseTime, bool on);
        std::vector<RGCCPP::TrackNote*> &get_notes_in_frame(double start, double end);
        std::vector<RGCCPP::TrackNote> &get_notes();

        void set_event(RGCCPP::EventType type, double time, bool on);
        std::vector<RGCCPP::Event> &get_events();

    private:
        Song* m_song;
        std::vector<RGCCPP::TrackNote> m_notes;
        std::vector<RGCCPP::Event> m_events;
    };

    class Song
    {
    public:
        Song(std::string songPath);
        bool load();
        std::vector<Track> *get_tracks();
        int16_t get_divison();
    private:
	std::string m_midiPath;
        SmfReader m_midi;
        double m_length;
        std::vector<Track> m_tracks;
        TempoEvents m_tempoEvents;
    };

    // Functions are mainly used within the Song class
    RGCCPP::NoteType midi_to_note_type(RGCCPP::Difficulty diff, int midiNote);
    const std::string diff_type_to_name(RGCCPP::Difficulty diff);
    const std::string track_type_to_name(RGCCPP::TrackType type);
    const RGCCPP::TrackType get_track_type(std::string trackName);
}


text:
package org.intellij.plugins.markdown.ui.actions;

import com.intellij.lang.ASTNode;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.editor.Caret;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.fileEditor.FileEditor;
import com.intellij.openapi.fileEditor.TextEditor;
import com.intellij.openapi.util.Condition;
import com.intellij.openapi.util.Couple;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
import com.intellij.psi.tree.IElementType;
import com.intellij.psi.tree.TokenSet;
import com.intellij.psi.util.PsiTreeUtil;
import org.intellij.plugins.markdown.lang.MarkdownLanguage;
import org.intellij.plugins.markdown.ui.split.SplitFileEditor;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public class MarkdownActionUtil {
  @Nullable
  public static SplitFileEditor findSplitEditor(AnActionEvent e) {
    final FileEditor editor = e.getData(PlatformDataKeys.FILE_EDITOR);
    return findSplitEditor(editor);
  }

  @Nullable
  public static SplitFileEditor findSplitEditor(@Nullable FileEditor editor) {
    if (editor instanceof SplitFileEditor) {
      return (SplitFileEditor)editor;
    }
    else {
      return SplitFileEditor.PARENT_SPLIT_KEY.get(editor);
    }
  }

  @Nullable
  public static Editor findMarkdownTextEditor(AnActionEvent e) {
    final SplitFileEditor splitEditor = findSplitEditor(e);
    if (splitEditor == null) {
      // This fallback is used primarily for testing

      final PsiFile psiFile = e.getData(CommonDataKeys.PSI_FILE);
      if (psiFile != null && psiFile.getLanguage() == MarkdownLanguage.INSTANCE && ApplicationManager.getApplication().isUnitTestMode()) {
        return e.getData(CommonDataKeys.EDITOR);
      }
      else {
        return null;
      }
    }

    if (!(splitEditor.getMainEditor() instanceof TextEditor)) {
      return null;
    }
    final TextEditor mainEditor = (TextEditor)splitEditor.getMainEditor();
    if (!mainEditor.getComponent().isVisible()) {
      return null;
    }

    return mainEditor.getEditor();
  }

  @Nullable
  public static Couple<PsiElement> getElementsUnderCaretOrSelection(@NotNull PsiFile file, @NotNull Caret caret) {
    if (caret.getSelectionStart() == caret.getSelectionEnd()) {
      final PsiElement element = file.findElementAt(caret.getSelectionStart());
      if (element == null) {
        return null;
      }
      return Couple.of(element, element);
    }
    else {
      final PsiElement startElement = file.findElementAt(caret.getSelectionStart());
      final PsiElement endElement = file.findElementAt(caret.getSelectionEnd());
      if (startElement == null || endElement == null) {
        return null;
      }
      return Couple.of(startElement, endElement);
    }
  }

  @Nullable
  public static PsiElement getCommonParentOfType(@NotNull PsiElement element1,
                                                 @NotNull PsiElement element2,
                                                 @NotNull final IElementType elementType) {
    return getCommonParentOfTypes(element1, element2, TokenSet.create(elementType));
  }

  @Nullable
  public static PsiElement getCommonTopmostParentOfTypes(@NotNull PsiElement element1,
                                                         @NotNull PsiElement element2,
                                                         @NotNull TokenSet tokenSet) {
    final PsiElement base = PsiTreeUtil.findCommonParent(element1, element2);
    return getTopmostParentOfType(base, (Condition<? super PsiElement>)element -> {
      final ASTNode node = element.getNode();
      return node != null && tokenSet.contains(node.getElementType());
    });
  }

  @Nullable
  public static PsiElement getTopmostParentOfType(@Nullable PsiElement element, @NotNull Condition<? super PsiElement> condition) {
    PsiElement answer = PsiTreeUtil.findFirstParent(element, false, condition);

    do {
      PsiElement next = PsiTreeUtil.findFirstParent(answer, true, condition);
      if (next == null) break;
      answer = next;
    }
    while (true);

    return answer;
  }

  @Nullable
  public static PsiElement getCommonParentOfTypes(@NotNull PsiElement element1,
                                                  @NotNull PsiElement element2,
                                                  @NotNull TokenSet tokenSet) {
    final PsiElement base = PsiTreeUtil.findCommonParent(element1, element2);
    return PsiTreeUtil.findFirstParent(base, false, element -> {
      final ASTNode node = element.getNode();
      return node != null && tokenSet.contains(node.getElementType());
    });
  }
}


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
null

#### Original name
Sturmia coelogynoides F.Muell.

### Remarks
null


text:
using Lench.AdvancedControls.Blocks;
using System;
using UnityEngine;

namespace Lench.AdvancedControls.Controls
{
    /// <summary>
    /// 3 axis vector control.
    /// </summary>
    public class VectorControl : Control
    {
        private Axis vectorAxis;
        private VectorThruster vt;

        /// <summary>
        /// Creates a new VectorControl for a block with given guid.
        /// Axis specifies what property of vector thruster should be controlled.
        /// </summary>
        /// <param name="guid">Blocks' guid.</param>
        /// <param name="axis">global::Axis</param>
        public VectorControl(Guid guid, Axis axis = global::Axis.X) : base(guid)
        {
            vectorAxis = axis;
            if (vectorAxis == global::Axis.X)
                Name = "HORIZONTAL";
            if (vectorAxis == global::Axis.Y)
                Name = "VERTICAL";
            if (vectorAxis == global::Axis.Z)
                Name = "POWER";
        }

        /// <summary>
        /// Control's block handler.
        /// Vector control only accepts Lench.ScripterMod.Blocks.VectorThruster handlers.
        /// </summary>
        public override BlockHandler Block
        {
            get
            {
                return vt;
            }
            protected set
            {
                vt = value as VectorThruster;
            }
        }

        /// <summary>
        /// Applies the value to the vector thruster.
        /// HorizontalBias for X axis,
        /// VerticalBias for Y axis and
        /// Power for Z axis.
        /// </summary>
        /// <param name="value">Value to be applied.</param>
        protected override void Apply(float value)
        {
            if (value > 0)
                value = Mathf.Lerp(Center, Max, value);
            else
                value = Mathf.Lerp(Center, Min, -value);
            if (vectorAxis == global::Axis.X)
                vt.HorizontalBias = value;
            if (vectorAxis == global::Axis.Y)
                vt.VerticalBias = value;
            if (vectorAxis == global::Axis.Z)
                vt.Power = value;
        }

        /// <summary>
        /// VectorThruster control is disabled on external control.
        /// No clearing keys needed.
        /// </summary>
        protected override void ClearKeys()
        {
            // pass
        }

        internal override Control Clone()
        {
            var clone = new VectorControl(BlockGUID, vectorAxis);
            clone.Name = Name;
            clone.Enabled = Enabled;
            clone.Axis = Axis;
            clone.Block = Block;
            clone.Min = Min;
            clone.Center = Center;
            clone.Max = Max;
            return clone;
        }
    }
}


text:
<?php

namespace Jmbermudo\SGR3Bundle\Controller;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Jmbermudo\SGR3Bundle\Entity\Reunion;

class DaemonController extends Controller
{
    private $mensajes = array();

    public function indexAction(Request $request)
    {
        /*
         * En esta acción vamos a realizar todas las tareas necesarias para que
         * el sistema siga en funcionamiento sin problemas. Este script debería
         * ejecutarse automáticamente una vez al día.
         * Se creará una función por cada elemento a actualizar, para poder llevar
         * un mejor control
         */

        /*
         * Lo primero será enviar avisos a responsables e invitados sobre la
         * aproximación a la fecha de "fin de voto" de una reunión que todavía no
         * se ha cerrado.
         */
        $this->avisaProximoFin($request);

        /*
         * Lo siguiente será aceptar automáticamente las reuniones que hayan expirado
         * hoy y que tengan el porcentaje mínimo de aceptación automática
         */
        $this->aceptaAutomaticamente($request);

        /*
         * Ahora vamos a cancelar aquellas reuniones que han expirado hoy sin ser
         * aceptadas
         */
        $this->cancelaExpiradas($request);

        //La fecha de hoy
        $fecha = new \DateTime('', new \DateTimeZone($this->container->getParameter('timezone')));
        $fecha_format = $this->formatFecha($fecha, $request);

        //Ahora mandamos el log al responsable del sistema
        $this->enviaLog($request, $fecha_format);

        return $this->render('JmbermudoSGR3Bundle:Reunion:email/log_daemon_' . $request->getLocale() . '.txt.twig',
            array(
                'fecha' => $fecha_format,
                'mensajes' => $this->mensajes
            )
        );
    }

    private function avisaProximoFin(Request $request)
    {
        /*
         * Lo primero que haremos será obtener las reuniones cuya fecha de finalización
         * sea exactamente X días (parametrizado en el fichero config.yml) desde
         * hoy
         */
        $em = $this->getDoctrine()->getManager();

        $dias = $this->container->getParameter('dias_aviso_fin');
        $fecha_max = new \DateTime('', new \DateTimeZone($this->container->getParameter('timezone')));
        $fecha_max->add(new \DateInterval('P' . $dias . 'D'));

        $reuniones = $em->getRepository('JmbermudoSGR3Bundle:Reunion')->getReunionesExpiranEn($fecha_max);

        foreach($reuniones as $reunion){
            //Avisamos al responsable e invitados
            //Formateamos la fecha
            $fecha = $this->formatFecha($fecha_max, $request);
            $this->sendMailsAvisaProximoFin($reunion, $fecha, $this->container->getParameter('porcentaje_aceptacion'), $request);

            //Añadimos una línea de log
            $mensaje = $this->get('translator')->trans('reunion.prox_expiracion',
                        array(
                            '%reunion%' => $reunion->getNombrePublico()
                        ));

            $this->mensajes[] = $mensaje;
        }
    }

    private function aceptaAutomaticamente(Request $request)
    {
        /*
         * Lo primero que haremos será obtener las reuniones cuya fecha de finalización
         * sea exactamente -1 días
         */
        $em = $this->getDoctrine()->getManager();

        //restamos un día
        $fecha_max = new \DateTime('', new \DateTimeZone($this->container->getParameter('timezone')));
        $fecha_max->sub(new \DateInterval('P1D'));

        $reuniones = $em->getRepository('JmbermudoSGR3Bundle:Reunion')->getReunionesExpiranEn($fecha_max);

        foreach ($reuniones as $reunion) {
            //llamamos al método que calcula la pre-reserva ganadora en modo automático
            $preReserva = $reunion->calculaPreReservaGanadora(true);
            try{
                $reunion->aceptarPreReserva($preReserva->getId());
            }
            catch (\Exception $e){
                $this->mensajes[] = $e->getMessage();
                continue;
            }

            $em->flush();

            //Y avisamos al creador y a los participantes
            $this->avisaAceptacionAutomatica($reunion, $request);

            //Añadimos una línea de log
            $mensaje = $this->get('translator')->trans('reunion.aceptacion_auto_ok',
                        array(
                            '%reunion%' => $reunion->getNombrePublico()
                        ));

            $this->mensajes[] = $mensaje;
        }
    }

    /**
     * Esta función cancelará aquellas reuniones cuya fecha de expiración es ayer
     * y que no están aceptadas ni tienen el porcentaje mínimo para aceptación
     * automática
     */
    private function cancelaExpiradas(Request $request)
    {
        /*
         * Lo primero que haremos será obtener las reuniones cuya fecha de finalización
         * sea exactamente -1 días
         */
        $em = $this->getDoctrine()->getManager();

        //restamos un día
        $fecha_max = new \DateTime('', new \DateTimeZone($this->container->getParameter('timezone')));
        $fecha_max->sub(new \DateInterval('P1D'));

        $reuniones = $em->getRepository('JmbermudoSGR3Bundle:Reunion')->getReunionesExpiranEn($fecha_max);

        foreach ($reuniones as $reunion) {
            //Anulamos la reunión
            $reunion->setAnulada(true);
            $em->flush();

            //Y avisamos al creador y a los participantes
            $this->avisaCancelacionAutomatica($reunion, $request);

            //Añadimos una línea de log
            $mensaje = $this->get('translator')->trans('reunion.cancelacion_auto_ok',
                        array(
                            '%reunion%' => $reunion->getNombrePublico()
                        ));

            $this->mensajes[] = $mensaje;
        }
    }

    private function sendMailsAvisaProximoFin(Reunion $entity, $fecha_max, $porcentaje_min, Request $request)
    {
        //TODO: Calcular el porcentaje de los participantes que han votado
        $porcentaje = 0;

        //Avisamos por email al creador
        $this->sendMail(
                $this->get('translator')->trans('reunion.prox_expiracion',
                        array(
                            '%reunion%' => $entity->getNombrePublico()
                        )),
                $entity->getCreador()->getEmail(),
                'JmbermudoSGR3Bundle:Reunion:email/email_expiracion_creador_' . $request->getLocale() . '.txt.twig',
                    array(
                        'nombre' => $entity->getNombrePublico(),
                        'porcentaje_min' => $porcentaje_min,
                        'porcentaje' => $porcentaje,
                        'fecha_max' => $fecha_max
                    )
                );

        //Y a todos los participantes que no hayan votado
        foreach ($entity->getInvitados() as $invitado) {
            $this->sendMail(
                $this->get('translator')->trans('reunion.prox_expiracion_invitado',
                        array(
                            '%reunion%' => $entity->getNombrePublico()
                        )),
                $invitado->getEmail(),
                'JmbermudoSGR3Bundle:Reunion:email/email_expiracion_invitado_' . $request->getLocale() . '.txt.twig',
                array(
                    'nombre' => $entity->getNombrePublico(),
                    'invitado' => $invitado->getNombre(),
                    'fecha_max' => $fecha_max
                )
            );
        }
    }

    private function avisaAceptacionAutomatica(Reunion $entity, Request $request)
    {
        $preReservaAceptada = $entity->getPrereservaAceptada();
        //Avisamos por email al creador
        $this->sendMail(
                $this->get('translator')->trans('reunion.aceptacion_auto_ok',
                        array(
                            '%reunion%' => $entity->getNombrePublico()
                        )),
                $entity->getCreador()->getEmail(),
                'JmbermudoSGR3Bundle:Reunion:email/email_aceptacion_auto_creador_' . $request->getLocale() . '.txt.twig',
                    array(
                        'nombre' => $entity->getNombrePublico(),
                        'preReserva' => $preReservaAceptada
                    )
                );

        //Y a todos los participantes
        foreach ($entity->getInvitados() as $invitado) {
            $this->sendMail(
                $this->get('translator')->trans('reunion.aceptacion_auto_invitado',
                        array(
                            '%reunion%' => $entity->getNombrePublico()
                        )),
                $invitado->getEmail(),
                'JmbermudoSGR3Bundle:Reunion:email/email_aceptacion_auto_invitado_' . $request->getLocale() . '.txt.twig',
                array(
                    'nombre' => $entity->getNombrePublico(),
                    'invitado' => $invitado->getNombre(),
                    'preReserva' => $preReservaAceptada
                )
            );
        }
    }

    private function avisaCancelacionAutomatica(Reunion $entity, Request $request)
    {
        //Avisamos por email al creador
        $this->sendMail(
                $this->get('translator')->trans('reunion.cancelacion_auto_ok',
                        array(
                            '%reunion%' => $entity->getNombrePublico()
                        )),
                $entity->getCreador()->getEmail(),
                'JmbermudoSGR3Bundle:Reunion:email/email_cancelacion_auto_creador_' . $request->getLocale() . '.txt.twig',
                array('nombre' => $entity->getNombrePublico())
                );

        //Y a todos los participantes
        foreach ($entity->getInvitados() as $invitado) {
            $this->sendMail(
                $this->get('translator')->trans('reunion.cancelacion_auto_invitado',
                        array(
                            '%reunion%' => $entity->getNombrePublico()
                        )),
                $invitado->getEmail(),
                'JmbermudoSGR3Bundle:Reunion:email/email_cancelacion_auto_invitado_' . $request->getLocale() . '.txt.twig',
                array(
                    'nombre' => $entity->getNombrePublico(),
                    'invitado' => $invitado->getNombre()
                )
            );
        }
    }

    private function enviaLog(Request $request, $fecha)
    {

        $this->sendMail(
                $this->get('translator')->trans('admin.envio_log_daemon',
                        array(
                            '%fecha%' => $fecha
                        )),
                $this->container->getParameter('mail_administrador'),
                'JmbermudoSGR3Bundle:Reunion:email/log_daemon_' . $request->getLocale() . '.txt.twig',
                array(
                    'fecha' => $fecha,
                    'mensajes' => $this->mensajes
                )
        );
    }

    /**
     * Método que realiza el envío de emails. Si se cambia el mecanismo, cambiar sólo aquí.
     * @param string $asunto
     * @param string $para
     * @param string $plantilla
     * @param array $parametros
     */
    private function sendMail($asunto, $para, $plantilla, $parametros)
    {
        $message = \Swift_Message::newInstance()
                ->setSubject($this->get('translator')->trans('global.name') . ': ' . $asunto)
                ->setFrom($this->container->getParameter('mailer_user'))
                ->setTo($para)
                ->setBody(
                    $this->renderView(
                        $plantilla,
                        $parametros
                    )
                );
            $this->get('mailer')->send($message);
    }

    private function formatFecha(\Datetime $fecha, Request $request)
    {
        $formatterFecha = \IntlDateFormatter::create(
                        $request->getLocale(),
                        \IntlDateFormatter::MEDIUM,
                        \IntlDateFormatter::NONE,
                        $fecha->getTimezone()->getName(),
                        \IntlDateFormatter::GREGORIAN,
                        null
                    );

        return $formatterFecha->format($fecha);
    }
}


text:
using System.Windows;

namespace Igniter.Tests.Live
{
    /// <summary>
    /// Interaction logic for DirectoryResourcesBehaviorTestWindow.xaml
    /// </summary>
    [LiveTest("Folder Resource Dictionary")]
    public partial class DirectoryResourcesBehaviorTestWindow : Window
    {
        public DirectoryResourcesBehaviorTestWindow()
        {
            InitializeComponent();
        }
    }
}


text:
[![NPM](https://nodei.co/npm/react-native-fa-icons.png)](https://npmjs.org/package/react-native-fa-icons)

Font Awesome Icons for React Native. Inspired from [react-native-fontawesome](https://github.com/entria/react-native-fontawesome). This module uses Font Awesome latest version [4.7.0](http://fontawesome.io/assets/font-awesome-4.7.0.zip).

# Benefits
- No bloatware, one package with one iconset, nothing more nothing less
- Full set of FontAwesome Icons properly updated
- Insanely fast with minimal memory footprint
- Uses the OS to render icons, for best in class performance (refer to performance note bellow)

# Installation

### Using npm
`npm i --save react-native-fa-icons`

### Using yarn

`yarn add react-native-fa-icons`

# Adding Font File

### Automatically

`react-native link react-native-fa-icons`

**Note:** There is no Java/ObjectiveC/swift binaries added using this command, it simply adds the font file to your android and ios projects.

### Manually

[Adding Custom Fonts to A React Native Application for IOS](https://medium.com/@dabit3/adding-custom-fonts-to-react-native-b266b41bff7f)

[Adding Custom Fonts to A React Native Application for Android](https://medium.com/@gattermeier/custom-fonts-in-react-native-for-android-b8a331a7d2a7)

# Usage
```javascript
import Icon from 'react-native-fa-icons';

<Icon name="address-book" style={{ fontSize: 45, color: 'green' }} />
```

# Props
| prop | required | type | description |
| ---- | ---- | ----| ---- |
| name | Yes | string | Icon name from [here](http://fontawesome.io/icons/). |

All props supported by react-native `Text` are also supported by `Ìcon`. See: https://facebook.github.io/react-native/docs/text#props

# Why this is fast, and uses almost no extra memory
This package uses the Text element to render Icons. The Text element delegates
to the OS the render process of the icons based on the Font file.
Both IOS and Android render fonts amazingly fast with little memory overhead. In essence
FontAwesome.ttf will be used by the OS to render icons and will benefit of years
of native software improvement as well hardware acceleration.

# MIT License

Copyright (c) 2017 Muhammad Usman

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


text:
'use strict';

require('../common/expect-message-to-equal');
require('../../jasmine-custom-message');
require('../common/test-jasmine-custom-message');


text:
#include "seurat/ingest/ldi_loader.h"

#include <memory>
#include <string>

#include "ion/math/vector.h"
#include "gtest/gtest.h"
#include "absl/memory/memory.h"
#include "seurat/api/image.pb.h"
#include "seurat/base/file_system.h"
#include "seurat/base/status.h"
#include "seurat/image/ldi.h"
#include "seurat/testing/ion_test_utils.h"
#include "seurat/testing/test_flags.h"

namespace seurat {
namespace ingest {
namespace {

using base::Color4f;
using ion::math::Point2i;
using ion::math::Vector2i;

TEST(LdiLoader, ReadArnoldExr) {
  // The scene in the test file consists of:
  //
  // * An opaque red plane at world-space Z position -2.0.
  // * A semi-transparent (opacity 0.5) blue plane at world-space Z position
  //   -1.0.
  // * A camera at the origin, looking down the negative Z-axis, with an aspect
  //   ratio of 2.0 and a vertical FOV of 90 degree.
  //
  // The image resolution is 64 x 32 pixels. Note that Arnold renders depth in
  // eye-space Z, so expected depth values are 1.0 and 2.0, respectively.  The
  // color channels use premultiplied alpha.
  //
  // Values read from the test file may be off by some epsilon, the numerical
  // values are generated by a raytracer, and hence some floating-point
  // precision issues are to be expected.
  base::FileSystem file_system(seurat::testing::GetTestSrcdir());
  const char kExrFilename[] =
      "com_google_seurat/seurat/ingest/testdata/arnold_deep_exr.exr";
  api::proto::Ldi ldi_proto;
  api::proto::LdiFile* const ldi_file_proto = ldi_proto.mutable_ldi_file();
  ldi_file_proto->set_path(kExrFilename);

  auto ldi_loader = absl::make_unique<LdiLoader>();
  image::Ldi4f ldi;
  EXPECT_TRUE(ldi_loader->Load(ldi_proto, &file_system, &ldi).ok());

  const Vector2i kSize(64, 32);
  const Color4f kOpaqueRed(1.0f, 0.0f, 0.0f, 1.0f);
  // Arnold uses premultiplied alpha for DeepEXR output.
  const Color4f kSemiTransparentBlue(0.0f, 0.0f, 0.5f, 0.5f);
  EXPECT_EQ(kSize, ldi.GetSize());
  for (int y = 0; y < kSize[1]; ++y) {
    for (int x = 0; x < kSize[0]; ++x) {
      const Point2i p(x, y);
      EXPECT_EQ(2, ldi.GetSampleCount(p));
      EXPECT_VECTOR_NEAR(kSemiTransparentBlue, ldi.GetColors(p)[0], 1e-3);
      EXPECT_FLOAT_EQ(1.0f, ldi.GetDepths(p)[0]);
      EXPECT_VECTOR_NEAR(kOpaqueRed, ldi.GetColors(p)[1], 1e-3);
      EXPECT_FLOAT_EQ(2.0f, ldi.GetDepths(p)[1]);
    }
  }
}

TEST(LdiLoader, DepthImageWithTransparency) {
  // Test with an analytically generated EXR depth image.
  //
  // The image has a size of 32x16 pixels and contains five channels:
  // "R", "G", "B", "A", and "Z".
  //
  // The upper half of the image is semi-transparent red:
  // RGBA=(0.5, 0.0, 0.0, 0.5) and Z=0.25.
  //
  // The lower half of the image is completely transparent:
  // RGBA=(0.0, 0.0, 0.0, 0.0) and Z=0.0.
  //
  // The LdiLoader is expected to output no samples for the lower half of the
  // image and to output the upper half exactly as specified above.

  base::FileSystem file_system(seurat::testing::GetTestSrcdir());
  const char kExrFilename[] =
      "com_google_seurat/seurat/ingest/testdata/depth_image_with_transparency.exr";
  api::proto::Ldi ldi_proto;
  api::proto::DepthImageFile* const depth_image_proto =
      ldi_proto.mutable_depth_image_file();
  api::proto::Image4File* const color_proto =
      depth_image_proto->mutable_color();
  api::proto::Image1File* const depth_proto =
      depth_image_proto->mutable_depth();
  color_proto->set_path(kExrFilename);
  color_proto->set_channel_0("R");
  color_proto->set_channel_1("G");
  color_proto->set_channel_2("B");
  color_proto->set_channel_alpha("A");
  depth_proto->set_path(kExrFilename);
  depth_proto->set_channel_0("Z");

  auto ldi_loader = absl::make_unique<LdiLoader>();
  image::Ldi4f ldi;
  EXPECT_TRUE(ldi_loader->Load(ldi_proto, &file_system, &ldi).ok());

  const Vector2i kSize(32, 16);
  const Color4f kSemiTransparentRed(0.5f, 0.0f, 0.0f, 0.5f);
  const float kDepth = 0.25f;

  for (int y = 0; y < kSize[1]; ++y) {
    for (int x = 0; x < kSize[0]; ++x) {
      const Point2i p(x, y);
      if (y < kSize[1] / 2) {
        EXPECT_EQ(0, ldi.GetSampleCount(p));
      } else {
        EXPECT_EQ(1, ldi.GetSampleCount(p));
        EXPECT_VECTOR_NEAR(kSemiTransparentRed, ldi.GetColors(p)[0], 1e-3f);
        EXPECT_FLOAT_EQ(kDepth, ldi.GetDepths(p)[0]);
      }
    }
  }
}

}  // namespace
}  // namespace ingest
}  // namespace seurat


text:
<?xml version="1.0"?>

    <title>XHTML Test Page</title>

Open new window

Create a new anonymous window

Open page with iframes in same window

Open a window with a close button

XHTML Might Be The Future

If you'd like to go elsewhere then click me.

Alternatively, this goes to the same place.

    <form name="someForm">
        <input id="username" type="text" value="change"/>
    </form>

    This link has the same text as another link: click me.

Another div starts here.

An H2 title

Some more text

  Foo

            I have width

Link=equalssign

Spaced out

first_div

second_div

  first_span
  second_span

I'm a parent

I'm a child

Woo woo


text:
package wzp.project.android.elvtmtn.util.myokhttp;

import java.io.IOException;

import okhttp3.Response;

public abstract class MyStringCallback extends MyCallback<String> {

	@Override
	public String parseNetworkResponse(Response response) throws IOException
	{
	    return response.body().string();
	}
}


text:
from nova import context
from nova import exception
from nova import objects
from nova.pci import device
from nova import test

dev_dict = {
    'created_at': None,
    'updated_at': None,
    'deleted_at': None,
    'deleted': None,
    'id': 1,
    'compute_node_id': 1,
    'address': 'a',
    'vendor_id': 'v',
    'product_id': 'p',
    'numa_node': 1,
    'dev_type': 't',
    'status': 'available',
    'dev_id': 'i',
    'label': 'l',
    'instance_uuid': None,
    'extra_info': '{}',
    'request_id': None,
    }

class PciDeviceTestCase(test.TestCase):
    def setUp(self):
        super(PciDeviceTestCase, self).setUp()
        self.ctxt = context.get_admin_context()
        self.inst = objects.Instance()
        self.inst.uuid = 'fake-inst-uuid'
        self.inst.pci_devices = objects.PciDeviceList()
        self.devobj = objects.PciDevice._from_db_object(
            self.ctxt,
            objects.PciDevice(),
            dev_dict)

    def test_claim_device(self):
        device.claim(self.devobj, self.inst)
        self.assertEqual(self.devobj.status, 'claimed')
        self.assertEqual(self.devobj.instance_uuid,
                         self.inst.uuid)
        self.assertEqual(len(self.inst.pci_devices), 0)

    def test_claim_device_fail(self):
        self.devobj.status = 'allocated'
        self.assertRaises(exception.PciDeviceInvalidStatus,
                          device.claim, self.devobj, self.inst)

    def test_allocate_device(self):
        device.claim(self.devobj, self.inst)
        device.allocate(self.devobj, self.inst)
        self.assertEqual(self.devobj.status, 'allocated')
        self.assertEqual(self.devobj.instance_uuid, 'fake-inst-uuid')
        self.assertEqual(len(self.inst.pci_devices), 1)
        self.assertEqual(self.inst.pci_devices[0]['vendor_id'], 'v')
        self.assertEqual(self.inst.pci_devices[0]['status'], 'allocated')

    def test_allocacte_device_fail_status(self):
        self.devobj.status = 'removed'
        self.assertRaises(exception.PciDeviceInvalidStatus,
                          device.allocate,
                          self.devobj,
                          self.inst)

    def test_allocacte_device_fail_owner(self):
        inst_2 = objects.Instance()
        inst_2.uuid = 'fake-inst-uuid-2'
        device.claim(self.devobj, self.inst)
        self.assertRaises(exception.PciDeviceInvalidOwner,
                          device.allocate,
                          self.devobj, inst_2)

    def test_free_claimed_device(self):
        device.claim(self.devobj, self.inst)
        device.free(self.devobj, self.inst)
        self.assertEqual(self.devobj.status, 'available')
        self.assertIsNone(self.devobj.instance_uuid)

    def test_free_allocated_device(self):
        device.claim(self.devobj, self.inst)
        device.allocate(self.devobj, self.inst)
        self.assertEqual(len(self.inst.pci_devices), 1)
        device.free(self.devobj, self.inst)
        self.assertEqual(len(self.inst.pci_devices), 0)
        self.assertEqual(self.devobj.status, 'available')
        self.assertIsNone(self.devobj.instance_uuid)

    def test_free_device_fail(self):
        self.devobj.status = 'removed'
        self.assertRaises(exception.PciDeviceInvalidStatus,
                          device.free, self.devobj)

    def test_remove_device(self):
        device.remove(self.devobj)
        self.assertEqual(self.devobj.status, 'removed')
        self.assertIsNone(self.devobj.instance_uuid)

    def test_remove_device_fail(self):
        device.claim(self.devobj, self.inst)
        self.assertRaises(exception.PciDeviceInvalidStatus,
                          device.remove, self.devobj)


text:
require 'api/lib/restresource'
require 'api/lib/restresource_tags'
require 'api/resources/groups/group_rights.rest'
require 'api/resources/groups/group_members.rest'

module MojuraAPI

	class GroupResource < RestResource

		def name
			'Groups'
		end

		def description
			'A group combines members and rights.'
		end

		def all(params)
			return paginate(params) { |options| Groups.new(self.filter(params), options) }
		end

		def get(params)
			Group.new(params[:ids][0]).to_h
			#TODO: Check rights
		end

		def post(params)
			Group.new.load_from_hash(params).save_to_db.to_h
			#TODO: Check rights
		end

		#noinspection RubyUnusedLocalVariable,RubyUnusedLocalVariable
		def put(params)
			group = Group.new(params[:ids][0])
			#TODO: Check rights
			return group.load_from_hash(params).save_to_db.to_h
		end

		def delete(params)
			group = Group.new(params[:ids][0])
			#TODO: Check rights
			group.delete_from_db
			return [:success => true]
		end

		def all_conditions
			{
				description: 'Returns a list of groups. Use pagination and filtering to make selections.',
				attributes: page_conditions.merge(filter_conditions)
			}
		end

		def get_conditions
			{
				description: 'Returns a group with the specified groupid'
			}
		end

		def post_conditions
			result =
				{
					description: 'Creates a group and returns the resource.',
					uri: @module + '/' + @items_path,
					attributes: {
						name: {required: true, type: String, description: 'The name of the group.'},
						description: {required: false, type: String, description: 'A description of the group. The text may be contain UBB codes for markup.'},
					}
				}
			result[:attributes].merge(self.rights_conditions)
			return result
		end

		def put_conditions
			result =
				{
					description: 'Updates a group with the given keys.',
					attributes: self.post_conditions[:attributes].each { |_, v| v[:required] = false }
				}
			return result
		end

		def delete_conditions
			{
				description: 'Deletes the group and all its members and rights',
				uri: @module + '/' + @item_path,
			}
		end

	end

	API.register_resource(GroupResource.new('groups', '', '[groupid]'))
	API.register_resource(TagsResource.new('groups', '[groupid]/tags', Group))
end


text:
require 'test_helper'

describe CfScript::Scope::Space do
  include MockExecution

  it "behaves like a subclass of Scope::Target" do
    space = nil

    fake_cf target: :staging do
      space = CfScript::Scope::Space.new
    end

    assert_kind_of CfScript::Scope::Target, space

    assert_equal 'staging', space.current_space
  end

  it "calls target when initialized with a space name" do
    space = nil

    fake_cf target: :staging do
      space = CfScript::Scope::Space.new(:production)
    end

    assert_equal 'production', space.current_space
  end
end


text:
//
//  AEConstant.h
//  AEAssistant
//
//  Created by Qian Ye on 16/4/21.
//  Copyright © 2016年 StarDust. All rights reserved.
//

#ifndef AEConstant_h
#define AEConstant_h

static NSString *const kHomeViewDataFinishLoadingNotification = @"kHomeViewDataFinishLoadingNotification";

static NSString *const UserLocationHasChangedNotification = @"UserLocationHasChangedNotification";

static NSString *const kErrMsgKey = @"kErrMsgKey";

#endif /* AEConstant_h */


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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <groupId>org.wso2.carbon.apimgt</groupId>
        <artifactId>apimgt</artifactId>
        <version>6.8.238-SNAPSHOT</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>org.wso2.carbon.apimgt.common.gateway</artifactId>
    <packaging>bundle</packaging>

    <dependencies>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.orbit.com.nimbusds</groupId>
            <artifactId>nimbus-jose-jwt</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
        </dependency>
        <dependency>
            <groupId>net.minidev</groupId>
            <artifactId>json-smart</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.am.analytics.publisher</groupId>
            <artifactId>org.wso2.am.analytics.publisher.client</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
                <version>${maven.spotbugsplugin.version}</version>
                <configuration>
                    <effort>Max</effort>
                    <threshold>Low</threshold>
                    <xmlOutput>true</xmlOutput>
                    <spotbugsXmlOutputDirectory>${project.build.directory}/spotbugs</spotbugsXmlOutputDirectory>
                    <!--Exclude sources-->
                    <excludeFilterFile>${maven.spotbugsplugin.exclude.file}</excludeFilterFile>
                </configuration>
                <executions>
                    <execution>
                        <id>analyze-compile</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                        <Bundle-Name>${project.artifactId}</Bundle-Name>
                        <Private-Package>
                        </Private-Package>
                        <Export-Package>
                            org.wso2.carbon.apimgt.common.gateway.*;version="${carbon.apimgt.version}",
                        </Export-Package>
                        <Import-Package>
                            com.google.gson.annotations.*,
                            org.apache.commons.logging.*,
                            org.wso2.am.analytics.publisher.*;version="${analytics.event.publisher.client.version.range}",
                            *;resolution:=optional
                        </Import-Package>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>*</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>


text:
package integration

import (
	"errors"
	"net/http"

	"github.com/asaskevich/govalidator"
)

// MenderAPIOption is the type of constructor options for NewMenderAPI
type MenderAPIOption func(*MenderAPI) error

type MenderAPI struct {
	client *http.Client
	uri    string
}

func NewMenderAPI(uri string, options ...MenderAPIOption) (*MenderAPI, error) {

	if !govalidator.IsURL(uri) {
		return nil, errors.New("invalid server uri")
	}

	api := &MenderAPI{uri: uri}

	// Default http client
	api.client = &http.Client{}

	// Apply all user provided configuration
	for _, option := range options {
		err := option(api)
		if err != nil {
			return nil, err
		}
	}

	return api, nil
}

func WithHTTPClient(client *http.Client) MenderAPIOption {
	return func(api *MenderAPI) error {
		if client != nil {
			api.client = client
		}
		return nil
	}
}


text:
@class DIFaceViewController;

@interface DIFaceImageView : UIImageView

@property(weak, nonatomic)
    DIFaceViewController* faceViewController;

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;

@end


text:
FROM ubuntu

# Install the necessary packages
RUN apt-get update && apt-get install -y \
  curl \
  unzip \
  julia \
  libopenblas-dev \
  python \
  python-dev \
  python-pip

# Install fastFM and its dependencies
RUN pip install cython numpy
RUN pip install fastFM

# Install the FactorizationMachines package from Github
RUN julia -e "Pkg.clone(\"https://github.com/btwardow/FactorizationMachines.jl.git\")"

COPY . /app/

WORKDIR /app

# Use the benchmarking script as the application command
CMD ["bash", "run_benchmarks.sh"]


text:
package org.apache.phoenix.parse;

import org.apache.phoenix.jdbc.PhoenixStatement.Operation;
import org.apache.phoenix.schema.Sequence;

public interface BindableStatement {
    public int getBindCount();
    public Operation getOperation();
    public Sequence.Action getSequenceAction();
}


text:
std::shared_ptr< iRNG > RandomProcess::m_rng;
bool RandomProcess::m_init = false;


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <LinearLayout android:id="@+id/linearLayout0"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:layout_width="match_parent">

        <EditText
            android:text="User"
            android:layout_height="wrap_content"
            android:id="@+id/txtUser" android:layout_width="0dp"
            android:layout_weight=".5" />

        <EditText android:text="Password"
            android:layout_height="wrap_content"
            android:id="@+id/txtPassword"
            android:layout_width="0dp"
            android:layout_weight=".5" />

    </LinearLayout>

    <LinearLayout android:id="@+id/linearLayout1"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:layout_width="match_parent">

        <Button
            android:text="Select"
            android:layout_height="wrap_content"
            android:id="@+id/btnSelect"
            android:layout_width="0dp"
            android:layout_weight=".3" />

        <Button
            android:text="Add"
            android:layout_height="wrap_content"
            android:id="@+id/btnAdd"
            android:layout_width="0dp"
            android:layout_weight=".3" />

        <Button android:text="Remove"
            android:layout_height="wrap_content"
            android:id="@+id/btnRemove"
            android:layout_width="0dp"
            android:layout_weight=".3" />

    </LinearLayout>

    <LinearLayout android:id="@+id/linearLayout2"
        android:layout_height="wrap_content"
        android:layout_width="match_parent"
        android:orientation="vertical">
    </LinearLayout>

</LinearLayout>


text:
ActiveRecord::Schema.define(version: 20140820172427) do

  create_table "dimaddress.", id: false, force: true do |t|
    t.string "id",                  limit: 8,  null: false
    t.string "address",             limit: 60, null: false
    t.string "region",              limit: 60, null: false
    t.string "franchise_territory", limit: 60, null: false
    t.string "udprn",               limit: 60, null: false
    t.string "country",             limit: 3,  null: false
  end

  create_table "dimtime.", id: false, force: true do |t|
    t.string  "id",          limit: 25, null: false
    t.integer "year",                   null: false
    t.string  "season",      limit: 6,  null: false
    t.integer "quarter",                null: false
    t.integer "month",                  null: false
    t.integer "week",                   null: false
    t.integer "day",                    null: false
    t.integer "hour",                   null: false
    t.integer "minute",                 null: false
    t.string  "day_of_week", limit: 3,  null: false
  end

  create_table "factsale.", id: false, force: true do |t|
    t.integer  "id"
    t.string   "started_at",       limit: 25
    t.integer  "charged_amount"
    t.integer  "estimated_amount"
    t.string   "location",         limit: 8
    t.datetime "created_at"
  end

  create_table "schema_migrations.", id: false, force: true do |t|
    t.string "version", null: false
  end

end


text:
## What is it?

If you've ever wanted to host a network service on a Seattle node, such as a diagnostic web page or similar, you'll no doubt be familiar with their potential instability. If you didn't watch your nodes like a hawk, You might lose one and not know about it for hours, perhaps even a day or more. And even if you can deal with that, your users still have to punch in an IP Address and port combination to navigate to your service! This is a very clumsy way to do things, so zenodotus was built to make the process cleaner.

By adding a few lines of code to the REPY application running in your node, you can register your service to a domain name through Seattle's open DHT server, allowing for users to navigate to your service with a domain name and a port, rather than having to remember a specific node's IP address. What's more, you can register multiple nodes to a single hostname, meaning that even if one node fails, your service will still be available, allowing you to have uninterrupted uptime without constant vigilance.

## How do I use it?

General instructions for use are as follows:

The following code snippet is an example of how to implement zenodotus hosting in a REPY node. This code runs in each node hosting the service, so each one autonomously advertises its own existence, meaning that nodes which fail for whatever reason will simply be omitted from the DHT after their advertise expires.

```python
include	advertise.repy

# Refresh every	600 seconds (10	minutes)
_REFRESH_FREQUENCY = 600

# Put the address here,	since it's a constant.
_ADDRESS_NAME = "hello.zenodotus.poly.edu"

def _rehost_callback():
  # Refresh the association.
  advertise_announce(_ADDRESS_NAME, getmyip(), _REFRESH_FREQUENCY)

  # Set our timer again.
  settimer(_REFRESH_FREQUENCY - 5, _rehost_callback, [])

if callfunc == 'initialize':
  # For	example	purposes, let's suppose	you're running a service called
  # helloworld that displays "Hello, World!" In	a web page when	the user
  # connects to	a REPY node you control	via web	browser. It makes sense
  # to use the hostname	"hello.zenodotus.poly.edu", so that's
  # what we'll advertise.

  # Associates "hello.zenodotus.poly.edu" : <Node's IP> for
  # _REFRESH_FREQUENCY seconds.
  #
  # ########
  # Note that this line is deprecated. To register a 'A' query in
  # zenodotus, the _ADDRESS_NAME should be preceded with the
  # character 'A' and a delimiting space. The format used here
  # will still work, since it makes sense conventionally to
  # maintain it, but it is not preferred.
  # ########
  #
  advertise_announce(_ADDRESS_NAME, getmyip(), _REFRESH_FREQUENCY)

  # Set a timer	for a callback function to refresh the DHT association.
  # We should check this every _checking_frequency seconds, to save system
  # processing resources without sacrificing potential uptime. No args are needed.
  settimer(_REFRESH_FREQUENCY - 5, _rehost_callback, [])

  # You need to	have your service code in here as well.	This code
  # alone will terminate before it refreshes even once.

```

**To run this code on a Seattle node, you will need to pre-process the code using [wiki:SeattleLib/repypp.py repypp.py]**

When running in a node, this will associate helloworld.zenodotus.poly.edu with your node's IP Address for 600 seconds. This number is arbitrary, but it is worth noting that you should not simply place a very large number here, since it might cause confusion for your users if old associations linger after the service has been taken down.

Note that there is a bug in the above code. If the node this is running in has its computer clock reset during the runtime, getruntime() will fail to provide increasing values, and the node will fail to update for a time, which will give the illusion that it has been terminated. There doesn't seem to be a good way to solve this.

While this is running in at least one node, your users will no longer have to type a URL of the form <IP Address>:<Port> in to their browser to access your service. Instead, they can type in something more friendly, as in the example above: 'hello.zenodotus.poly.edu:631XX'. It is important to remember that this hosting service can't solve the port issue, since REPY VMs can only use GENIports for networking operations. As such, your users will still have to append the GENIport to their URLs.

**Zenodotus supports DNS chaining as well**.
If you want to use your own DNS service, you can register an advertise value of "CNAME name.zenodotus.poly.edu" : Hostname to indicate that a subserver exists, and RRs known by that server should follow the form "mypage.name.zenodotus.poly.edu", where 'name' is the name of your service.

## Debugging

It is important to note that we currently only support simple A lookup queries. A functionality expansion is being worked on, and can be expected fairly soon. For now, however, just remember that there is no support for other query types.


text:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Policy xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" PolicyId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIC163:policy" RuleCombiningAlgId="urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:deny-overrides" Version="1.0" >
    <Description>
        Policy for Conformance Test IIC163.
    </Description>
    <Target/>
    <Rule Effect="Permit" RuleId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIC163:rule">
        <Condition>
<Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-equal">
            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:rfc822Name-bag-size">
                <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:rfc822Name-bag">
                    <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:rfc822Name-one-and-only">
                        <AttributeDesignator AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:test-attr" Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" DataType="urn:oasis:names:tc:xacml:1.0:data-type:rfc822Name" MustBePresent="false"/>
                    </Apply>
                    <AttributeValue DataType="urn:oasis:names:tc:xacml:1.0:data-type:rfc822Name">Zaphod.Beedlebrox@galactic.COM</AttributeValue>
                </Apply>
            </Apply>
            <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#integer">2</AttributeValue>
</Apply>
        </Condition>
    </Rule>
</Policy>


text:
package vtk.xml;

public class StylesheetCompilationException extends RuntimeException {

    private static final long serialVersionUID = 3256443607719687220L;

    public StylesheetCompilationException(String msg) {
        super(msg);
    }

    public StylesheetCompilationException(String msg, Throwable cause) {
        super(msg, cause);
    }
}


text:
Capybara.configure do |config|
  config.default_driver = :rack_test
  config.javascript_driver = :webkit
end


text:
<?php

namespace Fluent\Test;

use function Fluent\create;
use function Fluent\factory;
use function Fluent\get;
use Fluent\PhpConfigLoader;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\ContainerBuilder;

/**
 * Test factory() definitions.
 */
class FactoryTest extends TestCase
{
    /**
     * @test
     */
    public function create_a_service_using_a_factory()
    {
        $container = new ContainerBuilder;
        (new PhpConfigLoader($container))->load([
            'foo' => factory([self::class, 'foo']),
        ]);
        self::assertInstanceOf('stdClass', $container->get('foo'));
    }

    /**
     * @test
     */
    public function arguments_can_be_passed_to_the_factory()
    {
        $container = new ContainerBuilder;
        (new PhpConfigLoader($container))->load([
            'foo' => factory([self::class, 'bar'])
                ->arguments('abc', 'def'),
        ]);
        self::assertEquals('abc', $container->get('foo')->arg1);
        self::assertEquals('def', $container->get('foo')->arg2);
    }

    /**
     * @test
     */
    public function services_can_be_injected_in_arguments()
    {
        $container = new ContainerBuilder;
        (new PhpConfigLoader($container))->load([
            'foo' => factory([self::class, 'bar'])
                ->arguments(get('abc'), ''),
            'abc' => create('stdClass'),
        ]);
        self::assertInstanceOf('stdClass', $container->get('foo')->arg1);
    }

    /**
     * @test
     */
    public function parameters_can_be_injected_in_arguments()
    {
        $container = new ContainerBuilder;
        (new PhpConfigLoader($container))->load([
            'foo' => factory([self::class, 'bar'])
                ->arguments('%abc%', ''),
            'abc' => 'def',
        ]);
        self::assertEquals('def', $container->get('foo')->arg1);
    }

    public static function foo()
    {
        return new \stdClass();
    }

    public static function bar($arg1, $arg2)
    {
        $obj = new \stdClass();
        $obj->arg1 = $arg1;
        $obj->arg2 = $arg2;
        return $obj;
    }
}


text:
package com.amazonaws.services.lambda;

import javax.annotation.Generated;

import com.amazonaws.services.lambda.model.*;

/**
 * Abstract implementation of {@code AWSLambdaAsync}. Convenient method forms pass through to the corresponding overload
 * that takes a request object and an {@code AsyncHandler}, which throws an {@code UnsupportedOperationException}.
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AbstractAWSLambdaAsync extends AbstractAWSLambda implements AWSLambdaAsync {

    protected AbstractAWSLambdaAsync() {
    }

    @Override
    public java.util.concurrent.Future<AddPermissionResult> addPermissionAsync(AddPermissionRequest request) {

        return addPermissionAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<AddPermissionResult> addPermissionAsync(AddPermissionRequest request,
            com.amazonaws.handlers.AsyncHandler<AddPermissionRequest, AddPermissionResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<CreateAliasResult> createAliasAsync(CreateAliasRequest request) {

        return createAliasAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<CreateAliasResult> createAliasAsync(CreateAliasRequest request,
            com.amazonaws.handlers.AsyncHandler<CreateAliasRequest, CreateAliasResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<CreateEventSourceMappingResult> createEventSourceMappingAsync(CreateEventSourceMappingRequest request) {

        return createEventSourceMappingAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<CreateEventSourceMappingResult> createEventSourceMappingAsync(CreateEventSourceMappingRequest request,
            com.amazonaws.handlers.AsyncHandler<CreateEventSourceMappingRequest, CreateEventSourceMappingResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<CreateFunctionResult> createFunctionAsync(CreateFunctionRequest request) {

        return createFunctionAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<CreateFunctionResult> createFunctionAsync(CreateFunctionRequest request,
            com.amazonaws.handlers.AsyncHandler<CreateFunctionRequest, CreateFunctionResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DeleteAliasResult> deleteAliasAsync(DeleteAliasRequest request) {

        return deleteAliasAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DeleteAliasResult> deleteAliasAsync(DeleteAliasRequest request,
            com.amazonaws.handlers.AsyncHandler<DeleteAliasRequest, DeleteAliasResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DeleteEventSourceMappingResult> deleteEventSourceMappingAsync(DeleteEventSourceMappingRequest request) {

        return deleteEventSourceMappingAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DeleteEventSourceMappingResult> deleteEventSourceMappingAsync(DeleteEventSourceMappingRequest request,
            com.amazonaws.handlers.AsyncHandler<DeleteEventSourceMappingRequest, DeleteEventSourceMappingResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DeleteFunctionResult> deleteFunctionAsync(DeleteFunctionRequest request) {

        return deleteFunctionAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DeleteFunctionResult> deleteFunctionAsync(DeleteFunctionRequest request,
            com.amazonaws.handlers.AsyncHandler<DeleteFunctionRequest, DeleteFunctionResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<GetAccountSettingsResult> getAccountSettingsAsync(GetAccountSettingsRequest request) {

        return getAccountSettingsAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<GetAccountSettingsResult> getAccountSettingsAsync(GetAccountSettingsRequest request,
            com.amazonaws.handlers.AsyncHandler<GetAccountSettingsRequest, GetAccountSettingsResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<GetAliasResult> getAliasAsync(GetAliasRequest request) {

        return getAliasAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<GetAliasResult> getAliasAsync(GetAliasRequest request,
            com.amazonaws.handlers.AsyncHandler<GetAliasRequest, GetAliasResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<GetEventSourceMappingResult> getEventSourceMappingAsync(GetEventSourceMappingRequest request) {

        return getEventSourceMappingAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<GetEventSourceMappingResult> getEventSourceMappingAsync(GetEventSourceMappingRequest request,
            com.amazonaws.handlers.AsyncHandler<GetEventSourceMappingRequest, GetEventSourceMappingResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<GetFunctionResult> getFunctionAsync(GetFunctionRequest request) {

        return getFunctionAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<GetFunctionResult> getFunctionAsync(GetFunctionRequest request,
            com.amazonaws.handlers.AsyncHandler<GetFunctionRequest, GetFunctionResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<GetFunctionConfigurationResult> getFunctionConfigurationAsync(GetFunctionConfigurationRequest request) {

        return getFunctionConfigurationAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<GetFunctionConfigurationResult> getFunctionConfigurationAsync(GetFunctionConfigurationRequest request,
            com.amazonaws.handlers.AsyncHandler<GetFunctionConfigurationRequest, GetFunctionConfigurationResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<GetPolicyResult> getPolicyAsync(GetPolicyRequest request) {

        return getPolicyAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<GetPolicyResult> getPolicyAsync(GetPolicyRequest request,
            com.amazonaws.handlers.AsyncHandler<GetPolicyRequest, GetPolicyResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<InvokeResult> invokeAsync(InvokeRequest request) {

        return invokeAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<InvokeResult> invokeAsync(InvokeRequest request,
            com.amazonaws.handlers.AsyncHandler<InvokeRequest, InvokeResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    @Deprecated
    public java.util.concurrent.Future<InvokeAsyncResult> invokeAsyncAsync(InvokeAsyncRequest request) {

        return invokeAsyncAsync(request, null);
    }

    @Override
    @Deprecated
    public java.util.concurrent.Future<InvokeAsyncResult> invokeAsyncAsync(InvokeAsyncRequest request,
            com.amazonaws.handlers.AsyncHandler<InvokeAsyncRequest, InvokeAsyncResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<ListAliasesResult> listAliasesAsync(ListAliasesRequest request) {

        return listAliasesAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ListAliasesResult> listAliasesAsync(ListAliasesRequest request,
            com.amazonaws.handlers.AsyncHandler<ListAliasesRequest, ListAliasesResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<ListEventSourceMappingsResult> listEventSourceMappingsAsync(ListEventSourceMappingsRequest request) {

        return listEventSourceMappingsAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ListEventSourceMappingsResult> listEventSourceMappingsAsync(ListEventSourceMappingsRequest request,
            com.amazonaws.handlers.AsyncHandler<ListEventSourceMappingsRequest, ListEventSourceMappingsResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    /**
     * Simplified method form for invoking the ListEventSourceMappings operation.
     *
     * @see #listEventSourceMappingsAsync(ListEventSourceMappingsRequest)
     */
    @Override
    public java.util.concurrent.Future<ListEventSourceMappingsResult> listEventSourceMappingsAsync() {

        return listEventSourceMappingsAsync(new ListEventSourceMappingsRequest());
    }

    /**
     * Simplified method form for invoking the ListEventSourceMappings operation with an AsyncHandler.
     *
     * @see #listEventSourceMappingsAsync(ListEventSourceMappingsRequest, com.amazonaws.handlers.AsyncHandler)
     */
    @Override
    public java.util.concurrent.Future<ListEventSourceMappingsResult> listEventSourceMappingsAsync(
            com.amazonaws.handlers.AsyncHandler<ListEventSourceMappingsRequest, ListEventSourceMappingsResult> asyncHandler) {

        return listEventSourceMappingsAsync(new ListEventSourceMappingsRequest(), asyncHandler);
    }

    @Override
    public java.util.concurrent.Future<ListFunctionsResult> listFunctionsAsync(ListFunctionsRequest request) {

        return listFunctionsAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ListFunctionsResult> listFunctionsAsync(ListFunctionsRequest request,
            com.amazonaws.handlers.AsyncHandler<ListFunctionsRequest, ListFunctionsResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    /**
     * Simplified method form for invoking the ListFunctions operation.
     *
     * @see #listFunctionsAsync(ListFunctionsRequest)
     */
    @Override
    public java.util.concurrent.Future<ListFunctionsResult> listFunctionsAsync() {

        return listFunctionsAsync(new ListFunctionsRequest());
    }

    /**
     * Simplified method form for invoking the ListFunctions operation with an AsyncHandler.
     *
     * @see #listFunctionsAsync(ListFunctionsRequest, com.amazonaws.handlers.AsyncHandler)
     */
    @Override
    public java.util.concurrent.Future<ListFunctionsResult> listFunctionsAsync(
            com.amazonaws.handlers.AsyncHandler<ListFunctionsRequest, ListFunctionsResult> asyncHandler) {

        return listFunctionsAsync(new ListFunctionsRequest(), asyncHandler);
    }

    @Override
    public java.util.concurrent.Future<ListTagsResult> listTagsAsync(ListTagsRequest request) {

        return listTagsAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ListTagsResult> listTagsAsync(ListTagsRequest request,
            com.amazonaws.handlers.AsyncHandler<ListTagsRequest, ListTagsResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<ListVersionsByFunctionResult> listVersionsByFunctionAsync(ListVersionsByFunctionRequest request) {

        return listVersionsByFunctionAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ListVersionsByFunctionResult> listVersionsByFunctionAsync(ListVersionsByFunctionRequest request,
            com.amazonaws.handlers.AsyncHandler<ListVersionsByFunctionRequest, ListVersionsByFunctionResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<PublishVersionResult> publishVersionAsync(PublishVersionRequest request) {

        return publishVersionAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<PublishVersionResult> publishVersionAsync(PublishVersionRequest request,
            com.amazonaws.handlers.AsyncHandler<PublishVersionRequest, PublishVersionResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<RemovePermissionResult> removePermissionAsync(RemovePermissionRequest request) {

        return removePermissionAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<RemovePermissionResult> removePermissionAsync(RemovePermissionRequest request,
            com.amazonaws.handlers.AsyncHandler<RemovePermissionRequest, RemovePermissionResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<TagResourceResult> tagResourceAsync(TagResourceRequest request) {

        return tagResourceAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<TagResourceResult> tagResourceAsync(TagResourceRequest request,
            com.amazonaws.handlers.AsyncHandler<TagResourceRequest, TagResourceResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<UntagResourceResult> untagResourceAsync(UntagResourceRequest request) {

        return untagResourceAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<UntagResourceResult> untagResourceAsync(UntagResourceRequest request,
            com.amazonaws.handlers.AsyncHandler<UntagResourceRequest, UntagResourceResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<UpdateAliasResult> updateAliasAsync(UpdateAliasRequest request) {

        return updateAliasAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<UpdateAliasResult> updateAliasAsync(UpdateAliasRequest request,
            com.amazonaws.handlers.AsyncHandler<UpdateAliasRequest, UpdateAliasResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<UpdateEventSourceMappingResult> updateEventSourceMappingAsync(UpdateEventSourceMappingRequest request) {

        return updateEventSourceMappingAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<UpdateEventSourceMappingResult> updateEventSourceMappingAsync(UpdateEventSourceMappingRequest request,
            com.amazonaws.handlers.AsyncHandler<UpdateEventSourceMappingRequest, UpdateEventSourceMappingResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<UpdateFunctionCodeResult> updateFunctionCodeAsync(UpdateFunctionCodeRequest request) {

        return updateFunctionCodeAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<UpdateFunctionCodeResult> updateFunctionCodeAsync(UpdateFunctionCodeRequest request,
            com.amazonaws.handlers.AsyncHandler<UpdateFunctionCodeRequest, UpdateFunctionCodeResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<UpdateFunctionConfigurationResult> updateFunctionConfigurationAsync(UpdateFunctionConfigurationRequest request) {

        return updateFunctionConfigurationAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<UpdateFunctionConfigurationResult> updateFunctionConfigurationAsync(UpdateFunctionConfigurationRequest request,
            com.amazonaws.handlers.AsyncHandler<UpdateFunctionConfigurationRequest, UpdateFunctionConfigurationResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

}


text:
from ..lib import elasticbeanstalk, elb, elbv2
from ..core import io
from ..resources.strings import alerts
from ..resources.statics import elb_names
from ..objects.exceptions import NotFoundError
from . import commonops, gitops

SPACER = ' ' * 5
def status(app_name, env_name, verbose):
    env = elasticbeanstalk.get_environment(app_name, env_name)
    commonops.print_env_details(env, health=True)

    if verbose:
        # Print number of running instances
        env_dict = elasticbeanstalk.get_environment_resources(env_name)
        instances = [i['Id'] for i in
                     env_dict['EnvironmentResources']['Instances']]
        io.echo('  Running instances:', len(instances))
        #Get elb health
        try:
            load_balancer_name = [i['Name'] for i in
                                  env_dict['EnvironmentResources']['LoadBalancers']][0]
            if elb.version(load_balancer_name) == elb_names.APPLICATION_VERSION:
                target_groups = [x['PhysicalResourceId'] for x in env_dict['EnvironmentResources']['Resources']
                                 if elb_names.V2_RESOURCE_TYPE == x['Type'] ]
                io.echo('  Running processes:', len(target_groups))
                target_group_states = elbv2.get_target_group_healths(target_groups)

                for k in target_group_states: #k is tg arn
                    process_name = [x['LogicalResourceId'] for x in env_dict['EnvironmentResources']['Resources']
                                 if k == x['PhysicalResourceId'] ][0]
                    if elb_names.DEFAULT_PROCESS_LOGICAL_ID == process_name:
                        process_name = 'default'
                    io.echo(SPACER, process_name + ':')
                    current_target_group_instances = []
                    for target_group_description in target_group_states[k]['TargetHealthDescriptions']:
                        current_target_group_instances.append(target_group_description['Target']['Id'])
                        target_health = target_group_description['TargetHealth']

                        io.echo(SPACER * 2, target_group_description['Target']['Id'] + ': ' + target_health['State'])

                        if 'Description' in target_health and len(target_health['Description']) > 0:
                            io.echo(SPACER * 3,
                                    'Description: ' + target_health['Description'])
                        if 'Reason' in target_health and len(target_health['Reason']) > 0:
                            io.echo(SPACER * 3,
                                    'Reason: ' + target_health['Reason'])

                    for i in instances:
                        if i not in current_target_group_instances:
                            io.echo(SPACER * 2, i + ':', 'N/A (Not registered '
                                                    'with Target Group)')
            else:
                instance_states = elb.get_health_of_instances(load_balancer_name)
                for i in instance_states:
                    instance_id = i['InstanceId']
                    state = i['State']
                    descrip = i['Description']
                    if state == 'Unknown':
                        state += '(' + descrip + ')'
                    io.echo(SPACER, instance_id + ':', state)
                for i in instances:
                    if i not in [x['InstanceId'] for x in instance_states]:
                        io.echo(SPACER, i + ':', 'N/A (Not registered '
                                                'with Load Balancer)')

        except (IndexError, KeyError, NotFoundError) as e:
            #No load balancer. Dont show instance status
            pass

    # check platform version
    latest = commonops.get_latest_solution_stack(env.platform.version)
    if env.platform != latest:
        io.log_alert(alerts['platform.old'])

    # print out code commit repos if they exist
    default_branch = gitops.get_default_branch()
    default_repo = gitops.get_default_repository()
    codecommit_setup = (default_repo and default_repo is not None) or (default_branch and default_branch is not None)
    if codecommit_setup:
        io.echo("Current CodeCommit settings:")
        io.echo("  Repository: " + str(default_repo))
        io.echo("  Branch: " + str(default_branch))


text:
class Email < ApplicationRecord
end


text:
<?php

namespace NetSuite\Classes;

class RecurrenceDow {
    static $paramtypesmap = array(
    );
    const _sunday = "_sunday";
    const _monday = "_monday";
    const _tuesday = "_tuesday";
    const _wednesday = "_wednesday";
    const _thursday = "_thursday";
    const _friday = "_friday";
    const _saturday = "_saturday";
}


text:
const vscode = require('vscode');
const jscpd = require('jscpd');
const path = require('path');

const showLines = require('./showLines');
const reportProvider = require('./reportProvider');

function activate(context) {
  const jscpd_inst = new jscpd();
  const jscpdSchema = 'jscpd';

  let provider = new reportProvider();
  let registration = vscode.workspace.registerTextDocumentContentProvider(
    jscpdSchema,
    provider
  );

  let disposableShowLines = vscode.commands.registerCommand(
    'jscpd.showLines',
    showLines
  );

  let disposable = vscode.commands.registerCommand('extension.jscpd', function(
    explorer
  ) {
    const currentPath =
      (explorer && path.dirname(explorer._fsPath)) || vscode.workspace.rootPath;

    const exclude = vscode.workspace.getConfiguration('jscpd').get('exclude');
    const files = vscode.workspace.getConfiguration('jscpd').get('files');
    const minLines = vscode.workspace.getConfiguration('jscpd').get('minLines');
    const minTokens = vscode.workspace
      .getConfiguration('jscpd')
      .get('minTokens');
    const skipComments = vscode.workspace
      .getConfiguration('jscpd')
      .get('skipComments');
    const languagesExts = vscode.workspace
      .getConfiguration('jscpd')
      .get('languagesExts');
    const languages =
      vscode.workspace.getConfiguration('jscpd').get('languages') || '';

    let config = {
      reporter: 'json',
      path: currentPath,
      exclude,
      'min-lines': minLines,
      'min-tokens': minTokens
    };

    if (files) config['files'] = files;
    if (skipComments) config['skip-comments'] = skipComments;
    if (languages) config['languages'] = languages;
    if (languagesExts) config['languages-ext'] = languagesExts;

    const output = jscpd_inst.run(config);

    if (output.report.statistics.clones === 0) {
      vscode.window.showInformationMessage(
        `0 duplicated lines out of ${
          output.report.statistics.lines
        } total lines of code.`
      );
      return;
    }
    const formatName = format(currentPath);

    let quickPickList = output.map.clones.map(data => ({
      label:
        formatName(data.firstFile, data.firstFileStart, data.linesCount) +
        ' <-> ' +
        formatName(data.secondFile, data.secondFileStart, data.linesCount),
      data
    }));

    const { percentage, duplications, lines } = output.report.statistics;

    quickPickList.unshift({
      label: '',
      description: `${percentage}% (${duplications} lines) duplicated lines out of ${lines} total lines of code`,
      data: 'REPORT'
    });

    vscode.window.showQuickPick(quickPickList).then(({ data }) => {
      if (data === 'REPORT') {
        provider.setPathFormatter(formatName);
        provider.setData(output.map.clones);
        var previewUri = vscode.Uri.parse(
          jscpdSchema +
            '://authority/jscpd?x=' +
            new Date().getTime().toString()
        );
        vscode.commands
          .executeCommand(
            'vscode.previewHtml',
            previewUri,
            vscode.ViewColumn.One,
            'JSCPD'
          )
          .then(
            () => {},
            error => {
              vscode.window.showErrorMessage(error);
            }
          );
      } else {
        vscode.commands.executeCommand('jscpd.showLines', data);
      }
    });
  });

  context.subscriptions.push(disposable, disposableShowLines, registration);
}

const format = currentPath => (file, start, count) => {
  const stripProject = path => path.replace(currentPath + '\\', '');

  return stripProject(file, currentPath) + ':' + start + '-' + (start + count);
};
function deactivate() {}
exports.activate = activate;
exports.deactivate = deactivate;


text:
<?php

namespace common\models;

use frontend\modules\store\models\StoreProductSize;
use Yii;

/**
 * This is the model class for table "{{%store_order_product}}".
 *
 * @property integer $id
 * @property integer $order_id
 * @property integer $product_id
 * @property integer $size_id
 * @property integer $cert_id
 * @property integer $qnt
 * @property string $sku
 *
 * @property StoreOrder $order
 * @property StoreProduct $product
 * @property StoreProductSize $size
 */
class StoreOrderProduct extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%store_order_product}}';
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getOrder()
    {
        return $this->hasOne(StoreOrder::className(), ['id' => 'order_id']);
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getProduct()
    {
        return $this->hasOne(StoreProduct::className(), ['id' => 'product_id']);
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getSize()
    {
        return $this->hasOne(StoreProductSize::className(), ['id' => 'size_id']);
    }
}


text:
package pl.pdfviewer.listener;

public interface AngleChangeListener {
	public void angleChange(Integer page);
}