text:
<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <meta name="description" content="{{ site.description }}" />

  <title>
    {% if page.title %}{{ page.title }} - {{ site.title }}{% else %}{{
      site.title
    }}{% endif %}
  </title>

  <link rel="shortcut icon" href="favicon.ico" />

  <link
    rel="canonical"
    href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}"
  />

  <!-- Bootstrap Core CSS -->
  <link rel="stylesheet" href="{{
    '/css/bootstrap.min.css' | prepend: site.baseurl
  }}">

  <!-- Custom CSS -->
  <link rel="stylesheet" href="{{
    '/css/clean-blog.css' | prepend: site.baseurl
  }}">

  <!-- Pygments Github CSS -->
  <link rel="stylesheet" href="{{
    '/css/syntax.css' | prepend: site.baseurl
  }}">

  <!-- Custom Fonts -->
  <link
    href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"
    rel="stylesheet"
    type="text/css"
  />
  <link
    href="//fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic"
    rel="stylesheet"
    type="text/css"
  />
  <link
    href="//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800"
    rel="stylesheet"
    type="text/css"
  />

<!-- GrowingIO Analytics code version 2.1 -->
<!-- Copyright 2015-2018 GrowingIO, Inc. More info available at http://www.growingio.com -->

<script type='text/javascript'>
  !function (e, t, n, g, i) { e[i] = e[i] || function () { (e[i].q = e[i].q || []).push(arguments) }, n = t.createElement("script"), tag = t.getElementsByTagName("script")[0], n.async = 1, n.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + g, tag.parentNode.insertBefore(n, tag) }(window, document, "script", "assets.giocdn.com/2.1/gio.js", "gio");
  gio('init', 'a200f4e8fce7fe7e', {});

  //custom page code begin here

  //custom page code end here

  gio('send');

</script>

<!-- End GrowingIO Analytics code version: 2.1 -->

  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
  <![endif]-->

  {% feed_meta %}
</head>


text:
package com.intellij.ui.popup;

import com.intellij.ide.IdeEventQueue;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.application.ex.ApplicationManagerEx;
import com.intellij.openapi.ui.popup.IdePopupEventDispatcher;
import com.intellij.openapi.ui.popup.JBPopup;
import com.intellij.openapi.util.Disposer;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;
import java.awt.*;
import java.awt.event.AWTEventListener;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import java.util.stream.Stream;

public class PopupDispatcher implements AWTEventListener, KeyEventDispatcher, IdePopupEventDispatcher {

  private static WizardPopup ourActiveWizardRoot;
  private static WizardPopup ourShowingStep;

  private static final PopupDispatcher ourInstance = new PopupDispatcher();

  static {
    if (System.getProperty("is.popup.test") != null ||
      (ApplicationManagerEx.getApplicationEx() != null && ApplicationManagerEx.getApplicationEx().isUnitTestMode())) {
      Toolkit.getDefaultToolkit().addAWTEventListener(ourInstance, MouseEvent.MOUSE_PRESSED);
      KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(ourInstance);
    }
  }

  private PopupDispatcher() {
  }

  public static PopupDispatcher getInstance() {
    return ourInstance;
  }

  public static void setActiveRoot(WizardPopup aRootPopup) {
    disposeActiveWizard();
    ourActiveWizardRoot = aRootPopup;
    ourShowingStep = aRootPopup;
    if (ApplicationManager.getApplication() != null) {
      IdeEventQueue.getInstance().getPopupManager().push(ourInstance);
    }
  }

  public static void clearRootIfNeeded(WizardPopup aRootPopup) {
    if (ourActiveWizardRoot == aRootPopup) {
      ourActiveWizardRoot = null;
      ourShowingStep = null;
      if (ApplicationManager.getApplication() != null) {
        IdeEventQueue.getInstance().getPopupManager().remove(ourInstance);
      }
    }
  }

  public void eventDispatched(AWTEvent event) {
    dispatchMouseEvent(event);
  }

  private boolean dispatchMouseEvent(AWTEvent event) {
    if (event.getID() != MouseEvent.MOUSE_PRESSED) {
      return false;
    }

    if (ourShowingStep == null) {
      return false;
    }

    WizardPopup eachParent = ourShowingStep;
    final MouseEvent mouseEvent = ((MouseEvent) event);

    Point point = (Point) mouseEvent.getPoint().clone();
    SwingUtilities.convertPointToScreen(point, mouseEvent.getComponent());

    while (true) {
      JComponent content = eachParent.getContent();
      if (content == null || !content.isShowing()) {
        getActiveRoot().cancel();
        return false;
      }

      if (eachParent.getBounds().contains(point) || !eachParent.canClose()) {
        return false;
      }

      eachParent = eachParent.getParent();
      if (eachParent == null) {
        getActiveRoot().cancel();
        return false;
      }
    }
  }

  public static boolean disposeActiveWizard() {
    if (ourActiveWizardRoot != null) {
      ourActiveWizardRoot.disposeChildren();
      Disposer.dispose(ourActiveWizardRoot);
      return true;
    }

    return false;
  }

  public boolean dispatchKeyEvent(final KeyEvent e) {
    if (ourShowingStep == null) {
      return false;
    }
    return ourShowingStep.dispatch(e);
  }

  public static void setShowing(WizardPopup aBaseWizardPopup) {
    ourShowingStep = aBaseWizardPopup;
  }

  public static void unsetShowing(WizardPopup aBaseWizardPopup) {
    if (ourActiveWizardRoot != null) {
      for (WizardPopup wp = aBaseWizardPopup; wp != null; wp = wp.getParent()) {
        if (wp == ourActiveWizardRoot) {
          ourShowingStep = aBaseWizardPopup.getParent();
          return;
        }
      }
    }
   }

  public static WizardPopup getActiveRoot() {
    return ourActiveWizardRoot;
  }

  public Component getComponent() {
    return ourShowingStep != null ? ourShowingStep.getContent() : null;
  }

  @Nullable
  @Override
  public Stream<JBPopup> getPopupStream() {
    return Stream.of(ourActiveWizardRoot);
  }

  public boolean dispatch(AWTEvent event) {
   if (event instanceof KeyEvent) {
      return dispatchKeyEvent(((KeyEvent) event));
   } else if (event instanceof MouseEvent) {
     return dispatchMouseEvent(event);
   } else {
     return false;
   }
  }

  public boolean requestFocus() {
    if (ourShowingStep != null) {
      ourShowingStep.requestFocus();
    }

    return true;
  }

  public boolean close() {
    return disposeActiveWizard();
  }

  @Override
  public void setRestoreFocusSilentely() {}
}

redpajama_set_name: RedPajamaGithub


text:
//*********************************************************
//
// Copyright (c) Microsoft. All rights reserved.
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************

//
// AuthByBackgroundTask.xaml.h
// Declaration of the AuthByBackgroundTask class
//

#pragma once

#include "pch.h"
#include "AuthByBackgroundTask.g.h"
#include "MainPage.xaml.h"

namespace SDKSample
{
    namespace HotspotAuthenticationApp
    {
        [Windows::Foundation::Metadata::WebHostHidden]
        public ref class AuthByBackgroundTask sealed
        {
        public:
            AuthByBackgroundTask();

        protected:
            virtual void OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs^ e) override;
        private:
        };
    }
}


text:
// <copyright file="DBPA.cs" company="DATALINE GmbH & Co. KG">
// Copyright (c) DATALINE GmbH & Co. KG. All rights reserved.
// </copyright>

namespace SocialInsurance.Germany.Messages.Pocos
{
    /// <summary>
    /// Datenbaustein: DBPA - Abweichende Postanschrift
    /// <para />
    /// Gültig ab 01.07.2019
    /// </summary>
    public class DBPA : IDatenbaustein
    {
        /// <summary>
        /// Initialisiert eine neue Instanz der <see cref="DBPA"/> Klasse
        /// </summary>
        public DBPA()
        {
            KE = "DBPA";
        }

        /// <summary>
        /// Holt oder setzt die Kennung
        /// </summary>
        /// <remarks>
        /// Kennung, um welchen Datenbaustein es sich handelt
        /// </remarks>
        public string KE { get; set; }

        /// <summary>
        /// Holt oder setzt den Name - Teil 1
        /// <para />
        /// Die Grundstellung (Leerzeichen) ist nur zulässig, wenn im Feld KENNZLPA der Wert "L" angegeben ist.
        /// </summary>
        /// <remarks>
        /// Name / Bezeichnung - Teil 1, Länge 30, Mussangabe unter Bedingungen
        /// </remarks>
        public string NAMEPA1 { get; set; }

        /// <summary>
        /// Holt oder setzt den Name - Teil 2
        /// </summary>
        /// <remarks>
        /// Name / Bezeichnung - Teil 2, Länge 30, Pflichtangabe, soweit bekannt
        /// </remarks>
        public string NAMEPA2 { get; set; }

        /// <summary>
        /// Holt oder setzt den Name - Teil 3
        /// </summary>
        /// <remarks>
        /// Name / Bezeichnung - Teil 3, Länge 30, Pflichtangabe, soweit bekannt
        /// </remarks>
        public string NAMEPA3 { get; set; }

        /// <summary>
        /// Holt oder setzt die Postleitzahl
        /// <para />
        /// Die Grundstellung (Leerzeichen) ist nur zulässig, wenn im Feld KENNZLPA der Wert "L" angegeben ist.
        /// </summary>
        /// <remarks>
        /// Postleitzahl(zustellbezogen)(5 Stellen numerisch linksbündig mit nachfolgenden Leerzeichen), Länge 10, Mussangabe unter Bedingungen
        /// </remarks>
        public string PLZPA { get; set; }

        /// <summary>
        /// Holt oder setzt den Ort
        /// <para />
        /// Die Grundstellung (Leerzeichen) ist nur zulässig, wenn im Feld KENNZLPA der Wert "L" angegeben ist.
        /// </summary>
        /// <remarks>
        /// Ort, Länge 34, Mussangabe unter Bedingungen
        /// </remarks>
        public string ORTPA { get; set; }

        /// <summary>
        /// Holt oder setzt die Straße
        /// </summary>
        /// <remarks>
        /// Straße, Länge 33, Pflichtangabe, soweit bekannt
        /// </remarks>
        public string STRPA { get; set; }

        /// <summary>
        /// Holt oder setzt die Hausnummer
        /// </summary>
        /// <remarks>
        /// Hausnummer, Länge 9, Pflichtangabe, soweit bekannt
        /// Hinweis: Wenn die Hausnummer nicht separat abgelegt werden kann, ist es zulässig, die Hausnummer in das
        /// Feld Straße zu übernehmen. In solchen Fällen muss dann das Feld Hausnummer auf Grundstellung (Leerzeichen) stehen.
        /// </remarks>
        public string HNRPA { get; set; }

        /// <summary>
        /// Holt oder setzt die Postleitzahl - Postfach
        /// </summary>
        /// <remarks>
        /// Postleitzahl(postfachbezogen) (5 Stellen numerisch linksbündig mit nachfolgenden Leerzeichen), Länge 10, Pflichtangabe, soweit bekannt
        /// </remarks>
        public string PLZPO { get; set; }

        /// <summary>
        /// Holt oder setzt das Postfach
        /// </summary>
        /// <remarks>
        /// Postfach, Länge 10, Pflichtangabe, soweit bekannt
        /// </remarks>
        public string POSTFACH { get; set; }

        /// <summary>
        /// Länderkennzeichen gemäß Anlage 8 (nur bei ausländischen Anschriften)
        /// </summary>
        /// <remarks>
        /// Länge 3, Mussangabe unter Bedingungen
        /// </remarks>
        public string LDKZPA { get; set; }

        /// <summary>
        /// Kennzeichen, ob die abweichende Postanschrift in der Datei der Beschäftigungsbetriebe gelöscht werden soll
        /// <para />
        /// Grundstellung (<see langword="null"/>) - keine Löschung;
        /// L - Löschung
        /// </summary>
        public string KENNZLPA { get; set; }
    }
}


text: {{ song.name }}


text:
using System;
using System.Linq;

namespace LessonsSamples.Lesson7.CohesionCoupling
{
    public interface IRepository
    {
        IQueryable<TDbEntity> GetEntities<TDbEntity>() where TDbEntity : class;
        IUnitOfWork CreateUnitOfWork();
    }

    public interface IUnitOfWork : IRepository, IDisposable
    {
        void SaveChanges();

        void Add<T>(T entity) where T : class;

        void Delete<T>(T entity) where T : class;
    }
}


text:
import { method } from "lodash";
export default method;


text:
module OpenTelemetry
  module SDK
    # The Experimental module contains experimental extensions to the OpenTelemetry reference
    # implementation.
    module Experimental
    end
  end
end

require 'opentelemetry/sdk/experimental/samplers_patch'
require 'opentelemetry/sdk/trace/propagation/trace_context/response_text_map_propagator'


text:
class GraphQL::StaticValidation::ArgumentsAreDefined < GraphQL::StaticValidation::ArgumentsValidator
  def validate_node(node, defn, context)
    node.arguments.each do |argument|
      argument_defn = defn.arguments[argument.name]
      if argument_defn.nil?
        context.errors << message("#{node.class.name.split("::").last} '#{node.name}' doesn't accept argument #{argument.name}", node)
      end
    end
  end
end


text:
package org.p7h.storm.offline.wordcount.bolts;

import backtype.storm.topology.BasicOutputCollector;
import backtype.storm.topology.OutputFieldsDeclarer;
import backtype.storm.topology.base.BaseBasicBolt;
import backtype.storm.tuple.Fields;
import backtype.storm.tuple.Tuple;
import backtype.storm.tuple.Values;

public final class SplitSentenceBolt extends BaseBasicBolt {

	private static final long serialVersionUID = 3077170245322026396L;

	@Override
	public final void execute(final Tuple input, final BasicOutputCollector collector) {
		//final String sentence = input.getString(0);
		final String sentence = (String) input.getValueByField("sentence");
		for (final String word : sentence.split(" ")) {
			collector.emit(new Values(word));
		}
	}

	@Override
	public final void declareOutputFields(final OutputFieldsDeclarer outputFieldsDeclarer) {
		outputFieldsDeclarer.declare(new Fields("word"));
	}
}


text:
package ash.lang;

import ash.util.JavaUtils;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

// TODO : make more efficient
public class PersistentMap<K, V> implements Serializable, Iterable<Entry<K, V>> {
	private static final long serialVersionUID = -434275790068739365L;
	private static final char HASH_MAP_START = '{', HASH_MAP_END = '}';
	private final Map<K, V> map;

	public PersistentMap() {
		this(new HashMap<K, V>());
	}

	public PersistentMap(Map<K, V> initMap) {
		map = initMap;
	}

	public PersistentMap(List<?> initVal) {
		this(initVal.toArray());
	}

	@SuppressWarnings("unchecked")
	public PersistentMap(Object... initVal) {
		this();
		for (int i = 0; i < initVal.length; i += 2) {
			map.put((K) initVal[i], (V) initVal[i + 1]);
		}
	}

	public boolean containsKey(K key) {
		return map.containsKey(key);
	}

	public boolean containsValue(V value) {
		return map.containsValue(value);
	}

	public PersistentCollection<Map.Entry<K, V>> entrySet() {
		return new PersistentSet<Entry<K, V>>(map.entrySet());
	}

	public V get(K key) {
		return map.get(key);
	}

	public boolean isEmpty() {
		return map.isEmpty();
	}

	public PersistentSet<K> keySet() {
		return new PersistentSet<K>(map.keySet());
	}

	public PersistentMap<K, V> assoc(K key, V value) {
		Map<K, V> newMap = new HashMap<>(map);
		newMap.put(key, value);
		return new PersistentMap<K, V>(newMap);
	}

	public PersistentMap<K, V> merge(PersistentMap<? extends K, ? extends V> m) {
		Map<K, V> newMap = new HashMap<K, V>(map);
		newMap.putAll(m.map);
		return new PersistentMap<K, V>(newMap);
	}

	public PersistentMap<K, V> dissoc(K key) {
		Map<K, V> newMap = new HashMap<>(map);
		newMap.remove(key);
		return new PersistentMap<K, V>(newMap);
	}

	public int size() {
		return map.size();
	}

	public PersistentVector<V> values() {
		return new PersistentVector<V>(map.values());
	}

	@Override
	public int hashCode() {
		return 31 + ((map == null) ? 0 : map.hashCode());
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) return true;
		if (obj == null) return false;
		if (getClass() != obj.getClass()) return false;
		PersistentMap<?, ?> other = (PersistentMap<?, ?>) obj;
		if (map == null) {
			if (other.map != null)
				return false;
		} else if (!map.equals(other.map))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return JavaUtils.buildString(HASH_MAP_START,
                PersistentList.cast(this).innerToString(),
                HASH_MAP_END);
	}

	@Override
	public Iterator<Entry<K, V>> iterator() {
		return new Iterator<Entry<K, V>>() {
			Iterator<Entry<K, V>> origin = map.entrySet().iterator();

			@Override
			public boolean hasNext() { return origin.hasNext(); }

			@Override
			public PersistentEntry<K, V> next() {
				return new PersistentEntry<>(origin.next());
			}

			@Override
			public void remove() { throw new UnsupportedOperationException(); }
		};
	}

	static class PersistentEntry<K, V> implements Entry<K, V> {
		private Entry<K, V> entry;

		public PersistentEntry(Entry<K, V> mapEntry) { entry = mapEntry; }

		@Override
		public K getKey() { return entry.getKey(); }

		@Override
		public V getValue() { return entry.getValue(); }

		@Override
		public V setValue(V value) {
			throw new UnsupportedOperationException();
		}

		@Override
		public int hashCode() {
			return 31 + ((entry == null) ? 0 : entry.hashCode());
		}

		@Override
		public boolean equals(Object obj) {
			if (this == obj) return true;
			if (obj == null) return false;
			if (getClass() != obj.getClass()) return false;
			PersistentEntry<?, ?> other = (PersistentEntry<?, ?>) obj;
			if (entry == null) {
				if (other.entry != null)
					return false;
			} else if (!entry.equals(other.entry))
				return false;
			return true;
		}

		@Override
		public String toString() {
			return JavaUtils.buildString(BasicType.asString(getKey()),
					' ', BasicType.asString(getValue()));
		}
	}
}


text:
#pragma once
#include <aws/athena/Athena_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>

namespace Aws
{
namespace Utils
{
namespace Json
{
  class JsonValue;
  class JsonView;
} // namespace Json
} // namespace Utils
namespace Athena
{
namespace Model
{

  /**
   *
A piece of data (a field in the table).

See Also:
   AWS API
   * Reference

   */
  class AWS_ATHENA_API Datum
  {
  public:
    Datum();
    Datum(Aws::Utils::Json::JsonView jsonValue);
    Datum& operator=(Aws::Utils::Json::JsonView jsonValue);
    Aws::Utils::Json::JsonValue Jsonize() const;

    /**
     *
The value of the datum.

     */
    inline const Aws::String& GetVarCharValue() const{ return m_varCharValue; }

    /**
     *
The value of the datum.

     */
    inline bool VarCharValueHasBeenSet() const { return m_varCharValueHasBeenSet; }

    /**
     *
The value of the datum.

     */
    inline void SetVarCharValue(const Aws::String& value) { m_varCharValueHasBeenSet = true; m_varCharValue = value; }

    /**
     *
The value of the datum.

     */
    inline void SetVarCharValue(Aws::String&& value) { m_varCharValueHasBeenSet = true; m_varCharValue = std::move(value); }

    /**
     *
The value of the datum.

     */
    inline void SetVarCharValue(const char* value) { m_varCharValueHasBeenSet = true; m_varCharValue.assign(value); }

    /**
     *
The value of the datum.

     */
    inline Datum& WithVarCharValue(const Aws::String& value) { SetVarCharValue(value); return *this;}

    /**
     *
The value of the datum.

     */
    inline Datum& WithVarCharValue(Aws::String&& value) { SetVarCharValue(std::move(value)); return *this;}

    /**
     *
The value of the datum.

     */
    inline Datum& WithVarCharValue(const char* value) { SetVarCharValue(value); return *this;}

  private:

    Aws::String m_varCharValue;
    bool m_varCharValueHasBeenSet;
  };

} // namespace Model
} // namespace Athena
} // namespace Aws


text:
package bt.adapt;

import jnibwapi.types.OrderType;
import jnibwapi.types.OrderType.OrderTypes;

import com.thoughtworks.xstream.converters.Converter;
import com.thoughtworks.xstream.converters.MarshallingContext;
import com.thoughtworks.xstream.converters.UnmarshallingContext;
import com.thoughtworks.xstream.io.HierarchicalStreamReader;
import com.thoughtworks.xstream.io.HierarchicalStreamWriter;

public class OrderTypeConverter implements Converter {

	@Override
	public boolean canConvert(@SuppressWarnings("rawtypes") Class type) {
		return type.equals(OrderType.class);
	}

	@Override
	public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context) {
		OrderType t = (OrderType)source;
		writer.addAttribute("orderTypeId", String.valueOf(t.getID()));
	}

	@Override
	public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {
		int id = Integer.parseInt(reader.getAttribute("orderTypeId"));
		OrderType t = OrderTypes.getOrderType(id);
		return t;
	}

}


text:
An [openaps](https://github.com/openaps/openaps) plugin for cleaning, condensing, and reformatting medtronic history data

[![Build Status](https://travis-ci.org/loudnate/openaps-mmhistorytools.svg)](https://travis-ci.org/loudnate/openaps-mmhistorytools)

## Motivation
Pump history records are optimized for storage, and not necessarily for analysis. They are a mix of mutable (`Bolus`) and immutable (`TempBasalDuration`) values. They require additional context to interpret important events, like whether a square bolus is still in delivery or whether it was cancelled, and how much basal insulin was lost during a `PumpSuspend` window.

Interpreting recent historical events is a foundational component in any [openaps](https://github.com/openaps/openaps) project, and this plugin aspires to be a central place for documenting and testing the intricacies of that task.

The `mmhistorytools` plugin vends multiple commands. Each command does a single pass over a set of history and is intentionally limited in scope, prioritizing testability above performance.

## Getting started
### Installing from pypi

```bash
$ sudo easy_install openapscontrib.mmhistorytools
```

### Installing from source for development
Clone the repository and link via setuptools:
```bash
$ python setup.py develop
```

### Adding to your openaps project
```bash
$ openaps vendor add openapscontrib.mmhistorytools
$ openaps device add history mmhistorytools
```

## Usage
Use the device help menu to see available commands.
```bash
$ openaps use history -h
usage: openaps-use history [-h] USAGE ...

optional arguments:
  -h, --help  show this help message and exit

## Device history:
  vendor openapscontrib.mmhistorytools

  mmhistorytools - tools for cleaning, condensing, and reformatting history data

  USAGE       Usage Details
    trim      Trims a sequence of pump history to a specified time window
    clean     Resolve inconsistencies from a sequence of pump history
    reconcile
              Reconcile record dependencies from a sequence of pump history
    resolve   Converts events in a sequence of pump history to generalized
              record types
    normalize
              Adjusts the time and amount of records relative to a basal
              schedule and a timestamp
```

Use the command help menu to see available arguments.
```bash
$ openaps use history clean -h
usage: openaps-use history clean [-h] [--start START] [--end END] [infile]

Resolve inconsistencies from a sequence of pump history

positional arguments:
  infile         JSON-encoded history data

optional arguments:
  -h, --help     show this help message and exit
  --start START  The initial timestamp of the known window, used to simulate
                 missing suspend/resume events
  --end END      The final timestamp of the history window, used to simulate
                 missing suspend/resume events

Tasks performed by this pass:
 - De-duplicates BolusWizard records
 - Creates PumpSuspend and PumpResume records to complete missing pairs
```

## Examples

Add a report flow to process pump history for analysis:
```
$ openaps report add clean_history.json JSON history clean pump_history.json
$ openaps report add reconciled_history.json JSON history reconcile clean_history.json
$ openaps report add resolved_history.json JSON history resolve reconciled_history.json
$ openaps report add normalized_history.json JSON history normalize resolved_history.json --basal-profile basal.json
```

This common flow is also available with the `prepare` command shortcut:
```
$ openaps report add prepared_history.json JSON history prepare pump_history.json --basal-profile basal.json
```

All `infile` arguments default to accept stdin, so commands can be chained to simplify testing:
```bash
$ openaps use pump iter_pump_hours 4 | openaps use history clean | openaps use history reconcile | openaps use history resolve | openaps use history normalize --basal-profile basal.json
```

## Contributing
Contributions are welcome and encouraged in the form of bugs and pull requests.

### Testing

 Unit tests can be run manually via setuptools. This is also handled by TravisCI after opening a pull request.

 ```bash
 $ python setup.py test
 ```


text:
package algo.util;

public class TypeObject
{
	private String type;
	private long index;

	private byte byteValue;
	private int integerValue;
	private short shortValue;
	private long longValue;
	private String stringValue;

	// declare rest types

	public String getType()
	{
		return type;
	}

	public void setType(String type) //  do we need it ???
	{
		this.type = type;
	}

	public long getIndex()
    {
		return index;
	}

	public void setIndex(long index)
	{
		this.index = index;
	}

	public TypeObject()
	{

	}

	public byte getByteValue()
	{
		return byteValue;
	}

	public void setByteValue(byte byteValue)
	{
		this.byteValue = byteValue;
	}

	public short getShortValue()
	{
		return shortValue;
	}

	public void setShortValue(short shortValue)
	{
		this.shortValue = shortValue;
	}

	public TypeObject(int integerValue)
	{
		this.integerValue = integerValue;
	}

	public TypeObject(String stringValue)
	{
		this.stringValue = stringValue;
	}

	public int getIntegerValue()
	{
		return integerValue;
	}

	public void setIntegerValue(int integerValue)
	{
		this.integerValue = integerValue;
	}

	public long getLongValue()
	{
		return longValue;
	}

	public void setLongValue(long longValue)
	{
		this.longValue = longValue;
	}

	public String getStringValue()
	{
		return stringValue;
	}

	public void setStringValue(String stringValue)
	{
		this.stringValue = stringValue;
	}

}


text:
<?php
$translations = array(
	'General_Locale' => 'hr_HR.UTF-8',
	'General_TranslatorName' => 'Tomislav Ribičić, Mirko Lednicki',
	'General_TranslatorEmail' => 'riba@ml1.net, mirko@domidona.com',
	'General_EnglishLanguageName' => 'Croatian',
	'General_OriginalLanguageName' => 'Hrvatski',
	'General_LayoutDirection' => 'ltr',
	'General_HelloUser' => 'Pozdrav %s!',
	'General_OpenSourceWebAnalytics' => 'Open source web analitika',
	'General_Dashboard' => 'Upravljačka ploča',
	'General_DashboardForASpecificWebsite' => 'Upravljačka ploča za određenu stranicu',
	'General_MultiSitesSummary' => 'Sve stranice',
	'General_AllWebsitesDashboard' => 'Upravljačka ploča za sve stranice',
	'General_API' => 'API',
	'General_Widgets' => 'Widgeti',
	'General_Settings' => 'Postavke',
	'General_GiveUsYourFeedback' => 'Pošaljite nam povratne informacije!',
	'General_Unknown' => 'Nepoznato',
	'General_Never' => 'Nikada',
	'General_Required' => '%s je obavezno',
	'General_NotValid' => '%s nije valjano',
	'General_NotDefined' => '%s nije određeno',
	'General_Id' => 'Oznaka',
	'General_Error' => 'Greška',
	'General_Warning' => 'Upozorenje',
	'General_BackToHomepage' => 'Povratak na Piwik stranicu',
	'General_Yes' => 'Da',
	'General_No' => 'Ne',
	'General_Delete' => 'Obriši',
	'General_Report' => 'Izvještaj',
	'General_Reports' => 'Izvještaji',
	'General_Edit' => 'Izmijeni',
	'General_Download' => 'Skini',
	'General_Upload' => 'Pošalji',
	'General_Ok' => 'U redu',
	'General_Close' => 'Zatvori',
	'General_OrCancel' => 'ili %s odustani %s',
	'General_Logout' => 'Odjavi se',
	'General_Username' => 'Korisničko ime',
	'General_Description' => 'Opis',
	'General_Done' => 'Završeno',
	'General_PoweredBy' => 'Pogoni',
	'General_Name' => 'Ime',
	'General_Value' => 'Vrijednost',
	'General_Total' => 'Ukupno',
	'General_AverageOrderValue' => 'Prosječna vrijednost narudžbe',
	'General_PurchasedProducts' => 'Kupljeni proizvodi',
	'General_EcommerceOrders' => 'Ecommerce narudžbe',
	'General_AbandonedCarts' => 'Napuštene košarice',
	'General_TotalRevenue' => 'Ukupan prihod',
	'General_ProductRevenue' => 'Prihod za proizvod',
	'General_AveragePrice' => 'Prosječna cijena',
	'General_AverageQuantity' => 'Prosječna količina',
	'General_UniquePurchases' => 'Jedinstvene kupovine',
	'General_ProductConversionRate' => 'Stupanj konverzije za proizvoda',
	'General_Quantity' => 'Količina',
	'General_Price' => 'Cijena',
	'General_Subtotal' => 'Međuzbroj',
	'General_Tax' => 'Porez',
	'General_Shipping' => 'Poštarina',
	'General_Discount' => 'Popust',
	'General_Details' => 'Detaljnije',
	'General_Default' => 'Pretpostavljeno',
	'General_Visit' => 'Posjeta',
	'General_FromReferrer' => 'od',
	'General_VisitorIP' => 'IP adresa posjetitelja',
	'General_VisitorID' => 'Oznaka posjetitelja',
	'General_VisitType' => 'Vrsta posjetitelja',
	'General_VisitTypeExample' => 'Na primjer, za biranje svih posjetitelja koji su se vratili na stranicu, uključujući i one koji su pri prošloj posjeti nešto i kupili, API zahtjev treba sadržavati %s',
	'General_DaysSinceLastVisit' => 'Dana od prošle posjete',
	'General_DaysSinceFirstVisit' => 'Dana od prve posjete',
	'General_DaysSinceLastEcommerceOrder' => 'Dana od posljednje Ecommerce narudžbe',
	'General_NumberOfVisits' => 'Broj posjeta',
	'General_VisitConvertedGoal' => 'Broj posjeta kojim je ostvaren barem jedan od ciljeva',
	'General_VisitConvertedGoalId' => 'Broj posjeta kojim je ostvaren određeni cilj',
	'General_VisitConvertedNGoals' => 'Provjeri ostvarene %s ciljeve',
	'General_NewVisitor' => 'Novi posjetitelj',
	'General_ReturningVisitor' => 'Redovni posjetitelj',
	'General_Visitor' => 'Posjetitelj',
	'General_Date' => 'Datum',
	'General_Period' => 'Razdoblje',
	'General_ChooseDate' => 'Odaberi datum',
	'General_Today' => 'Danas',
	'General_Yesterday' => 'Jučer',
	'General_CurrentWeek' => 'Tekući tjedan',
	'General_CurrentMonth' => 'Tekući mjesec',
	'General_CurrentYear' => 'Tekuća godina',
	'General_DateRange' => 'Vremenski raspon:',
	'General_DateRangeInPeriodList' => 'Vremenski raspon',
	'General_DateRangeFromTo' => 'Od %s do %s',
	'General_ApplyDateRange' => 'Odredi vremenski raspon',
	'General_InvalidDateRange_js' => 'Neispravan vremenski raspon, pokušaj opet',
	'General_DateRangeFrom_js' => 'Od',
	'General_DateRangeTo_js' => 'Do',
	'General_PreviousDays' => 'Prethodnih %s dana (ne računajući danas)',
	'General_LastDays' => 'Zadnjih %s dana (računajući i danas)',
	'General_LoadingData' => 'Učitavam podatke...',
	'General_Loading_js' => 'Učitavanje u tijeku...',
	'General_GoTo' => 'Idi na %s',
	'General_Next' => 'Sljedeće',
	'General_Previous' => 'Prethodno',
	'General_First' => 'Početak',
	'General_Search' => 'Pretraga',
	'General_Others' => 'Ostali',
	'General_Table' => 'Tablica',
	'General_Piechart' => 'Pita',
	'General_TagCloud' => 'Oblak sa oznakama',
	'General_VBarGraph' => 'Uspravni graf',
	'General_OpenInNewWindow_js' => 'Otvori u novom prozoru',
	'General_SaveImageOnYourComputer_js' => 'Za spremanje slike na vaše računalo koristite desni klik na sliku i odaberite opciju za spremanje slike.',
	'General_Refresh' => 'Osvježi stranicu',
	'General_Visitors' => 'Posjetitelji',
	'General_ExportThisReport' => 'Izvezi ovaj zbir podataka u drugim oblicima',
	'General_ExportAsImage_js' => 'Izvezi kao sliku',
	'General_Export' => 'Izvezi',
	'General_YourChangesHaveBeenSaved' => 'Tvoje su izmjene spremljene',
	'General_ErrorRequest' => 'Ups... došlo je do problema pri zahtjevu, pokušaj nanovo.',
	'General_ColumnNbUniqVisitors' => 'Jedinstveni posjetitelji',
	'General_ColumnNbUniqVisitorsDocumentation' => 'Broj jedinstvenih posjetitelja na vašoj web stranici. Svaki se korisnik broji jednom, čak i u slučaju kada posjeti web stranicu više puta dnevno.',
	'General_ColumnNbVisits' => 'Posjeta',
	'General_ColumnNbVisitsDocumentation' => 'Ako posjetitelj dođe na vašu web stranicu po prvi put ili ako posjeti stranicu više od 30 minuta nakon svoje posljednje posjete, to će se računati kao novi posjet',
	'General_ColumnPercentageVisits' => '% Posjeta',
	'General_ColumnNbActions' => 'Radnje',
	'General_ColumnNbActionsDocumentation' => 'Broj radnji koje su izvršili vaši posjetitelji. Radnje mogu biti otvaranje stranica, skidanje datoteka ili klik na izlazni link.',
	'General_NbActions' => 'Broj radnji',
	'General_ColumnMaxActions' => 'Maksimalan broj radnji za vrijeme jedne posjete',
	'General_ColumnSumVisitLength' => 'Ukupno vrijeme koje su posjetitelji proveli na stranici (u sekundama)',
	'General_ColumnLabel' => 'Oznaka',
	'General_ColumnConversionRate' => 'Stupanj konverzije',
	'General_ColumnConversionRateDocumentation' => 'Postotak posjeta koje su ostvarile postavljene ciljeve',
	'General_ColumnActionsPerVisit' => 'Radnji po posjeti',
	'General_ColumnActionsPerVisitDocumentation' => 'Prosječan broj radnji koje su odrađene za vrijeme posjete',
	'General_VisitDuration' => 'Prosječno trajanje posjete (u sekundama)',
	'General_ColumnAvgTimeOnSite' => 'Prosječno vrijeme provedeno na stranici',
	'General_ColumnAvgTimeOnSiteDocumentation' => 'Prosječno trajanje posjete.',
	'General_ColumnVisitDuration' => 'Trajanje posjete (u sekundama)',
	'General_ColumnBounceRate' => 'Stupanj napuštanja stranice',
	'General_ColumnBounceRateDocumentation' => 'Postotak posjetitelja koji su otvorili samo jednu stranicu. Ovo predstavlja broj posjetitelja koji su otišli nakon otvaranja ulazne stranice.',
	'General_ColumnBounceRateForPageDocumentation' => 'Postotak posjetitelja koji su krenuli i završili na ovoj stranici.',
	'General_ColumnPageBounceRateDocumentation' => 'Postotak posjetitelja koji su krenuli sa ovom stranicom i zatim otišli.',
	'General_ColumnExitRate' => 'Stupanj odlaska',
	'General_ColumnExitRateDocumentation' => 'Postotak posjetitelja koji su napustili stranice nakon pregleda ove lokacije (jedinstven broj pregleda podijeljen za odlascima)',
	'General_ColumnPageviews' => 'Otvaranja',
	'General_ColumnPageviewsDocumentation' => 'Koliko je puta stranica posjećena',
	'General_ColumnUniquePageviews' => 'Jedinstvenih otvaranja',
	'General_ColumnUniquePageviewsDocumentation' => 'Broj posjeta koji su bili i na ovoj stranici. U slučaju da je za vrijeme posjete stranica više puta otvorena, brojena će biti samo jednom.',
	'General_ColumnBounces' => 'Napuštanja',
	'General_ColumnBouncesDocumentation' => 'Broj posjeta koje su stigle i otišle sa ove stranice. Ovo znači da je posjetitelj otišao odmah nakon pregleda ove stranice.',
	'General_ColumnEntrances' => 'Ulaza',
	'General_ColumnEntrancesDocumentation' => 'Broj posjetitelja koji su započeli sa ovom stranicom',
	'General_ColumnExits' => 'Izlaza',
	'General_ColumnExitsDocumentation' => 'Broj posjetitelja koji su završili sa ovom stranicom',
	'General_ColumnAverageTimeOnPage' => 'Prosječno vrijeme na stranici',
	'General_ColumnAverageTimeOnPageDocumentation' => 'Prosječno vrijeme koje su posjetitelji proveli na ovoj stranici (samo na ovoj stranici, ne na svim stranicama)',
	'General_ColumnValuePerVisit' => 'Prihod po posjeti',
	'General_ColumnVisitsWithConversions' => 'Posjete sa konverzijama',
	'General_VisitsWith' => 'Posjete sa %s',
	'General_YearsDays' => '%1$s godina/e %2$s dan(a)',
	'General_DaysHours' => '%1$s dan(a) %2$s sat(a)',
	'General_HoursMinutes' => '%1$s sat(a) %2$s min',
	'General_MinutesSeconds' => '%1$s min %2$ss',
	'General_Seconds' => '%ss',
	'General_Save' => 'Spremi',
	'General_ForExampleShort' => 'npr.',
	'General_YouMustBeLoggedIn' => 'Moraš biti prijavljen za pristup ovoj funkciji.',
	'General_Website' => 'Web stranica',
	'General_GeneralSettings' => 'Opće postavke',
	'General_AllowPiwikArchivingToTriggerBrowser' => 'Dozvoli pokretanje Piwik arhiviranja kada se izvještaji pregledavaju iz preglednika',
	'General_ArchivingInlineHelp' => 'Preporučljivo je isključiti pokretanje arhiviranja pri posjeti za stranice sa srednjom i visokom posjećenošću.Umjesto toga savjetujemo da postavite cron job koja će obraditi Piwik izvještaje svakih sat vremena.',
	'General_ArchivingTriggerDescription' => 'Za veće Piwik instalacije preporučamo %spostavljanje cron joba %s za automatsku obradu izvještaja.',
	'General_SeeTheOfficialDocumentationForMoreInformation' => 'Za više informacija pogledajte %sslužbenu dokumentaciju%s.',
	'General_ReportsContainingTodayWillBeProcessedAtMostEvery' => 'Današnji izvještaji (ili za bilo koje razdoblje koje uključuje i današnji dan) biti će obrađeni najmanje svakih',
	'General_NSeconds' => '%s sekundi',
	'General_SmallTrafficYouCanLeaveDefault' => 'Za stranice sa manjim prometom možete koristiti pretpostavljenu vrijednost od %s sekundi i pristupati izvještajima u realnom vremenu.',
	'General_MediumToHighTrafficItIsRecommendedTo' => 'Za stranice sa srednjim i velikim prometom preporučamo da izvještaje za tekući dan najviše svakih pola sata (%s sekundi) ili svakih sat vremena (%s sekundi).',
	'General_RequiresFlash' => 'Piwik zahtjeva Flash za prikaz grafova',
	'General_GraphHelp' => 'Više informacija o prikazu grafova u Piwiku.',
	'General_NoDataForTagCloud' => 'Nema podataka za ovaj oblak oznaka.',
	'General_DisplaySimpleTable' => 'Prikaži jednostavnu tablicu',
	'General_DisplayTableWithMoreMetrics' => 'Prikaži tablicu sa detaljnim podacima',
	'General_DisplayTableWithGoalMetrics' => 'Prikaži tablicu sa podacima o ciljevima',
	'General_YouAreViewingDemoShortMessage' => 'Trenutno gledate demonstraciju Piwika',
	'General_DownloadFullVersion' => '%1$sPreuzmite%2$s punu verziju! Pogledajte %3$s',
	'General_NewUpdatePiwikX' => 'Nova verzija: Piwik %s',
	'General_AboutPiwikX' => 'O Piwiku %s',
	'General_PiwikXIsAvailablePleaseUpdateNow' => 'Dostupan je Piwik %1$s. %2$sInstalirajte novu verziju!%3$s (pogledajte %4$snovosti%5$s).',
	'General_PiwikXIsAvailablePleaseNotifyPiwikAdmin' => 'Dostupan je %s. Molimo vas da obavijestite administratora stranice.',
	'General_NewReportsWillBeProcessedByCron' => 'U slučaju da Piwik arhiviranje ne pokreće preglednik, nove izvještaje obrađivat će crontab.',
	'General_ReportsWillBeProcessedAtMostEveryHour' => 'U tom će slučaju izvještaji biti obrađeni najčešće svakih sat vremena.',
	'General_IfArchivingIsFastYouCanSetupCronRunMoreOften' => 'Ako je arhiviranje u vašem slučaju brzo, možete podesiti crontab da se izvršava češće.',
	'General_BackToPiwik' => 'Natrag na Piwik',
	'General_ClickHere' => 'Klikni za više informacija',
	'General_ShortMonth_1' => 'Sij',
	'General_ShortMonth_2' => 'Velj',
	'General_ShortMonth_3' => 'Ožu',
	'General_ShortMonth_4' => 'Tra',
	'General_ShortMonth_5' => 'Svi',
	'General_ShortMonth_6' => 'Lip',
	'General_ShortMonth_7' => 'Srp',
	'General_ShortMonth_8' => 'Kol',
	'General_ShortMonth_9' => 'Ruj',
	'General_ShortMonth_10' => 'Lis',
	'General_ShortMonth_11' => 'Stu',
	'General_ShortMonth_12' => 'Pro',
	'General_LongMonth_1' => 'Siječanj',
	'General_LongMonth_2' => 'Veljača',
	'General_LongMonth_3' => 'Ožujak',
	'General_LongMonth_4' => 'Travanj',
	'General_LongMonth_5' => 'Svibanj',
	'General_LongMonth_6' => 'Lipanj',
	'General_LongMonth_7' => 'Srpanj',
	'General_LongMonth_8' => 'Kolovoz',
	'General_LongMonth_9' => 'Rujan',
	'General_LongMonth_10' => 'Listopad',
	'General_LongMonth_11' => 'Studeni',
	'General_LongMonth_12' => 'Prosinac',
	'General_ShortDay_1' => 'Pon',
	'General_ShortDay_2' => 'Uto',
	'General_ShortDay_3' => 'Sri',
	'General_ShortDay_4' => 'Čet',
	'General_ShortDay_5' => 'Pet',
	'General_ShortDay_6' => 'Sub',
	'General_ShortDay_7' => 'Ned',
	'General_LongDay_1' => 'Ponedjeljak',
	'General_LongDay_2' => 'Utorak',
	'General_LongDay_3' => 'Srijeda',
	'General_LongDay_4' => 'Četvrtak',
	'General_LongDay_5' => 'Petak',
	'General_LongDay_6' => 'Subota',
	'General_LongDay_7' => 'Nedjelja',
	'General_Daily' => 'Dnevno',
	'General_Weekly' => 'Tjedno',
	'General_Monthly' => 'Mjesečno',
	'General_ConfigFileIsNotWritable' => 'Nije moguće upisati promjene u Piwik konfiguracijsku datoteku %s. %s Izmjenite dozvole na datoteci kako bi se moglo u nju upisivati.',
	'General_ExceptionDatabaseVersion' => 'Vaša %1$s verzija je %2$s ali Piwik zahtjeva barem %3$s.',
	'General_ExceptionIncompatibleClientServerVersions' => 'Vaša %1$s klijent verzija je %2$s koja nije uskladiva sa server verzijom %3$s.',
	'General_ExceptionMissingFile' => 'Nedostaje datoteka: %s',
	'General_ExceptionFilesizeMismatch' => 'Veličina datoteke ne odgovara:%1$s (očekivana veličina: %2$s, pronađena: %3$s)',
	'General_ExceptionFileIntegrity' => 'Provjera integriteta nije uspjela: %s',
	'General_ExceptionNonceMismatch' => 'Nije moguće provjeriti sigurnosnu oznaku obrasca.',
	'General_PleaseSpecifyValue' => 'Odredi vrijednost za \'%s\'.',
	'General_ExceptionMethodNotFound' => 'Metoda \'%s\' ne postoji ili nije dostupna u modulu \'%s\'.',
	'General_ExceptionInvalidRendererFormat' => 'Format prikaza \'%s\' nije valjan. Pokušaj sa nekim od sljedećih: %s.',
	'General_ExceptionInvalidReportRendererFormat' => 'Format izvještaja \'%s\' nije valjan. Pokušaj sa nekim od sljedećih: %s.',
	'General_ExceptionInvalidPeriod' => 'Razdoblje \'%s\' nije podržano. Pokušaj sa nekim od sljedećih: %s',
	'General_ExceptionInvalidDateRange' => 'Datum \'%s\' nema ispravan raspon. Mora imati sljedeći oblik: %s.',
	'General_ExceptionGoalNotFound' => 'Oznaka cilja %s nije pronađena.',
	'General_ExceptionUndeletableFile' => 'Nije moguće obrisati %s',
	'General_ExceptionPrivilege' => 'Nije moguće pristupiti ovoj funkciji jer zahjeva %s nivo pristupa.',
	'General_ExceptionPrivilegeAtLeastOneWebsite' => 'Nije moguće pristupiti ovoj funkciji jer zahjeva %s nivo pristupa za barem jednu web stranicu.',
	'General_ExceptionPrivilegeAccessWebsite' => 'Nije moguće pristupiti ovoj funkciji jer zahjeva %s nivo pristupa za stranicu sa oznakom %d.',
	'General_ExceptionInvalidArchiveTimeToLive' => 'Vrijednost mora biti broj sekundi veći od nule.',
	'General_ExceptionConfigurationFileNotFound' => 'Konfiguracijska datoteka {%s} nije pronađena.',
	'General_ExceptionUnreadableFileDisabledMethod' => 'Nije moguće pročitati konfiguracijsku datoteku {%s}. Moguće je da je vaš poslužitelj isključio %s.',
	'General_ExceptionInvalidToken' => 'Oznaka nije valjana.',
	'General_ExceptionInvalidDateFormat' => 'Format datuma mora biti %s ili bilo koji izraz koji prepoznaje %s funkcija (vidi %s za više informacija)',
	'General_ExceptionLanguageFileNotFound' => 'Jezična datoteka \'%s\' nije pronađena.',
	'General_ExceptionUnableToStartSession' => 'Nije moguće pokrenuti vezu.',
	'General_WarningFileIntegritySkipped' => 'Provjera integriteta datoteke je preskočena jer se radi o razvojnom okruženju.',
	'General_WarningFileIntegrityNoManifest' => 'Nije moguće napraviti provjeru integriteta datoteke jer nedostaje manifest.inc.php.',
	'General_WarningFileIntegrityNoMd5file' => 'Nije moguće napraviti provjeru integriteta datoteke jer funkcija md5_file() nije dostupna.',
	'General_FileIntegrityWarningExplanation' => 'Provjera integriteta datoteke nije uspjela i prijavila je određene greške. Najvjerojatniji razlog je nepotpuno ili neuspjelo slanje nekih Piwik datoteka. Pošaljite nanovo sve Piwik datoteke na poslužitelj koristeći BINARY način slanja i osvježite ovu stranicu dok se greške ne otklone.',
	'General_UseSMTPServerForEmail' => 'Koristi SMTP poslužitelj za e-mail',
	'General_SmtpServerAddress' => 'Adresa SMTP poslužitelja',
	'General_SmtpPort' => 'SMTP port',
	'General_AuthenticationMethodSmtp' => 'Način SMTP autorizacije',
	'General_SmtpUsername' => 'SMTP korisničko ime',
	'General_SmtpPassword' => 'SMTP lozinka',
	'General_SmtpEncryption' => 'SMTP enkripcija',
	'General_SelectYesIfYouWantToSendEmailsViaServer' => 'Odaberite "Da" ako želite slati mail preko poslužitelja umjesto pomoću lokalne funckije',
	'General_OptionalSmtpPort' => 'Opcionalno. Pretpostavljena vrijednost je 25 za neenkriptiranu i TLS vezu ili 465 za SSL vezu.',
	'General_OnlyUsedIfUserPwdIsSet' => 'Koristi se samo ako je postavljeno korisničko ime i lozinka. Provjerite sa vašim pružateljem usluge ako niste sigurni koju metodu koristiti.',
	'General_OnlyEnterIfRequired' => 'Upišite korisničko ime samo ako ga vaš SMTP poslužitelj zahtjeva.',
	'General_OnlyEnterIfRequiredPassword' => 'Upišite lozinku samo ako ga vaš SMTP poslužitelj zahtjeva.',
	'General_WarningPasswordStored' => '%sPozor:%s Ova će lozinka biti pohranjena u konfiguracijsku datoteka i biti će vidljiva svima koji imaju pristup toj datoteci.',
	'General_EncryptedSmtpTransport' => 'Odaberite oblik enkripcije koju zahtjeva vaš SMTP poslužitelj.',
	'General_InvalidResponse' => 'Primjeni podaci nisu ispravni.',
	'General_ChooseLanguage' => 'Odaberite jezik',
	'General_ChoosePeriod' => 'Odaberite vremenski raspon',
	'General_ChooseWebsite' => 'Odaberite internet stranicu',
	'General_Language' => 'Jezik',
	'General_PleaseUpdatePiwik' => 'Unaprijedite vašu Piwik instalaciju',
	'General_RequestTimedOut' => 'Zahtjev za podacima sa %s je istekao. Pokušajte nanovo.',
	'General_UsePlusMinusIconsDocumentation' => 'Koristite znakove plus i minus sa lijeve strane za navigaciju.',
	'General_BrokenDownReportDocumentation' => 'Razlomljeno je u više izvještaja koji su prikazano sa linijama na dnu stranice. Grafove je moguće uvećati klikom na izvještaj koji želite vidjeti.',
	'General_ChangeTagCloudView' => 'Napominjemo da izvještaje možete vidjeti i na druge načine osim u obliku oblaka za oznakama. Za promjenu prikaza koristite kontrole na dnu izvještaja.',
	'General_Recommended' => 'Preporuka',
	'General_Goal' => 'Cilj',
	'General_Help' => 'Pomoć',
	'Actions_PluginDescription' => 'Izvješća o pregledima stranica, vanjskim poveznicama i preuzimanjima. Praćenje vanjskih poveznica i preuzimanja je automatsko! Također, možete pratiti pretraživanja vaše vlastite tražilice.',
	'Actions_Actions' => 'Radnje',
	'Actions_SubmenuPages' => 'Stranice',
	'Actions_SubmenuPagesEntry' => 'Ulazne na stranice',
	'Actions_SubmenuPagesExit' => 'Izlazne stranice',
	'Actions_WidgetPagesExit' => 'Izlazne stranice',
	'Actions_EntryPageTitles' => 'Naslovi dolazih stranica',
	'Actions_ExitPageTitles' => 'Naslovi odlaznih stranica',
	'Actions_SubmenuPageTitles' => 'Naslovi stranica',
	'Actions_WidgetPageTitles' => 'Naslovi stranica',
	'Actions_WidgetPageTitlesFollowingSearch' => 'Naslovi stranica kod pretraživanja',
	'Actions_PageUrls' => 'URL stranica',
	'Actions_SubmenuDownloads' => 'Preuzimanja',
	'Actions_PagesReportDocumentation' => 'Ovo izvješće sadrži informacije o linkovima stranica koje su posjećene. %s Tablica je organizirana hijerarhijski, URL-ovi su prikazani kao struktura mapa.',
	'Actions_OutlinksReportDocumentation' => 'Ovo izvješće prikazuje hijerarhijski popis odlaznih URL adresa na koje su kliknuli vaši posjetitelji.',
	'Actions_OutlinkDocumentation' => 'Odlazna poveznica je poveznica koja odvodi vašeg posjetitelja sa vaše stranice (na drugu domenu).',
	'Actions_DownloadsReportDocumentation' => 'U ovom izvješću možete vidjeti popis datoteka koje su vaši posjetitelji preuzeli. %s Piwik kao download broji klik na poveznicu za download i ne može znati je li pri tom datoteka zaista u potpunosti preuzeta.',
	'Actions_ColumnClicks' => 'Klikovi',
	'Actions_ColumnClicksDocumentation' => 'Broj koliko je puta link bio kliknut',
	'Actions_ColumnUniqueClicks' => 'Jedinstveni klikovi',
	'Actions_ColumnUniqueClicksDocumentation' => 'Broj posjeta koje su obuhvaćale klik na ovaj link. U slučaju da je link korišten više puta, brojan je samo jednom.',
	'Actions_ColumnDownloads' => 'Preuzimanja',
	'Actions_ColumnUniqueDownloads' => 'Jedinstvena preuzimanja',
	'Actions_ColumnOutlinks' => 'Odlazni linkovi',
	'Actions_ColumnUniqueOutlinks' => 'Unikatni odlazni linkovi',
	'Actions_ColumnPageName' => 'Naslov stranice',
	'Actions_ColumnPageURL' => 'URL stranice',
	'Actions_ColumnSearchCategory' => 'Kategorija pretrage',
	'Actions_ColumnSearchResultsCount' => 'Broj rezultata pretrage',
	'Actions_ColumnSearchKeyword' => 'Ključna riječ',
	'Actions_ColumnClickedURL' => 'Kliknuti URL',
	'Actions_ColumnDownloadURL' => 'Preuzeti URL',
	'Actions_ColumnEntryPageURL' => 'URL ulazne stranice',
	'Actions_ColumnEntryPageTitle' => 'Naziv ulazne stranice',
	'Actions_ColumnExitPageURL' => 'URL izlazne stranice',
	'Actions_ColumnExitPageTitle' => 'Naslov izlazne stranice',
	'Actions_ColumnNoResultKeyword' => 'Ključna riječ bez rezultata pretraživanja',
	'Actions_ColumnSearches' => 'Pretrage',
	'Actions_ColumnSiteSearchKeywords' => 'Jedinstvene ključne riječi',
	'Actions_ColumnSearchesDocumentation' => 'Broj posjetitelja koji su tražili ovu ključnu riječ koristeći tražilicu na vašoj stranici.',
	'Actions_ColumnSearchExits' => '% odlazaka preko pretrage',
	'Actions_ColumnSearchExitsDocumentation' => 'Postotak posjetitelja koji su otišli sa vaše stranice nakon traženja ove ključne riječi korištenjem vaše tražilice.',
	'Actions_ColumnPagesPerSearch' => 'Stranice sa rezultatima pretrage',
	'Actions_ColumnPagesPerSearchDocumentation' => 'Posjetitelji će ponekad koristiti opciju "dalje" za prikaz dodatnih rezultata pretrage. Ovo je prosječan broj stranica sa rezultatima pretrage za ovu ključnu riječ.',
	'Actions_EntryPagesReportDocumentation' => 'Ovo izvješće zadrži podatke o dolaznim stranicama u određenom razdoblju. Dolazna stranica je prva stranica koju posjetitelj otvori pri njegovom posjetu. %s Dolazne URL adrese su prikazane kao mape.',
	'Actions_EntryPageTitlesReportDocumentation' => 'Ovo izvješće sadrži informacije o naslovima korištenih dolaznih stranica unutar određenog razdoblja.',
	'Actions_ExitPagesReportDocumentation' => 'Ovo izvješće sadrži podatke o odlaznim stranicama koje su zabilježene tijekom određenog razdoblja. Odlazna stranica je posljednja stranica koju je posjetitelj pregledao za vrijeme svojeg posjeta. %s Odlazne URL adrese su prikazane kao mape.',
	'Actions_ExitPageTitlesReportDocumentation' => 'Ovo izvješće sadrži podatke o naslovima odlaznih stranica koje su zabilježene u određenom razdoblju.',
	'Actions_LearnMoreAboutSiteSearchLink' => 'Saznajte više o načinima praćenja načina na koji vaši posjetitelji koriste tražilicu na vašoj stranici.',
	'Actions_SiteSearchCategories1' => 'Ovo izvješće prikazuje kategorije koje su posjetitelji odabrali kod pretraživanja vaše web-stranice',
	'Actions_SiteSearchCategories2' => 'Web-stranice kataloške prodaje najčešće imaju omogućen odabir "kategorija" kako bi posjetitelji pretraživali proizvode u željenoj kategoriji.',
	'CoreAdminHome_PluginDescription' => 'Administratorsko područje PIWIK.',
	'CoreAdminHome_MenuGeneralSettings' => 'Opće postavke',
	'CoreAdminHome_Administration' => 'Administracija',
	'CoreAdminHome_EmailServerSettings' => 'Postavke email servera',
	'CoreAdminHome_LogoUpload' => 'Odaberi logo za upload',
	'PrivacyManager_ClickHereSettings' => 'Klikni za pristup %s postavkama.',
	'Dashboard_Dashboard' => 'Upravljačka ploča',
	'Live_VisitorLog' => 'Zapis posjetitelja',
	'Mobile_SaveSuccessError' => 'Molim provjerite postavke',
	'Provider_SubmenuLocationsProvider' => 'Lokacija i pružatelj usluga',
	'Referers_SubmenuOverview' => 'Pregled',
	'Referers_WidgetOverview' => 'Pregled',
	'UserCountry_Country' => 'Država',
	'UserCountry_Continent' => 'Kontinent',
	'UserCountry_Location' => 'Lokacija',
	'UserCountry_SubmenuLocations' => 'Lokacije',
	'UserCountry_country_ad' => 'Andora',
	'UserCountry_country_ae' => 'Ujedinjeni Arapski Emirati',
	'UserCountry_country_af' => 'Afganistan',
	'UserCountry_country_ag' => 'Antigua i Barbuda',
	'UserCountry_country_ai' => 'Anguila',
	'UserCountry_country_al' => 'Albanija',
	'UserCountry_country_am' => 'Armenija',
	'UserCountry_country_an' => 'Nizozemski Antili',
	'UserCountry_country_ao' => 'Angola',
	'UserCountry_country_aq' => 'Antarktik',
	'UserCountry_country_ar' => 'Argentina',
	'UserCountry_country_as' => 'Američka Samoa',
	'UserCountry_country_at' => 'Austrija',
	'UserCountry_country_au' => 'Australija',
	'UserCountry_country_aw' => 'Aruba',
	'UserCountry_country_ax' => 'Alandski otoci',
	'UserCountry_country_az' => 'Azerbajdžan',
	'UserCountry_country_ba' => 'Bosna i Hercegovina',
	'UserCountry_country_bb' => 'Barbados',
	'UserCountry_country_bd' => 'Bangladeš',
	'UserCountry_country_be' => 'Belgija',
	'UserCountry_country_bf' => 'Burkina Faso',
	'UserCountry_country_bg' => 'Bugarska',
	'UserCountry_country_bh' => 'Bahrein',
	'UserCountry_country_bi' => 'Burundi',
	'UserCountry_country_bj' => 'Benin',
	'UserCountry_country_bl' => 'Sveti Bartolomej',
	'UserCountry_country_bm' => 'Bermuda',
	'UserCountry_country_bn' => 'Brunej',
	'UserCountry_country_bo' => 'Bolivija',
	'UserCountry_country_br' => 'Brazil',
	'UserCountry_country_bs' => 'Bahami',
	'UserCountry_country_bt' => 'Butan',
	'UserCountry_country_bv' => 'Otok Bouvet',
	'UserCountry_country_bw' => 'Bocvana',
	'UserCountry_country_by' => 'Bjelorusija',
	'UserCountry_country_bz' => 'Belize',
	'UserCountry_country_ca' => 'Kanada',
	'UserCountry_country_cc' => 'Kokosovi Otoci',
	'UserCountry_country_cd' => 'Demokratska Republika Kongo',
	'UserCountry_country_cf' => 'Srednjoafrička Republika',
	'UserCountry_country_cg' => 'Kongo',
	'UserCountry_country_ch' => 'Švicarska',
	'UserCountry_country_ci' => 'Obala Bjelokosti',
	'UserCountry_country_ck' => 'Kukovi Otoci',
	'UserCountry_country_cl' => 'Čile',
	'UserCountry_country_cm' => 'Kamerun',
	'UserCountry_country_cn' => 'Kina',
	'UserCountry_country_co' => 'Kolumbija',
	'UserCountry_country_cr' => 'Kostarika',
	'UserCountry_country_cs' => 'Srbija i Crna Gora',
	'UserCountry_country_cu' => 'Kuba',
	'UserCountry_country_cv' => 'Zeleni Rt',
	'UserCountry_country_cx' => 'Božićni Otok',
	'UserCountry_country_cy' => 'Cipar',
	'UserCountry_country_cz' => 'Češka Republika',
	'UserCountry_country_de' => 'Njemačka',
	'UserCountry_country_dj' => 'Džibuti',
	'UserCountry_country_dk' => 'Danska',
	'UserCountry_country_dm' => 'Dominika',
	'UserCountry_country_do' => 'Dominikanska Republika',
	'UserCountry_country_dz' => 'Alžir',
	'UserCountry_country_ec' => 'Ekvador',
	'UserCountry_country_ee' => 'Estonija',
	'UserCountry_country_eg' => 'Egipat',
	'UserCountry_country_eh' => 'Zapadna Sahara',
	'UserCountry_country_er' => 'Eritreja',
	'UserCountry_country_es' => 'Španjolska',
	'UserCountry_country_et' => 'Etiopija',
	'UserCountry_country_fi' => 'Finska',
	'UserCountry_country_fj' => 'Fidži',
	'UserCountry_country_fk' => 'Falklandski Otoci',
	'UserCountry_country_fm' => 'Mikronezija',
	'UserCountry_country_fo' => 'Farski Otoci',
	'UserCountry_country_fr' => 'Francuska',
	'UserCountry_country_ga' => 'Gabon',
	'UserCountry_country_gb' => 'Velika Britanija',
	'UserCountry_country_gd' => 'Grenada',
	'UserCountry_country_ge' => 'Gruzija',
	'UserCountry_country_gf' => 'Francuska Gvajana',
	'UserCountry_country_gg' => 'Guernsey',
	'UserCountry_country_gh' => 'Gana',
	'UserCountry_country_gi' => 'Gibraltar',
	'UserCountry_country_gl' => 'Grenland',
	'UserCountry_country_gm' => 'Gambija',
	'UserCountry_country_gn' => 'Gvineja',
	'UserCountry_country_gp' => 'Guadeloupe',
	'UserCountry_country_gq' => 'Ekvatorska Gvineja',
	'UserCountry_country_gr' => 'Grčka',
	'UserCountry_country_gs' => 'Južna Gruzija i Južni Sendvič Otoci',
	'UserCountry_country_gt' => 'Gvatemala',
	'UserCountry_country_gu' => 'Guam',
	'UserCountry_country_gw' => 'Gvineja Bisau',
	'UserCountry_country_gy' => 'Gvajana',
	'UserCountry_country_hk' => 'Hong Kong S.A.R. Kine',
	'UserCountry_country_hm' => 'Otok Heard i Otoci McDonald',
	'UserCountry_country_hn' => 'Honduras',
	'UserCountry_country_hr' => 'Hrvatska',
	'UserCountry_country_ht' => 'Haiti',
	'UserCountry_country_hu' => 'Mađarska',
	'UserCountry_country_id' => 'Indonezija',
	'UserCountry_country_ie' => 'Irska',
	'UserCountry_country_il' => 'Izrael',
	'UserCountry_country_im' => 'Otok Man',
	'UserCountry_country_in' => 'Indija',
	'UserCountry_country_io' => 'Britanski Teritorij Indijskog Oceana',
	'UserCountry_country_iq' => 'Irak',
	'UserCountry_country_ir' => 'Iran',
	'UserCountry_country_is' => 'Island',
	'UserCountry_country_it' => 'Italija',
	'UserCountry_country_je' => 'Jersey',
	'UserCountry_country_jm' => 'Jamajka',
	'UserCountry_country_jo' => 'Jordan',
	'UserCountry_country_jp' => 'Japan',
	'UserCountry_country_ke' => 'Kenija',
	'UserCountry_country_kg' => 'Kirgistan',
	'UserCountry_country_kh' => 'Kambodža',
	'UserCountry_country_ki' => 'Kiribati',
	'UserCountry_country_km' => 'Komori',
	'UserCountry_country_kn' => 'Sveti Kristofor i Nevis',
	'UserCountry_country_kp' => 'Koreja, Sjeverna',
	'UserCountry_country_kr' => 'Južna Koreja',
	'UserCountry_country_kw' => 'Kuvajt',
	'UserCountry_country_ky' => 'Kajmanski Otoci',
	'UserCountry_country_kz' => 'Kazakstan',
	'UserCountry_country_la' => 'Laos',
	'UserCountry_country_lb' => 'Libanon',
	'UserCountry_country_lc' => 'Sveta Lucija',
	'UserCountry_country_li' => 'Lihtenštajn',
	'UserCountry_country_lk' => 'Šri Lanka',
	'UserCountry_country_lr' => 'Liberija',
	'UserCountry_country_ls' => 'Lesoto',
	'UserCountry_country_lt' => 'Litva',
	'UserCountry_country_lu' => 'Luksemburg',
	'UserCountry_country_lv' => 'Latvija',
	'UserCountry_country_ly' => 'Libijska Arapska Džamahirija',
	'UserCountry_country_ma' => 'Maroko',
	'UserCountry_country_mc' => 'Monako',
	'UserCountry_country_md' => 'Moldavija',
	'UserCountry_country_me' => 'Crna Gora',
	'UserCountry_country_mf' => 'Sveti Martin',
	'UserCountry_country_mg' => 'Madagaskar',
	'UserCountry_country_mh' => 'Maršalovi Otoci',
	'UserCountry_country_mk' => 'Bivša Jugoslavenska Republika Makedonija',
	'UserCountry_country_ml' => 'Mali',
	'UserCountry_country_mm' => 'Mijanma',
	'UserCountry_country_mn' => 'Mongolija',
	'UserCountry_country_mo' => 'Makao S.A.R. Kine',
	'UserCountry_country_mp' => 'Sjeverni Marijanski Otoci',
	'UserCountry_country_mq' => 'Martinik',
	'UserCountry_country_mr' => 'Mauritanija',
	'UserCountry_country_ms' => 'Montserat',
	'UserCountry_country_mt' => 'Malta',
	'UserCountry_country_mu' => 'Mauricijus',
	'UserCountry_country_mv' => 'Maldivi',
	'UserCountry_country_mw' => 'Malavi',
	'UserCountry_country_mx' => 'Meksiko',
	'UserCountry_country_my' => 'Malezija',
	'UserCountry_country_mz' => 'Mozambik',
	'UserCountry_country_na' => 'Namibija',
	'UserCountry_country_nc' => 'Nova Kaledonija',
	'UserCountry_country_ne' => 'Niger',
	'UserCountry_country_nf' => 'Otok Norfolk',
	'UserCountry_country_ng' => 'Nigerija',
	'UserCountry_country_ni' => 'Nikaragva',
	'UserCountry_country_nl' => 'Nizozemska',
	'UserCountry_country_no' => 'Norveška',
	'UserCountry_country_np' => 'Nepal',
	'UserCountry_country_nr' => 'Nauru',
	'UserCountry_country_nu' => 'Niue',
	'UserCountry_country_nz' => 'Novi Zeland',
	'UserCountry_country_om' => 'Oman',
	'UserCountry_country_pa' => 'Panama',
	'UserCountry_country_pe' => 'Peru',
	'UserCountry_country_pf' => 'Francuska Polinezija',
	'UserCountry_country_pg' => 'Papua Nova Gvineja',
	'UserCountry_country_ph' => 'Filipini',
	'UserCountry_country_pk' => 'Pakistan',
	'UserCountry_country_pl' => 'Poljska',
	'UserCountry_country_pm' => 'Sveti Petar i Miguel',
	'UserCountry_country_pn' => 'Pitcairn',
	'UserCountry_country_pr' => 'Portoriko',
	'UserCountry_country_ps' => 'Palestinsko Područje',
	'UserCountry_country_pt' => 'Portugal',
	'UserCountry_country_pw' => 'Palau',
	'UserCountry_country_py' => 'Paragvaj',
	'UserCountry_country_qa' => 'Katar',
	'UserCountry_country_re' => 'Reunion',
	'UserCountry_country_ro' => 'Rumunjska',
	'UserCountry_country_rs' => 'Srbija',
	'UserCountry_country_ru' => 'Rusija',
	'UserCountry_country_rw' => 'Ruanda',
	'UserCountry_country_sa' => 'Saudijska Arabija',
	'UserCountry_country_sb' => 'Solomonski Otoci',
	'UserCountry_country_sc' => 'Sejšeli',
	'UserCountry_country_sd' => 'Sudan',
	'UserCountry_country_se' => 'Švedska',
	'UserCountry_country_sg' => 'Singapur',
	'UserCountry_country_sh' => 'Sveta Helena',
	'UserCountry_country_si' => 'Slovenija',
	'UserCountry_country_sj' => 'Svalbard i Jan Mayen',
	'UserCountry_country_sk' => 'Slovačka',
	'UserCountry_country_sl' => 'Sijera Leone',
	'UserCountry_country_sm' => 'San Marino',
	'UserCountry_country_sn' => 'Senegal',
	'UserCountry_country_so' => 'Somalija',
	'UserCountry_country_sr' => 'Surinam',
	'UserCountry_country_st' => 'Sveti Toma i Prinsipe',
	'UserCountry_country_sv' => 'El Salvador',
	'UserCountry_country_sy' => 'Sirija',
	'UserCountry_country_sz' => 'Svazi',
	'UserCountry_country_tc' => 'Turkski i Kaikos Otoci',
	'UserCountry_country_td' => 'Čad',
	'UserCountry_country_tf' => 'Francuski Južni Teritoriji',
	'UserCountry_country_tg' => 'Togo',
	'UserCountry_country_th' => 'Tajland',
	'UserCountry_country_tj' => 'Tadžikistan',
	'UserCountry_country_tk' => 'Tokelau',
	'UserCountry_country_tl' => 'Istočni Timor',
	'UserCountry_country_tm' => 'Turkmenistan',
	'UserCountry_country_tn' => 'Tunis',
	'UserCountry_country_to' => 'Tonga',
	'UserCountry_country_tr' => 'Turska',
	'UserCountry_country_tt' => 'Trinidad i Tobago',
	'UserCountry_country_tv' => 'Tuvalu',
	'UserCountry_country_tw' => 'Tajvan',
	'UserCountry_country_tz' => 'Tanzanija',
	'UserCountry_country_ua' => 'Ukrajina',
	'UserCountry_country_ug' => 'Uganda',
	'UserCountry_country_um' => 'Ujedinjene Države Manjih Pacifičkih Otoka',
	'UserCountry_country_us' => 'Sjedinjene Države',
	'UserCountry_country_uy' => 'Urugvaj',
	'UserCountry_country_uz' => 'Uzbekistan',
	'UserCountry_country_va' => 'Grad Vatikan',
	'UserCountry_country_vc' => 'Sveti Vincent i Grenadini',
	'UserCountry_country_ve' => 'Venezuela',
	'UserCountry_country_vg' => 'Britanski Djevičanski Otoci',
	'UserCountry_country_vi' => 'Američki Djevičanski Otoci',
	'UserCountry_country_vn' => 'Vijetnam',
	'UserCountry_country_vu' => 'Vanuatu',
	'UserCountry_country_wf' => 'Wallis i Futuna',
	'UserCountry_country_ws' => 'Samoa',
	'UserCountry_country_ye' => 'Jemen',
	'UserCountry_country_yt' => 'Majote',
	'UserCountry_country_za' => 'Južnoafrička Republika',
	'UserCountry_country_zm' => 'Zambija',
	'UserCountry_country_zw' => 'Zimbabve',
	'UserSettings_VisitorSettings' => 'Postavke posjetitelja',
	'UserSettings_Browsers' => 'Pretraživači',
	'UserSettings_Plugins' => 'Dodaci',
	'UserSettings_Configurations' => 'Konfiguracija',
	'UserSettings_ColumnBrowserVersion' => 'Verzija pretraživača',
	'UserSettings_ColumnPlugin' => 'Dodaci',
	'UserSettings_ColumnConfiguration' => 'KOnfiguracija',
	'UserSettings_ColumnOperatingSystem' => 'Operativni sustav',
	'UserSettings_ColumnResolution' => 'Rezolucija',
	'UsersManager_MenuUsers' => 'Korisnici',
	'UsersManager_MenuUserSettings' => 'Korisničke postavke',
	'UsersManager_ChangePassword' => 'Promjeni lozinku.',
	'UsersManager_TypeYourPasswordAgain' => 'Ponovi novu lozinku.',
	'UsersManager_YourUsernameCannotBeChanged' => 'Korisničko ime se ne može promijeniti',
	'UsersManager_ExceptionLoginExists' => 'Korisnik \'%s\' već postoji.',
	'UsersManager_ExceptionEmailExists' => 'Korisnik sa istim emailom \'%s\' već postoji.',
	'UsersManager_ExceptionInvalidEmail' => 'Nije dobar format emaila.',
	'VisitsSummary_SubmenuOverview' => 'Pregled',
	'Annotations_Annotations' => 'Interaktivne bilješke',
	'Annotations_AddAnnotationsFor_js' => 'Dodaj bilješke za %s...',
	'Annotations_AnnotationOnDate' => 'Interaktivne bilješke na %1$s: %2$s',
	'UserLanguage_Language_aa' => 'afarski',
	'UserLanguage_Language_ab' => 'abhaski',
	'UserLanguage_Language_ae' => 'avestan',
	'UserLanguage_Language_af' => 'afrikaans',
	'UserLanguage_Language_ak' => 'akanski',
	'UserLanguage_Language_am' => 'amharik',
	'UserLanguage_Language_an' => 'aragonski',
	'UserLanguage_Language_ar' => 'arapski',
	'UserLanguage_Language_as' => 'asamski',
	'UserLanguage_Language_av' => 'avarski',
	'UserLanguage_Language_ay' => 'aymara',
	'UserLanguage_Language_az' => 'azerbajdžanski',
	'UserLanguage_Language_ba' => 'baškirski',
	'UserLanguage_Language_be' => 'bjeloruski',
	'UserLanguage_Language_bg' => 'bugarski',
	'UserLanguage_Language_bh' => 'bihari',
	'UserLanguage_Language_bi' => 'bislama',
	'UserLanguage_Language_bm' => 'bambara',
	'UserLanguage_Language_bn' => 'bengalski',
	'UserLanguage_Language_bo' => 'tibetanski',
	'UserLanguage_Language_br' => 'bretonski',
	'UserLanguage_Language_bs' => 'bosanski',
	'UserLanguage_Language_ca' => 'katalonski',
	'UserLanguage_Language_ce' => 'čečenski',
	'UserLanguage_Language_ch' => 'chamorro',
	'UserLanguage_Language_co' => 'korzički',
	'UserLanguage_Language_cr' => 'cree',
	'UserLanguage_Language_cs' => 'češki',
	'UserLanguage_Language_cu' => 'crkvenoslavenski',
	'UserLanguage_Language_cv' => 'chuvash',
	'UserLanguage_Language_cy' => 'velški',
	'UserLanguage_Language_da' => 'danski',
	'UserLanguage_Language_de' => 'njemački',
	'UserLanguage_Language_dv' => 'divehi',
	'UserLanguage_Language_dz' => 'dzongkha',
	'UserLanguage_Language_ee' => 'ewe',
	'UserLanguage_Language_el' => 'grčki',
	'UserLanguage_Language_en' => 'engleski',
	'UserLanguage_Language_eo' => 'esperanto',
	'UserLanguage_Language_es' => 'španjolski',
	'UserLanguage_Language_et' => 'estonijski',
	'UserLanguage_Language_eu' => 'baskijski',
	'UserLanguage_Language_fa' => 'perzijski',
	'UserLanguage_Language_ff' => 'fulah',
	'UserLanguage_Language_fi' => 'finski',
	'UserLanguage_Language_fj' => 'fidžijski',
	'UserLanguage_Language_fo' => 'faroanski',
	'UserLanguage_Language_fr' => 'francuski',
	'UserLanguage_Language_fy' => 'frizijski',
	'UserLanguage_Language_ga' => 'irski',
	'UserLanguage_Language_gd' => 'škotski-galski',
	'UserLanguage_Language_gl' => 'galicijski',
	'UserLanguage_Language_gn' => 'guarani',
	'UserLanguage_Language_gu' => 'gujarati',
	'UserLanguage_Language_gv' => 'manx',
	'UserLanguage_Language_ha' => 'hausa',
	'UserLanguage_Language_he' => 'hebrejski',
	'UserLanguage_Language_hi' => 'hindu',
	'UserLanguage_Language_ho' => 'hiri motu',
	'UserLanguage_Language_hr' => 'hrvatski',
	'UserLanguage_Language_ht' => 'kreolski',
	'UserLanguage_Language_hu' => 'mađarski',
	'UserLanguage_Language_hy' => 'armenski',
	'UserLanguage_Language_hz' => 'herero',
	'UserLanguage_Language_ia' => 'interlingua',
	'UserLanguage_Language_id' => 'indonezijski',
	'UserLanguage_Language_ie' => 'interligua',
	'UserLanguage_Language_ig' => 'igbo',
	'UserLanguage_Language_ii' => 'sichuan yi',
	'UserLanguage_Language_ik' => 'inupiaq',
	'UserLanguage_Language_io' => 'ido',
	'UserLanguage_Language_is' => 'islandski',
	'UserLanguage_Language_it' => 'talijanski',
	'UserLanguage_Language_iu' => 'inuktitut',
	'UserLanguage_Language_ja' => 'japanski',
	'UserLanguage_Language_jv' => 'javanski',
	'UserLanguage_Language_ka' => 'gruzijski',
	'UserLanguage_Language_kg' => 'kongo',
	'UserLanguage_Language_ki' => 'kikuyu',
	'UserLanguage_Language_kj' => 'kuanyama',
	'UserLanguage_Language_kk' => 'kazaški',
	'UserLanguage_Language_kl' => 'kalaallisut',
	'UserLanguage_Language_km' => 'kmerski',
	'UserLanguage_Language_kn' => 'kannada',
	'UserLanguage_Language_ko' => 'korejski',
	'UserLanguage_Language_kr' => 'kanuri',
	'UserLanguage_Language_ks' => 'kašmirski',
	'UserLanguage_Language_ku' => 'kurdski',
	'UserLanguage_Language_kv' => 'komi',
	'UserLanguage_Language_kw' => 'kornski',
	'UserLanguage_Language_ky' => 'kirgiški',
	'UserLanguage_Language_la' => 'latinski',
	'UserLanguage_Language_lb' => 'luksemburški',
	'UserLanguage_Language_lg' => 'ganda',
	'UserLanguage_Language_li' => 'limburgish',
	'UserLanguage_Language_ln' => 'lingala',
	'UserLanguage_Language_lo' => 'laoski',
	'UserLanguage_Language_lt' => 'litvanski',
	'UserLanguage_Language_lu' => 'luba-katanga',
	'UserLanguage_Language_lv' => 'latvijski',
	'UserLanguage_Language_mg' => 'malgaški',
	'UserLanguage_Language_mh' => 'maršalski',
	'UserLanguage_Language_mi' => 'maorski',
	'UserLanguage_Language_mk' => 'makedonski',
	'UserLanguage_Language_ml' => 'malayalam',
	'UserLanguage_Language_mn' => 'mongolski',
	'UserLanguage_Language_mr' => 'marathi',
	'UserLanguage_Language_ms' => 'malajski',
	'UserLanguage_Language_mt' => 'malteški',
	'UserLanguage_Language_my' => 'burmanski',
	'UserLanguage_Language_na' => 'nauru',
	'UserLanguage_Language_nb' => 'književni norveški',
	'UserLanguage_Language_nd' => 'sjeverni ndebele',
	'UserLanguage_Language_ne' => 'nepalski',
	'UserLanguage_Language_ng' => 'ndonga',
	'UserLanguage_Language_nl' => 'nizozemski',
	'UserLanguage_Language_nn' => 'novonorveški',
	'UserLanguage_Language_no' => 'norveški',
	'UserLanguage_Language_nr' => 'južni ndebele',
	'UserLanguage_Language_nv' => 'navajo',
	'UserLanguage_Language_ny' => 'nyanja',
	'UserLanguage_Language_oc' => 'okcitanski',
	'UserLanguage_Language_oj' => 'ojibwa',
	'UserLanguage_Language_om' => 'oromo',
	'UserLanguage_Language_or' => 'orijski',
	'UserLanguage_Language_os' => 'osetski',
	'UserLanguage_Language_pa' => 'punjabi',
	'UserLanguage_Language_pi' => 'pali',
	'UserLanguage_Language_pl' => 'poljski',
	'UserLanguage_Language_ps' => 'paštu',
	'UserLanguage_Language_pt' => 'portugalski',
	'UserLanguage_Language_qu' => 'quechua',
	'UserLanguage_Language_rm' => 'retoromanski',
	'UserLanguage_Language_rn' => 'rundi',
	'UserLanguage_Language_ro' => 'rumunjski',
	'UserLanguage_Language_ru' => 'ruski',
	'UserLanguage_Language_rw' => 'kinyarwanda',
	'UserLanguage_Language_sa' => 'sanskrtski',
	'UserLanguage_Language_sc' => 'sardski',
	'UserLanguage_Language_sd' => 'sindhi',
	'UserLanguage_Language_se' => 'južni sami',
	'UserLanguage_Language_sg' => 'sango',
	'UserLanguage_Language_si' => 'singaleški',
	'UserLanguage_Language_sk' => 'slovački',
	'UserLanguage_Language_sl' => 'slovenski',
	'UserLanguage_Language_sm' => 'samoanski',
	'UserLanguage_Language_sn' => 'shona',
	'UserLanguage_Language_so' => 'somalski',
	'UserLanguage_Language_sq' => 'albanski',
	'UserLanguage_Language_sr' => 'srpski',
	'UserLanguage_Language_ss' => 'svati',
	'UserLanguage_Language_st' => 'sesotski',
	'UserLanguage_Language_su' => 'sundanski',
	'UserLanguage_Language_sv' => 'švedski',
	'UserLanguage_Language_sw' => 'svahili',
	'UserLanguage_Language_ta' => 'tamilski',
	'UserLanguage_Language_te' => 'telugu',
	'UserLanguage_Language_tg' => 'tajik',
	'UserLanguage_Language_th' => 'tajlandski',
	'UserLanguage_Language_ti' => 'tigrinya',
	'UserLanguage_Language_tk' => 'turkmenski',
	'UserLanguage_Language_tl' => 'tagalog',
	'UserLanguage_Language_tn' => 'cvana',
	'UserLanguage_Language_to' => 'tonga',
	'UserLanguage_Language_tr' => 'turski',
	'UserLanguage_Language_ts' => 'tsonga',
	'UserLanguage_Language_tt' => 'tatarski',
	'UserLanguage_Language_tw' => 'twi',
	'UserLanguage_Language_ty' => 'tahićanski',
	'UserLanguage_Language_ug' => 'uighur',
	'UserLanguage_Language_uk' => 'ukrajinski',
	'UserLanguage_Language_ur' => 'urdu',
	'UserLanguage_Language_uz' => 'uzbečki',
	'UserLanguage_Language_ve' => 'venda',
	'UserLanguage_Language_vi' => 'vijetnamski',
	'UserLanguage_Language_vo' => 'volapük',
	'UserLanguage_Language_wa' => 'valonski',
	'UserLanguage_Language_wo' => 'wolof',
	'UserLanguage_Language_xh' => 'xhosa',
	'UserLanguage_Language_yi' => 'jidiš',
	'UserLanguage_Language_yo' => 'joruba',
	'UserLanguage_Language_za' => 'zhuang',
	'UserLanguage_Language_zh' => 'kineski',
	'UserLanguage_Language_zu' => 'zulu',
);


text:
@class NSString, NSURL;

@interface OpenTempSessionHandler : MMObject <IPreEnterWechatLogicExt>
{
    NSString *_appId;
    NSString *_bundleId;
    NSURL *_url;
}

@property(retain, nonatomic) NSURL *url; // @synthesize url=_url;
@property(retain, nonatomic) NSString *bundleId; // @synthesize bundleId=_bundleId;
@property(retain, nonatomic) NSString *appId; // @synthesize appId=_appId;
- (void).cxx_destruct;
- (void)onPreEnterWechatDone;
- (id)translateToInternalTempSessionUrlString;
- (void)doOpenTempSession;
- (void)startHandleAppId:(id)arg1 bundleId:(id)arg2 info:(id)arg3;
- (void)dealloc;

// Remaining properties
@property(readonly, copy) NSString *debugDescription;
@property(readonly, copy) NSString *description;
@property(readonly) unsigned long long hash;
@property(readonly) Class superclass;

@end


text:
{-# LANGUAGE
    RecordWildCards
    #-}

{-|
Module      : Test.Make.Instances.CNF
Description : Tests the CNF Instances for Make
Copyright   : (c) Andrew Burnett 2014-2015
Maintainer  : andyburnett88@gmail.com
Stability   : experimental
Portability : Unknown

Contains the test hierarchy for the Make CNF modules
-}

module Test.Make.Instances.CNF (
  tests                 ,-- :: TestTree
  appropriateCNFToConfig,-- :: CNF -> Maybe BoolSolution -> CNFConfig -> Property
  ) where

import qualified Data.Vector                         as V
import           HSat.Make.Instances.CNF
import           HSat.Problem.Instances.CNF.Internal
import           HSat.Problem.Instances.Common
import           HSat.Solution.Instances.CNF
import           TestUtils
import qualified Test.Make.Instances.CNF.Internal     as Internal (tests)
import           Test.Make.Instances.CNF.Internal     hiding (tests)

name :: String
name = "CNF"

tests :: TestTree
tests =
  testGroup name [
    testGroup "makeCNF" [
       makeCNFTest1
       ],
    Internal.tests
    ]

makeCNFTest1 :: TestTree
makeCNFTest1 =
  testProperty "makeCNF returns valid CNF appropriate to config" $ monadicIO $ do
    config    <- pick arbitrary
    (cnf,sol) <- run $ makeCNF config
    return $ appropriateCNFToConfig cnf sol config

appropriateCNFToConfig                                   :: CNF -> Maybe BoolSolution -> CNFConfig -> Property
appropriateCNFToConfig cnf@CNF{..} boolSol CNFConfig{..} =
  checkBounds getClauseNumb getClauseSizeBounds .&&.
  propList (`checkBounds` getClauseSizeBounds) (getClauseSizes cnf) .&&.
  if not getVarsCanAppearTwice then
    checkDuplicateVariables cnf else
    property True .&&.
    checkBoundsVariables getMaxVar getClauseNumb getVariableBounds .&&.
    if getDefinitelyHasSolution then
      case boolSol of
       Nothing  -> property True
       Just sol -> property $ checkCNFSolution cnf sol else
      property True

checkDuplicateVariables         :: CNF -> Property
checkDuplicateVariables CNF{..} =
  listProperty (
    \clause ->
    counterexample ("Clause " ++ show clause ++ " contains duplicate variables")
    (not $ clauseContainsUniqueVars clause)
    ) $  V.toList . getVectClause $ getClauses


text:
namespace Ui {
class AudioChannelFeatureWidget;
}

class AudioChannelFeatureWidget : public QFrame {
	Q_OBJECT

  public:
	explicit AudioChannelFeatureWidget(
		std::shared_ptr<RetSetAudioControlDetail> retSetAudioControlDetail,
		QWidget *parent = nullptr);
	explicit AudioChannelFeatureWidget(QWidget *parent = nullptr);
	~AudioChannelFeatureWidget();
	void setMaster(bool isMaster, QString channel2Name);
	bool getLinkStatus();
	QString getChannelName();

	int getChannelId() const;
	void setChannelId(int value);

  protected:
	Ui::AudioChannelFeatureWidget *ui;
	QTimer *m_pUpdateTimer = nullptr;
	int m_iDetailId = 0;
	int m_iChannelId = 0;
	bool m_bIsMaster = false;

	std::shared_ptr<RetSetAudioControlDetail> m_pAudioControlDetail;
	std::shared_ptr<RetSetAudioControlDetailValue>
		m_pRetSetAudioControlDetailValue = nullptr;

	void initControls();
	void setRetSetAudioControlDetail(
		std::shared_ptr<RetSetAudioControlDetail> retSetAudioControlDetail);
	void queryValues();
	void setValues(std::shared_ptr<RetSetAudioControlDetailValue>
					   m_pRetSetAudioControlDetailValue);
	void createConnections();

  signals:
	void linkStatusChanged(int detailId, bool status);
	void phantomPowerStatusChanged(bool status);
	void highImpedanceStatusChanged(bool status);
	void muteStatusChanged(bool status);
	void volumeChanged(int volume);
	void trimChanged(int trim);

  private slots:
	void audioChannelValueChanged();

  public slots:
	void changeLinkStatus(unsigned int detailId, bool enabled);
	void changePhantomPowerStatus(bool enabled);
	void changeHighImpedanceStatus(bool enabled);
	void changeMuteStatus(bool enabled);
	void changeVolume(int volume);
	void changeTrim(int trim);
	void setVolume(int volume);
	void changeMeterVolume(int channel, int value);
};

#endif // AUDIOCHANNELFEATUREWIDGET_H


text:
@interface ADTokenCacheStoreKeyTests : XCTestCase
{
    NSString* mAuthority;
    NSString* mResource;
    NSString* mClientId;
}

@end

@implementation ADTokenCacheStoreKeyTests

- (void)setUp
{
    [super setUp];
    [self adTestBegin:ADAL_LOG_LEVEL_INFO];
    mAuthority = @"https://login.windows.net/common";;
    mResource = @"http://mywebApi.com";
    mClientId = @"myclientid";
}

- (void)tearDown
{
    [self adTestEnd];
    [super tearDown];
}

- (void)testCreate
{
    ADAuthenticationError* error;
    ADTokenCacheStoreKey* key = [ADTokenCacheStoreKey keyWithAuthority:mAuthority resource:mResource clientId:mClientId error:&error];
    ADAssertNoError;
    XCTAssertNotNil(key);

    [self adSetLogTolerance:ADAL_LOG_LEVEL_ERROR];
    //Bad authority:
    error = nil;
    ADTokenCacheStoreKey* badKey = [ADTokenCacheStoreKey keyWithAuthority:nil resource:mResource clientId:mClientId error:&error];
    [self adValidateFactoryForInvalidArgument:@"authority"
                             returnedObject:badKey
                                      error:error];
    error = nil;
    badKey = [ADTokenCacheStoreKey keyWithAuthority:@"   " resource:mResource clientId:mClientId error:&error];
    [self adValidateFactoryForInvalidArgument:@"authority"
                             returnedObject:badKey
                                      error:error];

    //Bad clientId
    error = nil;
    badKey = [ADTokenCacheStoreKey keyWithAuthority:mAuthority resource:mResource clientId:nil error:&error];
    [self adValidateFactoryForInvalidArgument:@"clientId"
                             returnedObject:badKey
                                      error:error];
    error = nil;
    badKey = [ADTokenCacheStoreKey keyWithAuthority:mAuthority resource:mResource clientId:@"    " error:&error];
    [self adValidateFactoryForInvalidArgument:@"clientId"
                             returnedObject:badKey
                                      error:error];

    error = nil;
    ADTokenCacheStoreKey* normal = [ADTokenCacheStoreKey keyWithAuthority:mAuthority resource:mResource clientId:mClientId error:&error];
    ADAssertNoError;
    XCTAssertNotNil(normal);

    error = nil;
    ADTokenCacheStoreKey* broad = [ADTokenCacheStoreKey keyWithAuthority:mAuthority resource:nil clientId:mClientId error:&error];
    ADAssertNoError;
    XCTAssertNotNil(broad);
}

-(void) assertKey: (ADTokenCacheStoreKey*) key1
         equalsTo: (ADTokenCacheStoreKey*) key2
{
    XCTAssertTrue([key1 isEqual:key2]);
    XCTAssertTrue([key2 isEqual:key1]);
    XCTAssertEqual(key1.hash, key2.hash);
}

-(void) assertKey: (ADTokenCacheStoreKey*) key1
      notEqualsTo: (ADTokenCacheStoreKey*) key2
{
    XCTAssertFalse([key1 isEqual:key2]);
    XCTAssertFalse([key2 isEqual:key1]);
    XCTAssertNotEqual(key1.hash, key2.hash);
}

- (void)testCompare
{
    ADAuthenticationError* error;
    ADTokenCacheStoreKey* normal = [ADTokenCacheStoreKey keyWithAuthority:mAuthority resource:mResource clientId:mClientId error:&error];
    ADAssertNoError;
    XCTAssertNotNil(normal);
    [self assertKey:normal equalsTo:normal];//Self
    [self assertKey:normal notEqualsTo:nil];

    {
        error = nil;
        ADTokenCacheStoreKey* same = [ADTokenCacheStoreKey keyWithAuthority:mAuthority resource:mResource clientId:mClientId error:&error];
        ADAssertNoError;
        XCTAssertNotNil(same);
        [self assertKey:normal equalsTo:normal];
    }

    {
        error = nil;
        ADTokenCacheStoreKey* differentAuth = [ADTokenCacheStoreKey keyWithAuthority:@"https://login.windows.com/common" resource:mResource clientId:mClientId error:&error];
        ADAssertNoError;
        XCTAssertNotNil(differentAuth);
        [self assertKey:normal notEqualsTo:differentAuth];
    }

    {
        error = nil;
        ADTokenCacheStoreKey* differentRes = [ADTokenCacheStoreKey keyWithAuthority:mAuthority resource:@"another resource" clientId:mClientId error:&error];
        ADAssertNoError;
        XCTAssertNotNil(differentRes);
        [self assertKey:normal notEqualsTo:differentRes];
    }

    {
        error = nil;
        ADTokenCacheStoreKey* differentClient = [ADTokenCacheStoreKey keyWithAuthority:mAuthority resource:mResource clientId:@"another clientid" error:&error];
        ADAssertNoError;
        XCTAssertNotNil(differentClient);
        [self assertKey:normal notEqualsTo:differentClient];
    }

    error = nil;
    ADTokenCacheStoreKey* broad = [ADTokenCacheStoreKey keyWithAuthority:mAuthority resource:nil clientId:mClientId error:&error];
    ADAssertNoError;
    XCTAssertNotNil(broad);
    [self assertKey:broad equalsTo:broad];
    [self assertKey:broad notEqualsTo:normal];

    {
        error = nil;
        ADTokenCacheStoreKey* sameBroad = [ADTokenCacheStoreKey keyWithAuthority:mAuthority resource:nil clientId:mClientId error:&error];
        ADAssertNoError;
        XCTAssertNotNil(sameBroad);
        [self assertKey:broad equalsTo:sameBroad];
    }

    {
        error = nil;
        ADTokenCacheStoreKey* differentAuthBroad = [ADTokenCacheStoreKey keyWithAuthority:@"https://login.windows.com/common" resource:nil clientId:mClientId error:&error];
        ADAssertNoError;
        XCTAssertNotNil(differentAuthBroad);
        [self assertKey:broad notEqualsTo:differentAuthBroad];
    }

    {
        error = nil;
        ADTokenCacheStoreKey* differentClientBroad = [ADTokenCacheStoreKey keyWithAuthority:mAuthority resource:nil clientId:@"another authority" error:&error];
        ADAssertNoError;
        XCTAssertNotNil(differentClientBroad);
        [self assertKey:broad notEqualsTo:differentClientBroad];
    }
}

@end


text:
module("Ember.DeferredMixin");

test("can resolve deferred", function() {
  var deferred, count = 0;

  Ember.run(function() {
    deferred = Ember.Object.createWithMixins(Ember.DeferredMixin);
  });

  deferred.then(function(a) {
    count++;
  });

  Ember.run(function() {
    deferred.resolve(deferred);
  });

  equal(count, 1, "was fulfilled");
});

test("can reject deferred", function() {

  var deferred, count = 0;

  Ember.run(function() {
    deferred = Ember.Object.createWithMixins(Ember.DeferredMixin);
  });

  deferred.then(function() {}, function() {
    count++;
  });

  Ember.run(function() {
    deferred.reject();
  });

  equal(count, 1, "fail callback was called");
});

test("can resolve with then", function() {

  var deferred, count1 = 0 ,count2 = 0;

  Ember.run(function() {
    deferred = Ember.Object.createWithMixins(Ember.DeferredMixin);
  });

  deferred.then(function() {
    count1++;
  }, function() {
    count2++;
  });

  Ember.run(function() {
    deferred.resolve(deferred);
  });

  equal(count1, 1, "then were resolved");
  equal(count2, 0, "then was not rejected");
});

test("can reject with then", function() {

  var deferred, count1 = 0 ,count2 = 0;

  Ember.run(function() {
    deferred = Ember.Object.createWithMixins(Ember.DeferredMixin);
  });

  deferred.then(function() {
    count1++;
  }, function() {
    count2++;
  });

  Ember.run(function() {
    deferred.reject();
  });

  equal(count1, 0, "then was not resolved");
  equal(count2, 1, "then were rejected");
});

test("can call resolve multiple times", function() {

  var deferred, count = 0;

  Ember.run(function() {
    deferred = Ember.Object.createWithMixins(Ember.DeferredMixin);
  });

  deferred.then(function() {
    count++;
  });

  Ember.run(function() {
    deferred.resolve(deferred);
    deferred.resolve(deferred);
    deferred.resolve(deferred);
  });

  equal(count, 1, "calling resolve multiple times has no effect");
});

test("resolve prevent reject", function() {
  var deferred, resolved = false, rejected = false, progress = 0;

  Ember.run(function() {
    deferred = Ember.Object.createWithMixins(Ember.DeferredMixin);
  });

  deferred.then(function() {
    resolved = true;
  }, function() {
    rejected = true;
  });

  Ember.run(function() {
    deferred.resolve(deferred);
  });

  Ember.run(function() {
    deferred.reject();
  });

  equal(resolved, true, "is resolved");
  equal(rejected, false, "is not rejected");
});

test("reject prevent resolve", function() {
  var deferred, resolved = false, rejected = false, progress = 0;

  Ember.run(function() {
    deferred = Ember.Object.createWithMixins(Ember.DeferredMixin);
  });

  deferred.then(function() {
    resolved = true;
  }, function() {
    rejected = true;
  });

  Ember.run(function() {
    deferred.reject();
  });
  Ember.run(function() {
    deferred.resolve(deferred);
  });

  equal(resolved, false, "is not resolved");
  equal(rejected, true, "is rejected");
});

test("will call callbacks if they are added after resolution", function() {

  var deferred, count1 = 0;

  Ember.run(function() {
    deferred = Ember.Object.createWithMixins(Ember.DeferredMixin);
  });

  Ember.run(function() {
    deferred.resolve('toto');
  });

  Ember.run(function() {
    deferred.then(function(context) {
      if (context === 'toto') {
        count1++;
      }
    });

    deferred.then(function(context) {
      if (context === 'toto') {
        count1++;
      }
    });
  });

  equal(count1, 2, "callbacks called after resolution");
});

test("then is chainable", function() {
  var deferred, count = 0;

  Ember.run(function() {
    deferred = Ember.Object.createWithMixins(Ember.DeferredMixin);
  });

  deferred.then(function() {
    eval('error'); // Use eval to pass JSHint
  }).then(null, function() {
    count++;
  });

  Ember.run(function() {
    deferred.resolve(deferred);
  });

  equal(count, 1, "chained callback was called");
});

test("can self fulfill", function() {
  expect(1);
  var deferred;

  Ember.run(function() {
    deferred = Ember.Object.createWithMixins(Ember.DeferredMixin);
  });

  deferred.then(function(value) {
    equal(value, deferred, "successfully resolved to itself");
  });

  Ember.run(function() {
    deferred.resolve(deferred);
  });
});

test("can fulfill to a custom value", function() {
  expect(1);
  var deferred, obj = {};

  Ember.run(function() {
    deferred = Ember.Object.createWithMixins(Ember.DeferredMixin);
  });

  deferred.then(function(value) {
    equal(value, obj, "successfully resolved to given value");
  });

  Ember.run(function() {
    deferred.resolve(obj);
  });
});

test("can chain self fulfilling objects", function() {
  expect(2);
  var firstDeferred, secondDeferred;

  Ember.run(function() {
    firstDeferred = Ember.Object.createWithMixins(Ember.DeferredMixin);
    secondDeferred = Ember.Object.createWithMixins(Ember.DeferredMixin);
  });

  firstDeferred.then(function(value) {
    equal(value, firstDeferred, "successfully resolved to the first deferred");
    return secondDeferred;
  })
  .then(function(value) {
    equal(value, secondDeferred, "successfully resolved to the second deferred");
  });

  Ember.run(function() {
    firstDeferred.resolve(firstDeferred);
    secondDeferred.resolve(secondDeferred);
  });
});

test("can do multi level assimilation", function() {
  expect(1);
  var firstDeferred, secondDeferred, firstDeferredResolved = false;

  Ember.run(function() {
    firstDeferred = Ember.Object.createWithMixins(Ember.DeferredMixin);
    secondDeferred = Ember.Object.createWithMixins(Ember.DeferredMixin);
  });

  firstDeferred.then(function() {
    firstDeferredResolved = true;
  });

  secondDeferred.then(function() {
    ok(firstDeferredResolved, "first deferred already resolved");
  });

  Ember.run(function() {
    secondDeferred.resolve(firstDeferred);
  });

  Ember.run(function() {
    firstDeferred.resolve(firstDeferred);
  });
});


text:
"use strict";

// This file relies on the fact that the following declaration has been made
// in runtime.js:
// var $Array = global.Array;

// And requires following symbols to be set in the bootstrapper during genesis:
// - symbolHasInstance
// - symbolIsConcatSpreadable
// - symbolIsRegExp
// - symbolIterator
// - symbolToStringTag
// - symbolUnscopables

var $Symbol = global.Symbol;

// -------------------------------------------------------------------

function SymbolConstructor(x) {
  if (%_IsConstructCall()) {
    throw MakeTypeError('not_constructor', ["Symbol"]);
  }
  // NOTE: Passing in a Symbol value will throw on ToString().
  return %CreateSymbol(IS_UNDEFINED(x) ? x : ToString(x));
}

function SymbolToString() {
  if (!(IS_SYMBOL(this) || IS_SYMBOL_WRAPPER(this))) {
    throw MakeTypeError(
      'incompatible_method_receiver', ["Symbol.prototype.toString", this]);
  }
  var description = %SymbolDescription(%_ValueOf(this));
  return "Symbol(" + (IS_UNDEFINED(description) ? "" : description) + ")";
}

function SymbolValueOf() {
  if (!(IS_SYMBOL(this) || IS_SYMBOL_WRAPPER(this))) {
    throw MakeTypeError(
      'incompatible_method_receiver', ["Symbol.prototype.valueOf", this]);
  }
  return %_ValueOf(this);
}

function SymbolFor(key) {
  key = TO_STRING_INLINE(key);
  var registry = %SymbolRegistry();
  if (IS_UNDEFINED(registry.for[key])) {
    var symbol = %CreateSymbol(key);
    registry.for[key] = symbol;
    registry.keyFor[symbol] = key;
  }
  return registry.for[key];
}

function SymbolKeyFor(symbol) {
  if (!IS_SYMBOL(symbol)) throw MakeTypeError("not_a_symbol", [symbol]);
  return %SymbolRegistry().keyFor[symbol];
}

// ES6 19.1.2.8
function ObjectGetOwnPropertySymbols(obj) {
  obj = ToObject(obj);

  // TODO(arv): Proxies use a shared trap for String and Symbol keys.

  return ObjectGetOwnPropertyKeys(obj, PROPERTY_ATTRIBUTES_STRING);
}

//-------------------------------------------------------------------

function SetUpSymbol() {
  %CheckIsBootstrapping();

  %SetCode($Symbol, SymbolConstructor);
  %FunctionSetPrototype($Symbol, new $Object());

  InstallConstants($Symbol, $Array(
    // TODO(rossberg): expose when implemented.
    // "hasInstance", symbolHasInstance,
    // "isConcatSpreadable", symbolIsConcatSpreadable,
    // "isRegExp", symbolIsRegExp,
    "iterator", symbolIterator,
    // TODO(dslomov, caitp): Currently defined in harmony-tostring.js ---
    // Move here when shipping
    // "toStringTag", symbolToStringTag,
    "unscopables", symbolUnscopables
  ));
  InstallFunctions($Symbol, DONT_ENUM, $Array(
    "for", SymbolFor,
    "keyFor", SymbolKeyFor
  ));

  %AddNamedProperty($Symbol.prototype, "constructor", $Symbol, DONT_ENUM);
  %AddNamedProperty(
      $Symbol.prototype, symbolToStringTag, "Symbol", DONT_ENUM | READ_ONLY);
  InstallFunctions($Symbol.prototype, DONT_ENUM, $Array(
    "toString", SymbolToString,
    "valueOf", SymbolValueOf
  ));
}

SetUpSymbol();

function ExtendObject() {
  %CheckIsBootstrapping();

  InstallFunctions($Object, DONT_ENUM, $Array(
    "getOwnPropertySymbols", ObjectGetOwnPropertySymbols
  ));
}

ExtendObject();


text:
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright 2015 Google LLC.

  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.
  -->

<set
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:ordering="together">

    <objectAnimator
        android:propertyName="trimPathStart"
        android:valueFrom="@fraction/searchback_stem_back_trim_start"
        android:valueTo="@fraction/searchback_stem_search_trim_start"
        android:duration="@integer/searchback_stem_trim_shorter_duration"
        android:interpolator="@android:interpolator/fast_out_slow_in" />

    <objectAnimator
        android:propertyName="trimPathEnd"
        android:valueFrom="@fraction/searchback_stem_back_trim_end"
        android:valueTo="@fraction/searchback_stem_search_trim_end"
        android:duration="@integer/searchback_stem_trim_longer_duration"
        android:interpolator="@android:interpolator/fast_out_slow_in" />

</set>


text:
package cse495;

import java.awt.FlowLayout;
import java.text.DecimalFormat;
import java.text.NumberFormat;

import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

import com.google.inject.AbstractModule;
import com.google.inject.Provides;
import com.google.inject.Singleton;
import com.google.inject.name.Named;

public class CalculatorModule extends AbstractModule {

	protected void configure() {
		bind(Calculator.class).asEagerSingleton();
		bind(CalculatorGUI.class).asEagerSingleton();
		bind(NumberFormat.class).toInstance(new DecimalFormat("#,##0.00"));
	}

	@Provides
	public JFrame frame(JPanel content) {
		JFrame frm = new JFrame("Calculator");
		frm.setContentPane(content);
		frm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frm.setLocation(200, 200);
		frm.pack();
		return frm;
	}

	@Provides
	@Singleton
	public JPanel content(JComboBox<Character> operator,
			@Named("number1") JTextField number1,
			@Named("number2") JTextField number2,
			JButton calculate,
			JLabel result) {
		JPanel p = new JPanel(new FlowLayout(FlowLayout.CENTER));
		p.add(number1);
		p.add(operator);
		p.add(number2);
		p.add(calculate);
		p.add(result);
		return p;
	}

	@Provides
	@Singleton
	@Named("number1")
	public JTextField number1(NumberFormat format) {
		JTextField tf = new JTextField(format.format(10.50), 6);
		tf.setHorizontalAlignment(JTextField.RIGHT);
		return tf;
	}

	@Provides
	@Singleton
	@Named("number2")
	public JTextField number2(NumberFormat format) {
		JTextField tf = new JTextField(format.format(300), 6);
		tf.setHorizontalAlignment(JTextField.RIGHT);
		return tf;
	}

	@Provides
	@Singleton
	public JComboBox<Character> operator() {
		Character[] operators = new Character[] { '+', '-', '/', '*' };
		return new JComboBox<Character>(operators);
	}

	@Provides
	@Singleton
	public JButton calculate() {
		JButton btn = new JButton("=");
		return btn;
	}

	@Provides
	@Singleton
	public JLabel result() {
		return new JLabel("" + 0f);
	}
}


text:
var app = require('../../server/server')

module.exports = {
  sendEmail: function (from, to, subject, html) {
    app.models.Email.send({
      to: to,
      from: from,
      subject: subject,
      html: html
    }, function (err) {
      if (err)
        console.error(err)
    })
  }
}


text:
package com.communote.server.web.api.service.user;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.communote.common.io.BinaryData;
import com.communote.server.api.ServiceLocator;
import com.communote.server.api.core.image.Image;
import com.communote.server.api.core.image.ImageManager;
import com.communote.server.api.core.image.type.UserImageDescriptor;
import com.communote.server.model.user.ImageSizeType;
import com.communote.server.web.api.service.ApiException;
import com.communote.server.web.api.service.BinaryApiController;
import com.communote.server.web.api.service.IllegalRequestParameterException;

/**
 * Api controller to return the user photo
 *
 * @author Communote GmbH - http://www.communote.com/
 * @deprecated Use new generated REST-API instead.
 */
@Deprecated
public class UserPhotoApiController extends BinaryApiController {

    private static final String PARAM_IMAGE_SIZE = "imageSize";

    /**
     * {@inheritDoc}
     */
    @Override
    protected BinaryData execute(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, ApiException {
        // throw resource not found exception on error
        String userId = getResourceId(request, true).toString();
        ImageSizeType imageSizeType = getImageSizeType(request);
        BinaryData result;
        try {
            Image image = ServiceLocator.findService(ImageManager.class).getImage(
                    UserImageDescriptor.IMAGE_TYPE_NAME, userId, imageSizeType);
            result = new BinaryData(image.getMimeType(), image.getBytes(), image
                    .getLastModificationDate().getTime());
        } catch (Exception e) {
            throw new ApiException(e.getMessage());
        }
        return result;
    }

    /**
     *
     * @return the image cache manager
     */
    public ImageManager getImageManager() {
        return ServiceLocator.findService(ImageManager.class);
    }

    /**
     * @param request
     *            the request
     * @return Get the type of blogs to get out of the request
     * @throws IllegalRequestParameterException
     *             invalid blog list type
     */
    private ImageSizeType getImageSizeType(HttpServletRequest request)
            throws IllegalRequestParameterException {
        String parameterValue = getNonEmptyParameter(request, PARAM_IMAGE_SIZE);
        try {
            return ImageSizeType.fromString(parameterValue.toUpperCase());
        } catch (Exception e) {
            throw new IllegalRequestParameterException(PARAM_IMAGE_SIZE, parameterValue,
                    e.getMessage());
        }
    }

}