text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="wrap_content" android:layout_height="wrap_content"
    android:padding="20dp">
    <TextView
        android:id="@+id/jump_dialog_title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="center_horizontal"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:layout_marginBottom="10dp"
        android:text="@string/jump_to_time"/>
    <RelativeLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/jump_dialog_title"
        android:layout_centerHorizontal="true">
        <TextView
            android:id="@+id/jump_sign"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:nextFocusRight="@+id/jump_hours"
            android:text="+"
            android:textSize="20sp"
            android:visibility="gone"/>
        <LinearLayout
            android:id="@+id/jump_hours_container"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toRightOf="@+id/jump_sign"
            android:orientation="vertical">
            <ImageView
                android:id="@+id/jump_hours_up"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="5dp"
                android:src="@android:drawable/arrow_up_float"/>
            <EditText
                android:id="@+id/jump_hours"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_margin="5dp"
                android:maxLength="2"
                android:text="00"
                android:textSize="20sp"
                android:focusable="true"
                android:background="@android:color/transparent"
                android:inputType="number"
                android:nextFocusRight="@+id/jump_minutes"
                android:nextFocusLeft="@+id/jump_sign"/>
            <ImageView
                android:id="@+id/jump_hours_down"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="5dp"
                android:focusable="true"
                android:src="@android:drawable/arrow_down_float"/>
        </LinearLayout>
        <TextView
            android:id="@+id/jump_hours_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toRightOf="@+id/jump_hours_container"
            android:layout_alignTop="@+id/jump_hours_container"
            android:layout_alignBottom="@+id/jump_hours_container"
            android:gravity="center_vertical"
            android:text="h"
            android:textSize="20sp"/>
        <LinearLayout
            android:id="@+id/jump_minutes_container"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toRightOf="@+id/jump_hours_text"
            android:orientation="vertical">
            <ImageView
                android:id="@+id/jump_minutes_up"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="5dp"
                android:focusable="true"
                android:src="@android:drawable/arrow_up_float"/>
            <EditText
                android:id="@+id/jump_minutes"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_margin="5dp"
                android:nextFocusLeft="@+id/jump_hours"
                android:nextFocusRight="@+id/jump_seconds"
                android:inputType="number"
                android:maxLength="2"
                android:text="00"
                android:textSize="20sp"
                android:background="@android:color/transparent"
                android:focusable="true"/>
            <ImageView
                android:id="@+id/jump_minutes_down"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="5dp"
                android:focusable="true"
                android:src="@android:drawable/arrow_down_float"/>
        </LinearLayout>
        <TextView
            android:id="@+id/jump_minutes_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toRightOf="@+id/jump_minutes_container"
            android:layout_alignTop="@+id/jump_minutes_container"
            android:layout_alignBottom="@+id/jump_minutes_container"
            android:gravity="center_vertical"
            android:text="m"
            android:textSize="20sp"/>
        <LinearLayout
            android:id="@+id/jump_seconds_container"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toRightOf="@+id/jump_minutes_text"
            android:orientation="vertical">
            <ImageView
                android:id="@+id/jump_seconds_up"
                android:layout_marginBottom="5dp"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:focusable="true"
                android:src="@android:drawable/arrow_up_float"/>
            <EditText
                android:id="@+id/jump_seconds"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_margin="5dp"
                android:nextFocusLeft="@+id/jump_minutes"
                android:nextFocusRight="@+id/jump_millis"
                android:maxLength="2"
                android:text="00"
                android:textSize="20sp"
                android:textColor="@color/orange500"
                android:background="@android:color/transparent"
                android:inputType="number"
                android:focusable="true">
                    <requestFocus />
            </EditText>
            <ImageView
                android:id="@+id/jump_seconds_down"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="5dp"
                android:focusable="true"
                android:src="@android:drawable/arrow_down_float"/>
        </LinearLayout>
        <TextView
            android:id="@+id/jump_seconds_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toRightOf="@+id/jump_seconds_container"
            android:layout_alignTop="@+id/jump_seconds_container"
            android:layout_alignBottom="@+id/jump_seconds_container"
            android:gravity="center_vertical"
            android:text="s"
            android:textSize="20sp"/>
        <LinearLayout
            android:id="@+id/jump_millis_container"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toRightOf="@+id/jump_seconds_text"
            android:orientation="vertical"
            android:visibility="gone">
            <ImageView
                android:id="@+id/jump_millis_up"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="5dp"
                android:focusable="true"
                android:src="@android:drawable/arrow_up_float"/>
            <EditText
                android:id="@+id/jump_millis"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_margin="5dp"
                android:nextFocusLeft="@+id/jump_seconds"
                android:nextFocusRight="@+id/jump_go"
                android:maxLength="3"
                android:text="000"
                android:background="@android:color/transparent"
                android:inputType="number"
                android:textSize="20sp"
                android:focusable="true"/>
            <ImageView
                android:id="@+id/jump_millis_down"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="5dp"
                android:focusable="true"
                android:src="@android:drawable/arrow_down_float"/>
        </LinearLayout>
        <TextView
            android:id="@+id/jump_millis_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toRightOf="@+id/jump_millis_container"
            android:layout_alignTop="@+id/jump_millis_container"
            android:layout_alignBottom="@+id/jump_millis_container"
            android:gravity="center_vertical"
            android:text="ms"
            android:textSize="20sp"
            android:visibility="gone"/>
        <Button
            tools:targetApi="14"
            android:id="@+id/jump_go"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="5dp"
            android:nextFocusLeft="@+id/jump_seconds"
            android:layout_centerVertical="true"
            android:layout_toRightOf="@+id/jump_millis_text"
            android:text="@android:string/ok"
            android:textSize="20sp"
            style="?android:attr/borderlessButtonStyle"/>
    </RelativeLayout>
</RelativeLayout>


text:
package hevs.especial.dsl.components.core.math

import hevs.especial.dsl.components._
import hevs.especial.dsl.components.core.Constant
import hevs.especial.utils.Settings

/**
 * PID regulator.
 *
 * Constant can be used to set Kp, Ki and Kd values of the regulator. They can be updated when the code is running.
 * All input values are [[double]] values. The result of the regulator is an [[uint16]] value. This output can have a
 * limit range. Minimum and maximum values can be also set using [[double]] values.
 *
 * A companion object is available to connect the regulator with ease.
 *
 * @version 2.0
 * @author Christopher Metrailler (mei@hevs.ch)
 */
case class PID() extends Component with Out1 with HwImplemented {

  override val description = s"PID regulator"

  /* I/O management */

  val out = new OutputPort[uint16](this) {
    override val name = s"out"
    override val description = "output value"

    override def getValue: String = s"$outName"
  }

  override def getOutputs = Some(Seq(out))

  val kp = new InputPort[double](this) {
    override val name = "kp"
    override val description = "kp constant"
  }

  val ki = new InputPort[double](this) {
    override val name = "ki"
    override val description = "ki constant"
  }

  val kd = new InputPort[double](this) {
    override val name = "kd"
    override val description = "kd constant"
  }

  val min = new InputPort[double](this) {
    override val name = "min"
    override val description = "min constant"
  }

  val max = new InputPort[double](this) {
    override val name = "max"
    override val description = "max constant"
  }

  val measure = new InputPort[int32](this) {
    override val name = "measure"
    override val description = "input measure"
  }

  val setpoint = new InputPort[uint16](this) {
    override val name = "setpoint"
    override val description = "setpoint"
  }

  override def getInputs = Some(Seq(kp, ki, kd, min, max, measure, setpoint))

  /* Code generation */

  private val valName: String = valName("pid")
  private val outName: String = outValName()

  override def getGlobalCode = {
    val res = s"pid_t $valName;"
    if (Settings.GEN_VERBOSE_CODE)
      Some(res + s"\t\t\t\t\t// $out") // Print a description of the output
    else
      Some(res)
  }

  override def getInitCode = {
    val vKp = ComponentManager.findPredecessorOutputPort(kp).getValue
    val vKi = ComponentManager.findPredecessorOutputPort(ki).getValue
    val vKd = ComponentManager.findPredecessorOutputPort(kd).getValue

    val vMin = ComponentManager.findPredecessorOutputPort(min).getValue
    val vMax = ComponentManager.findPredecessorOutputPort(max).getValue

    // PID initialisation
    Some(s"pid_init(&$valName, $vKp, $vKi, $vKd, $vMin, $vMax);")
  }

  override def getLoopableCode = {
    // Read the measure and the setpoint value
    val vMes = ComponentManager.findPredecessorOutputPort(measure).getValue
    val vPoint = ComponentManager.findPredecessorOutputPort(setpoint).getValue

    val res = new StringBuilder
    res ++= s"$valName.state.setpoint = $vPoint;\n"
    res ++= s"${uint16().getType} $outName = pid_step(&$valName, $vMes);"
    Some(res.result())
  }

  override def getIncludeCode = Seq("demo/pid.h", "utils/delay.h")
}

object PID {

  import hevs.especial.dsl.components.CType.Implicits._

  def apply(kp: Double, ki: Double, kd: Double, min: Double = 0.0, max: Double = 4096.0) = {
    // Create and connect constant as PID settings
    val pid = new PID()
    Constant[double](kd).out --> pid.kd
    Constant[double](kp).out --> pid.kp
    Constant[double](ki).out --> pid.ki
    Constant[double](min).out --> pid.min
    Constant[double](max).out --> pid.max
    pid
  }
}

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Kanboard\Controller;

/**
 * Class TaskGanttCreationController
 *
 * @package Kanboard\Controller
 * @author  Frederic Guillot
 */
class TaskGanttCreationController extends BaseController
{
    /**
     * Simplified form to create a new task
     *
     * @access public
     * @param  array $values
     * @param  array $errors
     * @throws \Kanboard\Core\Controller\PageNotFoundException
     */
    public function show(array $values = array(), array $errors = array())
    {
        $project = $this->getProject();

        $values = $values + array(
                'project_id' => $project['id'],
                'column_id' => $this->columnModel->getFirstColumnId($project['id']),
                'position' => 1
            );

        $values = $this->hook->merge('controller:task:form:default', $values, array('default_values' => $values));
        $values = $this->hook->merge('controller:gantt:task:form:default', $values, array('default_values' => $values));

        $this->response->html($this->template->render('task_gantt_creation/show', array(
            'project' => $project,
            'errors' => $errors,
            'values' => $values,
            'users_list' => $this->projectUserRoleModel->getAssignableUsersList($project['id'], true, false, true),
            'colors_list' => $this->colorModel->getList(),
            'categories_list' => $this->categoryModel->getList($project['id']),
            'swimlanes_list' => $this->swimlaneModel->getList($project['id'], false, true),
            'title' => $project['name'].' > '.t('New task')
        )));
    }

    /**
     * Validate and save a new task
     *
     * @access public
     */
    public function save()
    {
        $project = $this->getProject();
        $values = $this->request->getValues();

        list($valid, $errors) = $this->taskValidator->validateCreation($values);

        if ($valid) {
            $task_id = $this->taskCreationModel->create($values);

            if ($task_id !== false) {
                $this->flash->success(t('Task created successfully.'));
                return $this->response->redirect($this->helper->url->to('TaskGanttController', 'show', array('project_id' => $project['id'])));
            } else {
                $this->flash->failure(t('Unable to create your task.'));
            }
        }

        return $this->show($values, $errors);
    }
}


text:
require "json_api_errors/templates"
require "json_api_errors/templates/default"
require "forwardable"

# JsonApiErrors::Error
# ====================
#
# An error object that by default conforms to the JsonAPI error spec.
# See: http://jsonapi.org/format/#errors
#
# When you initialize a new instance of JsonApiErrors::Error without any
# arguments, you receive an error object with default values. The defaults
# only serve to demonstrate what an error following the entire spec looks like.
# Other than that they are not helpful because it's difficult to know exactly
# what a default error means. So you need to configure the error you wish to generate.
#
# There are two parts to configuring an error object:
#
# TODO: I've overhauled the mechanism for creating error objects. I've opted to
# inject error templates into the error object. The initializer no longer takes
# an implicit block. I need to document this change.

module JsonApiErrors
  class Error

    extend Forwardable

    attr_accessor :template

    def initialize(template: JsonApiErrors::Templates::Default.new)
      @template = template
    end

    def call
      template.render
    end

    def status_code
      template.status
    end
  end
end


text:
layout: post
title: "Which word is better for hotword"
date:   2014-04-11 00:00:00
categories: development
---

Do you plan to make a hotword?

#### Preliminary

Sorry for my English

Hotword used for always-listening would be

 - easy and friendly
 - not frequently used in the real world
 - more than two words

#### Why easy and friendly?

The hotword is uttered by human, so it is easy to pronounce. Also hotword feels like calling a robot because the user will command after hotword.

#### Why not frequently used?

The hotword is detected in the continuous speech signal. If the frequently used word will be detected unintentionally.

#### Two word or more

Less than? False acceptance increases.

#### EX) OK Google ?

How long have you met 'Google'? Your answer will explain How much we are familiar Google. OK? Even though my native language is not English, I always say OK. The two words are easy and friendly. However the combination is never used before Google launched it.

> blogger.com에서 이동 - 2014/07/14


text:
export default function getWindow(node) {
  if (node == null) {
    return window;
  }

  if (node.toString() !== '[object Window]') {
    var ownerDocument = node.ownerDocument;
    return ownerDocument ? ownerDocument.defaultView || window : window;
  }

  return node;
}


text:
import sys
sys.path.append("gen-py")
from hello import HelloSvc

from thrift.transport import TSocket
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol

trans = TSocket.TSocket("localhost", 9090)
trans = TTransport.TBufferedTransport(trans)
proto = TBinaryProtocol.TBinaryProtocol(trans)
client = HelloSvc.Client(proto)

trans.open()
msg = client.hello_func()
print("[Client] received: %s" % msg)
trans.close()


text:
(function() {
  module('glift.parse.sgfTest');

  test('Parse simple, real problem', function() {
    var mt = glift.parse.sgf(testdata.sgfs.realproblem);
    ok(mt !== undefined, 'must not be undefined');
    var rp = mt.properties();
    ok(rp.getAllValues('GM') !== null, 'must find prop: GM');
    deepEqual(rp.getAllValues('GM'), ['1'], 'GM must be 1');
  });

  test('Parse problem with lots of properties, escaped bracket', function() {
    var mt = glift.parse.sgf(testdata.sgfs.marktest);
    var props = mt.properties();
    deepEqual(props.getOneValue('C'), '[Mark Test]');
  });

  test('Another escaped bracket test', function() {
    var mt = glift.parse.sgf('(;GM[1]C[Kashomon [1k\\]])');
    var props = mt.properties();
    deepEqual(props.getOneValue('C'), 'Kashomon [1k]');
  });

  test('Pre-process point rectangle', function() {
    var mt = glift.parse.sgf('(;GM[1]AW[aa:bb])');
    var props = mt.properties();
    deepEqual(props.getAllValues('AW'), ['aa', 'ba', 'ab', 'bb']);
  });

  test('Parse pass', function() {
    var sgf = '(;GM[1]C[It begins];B[]C[pass])';
    var mt = glift.parse.sgf(sgf);
    ok(mt !== undefined);
    var rp = mt.properties();
    deepEqual(rp.getAllValues('GM'), ['1']);
    deepEqual(rp.getAllValues('C'), ['It begins']);
    mt.moveDown();
    var rp = mt.properties();
    deepEqual(rp.getAllValues('B'), ['']);
    deepEqual(rp.getAllValues('C'), ['pass']);
  });

  test('Parse warning on unknown props', function() {
    var oldLog = glift.util.logz;
    var parseErrors = [];
    var testLogger = function(msg) {
      parseErrors.push(msg);
    };
    // Patch in a testing logger.
    glift.util.logz = testLogger;

    var sgf = '(;GM[1]C[It begins]ZZ[zz]Z[1];B[]C[pass])';
    var mt = glift.parse.sgf(sgf);
    deepEqual(parseErrors.length, 4);
    ok(parseErrors[0].indexOf('Parsing Warning') !== -1,
        'Actual msg: ' + parseErrors[0]);
    ok(parseErrors[1].indexOf('The property [ZZ] is not valid') !== -1,
        'Actual msg: ' + parseErrors[1]);

    ok(parseErrors[2].indexOf('Parsing Warning') !== -1,
        'Actual msg: ' + parseErrors[2]);
    ok(parseErrors[3].indexOf('The property [Z] is not valid') !== -1,
        'Actual msg: ' + parseErrors[3]);

    // reset the logger
    glift.util.logz = oldLog;
  });

  test('Produce warnings on end-of-sgf garbage.', function() {
    var oldLog = glift.util.logz;
    var parseErrors = [];
    var sgf = '(;GB[1]C[Foo])C[Foo])'
    var testLogger = function(msg) {
      parseErrors.push(msg);
    };
    glift.util.logz = testLogger;

    var mt = glift.parse.sgf(sgf);
    deepEqual(parseErrors.length, 7);
    ok(parseErrors[0].indexOf('Garbage after finishing the SGF.') !== -1);

    glift.util.logz = oldLog;
  });

  test('Produce warnings on too-long-properties.', function() {
    var oldLog = glift.util.logz;
    var parseErrors = [];
    var sgf = '(;GB[1]C[Foo]MULTIGOGM[1])';
    var testLogger = function(msg) {
      parseErrors.push(msg);
    };
    glift.util.logz = testLogger;

    var mt = glift.parse.sgf(sgf);
    deepEqual(parseErrors.length, 2);
    ok(parseErrors[0].indexOf('Unknown property: MULTIGOGM') !== -1);
    ok(parseErrors[1].indexOf('[MULTIGOGM] is not valid') !== -1);
    glift.util.logz = oldLog;
  });

  test('Throw errors on bad syntax: no first paren', function() {
    var sgf = ';GM[1]'
    try {
      var mt = glift.parse.sgf(sgf);
    } catch (err) {
      ok(err.message.indexOf('Expected first non-whitespace char') !== -1);
    }
  });

  test('Throw errors on bad syntax: no first semicolon', function() {
    var sgf = '(GM[1])'
    try {
      var mt = glift.parse.sgf(sgf);
    } catch (err) {
      ok(err.message.indexOf('Expected char to be [;]') !== -1);
    }
  });

  test('Throw errors on bad syntax: whitespace in prop', function() {
    var sgf = '(;G M[1])'
    try {
      var mt = glift.parse.sgf(sgf);
    } catch (err) {
      ok(err.message.indexOf('Unexpected whitespace in property') !== -1);
    }
  });

  test('Throw errors on bad syntax: underscore in prop', function() {
    var sgf = '(;G_[1])'
    try {
      var mt = glift.parse.sgf(sgf);
    } catch (err) {
      ok(err.message.indexOf('Unexpected character in property') !== -1);
    }
  });

  test('Process Metadata at root', function() {
    var oldval = glift.parse.sgfMetadataProperty;
    glift.parse.sgfMetadataProperty = 'GC';

    var expected = {foo: 'bar'};

    var sgf = '(;GM[1]' +
        glift.parse.sgfMetadataProperty +
        '[' + JSON.stringify(expected) + '])';

    var mt = glift.parse.sgf(sgf);
    deepEqual(mt.metadata(), expected);

    glift.parse.sgfMetadataProperty = oldval;
  });

  test('Process Metadata at root', function() {
    var oldval = glift.parse.sgfMetadataProperty;
    glift.parse.sgfMetadataProperty = 'GC';

    var expected = {foo: 'bar'};

    var sgf = '(;GM[1]' +
        glift.parse.sgfMetadataProperty +
        '[' + JSON.stringify(expected) + '])';

    var mt = glift.parse.sgf(sgf);
    deepEqual(mt.metadata(), expected);
    glift.parse.sgfMetadataProperty = oldval;
  });

  test('Fail to process Metadata at root: bad JSON', function() {
    var oldval = glift.parse.sgfMetadataProperty;
    glift.parse.sgfMetadataProperty = 'GC';

    var oldLog = glift.util.logz;
    var parseErrors = [];
    var testLogger = function(msg) {
      parseErrors.push(msg);
    };

    // Patch in a testing logger.
    glift.util.logz = testLogger;
    var sgf = '(;GM[1]' + glift.parse.sgfMetadataProperty + '[foo: bar])';
    var mt = glift.parse.sgf(sgf);

    deepEqual(parseErrors.length, 1);
    ok(/Tried to parse property GC/.test(parseErrors[0]),
        'Regex does not match: ' + parseErrors[0]);

    deepEqual(mt.properties().getOneValue('GC'), 'foo: bar',
        'Should still record value in prop data.');

    glift.parse.sgfMetadataProperty = oldval;
    glift.util.logz = oldLog;
  });

  test('Ignore metadata: not at root', function() {
    var oldval = glift.parse.sgfMetadataProperty;
    glift.parse.sgfMetadataProperty = 'GC';

    var sgf = '(;GM[1];' + glift.parse.sgfMetadataProperty + '[foo: bar])';
    var mt = glift.parse.sgf(sgf);
    deepEqual(mt.metadata(), null);

    glift.parse.sgfMetadataProperty = oldval;
  });

  test('Rectangles of stones', function() {
    var sgf = '(;GM[1]AB[pb:sb][oc][sc][nd][oe:pe]AW[pa:qa]' +
        '[nb:ob][mc:me][qc:rc][re][nf][pf:pg][rg];B[rd]GB[])'
    var mt = glift.parse.sgf(sgf);
    var wstones = mt.properties().getAllValues('AW');
    var smap = {};
    for (var i = 0; i < wstones.length; i++) {
      smap[wstones[i]] = true;
    }
    ok(smap['nb'], 'nb stone');
    ok(smap['ob'], 'ob stone');
  });

  test('Parse Tygem', function() {
    var mt = glift.parse.fromString(testdata.gib.tygemExampleNewer, 'TYGEM');
    deepEqual(mt.properties().getOneValue('PW'), 'Zellnox (2D)');
    deepEqual(mt.properties().getOneValue('PB'), 'pdy1800 (1D)');
  });
})();


text:
namespace XenAdmin.Controls.ConsoleTab
{
    partial class FullScreenForm
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FullScreenForm));
            this.connectionBar1 = new XenAdmin.Controls.ConsoleTab.ConnectionBar();
            this.contentPanel = new System.Windows.Forms.Panel();
            this.SuspendLayout();
            //
            // connectionBar1
            //
            resources.ApplyResources(this.connectionBar1, "connectionBar1");
            this.connectionBar1.BackColor = System.Drawing.Color.Transparent;
            this.connectionBar1.Name = "connectionBar1";
            this.connectionBar1.TabStop = false;
            //
            // contentPanel
            //
            resources.ApplyResources(this.contentPanel, "contentPanel");
            this.contentPanel.BackColor = System.Drawing.SystemColors.Control;
            this.contentPanel.Name = "contentPanel";
            this.contentPanel.TabStop = true;
            //
            // FullScreenForm
            //
            resources.ApplyResources(this, "$this");
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
            this.BackColor = System.Drawing.Color.Black;
            this.Controls.Add(this.connectionBar1);
            this.Controls.Add(this.contentPanel);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "FullScreenForm";
            this.ShowIcon = false;
            this.ShowInTaskbar = false;
            this.ResumeLayout(false);

        }

        #endregion

        private ConnectionBar connectionBar1;
        private System.Windows.Forms.Panel contentPanel;
    }
}


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>T16592255486</title>
  <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Source+Sans+Pro:300,300i,600">
  <link rel="stylesheet" href="/style.css">
  <link rel="stylesheet" href="/custom.css">

  <link rel="alternate" type="application/rss+xml" title="Des Paroz" href="https://desparoz.me/feed.xml" />
  <link rel="alternate" type="application/json" title="Des Paroz" href="https://desparoz.me/feed.json" />
  <link rel="EditURI" type="application/rsd+xml" href="/rsd.xml" />

  <link rel="me" href="https://micro.blog/desparoz" />

  	<link rel="me" href="https://twitter.com/desparoz" />

  	<link rel="me" href="https://github.com/desparoz" />

  <link rel="authorization_endpoint" href="https://indieauth.com/auth" />
  <link rel="token_endpoint" href="https://tokens.indieauth.com/token" />
  <link rel="micropub" href="https://micro.blog/micropub" />
  <link rel="webmention" href="https://micro.blog/webmention" />
  <link rel="subscribe" href="https://micro.blog/users/follow" />

    Des Paroz

    <time class="dt-published" datetime="2010-06-20 03:00:00 +0300">20 Jun 2010</time>

I'd run out of cards to issue. RT @jjprojects: Watching #worldcup it strikes me that everday life could do with a yellow & red card system


text:
use std::fmt::Debug;
use runner::Engine;
use runner::program::TableInsts;

#[derive(Clone, Debug)]
pub struct AnchoredEngine<Ret> {
    prog: TableInsts<Ret>,
}

impl<Ret: Copy + Debug> AnchoredEngine<Ret> {
    pub fn new(prog: TableInsts<Ret>) -> AnchoredEngine<Ret> {
        AnchoredEngine {
            prog: prog,
        }
    }
}

impl<Ret: Copy + Debug + 'static> Engine<Ret> for AnchoredEngine<Ret> {
    fn find(&self, s: &str) -> Option<(usize, usize, Ret)> {
        let input = s.as_bytes();
        if self.prog.is_empty() {
            None
        } else if let Ok(end) = self.prog.find_from(input, 0, 0) {
            Some((0, end.0, end.1))
        } else {
            None
        }
    }

    fn clone_box(&self) -> Box<Engine<Ret>> {
        Box::new(self.clone())
    }
}


text:
Emoji Keyboard (Emoji 12)
==============

Packed with thousands of Emojis!
Requires Windows 7

Alternatives
------------
Since the Windows 10 April 2018 Update update, you can open the built-in emoji picker with `Win+.`. It is missing support for flags and emojis newer than the OS.

How to use
----------
Install [Autohotkey](https://autohotkey.com/) and then launch App.ahk. It will then stay in system tray until you call it.

Open it with the `Caps Lock` key. You can still enable Caps Lock with Shift+Caps Lock.
You can also use a double click on the tray icon. (Look for `Capslock` in the *App.ahk* file to change the shortcut).

Use the shown keyboard keys to navigate between the categories and type the Emojis. You can also use the mouse. You can move the window and resize it as you wish. If you use another keymap, pay only attention to the position of the different keys.

To exit completely, do a right click on the tray icon and choose Exit.

You can save your preferred size in the webapp.json file. Just change the values next to width and height.
You can also choose on which monitor the keyboard should show with monitor.

There are different available themes. Currently there is the default "light" theme and a "dark" theme similar to the Windows 10 touch keyboard.

Skinnable emojis are signaled by a yellow indicator, right click or use the shift key to see the different skins.

The [Twemoji Pack](https://github.com/twitter/twemoji) is used as a fallback for Emojis not supported by your Windows version.

The flags and the newest Emojis are currently not supported by Windows. You can still use them in 3rd-party applications or sites like Whatsapp or Twitter.
Flags are sorted by ISO code, meaning you'll find Switzerland (CH) on page 2, between Congo and Côte d'Ivoire.

Keymaps
-------
This application supports 209 different keymaps. You can define it in the webapp.json file under keymap. Changing the keymap requires a restart.
Some keymaps are: en, blank, fr-CH, en-dvorak, uk, etc. See all keymaps in the [keymap file](keymaps.md).

Customize
---------
For information on how to customize the keyboard, see [the README in the res folder](res/README.md).
The keyboard view is realized using an embedded Internet Explorer control, as native AHK controls do not support Emojis at the moment.
Some characters may use a fallback image because they are not rendered properly, but they are supported by the OS.

Screenshots
-----------

Other animals, dark theme, keyboard en-dvorakl

Skinned emojis, dark theme, keyboard el (greek)


text:
import type { ValidationContext } from '../index';
import { GraphQLError } from '../../error';

export function duplicateOperationNameMessage(operationName: string): string {
  return `There can be only one operation named "${operationName}".`;
}

/**
 * Unique operation names
 *
 * A GraphQL document is only valid if all defined operations have unique names.
 */
export function UniqueOperationNames(context: ValidationContext): any {
  const knownOperationNames = Object.create(null);
  return {
    OperationDefinition(node) {
      const operationName = node.name;
      if (operationName) {
        if (knownOperationNames[operationName.value]) {
          context.reportError(new GraphQLError(
            duplicateOperationNameMessage(operationName.value),
            [ knownOperationNames[operationName.value], operationName ]
          ));
        } else {
          knownOperationNames[operationName.value] = operationName;
        }
      }
      return false;
    },
    FragmentDefinition: () => false,
  };
}


text:
@import url(fonts/clear-sans.css);
html, body {
  margin: 0;
  padding: 0;
  background: #faf8ef;
  color: #776e65;
  font-family: "Clear Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 18px; }

body {
  margin: 80px 0; }

.heading:after {
  content: "";
  display: block;
  clear: both; }

h1.title {
  font-size: 80px;
  font-weight: bold;
  margin: 0;
  display: block;
  float: left; }

@-webkit-keyframes move-up {
  0% {
    top: 25px;
    opacity: 1; }

  100% {
    top: -50px;
    opacity: 0; } }

@-moz-keyframes move-up {
  0% {
    top: 25px;
    opacity: 1; }

  100% {
    top: -50px;
    opacity: 0; } }

@keyframes move-up {
  0% {
    top: 25px;
    opacity: 1; }

  100% {
    top: -50px;
    opacity: 0; } }

@-webkit-keyframes rotate-board {
  0% {
    -webkit-transform: rotateY(0deg);
    -moz-transform: rotateY(0deg);
    transform: rotateY(0deg); }

  100% {
    -webkit-transform: rotateY(360deg);
    -moz-transform: rotateY(360deg);
    transform: rotateY(360deg); } }

@-moz-keyframes rotate-board {
  0% {
    -webkit-transform: rotateY(0deg);
    -moz-transform: rotateY(0deg);
    transform: rotateY(0deg); }

  100% {
    -webkit-transform: rotateY(360deg);
    -moz-transform: rotateY(360deg);
    transform: rotateY(360deg); } }

@keyframes rotate-board {
  0% {
    -webkit-transform: rotateY(0deg);
    -moz-transform: rotateY(0deg);
    transform: rotateY(0deg); }

  100% {
    -webkit-transform: rotateY(360deg);
    -moz-transform: rotateY(360deg);
    transform: rotateY(360deg); } }

.rotate {
  -webkit-animation: rotate-board 8s ease-out;
  -moz-animation: rotate-board 8s ease-out;
  animation: rotate-board 8s ease-out;
  -moz-transform: perspective(1000px);
  -webkit-transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
  -o-transform-style: preserve-3d;
  -ms-transform-style: preserve-3d;
  transform-style: preserve-3d; }

.scores-container {
  position: absolute;
  right: 0;
  text-align: right; }

.score-container, .best-container {
  position: relative;
  display: inline-block;
  background: #bbada0;
  padding: 15px 25px;
  font-size: 25px;
  height: 25px;
  line-height: 47px;
  font-weight: bold;
  border-radius: 3px;
  color: white;
  margin-top: 8px;
  text-align: center; }
  .score-container:after, .best-container:after {
    position: absolute;
    width: 100%;
    top: 10px;
    left: 0;
    text-transform: uppercase;
    font-size: 13px;
    line-height: 13px;
    text-align: center;
    color: #eee4da; }
  .score-container .score-addition, .best-container .score-addition {
    position: absolute;
    right: 30px;
    color: red;
    font-size: 25px;
    line-height: 25px;
    font-weight: bold;
    color: rgba(119, 110, 101, 0.9);
    z-index: 100;
    -webkit-animation: move-up 600ms ease-in;
    -moz-animation: move-up 600ms ease-in;
    animation: move-up 600ms ease-in;
    -webkit-animation-fill-mode: both;
    -moz-animation-fill-mode: both;
    animation-fill-mode: both; }

.score-container:after {
  content: "Score"; }

.best-container:after {
  content: "Best"; }

.rotate-button {
  background: #bbada0;
  padding: 15px 25px;
  font-size: 25px;
  height: 25px;
  line-height: 47px;
  font-weight: bold;
  border-radius: 3px;
  color: white; }

p {
  margin-top: 0;
  margin-bottom: 10px;
  line-height: 1.65; }

a {
  color: #776e65;
  font-weight: bold;
  text-decoration: underline;
  cursor: pointer; }

strong.important {
  text-transform: uppercase; }

hr {
  border: none;
  border-bottom: 1px solid #d8d4d0;
  margin-top: 20px;
  margin-bottom: 30px; }

.container {
  width: 500px;
  margin: 0 auto;
  -webkit-perspective: 1000px;
  -moz-perspective: 1000px;
  -o-perspective: 1000px;
  perspective: 1000px;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden; }

@-webkit-keyframes fade-in {
  0% {
    opacity: 0; }

  100% {
    opacity: 1; } }

@-moz-keyframes fade-in {
  0% {
    opacity: 0; }

  100% {
    opacity: 1; } }

@keyframes fade-in {
  0% {
    opacity: 0; }

  100% {
    opacity: 1; } }

.game-container {
  margin-top: 40px;
  position: relative;
  padding: 15px;
  cursor: default;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  background: #bbada0;
  border-radius: 6px;
  width: 500px;
  height: 500px;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box; }
  .game-container .announcer {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
    height: 100%;
    pointer-events: none;
    -webkit-transform: translateZ(300px);
    -moz-transform: translateZ(300px);
    transform: translateZ(300px); }
    .game-container .announcer .announcement {
      position: absolute;
      font-size: 48px;
      font-weight: bold;
      text-align: center;
      line-height: 1.0em;
      height: 90px;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      margin: auto;
      -webkit-animation: fade-in-out 600ms ease-in;
      -moz-animation: fade-in-out 600ms ease-in;
      animation: fade-in-out 600ms ease-in;
      -webkit-animation-fill-mode: both;
      -moz-animation-fill-mode: both;
      animation-fill-mode: both; }
  .game-container .game-message {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(238, 228, 218, 0.5);
    z-index: 100;
    text-align: center;
    -webkit-animation: fade-in 800ms ease 1200ms;
    -moz-animation: fade-in 800ms ease 1200ms;
    animation: fade-in 800ms ease 1200ms;
    -webkit-animation-fill-mode: both;
    -moz-animation-fill-mode: both;
    animation-fill-mode: both; }
    .game-container .game-message p {
      font-size: 60px;
      font-weight: bold;
      height: 60px;
      line-height: 60px;
      margin-top: 188px; }
    .game-container .game-message .lower {
      display: block;
      margin-top: 59px; }
    .game-container .game-message a {
      display: inline-block;
      background: #8f7a66;
      border-radius: 3px;
      padding: 0 20px;
      text-decoration: none;
      color: #f9f6f2;
      height: 40px;
      line-height: 42px;
      margin-left: 9px; }
      .game-container .game-message a.keep-playing-button {
        display: none; }
    .game-container .game-message .score-sharing {
      display: inline-block;
      vertical-align: middle;
      margin-left: 10px; }
    .game-container .game-message.game-won {
      background: rgba(237, 194, 46, 0.5);
      color: #f9f6f2; }
      .game-container .game-message.game-won a.keep-playing-button {
        display: inline-block; }
    .game-container .game-message.game-won, .game-container .game-message.game-over {
      display: block; }

.board-container {
  position: relative;
  background-color: #bbada0;
  width: 100%;
  height: 100%; }

.behind-board {
  background-size: cover;
  background-position: center;
  z-index: -100;
  width: 100%;
  height: 100%;
  -webkit-transform: rotateY(180deg) translateZ(1px);
  -moz-transform: rotateY(180deg) translateZ(1px);
  transform: rotateY(180deg) translateZ(1px);
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  backface-visibility: hidden; }

.grid-container {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  -webkit-transform: translateZ(1px);
  -moz-transform: translateZ(1px);
  transform: translateZ(1px); }

.grid-row {
  margin-bottom: 15px; }
  .grid-row:last-child {
    margin-bottom: 0; }
  .grid-row:after {
    content: "";
    display: block;
    clear: both; }

.grid-cell {
  width: 106.25px;
  height: 106.25px;
  margin-right: 15px;
  float: left;
  border-radius: 3px;
  background: rgba(238, 228, 218, 0.35); }
  .grid-cell:last-child {
    margin-right: 0; }

.tile-container {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  -webkit-transform: translateZ(2px);
  -moz-transform: translateZ(2px);
  transform: translateZ(2px); }

.tile, .tile .tile-inner {
  width: 107px;
  height: 107px;
  line-height: 116.25px; }
.tile.tile-position-1-1 {
  -webkit-transform: translate(0px, 0px);
  -moz-transform: translate(0px, 0px);
  transform: translate(0px, 0px); }
.tile.tile-position-1-2 {
  -webkit-transform: translate(0px, 121px);
  -moz-transform: translate(0px, 121px);
  transform: translate(0px, 121px); }
.tile.tile-position-1-3 {
  -webkit-transform: translate(0px, 242px);
  -moz-transform: translate(0px, 242px);
  transform: translate(0px, 242px); }
.tile.tile-position-1-4 {
  -webkit-transform: translate(0px, 363px);
  -moz-transform: translate(0px, 363px);
  transform: translate(0px, 363px); }
.tile.tile-position-2-1 {
  -webkit-transform: translate(121px, 0px);
  -moz-transform: translate(121px, 0px);
  transform: translate(121px, 0px); }
.tile.tile-position-2-2 {
  -webkit-transform: translate(121px, 121px);
  -moz-transform: translate(121px, 121px);
  transform: translate(121px, 121px); }
.tile.tile-position-2-3 {
  -webkit-transform: translate(121px, 242px);
  -moz-transform: translate(121px, 242px);
  transform: translate(121px, 242px); }
.tile.tile-position-2-4 {
  -webkit-transform: translate(121px, 363px);
  -moz-transform: translate(121px, 363px);
  transform: translate(121px, 363px); }
.tile.tile-position-3-1 {
  -webkit-transform: translate(242px, 0px);
  -moz-transform: translate(242px, 0px);
  transform: translate(242px, 0px); }
.tile.tile-position-3-2 {
  -webkit-transform: translate(242px, 121px);
  -moz-transform: translate(242px, 121px);
  transform: translate(242px, 121px); }
.tile.tile-position-3-3 {
  -webkit-transform: translate(242px, 242px);
  -moz-transform: translate(242px, 242px);
  transform: translate(242px, 242px); }
.tile.tile-position-3-4 {
  -webkit-transform: translate(242px, 363px);
  -moz-transform: translate(242px, 363px);
  transform: translate(242px, 363px); }
.tile.tile-position-4-1 {
  -webkit-transform: translate(363px, 0px);
  -moz-transform: translate(363px, 0px);
  transform: translate(363px, 0px); }
.tile.tile-position-4-2 {
  -webkit-transform: translate(363px, 121px);
  -moz-transform: translate(363px, 121px);
  transform: translate(363px, 121px); }
.tile.tile-position-4-3 {
  -webkit-transform: translate(363px, 242px);
  -moz-transform: translate(363px, 242px);
  transform: translate(363px, 242px); }
.tile.tile-position-4-4 {
  -webkit-transform: translate(363px, 363px);
  -moz-transform: translate(363px, 363px);
  transform: translate(363px, 363px); }

.tile {
  position: absolute;
  -webkit-transition: 100ms ease-in-out;
  -moz-transition: 100ms ease-in-out;
  transition: 100ms ease-in-out;
  -webkit-transition-property: -webkit-transform;
  -moz-transition-property: -moz-transform;
  transition-property: transform; }
  .tile .tile-inner {
    border-radius: 3px;
    background: #eee4da;
    text-align: center;
    font-weight: bold;
    z-index: 10;
    font-size: 55px;
    overflow: hidden; }
    .tile .tile-inner.flipped {
      -webkit-transform: scale(-1, 1);
      -moz-transform: scale(-1, 1);
      transform: scale(-1, 1); }
  .tile.tile-small-4 .tile-inner {
    font-size: 44px !important; }
  .tile.tile-small-5 .tile-inner {
    font-size: 35px !important; }
  .tile.tile-small-6 .tile-inner {
    font-size: 25px !important; }
  .tile.tile-2 .tile-inner {
    background: #eee4da;
    box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0), inset 0 0 0 1px rgba(255, 255, 255, 0); }
  .tile.tile-4 .tile-inner {
    background: #ede0c8;
    box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0), inset 0 0 0 1px rgba(255, 255, 255, 0); }
  .tile.tile-8 .tile-inner {
    color: #f9f6f2;
    background: #f2b179; }
  .tile.tile-16 .tile-inner {
    color: #f9f6f2;
    background: #f59563; }
  .tile.tile-32 .tile-inner {
    color: #f9f6f2;
    background: #f67c5f; }
  .tile.tile-64 .tile-inner {
    color: #f9f6f2;
    background: #f65e3b; }
  .tile.tile-128 .tile-inner {
    color: #f9f6f2;
    background: #edcf72;
    box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.2381), inset 0 0 0 1px rgba(255, 255, 255, 0.14286);
    font-size: 45px; }
    @media screen and (max-width: 520px) {
      .tile.tile-128 .tile-inner {
        font-size: 25px; } }
  .tile.tile-256 .tile-inner {
    color: #f9f6f2;
    background: #edcc61;
    box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.31746), inset 0 0 0 1px rgba(255, 255, 255, 0.19048);
    font-size: 45px; }
    @media screen and (max-width: 520px) {
      .tile.tile-256 .tile-inner {
        font-size: 25px; } }
  .tile.tile-512 .tile-inner {
    color: #f9f6f2;
    background: #edc850;
    box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.39683), inset 0 0 0 1px rgba(255, 255, 255, 0.2381);
    font-size: 45px; }
    @media screen and (max-width: 520px) {
      .tile.tile-512 .tile-inner {
        font-size: 25px; } }
  .tile.tile-1024 .tile-inner {
    color: #f9f6f2;
    background: #edc53f;
    box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.47619), inset 0 0 0 1px rgba(255, 255, 255, 0.28571);
    font-size: 35px; }
    @media screen and (max-width: 520px) {
      .tile.tile-1024 .tile-inner {
        font-size: 15px; } }
  .tile.tile-2048 .tile-inner {
    color: #f9f6f2;
    background: #edc22e;
    box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.55556), inset 0 0 0 1px rgba(255, 255, 255, 0.33333);
    font-size: 35px; }
    @media screen and (max-width: 520px) {
      .tile.tile-2048 .tile-inner {
        font-size: 15px; } }
  .tile.tile-super .tile-inner {
    color: #f9f6f2;
    background: #3c3a32;
    font-size: 30px; }
    @media screen and (max-width: 520px) {
      .tile.tile-super .tile-inner {
        font-size: 10px; } }

@-webkit-keyframes appear {
  0% {
    opacity: 0;
    -webkit-transform: scale(0);
    -moz-transform: scale(0);
    transform: scale(0); }

  100% {
    opacity: 1;
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    transform: scale(1); } }

@-moz-keyframes appear {
  0% {
    opacity: 0;
    -webkit-transform: scale(0);
    -moz-transform: scale(0);
    transform: scale(0); }

  100% {
    opacity: 1;
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    transform: scale(1); } }

@keyframes appear {
  0% {
    opacity: 0;
    -webkit-transform: scale(0);
    -moz-transform: scale(0);
    transform: scale(0); }

  100% {
    opacity: 1;
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    transform: scale(1); } }

.tile-new .tile-inner {
  -webkit-animation: appear 200ms ease 100ms;
  -moz-animation: appear 200ms ease 100ms;
  animation: appear 200ms ease 100ms;
  -webkit-animation-fill-mode: backwards;
  -moz-animation-fill-mode: backwards;
  animation-fill-mode: backwards; }

@-webkit-keyframes pop {
  0% {
    -webkit-transform: scale(0);
    -moz-transform: scale(0);
    transform: scale(0); }

  50% {
    -webkit-transform: scale(1.2);
    -moz-transform: scale(1.2);
    transform: scale(1.2); }

  100% {
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    transform: scale(1); } }

@-moz-keyframes pop {
  0% {
    -webkit-transform: scale(0);
    -moz-transform: scale(0);
    transform: scale(0); }

  50% {
    -webkit-transform: scale(1.2);
    -moz-transform: scale(1.2);
    transform: scale(1.2); }

  100% {
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    transform: scale(1); } }

@keyframes pop {
  0% {
    -webkit-transform: scale(0);
    -moz-transform: scale(0);
    transform: scale(0); }

  50% {
    -webkit-transform: scale(1.2);
    -moz-transform: scale(1.2);
    transform: scale(1.2); }

  100% {
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    transform: scale(1); } }

.tile-merged .tile-inner {
  z-index: 20;
  -webkit-animation: pop 200ms ease 100ms;
  -moz-animation: pop 200ms ease 100ms;
  animation: pop 200ms ease 100ms;
  -webkit-animation-fill-mode: backwards;
  -moz-animation-fill-mode: backwards;
  animation-fill-mode: backwards; }

.game-intro {
  margin-bottom: 0;
  position: relative; }
  .game-intro p {
    line-height: 1.40;
    width: 250px; }

.game-explanation {
  margin-top: 50px; }

.sharing {
  margin-top: 20px;
  text-align: center; }
  .sharing > iframe, .sharing > span, .sharing > form {
    display: inline-block;
    vertical-align: middle; }

@media screen and (max-width: 520px) {
  html, body {
    font-size: 15px; }

  body {
    margin: 20px 0;
    padding: 0 20px; }

  h1.title {
    font-size: 27px;
    margin-top: 15px; }

  .container {
    width: 280px;
    margin: 0 auto;
    -webkit-perspective: 1000px;
    -moz-perspective: 1000px;
    -o-perspective: 1000px;
    perspective: 1000px;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden; }

  .score-container, .best-container {
    margin-top: 0;
    padding: 15px 10px;
    min-width: 40px; }

  .heading {
    margin-bottom: 10px; }

  .game-container {
    margin-top: 40px;
    position: relative;
    padding: 10px;
    cursor: default;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    background: #bbada0;
    border-radius: 6px;
    width: 280px;
    height: 280px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box; }
    .game-container .announcer {
      position: absolute;
      top: 0;
      left: 0;
      z-index: 1000;
      width: 100%;
      height: 100%;
      pointer-events: none;
      -webkit-transform: translateZ(300px);
      -moz-transform: translateZ(300px);
      transform: translateZ(300px); }
      .game-container .announcer .announcement {
        position: absolute;
        font-size: 48px;
        font-weight: bold;
        text-align: center;
        line-height: 1.0em;
        height: 90px;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        margin: auto;
        -webkit-animation: fade-in-out 600ms ease-in;
        -moz-animation: fade-in-out 600ms ease-in;
        animation: fade-in-out 600ms ease-in;
        -webkit-animation-fill-mode: both;
        -moz-animation-fill-mode: both;
        animation-fill-mode: both; }
    .game-container .game-message {
      display: none;
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      background: rgba(238, 228, 218, 0.5);
      z-index: 100;
      text-align: center;
      -webkit-animation: fade-in 800ms ease 1200ms;
      -moz-animation: fade-in 800ms ease 1200ms;
      animation: fade-in 800ms ease 1200ms;
      -webkit-animation-fill-mode: both;
      -moz-animation-fill-mode: both;
      animation-fill-mode: both; }
      .game-container .game-message p {
        font-size: 60px;
        font-weight: bold;
        height: 60px;
        line-height: 60px;
        margin-top: 188px; }
      .game-container .game-message .lower {
        display: block;
        margin-top: 59px; }
      .game-container .game-message a {
        display: inline-block;
        background: #8f7a66;
        border-radius: 3px;
        padding: 0 20px;
        text-decoration: none;
        color: #f9f6f2;
        height: 40px;
        line-height: 42px;
        margin-left: 9px; }
        .game-container .game-message a.keep-playing-button {
          display: none; }
      .game-container .game-message .score-sharing {
        display: inline-block;
        vertical-align: middle;
        margin-left: 10px; }
      .game-container .game-message.game-won {
        background: rgba(237, 194, 46, 0.5);
        color: #f9f6f2; }
        .game-container .game-message.game-won a.keep-playing-button {
          display: inline-block; }
      .game-container .game-message.game-won, .game-container .game-message.game-over {
        display: block; }

  .board-container {
    position: relative;
    background-color: #bbada0;
    width: 100%;
    height: 100%; }

  .behind-board {
    background-size: cover;
    background-position: center;
    z-index: -100;
    width: 100%;
    height: 100%;
    -webkit-transform: rotateY(180deg) translateZ(1px);
    -moz-transform: rotateY(180deg) translateZ(1px);
    transform: rotateY(180deg) translateZ(1px);
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    backface-visibility: hidden; }

  .grid-container {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    -webkit-transform: translateZ(1px);
    -moz-transform: translateZ(1px);
    transform: translateZ(1px); }

  .grid-row {
    margin-bottom: 10px; }
    .grid-row:last-child {
      margin-bottom: 0; }
    .grid-row:after {
      content: "";
      display: block;
      clear: both; }

  .grid-cell {
    width: 57.5px;
    height: 57.5px;
    margin-right: 10px;
    float: left;
    border-radius: 3px;
    background: rgba(238, 228, 218, 0.35); }
    .grid-cell:last-child {
      margin-right: 0; }

  .tile-container {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    -webkit-transform: translateZ(2px);
    -moz-transform: translateZ(2px);
    transform: translateZ(2px); }

  .tile, .tile .tile-inner {
    width: 58px;
    height: 58px;
    line-height: 67.5px; }
  .tile.tile-position-1-1 {
    -webkit-transform: translate(0px, 0px);
    -moz-transform: translate(0px, 0px);
    transform: translate(0px, 0px); }
  .tile.tile-position-1-2 {
    -webkit-transform: translate(0px, 67px);
    -moz-transform: translate(0px, 67px);
    transform: translate(0px, 67px); }
  .tile.tile-position-1-3 {
    -webkit-transform: translate(0px, 135px);
    -moz-transform: translate(0px, 135px);
    transform: translate(0px, 135px); }
  .tile.tile-position-1-4 {
    -webkit-transform: translate(0px, 202px);
    -moz-transform: translate(0px, 202px);
    transform: translate(0px, 202px); }
  .tile.tile-position-2-1 {
    -webkit-transform: translate(67px, 0px);
    -moz-transform: translate(67px, 0px);
    transform: translate(67px, 0px); }
  .tile.tile-position-2-2 {
    -webkit-transform: translate(67px, 67px);
    -moz-transform: translate(67px, 67px);
    transform: translate(67px, 67px); }
  .tile.tile-position-2-3 {
    -webkit-transform: translate(67px, 135px);
    -moz-transform: translate(67px, 135px);
    transform: translate(67px, 135px); }
  .tile.tile-position-2-4 {
    -webkit-transform: translate(67px, 202px);
    -moz-transform: translate(67px, 202px);
    transform: translate(67px, 202px); }
  .tile.tile-position-3-1 {
    -webkit-transform: translate(135px, 0px);
    -moz-transform: translate(135px, 0px);
    transform: translate(135px, 0px); }
  .tile.tile-position-3-2 {
    -webkit-transform: translate(135px, 67px);
    -moz-transform: translate(135px, 67px);
    transform: translate(135px, 67px); }
  .tile.tile-position-3-3 {
    -webkit-transform: translate(135px, 135px);
    -moz-transform: translate(135px, 135px);
    transform: translate(135px, 135px); }
  .tile.tile-position-3-4 {
    -webkit-transform: translate(135px, 202px);
    -moz-transform: translate(135px, 202px);
    transform: translate(135px, 202px); }
  .tile.tile-position-4-1 {
    -webkit-transform: translate(202px, 0px);
    -moz-transform: translate(202px, 0px);
    transform: translate(202px, 0px); }
  .tile.tile-position-4-2 {
    -webkit-transform: translate(202px, 67px);
    -moz-transform: translate(202px, 67px);
    transform: translate(202px, 67px); }
  .tile.tile-position-4-3 {
    -webkit-transform: translate(202px, 135px);
    -moz-transform: translate(202px, 135px);
    transform: translate(202px, 135px); }
  .tile.tile-position-4-4 {
    -webkit-transform: translate(202px, 202px);
    -moz-transform: translate(202px, 202px);
    transform: translate(202px, 202px); }

  .game-container {
    margin-top: 20px; }
    .game-container .thats-numberwang .show-numberwang {
      font-size: 40px;
      line-height: 40px; }

  .tile .tile-inner {
    font-size: 35px; }

  .tile.tile-small-3 .tile-inner {
    font-size: 30px !important; }
  .tile.tile-small-4 .tile-inner {
    font-size: 24px !important; }
  .tile.tile-small-5 .tile-inner {
    font-size: 15px !important; }
  .tile.tile-small-6 .tile-inner {
    font-size: 9px !important; }

  .game-intro p {
    margin-top: 55px;
    top: -50px;
    position: relative; }

  .game-message p {
    font-size: 30px !important;
    height: 30px !important;
    line-height: 30px !important;
    margin-top: 90px !important; }
  .game-message .lower {
    margin-top: 30px !important; }

  .sharing > iframe, .sharing > span, .sharing > form {
    display: block;
    margin: 0 auto;
    margin-bottom: 20px; } }
.pp-donate button {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: inline-block;
  background: #8f7a66;
  border-radius: 3px;
  padding: 0 20px;
  text-decoration: none;
  color: #f9f6f2;
  height: 40px;
  line-height: 42px; }
  .pp-donate button img {
    vertical-align: -4px;
    margin-right: 8px; }

.btc-donate {
  position: relative;
  margin-left: 10px;
  display: inline-block;
  background: #8f7a66;
  border-radius: 3px;
  padding: 0 20px;
  text-decoration: none;
  color: #f9f6f2;
  height: 40px;
  line-height: 42px;
  cursor: pointer; }
  .btc-donate img {
    vertical-align: -4px;
    margin-right: 8px; }
  .btc-donate a {
    color: #f9f6f2;
    text-decoration: none;
    font-weight: normal; }
  .btc-donate .address {
    cursor: auto;
    position: absolute;
    width: 340px;
    right: 50%;
    margin-right: -170px;
    padding-bottom: 7px;
    top: -30px;
    opacity: 0;
    pointer-events: none;
    -webkit-transition: 400ms ease;
    -moz-transition: 400ms ease;
    transition: 400ms ease;
    -webkit-transition-property: top, opacity;
    -moz-transition-property: top, opacity;
    transition-property: top, opacity; }
    .btc-donate .address:after {
      position: absolute;
      border-top: 10px solid #bbada0;
      border-right: 7px solid transparent;
      border-left: 7px solid transparent;
      content: "";
      bottom: 0px;
      left: 50%;
      margin-left: -7px; }
    .btc-donate .address code {
      background-color: #bbada0;
      padding: 10px 15px;
      width: 100%;
      border-radius: 3px;
      line-height: 1;
      font-weight: normal;
      font-size: 15px;
      font-family: Consolas, "Liberation Mono", Courier, monospace;
      text-align: center; }
  .btc-donate:hover .address, .btc-donate .address:hover .address {
    opacity: 1;
    top: -45px;
    pointer-events: auto; }
  @media screen and (max-width: 480px) {
    .btc-donate {
      width: 120px; }
      .btc-donate .address {
        margin-right: -150px;
        width: 300px; }
        .btc-donate .address code {
          font-size: 13px; }
        .btc-donate .address:after {
          left: 50%;
          bottom: 2px; } }


text:
title: "EyeTV Hybrid problems"
categories: [mac]
layout: "posts"
date: "2010-08-30 12:58:00"
updated: "2010-08-30 12:58:54"
blogger:
    siteid: "36955474"
    postid: "197716939213279673"
---

Error message "The device will not operate because it is connected to a USB 1.1 port."

Solutions:

	* Buy a new one (cf. macworld article)
	* Reset port as per support article.

More tips found in Elgato forum post.


text:
import { OWAPIBlob } from './index';

// When you make the request save assign that OWAPIBlob interface to the response
// Here I'm using request = require('request-promise')
let r: OWAPIBlob = await request({
  uri: `https://owapi.net/api/v3/u/battletag-1234/blob`, // Put the requested URL here
  headers: {
    'User-Agent': 'request'
  },
  json: true
}).catch(console.error);

// If there has been an error with the request, you can find it like this
// Errors ususally are either 404 or "Private" (the profile has been set private)
if (r.error) throw new Error(`Error ${r.error}: ${r.msg}`);

// If it found the profile you can use the autocomplete in your text editor (it may need
// an additional plugin/package)


text:
package almhirt.corex.spray.client

import scala.concurrent.duration.FiniteDuration
import akka.actor._
import almhirt.common._
import almhirt.http.{ HttpSerializer, HttpDeserializer }
import spray.http._
import spray.client.pipelining._

abstract class SingleTypeHttpPublisher[T](implicit serializer: HttpSerializer[T], problemDeserializer: HttpDeserializer[Problem]) extends Actor with ActorLogging with HttpExternalConnector with RequestsWithEntity with HttpExternalPublisher {

  override val pipeline = (sendReceive)

  def acceptAsSuccess: Set[StatusCode]
  def contentMediaType: MediaType

  def method: HttpMethod
  def createUri(entity: T): Uri

  def publishOverWire(entity: T): AlmFuture[(T, FiniteDuration)] = {
    val settings = EntityRequestSettings(createUri(entity), contentMediaType, Seq.empty, method, acceptAsSuccess)
    publishToExternalEndpoint(entity, settings)(serializer, problemDeserializer)
  }
}

abstract class SingleTypeOneParamHttpQuery[PathSegment, U](implicit deserializer: HttpDeserializer[U], problemDeserializer: HttpDeserializer[Problem]) extends Actor with ActorLogging with HttpExternalConnector with AwaitingEntityResponse with HttpExternalQuery {
  override val pipeline = (sendReceive)

  def acceptAsSuccess: Set[StatusCode]
  def acceptMediaTypes: Seq[MediaType]
  def method: HttpMethod
  def createUri(segment: PathSegment): Uri

  def queryOverWire(segment: PathSegment): AlmFuture[(U, FiniteDuration)] = {
    val settings = BasicRequestSettings(createUri(segment), acceptMediaTypes, method, acceptAsSuccess)
    externalQuery(settings)(deserializer, problemDeserializer)
  }
}

abstract class SingleTypeTwoParamHttpQuery[PathSegment1, PathSegment2, U](implicit deserializer: HttpDeserializer[U], problemDeserializer: HttpDeserializer[Problem]) extends Actor with ActorLogging with HttpExternalConnector with AwaitingEntityResponse with HttpExternalQuery {
  override val pipeline = (sendReceive)

  def acceptAsSuccess: Set[StatusCode]
  def acceptMediaTypes: Seq[MediaType]
  def method: HttpMethod
  def createUri(segment1: PathSegment1, segment2: PathSegment2): Uri

  def queryOverWire(segment1: PathSegment1, segment2: PathSegment2): AlmFuture[(U, FiniteDuration)] = {
    val settings = BasicRequestSettings(createUri(segment1, segment2), acceptMediaTypes, method, acceptAsSuccess)
    externalQuery(settings)(deserializer, problemDeserializer)
  }
}

abstract class SingleTypeHttpConversation[T, U](implicit serializer: HttpSerializer[T], deserializer: HttpDeserializer[U], problemDeserializer: HttpDeserializer[Problem]) extends Actor with ActorLogging with HttpExternalConnector with RequestsWithEntity with AwaitingEntityResponse with HttpExternalConversation {
  def acceptAsSuccess: Set[StatusCode]
  def contentMediaType: MediaType
  def acceptMediaTypes: Seq[MediaType]
  def method: HttpMethod
  def createUri(entity: T): Uri

  override val pipeline = (sendReceive)

  def conversationOverWire(entity: T): AlmFuture[(U, FiniteDuration)] = {
    val settings = EntityRequestSettings(createUri(entity), contentMediaType, acceptMediaTypes, method, acceptAsSuccess)
    conversationWithExternalEndpoint(entity, settings)(serializer, deserializer, problemDeserializer)
  }

}

abstract class SingleTypeHttpConversationWithParametrizedQuery[T, U](implicit serializer: HttpSerializer[T], deserializer: HttpDeserializer[U], problemDeserializer: HttpDeserializer[Problem]) extends Actor with ActorLogging with HttpExternalConnector with RequestsWithEntity with AwaitingEntityResponse with HttpExternalConversation {
  case class UriPartsAndParams(segments: Seq[String], params: Map[String, Option[String]]) {
    def appendTo(prefix: String): Uri = {
      val segmentsAppendix = if (segments.isEmpty) "" else "/" + segments.mkString("/")
      val paramsAppendix =
        if (params.isEmpty)
          ""
        else {
          val items = params.map {
            case (name, value) ⇒
              value match {
                case Some(v) ⇒ s"$name=$v"
                case None ⇒ s"$name"
              }
          }.mkString("&")
          s"?$items"
        }
      s"$prefix$segmentsAppendix$paramsAppendix"
    }
  }

  def acceptAsSuccess: Set[StatusCode]
  def contentMediaType: MediaType
  def acceptMediaTypes: Seq[MediaType]
  def method: HttpMethod
  def createUri(entity: T, uriPartsAndParams: UriPartsAndParams): Uri

  override val pipeline = (sendReceive)

  def conversationOverWire(entity: T, uriPartsAndParams: UriPartsAndParams): AlmFuture[(U, FiniteDuration)] = {
    val settings = EntityRequestSettings(createUri(entity, uriPartsAndParams), contentMediaType, acceptMediaTypes, method, acceptAsSuccess)
    conversationWithExternalEndpoint[T, U](entity, settings)(serializer, deserializer, problemDeserializer)
  }

}


text:
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';

@Component({
    selector: 'app-quote',
    templateUrl: './quote.component.html',
    styleUrls: ['./quote.component.css']
})
export class QuoteComponent implements OnInit {

    @Input() quote: string;
    @Input() imagen: string;
    @Input() author: string;
    @Input() role: string;
    @Input() authorImg: string;
    @Output() changeIndexEvt: EventEmitter<any> = new EventEmitter<any>();

    constructor() {
    }

    ngOnInit() {
    }

    changeIndex(i) {
        this.changeIndexEvt.emit(i);
    }

}


text:
// Copyright (c) 2017 Gwaredd Mountain, https://opensource.org/licenses/MIT
#if !UNIUM_DISABLE && ( DEVELOPMENT_BUILD || UNITY_EDITOR || UNIUM_ENABLE )

using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

using gw.proto.utils;

namespace gw.proto.http
{
    ////////////////////////////////////////////////////////////////////////////////

    public class HttpRequest
    {
        // general config options

        public static int LimitPostSize     = 0;
        public static int HeaderBufferSize  = 8 * 1024;

        // request

        public Dictionary<string,string> Headers { get; private set; }

        public uint         ID              { get; private set; }
        public string       Method          { get; private set; }
        public string       URL             { get; private set; }
        public string       QueryParameters { get; private set; }
        public byte[]       Body;

        public HttpResponse Response        { get; private set; }

        public Dispatcher   Dispatch        { get; private set; }

        private Stream      mStream;

        static uint sNextID = 0;

        public HttpRequest()
        {
            ID      = sNextID++;
            Headers = new Dictionary<string,string>();
        }

        public HttpRequest( Client client )
            : this()
        {
        }

        //------------------------------------------------------------------------------
        // convenience functions

        public Stream GetStream()
        {
            return mStream;
        }

        public string Header( string key )
        {
            return Headers.ContainsKey( key ) ? Headers[ key ] : "";
        }

        public void Send( string data )
        {
            Response.Send( data );
        }

        public void Send( byte[] data )
        {
            Response.Send( data );
        }

        public void Reject( ResponseCode code )
        {
            Response.Reject( code );
        }

        public void Redirect( string url )
        {
            Response.Redirect( url );
        }

        //------------------------------------------------------------------------------
        /// <summary>
        /// Given an input stream, parse the incoming HTTP request
        /// </summary>
        /// <param name="stream">stream of bytes</param>
        /// <param name="dispatcher">dispatcher which will receive the HttpRequest</param>

        public void Process( Stream stream, Dispatcher dispatcher )
        {
            try
            {
                // setup

                mStream         = stream;
                Dispatch        = dispatcher;
                Response        = new HttpResponse( mStream );

                // read

                mBufferPos      = 0;
                mBufferedBytes  = 0;
                mBuffer         = new byte[ HeaderBufferSize ];

                ReadRequest();
                ReadHeaders();

                // process

                switch( Method )
                {
                    case "GET":

                        if( IsUpgradeRequest() )
                        {
                            DispatchWebSocket();
                        }
                        else
                        {
                            DispatchRequest();
                        }

                        break;

                    case "POST":
                        ReadBody();
                        DispatchRequest();
                        break;

                    case "OPTIONS":
                        Response.Headers[ "Access-Control-Allow-Origin"  ] = "*";
                        Response.Headers[ "Access-Control-Allow-Headers" ] = "Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With";
                        Response.Close();
                        break;

                    default:
                        throw new HttpResponseException( ResponseCode.MethodNotAllowed );
                }
            }
            catch( HttpResponseException e )
            {
                Util.Warn( "[{0}] {1} {2}", ID, e.Code, HttpUtils.CodeToString( e.Code ) );
                Response.Reject( e.Code );
            }
            catch( System.IO.IOException e )
            {
                Util.Warn( "[{0}] failed to read from stream - {1}", ID, e.Message );
                mStream.Close();
            }
            catch( Exception e )
            {
                Util.Error( "[{0}] {1}", ID, e.ToString() );
                Response.Abort();
            }

            mBuffer = null;
        }

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

        void DispatchWebSocket()
        {
            if( Dispatch.OnSocketRequest == null )
            {
                throw new HttpResponseException( ResponseCode.NotFound );
            }

            Dispatch.OnSocketRequest( new WebSocket( this ) );
        }

        void DispatchRequest()
        {
            if( Dispatch.OnWebRequest == null )
            {
                throw new HttpResponseException( ResponseCode.NotFound );
            }

            Dispatch.OnWebRequest( this );
        }

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

        bool IsUpgradeRequest()
        {
            // check for connection upgrade headers

            if( Header( "Connection" ).Contains( "Upgrade" ) == false )
            {
                return false;
            }

            if( Header( "Upgrade" ) != "websocket" )
            {
                return false;
            }

            // check websocket version

            if( Header( "Sec-WebSocket-Version" ) != "13" )
            {
                Response.Headers[ "Sec-WebSocket-Version" ] = "13";
                throw new HttpResponseException( ResponseCode.UpgradeRequired );
            }

            return true;
        }

        //------------------------------------------------------------------------------
        // get next line from input stream (buffered)

        byte[]  mBuffer         = null;
        int     mBufferPos      = 0;
        int     mBufferedBytes  = 0;

        string ReadLine()
        {
            int start = mBufferPos;

            do
            {
                while( mBufferPos < mBufferedBytes )
                {
                    var ch = mBuffer[ mBufferPos ];

                    if( ch == (byte) '\n' )
                    {
                        var end = mBufferPos++;

                        if( end > start && mBuffer[ end - 1 ] == '\r' )
                        {
                            --end;
                        }

                        return Encoding.ASCII.GetString( mBuffer, start, end - start );
                    }

                    ++mBufferPos;
                }

                // end of buffer, then 418

                if( mBufferPos == mBuffer.Length )
                {
                    throw new HttpResponseException( ResponseCode.EntityTooLarge );
                }

                // otherwise read more bytes

                int bytesRead = mStream.Read( mBuffer, mBufferPos, mBuffer.Length - mBufferPos );

                if( bytesRead <= 0 )
                {
                    // end of stream - shouldn't happen reading headers ...
                    throw new HttpResponseException( ResponseCode.RequestTimeout );
                }

                mBufferedBytes += bytesRead;
            }
            while( true );
        }

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

        void ReadRequest()
        {
            var line = ReadLine();

            if( String.IsNullOrEmpty( line ) )
            {
                throw new HttpResponseException( ResponseCode.BadRequest );
            }

            // parse request line

            var request = line.Split( new char[]{ ' ' }, 4, StringSplitOptions.RemoveEmptyEntries );

            if( request.Length != 3 )
            {
                throw new HttpResponseException( ResponseCode.BadRequest );
            }

            var url = request[ 1 ];
            var idx = url.IndexOf( '?' );

            Method  = request[ 0 ];
            URL     = idx >= 0 ? url.Substring( 0, idx ) : url;
            QueryParameters = idx >= 0 ? url.Substring( idx + 1 ) : string.Empty;
        }

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

        void ReadHeaders()
        {
            var split = new char[] { ':' };

            var line = ReadLine();

            while( string.IsNullOrEmpty( line ) == false )
            {
                var kv = line.Split( split, 2, StringSplitOptions.RemoveEmptyEntries );

                if( kv.Length != 2 )
                {
                    throw new HttpResponseException( ResponseCode.BadRequest );
                }

                // add header

                Headers[ kv[0].Trim() ] = kv[1].Trim();

                line = ReadLine();
            }
        }

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

        void ReadBody()
        {
            // NB: for simplicity, we're not supporting Transfer-Encoding or Content-Encoding (we're a bad HTTP/1.1 server :)

            if( Headers.ContainsKey( "Content-Encoding" ) )
            {
                // TODO: support deflate & gzip

                if( Headers[ "Content-Encoding" ] != "identity" )
                {
                    throw new HttpResponseException( ResponseCode.Unimplemented );
                }
            }

            if( Headers.ContainsKey( "Transfer-Encoding" ) )
            {
                // TODO: support chunked transfer encoding

                throw new HttpResponseException( ResponseCode.Unimplemented );
            }

            // get content length

            if( Headers.ContainsKey( "Content-Length" ) == false )
            {
                throw new HttpResponseException( ResponseCode.LengthRequired );
            }

            int numBytesToRead;

            if( int.TryParse( Headers[ "Content-Length" ], out numBytesToRead ) == false )
            {
                throw new HttpResponseException( ResponseCode.BadRequest );
            }

            if( numBytesToRead < 0 )
            {
                throw new HttpResponseException( ResponseCode.BadRequest );
            }

            if( numBytesToRead == 0 )
            {
                return; // nothing to read
            }

            if( LimitPostSize > 0 && numBytesToRead > LimitPostSize )
            {
                throw new HttpResponseException( ResponseCode.EntityTooLarge );
            }

            // create buffer for data

            Body = new byte[ numBytesToRead ];

            // copy any remaining buffered bytes

            var remaining = Math.Min( numBytesToRead, mBufferedBytes - mBufferPos );

            if( remaining > 0 )
            {
                Array.Copy( mBuffer, mBufferPos, Body, 0, remaining );
                numBytesToRead -= remaining;
            }

            mBuffer = null; // free buffer, we don't need it anymore

            // read rest from the stream

            while( numBytesToRead > 0 )
            {
                var numRead = mStream.Read( Body, Body.Length - numBytesToRead, numBytesToRead );

                if( numRead <= 0 )
                {
                    throw new HttpResponseException( ResponseCode.RequestTimeout );
                }

                numBytesToRead -= numRead;
            }
        }
    }
}

#endif


text:
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';

import { IFirebaseUserRecord } from '../../interfaces/firebase/firebase-user.interface';
import { ISoundcloudPlaylist } from '../../interfaces/soundcloud/soundcloud-playlist.interface';

@Component({
  selector: 'app-user-playlist-actions',
  templateUrl: './user-playlist-actions.component.html',
  styleUrls: ['./user-playlist-actions.component.scss'],
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class AppUserPlaylistActionsComponent {
  @Input() public playlist?: ISoundcloudPlaylist;

  @Input() public userRecord?: IFirebaseUserRecord | null = null;

  @Output() public readonly submitPlaylist = new EventEmitter<ISoundcloudPlaylist>();

  @Output() public readonly unsubmitPlaylist = new EventEmitter<ISoundcloudPlaylist>();

  /**
   * Resolves if a playlist is already added.
   */
  public get alreadyAdded() {
    return this.userRecord?.submittedPlaylists
      ? typeof this.userRecord?.submittedPlaylists[this.playlist?.id ?? -1] === 'boolean'
      : false;
  }

  /**
   * Resolves if a playlist is already submitted.
   */
  public get alreadySubmitted() {
    return Boolean(this.userRecord?.submittedPlaylists[this.playlist?.id ?? -1]) ? true : false;
  }

  public submit() {
    if (typeof this.playlist !== 'undefined') {
      this.submitPlaylist.next(this.playlist);
    }
  }

  public unsubmit() {
    if (typeof this.playlist !== 'undefined') {
      this.unsubmitPlaylist.next(this.playlist);
    }
  }
}


text:
{% extends path+"/_layout-case-action.html" %}

{% block citizen_content %}

{{ data.nuggets | log }}

Back

Mental state examination

Appearance {% if data['Appearance'] %}Assessed{% endif %}

Behaviour {% if data['Behaviour'] %}Assessed{% endif %}

Speech {% if data['Speech'] %}Assessed{% endif %}

Mood {% if data['Mood'] %}Assessed{% endif %}

General cognition {% if data['Cognition'] %}Assessed{% endif %}

Insight {% if data['Insight'] %}Assessed{% endif %}

Thoughts{% if data['Thoughts'] %}Assessed{% endif %}

Perceptions {% if data['Perceptions'] %}Assessed{% endif %}

Addictions {% if data['Addictions'] %}Assessed{% endif %}

Involuntary movements {% if data['involentry-movements'] %}Assessed{% endif %}

Cognitive tests {% if data['Cognative-test'] %}Assessed{% endif %}

	{% if customer.status == 'Ready for recommendation' %}

	<form action="medical_assessment_dashboard" method="POST" class="form">
			<input type="submit" class="button mt30" value="Finish review">

					<input id="radio-inline-4" type="radio" name="mentalVisited" value="mentalVisited" checked>

					hidden radio one

		{% else %}
		<form action="exceptionalCircumstancesJustification" method="POST" class="form">

				<input type="submit" class="button mt30" value="Save and continue">
				{% endif%}

						<input id="radio-inline-4" type="radio" name="mental-health" value="mental-health" checked>

						hidden radio one

				</form>

{% endblock %}

{% macro physGroup(name,sel) %}
  {% set s = name | slug %}

    <input id="group_{{s}}" type="checkbox" name="group_{{s}}" sue="group_{{s}}" {% if sel %} checked="checked"{% endif %}>
    {{name}}

{% endmacro %}

{% macro physObs(name,sel) %}
  {% set s = name | slug %}

    <input id="phys_{{s}}" type="checkbox" name="mobility" value="phys_{{s}}" {% if sel %} checked="checked"{% endif %}>
    {{name}}

      Observation, palpation, movement
      <textarea class="form-control form-control-3-4" name="phys_{{s}}_obs" id="phys_{{s}}_obs" rows="4"></textarea>

{% endmacro %}

{% block footer_top %}
{{ super() }}

  exam v1 |
  exam v2

{% endblock %}


text:
package fakes

import (
	"sync"

	"github.com/cloudfoundry/cli/cf/api/applications"
	"github.com/cloudfoundry/cli/cf/models"
)

type FakeApplicationRepository struct {
	CreateStub        func(params models.AppParams) (createdApp models.Application, apiErr error)
	createMutex       sync.RWMutex
	createArgsForCall []struct {
		params models.AppParams
	}
	createReturns struct {
		result1 models.Application
		result2 error
	}
	GetAppStub        func(appGuid string) (models.Application, error)
	getAppMutex       sync.RWMutex
	getAppArgsForCall []struct {
		appGuid string
	}
	getAppReturns struct {
		result1 models.Application
		result2 error
	}
	ReadStub        func(name string) (app models.Application, apiErr error)
	readMutex       sync.RWMutex
	readArgsForCall []struct {
		name string
	}
	readReturns struct {
		result1 models.Application
		result2 error
	}
	ReadFromSpaceStub        func(name string, spaceGuid string) (app models.Application, apiErr error)
	readFromSpaceMutex       sync.RWMutex
	readFromSpaceArgsForCall []struct {
		name      string
		spaceGuid string
	}
	readFromSpaceReturns struct {
		result1 models.Application
		result2 error
	}
	UpdateStub        func(appGuid string, params models.AppParams) (updatedApp models.Application, apiErr error)
	updateMutex       sync.RWMutex
	updateArgsForCall []struct {
		appGuid string
		params  models.AppParams
	}
	updateReturns struct {
		result1 models.Application
		result2 error
	}
	DeleteStub        func(appGuid string) (apiErr error)
	deleteMutex       sync.RWMutex
	deleteArgsForCall []struct {
		appGuid string
	}
	deleteReturns struct {
		result1 error
	}
	ReadEnvStub        func(guid string) (*models.Environment, error)
	readEnvMutex       sync.RWMutex
	readEnvArgsForCall []struct {
		guid string
	}
	readEnvReturns struct {
		result1 *models.Environment
		result2 error
	}
	CreateRestageRequestStub        func(guid string) (apiErr error)
	createRestageRequestMutex       sync.RWMutex
	createRestageRequestArgsForCall []struct {
		guid string
	}
	createRestageRequestReturns struct {
		result1 error
	}
}

func (fake *FakeApplicationRepository) Create(params models.AppParams) (createdApp models.Application, apiErr error) {
	fake.createMutex.Lock()
	fake.createArgsForCall = append(fake.createArgsForCall, struct {
		params models.AppParams
	}{params})
	fake.createMutex.Unlock()
	if fake.CreateStub != nil {
		return fake.CreateStub(params)
	} else {
		return fake.createReturns.result1, fake.createReturns.result2
	}
}

func (fake *FakeApplicationRepository) CreateCallCount() int {
	fake.createMutex.RLock()
	defer fake.createMutex.RUnlock()
	return len(fake.createArgsForCall)
}

func (fake *FakeApplicationRepository) CreateArgsForCall(i int) models.AppParams {
	fake.createMutex.RLock()
	defer fake.createMutex.RUnlock()
	return fake.createArgsForCall[i].params
}

func (fake *FakeApplicationRepository) CreateReturns(result1 models.Application, result2 error) {
	fake.CreateStub = nil
	fake.createReturns = struct {
		result1 models.Application
		result2 error
	}{result1, result2}
}

func (fake *FakeApplicationRepository) GetApp(appGuid string) (models.Application, error) {
	fake.getAppMutex.Lock()
	fake.getAppArgsForCall = append(fake.getAppArgsForCall, struct {
		appGuid string
	}{appGuid})
	fake.getAppMutex.Unlock()
	if fake.GetAppStub != nil {
		return fake.GetAppStub(appGuid)
	} else {
		return fake.getAppReturns.result1, fake.getAppReturns.result2
	}
}

func (fake *FakeApplicationRepository) GetAppCallCount() int {
	fake.getAppMutex.RLock()
	defer fake.getAppMutex.RUnlock()
	return len(fake.getAppArgsForCall)
}

func (fake *FakeApplicationRepository) GetAppArgsForCall(i int) string {
	fake.getAppMutex.RLock()
	defer fake.getAppMutex.RUnlock()
	return fake.getAppArgsForCall[i].appGuid
}

func (fake *FakeApplicationRepository) GetAppReturns(result1 models.Application, result2 error) {
	fake.GetAppStub = nil
	fake.getAppReturns = struct {
		result1 models.Application
		result2 error
	}{result1, result2}
}

func (fake *FakeApplicationRepository) Read(name string) (app models.Application, apiErr error) {
	fake.readMutex.Lock()
	fake.readArgsForCall = append(fake.readArgsForCall, struct {
		name string
	}{name})
	fake.readMutex.Unlock()
	if fake.ReadStub != nil {
		return fake.ReadStub(name)
	} else {
		return fake.readReturns.result1, fake.readReturns.result2
	}
}

func (fake *FakeApplicationRepository) ReadCallCount() int {
	fake.readMutex.RLock()
	defer fake.readMutex.RUnlock()
	return len(fake.readArgsForCall)
}

func (fake *FakeApplicationRepository) ReadArgsForCall(i int) string {
	fake.readMutex.RLock()
	defer fake.readMutex.RUnlock()
	return fake.readArgsForCall[i].name
}

func (fake *FakeApplicationRepository) ReadReturns(result1 models.Application, result2 error) {
	fake.ReadStub = nil
	fake.readReturns = struct {
		result1 models.Application
		result2 error
	}{result1, result2}
}

func (fake *FakeApplicationRepository) ReadFromSpace(name string, spaceGuid string) (app models.Application, apiErr error) {
	fake.readFromSpaceMutex.Lock()
	fake.readFromSpaceArgsForCall = append(fake.readFromSpaceArgsForCall, struct {
		name      string
		spaceGuid string
	}{name, spaceGuid})
	fake.readFromSpaceMutex.Unlock()
	if fake.ReadFromSpaceStub != nil {
		return fake.ReadFromSpaceStub(name, spaceGuid)
	} else {
		return fake.readFromSpaceReturns.result1, fake.readFromSpaceReturns.result2
	}
}

func (fake *FakeApplicationRepository) ReadFromSpaceCallCount() int {
	fake.readFromSpaceMutex.RLock()
	defer fake.readFromSpaceMutex.RUnlock()
	return len(fake.readFromSpaceArgsForCall)
}

func (fake *FakeApplicationRepository) ReadFromSpaceArgsForCall(i int) (string, string) {
	fake.readFromSpaceMutex.RLock()
	defer fake.readFromSpaceMutex.RUnlock()
	return fake.readFromSpaceArgsForCall[i].name, fake.readFromSpaceArgsForCall[i].spaceGuid
}

func (fake *FakeApplicationRepository) ReadFromSpaceReturns(result1 models.Application, result2 error) {
	fake.ReadFromSpaceStub = nil
	fake.readFromSpaceReturns = struct {
		result1 models.Application
		result2 error
	}{result1, result2}
}

func (fake *FakeApplicationRepository) Update(appGuid string, params models.AppParams) (updatedApp models.Application, apiErr error) {
	fake.updateMutex.Lock()
	fake.updateArgsForCall = append(fake.updateArgsForCall, struct {
		appGuid string
		params  models.AppParams
	}{appGuid, params})
	fake.updateMutex.Unlock()
	if fake.UpdateStub != nil {
		return fake.UpdateStub(appGuid, params)
	} else {
		return fake.updateReturns.result1, fake.updateReturns.result2
	}
}

func (fake *FakeApplicationRepository) UpdateCallCount() int {
	fake.updateMutex.RLock()
	defer fake.updateMutex.RUnlock()
	return len(fake.updateArgsForCall)
}

func (fake *FakeApplicationRepository) UpdateArgsForCall(i int) (string, models.AppParams) {
	fake.updateMutex.RLock()
	defer fake.updateMutex.RUnlock()
	return fake.updateArgsForCall[i].appGuid, fake.updateArgsForCall[i].params
}

func (fake *FakeApplicationRepository) UpdateReturns(result1 models.Application, result2 error) {
	fake.UpdateStub = nil
	fake.updateReturns = struct {
		result1 models.Application
		result2 error
	}{result1, result2}
}

func (fake *FakeApplicationRepository) Delete(appGuid string) (apiErr error) {
	fake.deleteMutex.Lock()
	fake.deleteArgsForCall = append(fake.deleteArgsForCall, struct {
		appGuid string
	}{appGuid})
	fake.deleteMutex.Unlock()
	if fake.DeleteStub != nil {
		return fake.DeleteStub(appGuid)
	} else {
		return fake.deleteReturns.result1
	}
}

func (fake *FakeApplicationRepository) DeleteCallCount() int {
	fake.deleteMutex.RLock()
	defer fake.deleteMutex.RUnlock()
	return len(fake.deleteArgsForCall)
}

func (fake *FakeApplicationRepository) DeleteArgsForCall(i int) string {
	fake.deleteMutex.RLock()
	defer fake.deleteMutex.RUnlock()
	return fake.deleteArgsForCall[i].appGuid
}

func (fake *FakeApplicationRepository) DeleteReturns(result1 error) {
	fake.DeleteStub = nil
	fake.deleteReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeApplicationRepository) ReadEnv(guid string) (*models.Environment, error) {
	fake.readEnvMutex.Lock()
	fake.readEnvArgsForCall = append(fake.readEnvArgsForCall, struct {
		guid string
	}{guid})
	fake.readEnvMutex.Unlock()
	if fake.ReadEnvStub != nil {
		return fake.ReadEnvStub(guid)
	} else {
		return fake.readEnvReturns.result1, fake.readEnvReturns.result2
	}
}

func (fake *FakeApplicationRepository) ReadEnvCallCount() int {
	fake.readEnvMutex.RLock()
	defer fake.readEnvMutex.RUnlock()
	return len(fake.readEnvArgsForCall)
}

func (fake *FakeApplicationRepository) ReadEnvArgsForCall(i int) string {
	fake.readEnvMutex.RLock()
	defer fake.readEnvMutex.RUnlock()
	return fake.readEnvArgsForCall[i].guid
}

func (fake *FakeApplicationRepository) ReadEnvReturns(result1 *models.Environment, result2 error) {
	fake.ReadEnvStub = nil
	fake.readEnvReturns = struct {
		result1 *models.Environment
		result2 error
	}{result1, result2}
}

func (fake *FakeApplicationRepository) CreateRestageRequest(guid string) (apiErr error) {
	fake.createRestageRequestMutex.Lock()
	fake.createRestageRequestArgsForCall = append(fake.createRestageRequestArgsForCall, struct {
		guid string
	}{guid})
	fake.createRestageRequestMutex.Unlock()
	if fake.CreateRestageRequestStub != nil {
		return fake.CreateRestageRequestStub(guid)
	} else {
		return fake.createRestageRequestReturns.result1
	}
}

func (fake *FakeApplicationRepository) CreateRestageRequestCallCount() int {
	fake.createRestageRequestMutex.RLock()
	defer fake.createRestageRequestMutex.RUnlock()
	return len(fake.createRestageRequestArgsForCall)
}

func (fake *FakeApplicationRepository) CreateRestageRequestArgsForCall(i int) string {
	fake.createRestageRequestMutex.RLock()
	defer fake.createRestageRequestMutex.RUnlock()
	return fake.createRestageRequestArgsForCall[i].guid
}

func (fake *FakeApplicationRepository) CreateRestageRequestReturns(result1 error) {
	fake.CreateRestageRequestStub = nil
	fake.createRestageRequestReturns = struct {
		result1 error
	}{result1}
}

var _ applications.ApplicationRepository = new(FakeApplicationRepository)