text:
from __future__ import unicode_literals
from django import template
from django.template.loader import get_template
from ..utils import get_model, get_constructor_form

Form = get_model('Form')
ConstructorForm = get_constructor_form()

register = template.Library()

class BuiltFormNode(template.Node):
    def __init__(self, name, value, template):
        self.name = name
        self.value = value
        self.template = template

    def render(self, context):
        if self.name != 'form':
            try:
                form = Form.objects.get(**{str(self.name): template.Variable(self.value).resolve(context)})
            except Form.DoesNotExist:
                form = None
        else:
            form = template.Variable(self.value).resolve(context)

        if not isinstance(form, Form):
            return ''

        if self.template:
            t = get_template('constructor_forms/includes/%s' % self.template)
        else:
            t = get_template('constructor_forms/includes/constructor_form.html')
        context['form'] = form
        context['constructor_form'] = ConstructorForm(form)
        return t.render(context)

@register.tag
def render_constructor_form(parser, token):
    '''
    render_constructor_form takes one argument in one of the following formats:

    {% render_constructor_form form_instance %}
    {% render_constructor_form form=form_instance %}
    {% render_constructor_form slug=form_instance.slug %}
    {% render_constructor_form form_instance 'template.html' %}
    {% render_constructor_form form=form_instance template='template.html' %}
    '''
    try:
        try:
            _, arg, t = token.split_contents()
        except ValueError:
            _, arg = token.split_contents()
            t = None

        if '=' not in arg:
            arg = 'form=' + arg
        if '=' not in t:
            t = 'template=' + t
        name, value = arg.split('=', 1)
        t = t.split('=')[1].replace("'", '').replace('"', '')
        if name not in ('form', 'slug'):
            raise ValueError
    except ValueError as e:
        raise template.TemplateSyntaxError(render_constructor_form.__doc__)
    return BuiltFormNode(name, value, t)


text:
/* ###
 * IP: GHIDRA
 *
 * 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.
 */
package agent.gdb.manager.impl.cmd;

import java.util.*;

import agent.gdb.manager.GdbThread;
import agent.gdb.manager.evt.GdbCommandDoneEvent;
import agent.gdb.manager.impl.*;
import ghidra.util.Msg;

public class GdbListThreadsCommand extends AbstractGdbCommand<Map<Integer, GdbThread>> {
	protected final GdbInferiorImpl inferior;

	public GdbListThreadsCommand(GdbManagerImpl manager, GdbInferiorImpl inferior) {
		super(manager);
		this.inferior = inferior;
	}

	@Override
	public String encode() {
		return "-list-thread-groups i" + inferior.getId();
	}

	@Override
	public Map<Integer, GdbThread> complete(GdbPendingCommand<?> pending) {
		GdbCommandDoneEvent done = pending.checkCompletion(GdbCommandDoneEvent.class);
		List<Integer> ids = done.assumeThreadIds();
		Map<Integer, GdbThread> infThreads = inferior.getKnownThreads();
		Set<Integer> cur = infThreads.keySet();
		for (int id : ids) {
			if (cur.contains(id)) {
				continue; // Do nothing, we're in sync
			}
			// Need to create the thread as if we receive =thread-created
			Msg.warn(this, "Resync: Was missing thread: " + id);
			new GdbThreadImpl(manager, inferior, id).add();
		}
		for (int id : new ArrayList<>(cur)) {
			if (ids.contains(id)) {
				continue; // Do nothing, we're in sync
			}
			// Need to remove the thread as if we received =thread-exited
			Msg.warn(this, "Resync: Had extra thread: " + id);
			inferior.removeThread(id);
			manager.removeThread(id);
		}
		return infThreads;
	}

}

redpajama_set_name: RedPajamaGithub


text:
package com.alibaba.json.bvt.serializer;

import java.io.StringWriter;
import java.util.Collections;
import java.util.Map;

import junit.framework.TestCase;

import org.junit.Assert;

import com.alibaba.fastjson.serializer.JSONSerializer;
import com.alibaba.fastjson.serializer.SerializeWriter;

public class SerializeWriterTest_14 extends TestCase {
    @SuppressWarnings("rawtypes")
    public void test_writer_1() throws Exception {
        StringWriter strOut = new StringWriter();
        SerializeWriter out = new SerializeWriter(strOut, 1);

        try {
            JSONSerializer serializer = new JSONSerializer(out);

            Map map = Collections.singletonMap("", "a");
            serializer.write(map);
        } finally {
            out.close();
        }
        Assert.assertEquals("{\"\":\"a\"}", strOut.toString());
    }

    public void test_writer_2() throws Exception {
        StringWriter strOut = new StringWriter();
        SerializeWriter out = new SerializeWriter(strOut, 1);

        try {
            JSONSerializer serializer = new JSONSerializer(out);

            Map map = Collections.singletonMap("ab", "a");
            serializer.write(map);
        } finally {
            out.close();
        }
        Assert.assertEquals("{ab:\"a\"}", strOut.toString());
    }

    public void test_writer_3() throws Exception {
        StringWriter strOut = new StringWriter();
        SerializeWriter out = new SerializeWriter(strOut, 1);

        try {
            JSONSerializer serializer = new JSONSerializer(out);

            Map map = Collections.singletonMap("ab\t", "a");
            serializer.write(map);
        } finally {
            out.close();
        }
        Assert.assertEquals("{\"ab\\t\":\"a\"}", strOut.toString());
    }
}


text:
angular.module('semanticular.tabs').directive('tabset', ['$timeout', function($timeout) {
    /**
     * Template of directive.
     * @type {String}
     */
    var template =
        '
' +
            '
' +
                '{{tab.heading}}' +
            '
' +
            '

' +
        '
';

    /**
     * Default options.
     * @type {Object}
     */
    var defaults = {
        extraClasses: []
    };

    /**
     * Linker function.
     */
    var link = function(scope, $element, attrs) {
        $element = $($element[0]);
        var options = $.extend(true, {}, defaults, scope.options || {});

        $timeout(function() {
            $element
                .find('.menu')
                .addClass(options.extraClasses.join(' '))
                .find('.item')
                .tab();
        });
    };

    return {
        restrict: 'E',
        scope: {
            options: '='
        },
        template: template,
        transclude: true,
        replace: true,
        controller: 'TabsetController',
        link: link
    };
}]);


text:
> Gregory Farquhar, Matteo Hessel, Kate Baumli Zita Marinho, Hado van Hasselt, Angelos Filos, David Silver

## Abstract
Learned models of the environment provide reinforcement learning (RL) agents with flexible ways of making predictions about the environment.

In particular, models enable planning, i.e. using more computation to improve value functions or policies, without requiring additional environment interactions.

In this work, we investigate a way of augmenting model-based RL, by additionally encouraging a learned model and value function to be jointly self-consistent.

Our approach differs from classic planning methods such as Dyna, which only update values to be consistent with the model.

We propose multiple self-consistency updates, evaluate these in both tabular and function approximation settings, and find that, with appropriate choices, self-consistency helps both policy evaluation and control.


text:
UPDATE SPECIAL_REVIEW SET SORT_ID = 1 WHERE SPECIAL_REVIEW_CODE = 1;
UPDATE SPECIAL_REVIEW SET SORT_ID = 2 WHERE SPECIAL_REVIEW_CODE = 2;
UPDATE SPECIAL_REVIEW SET SORT_ID = 3 WHERE SPECIAL_REVIEW_CODE = 3;
UPDATE SPECIAL_REVIEW SET SORT_ID = 4 WHERE SPECIAL_REVIEW_CODE = 4;
UPDATE SPECIAL_REVIEW SET SORT_ID = 5 WHERE SPECIAL_REVIEW_CODE = 5;
UPDATE SPECIAL_REVIEW SET SORT_ID = 6 WHERE SPECIAL_REVIEW_CODE = 6;
UPDATE SPECIAL_REVIEW SET SORT_ID = 7 WHERE SPECIAL_REVIEW_CODE = 7;
UPDATE SPECIAL_REVIEW SET SORT_ID = 8 WHERE SPECIAL_REVIEW_CODE = 8;
UPDATE SPECIAL_REVIEW SET SORT_ID = 9 WHERE SPECIAL_REVIEW_CODE = 9;
UPDATE SPECIAL_REVIEW SET SORT_ID = 10 WHERE SPECIAL_REVIEW_CODE = 10;
UPDATE SPECIAL_REVIEW SET SORT_ID = 11 WHERE SPECIAL_REVIEW_CODE = 11;
UPDATE SPECIAL_REVIEW SET SORT_ID = 12 WHERE SPECIAL_REVIEW_CODE = 12;

COMMIT;


text:
package com.google.gson.internal;

/**
 * A simple object that holds onto a pair of object references, first and second.
 *
 * @author Inderjeet Singh
 * @author Joel Leitch
 *
 * @param <FIRST>
 * @param <SECOND>
 */
public final class Pair<FIRST, SECOND> {
  public final FIRST first;
  public final SECOND second;

  public Pair(FIRST first, SECOND second) {
    this.first = first;
    this.second = second;
  }

  @Override
  public int hashCode() {
    return 17 * ((first != null) ? first.hashCode() : 0)
        + 17 * ((second != null) ? second.hashCode() : 0);
  }

  @Override
  public boolean equals(Object o) {
    if (!(o instanceof Pair<?, ?>)) {
      return false;
    }

    Pair<?, ?> that = (Pair<?, ?>) o;
    return equal(this.first, that.first) && equal(this.second, that.second);
  }

  private static boolean equal(Object a, Object b) {
    return a == b || (a != null && a.equals(b));
  }

  @Override
  public String toString() {
    return String.format("{%s,%s}", first, second);
  }
}


text:
const parser = require('postcss-selector-parser')

module.exports =
class SyntaxScopeMap {
  constructor (scopeNamesBySelector) {
    this.namedScopeTable = {}
    this.anonymousScopeTable = {}
    for (let selector in scopeNamesBySelector) {
      this.addSelector(selector, scopeNamesBySelector[selector])
    }
    setTableDefaults(this.namedScopeTable)
    setTableDefaults(this.anonymousScopeTable)
  }

  addSelector (selector, scopeName) {
    parser((parseResult) => {
      for (let selectorNode of parseResult.nodes) {
        let currentTable = null
        let currentIndexValue = null

        for (let i = selectorNode.nodes.length - 1; i >= 0; i--) {
          const termNode = selectorNode.nodes[i]

          switch (termNode.type) {
            case 'tag':
              if (!currentTable) currentTable = this.namedScopeTable
              if (!currentTable[termNode.value]) currentTable[termNode.value] = {}
              currentTable = currentTable[termNode.value]
              if (currentIndexValue != null) {
                if (!currentTable.indices) currentTable.indices = {}
                if (!currentTable.indices[currentIndexValue]) currentTable.indices[currentIndexValue] = {}
                currentTable = currentTable.indices[currentIndexValue]
                currentIndexValue = null
              }
              break

            case 'string':
              if (!currentTable) currentTable = this.anonymousScopeTable
              const value = termNode.value.slice(1, -1)
              if (!currentTable[value]) currentTable[value] = {}
              currentTable = currentTable[value]
              if (currentIndexValue != null) {
                if (!currentTable.indices) currentTable.indices = {}
                if (!currentTable.indices[currentIndexValue]) currentTable.indices[currentIndexValue] = {}
                currentTable = currentTable.indices[currentIndexValue]
                currentIndexValue = null
              }
              break

            case 'universal':
              if (currentTable) {
                if (!currentTable['*']) currentTable['*'] = {}
                currentTable = currentTable['*']
              } else {
                if (!this.namedScopeTable['*']) {
                  this.namedScopeTable['*'] = this.anonymousScopeTable['*'] = {}
                }
                currentTable = this.namedScopeTable['*']
              }
              if (currentIndexValue != null) {
                if (!currentTable.indices) currentTable.indices = {}
                if (!currentTable.indices[currentIndexValue]) currentTable.indices[currentIndexValue] = {}
                currentTable = currentTable.indices[currentIndexValue]
                currentIndexValue = null
              }
              break

            case 'combinator':
              if (currentIndexValue != null) {
                rejectSelector(selector)
              }

              if (termNode.value === '>') {
                if (!currentTable.parents) currentTable.parents = {}
                currentTable = currentTable.parents
              } else {
                rejectSelector(selector)
              }
              break

            case 'pseudo':
              if (termNode.value === ':nth-child') {
                currentIndexValue = termNode.nodes[0].nodes[0].value
              } else {
                rejectSelector(selector)
              }
              break

            default:
              rejectSelector(selector)
          }
        }

        currentTable.scopeName = scopeName
      }
    }).process(selector)
  }

  get (nodeTypes, childIndices, leafIsNamed = true) {
    let result
    let i = nodeTypes.length - 1
    let currentTable = leafIsNamed
      ? this.namedScopeTable[nodeTypes[i]]
      : this.anonymousScopeTable[nodeTypes[i]]

    if (!currentTable) currentTable = this.namedScopeTable['*']

    while (currentTable) {
      if (currentTable.indices && currentTable.indices[childIndices[i]]) {
        currentTable = currentTable.indices[childIndices[i]]
      }

      if (currentTable.scopeName) {
        result = currentTable.scopeName
      }

      if (i === 0) break
      i--
      currentTable = currentTable.parents && (
        currentTable.parents[nodeTypes[i]] ||
        currentTable.parents['*']
      )
    }

    return result
  }
}

function setTableDefaults (table) {
  const defaultTypeTable = table['*']

  for (let type in table) {
    let typeTable = table[type]
    if (typeTable === defaultTypeTable) continue

    if (defaultTypeTable) {
      mergeTable(typeTable, defaultTypeTable)
    }

    if (typeTable.parents) {
      setTableDefaults(typeTable.parents)
    }

    for (let key in typeTable.indices) {
      const indexTable = typeTable.indices[key]
      mergeTable(indexTable, typeTable, false)
      if (indexTable.parents) {
        setTableDefaults(indexTable.parents)
      }
    }
  }
}

function mergeTable (table, defaultTable, mergeIndices = true) {
  if (mergeIndices && defaultTable.indices) {
    if (!table.indices) table.indices = {}
    for (let key in defaultTable.indices) {
      if (!table.indices[key]) table.indices[key] = {}
      mergeTable(table.indices[key], defaultTable.indices[key])
    }
  }

  if (defaultTable.parents) {
    if (!table.parents) table.parents = {}
    for (let key in defaultTable.parents) {
      if (!table.parents[key]) table.parents[key] = {}
      mergeTable(table.parents[key], defaultTable.parents[key])
    }
  }

  if (defaultTable.scopeName && !table.scopeName) {
    table.scopeName = defaultTable.scopeName
  }
}

function rejectSelector (selector) {
  throw new TypeError(`Unsupported selector '${selector}'`)
}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <item name="colorPrimary" type="color">#E53935</item>
    <item name="colorSecondary" type="color">#F44336</item>
    <item name="colorSecDark" type="color">#D32F2F</item>
    <item name="colorWhite" type="color">#FFFFFF</item>
    <item name="accent" type="color">#E57373</item>
    <item name="text_primary" type="color">#C62828</item>
    <item name="text_secondary" type="color">#C62828</item>
</resources>


text:
module mykinds_m
   use, intrinsic :: iso_fortran_env, only : WP => real64
   implicit none
   private
   public :: WP
end module mykinds_m

module uomtype_m
   use mykinds_m, only : WP
   implicit none
   private
   integer, parameter, public :: LENUOMLABEL = 12

   type, public :: uomtype_t(MASS,LENGTH,TIME)
      private
      integer, kind, public              :: MASS = 0
      integer, kind, public              :: LENGTH = 0
      integer, kind, public              :: TIME = 0
      real(WP), public                   :: Val = 0.0_wp
      character(len=LENUOMLABEL), public :: UomLabel = ''
   contains
      private
      procedure, pass(this) :: convert_uomtype_t
      generic, public       :: convert => convert_uomtype_t
   end type uomtype_t
contains

   function convert_uomtype_t( this, label ) result( new_val )
      class(uomtype_t(MASS=0,LENGTH=0,TIME=0)), intent(in) :: this
      character(len=*), intent(in)                         :: label
      real(WP)                                             :: new_val

      !.. Local variables
      character(len=LENUOMLABEL) :: InLabel

      !.. Some code to validate input
      InLabel = label
      new_val = this%Val

      !.. Appropriate conversion logic elided
      if ( trim(InLabel) /= this%UomLabel ) then
         ! error stop?
      end if

      return

   end function convert_uomtype_t

end module uomtype_m

module mass_m

   use mykinds_m, only : WP
   use uomtype_m, only : uomtype_t, LENUOMLABEL

   implicit none

   private

   type, extends(uomtype_t) :: mass_t
      private
   contains
      private
      procedure, pass(this) :: convert_mass_t
      generic, public :: convert => convert_mass_t
   end type mass_t

   interface mass_t
      module procedure construct_mass_t
   end interface
   public :: mass_t

   character(len=LENUOMLABEL), parameter :: MASS_LABELS(2) = [ character(len=LENUOMLABEL) :: "kg", "gm" ]

contains

   function construct_mass_t( val, label ) result( new_m )

      real(WP), intent(in)         :: val
      character(len=*), intent(in) :: label
      !.. Function result
      type(mass_t(MASS=1,LENGTH=0,TIME=0)) :: new_m

      !.. Some code to validate input
      new_m%UomLabel = label
      select case ( new_m%UomLabel )
         case ( MASS_LABELS(1):MASS_LABELS(size(MASS_LABELS)) )
         case default
            ! error stop?
      end select

      new_m%val = val

   end function construct_mass_t

   function convert_mass_t( this, label ) result( new_val )

      class(mass_t(MASS=1,LENGTH=0,TIME=0)), intent(in) :: this
      character(len=*), intent(in)                      :: label
      !.. Function result
      real(WP) :: new_val

      !.. Local variables
      character(len=LENUOMLABEL) :: InLabel

      !.. Some code to validate input
      InLabel = label
      new_val = this%Val

      !.. Appropriate conversion logic elided
      !   Here, assume value in passed object is in SI units
      select case ( InLabel )
         case ( MASS_LABELS(1) )
         case ( MASS_LABELS(2) )
            new_val = new_val * 1E3_wp
         case default
            ! error stop?
      end select

   end function convert_mass_t

end module mass_m

module length_m

   use mykinds_m, only : WP
   use uomtype_m, only : uomtype_t, LENUOMLABEL

   implicit none

   private

   type, extends(uomtype_t) :: length_t
      private
   contains
      private
      procedure, pass(this) :: add_length_t
      procedure, pass(this) :: convert_length_t
      generic, public :: operator(+) => add_length_t
      generic, public :: convert => convert_length_t
   end type length_t

   interface length_t
      module procedure construct_length_t
   end interface
   public :: length_t

   character(len=LENUOMLABEL), parameter :: LENGTH_LABELS(3) = [ character(len=LENUOMLABEL) :: "m", "cm", "km" ]

contains

   function construct_length_t( val, label ) result( new_l )

      real(WP), intent(in)         :: val
      character(len=*), intent(in) :: label
      !.. Function result
      type(length_t(MASS=0,LENGTH=1,TIME=0)) :: new_l

      !.. Some code to validate input
      new_l%UomLabel = label
      select case ( new_l%UomLabel )
         case ( LENGTH_LABELS(1):LENGTH_LABELS(size(LENGTH_LABELS)) )
         case default
            ! error stop?
      end select

      new_l%val = val

   end function construct_length_t

   function convert_length_t( this, label ) result( new_val )

      class(length_t(MASS=0,LENGTH=1,TIME=0)), intent(in) :: this
      character(len=*), intent(in)     :: label
      !.. Function result
      real(WP) :: new_val

      !.. Local variables
      character(len=LENUOMLABEL) :: InLabel

      !.. Some code to validate input
      InLabel = label
      new_val = this%Val

      !.. Appropriate conversion logic elided
      !   Here, assume value in passed object is in SI units
      select case ( InLabel )
         case ( LENGTH_LABELS(1) )
         case ( LENGTH_LABELS(2) )
            new_val = new_val * 1E2_wp
         case ( LENGTH_LABELS(3) )
            new_val = new_val * 1E-3_wp
         case default
            ! error stop?
      end select

   end function convert_length_t

   function add_length_t( this, rhs2 ) result( new_val )

      class(length_t(LENGTH=1)), intent(in) :: this
      class(length_t(LENGTH=1)), intent(in) :: rhs2
      !.. Function result
      type(length_t(LENGTH=1)) :: new_val

      new_val%UomLabel = this%UomLabel
      new_val%val = this%val + rhs2%convert( this%UomLabel )

      return

   end function add_length_t

end module length_m

module time_m

   use mykinds_m, only : WP
   use uomtype_m, only : uomtype_t, LENUOMLABEL

   implicit none

   private

   type, extends(uomtype_t) :: time_t
      private
   contains
      private
      procedure, pass(this) :: convert_time_t
      generic, public :: convert => convert_time_t
   end type time_t

   interface time_t
      module procedure construct_time_t
   end interface
   public :: time_t

   character(len=LENUOMLABEL), parameter :: TIME_LABELS(3) = [ character(len=LENUOMLABEL) :: "s", "min", "hour" ]

contains

   function construct_time_t( val, label ) result( new_t )

      real(WP), intent(in)         :: val
      character(len=*), intent(in) :: label
      !.. Function result
      type(time_t(MASS=0,LENGTH=0,TIME=1)) :: new_t

      !.. Some code to validate input
      new_t%UomLabel = label
      select case ( new_t%UomLabel )
         case ( TIME_LABELS(1):TIME_LABELS(size(TIME_LABELS)) )
         case default
            ! error stop?
      end select

      new_t%val = val

   end function construct_time_t

   function convert_time_t( this, label ) result( new_val )

      class(time_t(MASS=0,LENGTH=0,TIME=1)), intent(in) :: this
      character(len=*), intent(in)   :: label
      !.. Function result
      real(WP) :: new_val

      !.. Local variables
      character(len=LENUOMLABEL) :: InLabel

      !.. Some code to validate input
      InLabel = label
      new_val = this%Val

      !.. Appropriate conversion logic elided
      !   Here, assume value in passed object is in SI units
      select case ( InLabel )
         case ( TIME_LABELS(1) )
         case ( TIME_LABELS(2) )
            new_val = new_val / 60.0_wp
         case ( TIME_LABELS(3) )
            new_val = new_val / 3600.0_wp
         case default
            ! error stop?
      end select

   end function convert_time_t

end module time_m

module velocity_m

   use mykinds_m, only : WP
   use uomtype_m, only : uomtype_t, LENUOMLABEL

   implicit none

   private

   type, extends(uomtype_t) :: velocity_t
      private
   contains
      private
      procedure, pass(this) :: convert_velocity_t
      generic, public :: convert => convert_velocity_t
   end type velocity_t

   interface velocity_t
      module procedure construct_velocity_t
   end interface
   public :: velocity_t

contains

   function construct_velocity_t( val, label ) result( new_v )

      real(WP), intent(in)         :: val
      character(len=*), intent(in) :: label
      !.. Function result
      type(velocity_t(MASS=0,LENGTH=1,TIME=-1)) :: new_v

      !.. Procedure to validate label elided based on fundamental types of length and time
      !   If not validated, error stop?

      new_v%UomLabel = label
      new_v%val = val

   end function construct_velocity_t

   function convert_velocity_t( this, label ) result( new_val )

      class(velocity_t(MASS=0,LENGTH=1,TIME=-1)), intent(in) :: this
      character(len=*), intent(in)       :: label
      !.. Function result
      real(WP) :: new_val

      !.. Local variables
      character(len=LENUOMLABEL) :: InLabel

      !.. Some code to validate input
      InLabel = label
      new_val = this%Val

      !.. Appropriate conversion logic elided

      return

   end function convert_velocity_t

end module velocity_m

module acceleration_m

   use mykinds_m, only : WP
   use uomtype_m, only : uomtype_t, LENUOMLABEL

   implicit none

   private

   type, extends(uomtype_t) :: acceleration_t
      private
    contains
      private
      procedure, pass(this) :: convert_acceleration_t
      generic, public :: convert => convert_acceleration_t
   end type acceleration_t

   interface acceleration_t
      module procedure construct_acceleration_t
   end interface
   public :: acceleration_t

contains

   function construct_acceleration_t( val, label ) result( new_a )

      real(WP), intent(in)         :: val
      character(len=*), intent(in) :: label
      !.. Function result
      type(acceleration_t(MASS=0,LENGTH=1,TIME=-2)) :: new_a

      !.. Procedure to validate label elided based on fundamental types of length and time
      !   If not validated, error stop?

      new_a%UomLabel = label
      new_a%val = val

   end function construct_acceleration_t

   function convert_acceleration_t( this, label ) result( new_val )

      class(acceleration_t(MASS=0,LENGTH=1,TIME=-2)), intent(in) :: this
      character(len=*), intent(in)           :: label
      !.. Function result
      real(WP) :: new_val

      !.. Local variables
      character(len=LENUOMLABEL) :: InLabel

      !.. Some code to validate input
      InLabel = label
      new_val = this%Val

      !.. Appropriate conversion logic elided

      return

   end function convert_acceleration_t

end module acceleration_m

module force_m

   use mykinds_m, only : WP
   use uomtype_m, only : uomtype_t, LENUOMLABEL

   implicit none

   private

   type, extends(uomtype_t) :: force_t
      private
    contains
      private
      procedure, pass(this) :: convert_force_t
      generic, public :: convert => convert_force_t
   end type force_t

   interface force_t
      module procedure construct_force_t
   end interface
   public :: force_t

   interface operator(*)
      module procedure multiply_ma
   end interface
   public :: operator(*)

contains

   function construct_force_t( val, label ) result( new_f )

      real(WP), intent(in)         :: val
      character(len=*), intent(in) :: label
      !.. Function result
      type(force_t(MASS=1,LENGTH=1,TIME=-2)) :: new_f

      !.. Procedure to validate label elided based on fundamental types of mass, length and time
      !   If not validated, error stop?

      new_f%UomLabel = label
      new_f%val = val

   end function construct_force_t

   function convert_force_t( this, label ) result( new_val )

      class(force_t(MASS=1,LENGTH=1,TIME=-2)), intent(in) :: this
      character(len=*), intent(in)    :: label
      !.. Function result
      real(WP) :: new_val

      !.. Local variables
      character(len=LENUOMLABEL) :: InLabel

      !.. Some code to validate input
      InLabel = label
      new_val = this%Val

      !.. Appropriate conversion logic elided

      return

   end function convert_force_t

   function multiply_ma( m, a ) result( F )

      class(uomtype_t(MASS=1,LENGTH=0,TIME=0)), intent(in)  :: m
      class(uomtype_t(MASS=0,LENGTH=1,TIME=-2)), intent(in) :: a
      !.. Function result
      type(force_t(MASS=1,LENGTH=1,TIME=-2)) :: F

      !.. Appropriate multiplication operation elided
      F%Val = m%val * a%Val
      F%UomLabel = trim(m%UomLabel) // "*" // trim(a%UomLabel)

      return

   end function multiply_ma

end module force_m

program p
   use mykinds_m, only : WP
   implicit none

   call s1()
   call s2()
   stop
contains

   subroutine s1()
      use mass_m, only : mass_t
      use velocity_m, only : velocity_t
      use acceleration_m, only : acceleration_t
      use force_m, only : force_t, operator(*)

      type(mass_t(MASS=1))                   :: m
      type(velocity_t(LENGTH=1,TIME=-1))     :: v
      type(acceleration_t(LENGTH=1,TIME=-2)) :: a
      type(force_t(MASS=1,LENGTH=1,TIME=-2)) :: F

      print *, "Unit Test 1"
      m = mass_t( val=1.0_wp, label="kg" )
      v = velocity_t( val=1.0_wp, label="m/s" )
      a = acceleration_t( val=2.0_wp, label="m/s2" )
      F = m * a

      print *, "mass = ", m%convert( "gm" ), " gm"
      print *, "acceleration = ", a%val, a%UomLabel
      print *, "Force = ", F%val, F%UomLabel
      print *, new_line('a')
      return
   end subroutine s1

   subroutine s2()
      use length_m, only : length_t

      type(length_t(LENGTH=1)) :: l1
      type(length_t(LENGTH=1)) :: l2
      type(length_t(LENGTH=1)) :: l3

      print *, "Unit Test 2"
      l1 = length_t( val=1.0_wp, label="km" )
      l2 = length_t( val=2.0_wp, label="m" )
      l3 = l1 + l2

      print *, "l1 = ", l1%val, l1%UomLabel
      print *, "l2 = ", l2%val, l2%UomLabel
      print *, "l3 = l1 + l2 yields", l3%val, l3%UomLabel
      print *, new_line('a')
      return
   end subroutine s2
end program p


text:
<link rel="import" href="../../bower_components/polymer/polymer.html">
<link rel="import" href="../../bower_components/iron-ajax/iron-ajax.html">
<link rel="import" href="../../bower_components/paper-item/paper-item.html">
<link rel="import" href="../../bower_components/paper-date-picker/paper-date-picker.html">
<link rel="import" href="../../bower_components/paper-styles/demo-pages.html">
<link rel="import" href="../../bower_components/paper-dialog/paper-dialog.html">
<link rel="import" href="../../bower_components/paper-button/paper-button.html">
<link rel="import" href="../../bower_components/paper-input/paper-input.html">

<dom-module id="todatepicker-card">
 <template>

      <paper-input class="btn" label="End Date" on-click="FnShowDialog" raised value="{{showdate}}"></paper-input>
      <paper-dialog id="dialog" class="paper-date-picker-dialog" modal on-iron-overlay-closed="FnDismissDialog">
        <paper-date-picker id="picker" date="{{date}}"></paper-date-picker>

          <paper-button dialog-dismiss>Cancel</paper-button>
          <paper-button dialog-confirm>OK</paper-button>

      </paper-dialog>

    <dialog-page id="ID_Show_Dialog"></dialog-page>
  </template>

</dom-module>


text:
```
yarn install
```

## Run Webpack
```
yarn run build
```

## Start http-server
```
yarn start
```


text:
package service

import (
	"github.com/gorilla/mux"
)

//NewRouter Main routing function
func NewRouter() *mux.Router {
	//Create an instance of gorilla router
	router := mux.NewRouter().StrictSlash(true)

	//Iterate over routes we declared in routes.go and attach them to this router
	for _, route := range routes {
		//Attach each route using a builder-like pattern to set each route up
		router.Methods(route.Method).Path(route.Pattern).Name(route.Name).Handler(route.HandlerFunc)
	}
	return router
}


text:
<component name="libraryTable">
  <library name="Maven: com.google.api-client:google-api-client:1.22.0">
    <CLASSES>
      <root url="jar://$MAVEN_REPOSITORY$/com/google/api-client/google-api-client/1.22.0/google-api-client-1.22.0.jar!/" />
    </CLASSES>
    <JAVADOC>
      <root url="jar://$MAVEN_REPOSITORY$/com/google/api-client/google-api-client/1.22.0/google-api-client-1.22.0-javadoc.jar!/" />
    </JAVADOC>
    <SOURCES>
      <root url="jar://$MAVEN_REPOSITORY$/com/google/api-client/google-api-client/1.22.0/google-api-client-1.22.0-sources.jar!/" />
    </SOURCES>
  </library>
</component>


text:
package q

import "github.com/oov/q/qutil"

// Interval represents intervals in SQL statements.
type Interval interface {
	Value() int
	Unit() qutil.IntervalUnit
}

type addIntervalFunc struct {
	V         interface{}
	Intervals []qutil.Interval
}

func (f *addIntervalFunc) String() string               { return expressionToString(f) }
func (f *addIntervalFunc) C(aliasName ...string) Column { return columnExpr(f, aliasName...) }
func (f *addIntervalFunc) WriteExpression(ctx *qutil.Context, buf []byte) []byte {
	return ctx.Dialect.AddInterval(ctx, buf, f.V, f.Intervals...)
}

// AddInterval creates Function such as "v + INTERVAL intervals[n] YEAR + ...".
func AddInterval(v interface{}, intervals ...Interval) Function {
	ivs := make([]qutil.Interval, len(intervals))
	for i, v := range intervals {
		ivs[i] = v
	}
	return &addIntervalFunc{V: v, Intervals: ivs}
}


text:
#ifndef AVFORMAT_TIMEFILTER_H
#define AVFORMAT_TIMEFILTER_H

/**
 * Opaque type representing a time filter state
 *
 * The purpose of this filter is to provide a way to compute accurate time
 * stamps that can be compared to wall clock time, especially when dealing
 * with two clocks: the system clock and a hardware device clock, such as
 * a soundcard.
 */
typedef struct TimeFilter TimeFilter;

/**
 * Create a new Delay Locked Loop time filter
 *
 * feedback2_factor and feedback3_factor are the factors used for the
 * multiplications that are respectively performed in the second and third
 * feedback paths of the loop.
 *
 * Unless you know what you are doing, you should set these as follow:
 *
 * o = 2 * M_PI * bandwidth * period
 * feedback2_factor = sqrt(2 * o)
 * feedback3_factor = o * o
 *
 * Where bandwidth is up to you to choose. Smaller values will filter out more
 * of the jitter, but also take a longer time for the loop to settle. A good
 * starting point is something between 0.3 and 3 Hz.
 *
 * @param clock_period period of the hardware clock in seconds
 *        (for example 1.0/44100)
 *
 * For more details about these parameters and background concepts please see:
 * http://www.kokkinizita.net/papers/usingdll.pdf
 */
TimeFilter * ff_timefilter_new(double clock_period, double feedback2_factor, double feedback3_factor);

/**
 * Update the filter
 *
 * This function must be called in real time, at each process cycle.
 *
 * @param period the device cycle duration in clock_periods. For example, at
 * 44.1kHz and a buffer size of 512 frames, period = 512 when clock_period
 * was 1.0/44100, or 512/44100 if clock_period was 1.
 *
 * system_time, in seconds, should be the value of the system clock time,
 * at (or as close as possible to) the moment the device hardware interrupt
 * occured (or any other event the device clock raises at the beginning of a
 * cycle).
 *
 * @return the filtered time, in seconds
 */
double ff_timefilter_update(TimeFilter *self, double system_time, double period);

/**
 * Reset the filter
 *
 * This function should mainly be called in case of XRUN.
 *
 * Warning: after calling this, the filter is in an undetermined state until
 * the next call to ff_timefilter_update()
 */
void ff_timefilter_reset(TimeFilter *);

/**
 * Free all resources associated with the filter
 */
void ff_timefilter_destroy(TimeFilter *);

#endif /* AVFORMAT_TIMEFILTER_H */


text:
TCLAP::ValueArg<int>    argLevel("l","level","Characterization Level (1-3)"   , false, 0, "int");
TCLAP::MultiArg<string> argNO   ("n","no"   ,"exclude feature from extraction", false,    "string");
TCLAP::MultiArg<string> argOnly ("o","only" ,"extract only specified features", false,    "string");

Characterization::Characterization(void)
{
}

Characterization::~Characterization(void)
{
}

//FileStorage* Characterization::openFilestorage()
//{
//	FileStorage* fs;
//
//	// create output filename
//	stringstream ssStreamFilename;
//	ssStreamFilename << filename->c_str() << ".feat.xml";
//
//	// load data from existing file
//	if (appendToFile || updateFile)
//	{
//		// check if this file exists
//		ifstream ifile(ssStreamFilename.str().c_str());
//
//		if (ifile)
//		{
//			VerboseOutput::println(string("Characterization"), "open filestorage to read data: '" + ssStreamFilename.str(), verbose);
//
//			// reading existing features
//			try
//			{
//				VerboseOutput::println(string("Characterization"), "Reading existing data from file", verbose);
//
//				//fs = new FileStorage(ssStreamFilename.str().c_str() , FileStorage::READ);
//				loadFeatures();
//				//fs->release();
//			}
//			catch (Exception& e)
//			{
//				stringstream msg;
//				msg << "Error while reading Feature file " << ssStreamFilename.str() << ": ";
//
//				// TODO: use StringUtils::removeSourceFromExceptionMessage() instead
//				vector<string> items = StringUtils::split(e.msg, ':');
//				for (int i = 1; i < items.size(); i++)
//				{
//					msg << items.at(i);
//				}
//
//				throw runtime_error(msg.str());
//			}
//		}
//		else
//		{
//			stringstream msg;
//			msg << "Feature file '" << ssStreamFilename.str() << "' not found. Cannot append new data!";
//			throw runtime_error(msg.str());
//		}
//
//		ifile.close();
//	}
//
//	if (appendToFile)
//	{
//
//		try
//		{
//			VerboseOutput::println(string("Characterization"), "open filestorage to append data: '" + ssStreamFilename.str(), verbose);
//			fs = new FileStorage(ssStreamFilename.str().c_str() , FileStorage::APPEND);
//		}
//		catch (Exception& e)
//		{
//			stringstream msg;
//			msg << "Can not open feature file '" << ssStreamFilename.str() << "': ";
//
//			// TODO: use StringUtils::removeSourceFromExceptionMessage() instead
//			vector<string> items = StringUtils::split(e.msg, ':');
//			for (int i = 1; i < items.size(); i++)
//			{
//				msg << items.at(i);
//			}
//			throw runtime_error(msg.str());
//		}
//	}
//	else
//	{
//		try
//		{
//			VerboseOutput::println(string("Characterization"), string("open new filestorage"), verbose);
//			fs = new FileStorage(ssStreamFilename.str().c_str() , FileStorage::WRITE);
//		}
//		catch (Exception& e)
//		{
//			stringstream msg;
//			msg << "Can not open feature file '" << ssStreamFilename.str() << "': ";
//
//			// TODO: use StringUtils::removeSourceFromExceptionMessage() instead
//			vector<string> items = StringUtils::split(e.msg, ':');
//			for (int i = 1; i < items.size(); i++)
//			{
//				msg << items.at(i);
//			}
//			throw runtime_error(msg.str());
//		}
//	}
//
//	return fs;
//}

void Characterization::addTask(Feature* task)
{
	tasks.push_back(task);
}

void Characterization::execute()
{

	Mat img;

	// load image
	try
	{
		VerboseOutput::println(string("Characterization"), "loading image: " + string(const_cast<char*>(filename->c_str())));
		img = imread(const_cast<char*>(filename->c_str()), CV_LOAD_IMAGE_COLOR);
		VerboseOutput::println(string("Characterization"), "image loaded" );
	}
	catch (Exception& e)
	{
		throw runtime_error("Error while reading image");
	}

	// check image
	if ((img.rows == 0) || (img.cols == 0))
	{
		throw runtime_error("Corrupt Image");
	}

	// execute feature extraction
	try
	{
		list<Feature*>::iterator i;

		VerboseOutput::println(string("Characterization"), "extract features" );
		// iterate through all tasks
		for(i=tasks.begin(); i != tasks.end(); ++i)
		{
			Feature* task = *i;

			if(canExecute(task))
			{
				VerboseOutput::println(string("Characterization"), "execute task: " + task->getName());
				task->execute(img);
				VerboseOutput::println(string("Characterization"), "persist data from task: " + task->getName());
				task->persist(featureFileOutputDirectory);
			}
		}

		VerboseOutput::println(string("Characterization"), "feature extraction finished");
	}
	catch (Exception& ex)
	{
		stringstream msg;
		msg << "Error while executing feature extraction: " << ex.msg;
		throw runtime_error(msg.str());
	}
}

void Characterization::writeOutput(void)
{
}

bool Characterization::canExecute(Feature* task)
{
	// is argOnly set?
	if (argOnly.getValue().size() > 0)
	{
		vector<string> onlies = argOnly.getValue();
		vector<string>::iterator i;

		for(i=onlies.begin(); i != onlies.end(); ++i)
		{
			string onlyFeat = *i;

			if (onlyFeat.compare(task->getName()) == 0)
			{
				VerboseOutput::println(string("Characterization"), "option --only: extract feature only '" + onlyFeat + "'");
				return true;
			}
		}
		return false;
	}

	bool result = true;

	// check if a certain level is requested
	if( (task->getLevel() == argLevel.getValue()) ||
		((argLevel.getValue() == 0) && (task->getLevel() < 4)) )
	{
		// check if certain features should be skipped
		vector<string> nos = argNO.getValue();

		vector<string>::iterator i;

		for(i=nos.begin(); i != nos.end(); ++i)
		{
			string no = *i;

			if (no.compare(task->getName()) == 0)
			{
				result = false;
			}
		}
	}
	else
	{
		result = false;
	}

	return result;
}

void Characterization::addCommandLineArgs(TCLAP::CmdLine *cmd)
{
	cmd->add(argLevel);
	cmd->add(argNO);
	cmd->add(argOnly);

	list<Feature*>::iterator i;

	for(i=tasks.begin(); i != tasks.end(); ++i)
	{
		Feature* task = *i;

		list<TCLAP::Arg*>* args = task->getCharacterizationCommandlineArguments();

		list<TCLAP::Arg*>::iterator j;

		for(j=args->begin(); j != args->end(); ++j)
		{
			TCLAP::Arg* arg = *j;
			cmd->add(arg);
		}
	}
}

void Characterization::parseCommandLineArgs()
{
	list<Feature*>::iterator i;

	for(i=tasks.begin(); i != tasks.end(); ++i)
	{
		Feature* task = *i;
		task->setFilename(filename);
		task->parseCommandlineArguments();
	}
}

void Characterization::setFilename(string* fname)
{
	filename = fname;
}

void Characterization::loadFeatures()
{
	TaskFactory::loadData(tasks);
}

void Characterization::setFeatureFileOutputDirectory( string& dir )
{
	list<Feature*>::iterator i;

	for(i=tasks.begin(); i != tasks.end(); ++i)
	{
		Feature* task = *i;
		task->setFeatureFilesDirectory(dir);
	}
}


text:
import Ember from 'ember';

function debouncedSetter(key, wait = 500){
  function set(value){
    this.set(key, value);
  }

  return Ember.computed(key, {
    get(){
      return this.get(key);
    },
    set(key, value){
      Ember.run.debounce(this, set, value, wait);
      return value;
    }
  });
}

export default Ember.Controller.extend({
  debouncedLang: debouncedSetter("lang"),
  debouncedPlaceholder: debouncedSetter("placeholder"),

  resetCss: true,
  semantic: false,

  btns: [
    ['viewHTML'],
    ['undo', 'redo'],
    ['formatting'],
    'btnGrp-design',
    ['link'],
    ['image'],
    'btnGrp-justify',
    'btnGrp-lists',
    ['foreColor', 'backColor'],
    ['preformatted'],
    ['horizontalRule'],
    ['fullscreen']
  ]
});


text:
package org.apache.maven.lifecycle;

import junit.framework.TestCase;

import org.apache.maven.lifecycle.internal.ExecutionPlanItem;
import org.apache.maven.lifecycle.internal.stub.LifecycleExecutionPlanCalculatorStub;
import org.apache.maven.model.Plugin;

import java.util.Set;

/**
 * @author Kristian Rosenvold
 */
public class MavenExecutionPlanTest
    extends TestCase
{

    public void testFindLastInPhase()
        throws Exception
    {
        MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExceutionPlan();

        ExecutionPlanItem expected = plan.findLastInPhase( "package" );
        ExecutionPlanItem beerPhase = plan.findLastInPhase( "BEER" );  // Beer comes straight after package in stub
        assertEquals( expected, beerPhase );
        assertNotNull( expected );
    }

    public void testThreadSafeMojos()
        throws Exception
    {
        MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExceutionPlan();
        final Set<Plugin> unSafePlugins = plan.getNonThreadSafePlugins();
        // There is only a single threadsafe plugin here...
        assertEquals( plan.size() - 1, unSafePlugins.size() );

    }

    public void testFindLastWhenFirst()
        throws Exception
    {
        MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExceutionPlan();

        ExecutionPlanItem beerPhase = plan.findLastInPhase(
            LifecycleExecutionPlanCalculatorStub.VALIDATE.getPhase() );  // Beer comes straight after package in stub
        assertNull( beerPhase );
    }

    public void testFindLastInPhaseMisc()
        throws Exception
    {
        MavenExecutionPlan plan = LifecycleExecutionPlanCalculatorStub.getProjectAExceutionPlan();

        assertNull( plan.findLastInPhase( "pacXkage" ) );
        // Beer comes straight after package in stub, much like real life.
        assertNotNull( plan.findLastInPhase( LifecycleExecutionPlanCalculatorStub.INITIALIZE.getPhase() ) );
    }
}


text:
{% load i18n %}
{% extends "html/core/hints/base.html" %}

{% block hint_content %}

{{ user }}, {% trans %}there are no Files{% endtrans %}.

{% trans %}Upload a File{% endtrans %}

{% endblock %}


text:
[![Build & Test](https://github.com/eclipse-iceoryx/iceoryx/workflows/Build%20&%20Test/badge.svg?branch=master)](https://github.com/eclipse-iceoryx/iceoryx/actions)
[![Integrationtests](https://github.com/eclipse-iceoryx/iceoryx/workflows/Iceoryx%20Integrationtests/badge.svg?branch=master)](https://github.com/eclipse-iceoryx/iceoryx/actions)
[![Gitter](https://badges.gitter.im/eclipse-iceoryx/iceoryx.svg)](https://gitter.im/eclipse/iceoryx)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Codecov](https://codecov.io/gh/eclipse-iceoryx/iceoryx/branch/master/graph/badge.svg?branch=master)](https://codecov.io/gh/eclipse-iceoryx/iceoryx?branch=master)
[![Sanitize](https://github.com/eclipse/iceoryx/workflows/Sanitize/badge.svg?branch=master)](https://github.com/eclipse/iceoryx/actions?query=workflow%3ASanitize)

## Introduction

Great that you've made it to this neat Eclipse project! Let's get you started by providing a quick background
tour, introducing the project scope and all you need for installation and a first running example.

So first off: What is iceoryx?

iceoryx is an inter-process-communication (IPC) middleware for various operating systems (currently we support Linux,
macOS, QNX, FreeBSD and Windows 10).
It has its origins in the automotive industry, where large amounts of data have to be transferred between different processes
when it comes to driver assistance or automated driving systems. However, the efficient communication mechanisms can also be applied
to a wider range of use cases, e.g. in the field of robotics or game development.

iceoryx uses a true zero-copy, shared memory approach that allows to transfer data from publishers to subscribers without a single copy.
This ensures data transmissions with constant latency, regardless of the size of the payload. For more information have a look at the
[1000 words iceoryx introduction](https://www.eclipse.org/community/eclipse_newsletter/2019/december/4.php).

You're right, middleware is a cluttered term and can somehow be all or nothing. To get a better impression what
this means for iceoryx, please have a look at our [goals and non-goals](doc/goals-non-goals.md).

Don't get too frightened of the API when strolling through the examples. Think of the untyped C++ and the C API as a
"plumbing" one ("plumbing" as defined in Git, which means low-level). We're not using the "plumbing" APIs ourselves, but
instead the typed C++ API. The normal use case is that iceoryx is integrated as high-performance IPC transport layer in
a bigger framework with additional API layers.
An example for such a "porcelain" API would be [ROS 2](https://www.ros.org/).

You can find the full API documentation on 🌐 [https://iceoryx.io](https://iceoryx.io).

### Supported Platforms

Modification or addition of new platforms is described in the
[custom iceoryx platforms](doc/website/advanced/custom-iceoryx-platform.md) article.

|Operating System| Compiler  | supports access rights for shared memory | command line parsing    |
|----------------|-----------|:----------------------------------------:|:-----------------------:|
| Linux          | gcc/clang | yes                                      | yes                     |
| QNX            | gcc       | yes                                      | yes                     |
| MacOS          | clang     | no, not planned for implementation       | yes                     |
| Windows 10     | msvc      | no, not planned for implementation       | will be implemented     |
| FreeBSD (Unix) | clang     | no, not planned for implementation       | yes                     |

In general unix platforms should work with iceoryx but we only test FreeBSD on our CI.

### Where is Eclipse iceoryx used?

|Framework | Description |
|---|---|
| [ROS 2](https://github.com/ros2/rmw_iceoryx) | Eclipse iceoryx can be used inside the [Robot Operating System](https://www.ros.org/) with [rmw_iceoryx](https://github.com/ros2/rmw_iceoryx.git) |
| [eCAL](https://github.com/continental/ecal) | Open-source framework from [Continental AG](https://www.continental.com/) supporting pub/sub and various message protocols |
| [RTA-VRTE](https://www.etas.com/en/products/rta-vrte.php) | [AUTOSAR Adaptive Platform](https://www.autosar.org/standards/adaptive-platform/) software framework for vehicle computer from [ETAS GmbH](https://www.etas.com) |
| [Cyclone DDS](https://github.com/eclipse-cyclonedds/cyclonedds) | Performant and robust open-source DDS implementation maintained by [ZettaScale Technology](https://zettascale.tech/) |
| [Apex.Middleware](https://www.apex.ai/apex-middleware) | Safe and certified middleware for autonomous mobility systems from [Apex.AI](https://www.apex.ai/) |
| [AVIN AUTOSAR Adaptive Platform](https://www.avinsystems.com/products/autosar_ap/) | AUTOSAR Adaptive Platform Product from AVIN Systems |

## Build and install

You can find the build and installation guidelines [here](doc/website/getting-started/installation.md).

## Examples

After you've built all the necessary things, you can continue playing around with the [examples](./iceoryx_examples/README.md).

## Build and run in a Docker environment

If you want to avoid installing anything on your host machine but you have Docker installed, it is possible to use it to build and run iceoryx applications.

Please see the dedicated [README.md](tools/docker/README.md) for information on how to do this.

## Documentation

* [Getting Started](doc/website/getting-started/overview.md)
* [Installation Guide](doc/website/getting-started/installation.md)
* [iceoryx Hoofs Hacker Guide](iceoryx_hoofs/README.md)

### Quality levels & platforms

> [Quality level](./CONTRIBUTING.md#quality-levels) are 5 to 1+, where 1+ is the highest level.

Please see the [Quality Declaration](./QUALITY_DECLARATION.md) for details of the quality measures according to ROS 2 guidelines.

|CMake project/target   | Current Level | Target Level QNX  | Target Level
 Linux, Windows, macOS |
|-----------------------|:-------------:|:-----------------:|:---------------------------------------:|
| iceoryx_hoofs         | 2             | 1+                | 1                                       |
| iceoryx_posh          | 2             | 1+, 2             | 1                                       |
| iceoryx_dust          | 2             | 2                 | 2                                       |
| iceoryx_binding_c     | 2             | 2                 | 2                                       |
| iceoryx_examples      | 5             | 4                 | 4                                       |
| iceoryx_introspection | 5             | 4                 | 4                                       |
| iceoryx_meta          | 5             | 5                 | 5                                       |

Is something missing or you've got ideas for other nifty examples? Jump right away to the next section!

## Contribute

Please refer to the [CONTRIBUTING.md](./CONTRIBUTING.md) for a quick read-up about what to consider if you want to contribute.

## Planned features

Get to know the upcoming features and the project scope in [PLANNED_FEATURES.md](./PLANNED_FEATURES.md).

## Bindings and innovations enabled by iceoryx

|Name                                                                                | Description                                                      | Technologies |
|-------------------------------------------------------------------------------------|------------------------------------------------------------------|--------------|
| [iceoryx-rs](https://github.com/eclipse-iceoryx/iceoryx-rs)                         | Rust binding for iceoryx                                         | Rust         |
| [iceoryx-automotive-soa](https://github.com/eclipse-iceoryx/iceoryx-automotive-soa) | Binding for automotive frameworks like AUTOSAR Adaptive ara::com | C++          |
| [iceoryx-gateway-dds](https://github.com/eclipse-iceoryx/iceoryx-gateway-dds)       | Gateway for Cyclone DDS                                          | DDS          |
| [iceray](https://github.com/elBoberido/iceray)                                      | An iceoryx introspection client written in Rust                  | Rust         |
| [Larry.Robotics](https://gitlab.com/larry.robotics)                                 | An iceoryx demonstrator for tinker, thinker and toddler          | Demonstrator |

## Frequently Asked Questions (FAQ)

[FAQ.md](./doc/website/FAQ.md)

## Governance & maintainers

Please have a look at the [GOVERNANCE.md](./GOVERNANCE.md).


text:
<?php

use app\models\Restaurant;
use yii\helpers\Html;
use yii\helpers\Url;
use yii\widgets\ActiveForm;

$this->title = 'NomNomAdmin Restauracje';
/* @var $model Restaurant */
?>
<?= $this->render('/menu/user', ['service' => 'nomnom']) ?>
<?= $this->render('/menu/admin', ['active' => 'r', 'service' => 'nomnom']) ?>

            <a href="<?= Url::to(['restaurants/index']) ?>" class="btn btn-default"> Lista restauracji
            <?php if (!$model->isNewRecord): ?>
            <a href="<?= Url::to(['restaurants/view', 'id' => $model->id]) ?>" class="btn btn-primary"> Podgląd restauracji
            <a href="<?= Url::to(['restaurants/delete', 'id' => $model->id]) ?>" class="btn btn-danger" data-confirm="Czy na pewno chcesz usunąć tę restaurację?">
                 Usuń restaurację

            <?php endif ?>

            <?php if ($model->isNewRecord): ?>

Nowa restauracja

            <?php else: ?>

Edycja restauracji

            <?php endif ?>

        <?php $form = ActiveForm::begin([
            'options' => ['class' => 'form-horizontal'],
            'fieldConfig' => [
                'template' => "{label}\n
{input}
\n
{error}
",
                'labelOptions' => ['class' => 'col-lg-2 control-label'],
            ],
        ]); ?>
            <?= $form->field($model, 'name')->textInput(['autofocus' => true]) ?>
            <?= $form->field($model, 'url') ?>
            <?= $form->field($model, 'phone') ?>
            <?= $form->field($model, 'screen')->fileInput() ?>
            <?php if (!$model->isNewRecord && !empty($model->screen)): ?>
            Zdjęcie: <?= Html::a($model->screen, '/uploads/menu/' . $model->screen, ['target' => 'menu']) ?>
            <?= $form->field($model, 'stay')->checkbox() ?>
            <?php endif; ?>
            <?= $form->field($model, 'max') ?>
            <?php if ($model->isNewRecord): ?>
            <?= $form->field($model, 'preferred')->checkbox() ?>
            <?php endif; ?>
            <?= $form->field($model, 'comment') ?>

                    <?= Html::submitButton('Zapisz', ['class' => 'btn btn-primary']) ?>

        <?php ActiveForm::end(); ?>


text:
using Microsoft.Azure.ServiceBus;
using System;
using System.Text;
using System.Threading.Tasks;

namespace PushMessageToQueue
{
    class Program
    {
        static QueueClient queueClient;

        static void Main(string[] args)
        {
            try
            {
                Send();
            }
            catch (Exception ex)
            {
                throw;
            }
            finally
            {
                Console.ReadKey();
            }
        }

        async static void Send()
        {
            try
            {
                var result = await SendAsync();
            }
            catch (Exception ex)
            {
                await queueClient.CloseAsync();
                throw;
            }
            finally
            {
                await queueClient.CloseAsync();
            }
        }

        static async Task<string> SendAsync()
        {
            string connectString = "your connect string";
            string queueName = "queuename01";
            queueClient = new QueueClient(connectString, queueName);
            var message = new Message(Encoding.UTF8.GetBytes("message01"));
            await queueClient.SendAsync(message);
            var aa = string.Empty;

            return "ok";
        }
    }
}


text:
import { CloudLightning32 } from "../../";

export = CloudLightning32;


text:
package com.intellij.openapi.vcs.ui;

import com.intellij.openapi.Disposable;
import com.intellij.openapi.actionSystem.*;
import com.intellij.openapi.application.WriteAction;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.editor.SpellCheckingEditorCustomizationProvider;
import com.intellij.openapi.fileTypes.FileTypes;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Key;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vcs.CommitMessageI;
import com.intellij.openapi.vcs.VcsBundle;
import com.intellij.openapi.vcs.VcsConfiguration;
import com.intellij.openapi.vcs.VcsDataKeys;
import com.intellij.openapi.vcs.changes.ChangeList;
import com.intellij.ui.*;
import com.intellij.util.containers.ContainerUtil;
import org.jetbrains.annotations.*;

import javax.swing.*;
import java.awt.*;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class CommitMessage extends JPanel implements Disposable, DataProvider, CommitMessageI {
  public static final Key<CommitMessage> DATA_KEY = Key.create("Vcs.CommitMessage.Panel");
  private final EditorTextField myEditorField;
  private final TitledSeparator mySeparator;

  @NotNull private List<ChangeList> myChangeLists = Collections.emptyList(); // guarded with WriteLock

  public CommitMessage(@NotNull Project project) {
    this(project, true);
  }

  public CommitMessage(@NotNull Project project, @NotNull CommitMessage commitMessage) {
    this(project);
    myEditorField.setDocument(commitMessage.getEditorField().getDocument());
  }

  public CommitMessage(@NotNull Project project, final boolean withSeparator) {
    super(new BorderLayout());

    myEditorField = createCommitTextEditor(project, false);
    myEditorField.getDocument().putUserData(DATA_KEY, this);

    add(myEditorField, BorderLayout.CENTER);

    ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, getToolbarActions(), withSeparator);
    toolbar.updateActionsImmediately();
    toolbar.setReservePlaceAutoPopupIcon(false);
    toolbar.getComponent().setBorder(BorderFactory.createEmptyBorder());

    if (withSeparator) {
      mySeparator = SeparatorFactory.createSeparator(VcsBundle.message("label.commit.comment"), myEditorField.getComponent());
      JPanel separatorPanel = new JPanel(new BorderLayout());
      separatorPanel.add(mySeparator, BorderLayout.SOUTH);
      separatorPanel.add(Box.createVerticalGlue(), BorderLayout.NORTH);

      JPanel labelPanel = new JPanel(new BorderLayout());
      labelPanel.setBorder(BorderFactory.createEmptyBorder());
      labelPanel.add(separatorPanel, BorderLayout.CENTER);
      labelPanel.add(toolbar.getComponent(), BorderLayout.EAST);
      add(labelPanel, BorderLayout.NORTH);
    }
    else {
      mySeparator = null;
      add(toolbar.getComponent(), BorderLayout.EAST);
    }

    setBorder(BorderFactory.createEmptyBorder());
  }

  @Nullable
  @Override
  public Object getData(@NonNls String dataId) {
    if (VcsDataKeys.COMMIT_MESSAGE_CONTROL.is(dataId)) {
      return this;
    }
    return null;
  }

  public void setSeparatorText(@NotNull String text) {
    if (mySeparator != null) {
      mySeparator.setText(text);
    }
  }

  @Override
  public void setCommitMessage(String currentDescription) {
    setText(currentDescription);
  }

  /**
   * Creates a text editor appropriate for creating commit messages.
   *
   * @param project project this commit message editor is intended for
   * @param forceSpellCheckOn if false, {@link com.intellij.openapi.vcs.VcsConfiguration#CHECK_COMMIT_MESSAGE_SPELLING} will control
   *                          whether or not the editor has spell check enabled
   * @return a commit message editor
   */
  public static EditorTextField createCommitTextEditor(@NotNull Project project, boolean forceSpellCheckOn) {
    Set<EditorCustomization> features = new HashSet<>();

    VcsConfiguration configuration = VcsConfiguration.getInstance(project);
    if (configuration != null) {
      boolean enableSpellChecking = forceSpellCheckOn || configuration.CHECK_COMMIT_MESSAGE_SPELLING;
      ContainerUtil.addIfNotNull(features, SpellCheckingEditorCustomizationProvider.getInstance().getCustomization(enableSpellChecking));
      features.add(new RightMarginEditorCustomization(configuration.USE_COMMIT_MESSAGE_MARGIN, configuration.COMMIT_MESSAGE_MARGIN_SIZE));
      features.add(WrapWhenTypingReachesRightMarginCustomization.getInstance(configuration.WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN));
    } else {
      ContainerUtil.addIfNotNull(features, SpellCheckingEditorCustomizationProvider.getInstance().getEnabledCustomization());
      features.add(new RightMarginEditorCustomization(false, -1));
    }

    features.add(SoftWrapsEditorCustomization.ENABLED);
    features.add(AdditionalPageAtBottomEditorCustomization.DISABLED);
    features.add(MonospaceEditorCustomization.getInstance());

    EditorTextFieldProvider service = ServiceManager.getService(project, EditorTextFieldProvider.class);
    return service.getEditorField(FileTypes.PLAIN_TEXT.getLanguage(), project, features);
  }

  @NotNull
  private static ActionGroup getToolbarActions() {
    return (ActionGroup)ActionManager.getInstance().getAction("Vcs.MessageActionGroup");
  }

  @NotNull
  public EditorTextField getEditorField() {
    return myEditorField;
  }

  public void setText(@Nullable String initialMessage) {
    final String text = initialMessage == null ? "" : StringUtil.convertLineSeparators(initialMessage);
    myEditorField.setText(text);
  }

  @NotNull
  public String getComment() {
    final String s = myEditorField.getDocument().getCharsSequence().toString();
    return StringUtil.trimTrailing(s);
  }

  public void requestFocusInMessage() {
    myEditorField.requestFocus();
    myEditorField.selectAll();
  }

  @Override
  public void dispose() {
  }

  @CalledInAwt
  public void setChangeLists(@NotNull List<ChangeList> value) {
    WriteAction.run(() -> {
      myChangeLists = value;
    });
  }

  @NotNull
  @CalledWithReadLock
  public List<ChangeList> getChangeLists() {
    return myChangeLists;
  }
}


text:
/*layout */
#sfcart_container { width: 960px; margin: 0 auto; font-family: arial; }
#sfcart_container_form { font-family:arial;}
#sfcart_left {display: block; width: 160px; float:left;}
#sfcart_right { float:left; }
#sfcart_center {float:left;width: 612px; margin: 0 8px}

/*formatting*/
#sfcart_container h1 { margin: 0; padding: 5px 0; font-size: 1.7em; }
#sfcart_left h2 { margin: 0; padding: 5px 15px; letter-spacing: -1px; font-size: 1.3em; background-color: #787878; color: #f9f9f9; line-height: 24px; border-bottom: solid 1px #999999; border-left: solid 7px #747474; }
#sfcart_container_form input { margin-right: 10px; }
#sfcart_container_form select { width: 29%; font-size: 0.9em; float:left;}
#cke_product_description { width: 70%; float:left; }

/*navigation*/
#sfcart_breadcrumbs a { float:left; text-decoration: none; padding: 5px; color: #787878; }
#sfcart_breadcrumbs a:hover { background-color: #e0e0e0 }
#sfcart_breadcrumbs { letter-spacing: -1px; font-size: 1.3em; color: #787878; line-height: 24px; font-weight: bold; }

/* main menu */
#sfcart_menu ul { display: block; margin: 0; padding: 0; }
#sfcart_menu li { float:left; margin:0}
#sfcart_menu a { padding: 0 20px; display: block; line-height: 40px; color: #fff; border-bottom: solid 5px #fff; font-weight: bold; letter-spacing: -1px;text-decoration: none; background-color: #000; }
#sfcart_menu a:hover {border-bottom: solid 5px red; background-color: #333333; }
#sfcart_menu ul {list-style: none; margin: 0; padding: 0}
#sfcart_menu { display: block; height: 40px; background-color: #000; margin: 0; padding: 0; font-family: arial;}

/*category menu */
#sfcart_submenu a { padding: 2px 15px; display: block; color: #f5f5f5;  border-bottom: solid 1px #a0a0a0; border-top: solid 1px #d0d0d0; font-weight: bold; letter-spacing: -1px;text-decoration: none; background-color: #c0c0c0}
#sfcart_submenu a:hover {color: #fff; background-color: #d0d0d0;}
#sfcart_submenu { list-style: none; display: block; margin: 0 0 0 7px; padding: 0;}
#sfcart_submenu ul { list-style: none; display: block; margin: 0 0 0 7px; padding: 0; border-bottom: solid 1px #d0d0d0 }
#sfcart_submenu ul a { font-weight: normal; padding: 1px 10px; letter-spacing: 0px; border:none; border-bottom: solid 1px #f0f0f0; border-top: solid 1px #c5c5c5; background-color: #e8e8e8; color: #787878}
#sfcart_submenu ul a:hover { color: #898989; background-color: #f5f5f5; border:none; border-bottom: solid 1px #f0f0f0; border-top: solid 1px #c5c5c5;}
#sfcart_submenu a.selected { background-color: #fff; color: #787878; font-weight: bold;}

/*product */
div.sfcart_products { position:relative;display: block;top:0px; left: 0px; padding: 0px 2px 0px 2px; text-align: center !important; color: black; width: 200px; height: 255px;float:left; }
.noimage { border: solid 1px #d0d0d0; height: 225px; background-color: #f0f0f0;}
.noimage p { margin: 105px auto; color: #c0c0c0; font-size: 0.8em; letter-spacing: 1px; }
.noimagelg { border: solid 1px #d0d0d0; height: 225px; background-color: #f0f0f0;}
.noimagelg p { color: #c0c0c0; font-size: 0.8em; letter-spacing: 1px; }
.noimagesm { border: solid 1px #d0d0d0; background-color: #f0f0f0; margin: 0 auto; height: 126px; width: 170px; }
.noimagesm p{ margin: 55px auto; color: #c0c0c0; font-size: 0.8em; letter-spacing: 1px; }
.noimagetiny {float:left;border-right: solid 1px #d0d0d0; border-bottom: solid 1px #d0d0d0;letter-spacing: 0px;background-color: #f0f0f0; margin: 0 auto; height: 29px; width: 29px }
.noimagetiny p {  color: #c0c0c0; font-size: 0.8em; height: 30px; width: 30px; margin:0; padding:0}
div.sfcart_productimage { position:relative; top:0px; left: 0px; margin: 0; background-color: white; text-align: center; height: 130px; }
div.sfcart_productimage_view { float:left; }
#sfcart_container form,#sfcart_container fieldset, #sfcart_container img { margin: 0; padding: 0; border:none; }
div.sfcart_producttext { width: 198px; text-align: center !important; }
div.sfcart_producttext p { height:17px; margin: 0; }
div.sfcart_producttext a{ font-size: 0.95em; }
a.sfcart_producttitle { color: black; font-weight: bold; height: 32px; width: 100%; margin:0;padding:0; display: block}
div.sfcart_productprice { font-size: 1.4em; line-height: 27px; padding: 0; width: 198px; }
div.sfcart_productprice label{display: inline;}
div.sfcart_productprice br{ clear: both;}
.sfcart_productprice span {white-space: nowrap; color: #ed4f03;	font-weight: bold;}
.sfcart_buy a {width: 100%; display: block; }
.sfcart_buy input { vertical-align: middle }
.sfcart_buy p { font-size: 0.8em; display: inline; }
.sfcart_buy_view { float:left; margin-left: 10px;}
div.sfcart_buy { width: 198px; vertical-align: middle}
.sfcart_productquantity { display: inline; }
span.sfcart_loading { display: none; margin: 5px 0 0 90px; float: left; font-size: 0.7em;}
div.sfcart_product_actions { float:right;}

/*productadmin*/
.sfcart_floatcolumn a { float:right; font-size: 0.9em; line-height: 10px;  }

/*cart*/
.sfcart_item  {font-size: 0.8em;background-color: white;color: black;min-height: 32px; border:solid 1px #d0d0d0;}
.sfcart_item img {float:left; width: 30px; height: 30px; border: solid 1px #e0e0e0;}
.sfcart_itemname {display: block; width: 119px; max-height: 31px; margin:0 0 0 34px; padding-top: 3px;overflow: hidden;font-weight:bold;text-align:left; line-height: 0.96em;}
.sfcart_itemname a{color: black;text-decoration:none; }
.sfcart_itemname a:hover{color: #ed4f03;}
.sfcart_itemprice{display:block;text-align: right;margin: 2px 3px 0 0;}
.sfcart_itemquantity{float:left; margin-left: 3px;color:black;}
.sfcart_itemactions { background-color: #e0e0e0; margin-bottom: 4px;border-bottom:solid 1px #d0d0d0;font-size: 0.8em; padding: 1px 0;}
.sfcart_itemremove {display: block; text-align: right; margin-right: 3px; }
.sfcart_itemremove a{ color: #303030; text-decoration: none; font-size: 0.9em;}
.sfcart_itemremove a:hover{ text-decoration: underline;}
/*IE6 fix for cart*/
* html div#sfcart_maxheight { height:auto !important; height:215px; height:expression(this.scrollHeight>214?"215px":"auto"); }
#sfcart_maxheight { overflow: auto; max-height:215px; width: 172px;  }
#sfcart_empty { border:solid 1px #D0D0D0; text-align:center; margin:0; padding: 10px;  }
#sfcart { float:right;  }
#sfcart input { float:right; width: 100%; font-size: 1.1em;}

/*checkout*/
#sfcart_subtotal, #sfcart_tax, #sfcart_shipping, #sfcart_coupon { font-weight: bold; width: 100%; display: block; border-bottom: 1px solid #AFABA2; padding: 2px 0 1px 0; text-align:right; font-size: 1.0em; }
#sfcart_cartsubtotal strong, #sfcart_subtotal strong, #sfcart_total  strong, #sfcart_tax  strong, #sfcart_shipping  strong, #csfcart_oupon strong{ color: #ed4f03; font-weight: bold; }
#sfcart_total { font-size: 1.2em;font-weight: bold; width: 100%; display: block; padding: 2px 0 1px 0; text-align:right;}
#sfcart_cartsubtotal { font-weight: bold; display: block; text-align:right; }

#sfCartAdminContainer { font-family: Arial; }
#sfCartAdminContainer table { margin-bottom: 10px; font-size: 0.9em;}
#sfCartAdminContainer td { padding: 3px;  }
#sfCartAdminContainer th { padding: 3px; margin: 1px; color: white; font-weight: bold; background-color: #000; font-size: 0.7em; letter-spacing: -1px;}
#sfCartAdminContainer th a {color: white; text-decoration: underline; }
#sfCartAdminContainer td a { color: #737373; padding: 5px; }
#sfCartAdminContainer td a:hover { color: #000 }
#sfCartAdminContainer tr.even td{background:#e4e4e4;}
#sfCartAdminContainer tr.odd td{background:#f0f0f0;}

#producttable { width: 100%;}

/* table columns */
.smallcolumn input { width: 50px; border: solid 1px #a5a5a5; text-align: center; }
.mediumcolumn input { width: 140px; border: solid 1px #a5a5a5; text-align: center; }
.smallcolumn { text-align: center; width: 60px;}
.smallcolumn a { font-size: 0.9em; line-height: 10px;}
.mediumcolumn { text-align: center; width: 150px; }

/* messages */
#messagebox { padding: 5px 20px; }
div.cartmessage, div.cartwarning { border: 1px solid; padding:3px 5px 3px 28px; background-repeat: no-repeat; background-position: 3px center; font-weight: bold; margin-bottom: 5px; width: 118px;font-size: 0.75em; line-height: 10px}
div.cartmessage { color: #00529b;background-color: #fff;background-image: url('/sfCartPlugin/images/info.gif');}
div.cartwarning  { color: #ed4f03; background-color: #ffce9f;background-image: url('/sfCartPlugin/images/warning.gif');}

/* Tooltips */
.tipsy { padding: 5px; font-size: 10px; opacity: 0.8; filter: alpha(opacity=80); background-repeat: no-repeat;  background-image: url(/sfCartPlugin/images/tipsy.gif); }
.tipsy-inner { padding: 5px 8px 4px 8px; background-color: black; color: white; max-width: 200px; text-align: center; }
.tipsy-inner { -moz-border-radius:3px; -webkit-border-radius:3px; }
.tipsy-north { background-position: top center; }
.tipsy-south { background-position: bottom center; }
.tipsy-east { background-position: right center; }
.tipsy-west { background-position: left center; }

/* autocomplete */
.ui-autocomplete { position: absolute; cursor: default; }
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */

ul.ui-menu { list-style: none; padding:0; font-family: arial }
li.ui-menu-item a { background-color: #000; color: #fff; padding: 2px 10px; display: block; font-size: 0.7em; font-weight: bold;border-bottom: solid 1px #a5a5a5}

span.categoryactions { letter-spacing: 0px; float: right;}
span.categoryactions input { font-size: 0.85em; border: solid 1px #a5a5a5; margin: 0 5px;}
.listitem a { font-size: 0.75em; padding: 0 5px; margin: 0 5px; text-decoration: none;  color: #656565; font-weight: normal }
.listitem a:hover { text-decoration: underline; color: #232323;}
.listitem img { border: none;}
div.listitem {cursor: move; background-color: #f5f5f5;border-left: solid 1px #a5a5a5;border-right: solid 1px #a5a5a5; border-bottom: solid 1px #a5a5a5; padding-left: 5px;line-height: 18px; font-weight: bold; font-size: 0.95em;}
div.listitem:hover { background-color: #fff}
#listactions { float: right;}
#listactions img { border:none; vertical-align: top;}
#save { margin: 10px 0;}

/* Category admin */
ol.sortable, ol.sortable ol { margin: 0 0 0 25px;	padding: 0;	list-style-type: none;}
ol.sortable {margin: 0;}
li.tree_item {margin-top: -1px;padding: 0; border-top: solid 1px #a5a5a5;  }
.productrow { display: none;  }
li.ui-menu-item a:hover { background-color:#333; cursor: pointer }
span.productrowitem { padding: 2px 4px; margin: 0 5px 3px 0; font-size: 0.71em; float:left; line-height: 14px; height:14px;background-color: #fff; border:solid 1px #bbb }
span.productrowitem a{ font-size: 0.8em; margin-left: 5px; color: #999 }
.placeholder {	background-color: #cfcfcf;}

.filter { float: right;}

#checkoutcontainer { width:725px;}

#emptycart { float:right; font-size: 0.9em;margin-bottom: 10px;}

.cartheader span { font-size: 1.4em;font-weight: normal;color: #fff; line-height: 1.2em; float:left; display: block; width: 100px;}
.cartheader img { float:right;}
.cartheader {display: block; width: 154px; margin-bottom: 2px; }

/*checkout*/
div.productcart { display:block; }
#shoppingcartheader { display: block; height: 20px;}
#shoppingcartheader span {background:#ed4f03;height: 18px; font-weight: bold; color: white;padding-top:2px; text-transform:uppercase}
#shoppingcartrow{border-bottom: solid 1px #AFABA2; height: 50px;}
#shoppingcartimg {float:left; padding-top:1px;width:55px;}
#shoppingcartname{float:left; padding-top:16px;width: 322px;}
#shoppingcartname a{color: black;}
#shoppingcartqty{float:left; padding-top:12px;padding-left:10px;width: 155px;}
#shoppingcartprice{float:left; padding-top:16px;width: 115px; }
#shoppingcartremove{float:left; padding-top:16px;width: 67px;}
#postalcodecheck { background: #e0e0e0; border-bottom: solid 1px #898989;padding: 4px 0 4px 10px; vertical-align: top;}
#postalcodecheck img {vertical-align: middle;}
#codecheck { display: inline; vertical-align: middle;}
#paypalform { float:right; margin-top: 15px; width: 250px;}
#agreement { margin-left: 10px; }
.quoteamount { float: right; margin-right: 10px;}
.quoteradio { float: left }

/*product*/
.productcontainer { float: left; text-align: center; height: 270px; border-bottom: dotted 1px #d0d0d0; padding-top: 5px; }
.productcontainer_single {	width: 100%; }
p.productcode { height:18px;}

div.descriptioncol span { font-weight: bold; font-size: 1.2em; }
div.descriptioncol li { margin-left: 20px; list-style: square outside url("/sfCartPlugin/images/markersm.gif");font-size: 1.1em; line-height: 20px; }

div.textcol{ position:relative; margin: 0 auto;text-align: center !important;  _display: inline;	width: 171px; }
div.textcol_single{width: 100%;display: block;}
div.textcol form{	text-align: center !important;	width: 171px; min-width: 168px}
div.single_product_display div.textcol{ margin-right: 0; width: 100%;}

div.price_single {margin-top: 10px; font-size: 1.4em;  margin-bottom: 10px; padding: 0;}
p.description, p.wpsc_description, p.wpsc_variation_forms, p.price, p.wpsc_product_extra_content{ margin: 0px 0px 0px 0px; }


text:
module Cisco
  # Namespace for Cisco OS Shim code
  module Shim
  end
end

# Auto-load all Ruby files in the subdirectory
Dir.glob(__dir__ + '/core/*.rb') { |file| require file }


text:
#include "numberSelectionWidget.h"

#include <QtGui/QKeyEvent>

#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
	#include <QtGui/QLabel>
#else
	#include <QtWidgets/QLabel>
#endif

using namespace trikGui;

NumberSelectionWidget::NumberSelectionWidget(int defaultValue, int digits, int separator, int height, QWidget *parent)
	: QWidget(parent)
	, mCurrentDigit(0)
	, mDigits(digits)
	, mEditingMode(false)
{
	mLayout.setSpacing(0);
	mLayout.addStretch();

	int separatorCounter = 1;

	for (int i = 0; i < digits; ++i) {
		auto digitSelector = new DigitSelector(mEditingMode, height);

		mLayout.addWidget(digitSelector);

		connect(digitSelector, &DigitSelector::valueChanged, this, &NumberSelectionWidget::onValueChanged);
		connect(digitSelector, &DigitSelector::upPressed, this, &NumberSelectionWidget::upPressed);
		connect(digitSelector, &DigitSelector::downPressed, this, &NumberSelectionWidget::downPressed);

		if (separator != 0 && separatorCounter % separator == 0 && i != digits - 1) {
			mLayout.addWidget(new QLabel("."));
		}

		++separatorCounter;
	}

	setValue(defaultValue);

	mLayout.addStretch();

	setLayout(&mLayout);
}

bool NumberSelectionWidget::hasFocusInside()
{
	const auto editsList = lineEdits();
	for (int i = 0; i < mDigits; ++i) {
		if (editsList.at(mCurrentDigit)->hasFocus()) {
			return true;
		}
	}

	return hasFocus();
}

int NumberSelectionWidget::value() const
{
	const auto editsList = lineEdits();
	int result = 0;
	for (int i = 0; i < mDigits; ++i) {
		result = result * 10 + editsList.at(i)->text().toInt();
	}

	return result;
}

void NumberSelectionWidget::setValue(int value)
{
	const QString &valueString = QString("%1").arg(value, mDigits, 10, QChar('0'));
	Q_ASSERT(valueString.length() == mDigits);
	const auto editsList = lineEdits();
	for (int i = 0; i < mDigits; ++i) {
		editsList.at(i)->setText(valueString[i]);
	}
}

void NumberSelectionWidget::keyPressEvent(QKeyEvent *event)
{
	switch (event->key()) {
	case Qt::Key_Right: {
		++mCurrentDigit;
		mCurrentDigit %= mDigits;
		lineEdits().at(mCurrentDigit)->setFocus();
		event->accept();
		break;
	}
	case Qt::Key_Left: {
		--mCurrentDigit;
		mCurrentDigit = (mCurrentDigit + mDigits) % mDigits;
		lineEdits().at(mCurrentDigit)->setFocus();
		event->accept();
		break;
	}
	case Qt::Key_Return: {
		mEditingMode = !mEditingMode;
		update();
		event->accept();
		break;
	}
	default: {
		event->ignore();
		break;
	}
	}
}

void NumberSelectionWidget::focusInEvent(QFocusEvent *event)
{
	Q_UNUSED(event)
	lineEdits().at(mCurrentDigit)->setFocus();
}

QList<DigitSelector *> NumberSelectionWidget::lineEdits() const
{
	QList<DigitSelector *> result;
	for (int i = 0; i < mLayout.count(); ++i) {
		const auto digitSelector = dynamic_cast<DigitSelector *>(mLayout.itemAt(i)->widget());
		if (digitSelector) {
			result.append(digitSelector);
		}
	}

	return result;
}

void NumberSelectionWidget::onValueChanged()
{
	emit valueChanged(value());
}


text:
import * as utils from '../utils.js';
import * as ssh from '../ssh.js';
import * as filters from '../filters.js';

export const commands = {};

commands.port = {
  name: 'port',
  usage: ['overcast port [instance|cluster|all] [port]'],
  description: [
    'Change the SSH port for an instance or a cluster. This command fails',
    'if the new port has not been previously opened by iptables.',
    'See also the "expose" and "exposed" commands.'
  ],
  examples: [
    '# Expose only necessary ports:',
    '$ overcast expose vm-01 22 55522 80 443',
    '',
    '# Update SSH port from 22 to 55522:',
    '$ overcast port vm-01 55522',
    '',
    '# Close port 22:',
    '$ overcast expose vm-01 55522 80 443'
  ],
  required: [
    { name: 'instance|cluster|all', varName: 'name', filters: filters.findMatchingInstances },
    { name: 'port' }
  ],
  run: (args, nextFn) => {
    const new_ssh_port = `${args.port}`;
    args.env = {
      new_ssh_port
    };

    args._ = ['change_ssh_port'];
    ssh.run(args, () => {
      const fns = [];
      args.instances.forEach((instance) => {
        fns.push((nextFn) => {
          utils.updateInstance(instance.name, {
            ssh_port: new_ssh_port
          }, nextFn);
        });
      });

      utils.allInParallelThen(fns, nextFn);
    });
  }
};


text:
<?php

class IndexController extends Controller {

	public function index($a = '', $b = '') {
		echo 'IndexController::index';
		$this->render();
		if ($a) {
			echo "a=$a";
		}
		if ($b) {
			echo "b=$b";
		}
	}

	public function view() {
		echo 'IndexController::view';
	}

}


text:
var application = require("application");
var googleTagManager = require("nativescript-google-tagmanager");
application.cssFile = "./app.css";

if (application.ios) {
    //IOS
    var __extends = this.__extends || function (d, b) {
        for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
        function __() { this.constructor = d; }
        __.prototype = b.prototype;
        d.prototype = new __();
    };

    var appDelegate = (function (_super) {
        __extends(appDelegate, _super);
        function appDelegate() {
            _super.apply(this, arguments);
        }

        appDelegate.prototype.applicationDidFinishLaunchingWithOptions = function (application, launchOptions) {
            initTagManager(); //Module Code to initalize
        };

        appDelegate.ObjCProtocols = [UIApplicationDelegate];
        return appDelegate;
    })(UIResponder);
    application.ios.delegate = appDelegate;
}else{
    //ANDROID
    application.on("launch", args => {
        initTagManager(); //Module Code to initalize
    });

}

application.start("main-page");

function initTagManager(){
    googleTagManager.initalize({
        containerId: "GTM-MBD24T",
        logLevel: 'verbose'
    });
}


text:
lang:   EN
title:  Quickening it Up
answer: ^\d{4}
ok:     Noted
error:
---

Cool, your app is awesome. Hey, let's make things a bit easier on you.
You're not going to want to set the time like that every time you BlurbTM.

You just want to type the content and set the mood, right?

Let's add an __initialize__ method to our class. This method is called whenever a new BlurbTM
is created.
At the same time we can limit the length of the BlurbTM content to 40 characters.

    class Blurb
      attr_accessor :content, :time, :mood

      def initialize(mood, content="")
        @time    = Time.now
        @content = content[0..39]
        @mood    = mood
      end
    end

    Blurb.new.time

(That parameter __content=""__ is there to make sure that we know content is a string,
even if no content parameter is passed to the initialize method.)


text:
from libs.dev.consts import *
import wx, h5py, visvis
import numpy as np
import functools

from libs.gui.shaper_equalizer import PulseShaperEqualizer

def GetSmartAutoScaleRange (data, previous_bound=None) :
	"""
	Return the tuple specifying plotting range for `data`.
	"""
	if not isinstance(previous_bound, tuple) or len(previous_bound) == 0:
		return ( min(data), max(data) )

	min_r = min(previous_bound)
	min_d = min(data)

	max_r = max(previous_bound)
	max_d = max(data)

	if min_r > min_d or max_r < max_d :
		# Bounds needs to be updated

		if min_d > 0 :
			min_r = 0.9*min_d
		else :
			min_r = 1.1*min_d

		if max_d > 0 :
			max_r = 1.1*(max_d - min_r) + min_r
		else :
			max_r = 0.9*(max_d - min_r) + min_r

	return (min_r, max_r)

def SaveSettings (event=None, SettingsNotebook=None, filename = "settings.hdf5", title="Open HDF5 file to save settings", OpenDialog=True ) :
	"""
	Method for saving setting
	"""
	if OpenDialog :
		# Ask user to select the file
		openFileDialog = wx.FileDialog(SettingsNotebook, title, "", filename, "HDF5 files (*.hdf5)|*.hdf5",
						wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT | wx.FD_CHANGE_DIR)
		# Check whether user cancelled
		if openFileDialog.ShowModal() == wx.ID_CANCEL: return None
		filename = openFileDialog.GetPath()

	with h5py.File (filename, 'a') as file_settings :

		# Crete the grope if it does not exist
		try : parameters_grp = file_settings["settings"]
		except KeyError : parameters_grp = file_settings.create_group("settings")

		# Loop over all settings tab
		for SettingsTabName, SettingsTab in SettingsNotebook.settings_to_tabs.items() :
			# Save all settings on a given tab
			try : del parameters_grp[SettingsTabName]
			except KeyError : pass
			grp = parameters_grp.create_group(SettingsTabName)

			for key, value in SettingsTab.GetSettings().items() : grp[key] = value

	# return valid filename
	return filename

class BasicWindow (wx.Frame) :
	"""
	Abstract class `BasicWindow` implements basic functionality, such as
	saving and loading settings, stopping all jobs.

	The child of this abstract class must implement:

		`self.panel` (type: wx.Panel) panel with wx.Buttons for operating some tasks
		`self.SettingsNotebook` (type: wx.Notebook) containing setting tabs
		`self.SettingsNotebook.settings_to_tabs`(type: dictionary) binding of setting names to setting tabs
	"""
	def on_close (self, event):
		"""
		Windows is about to be closed. Stop all jobs.
		"""
		self.StopAllJobs ()
		self.Destroy ()

	def StopAllJobs (self) :
		"""
		Stop all tasks
		"""
		for control in self.panel.GetChildren() :
			try :
				if isinstance(control, wx.Button) and control.GetLabel() != control.__start_label__ :
					control.SetLabel (control.__stop_label__)
					control.GetEventHandler().ProcessEvent(wx.PyCommandEvent(wx.EVT_BUTTON.typeId, control.GetId()))
					control.GetEventHandler().ProcessEvent(wx.PyCommandEvent(wx.EVT_LEFT_DOWN.typeId, control.GetId()))
			except AttributeError : pass

	#######################################################################################

	def CreateSaveSettingsButton (self) :
		"""
		Add a wx.Button to `self.panel` that will be binded to method `self.SaveSettings`
		"""
		self.save_settings_button = wx.Button (self.panel, label="Save settings...")
		self.SaveSettings = functools.partial(SaveSettings, SettingsNotebook=self.SettingsNotebook)
		self.Bind (wx.EVT_BUTTON, self.SaveSettings, self.save_settings_button)
		return self.save_settings_button

	#######################################################################################

	def CreateLoadSettingsButton (self) :
		"""
		Add a wx.Button to `self.panel` that will be binded to method `self.LoadSettings`
		"""
		self.load_settings_button = wx.Button (self.panel, label="Load settings...")
		self.Bind (wx.EVT_BUTTON, self.LoadSettings, self.load_settings_button)
		return self.load_settings_button

	def LoadSettings (self, event=None, title="Open HDF5 file to load settings") :
		"""
		Load settings. This method is closely related to <self.SaveSettings>
		"""
		openFileDialog = wx.FileDialog(self, title, "", "",
                                       "HDF5 files (*.hdf5)|*.hdf5", wx.FD_OPEN | wx.FD_FILE_MUST_EXIST | wx.FD_CHANGE_DIR)
		# Check whether user cancelled
		if openFileDialog.ShowModal() == wx.ID_CANCEL: return None

		self.StopAllJobs()

		with h5py.File (openFileDialog.GetPath(), 'r') as file_settings :
			for SettingsTabName, SettingsTab in file_settings["settings"].items() :
				try :
					self.SettingsNotebook.settings_to_tabs[SettingsTabName].SetSettings(SettingsTab)
				except KeyError :
					print "Load Settings Error: Settings %s are ignored" %  SettingsTabName

		# return valid filename
		return openFileDialog.GetPath()

	#######################################################################################
	#
	#	Advanced features
	#
	#######################################################################################

	def CreateShowSpectrumButton (self) :
		"""
		Add a wx.Button to `self.panel` that will be binded to method `self.InteractivelyMeasureSpectrum`
		"""
		self.show_spectrum_button = wx.Button (self.panel)
		self.show_spectrum_button.__start_label__ = "Show spectrum"
		self.show_spectrum_button.__stop_label__ = "STOP measuring spectrum"
		self.show_spectrum_button.SetLabel (self.show_spectrum_button.__start_label__)
		self.Bind (wx.EVT_BUTTON, self.StartInteractivelyMeasureSpectrum, self.show_spectrum_button)
		return self.show_spectrum_button

	def StartInteractivelyMeasureSpectrum (self, event) :
		"""
		This method display spectrum
		"""
		button = self.show_spectrum_button

		if button.GetLabel() == button.__start_label__ :
			self.StopAllJobs()
			# get spectrometer's settings
			spect_settings = self.SettingsNotebook.Spectrometer.GetSettings()

			# Initiate spectrometer
			if self.Spectrometer.SetSettings(spect_settings) == RETURN_FAIL : return

			try : self.wavelengths = self.Spectrometer.GetWavelengths()
			except AttributeError : self.wavelengths = None

			# Clearing the figure
			visvis.cla(); visvis.clf();

			# Set up timer to draw spectrum
			TIMER_ID = wx.NewId()
			self.spectrum_timer =  wx.Timer (self, TIMER_ID)
			self.spectrum_timer.Start (spect_settings["exposure_time"])
			wx.EVT_TIMER (self, TIMER_ID, self.DrawSpectrum)

			# Chose plotting options
			try :
				self.is_autoscaled_spectrum = not(spect_settings["fix_vertical_axis"])
			except KeyError :
				self.is_autoscaled_spectrum = True

			if not self.is_autoscaled_spectrum :
				self.spectrum_plot_limits = ( spect_settings["vertical_axis_min_val"],
											spect_settings["vertical_axis_max_val"] )

			# Change button's label
			button.SetLabel (button.__stop_label__)

		elif button.GetLabel() == button.__stop_label__ :
			# Stopping timer
			self.spectrum_timer.Stop()
			del self.spectrum_timer
			# Delete the parameter for auto-scaling
			del self.spectrum_plot_limits, self.is_autoscaled_spectrum

			# Delate visvis objects
			try : del self.__interact_2d_spectrum__
			except AttributeError : pass
			try : del self.__interact_1d_spectrum__
			except AttributeError : pass

			# Change button's label
			button.SetLabel (button.__start_label__)

		else : raise ValueError("Label is not recognized")

	def DrawSpectrum (self, event) :
		"""
		Draw spectrum interactively
		"""
		spectrum = self.Spectrometer.AcquiredData()
		if spectrum == RETURN_FAIL : return
		# Display the spectrum
		if len(spectrum.shape) > 1:
			try :
				self.__interact_2d_spectrum__.SetData(spectrum)
			except AttributeError :
				visvis.cla(); visvis.clf();
				# Spectrum is a 2D image
				visvis.subplot(211)
				self.__interact_2d_spectrum__ = visvis.imshow(spectrum, cm=visvis.CM_JET)
				visvis.subplot(212)

			# Plot a vertical binning
			spectrum = spectrum.sum(axis=0)

		# Linear spectrum
		try :
			self.__interact_1d_spectrum__.SetYdata(spectrum)
		except AttributeError :
			if self.wavelengths is None :
				self.__interact_1d_spectrum__ = visvis.plot (spectrum, lw=3)
				visvis.xlabel ("pixels")
			else :
				self.__interact_1d_spectrum__ = visvis.plot (self.wavelengths, spectrum, lw=3)
				visvis.xlabel("wavelength (nm)")
			visvis.ylabel("counts")

		if self.is_autoscaled_spectrum :
			# Smart auto-scale linear plot
			try :
				self.spectrum_plot_limits = GetSmartAutoScaleRange(spectrum, self.spectrum_plot_limits)
			except AttributeError :
				self.spectrum_plot_limits = GetSmartAutoScaleRange(spectrum)

		visvis.gca().SetLimits ( rangeY=self.spectrum_plot_limits )

		# Display the current temperature
		try : visvis.title ("Temperature %d (C)" % self.Spectrometer.GetTemperature() )
		except AttributeError : pass

	#######################################################################################

	def CreatePulseShaperEqualizerButton (self) :
		"""
		Add a wx.Button to `self.panel` that will be binded to method `self.AmplitudePhaseEqualizer`
		"""
		self.pulse_shaper_ampl_phase_equalizer_button = wx.Button (self.panel, label="Pulse shaper equalizer...")
		self.Bind (wx.EVT_BUTTON, self.OpenPulseShaperEqualizer, self.pulse_shaper_ampl_phase_equalizer_button)
		return self.pulse_shaper_ampl_phase_equalizer_button

	def OpenPulseShaperEqualizer (self, event) :
		"""
		Start amplitude phase shaper equalizer
		"""
		self.PulseShaper.StopDevice()
		# Initiate pulse shaper
		if self.PulseShaper.Initialize( self.SettingsNotebook.PulseShaper.GetSettings() ) == RETURN_FAIL : return
		# Open a separate window
		PulseShaperEqualizer(self.PulseShaper).start()
		# Start spectrometer, if the corresponding button is added
		try : self.InteractivelyMeasureSpectrum(self.show_spectrum_button)
		except AttributeError : pass

	#######################################################################################

	def CreateRandomPhaseButton (self) :
		"""
		Add a wx.Button to `self.panel` that will be binded to method `self.SetRandomPhase`
		"""
		self.set_random_phase_button = wx.Button (self.panel, label="Set random phase")
		self.Bind (wx.EVT_BUTTON, self.SetRandomPhase, self.set_random_phase_button)
		return self.set_random_phase_button

	def SetRandomPhase (self, event) :
		"""
		Send random phase to the pulse shaper
		"""
		self.PulseShaper.StopDevice()
		# Initiate pulse shaper
		if self.PulseShaper.Initialize( self.SettingsNotebook.PulseShaper.GetSettings() ) == RETURN_FAIL : return
		# Get number of logical pixels
		param_num = self.PulseShaper.GetParamNumber()
		# Set random phase
		self.PulseShaper.SetAmplPhase( np.ones(param_num), np.random.rand(param_num) )

	#######################################################################################

	def CreateRandomAmplitudeButton (self) :
		"""
		Add a wx.Button to `self.panel` that will be binded to method `self.SetRandomAmplitude`
		"""
		self.set_random_ampl_button = wx.Button (self.panel, label="Set random amplitude")
		self.Bind (wx.EVT_BUTTON, self.SetRandomAmplitude, self.set_random_ampl_button)
		return self.set_random_ampl_button

	def SetRandomAmplitude (self, event) :
		"""
		Send random amplitude to the pulse shaper
		"""
		self.PulseShaper.StopDevice()
		# Initiate pulse shaper
		if self.PulseShaper.Initialize( self.SettingsNotebook.PulseShaper.GetSettings() ) == RETURN_FAIL : return
		# Get number of logical pixels
		param_num = self.PulseShaper.GetParamNumber()
		# Set random amplitude
		self.PulseShaper.SetAmplPhase( np.random.rand(param_num), np.zeros(param_num) )

	#######################################################################################

	def CreateZeroAmplitudeButton (self) :
		"""
		Add a wx.Button to `self.panel` that will be binded to method `self.SetZeroAmplitude`
		"""
		self.set_zero_ampl_button = wx.Button (self.panel, label="Set zero amplitudes")
		self.Bind (wx.EVT_BUTTON, self.SetZeroAmplitude, self.set_zero_ampl_button)
		return self.set_zero_ampl_button

	def SetZeroAmplitude (self, event) :
		"""
		Set zeros values of amplitude
		"""
		self.PulseShaper.StopDevice()
		# Initiate pulse shaper
		if self.PulseShaper.Initialize( self.SettingsNotebook.PulseShaper.GetSettings() ) == RETURN_FAIL : return
		# Get number of logical pixels
		param_num = self.PulseShaper.GetParamNumber()
		# Set random amplitude
		self.PulseShaper.SetAmplPhase( np.zeros(param_num), np.zeros(param_num) )


text:
namespace Sequin.Core.Infrastructure
{
    using System.Collections.Generic;

    public interface IHandlerFactory
    {
        ICollection<IHandler<T>> GetForCommand<T>();
    }
}


text:
var exec = require('cordova/exec');

module.exports = {

    /**
     * Returns the version name (or "Unknown" if it fails)
     *
     * @param {Function} callback       The message to accept the version name.
     */
    getVersion: function(callback) {
        exec(callback, function(err) {
        	callback('Unknown');
    	}, 'AppInfo', 'getVersion', []);
    },

    /**
     * Returns the package identifier (or "Unknown" if it fails)
     *
     * @param {Function} callback       The message to accept the identifier.
     */
    getIdentifier: function(callback){
        exec(callback, function(err){
            callback('Unknown');
        }, 'AppInfo', 'getIdentifier', []);
    }
};


text:
package com.aerolitec.SMXL.tools.serverConnexion;

import com.aerolitec.SMXL.model.MainUser;
import com.aerolitec.SMXL.model.User;

/**
 * Created by Clement on 5/27/2015.
 */
public interface LoginCreateAccountInterface {
    void accountRetrieved(MainUser mainUser);
    void accountRetrieved(User user);
    void nonExistingAccount();
    void wrongPassword();
    void serverError(String errorMsg);
    void localError(String errorMsg);
}


text:
package net.bican.iplib;

import java.util.Comparator;

import com.google.common.collect.Range;

class IPAddressRangeComparator implements Comparator<Range<IPAddress>> {

  private final static IPAddressRangeComparator instance = new IPAddressRangeComparator();

  @Override
  public int compare(Range<IPAddress> o1, Range<IPAddress> o2) {
    if (o1.equals(o2)) {
      return 0;
    }
    Range<IPAddress> oo1 = IPAddresses.canonical(o1, o1.lowerEndpoint()
        .getDomain());
    Range<IPAddress> oo2 = IPAddresses.canonical(o2, o2.lowerEndpoint()
        .getDomain());
    return oo1.lowerEndpoint().compareTo(oo2.lowerEndpoint());
  }

  private IPAddressRangeComparator() {
    // forbidden
  }

  public static Comparator<Range<IPAddress>> getComparator() {
    return instance;
  }

}


text:
require 'test_helper'

class ViewHistoryTest < ActiveSupport::TestCase
  # test "the truth" do
  #   assert true
  # end
end


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>SPDI Demo App</title>

    <link rel="stylesheet" href="dist/css/app.min.css">

Contact List App

                Name
                Email
                Number

                {{contact.name}}
                {{contact.email}}
                {{contact.number}}

      {{greeting}}

       Test
       Delete