text:
package com.siyeh.ig.inheritance;

import com.intellij.codeInspection.ProblemDescriptor;
import com.intellij.codeInspection.ui.MultipleCheckboxOptionsPanel;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Comparing;
import com.intellij.psi.*;
import com.intellij.psi.javadoc.PsiDocComment;
import com.intellij.psi.util.TypeConversionUtil;
import com.intellij.util.IncorrectOperationException;
import com.siyeh.InspectionGadgetsBundle;
import com.siyeh.ig.BaseInspection;
import com.siyeh.ig.BaseInspectionVisitor;
import com.siyeh.ig.InspectionGadgetsFix;
import org.jetbrains.annotations.NotNull;

import javax.swing.*;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

public class AbstractMethodOverridesAbstractMethodInspection extends BaseInspection {

  @SuppressWarnings("PublicField")
  public boolean ignoreJavaDoc = false;

  @SuppressWarnings("PublicField")
  public boolean ignoreAnnotations = false;

  @Override
  @NotNull
  public String getDisplayName() {
    return InspectionGadgetsBundle.message("abstract.method.overrides.abstract.method.display.name");
  }

  @Override
  protected InspectionGadgetsFix buildFix(Object... infos) {
    return new AbstractMethodOverridesAbstractMethodFix();
  }

  @Override
  @NotNull
  protected String buildErrorString(Object... infos) {
    return InspectionGadgetsBundle.message("abstract.method.overrides.abstract.method.problem.descriptor");
  }

  @Override
  public JComponent createOptionsPanel() {
    final MultipleCheckboxOptionsPanel panel = new MultipleCheckboxOptionsPanel(this);
    panel.addCheckbox(InspectionGadgetsBundle.message(
      "abstract.method.overrides.abstract.method.ignore.different.javadoc.option"), "ignoreJavaDoc");
    panel.addCheckbox(InspectionGadgetsBundle.message(
      "abstract.method.overrides.abstract.method.ignore.different.annotations.option"), "ignoreAnnotations");
    return panel;
  }

  private static class AbstractMethodOverridesAbstractMethodFix extends InspectionGadgetsFix {

    @Override
    @NotNull
    public String getName() {
      return InspectionGadgetsBundle.message("abstract.method.overrides.abstract.method.remove.quickfix");
    }

    @NotNull
    @Override
    public String getFamilyName() {
      return getName();
    }

    @Override
    public void doFix(Project project, ProblemDescriptor descriptor) throws IncorrectOperationException {
      final PsiElement methodNameIdentifier = descriptor.getPsiElement();
      final PsiElement method = methodNameIdentifier.getParent();
      assert method != null;
      deleteElement(method);
    }
  }

  @Override
  public BaseInspectionVisitor buildVisitor() {
    return new AbstractMethodOverridesAbstractMethodVisitor();
  }

  private class AbstractMethodOverridesAbstractMethodVisitor extends BaseInspectionVisitor {

    @Override
    public void visitMethod(@NotNull PsiMethod method) {
      //no call to super, so we don't drill into anonymous classes
      if (method.isConstructor()) {
        return;
      }
      if (!isAbstract(method)) {
        return;
      }
      final PsiClass containingClass = method.getContainingClass();
      if (containingClass == null) {
        return;
      }
      if (!method.hasModifierProperty(PsiModifier.ABSTRACT) && !containingClass.isInterface()) {
        return;
      }
      boolean overrideDefault = false;
      boolean accept = false;
      final PsiMethod[] superMethods = method.findSuperMethods();
      for (final PsiMethod superMethod : superMethods) {
        overrideDefault |= superMethod.hasModifierProperty(PsiModifier.DEFAULT);
        if (!isAbstract(superMethod)) {
          continue;
        }
        if (overrideDefault) {
          return;
        }
        accept |= methodsHaveSameReturnTypes(method, superMethod) && haveSameExceptionSignatures(method, superMethod);

        if (ignoreJavaDoc && !haveSameJavaDoc(method, superMethod)) {
          return;
        }
        if (ignoreAnnotations && !methodsHaveSameAnnotations(method, superMethod)) {
          return;
        }
      }
      if (accept && !overrideDefault) {
        registerMethodError(method);
      }
    }

    private boolean methodsHaveSameAnnotations(PsiMethod method, PsiMethod superMethod) {
      if (!haveSameAnnotations(method, superMethod)) {
        return false;
      }
      final PsiParameterList superParameterList = superMethod.getParameterList();
      final PsiParameter[] superParameters = superParameterList.getParameters();
      final PsiParameterList parameterList = method.getParameterList();
      final PsiParameter[] parameters = parameterList.getParameters();
      if (parameters.length != superParameters.length) {
        return false;
      }
      for (int i = 0, length = superParameters.length; i < length; i++) {
        final PsiParameter superParameter = superParameters[i];
        final PsiParameter parameter = parameters[i];
        if (!haveSameAnnotations(parameter, superParameter)) {
          return false;
        }
      }
      return true;
    }

    private boolean haveSameAnnotations(PsiModifierListOwner owner1, PsiModifierListOwner owner2) {
      final PsiModifierList modifierList = owner1.getModifierList();
      final PsiModifierList superModifierList = owner2.getModifierList();
      if (superModifierList == null) {
        return modifierList == null;
      } else if (modifierList == null) {
        return false;
      }
      final PsiAnnotation[] superAnnotations = superModifierList.getAnnotations();
      final PsiAnnotation[] annotations = modifierList.getAnnotations();
      final Set<PsiAnnotation> annotationsSet = new HashSet<PsiAnnotation>(Arrays.asList(superAnnotations));
      for (PsiAnnotation annotation : annotations) {
        final String qualifiedName = annotation.getQualifiedName();
        if (CommonClassNames.JAVA_LANG_OVERRIDE.equals(qualifiedName)) {
          continue;
        }
        if (!annotationsSet.contains(annotation)) {
          return false;
        }
      }
      return true;
    }

    private boolean haveSameJavaDoc(PsiMethod method, PsiMethod superMethod) {
      final PsiDocComment superDocComment = superMethod.getDocComment();
      final PsiDocComment docComment = method.getDocComment();
      if (superDocComment == null) {
        if (docComment != null) {
          return false;
        }
      } else if (docComment != null) {
        if (!superDocComment.getText().equals(docComment.getText())) {
          return false;
        }
      }
      return true;
    }

    private boolean haveSameExceptionSignatures(PsiMethod method1, PsiMethod method2) {
      final PsiReferenceList list1 = method1.getThrowsList();
      final PsiClassType[] exceptions1 = list1.getReferencedTypes();
      final PsiReferenceList list2 = method2.getThrowsList();
      final PsiClassType[] exceptions2 = list2.getReferencedTypes();
      if (exceptions1.length != exceptions2.length) {
        return false;
      }
      final Set<PsiClassType> set1 = new HashSet<PsiClassType>(Arrays.asList(exceptions1));
      for (PsiClassType anException : exceptions2) {
        if (!set1.contains(anException)) {
          return false;
        }
      }
      return true;
    }

    private boolean methodsHaveSameReturnTypes(PsiMethod method1, PsiMethod method2) {
      final PsiType type1 = method1.getReturnType();
      if (type1 == null) {
        return false;
      }
      final PsiClass superClass = method2.getContainingClass();
      final PsiClass aClass = method1.getContainingClass();
      if (aClass == null || superClass == null) return false;
      final PsiSubstitutor substitutor = TypeConversionUtil.getSuperClassSubstitutor(superClass, aClass, PsiSubstitutor.EMPTY);
      final PsiType type2 = method2.getReturnType();
      return Comparing.equal(type1, substitutor.substitute(type2));
    }

    private boolean isAbstract(PsiMethod method) {
      if (method.hasModifierProperty(PsiModifier.ABSTRACT)) {
        return true;
      }
      final PsiClass containingClass = method.getContainingClass();
      return containingClass != null && containingClass.isInterface() && !method.hasModifierProperty(PsiModifier.DEFAULT);
    }
  }
}


text:
namespace AgileObjects.AgileMapper.UnitTests
{
    using System.Collections.Generic;
    using AgileMapper.Extensions;
    using AgileMapper.Extensions.Internal;
    using Common;
    using TestClasses;
#if !NET35
    using Xunit;
#else
    using Fact = NUnit.Framework.TestAttribute;

    [NUnit.Framework.TestFixture]
#endif
    public class WhenMappingToNewComplexTypeMembers
    {
        [Fact]
        public void ShouldMapAMemberProperty()
        {
            var source = new Person
            {
                Address = new Address
                {
                    Line1 = "Over here!"
                }
            };

            var result = Mapper.Map(source).ToANew<Person>();

            result.Address.ShouldNotBeNull();
            result.Address.ShouldNotBe(source.Address);
            result.Address.Line1.ShouldBe("Over here!");
        }

        [Fact]
        public void ShouldHandleANullSourceMember()
        {
            var source = new Person { Name = "Freddie" };
            var result = Mapper.Map(source).ToANew<Person>();

            result.Name.ShouldBe(source.Name);
            result.Address.ShouldBeNull();
        }

        [Fact]
        public void ShouldHandleANullSourceGetMethodResult()
        {
            var source = new PublicGetMethod<Address>(default);
            var result = Mapper.Map(source).ToANew<PublicField<Address>>();

            result.ShouldNotBeNull().Value.ShouldBeNull();
        }

        [Fact]
        public void ShouldHandleNoMatchingSourceMember()
        {
            var source = new { Hello = "There" };

            var result = Mapper.Map(source).ToANew<Customer>();

            result.Address.ShouldBeNull();
        }

        [Fact]
        public void ShouldUnflattenToNestedProperties()
        {
            var source = new WeddingDto
            {
                BrideName = "Nathalie",
                BrideAddressLine1 = "Somewhere",
                GroomName = "Andy"
            };

            var result = Mapper.Map(source).ToANew<Wedding>();

            result.Bride.ShouldNotBeNull();
            result.Bride.Name.ShouldBe("Nathalie");
            result.Bride.Address.Line1.ShouldBe("Somewhere");
            result.Groom.Name.ShouldBe("Andy");
            result.Groom.Address.Line1.ShouldBeNull();
        }

        [Fact]
        public void ShouldHandleNoMatchingSourceForNestedCtorParameter()
        {
            var source = new { Value = new { Hello = "There" } };
            var result = Mapper.Map(source).ToANew<PublicSetMethod<PublicCtor<string>>>();

            result.ShouldNotBeNull();
            result.Value.ShouldBeNull();
        }

        [Fact]
        public void ShouldHandleRuntimeTypedNestedMemberMatches()
        {
            var runtimeTypedSource = new
            {
                Na = (object)new { Me = "Harry!" },
                Address = (object)new Address { Line1 = "Line Onnneee" }
            };

            var runtimeTypedResult = Mapper.Map(runtimeTypedSource).ToANew<PersonViewModel>();

            runtimeTypedResult.Name.ShouldBe("Harry!");
            runtimeTypedResult.AddressLine1.ShouldBe("Line Onnneee");

            var halfRuntimeTypedSource = new { Na = (object)new { Me = "Boris!" }, Address = (object)123 };

            var halfRuntimeTypedResult = Mapper.Map(halfRuntimeTypedSource).ToANew<PersonViewModel>();

            halfRuntimeTypedResult.Name.ShouldBe("Boris!");
            halfRuntimeTypedResult.AddressLine1.ShouldBeNull();

            var nonRuntimeTypedSource = new { Na = (object)123, Address = (object)456 };

            var nonRuntimeTypedResult = Mapper.Map(nonRuntimeTypedSource).ToANew<PersonViewModel>();

            nonRuntimeTypedResult.Name.ShouldBeNull();
            nonRuntimeTypedResult.AddressLine1.ShouldBeNull();
        }

        [Fact]
        public void ShouldMapAnUntypedMemberField()
        {
            var source = new PublicField<Address>
            {
                Value = new Address
                {
                    Line1 = "Over there!"
                }
            };

            var result = Mapper.Map(source).ToANew<PublicField<object>>();

            result.Value.ShouldNotBeNull();
            result.Value.ShouldBeOfType<Address>();
            ((Address)result.Value).Line1.ShouldBe("Over there!");
        }

        // See https://github.com/agileobjects/AgileMapper/issues/13
        [Fact]
        public void ShouldNotMapAnUntypedMemberFieldWithNoMatchingSourceMember()
        {
            var source = new Address
            {
                Line1 = "Some place"
            };

            var result = Mapper.Map(source).ToANew<PublicField<object>>();

            result.Value.ShouldBeNull();
        }

        // See https://github.com/agileobjects/AgileMapper/issues/22
        [Fact]
        public void ShouldUseBestMatchingSourceMemberWhenCloning()
        {
            var source = new Country
            {
                CurrencyId = 1
            };

            var result = Mapper.DeepClone(source);

            result.Currency.ShouldBeNull();
            result.CurrencyId.ShouldBe(1);
        }

        [Fact]
        public void ShouldUseBestMatchingSourceMemberWhenNotCloning()
        {
            var source = new
            {
                Currency = new { Id = 123 },
                CurrencyId = 456
            };

            var result = Mapper.Map(source).ToANew<Country>();

            result.Currency.ShouldNotBeNull();
            result.Currency.Id.ShouldBe(123);
            result.CurrencyId.ShouldBe(456);
        }

        [Fact]
        public void ShouldMapASourcePropertyToMultipleTargets()
        {
            var source = new { CurrencyId = 1 };

            var result = Mapper.Map(source).ToANew<Country>();

            result.Currency.ShouldNotBeNull();
            result.Currency.Id.ShouldBe(1);
            result.CurrencyId.ShouldBe(1);
        }

        [Fact]
        public void ShouldMapANonGenericInterfaceMember()
        {
            var source = new PublicField<IPublicInterface>();
            var result = Mapper.Map(source).ToANew<PublicField<IPublicInterface>>();

            result.ShouldNotBeNull();
        }

        // See https://github.com/agileobjects/AgileMapper/issues/146
        [Fact]
        public void ShouldMapToATargetInterfaceMembersImplementedInterfaceMembers()
        {
            var source = new Issue146.Source.Container("999") { Name = "Source" };
            var result = Mapper.Map(source).ToANew<Issue146.Target.Cont>();

            result.ShouldNotBeNull();
            result.Name.ShouldBe("Source");
            result.Data.ShouldNotBeNull();
            result.Data.Id.ShouldBe("999");
        }

        [Fact]
        public void ShouldAccessAParentContextInAStandaloneMapper()
        {
            var source = new PublicProperty<object>
            {
                Value = new PersonViewModel { Name = "Fred" }
            };
            var result = Mapper.Map(source).ToANew<PublicField<Person>>();

            result.Value.Name.ShouldBe("Fred");
        }

        [Fact]
        public void ShouldPopulateANonNullReadOnlyNestedMemberProperty()
        {
            using (var mapper = Mapper.CreateNew())
            {
                var address = new Address();

                mapper.CreateAReadOnlyPropertyUsing(address);

                var source = new PublicField<Address> { Value = new Address { Line1 = "Readonly populated!" } };
                var result = mapper.Map(source).ToANew<PublicReadOnlyProperty<Address>>();

                result.Value.ShouldNotBeNull();
                result.Value.ShouldBeSameAs(address);
                result.Value.Line1.ShouldBe("Readonly populated!");
            }
        }

        [Fact]
        public void ShouldHandleANullReadOnlyNestedMemberProperty()
        {
            using (var mapper = Mapper.CreateNew())
            {
                mapper.CreateAReadOnlyFieldUsing(default(Address));

                var source = new PublicGetMethod<Address>(new Address { Line1 = "Not happening..." });
                var result = mapper.Map(source).ToANew<PublicReadOnlyField<Address>>();

                result.Value.ShouldBeNull();
            }
        }

        [Fact]
        public void ShouldMapToANonNullUnconstructableNestedMember()
        {
            using (var mapper = Mapper.CreateNew())
            {
                var existingValue = new PublicField<string>();

                mapper.WhenMapping
                    .ToANew<PublicField<PublicUnconstructable<PublicField<string>>>>()
                    .CreateInstancesUsing(data => new PublicField<PublicUnconstructable<PublicField<string>>>
                    {
                        Value = PublicUnconstructable<PublicField<string>>.MakeOne(existingValue)
                    });

                var source = new { Value = new { Value = new { Value = "Hello!" } } };
                var result = mapper.Map(source).ToANew<PublicField<PublicUnconstructable<PublicField<string>>>>();

                result.Value.ShouldNotBeNull();
                result.Value.Value.ShouldNotBeNull();
                result.Value.Value.ShouldBeSameAs(existingValue);
                result.Value.Value.Value.ShouldBeSameAs("Hello!");
            }
        }

        [Fact]
        public void ShouldHandleANullUnconstructableRootTarget()
        {
            var source = new { Value = new { Value = "Goodbye!" } };
            var result = Mapper.Map(source).ToANew<PublicUnconstructable<PublicField<string>>>();

            result.ShouldBeNull();
        }

        [Fact]
        public void ShouldHandleANullUnconstructableNestedMember()
        {
            var source = new { Value = new { Value = new { Value = "Goodbye!" } } };
            var result = Mapper.Map(source).ToANew<PublicField<PublicUnconstructable<PublicField<string>>>>();

            result.Value.ShouldBeNull();
        }

        [Fact]
        public void ShouldHandleAnUnconstructableRuntimeTypedChildMember()
        {
            var result = Mapper
                .Map(new { Value = (object)new { Test = "Nah" } })
                .ToANew<PublicField<PublicCtor<int>>>();

            result.ShouldNotBeNull();
            result.Value.ShouldBeNull();
        }

        [Fact]
        public void ShouldHandleRuntimeTypedComplexAndEnumerableChildMembers()
        {
            using (var mapper = Mapper.CreateNew())
            {
                var intArraySource = new PublicTwoFields<object, object>
                {
                    Value1 = new Product { ProductId = "kijerf" },
                    Value2 = new[] { 1, 2, 3 }
                };

                var intArrayResult = mapper
                    .Map(intArraySource)
                    .ToANew<PublicTwoFields<ProductDto, List<int?>>>();

                intArrayResult.ShouldNotBeNull();

                intArrayResult.Value1.ShouldNotBeNull();
                intArrayResult.Value1.ProductId.ShouldBe("kijerf");

                intArrayResult.Value2.ShouldBe(1, 2, 3);

                var stringArraySource = new PublicTwoFields<object, object>
                {
                    Value1 = new Product { ProductId = "kdjhdgs" },
                    Value2 = new[] { "3", "2", "1" }
                };

                var stringArrayResult = mapper
                    .Map(stringArraySource)
                    .ToANew<PublicTwoFields<ProductDto, List<int?>>>();

                stringArrayResult.ShouldNotBeNull();

                stringArrayResult.Value1.ShouldNotBeNull();
                stringArrayResult.Value1.ProductId.ShouldBe("kdjhdgs");

                stringArrayResult.Value2.ShouldBe(3, 2, 1);
            }
        }

        [Fact]
        public void ShouldHandleRuntimeTypedComplexAndEnumerableElementMembers()
        {
            var source = new PublicTwoFields<object, IList<object>>
            {
                Value1 = new Product { ProductId = "kjdfskjnds" },
                Value2 = new List<object>
                {
                    new PublicProperty<string> { Value = "ikjhfeslkjdw" },
                    new PublicField<string> { Value = "ldkjkdhusdiuoji" }
                }
            };

            var result = source.DeepClone();

            result.Value1.ShouldBeOfType<Product>();
            ((Product)result.Value1).ProductId.ShouldBe("kjdfskjnds");

            result.Value2.Count.ShouldBe(2);
            result.Value2.First().ShouldBeOfType<PublicProperty<string>>();
            ((PublicProperty<string>)result.Value2.First()).Value.ShouldBe("ikjhfeslkjdw");

            result.Value2.Second().ShouldBeOfType<PublicField<string>>();
            ((PublicField<string>)result.Value2.Second()).Value.ShouldBe("ldkjkdhusdiuoji");
        }

        #region Helper Classes

        private class Country
        {
            // ReSharper disable once UnusedAutoPropertyAccessor.Local
            public Currency Currency { get; set; }

            public int CurrencyId { get; set; }
        }

        // ReSharper disable once ClassNeverInstantiated.Local
        private class Currency
        {
            // ReSharper disable once UnusedAutoPropertyAccessor.Local
            public int Id { get; set; }
        }

        internal static class Issue146
        {
            public static class Source
            {
                public class Data
                {
                    public string Id { get; set; }
                }

                public class Container
                {
                    public Container(string dataId)
                    {
                        Data = new Data { Id = dataId };
                    }

                    public string Name { get; set; }

                    public Data Data { get; }
                }
            }

            public static class Target
            {
                public interface IData
                {
                    string Id { get; set; }
                }

                public interface IEmpty : IData { }

                public class Empty : IEmpty
                {
                    public string Id { get; set; }
                }

                public class Cont
                {
                    public Cont()
                    {
                        Data = new Empty();
                    }

                    public IEmpty Data { get; set; }

                    public string Name { get; set; }
                }
            }
        }

        #endregion
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PhysicsTestMotionResult2D" inherits="RefCounted" version="4.0">
	<brief_description>
		Result from a 2D body motion test.
	</brief_description>
	<description>
		This class contains the motion and collision result from [method PhysicsServer2D.body_test_motion].
	</description>
	<tutorials>
	</tutorials>
	<methods>
		<method name="get_collider" qualifiers="const">
			<return type="Object" />
			<description>
				Returns the colliding body's attached [Object], if a collision occured.
			</description>
		</method>
		<method name="get_collider_id" qualifiers="const">
			<return type="int" />
			<description>
				Returns the unique instance ID of the colliding body's attached [Object], if a collision occured. See [method Object.get_instance_id].
			</description>
		</method>
		<method name="get_collider_rid" qualifiers="const">
			<return type="RID" />
			<description>
				Returns the colliding body's [RID] used by the [PhysicsServer2D], if a collision occured.
			</description>
		</method>
		<method name="get_collider_shape" qualifiers="const">
			<return type="int" />
			<description>
				Returns the colliding body's shape index, if a collision occured. See [CollisionObject2D].
			</description>
		</method>
		<method name="get_collider_velocity" qualifiers="const">
			<return type="Vector2" />
			<description>
				Returns the colliding body's velocity, if a collision occured.
			</description>
		</method>
		<method name="get_collision_depth" qualifiers="const">
			<return type="float" />
			<description>
				Returns the length of overlap along the collision normal, if a collision occured.
			</description>
		</method>
		<method name="get_collision_local_shape" qualifiers="const">
			<return type="int" />
			<description>
				Returns the moving object's colliding shape, if a collision occured.
			</description>
		</method>
		<method name="get_collision_normal" qualifiers="const">
			<return type="Vector2" />
			<description>
				Returns the colliding body's shape's normal at the point of collision, if a collision occured.
			</description>
		</method>
		<method name="get_collision_point" qualifiers="const">
			<return type="Vector2" />
			<description>
				Returns the point of collision in global coordinates, if a collision occured.
			</description>
		</method>
		<method name="get_collision_safe_fraction" qualifiers="const">
			<return type="float" />
			<description>
				Returns the maximum fraction of the motion that can occur without a collision, between [code]0[/code] and [code]1[/code].
			</description>
		</method>
		<method name="get_collision_unsafe_fraction" qualifiers="const">
			<return type="float" />
			<description>
				Returns the minimum fraction of the motion needed to collide, if a collision occured, between [code]0[/code] and [code]1[/code].
			</description>
		</method>
		<method name="get_remainder" qualifiers="const">
			<return type="Vector2" />
			<description>
				Returns the moving object's remaining movement vector.
			</description>
		</method>
		<method name="get_travel" qualifiers="const">
			<return type="Vector2" />
			<description>
				Returns the moving object's travel before collision.
			</description>
		</method>
	</methods>
</class>


text:
<?php

include('config.inc');
include('lib/common.php');

session_start();

function valid_id() {
	if (!isset($_REQUEST['id'])) {
		return false;
	}

	$id = $_REQUEST['id'];

	$wilson = $_SESSION['user']['operate_wilson_gate'];
	$brigman = $_SESSION['user']['operate_brigman_gate'];

	if ($id == 0 && $wilson) {
		return true;
	} else if ($id == 1 && $brigman) {
		return true;
	} else {
		return false;
	}
}

if (!isset($_SESSION['user']) || !valid_id() || (!isset($_REQUEST['release']) && !isset($_REQUEST['hold']) && !isset($_REQUEST['open']) && !isset($_REQUEST['close']))) {
        exit();
}

$mysqli = new mysqli($sql_host, $sql_user, $sql_pass, $sql_db);

if (isset($_REQUEST['id']) && $_REQUEST['id'] == 0 && isset($_REQUEST['release'])) {
	$query = "SELECT display_name, access_level FROM event_log LEFT JOIN users ON event_log.user_id = users.user_id WHERE event_type=2 ORDER BY event_time DESC LIMIT 1";
	$result = $mysqli->query($query) or die('unable to execute query - '.$query);
	if ($result) {
		$row = $result->fetch_assoc();
		if ($row['access_level'] < $_SESSION['user']['access_level']) {
			echo 'No permission to release gate when '.$row['display_name'].' holds it!';
			exit();
		}
	}
}

define('SOCKET_COMMUNICATION', false);

if (SOCKET_COMMUNICATION) {
	// Create a new socket
	$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);

	$arduino_ip = '10.0.1.25';
	$arduino_port = 8888;

	if (isset($_REQUEST['release'])) {
		if ($_REQUEST['id'] == 0) {
			$event_type = EVENT_TYPE_RELEASE_WILSON_GATE;
		} else {
			$event_type = EVENT_TYPE_RELEASE_BRIGMAN_GATE;
		}
		$request = 'unhold:'.$_REQUEST['id'];
	} else if (isset($_REQUEST['hold'])) {
		if ($_REQUEST['id'] == 0) {
			$event_type = EVENT_TYPE_HOLD_WILSON_GATE;
		} else {
			$event_type = EVENT_TYPE_HOLD_BRIGMAN_GATE;
		}
		$request = 'hold:'.$_REQUEST['id'];
	} else if (isset($_REQUEST['open'])) {
		if ($_REQUEST['id'] == 0) {
			$event_type = EVENT_TYPE_OPEN_WILSON_GATE;
		} else {
			$event_type = EVENT_TYPE_OPEN_BRIGMAN_GATE;
		}
		$request = 'open:'.$_REQUEST['id'];
	}

	socket_sendto($sock, $request, strlen($request), 0, $arduino_ip, $arduino_port);
	socket_recvfrom($sock, $buf, 4096, 0, $ardiuno_ip, $arduino_port);

	// Close
	socket_close($sock);
} else {
	if (isset($_REQUEST['release'])) {
		if ($_REQUEST['id'] == 0) {
			$event_type = EVENT_TYPE_RELEASE_WILSON_GATE;
		} else {
			$event_type = EVENT_TYPE_RELEASE_BRIGMAN_GATE;
		}
		$request = 'http://10.0.1.25/gate/'.$_REQUEST['id'].'/release';
	} else if (isset($_REQUEST['hold'])) {
		if ($_REQUEST['id'] == 0) {
			$event_type = EVENT_TYPE_HOLD_WILSON_GATE;
		} else {
			$event_type = EVENT_TYPE_HOLD_BRIGMAN_GATE;
		}
		$request = 'http://10.0.1.25/gate/'.$_REQUEST['id'].'/hold';
	} else if (isset($_REQUEST['open'])) {
		if ($_REQUEST['id'] == 0) {
			$event_type = EVENT_TYPE_OPEN_WILSON_GATE;
		} else {
			$event_type = EVENT_TYPE_OPEN_BRIGMAN_GATE;
		}
		$request = 'http://10.0.1.25/gate/'.$_REQUEST['id'].'/open';
	}

        $curl = curl_init();

        curl_setopt($curl, CURLOPT_URL, $request);
	curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PUT");
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

        $buf = curl_exec($curl);
}

$result = $mysqli->query("INSERT into event_log set user_id = '".$_SESSION['user']['user_id']."', event_type = '".$event_type."'");

// parse the response
$gates = json_decode($buf, true);
echo $gates['status'];

?>


text:
#include <pcl/apps/modeler/parameter.h>

#include <cassert>
#include <fstream>
#include <iomanip>

#include <QAbstractItemModel>
#include <QCheckBox>
#include <QColorDialog>
#include <QSpinBox>

//////////////////////////////////////////////////////////////////////////////////////////////
void
pcl::modeler::Parameter::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index)
{
  getEditorData(editor);
  std::pair<QVariant, int> model_data = toModelData();
  model->setData(index, model_data.first, model_data.second);
}

//////////////////////////////////////////////////////////////////////////////////////////////
std::string
pcl::modeler::IntParameter::valueTip()
{
  return QString("value range: [%1, %3]").arg(low_).arg(high_).toStdString();
}

//////////////////////////////////////////////////////////////////////////////////////////////
QWidget *
pcl::modeler::IntParameter::createEditor(QWidget *parent)
{
  QSpinBox *editor = new QSpinBox(parent);
  editor->setMinimum(low_);
  editor->setMaximum(high_);
  editor->setSingleStep(step_);

  return editor;
}

//////////////////////////////////////////////////////////////////////////////////////////////
void
pcl::modeler::IntParameter::setEditorData(QWidget *editor)
{
  QSpinBox *spinBox = static_cast<QSpinBox*>(editor);
  spinBox->setAlignment(Qt::AlignHCenter);

  int value = int (*this);
  spinBox->setValue(value);
}

//////////////////////////////////////////////////////////////////////////////////////////////
void
pcl::modeler::IntParameter::getEditorData(QWidget *editor)
{
  QSpinBox *spinBox = static_cast<QSpinBox*>(editor);
  int value = spinBox->text().toInt();
  current_value_ = value;
}

//////////////////////////////////////////////////////////////////////////////////////////////
std::pair<QVariant, int>
pcl::modeler::IntParameter::toModelData()
{
  std::pair<QVariant, int> model_data;
  model_data.first = int (*this);
  model_data.second = Qt::EditRole;
  return (model_data);
}

//////////////////////////////////////////////////////////////////////////////////////////////
std::string
pcl::modeler::BoolParameter::valueTip()
{
  return QString("bool value").toStdString();
}

//////////////////////////////////////////////////////////////////////////////////////////////
QWidget *
pcl::modeler::BoolParameter::createEditor(QWidget *parent)
{
  QCheckBox *editor = new QCheckBox(parent);

  return editor;
}

//////////////////////////////////////////////////////////////////////////////////////////////
void
pcl::modeler::BoolParameter::setEditorData(QWidget *editor)
{
  QCheckBox *checkBox = static_cast<QCheckBox*>(editor);

  bool value = bool (*this);
  checkBox->setCheckState(value?(Qt::Checked):(Qt::Unchecked));
}

//////////////////////////////////////////////////////////////////////////////////////////////
void
  pcl::modeler::BoolParameter::getEditorData(QWidget *editor)
{
  QCheckBox *checkBox = static_cast<QCheckBox*>(editor);
  bool value = (checkBox->checkState() == Qt::Checked);
  current_value_ = value;
}

//////////////////////////////////////////////////////////////////////////////////////////////
std::pair<QVariant, int>
pcl::modeler::BoolParameter::toModelData()
{
  std::pair<QVariant, int> model_data;
  model_data.first = bool (*this);
  model_data.second = Qt::EditRole;
  return (model_data);
}

//////////////////////////////////////////////////////////////////////////////////////////////
std::string
pcl::modeler::DoubleParameter::valueTip()
{
  return QString("value range: [%1, %3]").arg(low_).arg(high_).toStdString();
}

//////////////////////////////////////////////////////////////////////////////////////////////
QWidget *
pcl::modeler::DoubleParameter::createEditor(QWidget *parent)
{
  QDoubleSpinBox *editor = new QDoubleSpinBox(parent);
  editor->setMinimum(low_);
  editor->setMaximum(high_);
  editor->setSingleStep(step_);
  editor->setDecimals(6);

  return editor;
}

//////////////////////////////////////////////////////////////////////////////////////////////
void
pcl::modeler::DoubleParameter::setEditorData(QWidget *editor)
{
  QDoubleSpinBox *spinBox = static_cast<QDoubleSpinBox*>(editor);
  spinBox->setAlignment(Qt::AlignHCenter);

  double value = double (*this);
  spinBox->setValue(value);
}

//////////////////////////////////////////////////////////////////////////////////////////////
void
pcl::modeler::DoubleParameter::getEditorData(QWidget *editor)
{
  QDoubleSpinBox *spinBox = static_cast<QDoubleSpinBox*>(editor);
  double value = spinBox->text().toDouble();
  current_value_ = value;
}

//////////////////////////////////////////////////////////////////////////////////////////////
std::pair<QVariant, int>
pcl::modeler::DoubleParameter::toModelData()
{
  std::pair<QVariant, int> model_data;
  model_data.first = double (*this);
  model_data.second = Qt::EditRole;
  return (model_data);
}

//////////////////////////////////////////////////////////////////////////////////////////////
std::string
pcl::modeler::ColorParameter::valueTip()
{
  return ("Color");
}

//////////////////////////////////////////////////////////////////////////////////////////////
QWidget *
pcl::modeler::ColorParameter::createEditor(QWidget *parent)
{
  QColorDialog *editor = new QColorDialog(parent);

  return editor;
}

//////////////////////////////////////////////////////////////////////////////////////////////
void
pcl::modeler::ColorParameter::setEditorData(QWidget *editor)
{
  QColorDialog *color_dialog = static_cast<QColorDialog*>(editor);

  QColor value = QColor (*this);
  color_dialog->setCurrentColor(value);

  return;
}

//////////////////////////////////////////////////////////////////////////////////////////////
void
pcl::modeler::ColorParameter::getEditorData(QWidget *editor)
{
  QColorDialog *color_dialog = static_cast<QColorDialog*>(editor);

  QColor value = color_dialog->currentColor();
  current_value_ = value;
}

//////////////////////////////////////////////////////////////////////////////////////////////
std::pair<QVariant, int>
pcl::modeler::ColorParameter::toModelData()
{
  std::pair<QVariant, int> model_data;
  model_data.first = QBrush(QColor(*this));
  model_data.second = Qt::BackgroundRole;
  return (model_data);
}


text:
<?php

namespace app\assets;

use yii\web\AssetBundle;

/**
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @since 2.0
 */
/*class AppAsset extends AssetBundle
{
    public $basePath = '@webroot';
    public $baseUrl = '@web';
    public $css = [
        'css/site.css',
    ];
    public $js = [
    ];
    public $depends = [
        'yii\web\YiiAsset',
        'yii\bootstrap\BootstrapAsset',
    ];
}*/

class AppAsset extends AssetBundle
{
    public $sourcePath = '@bower/';
    public $css = ['admin-lte/dist/css/AdminLTE.css'];
    public $js = ['admin-lte/dist/js/AdminLTE/app.js'];
    public $depends = [
        'yii\web\YiiAsset',
        'yii\bootstrap\BootstrapAsset',
        'yii\bootstrap\BootstrapPluginAsset',
    ];
}


text:
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE RankNTypes #-}

module ILP ( Variable(..)
           , Symbol
           , Clause(..)
           , Body(..)
           , Database
           , Env
           , createDatabase
           , addToDatabase
           , solve
           , solveAll
           ) where

import ClassyPrelude hiding (union, pack)
import qualified Data.Map as Map
import qualified Data.Set as Set
import Data.Foldable hiding (sequence_, forM_)

-- for equivalence relations
import UnionFind
import Control.Monad.Trans.State.Lazy

import Control.Monad.Logic hiding (sequence_, forM_, mapM, forM) -- provides nondeterministic execution

data Variable = Var String -- A placeholder value
              | Atom String -- A "literal"
              deriving (Show, Eq, Ord)

type Symbol = String
data Clause = Clause Symbol [Variable] Body deriving (Show, Eq, Ord)
-- | The main AST of an ILP program
data Body = And Body Body
          | Or Body Body
          | Check Symbol [Variable]
          | Unify Variable Variable
          | LTrue
          | LFalse
          | Not Body -- negation
          | Extend Clause Body -- ILP extend with clause
          | Local Variable Body -- Used to intorduce a local variable
          deriving (Show, Eq, Ord)

-- | The Database holds all the avaliable facts and rules.
type Database = Map Symbol [Clause]
-- | The Env maps local variable names to their actual representation
type Env = Map Variable Variable

-- | A backtracking equivalence monad
-- Allows for backtracking and equivalence relations
type BacktrackEquiv = UnionFind Variable Logic

-- | Add a Clause to a Database
-- New Clauses are considered before old ones
addToDatabase :: Clause -> Database -> Database
addToDatabase clause@(Clause sym _ _) = insertWith (++) sym [clause]

-- | Create Database from a list of Clauses
createDatabase :: [Clause] -> Database
createDatabase = foldl (flip addToDatabase) Map.empty

-- | Lookup a symbol in the relation database
-- will return a list of matching clauses
lookupSymbol :: Database -> Symbol -> BacktrackEquiv [Clause]
lookupSymbol d x = case lookup x d of
                     Just a  -> return a
                     Nothing -> traceM (x ++ " does not exist in database") >> mzero

-- | Lookup a Variable in the environment
lookup' :: Variable -> Env -> BacktrackEquiv Variable
lookup' (Var t) env = case lookup (Var t) env of
                        Just a -> return a
                        Nothing -> mzero
lookup' (Atom t) _ = return $ Atom t

-- | Lookup a Variable in the environment, returns variable on failure
lookupMaybe :: Variable -> Env -> BacktrackEquiv Variable
lookupMaybe (Var t) env = return $ fromMaybe (Var t) (lookup (Var t) env)
lookupMaybe (Atom t) env = return $ Atom t

-- | Unify two values, must be lifted into the outermost monad
unify :: Env -> Variable -> Variable -> BacktrackEquiv ()
unify env a b = do
  -- we must look up the variables in the local environment first
  descA <- lookup' a env >>= repr
  descB <- lookup' b env >>= repr
  case (descA, descB) of
    (Atom a1, Atom a2) | a1 /= a2 -> mzero -- fail, can't union two Atoms variables
    (Atom _, Atom _) -> return () -- we have the same class, all ok
    (Atom a, Var v)  -> equate (Var v)  (Atom a) -- second arguement is the representative
    (Var v, Atom a)  -> equate (Var v)  (Atom a)
    (Var v1, Var v2) -> equate (Var v1) (Var v2)

-- | Unify with Env associated with each Variable
unify' :: Env -> Env -> Variable -> Variable -> BacktrackEquiv ()
unify' env1 env2 a b = do
  descA <- lookup' a env1 >>= repr
  descB <- lookup' b env2 >>= repr
  case (descA, descB) of
    (Atom a1, Atom a2) | a1 /= a2 -> mzero -- fail, can't union two Atoms variables
    (Atom _, Atom _) -> return () -- we have the same class
    (Atom a, Var v)  -> equate (Var v) (Atom a) -- second arguement is the representative
    (Var v, Atom a)  -> equate (Var v) (Atom a)
    (Var v1, Var v2) -> equate (Var v1) (Var v2)

-- | Interprets an ILP program with a given database
-- The database is passed through because it is modified in implication
interpret :: Env      -- ^ The local environment
          -> Database -- ^ The clause database, manually passed through because it is modified
          -> Int      -- ^ An incrementing number to generate unique local names
          -> Body     -- ^ The body of the clause to interpret
          -> BacktrackEquiv ()
-- interpret env _ _ b | traceShow (b, env) False = undefined -- used for debugging
-- interpret a Check statement
interpret env database i (Check sym args) = do
  -- look up all rules and facts that might apply here
  clauses <- lookupSymbol database sym
  -- lookup values of arguments
  args' <- mapM ((flip lookup') env) args
  foldr1 interleave $ -- use disjunction here to try each clause independently
    (flip map) clauses -- TODO: 'flip map' should really be 'for', but it doesn't work
      (\c@(Clause sym' vars body) -> do
        -- create new environment from the exisiting arguements
        let env' = Map.fromList $ zip vars args'
        -- unify variables with arguements
        zipWithM_ (unify' env' env) vars args
        -- check the body
        interpret env' database i body
      )

-- Conjunction. The logic monad provides a conjunction operation
interpret env database i (And b1 b2) =
  (interpret env database i b1) >>- (const $ interpret env database i b2)

-- Disjunction. Also provided by the logic monad
interpret env database i (Or b1 b2) =
  interpret env database i b1 `interleave` interpret env database i b2

-- Unify two variables, UnionFind handles this
interpret env database i (Unify var1 var2) = unify env var1 var2

-- True simply suceeds
interpret env database i LTrue = return ()

-- False. mzero causes the logic monad to trigger backtracking
interpret env database i LFalse = mzero

-- Negation. This is also provided by the logic monad
interpret env database i (Not body) = lnot $ interpret env database i body

-- Implication
-- TODO: supposedly certain body's are forbidden, however I could not find anything written that said so.
-- In any case, this remains strictly more powerful.
interpret env database i (Extend (Clause sym vars body) clause) = do
  -- we look up the representations of each variable in the UnionFind
  -- variables that are not found are left alone
  -- foo(X) :- { bar(X) } => baz(X). adds bar(a). to the database when foo(a) is called
  -- foo(X) :- { bar(Y) } => baz(X). is left as { bar(Y) } i.e. the fact bar(Y). is added to the database
  vars' <- mapM (\x -> lookupMaybe x env) vars
  interpret env (addToDatabase (Clause sym vars' body) database) i clause

-- Add a local variable
interpret env database i (Local (Var var) body) =
  -- insert a new variable into the environment
  -- we increment the counter so new variables have a unique name
  interpret (Map.insert (Var var) (Var $ var ++ show i) env) database (i+1) body

-- | check is a Variable is a Var
isVar :: Variable -> Bool
isVar (Var _) = True
isVar (Atom _ ) = False

-- | Find all variables in a statement and populate a map with them
--   This is used to set up the initial Env for a query
populateEnv :: Body -> Env
populateEnv b = Map.fromList $ map (\a->(a,a)) $ filter isVar $ pop b
  where
    pop (And a b) = pop a ++ pop b
    pop (Or a b) = pop a ++ pop b
    pop (Check _ vars) = vars
    pop (Unify a b) = [a,b]
    pop (Not b) = pop b
    pop _ = []

-- | Transform a query and a database into a monad that can be executed
makeQuery :: Body -> Database -> Logic Env
makeQuery query database = do
  let env = populateEnv query -- generate the initial environment
  -- run the state monad tranformer first, with initially empty UnionFind
  env' <- (flip execStateT) Map.empty $ interpret env database 0 query
  -- filter out the results for printing
  return $ Map.filterWithKey (\k _ -> isVar k && member k env) env'

-- | Interpret an ILP program with a given query and return the first result
-- The query is given as a Check
solve :: Body -> Database -> [(Variable, Variable)]
solve q d = Map.toList $ observe $ makeQuery q d

-- | Same as solve, but returns all results
solveAll :: Body -> Database -> [[(Variable, Variable)]]
solveAll q d = map Map.toList $ observeAll $ makeQuery q d


text:
"use strict";
import {dateToPath} from "./date-to-path.js"
import qwest from "qwest"
var debug = require('debug')("ArticleClient");
export class ArticleClient {
    asyncLoadArticle(date) {
        var filePath = dateToPath(date);
        debug(filePath);
        return qwest.get(filePath);
    }
}


text:
const devMode = require('electron-is-dev');

module.exports = class Logger {
  constructor() {
    this.loggingEnabled = true;
  }

  disableLogging() {
    this.loggingEnabled = false;
  }

  log(title, ...values) {
    this._log(console.log, title, values);
  }

  warn(title, ...values) {
    this._log(console.warn, title, values);
  }

  info(title, ...values) {
    this._log(console.info, title, values);
  }

  debug(title, ...values) {
    if (devMode) {
      this.log(title, values);
    }
  }

  _log(out, title, values) {
    if (this.loggingEnabled) {
      if (values.length > 0) {
        if (out != console.log && values.length == 1 && typeof values[0] == 'string') {
          out.call(console, title, values[0]);
        } else {
          console.groupCollapsed(title);
          values.forEach(val => {
            out.call(console, typeof val == 'object' ? val : '' + val);
          });
          console.groupEnd();
        }
      } else {
        out.call(console, title);
      }
    }
  }
};


text:
const Sequelize = require('sequelize');

const Database = require('../structures/PostgreSQL');

const Item = Database.db.define('items', {
	name: {
		type: Sequelize.STRING,
		allowNull: false,
		unique: true
	},
	price: {
		type: Sequelize.INTEGER,
		allowNull: false
	}
});

module.exports = Item;


text:
package name.marcelomorales.siqisiqi.openjpa.api;

import javax.persistence.spi.PersistenceUnitTransactionType;
import javax.sql.DataSource;

/**
 * @author Marcelo Morales
 *         Since: 8/26/13
 */
public interface EntityRepository {

    EntityRepository register(Class<?>... entity);

    EntityRepository register(String... entity);

    EntityRepository setProperty(String name, Object value);

    EntityRepository setTransactionType(PersistenceUnitTransactionType transactionType);

    void setDataSource(DataSource dataSource);

    void setNonJtaDataSource(DataSource nonJtaDataSource);
}


text:
<!DOCTYPE html>

<title>Hosting</title>
<meta charset="utf-8">
<link rel="icon" href="img/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon"/>
<meta name="description" content="Your description">
<meta name="keywords" content="Your keywords">
<meta name="author" content="Your name">
<meta name="format-detection" content="telephone=no"/>

<link rel="stylesheet" href="css/bootstrap.css">

<link rel="stylesheet" href="css/style.css">

<link rel="stylesheet" href="css/elements.css">

<link rel="stylesheet" href="css/theme-color.css" type="text/css" >

Catogery

 Services

Brand

Web Apps

Mobile Apps

 Products

Product 1

Product 2

Product 3

Product 4

Product 5

 Stockists

London

New York

Milan

Paris

Tour

Login

Register

Pricing

Support

Journal

FAQ

Terms & Conditions

Careers

Students

 Hosting

                  <form>
                    <input type="search" placeholder="Search...">
                  </form>

 Home

Home 1

Home 2

Home 3

Home Parallax

Home Top Nav

Home Simple Nav.

 Hosting

Shared Hosting

Cloud VPS

Dedicated servers

Domains

Deals

Support

Register

F.A.Q's

Sub Menu

Vestibulum iaculis

Lacinia est

Sub Menu 2

Vestibulum iaculis

Lacinia est

Proin dictum

 Pages

About Us

Services

Team

Team 1

Team 2

Team 3

Clients

Client 1

Client 2

Client 3

Client 4

Price Table

Price Flip

Price Table

Price Table 2

Price Circular

Price Drop Down

Price Order

Sidebar

Left Sidebar

Right Sidebar

Sitemap

 Elements

Elements 1

 Content Carousel

 Team Carousel

 Testimonial Carousel 1

 Testimonial Carousel 2

 Client Carousel

Elements 2

 Image Hover effects

 Tabs

 Accordion

 Progress Bars

 Circular Progress

Elements 3

 Icon wt animation

 Flat Icons

 Basic Icons

 List

 Alert Boxes

Elements 4

 Buttons

 Pagination

 Headings

 Breadcrumbs

 Columns

 Portfolio

Portfolio 2 Column

Portfolio 3 Column

Portfolio 4 Column

Portfolio 5 Column

Portfolio Full Width

Portfolio Masonry

Portfolio Single One

Portfolio Single Two

Portfolio Single Three

 Blog

Blog Fullwidth

Blog Left Sidebar

Blog Right Sidebar

Blog Single

Blog Masonry

Blog Masonry Left Sidebar

Blog Masonry Right Sidebar

Contact Us

Contact 1

Contact 2

Contact 3

Contact 4

Contact 5

Contact 6

Tabs

Home

Elements

Tabs

Top Navigation Tabs

Scale

Tab 1

Tab 2

Tab 3

Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus.

Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor.

Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem.

 Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales.

Slide

Tab 1

Tab 2

Tab 3

Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus.

Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor.

Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem.

 Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales.

Scale Up

Tab 1

Tab 2

Tab 3

Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus.

Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor.

Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem.

 Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales.

Flip

Tab 1

Tab 2

Tab 3

Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus.

Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor.

Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem.

 Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales.

Left Navigation Tabs

Scale

Tab 1

Tab 2 new

Tab 3

Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus.

Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat.

Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem.

 Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales.

Slide

Tab 1

Tab 2 new

Tab 3

Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus.

Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat.

Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem.

 Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales.

Scale Up

Tab 1

Tab 2 new

Tab 3

Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus.

Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat.

Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem.

 Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales.

Flip

Tab 1

Tab 2 new

Tab 3

Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus.

Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat.

Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem.

 Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales.

Right Navigation Tabs

Scale

Tab 1

Tab 2  new

Tab 3

Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus.

Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat.

Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem.

 Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales.

Slide

Tab 1

Tab 2  new

Tab 3

Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus.

Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat.

Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem.

 Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales.

Scale Up

Tab 1

Tab 2  new

Tab 3

Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus.

Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat.

Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem.

 Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales.

Flip

Tab 1

Tab 2  new

Tab 3

Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus.

Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat.

Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem.

 Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales.

Bottom Navigation Tabs

Scale

Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus.

Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor.

Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem.

 Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales.

 Tab 1

 Tab 2 new

 Tab 3

Slide

Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus.

Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor.

Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem.

 Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales.

 Tab 1

 Tab 2 new

 Tab 3

Scale Up

Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus.

Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor.

Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem.

 Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales.

 Tab 1

 Tab 2 new

 Tab 3

Flip

Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus.

Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor.

Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem.

 Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales.

 Tab 1

 Tab 2 new

 Tab 3

 Menu

Contact Us

        <form class="form1">

Contact form submitted!

               We will be in touch soon.

          <fieldset>

          <input type="text" value="Name:">
          *This is not a valid name. *This field is required.

          <input type="text" value="E-mail:">
          *This is not a valid email address. *This field is required.

          <textarea>Message</textarea>
          *The message is too short. *This field is required.

Sumit comment Clear

          </fieldset>
        </form>

            <form novalidate="" target="_blank" name="newsletter-subscribe-form" id="newsletter-subscribe-form" method="post" class="form-inline validate">
              <input type="email" required="" placeholder="Subscribe to our newsletter" class="form-control" name="EMAIL" value="">

              <input type="submit" id="newsletter-subscribe" name="subscribe" value="SUBSCRIBE">
            </form>

About hostify

Our core focus is to create results-driven websites for businesses.

This means that your website is used for lead generation and also to turn web visitors into buyers.

            Contact Us Purchase

Control panel

Get Support

Premium Hosting

Service Status

Service Status

Developer Center

Control panel

Recent Posts

 Aliquam hendrerit augu insuscipit ellentesqu

By Admin .  12 Mar, 2015

 Aliquam hendrerit augu insuscipit ellentesqu

By Admin .  12 Mar, 2015

 Aliquam hendrerit augu insuscipit ellentesqu

By Admin .  12 Mar, 2015

Popular Tags

 Business Corporate Work Portfolio Clean Template Wordpress Joomla Drupal Grow

Home

Shared Hosting

Cloud VPS

Dedicated servers

Blog

Contact

 © 2015 E-Hosting by  owltemplates.com


text:
        <input type="checkbox"
               name="selectOption"
               ng-checked="model.indexOf(key) >= 0"
               ng-click="toggleKeyIntoModelArray(key); setDirty()"> {{ value }}

      <input type="hidden" name="requireChecker" ng-model="model[0]" ng-required="mwRequired">


text:
define(function (require, exports, module) {
    "use strict";

    var defaultVisibilty = "public";
    var unnamedPlaceholder = "function";

    function createListEntry(name, args, vis, isStatic, line, ch) {
        var $elements = [];
        var $name = $(document.createElement("span"));
        $name.addClass("outline-entry-name");
        $name.text(name);
        $elements.push($name);
        var $arguments = $(document.createElement("span"));
        $arguments.addClass("outline-entry-arg");
        $arguments.text(args);
        $elements.push($arguments);
        var classes = "outline-entry-php outline-entry-icon outline-entry-" + vis;
        if (isStatic) {
            classes += " outline-entry-static";
        }
        return {
            name: name,
            line: line,
            ch: ch,
            classes: classes,
            $html: $elements
        };
    }

    /**
     * Create the entry list of functions language dependent.
     * @param   {Array}   text          Documents text with normalized line endings.
     * @param   {Boolean} showArguments args Preference.
     * @param   {Boolean} showUnnamed   unnamed Preference.
     * @returns {Array}   List of outline entries.
     */
    function getOutlineList(text, showArguments, showUnnamed) {
        var lines = text.split("\n");
        var regex = /(?:([\w$]+)\s*[=:]\s*)?(public|protected|private)?\s*(static)?\s*function(?:\s+(?:&\s*)?([\w]+))?\s*(\(.*\))/g;
        var result = [];
        lines.forEach(function (line, index) {
            var match = regex.exec(line);
            while (match !== null) {
                var name = (match[1] || match[4] || "").trim();
                var vis = match[2] || defaultVisibilty;
                var isStatic = match[3] === "static";
                var args = showArguments ? match[5] : "";
                match = regex.exec(line);
                if (name.length === 0) {
                    if (showUnnamed) {
                        name = unnamedPlaceholder;
                        vis = "unnamed";
                    } else {
                        continue;
                    }
                }
                result.push(createListEntry(name, args, vis, isStatic, index, line.length));
            }
        });
        return result;
    }

    function compare(a, b) {
        if (b.name === unnamedPlaceholder) {
            return 1;
        }
        if (a.name === unnamedPlaceholder) {
            return -1;
        }
        if (a.name.toLowerCase() > b.name.toLowerCase()) {
            return 1;
        }
        if (a.name.toLowerCase() < b.name.toLowerCase()) {
            return -1;
        }
        return 0;
    }

    module.exports = {
        getOutlineList: getOutlineList,
        compare: compare
    };
});


text:
using System;
using System.Configuration;

namespace Starscream.Domain
{
    public class TokenExpirationProvider : ITokenExpirationProvider
    {
        public DateTime GetExpiration(DateTime now)
        {
            var expirationDays = Convert.ToInt32((string)(ConfigurationManager.AppSettings["PasswordExpirationDays"] ?? "10"));
            return now.AddDays(expirationDays);
        }
    }
}


text:
package filter;

public interface IFilter {
    String[] filter(String[] values, String prefix);
}


text:
. $PSScriptRoot\..\GcloudCmdlets.ps1
Install-GcloudCmdlets

$project, $zone, $oldActiveConfig, $configName = Set-GCloudConfig
$r = Get-Random

Describe "Get-GceUrlMap" {
    $previousAllCount = (Get-GceUrlMap).Count
    $urlMapName1 = "url-map1-$r"
    $urlMapName2 = "url-map2-$r"

    It "should fail for wrong project" {
        { Get-GceUrlMap -Project "asdf" } | Should Throw 403
    }

    It "should fail to get non-existant proxy" {
        { Get-GceUrlMap $urlMapName1 } | Should Throw 404
    }

    gcloud compute http-health-checks create "health-check-$r" 2>$null
    gcloud compute backend-services create "backend-$r" --http-health-checks "health-check-$r" --global 2>$null
    gcloud compute url-maps create $urlMapName1 --default-service "backend-$r" 2>$null
    gcloud compute url-maps create $urlMapName2 --default-service "backend-$r" 2>$null

    It "should get all maps" {
        $maps = Get-GceUrlMap
        $maps.Count - $previousAllCount | Should Be 2
        ($maps | Get-Member).TypeName | Should Be Google.Apis.Compute.v1.Data.UrlMap
    }

    It "should get url map by name" {
        $map = Get-GceUrlMap $urlMapName1
        $map.Count | Should Be 1
        ($map | Get-Member).TypeName | Should Be Google.Apis.Compute.v1.Data.UrlMap
    }

    gcloud compute url-maps delete $urlMapName1 -q 2>$null
    gcloud compute url-maps delete $urlMapName2 -q 2>$null
    gcloud compute backend-services delete "backend-$r" --global -q 2>$null
    gcloud compute http-health-checks delete "health-check-$r" -q 2>$null
}

Reset-GCloudConfig $oldActiveConfig $configName


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Acta Soc. Fauna Flora fenn. 57(1): 50 (1927)

#### Original name
Calicium subpusillum f. subpusillum

### Remarks
null


text:
<?php

namespace Magento\Quote\Observer\Webapi;

use Magento\Sales\Model\Order\Email\Sender\OrderSender;
use Magento\Framework\Event\ObserverInterface;

class SubmitObserver implements ObserverInterface
{
    /**
     * @var \Psr\Log\LoggerInterface
     */
    protected $logger;

    /**
     * @var OrderSender
     */
    protected $orderSender;

    /**
     * @param \Psr\Log\LoggerInterface $logger
     * @param OrderSender $orderSender
     */
    public function __construct(
        \Psr\Log\LoggerInterface $logger,
        OrderSender $orderSender
    ) {
        $this->logger = $logger;
        $this->orderSender = $orderSender;
    }

    /**
     * @param \Magento\Framework\Event\Observer $observer
     *
     * @return void
     */
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        /** @var  \Magento\Quote\Model\Quote $quote */
        $quote = $observer->getEvent()->getQuote();
        /** @var  \Magento\Sales\Model\Order $order */
        $order = $observer->getEvent()->getOrder();

        /**
         * a flag to set that there will be redirect to third party after confirmation
         */
        $redirectUrl = $quote->getPayment()->getOrderPlaceRedirectUrl();
        if (!$redirectUrl && $order->getCanSendNewEmailFlag()) {
            try {
                $this->orderSender->send($order);
            } catch (\Exception $e) {
                $this->logger->critical($e);
            }
        }
    }
}


text:
package org.drools.core.event.rule.impl;

import org.kie.api.event.rule.BeforeMatchFiredEvent;
import org.kie.api.runtime.KieRuntime;
import org.kie.api.runtime.rule.Match;

public class BeforeActivationFiredEventImpl extends ActivationEventImpl implements BeforeMatchFiredEvent {

    public BeforeActivationFiredEventImpl(Match activation, KieRuntime kruntime ) {
        super( activation, kruntime );
    }

    @Override
    public String toString() {
        return "==>[BeforeActivationFiredEvent:  getActivation()=" + getMatch()
                + ", getKnowledgeRuntime()=" + getKieRuntime() + "]";
    }
}


text:
package main

import (
	"fmt"
	"github.com/codegangsta/cli"
	"log"
)

const DEFAULT_TAG string = "latest"

var options string
var tag string
var config string
var image string
var quiet bool

func Print(msg string) {
	if !quiet {
		log.Fatal(msg)
	}
}

func Flags() []cli.Flag {
	return []cli.Flag{
		cli.HelpFlag,
		cli.StringFlag{
			Name:  "options, o",
			Usage: "docker build options",
		},
		cli.StringFlag{
			Name:  "tag, t",
			Usage: "docker image tag",
			Value: DEFAULT_TAG,
		},
		cli.StringFlag{
			Name:  "config, c",
			Usage: "config file",
		},
		cli.BoolFlag{
			Name:  "quiet, q",
			Usage: "quiet mode",
		},
	}
}

func Command(c *cli.Context) {
	options = c.String("options")
	tag = c.String("tag")
	quiet = c.Bool("quiet")
	config = c.String("config")

	for _, path := range c.Args() {
		if FileNotExists(path) {
			Print(path + ": No such file or directory")
			continue
		}

		if IsDir(path) {
			ch := GoWalk(path)

			for p := range ch {
				Symlink(p)
				image := GetImage(p)
				tag := GetTag(tag, image)
				tagOption := fmt.Sprintf("%s:%s", image, tag)
				DockerBuild(p, tagOption, options, quiet)
				RemoveFile(DOCKER_FILE)
			}
		} else {
			Symlink(path)
			image := GetImage(path)
			tag := GetTag(tag, image)
			tagOption := fmt.Sprintf("%s:%s", image, tag)
			DockerBuild(path, tagOption, options, quiet)
			RemoveFile(DOCKER_FILE)
		}
	}
}

func GetTag(tag, image string) string {
	if tag == DEFAULT_TAG && FileExists(config) {
		configJson := DecodeJson(config).(map[string]interface{})

		if _, ok := configJson[image]; ok {
			switch configJson[image].(type) {
			case int:
				return fmt.Sprint(configJson[image].(int))
			case float64:
				return fmt.Sprint(configJson[image].(float64))
			case string:
				return configJson[image].(string)
			}
		}
	}

	return tag
}

func HelpTemplate() string {
	return `NAME:
   {{.Name}} - {{.Usage}}

USAGE:
   {{.Name}} [options] [arguments...]

VERSION:
   {{.Version}}

OPTIONS:
   {{range .Flags}}{{.}}
   {{end}}
`
}


text:
using Affecto.Mapping.AutoMapper;
using AutoMapper;
using ServiceRegister.Application.Organization;

namespace ServiceRegister.Api.Organization
{
    internal class OrganizationNameMapper : OneWayMapper<IOrganizationName, OrganizationName>
    {
        protected override void ConfigureMaps()
        {
            Mapper.CreateMap<IOrganizationName, OrganizationName>();
        }
    }
}


text:
<!DOCTYPE html>

<meta name="generator" content="Hexo 3.8.0">
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">

<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css">

<link href="/css/main.css?v=6.6.0" rel="stylesheet" type="text/css">

  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=6.6.0">

  <link rel="icon" type="image/png" sizes="32x32" href="/images/SLM.jpg?v=6.6.0">

  <link rel="icon" type="image/png" sizes="16x16" href="/images/SLM.jpg?v=6.6.0">

  <link rel="mask-icon" href="/images/logo.svg?v=6.6.0" color="#222">

  <meta name="description" content="取得訪問者的機器名稱,管制該機器能使用的功能">
<meta name="keywords" content="Node.js">
<meta property="og:type" content="article">
<meta property="og:title" content="取得客戶端ip位置">
<meta property="og:url" content="http://yoursite.com/2018/12/19/20181219-node-getMachineName/index.html">
<meta property="og:site_name" content="Stoner Blog">
<meta property="og:description" content="取得訪問者的機器名稱,管制該機器能使用的功能">
<meta property="og:locale" content="zh-TW">
<meta property="og:updated_time" content="2019-01-09T01:07:43.471Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="取得客戶端ip位置">
<meta name="twitter:description" content="取得訪問者的機器名稱,管制該機器能使用的功能">

  <link rel="canonical" href="http://yoursite.com/2018/12/19/20181219-node-getMachineName/">

  <title>取得客戶端ip位置 | Stoner Blog</title>

        Stoner Blog

    <button aria-label="切換導航欄">

    </button>

首頁

關於

標籤14

歸檔50

    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2018/12/19/20181219-node-getMachineName/">

      <meta itemprop="name" content="Stoner">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/SLM.jpg">

      <meta itemprop="name" content="Stoner Blog">

取得客戶端ip位置

                發表於

              <time title="創建時間:2018-12-19 09:10:57" itemprop="dateCreated datePublished" datetime="2018-12-19T09:10:57+08:00">2018-12-19</time>

                |

                  更新於

                <time title="修改時間:2019-01-09 09:07:43" itemprop="dateModified" datetime="2019-01-09T09:07:43+08:00">2019-01-09</time>

              |

                分類於

                Node.js

取得訪問者的機器名稱,管制該機器能使用的功能

一般方式取得 client ip

碰到一個需求是要知道訪問者的機器,做後續相關的事情 (例如針對該電腦操作"列表機"之類的機器)

目前得知以下可以取得訪問者的 ip

1
2
3
4
5
6

request.connection.remoteAddress; // ::ffff:192.xxx.xxx.xxx (客戶端ip)
request.connection.remotePort; // port

//other
request.connection.localAddress; // ::ffff:192.xxx.xxx.xxx (本地端機器ip)
request.connection.localPort; // port

node.js 在啟動時,.listen(port)沒有特別設置的話默認會是 ipv6,取得的 ip 會長::ffff:192.xxx.xxx.xx
要達到想到的效果,要將.listen(port, '0.0.0.0'),就可以取到 ipv4,雖然取得 ipv6也是可以用表達是過濾掉 ::ffff:

1

request.connection.remoteAddress.replace(/^.*:/, ""); // ::ffff:192.xxx.xxx.xxx >>> 192.xxx.xxx.xxx

涉及代理情況下取得 client ip

server 假如是有代理(proxy)的話,就要用以下方式抓出 ip
這方式可能會取得多個 ip,因為 X-Forwarded-For: OriginatingClientIPAddress, proxy1-IPAddress, proxy2-IPAddress
最左邊是原始客戶端,並且每個通過請求的後續代理會將 ip 添加到接收請求的位置。
以上的例子通過了 proxy1 再來是 proxy2。proxy2 是請求的遠程位置。

1
2
3
4

// X-Forwarded-For - The IP address of the client before it went through the proxy
// X-Forwarded-Port - The port of the client before it went through the proxy
request.headers["x-forwarded-for"];
request.headers["X-Forwarded-Port"];

建議取得 client ip 的方式

Arnav Gupta 提出的取得方式

1
2
3
4
5

var ip =
  (req.headers["x-forwarded-for"] || "").split(",").pop() ||
  req.connection.remoteAddress ||
  req.socket.remoteAddress ||
  req.connection.socket.remoteAddress;

相關文件 node.js API: net.module - server.listen

取得客戶端機器名稱

取得 ip 之後,就可以用 node 的 dns module 找出機器名稱。

1
2
3

require('dns').reverse(req.connection.remoteAddress, function(err, domains) {
    console.log(domains);
});

相關文件 dns.reverse

參考

How to retrieve client and server IP address and port number in Node.js

Stripping "::ffff:" prefix from request.connection.remoteAddress nodejs

How to determine a user's IP address in node

How to get client computer name in node js

[api] 如何在節點中確定用戶的 IP 地址

nodejs 獲取客户端 ip 地址

            # Node.js

                 Window - 無法刪除資料「找不到此項目」

                React - Handling Events

            文章目錄

            本站概要

Stoner

                    50
                    文章

                    10
                    分類

                    14
                    標籤

1. 一般方式取得 client ip

2. 涉及代理情況下取得 client ip

3. 建議取得 client ip 的方式

4. 取得客戶端機器名稱

5. 參考

© 2019

  Stoner

由 Hexo 強力驅動 v3.8.0

  |

主題 – NexT.Gemini v6.6.0

          0%


text:
import imghdr
import logging
import json
import tempfile
import urllib.request
from contextlib import closing

logging.basicConfig(level=logging.INFO)

# First, read the contents file into memory, then parse it into json.
with open("contents.json") as f:
    contents_str = f.read()
    contents = json.loads(contents_str)

# Then, loop over each content, and get its mp4 and png values.
logging.info("Extracting mp4 and png links.")
mp4_links = []
png_links = []
for content in contents.values():
    mp4 = content["download_urls"]["mp4"]
    png = content["download_urls"]["png"]
    png_links.append(png)
    mp4_links.append(mp4)

# For the sake of runtime and reproducibility let's just download the
# first 10 links. You can reduce this if you want.
LIMIT = 50

# Now, download each mp4 link.
logging.info("Downloading mp4 links.")
for mp4 in mp4_links[:LIMIT]:
    logging.info("Downloading {}".format(mp4))
    r = urllib.request.urlopen(mp4)
    # Let's not save the file to avoid cluttering our filesystem.

    # What's a fast and succinct way of detecting whether what we downloaded
    # was an MP4 file?

# Now, download each png link.
# However, we want to figure out if what we downloaded was a PNG file.
# If it's not a PNG file, then it should not be in the filesystem after
# this script.
logging.info("Downloading png links.")
for png in png_links[:LIMIT]:
    logging.info("Downloading {}".format(png))
    r = urllib.request.urlopen(png)

    # temporary file, so we don't clutter our filesystem.
    with tempfile.NamedTemporaryFile(suffix=".png", delete=False) as f:
        contents = r.read()

        if imghdr.what(None, h=contents) != "png":
            logging.info("Image not a PNG; not saving.")
        else:
            f.write(contents)


text:
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">

  <id>package</id>
  <includeBaseDirectory>true</includeBaseDirectory>

  <dependencySets>
    <dependencySet>
      <outputDirectory>/lib</outputDirectory>
      <useTransitiveDependencies>true</useTransitiveDependencies>
      <useTransitiveFiltering>true</useTransitiveFiltering>
      <useProjectArtifact>true</useProjectArtifact>
    </dependencySet>
  </dependencySets>

  <fileSets>
    <fileSet>
      <directory>src/main/package</directory>
      <filtered>false</filtered>
      <outputDirectory>.</outputDirectory>
      <excludes>
        <exclude>**/*.txt</exclude>
      </excludes>
    </fileSet>
    <fileSet>
      <directory>src/main/package</directory>
      <filtered>true</filtered>
      <outputDirectory>.</outputDirectory>
      <includes>
        <include>**/*.txt</include>
      </includes>
      <lineEnding>unix</lineEnding>
    </fileSet>
  </fileSets>
</assembly>


text:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_pressed="true">
        <shape><corners android:radius="@dimen/cardview_default_radius"/>
        <solid android:color="@color/ripple_material_light"/></shape>
    </item>
    <item><shape>
        <corners android:radius="@dimen/cardview_default_radius"/>
        <solid android:color="@color/text_black_std"/>
    </shape></item>
</selector>


text:
package ipmi.coding.commands.sel;

import ipmi.coding.commands.ResponseData;

/**
 * Wrapper for Get Sel Entry response
 */
public class GetSelEntryResponseData implements ResponseData {

	/**
	 * ID of the next record in the repository.
	 */
	private int nextRecordId;

	/**
	 * Sensor record data
	 */
	private SelRecord selRecord;

	public void setNextRecordId(int nextRecordId) {
		this.nextRecordId = nextRecordId;
	}

	public int getNextRecordId() {
		return nextRecordId;
	}

	public void setSelRecord(SelRecord selRecord) {
		this.selRecord = selRecord;
	}

	public SelRecord getSelRecord() {
		return selRecord;
	}
}


text:
package gr.alexkantas.multipleusereditor;

import java.util.Observable;

/**
 *
 * @author Alexandros Kantas
 */
public class Model extends Observable {

    private volatile String text = "HI!";

    private volatile int i = 1;

    public synchronized String getText() {
        return text;
    }

    public synchronized void setText(String text) {
        this.text = text;
        setChanged();
        notifyObservers();
    }

    public synchronized void addViewer() {
        Thread tv = new Thread(() -> {
            Viewer v = new Viewer("Viewer #" + i);
            i++;
            addObserver(v);
            System.out.println("" + getListsize());
            setChanged();
            notifyObservers();
        });
        tv.start();
    }

    public synchronized void addViewer(Viewer viewer) {
        addObserver(viewer);
        System.out.println("" + getListsize());
        setChanged();
        notifyObservers();
    }

    public synchronized void removeViewer(Viewer viewer) {
        deleteObserver(viewer);
        setChanged();
        notifyObservers();
    }

    public synchronized int getListsize() {
        return countObservers() - 1;
    }

}