text:
package com.asakusafw.utils.java.jsr199.testing;

import java.util.Set;

import javax.annotation.processing.Completion;
import javax.annotation.processing.ProcessingEnvironment;
import javax.annotation.processing.Processor;
import javax.annotation.processing.RoundEnvironment;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.AnnotationMirror;
import javax.lang.model.element.Element;
import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.TypeElement;

/**
 * An annotation processor that handles occurred exceptions.
 * @see #rethrow()
 */
public class SafeProcessor implements Processor {

    private final Processor delegate;

    private RuntimeException runtimeException;

    private Error error;

    /**
     * Creates a new instance.
     * @param delegate the delegation target
     * @throws IllegalArgumentException if the parameter is {@code null}
     */
    public SafeProcessor(Processor delegate) {
        if (delegate == null) {
            throw new IllegalArgumentException("delegate must not be null"); //$NON-NLS-1$
        }
        this.delegate = delegate;
    }

    /**
     * Throws the exception occurred while running {@link #process(Set, RoundEnvironment)} only if it exists.
     */
    public void rethrow() {
        if (runtimeException != null) {
            throw runtimeException;
        } else if (error != null) {
            throw error;
        }
    }

    @Override
    public void init(ProcessingEnvironment processingEnv) {
        this.delegate.init(processingEnv);
    }

    @Override
    public Set<String> getSupportedOptions() {
        return this.delegate.getSupportedOptions();
    }

    @Override
    public Set<String> getSupportedAnnotationTypes() {
        return this.delegate.getSupportedAnnotationTypes();
    }

    @Override
    public SourceVersion getSupportedSourceVersion() {
        return this.delegate.getSupportedSourceVersion();
    }

    @Override
    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
        try {
            return this.delegate.process(annotations, roundEnv);
        } catch (RuntimeException e) {
            runtimeException = e;
            throw e;
        } catch (Error e) {
            error = e;
            throw e;
        }
    }

    @Override
    public Iterable<? extends Completion> getCompletions(
            Element element,
            AnnotationMirror annotation,
            ExecutableElement member,
            String userText) {
        return this.delegate.getCompletions(element, annotation, member, userText);
    }
}


text:
package main

/*
	#include <stdlib.h>

	#cgo CFLAGS:
	#cgo LDFLAGS: -lsystemd

	extern int journal_open();
	extern int journal_close();

	extern int journal_seek_tail();

	extern int journal_next();
	extern int journal_previous();

	extern int journal_get_data(char **);

	extern int journal_get_cursor(char**);
	extern int journal_test_cursor(const char*);

	extern int journal_add_match(char*);
	extern int journal_add_disjunction();
	extern int journal_add_conjunction();
	extern int journal_flush_matches();
*/
import "C"
import "unsafe"

/*
	Open the system journal for reading
*/
func journal_open() int {

	return int(C.journal_open())
}

func journal_close() int {

	return int(C.journal_close())
}

/*
	Seek to a position in the journal
*/
func journal_seek_tail() int {

	return int(C.journal_seek_tail())
}

/*
	Advance or set back the read pointer in the journal
*/
func journal_next() int {

	return int(C.journal_next())
}

func journal_previous() int {

	return int(C.journal_previous())
}

/*
	Read data fields from the current journal entry
*/
func journal_get_data(data *string) int {

	var r int
	var n *C.char

	defer C.free(unsafe.Pointer(n))
	r = int(C.journal_get_data(&n))
	*data = C.GoString(n)

	return r
}

/*
	Get cursor string for or test cursor string against the current journal entry
*/
func journal_get_cursor(cursor *string) int {

	var r int
	var n *C.char

	defer C.free(unsafe.Pointer(n))
	r = int(C.journal_get_cursor(&n))
	*cursor = C.GoString(n)

	return r
}

func journal_test_cursor(cursor string) int {

	return int(C.journal_test_cursor(C.CString(cursor)))
}

/*
	Add or remove entry matches
*/
func journal_add_match(m string) int {

	return int(C.journal_add_match(C.CString(m)))
}

func journal_add_disjunction() int {

	return int(C.journal_add_disjunction())
}

func journal_add_conjunction() int {

	return int(C.journal_add_disjunction())
}

func journal_flush_matches() int {

	return int(C.journal_flush_matches())
}

redpajama_set_name: RedPajamaGithub


text:
package com.commercetools.sunrise.search.searchbox;

import com.commercetools.sunrise.framework.components.controllers.ControllerComponent;
import com.commercetools.sunrise.framework.hooks.application.PageDataReadyHook;
import com.commercetools.sunrise.framework.viewmodels.PageData;
import com.commercetools.sunrise.search.searchbox.viewmodels.WithSearchBoxViewModel;
import io.sphere.sdk.models.Base;
import io.sphere.sdk.models.LocalizedStringEntry;

import java.util.Optional;

public abstract class AbstractSearchBoxControllerComponent extends Base implements ControllerComponent, PageDataReadyHook {

    private final SearchBoxSettings searchBoxSettings;

    protected AbstractSearchBoxControllerComponent(final SearchBoxSettings searchBoxSettings) {
        this.searchBoxSettings = searchBoxSettings;
    }

    protected final SearchBoxSettings getSearchBoxSettings() {
        return searchBoxSettings;
    }

    protected abstract Optional<LocalizedStringEntry> getSearchText();

    @Override
    public void onPageDataReady(final PageData pageData) {
        final Optional<LocalizedStringEntry> searchText = getSearchText();
        if (searchText.isPresent() && pageData.getContent() instanceof WithSearchBoxViewModel) {
            final WithSearchBoxViewModel content = (WithSearchBoxViewModel) pageData.getContent();
            content.setSearchTerm(searchText.get().getValue());
        }
    }
}


text:
require File.dirname(__FILE__) + '/../spec_helper'

describe 'country input' do

  include FormtasticSpecHelper

  before do
    @output_buffer = ''
    mock_everything
  end

  describe "when country_select is not available as a helper from a plugin" do

    it "should raise an error, sugesting the author installs a plugin" do
      lambda {
        semantic_form_for(@new_post) do |builder|
          concat(builder.input(:country, :as => :country))
        end
      }.should raise_error
    end

  end

  describe "when country_select is available as a helper (from a plugin)" do

    before do
      semantic_form_for(@new_post) do |builder|
        builder.stub!(:country_select).and_return("<select><option>...</option></select>")
        concat(builder.input(:country, :as => :country))
      end
    end

    it_should_have_input_wrapper_with_class("country")
    it_should_have_input_wrapper_with_id("post_country_input")

    # TODO -- needs stubbing inside the builder block, tricky!
    #it_should_apply_error_logic_for_input_type(:country)

    it 'should generate a label for the input' do
      output_buffer.should have_tag('form li label')
      output_buffer.should have_tag('form li label[@for="post_country"]')
      output_buffer.should have_tag('form li label', /Country/)
    end

    it "should generate a select" do
      output_buffer.should have_tag("form li select")
    end

  end

  describe ":priority_countries option" do

    it "should be passed down to the country_select helper when provided" do
      priority_countries = ["Foo", "Bah"]
      semantic_form_for(@new_post) do |builder|
        builder.stub!(:country_select).and_return("<select><option>...</option></select>")
        builder.should_receive(:country_select).with(:country, priority_countries, {}, {}).and_return("<select><option>...</option></select>")

        concat(builder.input(:country, :as => :country, :priority_countries => priority_countries))
      end
    end

    it "should default to the @@priority_countries config when absent" do
      priority_countries = ::Formtastic::SemanticFormBuilder.priority_countries
      priority_countries.should_not be_empty
      priority_countries.should_not be_nil

      semantic_form_for(@new_post) do |builder|
        builder.stub!(:country_select).and_return("<select><option>...</option></select>")
        builder.should_receive(:country_select).with(:country, priority_countries, {}, {}).and_return("<select><option>...</option></select>")

        concat(builder.input(:country, :as => :country))
      end
    end

  end

end


text:
<?PHP
	include "koneksi.php";

	extract($_POST);

	$query = "SELECT * FROM komoditi";

	$statement = oci_parse($connection, $query);

	oci_execute($statement);

	$data = array();
	while($row = oci_fetch_object($statement)){
	$data[]= $row;
}

	echo json_encode($data);
?>


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>Statistics of Voice in UD_Turkish-FrameNet</title>
    <link rel="root" href=""/>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="../../css/jquery-ui-redmond.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style-vis.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/hint.css"/>

          home

          edit page
          issue tracker

          <gcse:search></gcse:search>

        This page pertains to UD version 2.

            It appears that you have Javascript disabled.
            Please consider enabling Javascript for this page to see the visualizations.

Treebank Statistics: UD_Turkish-FrameNet: Features: Voice

This feature is universal but the values Rfl are language-specific.
It occurs with 4 different values: Cau, Pass, Rcp, Rfl.

134 tokens (1%) have a non-empty value of Voice.
117 types (1%) occur at least once with a non-empty value of Voice.
93 lemmas (2%) occur at least once with a non-empty value of Voice.
The feature is used with 1 part-of-speech tags: <tt>VERB</tt> (134; 1% instances).

VERB

134 <tt>VERB</tt> tokens (4% of all VERB tokens) have a non-empty value of Voice.

The most frequent other feature values with which VERB and Voice co-occurred: <tt>VerbForm</tt><tt>=Fin</tt> (134; 100%), <tt>Number</tt><tt>=Sing</tt> (125; 93%), <tt>Person</tt><tt>=3</tt> (119; 89%), <tt>Polarity</tt><tt>=Pos</tt> (117; 87%), <tt>Mood</tt><tt>=Ind</tt> (110; 82%), <tt>Aspect</tt><tt>=Perf</tt> (101; 75%), <tt>Tense</tt><tt>=Past</tt> (90; 67%).

VERB tokens may have the following values of Voice:

Cau (48; 36% of non-empty Voice): çıkarırdı, kaçırdı, çıkarmış, çıkarıyor, aksettirdi, alıştırmışlar, arttıralım, attırmadı, azaltırsan, açtırmadı

Pass (81; 60% of non-empty Voice): edildi, kesildi, sallanıyor, çekildi, atıldı, devrildi, koyuldu, alınmaz, atanmıştı, atılmıştı

Rcp (4; 3% of non-empty Voice): çekişe, elleşme, çöküştüler

Rfl (1; 1% of non-empty Voice): taranıyor

EMPTY (3203): etti, verdi, aldı, oldu, yaptı, bıraktı, açtı, düştü, ettim, gitti

Paradigm ol	<tt>Pass</tt>	<tt>Cau</tt>

<tt></tt>	olunuyordu	oldurttu

Voice seems to be lexical feature of VERB. 96% lemmas (89) occur only with one value of Voice.

Relations with Agreement in Voice

The 10 most frequent relations where parent and child node agree in Voice:
<tt>VERB –[<tt>compound</tt>]–> VERB</tt> (1; 100%).

© 2014–2021
            Universal Dependencies contributors.
            Site powered by Annodoc and brat
.


text:
const DrawCard = require('../../drawcard.js');
const { Locations } = require('../../Constants');
const AbilityDsl = require('../../abilitydsl.js');

class AkodoGunso extends DrawCard {
    setupCardAbilities() {
        this.reaction({
            title: 'Refill province faceup',
            when: {
                onCharacterEntersPlay: (event, context) =>
                    event.card === context.source &&
                    [Locations.ProvinceOne, Locations.ProvinceTwo, Locations.ProvinceThree, Locations.ProvinceFour].includes(event.originalLocation)
            },
            gameAction: AbilityDsl.actions.refillFaceup(context => ({ location: context.event.originalLocation }))
        });
    }
}

AkodoGunso.id = 'akodo-gunso';

module.exports = AkodoGunso;


text:
sap.ui.define([
	"sap/ui/core/UIComponent",
	"sap/ui/model/json/JSONModel",
	"sap/ui/demo/wt/controller/HelloDialog"
], function (UIComponent, JSONModel, HelloDialog) {
	"use strict";

	return UIComponent.extend("sap.ui.demo.wt.Component", {

		metadata : {
			manifest: "json"
		},

		init : function () {
			// call the init function of the parent
			UIComponent.prototype.init.apply(this, arguments);

			// set data model
			var oData = {
				recipient : {
					name : "World"
				}
			};
			var oModel = new JSONModel(oData);
			this.setModel(oModel);

			// debug code to show an alert for missing destination or CORS issues in the tutorial (see step 26 for details)
			this.getModel("invoice").attachEventOnce("metadataFailed", function(oEvent) {
				/*eslint-disable no-alert */
				alert("Request to the OData remote service failed.\nRead the Walkthrough Tutorial Step 26 to understand why you don't see any data here.");
				/*eslint-enable no-alert */
			});

			// set dialog
			this._helloDialog = new HelloDialog(this.getRootControl());
		},

		openHelloDialog : function () {
			this._helloDialog.open();
		}
	});

});


text:
// Ensures the native-shim is wrapped in a conditional eval. This is so that it
// can be simply included all of the time without worry it will be executed in
// an unsupported environment.

const fs = require('fs');

export default class ModifyAndCopyNativeShim {
  constructor () {
    this.originalPath = './node_modules/@webcomponents/custom-elements/src/native-shim.js';
    this.srcPath = './src/native-shim.js';
    this.distPath = './dist/native-shim.js';
    this.modify = (str) => {
      // Escape all backtick characters so we can wrap it in a template literal.
      str = str.replace(/`/g, '\\`');

      // Wrap in a conditional eval so it doesn't get executed in non-supported environments.
      return 'window.customElements && eval(`' + str + '`);';
    };
  }

  apply (compiler) {
    /* PRE BUILD */
    compiler.plugin('compilation', (compilation) => {
      fs.readFile(this.originalPath, 'utf8', (err, data) => {
        if (err) { return console.log(err); }
        this.result = this.modify(data);
        fs.writeFile(this.srcPath, this.result, 'utf8', (err) => {
          if (err) return console.log(err);
        });
      });
    });

    // Copy to dist so it's available to load standalone.
    compiler.plugin('after-emit', (compilation, callback) => {
      fs.writeFile(this.distPath, this.result, 'utf8', (err) => {
        if (err) return console.log(err);
      });
      callback();
    });
  }
}


text:
# AUTOMATICALLY GENERATED
# DO NOT EDIT THIS FILE DIRECTLY, USE /templates/Dockerfile.erb

FROM fluent/fluentd:v0.12.43
LABEL maintainer="Eduardo Silva <eduardo@treasure-data.com>"
USER root
WORKDIR /home/fluent
ENV PATH /fluentd/vendor/bundle/ruby/2.5.0/bin:$PATH
ENV GEM_PATH /fluentd/vendor/bundle/ruby/2.5.0
ENV GEM_HOME /fluentd/vendor/bundle/ruby/2.5.0
# skip runtime bundler installation
ENV FLUENTD_DISABLE_BUNDLER_INJECTION 1

COPY Gemfile* /fluentd/
RUN set -ex \
    && apk upgrade --no-cache \
    && apk add --no-cache ruby-bundler \
    && apk add --no-cache --virtual .build-deps \
        build-base \
        ruby-dev \
        libffi-dev \
        zlib-dev \
        git \
    && gem install bundler --version 1.16.1 \
    && bundle config silence_root_warning true \
    && bundle install --gemfile=/fluentd/Gemfile --path=/fluentd/vendor/bundle \
    && apk del .build-deps \
    && gem sources --clear-all \
    && rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem

# Copy configuration files
COPY ./conf/fluent.conf /fluentd/etc/
COPY ./conf/kubernetes.conf /fluentd/etc/

# Copy plugins
COPY plugins /fluentd/plugins/
COPY entrypoint.sh /fluentd/entrypoint.sh

# Environment variables
ENV FLUENTD_OPT=""
ENV FLUENTD_CONF="fluent.conf"

# jemalloc is memory optimization only available for td-agent
# td-agent is provided and QA'ed by treasuredata as rpm/deb/.. package
# -> td-agent (stable) vs fluentd (edge)
#ENV LD_PRELOAD="/usr/lib/libjemalloc.so.2"

# Run Fluentd
CMD ["/fluentd/entrypoint.sh"]


text:
<?php

// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.

defined('MOODLE_INTERNAL') || die();

$string['ajaxnext25'] = 'Siguientes 25 >>';
$string['ajaxoneuserfound'] = '1 usuario encontrado';
$string['ajaxprev25'] = '<< Anteriores 25';
$string['ajaxxusersfound'] = '{$a} usuarios encontrados';
$string['configcourseusers'] = 'Mostrar liga hacia un diálogo de lista de usuarios para entrar-como al nivel de curso.';
$string['configloginasusernames'] = 'Una lista de nombresdeusuarios separados por coma (ejemplo: johndoh,janeduh,pepitoperez,alumno65432) de los usuarios que se mostrarán en un menú para entrar-como en la navegación de las configuraciones.';
$string['configloginasusers'] = 'Lista de IDs de usuarios separadas por coma  (ejemplo:101,1212) para mostrar en el menú de "entrar-como" en la navegación de configuraciones.';
$string['courseusers'] = 'Usuarios del curso';
$string['errajaxsearch'] = 'Error al buscar usuarios';
$string['loginasuser'] = 'Entrar como (otro) usuario';
$string['loginasusernames'] = 'Entrar como usuarios por nombredeusuario';
$string['loginasusers'] = 'Entrar como usuarios por ID';
$string['pluginname'] = 'Entrar como';
$string['unknowajaxaction'] = 'Acción solicitada desconocida';


text:
package com.gigigo.orchextra.domain.interactors.base;

import com.gigigo.gggjavalib.business.model.BusinessError;

public interface InteractorError {
  BusinessError getError();
}


text:
#include "core/layout/svg/LayoutSVGPath.h"

#include "core/layout/svg/LayoutSVGResourceMarker.h"
#include "core/layout/svg/SVGResources.h"
#include "core/layout/svg/SVGResourcesCache.h"
#include "core/svg/SVGGeometryElement.h"
#include "wtf/MathExtras.h"

namespace blink {

LayoutSVGPath::LayoutSVGPath(SVGGeometryElement* node)
    : LayoutSVGShape(node)
{
}

LayoutSVGPath::~LayoutSVGPath()
{
}

void LayoutSVGPath::updateShapeFromElement()
{
    LayoutSVGShape::updateShapeFromElement();
    processMarkerPositions();

    m_strokeBoundingBox = calculateUpdatedStrokeBoundingBox();
}

FloatRect LayoutSVGPath::hitTestStrokeBoundingBox() const
{
    const SVGComputedStyle& svgStyle = style()->svgStyle();
    if (svgStyle.hasStroke())
        return m_strokeBoundingBox;

    // Implementation of http://dev.w3.org/fxtf/css-masking-1/#compute-stroke-bounding-box
    // except that we ignore whether the stroke is none.

    FloatRect box = m_fillBoundingBox;

    const float strokeWidth = this->strokeWidth();
    if (strokeWidth <= 0)
        return box;

    float delta = strokeWidth / 2;

    if (svgStyle.hasMiterJoinStyle()) {
        const float miter = svgStyle.strokeMiterLimit();
        if (miter < M_SQRT2 && svgStyle.hasSquareCapStyle())
            delta *= M_SQRT2;
        else
            delta *= miter;
    } else if (svgStyle.hasSquareCapStyle()) {
        delta *= M_SQRT2;
    }

    box.inflate(delta);
    return box;
}

FloatRect LayoutSVGPath::calculateUpdatedStrokeBoundingBox() const
{
    FloatRect strokeBoundingBox = m_strokeBoundingBox;
    if (!m_markerPositions.isEmpty())
        strokeBoundingBox.unite(markerRect(strokeWidth()));
    return strokeBoundingBox;
}

FloatRect LayoutSVGPath::markerRect(float strokeWidth) const
{
    ASSERT(!m_markerPositions.isEmpty());

    SVGResources* resources = SVGResourcesCache::cachedResourcesForLayoutObject(this);
    ASSERT(resources);

    LayoutSVGResourceMarker* markerStart = resources->markerStart();
    LayoutSVGResourceMarker* markerMid = resources->markerMid();
    LayoutSVGResourceMarker* markerEnd = resources->markerEnd();
    ASSERT(markerStart || markerMid || markerEnd);

    FloatRect boundaries;
    unsigned size = m_markerPositions.size();
    for (unsigned i = 0; i < size; ++i) {
        if (LayoutSVGResourceMarker* marker = SVGMarkerData::markerForType(m_markerPositions[i].type, markerStart, markerMid, markerEnd))
            boundaries.unite(marker->markerBoundaries(marker->markerTransformation(m_markerPositions[i].origin, m_markerPositions[i].angle, strokeWidth)));
    }
    return boundaries;
}

bool LayoutSVGPath::shouldGenerateMarkerPositions() const
{
    if (!style()->svgStyle().hasMarkers())
        return false;

    if (!SVGResources::supportsMarkers(*toSVGGraphicsElement(element())))
        return false;

    SVGResources* resources = SVGResourcesCache::cachedResourcesForLayoutObject(this);
    if (!resources)
        return false;

    return resources->markerStart() || resources->markerMid() || resources->markerEnd();
}

void LayoutSVGPath::processMarkerPositions()
{
    m_markerPositions.clear();

    if (!shouldGenerateMarkerPositions())
        return;

    SVGResources* resources = SVGResourcesCache::cachedResourcesForLayoutObject(this);
    ASSERT(resources);

    LayoutSVGResourceMarker* markerStart = resources->markerStart();

    SVGMarkerData markerData(m_markerPositions, markerStart ? markerStart->orientType() == SVGMarkerOrientAutoStartReverse : false);
    path().apply(&markerData, SVGMarkerData::updateFromPathElement);
    markerData.pathIsDone();
}

}


text:
var noop = function () {
};

var createCustomFileHandler = function(handlers, prefixes) {
    var options = {
        verbose: {local: false, remote: false, proxy: false},
        prefixes: prefixes
    };
    var appsLoad = function (request, response) {
        var f = require('@open-xchange/appserver').middleware.appsload(options);
        return f(request, response, noop);
    };
    var localFiles = function (request, response) {
        var f = require('@open-xchange/appserver').middleware.localfiles(options);
        return f(request, response, noop);
    };

    handlers.push({
        urlRegex: /^\/api\/apps\/load\/.*,/,
        handler: appsLoad
    });

    handlers.push({
        urlRegex: /(\/apps\/)/,
        handler: localFiles
    });

    handlers.push({
        urlRegex: /(\/static\/)/,
        handler: localFiles
    });
}

module.exports = createCustomFileHandler;


text:
sap.ui.define(['sap/ui/core/UIComponent'],
	function(UIComponent) {
	"use strict";

	var Component = UIComponent.extend("sap.ui.unified.sample.CalendarSingleDaySelection.Component", {

		metadata : {
			manifest: "json"
		}
	});

	return Component;

});


text:
import time
import threading

from pyA20.gpio import gpio as GPIO

from .rpilikeplatform import RPiLikePlatform

class OrangepiPlatform(RPiLikePlatform):

	def __init__(self, config):
		super(OrangepiPlatform, self).__init__(config, 'orangepi', GPIO)

	def setup(self):
		GPIO.init()
		GPIO.setcfg(self._pconfig['button'], GPIO.INPUT)
		GPIO.pullup(self._pconfig['button'], GPIO.PULLUP)
		GPIO.setcfg(self._pconfig['rec_light'], GPIO.OUTPUT)
		GPIO.setcfg(self._pconfig['plb_light'], GPIO.OUTPUT)

	def after_setup(self, trigger_callback=None):

		self._trigger_callback = trigger_callback

		if self._trigger_callback:
			thread = threading.Thread(target=self.wait_for_button, args=())
			thread.daemon = True
			thread.start()

	def wait_for_button(self):
		while True:
			if GPIO.input(self._pconfig['button']) == 0:
				self.detect_button()
			time.sleep(.1)

	def cleanup(self):
		GPIO.output(self._pconfig['rec_light'], GPIO.LOW)
		GPIO.output(self._pconfig['plb_light'], GPIO.LOW)


text:
package com.badlogic.gdx.assets.loaders;

import com.badlogic.gdx.assets.AssetDescriptor;
import com.badlogic.gdx.assets.AssetLoaderParameters;
import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.scenes.scene2d.ui.Skin;
import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.ObjectMap;
import com.badlogic.gdx.utils.ObjectMap.Entry;

/** {@link AssetLoader} for {@link Skin} instances. All {@link Texture} and {@link BitmapFont} instances will be loaded as
 * dependencies. Passing a {@link SkinParameter} allows the exact name of the texture associated with the skin to be specified.
 * Otherwise the skin texture is looked up just as with a call to {@link Skin#Skin(com.badlogic.gdx.files.FileHandle)}. A
 * {@link SkinParameter} also allows named resources to be set that will be added to the skin before loading the json file,
 * meaning that they can be referenced from inside the json file itself. This is useful for dynamic resources such as a BitmapFont
 * generated through FreeTypeFontGenerator.
 * @author Nathan Sweet */
public class SkinLoader extends AsynchronousAssetLoader<Skin, SkinLoader.SkinParameter> {
	public SkinLoader (FileHandleResolver resolver) {
		super(resolver);
	}

	@Override
	public Array<AssetDescriptor> getDependencies (String fileName, FileHandle file, SkinParameter parameter) {
		Array<AssetDescriptor> deps = new Array();
		if (parameter == null || parameter.textureAtlasPath == null)
			deps.add(new AssetDescriptor(file.pathWithoutExtension() + ".atlas", TextureAtlas.class));
		else if (parameter.textureAtlasPath != null) deps.add(new AssetDescriptor(parameter.textureAtlasPath, TextureAtlas.class));
		return deps;
	}

	@Override
	public void loadAsync (AssetManager manager, String fileName, FileHandle file, SkinParameter parameter) {
	}

	@Override
	public Skin loadSync (AssetManager manager, String fileName, FileHandle file, SkinParameter parameter) {
		String textureAtlasPath = file.pathWithoutExtension() + ".atlas";
		ObjectMap<String, Object> resources = null;
		if (parameter != null) {
			if (parameter.textureAtlasPath != null) {
				textureAtlasPath = parameter.textureAtlasPath;
			}
			if (parameter.resources != null) {
				resources = parameter.resources;
			}
		}
		TextureAtlas atlas = manager.get(textureAtlasPath, TextureAtlas.class);
		Skin skin = newSkin(atlas);
		if (resources != null) {
			for (Entry<String, Object> entry : resources.entries()) {
				skin.add(entry.key, entry.value);
			}
		}
		skin.load(file);
		return skin;
	}

	/** Override to allow subclasses of Skin to be loaded or the skin instance to be configured.
	 * @param atlas The TextureAtlas that the skin will use.
	 * @return A new Skin (or subclass of Skin) instance based on the provided TextureAtlas. */
	protected Skin newSkin (TextureAtlas atlas) {
		return new Skin(atlas);
	}

	static public class SkinParameter extends AssetLoaderParameters<Skin> {
		public final String textureAtlasPath;
		public final ObjectMap<String, Object> resources;

		public SkinParameter () {
			this(null, null);
		}

		public SkinParameter (ObjectMap<String, Object> resources) {
			this(null, resources);
		}

		public SkinParameter (String textureAtlasPath) {
			this(textureAtlasPath, null);
		}

		public SkinParameter (String textureAtlasPath, ObjectMap<String, Object> resources) {
			this.textureAtlasPath = textureAtlasPath;
			this.resources = resources;
		}
	}
}


text:
package config

// HelpKV - implements help messages for keys
// with value as description of the keys.
type HelpKV struct {
	Key         string `json:"key"`
	Type        string `json:"type"`
	Description string `json:"description"`
	Optional    bool   `json:"optional"`

	// Indicates if the value contains sensitive info
	// that shouldn't be exposed in certain apis
	Sensitive bool `json:"-"`

	// Indicates if sub-sys supports multiple targets.
	MultipleTargets bool `json:"multipleTargets"`
}

// HelpKVS - implement order of keys help messages.
type HelpKVS []HelpKV

// Lookup - lookup a key from help kvs.
func (hkvs HelpKVS) Lookup(key string) (HelpKV, bool) {
	for _, hkv := range hkvs {
		if hkv.Key == key {
			return hkv, true
		}
	}
	return HelpKV{}, false
}

// DefaultComment used across all sub-systems.
const DefaultComment = "optionally add a comment to this setting"

// Region and Worm help is documented in default config
var (
	RegionHelp = HelpKVS{
		HelpKV{
			Key:         RegionName,
			Type:        "string",
			Description: `name of the location of the server e.g. "us-west-rack2"`,
			Optional:    true,
		},
		HelpKV{
			Key:         Comment,
			Type:        "sentence",
			Description: DefaultComment,
			Optional:    true,
		},
	}
)


text:
title: Paulie's Passover Predicament
written_by: 'Jane Sutton, Barbara Vagnozzi (Illustrator)'
available: 'January 1st, 2018'
isbn: '9781512420975'
binding: Paperback
link_to_buy_page:
image_path: 'https://images.booksense.com/images/975/420/9781512420975.jpg'
link:
---


text:
Units

       {{'Add New Unit' | translate}}

      <input type="text" value="{{department.name}}" ng-model="department.name" class="form-control" placeholder="{{'Add New Unit' | translate}}">

        <button class="btn btn-default" type="button" ng-click="save(department)" translate>Add</button>

        Name

        {{department.name}}


text:
require_relative '../helpers'

module PrmdLoaderTests
  # @abstrac
  def testing_filename
    #
  end

  # @abstract
  def loader_module
    #
  end

  def assert_test_data(data)
    assert_kind_of Hash, data
    assert_equal 'yes', data['test']
    assert_kind_of Hash, data['object']
    assert_equal 'Object', data['object']['is_a']
  end

  def test_load_data
    data = File.read(testing_filename)
    assert_test_data loader_module.load_data(data)
  end

  def test_load_stream
    File.open(testing_filename, 'r') do |f|
      assert_test_data loader_module.load_stream(f)
    end
  end

  def test_load_file
    assert_test_data loader_module.load_file(testing_filename)
  end
end


text:
import abc
import httplib

from oslo_utils import excutils
import six

from neutron.common import constants
from neutron.common import log as call_log
from neutron.common import utils
from neutron.i18n import _LE, _LW
from neutron.openstack.common import log as logging
from neutron.plugins.nec.common import constants as nconst
from neutron.plugins.nec.common import exceptions as nexc

LOG = logging.getLogger(__name__)

PROVIDER_OPENFLOW = nconst.ROUTER_PROVIDER_OPENFLOW

@six.add_metaclass(abc.ABCMeta)
class RouterDriverBase(object):

    def __init__(self, plugin, ofc_manager):
        self.plugin = plugin
        self.ofc = ofc_manager

    def floating_ip_support(self):
        return True

    @abc.abstractmethod
    def create_router(self, context, tenant_id, router):
        pass

    @abc.abstractmethod
    def update_router(self, context, router_id, old_router, new_router):
        pass

    @abc.abstractmethod
    def delete_router(self, context, router_id, router):
        pass

    @abc.abstractmethod
    def add_interface(self, context, router_id, port):
        pass

    @abc.abstractmethod
    def delete_interface(self, context, router_id, port):
        pass

class RouterL3AgentDriver(RouterDriverBase):

    need_gw_info = False

    @call_log.log
    def create_router(self, context, tenant_id, router):
        return router

    @call_log.log
    def update_router(self, context, router_id, old_router, new_router):
        return new_router

    @call_log.log
    def delete_router(self, context, router_id, router):
        pass

    @call_log.log
    def add_interface(self, context, router_id, port):
        return self.plugin.activate_port_if_ready(context, port)

    @call_log.log
    def delete_interface(self, context, router_id, port):
        return self.plugin.deactivate_port(context, port)

class RouterOpenFlowDriver(RouterDriverBase):

    need_gw_info = True

    def floating_ip_support(self):
        return self.ofc.driver.router_nat_supported

    def _process_gw_port(self, gw_info, routes):
        if gw_info and gw_info['gateway_ip']:
            routes.append({'destination': constants.IPv4_ANY,
                           'nexthop': gw_info['gateway_ip']})

    @call_log.log
    def create_router(self, context, tenant_id, router):
        try:
            router_id = router['id']
            added_routes = []
            self.ofc.ensure_ofc_tenant(context, tenant_id)
            self.ofc.create_ofc_router(context, tenant_id, router_id,
                                       router['name'])
            self._process_gw_port(router['gw_port'], added_routes)
            if added_routes:
                self.ofc.update_ofc_router_route(context, router_id,
                                                 added_routes, [])
            new_status = nconst.ROUTER_STATUS_ACTIVE
            self.plugin._update_resource_status(context, "router",
                                                router['id'],
                                                new_status)
            router['status'] = new_status
            return router
        except (nexc.OFCException, nexc.OFCMappingNotFound) as exc:
            with excutils.save_and_reraise_exception():
                if (isinstance(exc, nexc.OFCException) and
                    exc.status == httplib.CONFLICT):
                    raise nexc.RouterOverLimit(provider=PROVIDER_OPENFLOW)
                LOG.error(_LE("create_router() failed due to %s"), exc)
                new_status = nconst.ROUTER_STATUS_ERROR
                self._update_resource_status(context, "router",
                                             router['id'],
                                             new_status)

    @call_log.log
    def update_router(self, context, router_id, old_router, new_router):
        old_routes = old_router['routes'][:]
        new_routes = new_router['routes'][:]
        self._process_gw_port(old_router['gw_port'], old_routes)
        self._process_gw_port(new_router['gw_port'], new_routes)
        added, removed = utils.diff_list_of_dict(old_routes, new_routes)
        if added or removed:
            try:
                # NOTE(amotoki): PFC supports one-by-one route update at now.
                # It means there may be a case where some route is updated but
                # some not. To allow the next call of failures to sync routes
                # with Neutron side, we pass the whole new routes here.
                # PFC should support atomic route update in the future.
                self.ofc.update_ofc_router_route(context, router_id,
                                                 new_routes)
                new_status = nconst.ROUTER_STATUS_ACTIVE
                self.plugin._update_resource_status(
                    context, "router", router_id, new_status)
                new_router['status'] = new_status
            except (nexc.OFCException, nexc.OFCMappingNotFound) as exc:
                with excutils.save_and_reraise_exception():
                    LOG.error(_LE("_update_ofc_routes() failed due to %s"),
                              exc)
                    new_status = nconst.ROUTER_STATUS_ERROR
                    self.plugin._update_resource_status(
                        context, "router", router_id, new_status)
        return new_router

    @call_log.log
    def delete_router(self, context, router_id, router):
        if not self.ofc.exists_ofc_router(context, router_id):
            return
        try:
            self.ofc.delete_ofc_router(context, router_id, router)
        except (nexc.OFCException, nexc.OFCMappingNotFound) as exc:
            with excutils.save_and_reraise_exception():
                LOG.error(_LE("delete_router() failed due to %s"), exc)
                self.plugin._update_resource_status(
                    context, "router", router_id, nconst.ROUTER_STATUS_ERROR)

    @call_log.log
    def add_interface(self, context, router_id, port):
        port_id = port['id']
        # port['fixed_ips'] may be empty if ext_net has no subnet.
        # Such port is invalid for a router port and we don't create a port
        # on OFC. The port is removed in l3_db._create_router_gw_port.
        if not port['fixed_ips']:
            LOG.warning(_LW('RouterOpenFlowDriver.add_interface(): the '
                            'requested port '
                            'has no subnet. add_interface() is skipped. '
                            'router_id=%(id)s, port=%(port)s)'),
                        {'id': router_id, 'port': port})
            return port
        fixed_ip = port['fixed_ips'][0]
        subnet = self.plugin._get_subnet(context, fixed_ip['subnet_id'])
        port_info = {'network_id': port['network_id'],
                     'ip_address': fixed_ip['ip_address'],
                     'cidr': subnet['cidr'],
                     'mac_address': port['mac_address']}
        try:
            self.ofc.add_ofc_router_interface(context, router_id,
                                              port_id, port_info)
            new_status = nconst.ROUTER_STATUS_ACTIVE
            self.plugin._update_resource_status(
                context, "port", port_id, new_status)
            return port
        except (nexc.OFCException, nexc.OFCMappingNotFound) as exc:
            with excutils.save_and_reraise_exception():
                LOG.error(_LE("add_router_interface() failed due to %s"), exc)
                new_status = nconst.ROUTER_STATUS_ERROR
                self.plugin._update_resource_status(
                    context, "port", port_id, new_status)

    @call_log.log
    def delete_interface(self, context, router_id, port):
        port_id = port['id']
        try:
            self.ofc.delete_ofc_router_interface(context, router_id, port_id)
            new_status = nconst.ROUTER_STATUS_ACTIVE
            self.plugin._update_resource_status(context, "port", port_id,
                                                new_status)
            port['status'] = new_status
            return port
        except (nexc.OFCException, nexc.OFCMappingNotFound) as exc:
            with excutils.save_and_reraise_exception():
                LOG.error(_LE("delete_router_interface() failed due to %s"),
                          exc)
                new_status = nconst.ROUTER_STATUS_ERROR
                self.plugin._update_resource_status(context, "port", port_id,
                                                    new_status)


text:
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import FlatButton from 'material-ui/FlatButton';
import { Link } from 'react-router-dom';
import { compose } from 'react-apollo';
import { Grid, Row, Col } from 'react-bootstrap';

// graphql
import settingsQuery from '../../../modules/settings/graphql/queries/list';
import tenantsQuery from '../../../modules/tenants/graphql/queries/tenants';

import './Footer.css';

class Footer extends React.Component {

	render() {
		const { tenantId, settingsQuery, tenantsQuery } = this.props;
		let settings = null;
		let tenant = null;

		if (settingsQuery && settingsQuery.settings) {
			settings = settingsQuery.loading ? {} : settingsQuery.settings.find(x => x.tenantId === tenantId);
			tenant = tenantsQuery.loading ? undefined : tenantsQuery.tenants.find(x => x._id === tenantId);
		}

		const now = new Date();
		const year = now.getFullYear();

		return (

				<Grid>
					<Row>

								{tenant && !tenant.isAnnotation ?

										<Link to="/commentary">
											<FlatButton
												label="Commentary"
											/>
										</Link>
										<Link to="/commenters">
											<FlatButton
												label="Commentators"
											/>
										</Link>
										<Link to="/words">
											<FlatButton
												label="Words"
											/>
										</Link>
										<Link to="/ideas">
											<FlatButton
												label="Ideas"
											/>
										</Link>
										<Link to={settings && settings.aboutURL ? settings.aboutURL : '/about'}>
											<FlatButton
												label="About"
											/>
										</Link>

									: ''}

					</Row>
					<Row>

							<Col md={5}>

{settings ? settings.name : undefined}

							</Col>

							<Col md={2}>

							</Col>

							<Col md={5}>

									For more information about the Commentary or general media inquiries,
									please contact
									<a href={settings && settings.emails ? `mailto:${settings.emails.contact}` : ''}>
										{settings && settings.emails ? settings.emails.contact : ''}
									.

									This website is provided by
										The Center for Hellenic Studies
									.

							</Col>

					</Row>
					<Row>
						<Col md={8} mdOffset={2}>

								Copyright {year} The Center for Hellenic Studies.
								See our terms and privacy policy and EU/EEA Privacy Disclosures.

						</Col>
					</Row>
				</Grid>

		);
	}
}

Footer.propTypes = {
	settingsQuery: PropTypes.object,
	tenantsQuery: PropTypes.object,
};

const mapStateToProps = (state, props) => ({
	tenantId: state.tenant.tenantId,
});

export default compose(
	connect(mapStateToProps),
	settingsQuery,
	tenantsQuery,
)(Footer);


text:
package au.com.dius.pact.consumer;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Before each test, a mock server will be setup at given port/host that will provide mocked responses.
 * after each test, it will be teared down.
 *
 * @author pmucha
 *
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface PactVerification {
    /**
     * the tested provider name.
     */
    String[] value() default "";

    /**
     * If a mismatch is expected. Use to test failure conditions
     * @deprecated do not use this, it will be removed in a future version
     */
    @Deprecated
    boolean expectMismatch() default false;

    /**
     * Method to call to get the pact fragment. Defaults to empty string which results in using the first one found
     */
    String fragment() default "";
}


text:
window.Bootstrap = Ember.Bootstrap = Ember.Fuel.Bootstrap = Ember.Namespace.create({ View: {} });

Ember.Fuel.Bootstrap.Icon = Ember.Component.extend({
	tagName: 'span',
	classNames: ['glyphicon'],
	classNameBindings: ['iconName'],

	icon: null,

	iconName: function() {
		return 'glyphicon-' + this.get('icon');
	}.property('icon')

});

Ember.Handlebars.helper('bs-icon', Ember.Fuel.Bootstrap.Icon);


text:
@interface FSMainViewController ()<UITableViewDelegate,UITableViewDataSource>
@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) NSMutableArray *datas;
@property (nonatomic, assign) BOOL isDebug;
@end

@implementation FSMainViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"debug" style:UIBarButtonItemStylePlain target:self action:@selector(debugButtonClick)];
    [self setupSubViews];
    [self insertWithTop];
}

- (void)setupSubViews
{
    _tableView = [[UITableView alloc]initWithFrame:CGRectZero style:UITableViewStylePlain];
    _tableView.delegate = self;
    _tableView.dataSource = self;
    [self.view addSubview:_tableView];
    [_tableView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view.mas_top).with.offset(0);
        make.left.bottom.right.mas_equalTo(self.view);
    }];
    FSWeakSelf
    _tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
        [weakSelf insertWithTop];
    }];

    _tableView.mj_footer = [MJRefreshAutoGifFooter footerWithRefreshingBlock:^{
        [weakSelf insertWithBottom];
    }];

}

#pragma mark - Btn
- (void)debugButtonClick
{
    self.isDebug = !self.isDebug;
    [self.tableView reloadData];
}

#pragma mark - data
- (void)insertWithTop
{
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        NSString *dataFilePath = [[NSBundle mainBundle] pathForResource:@"data" ofType:@"json"];
        NSData *data = [NSData dataWithContentsOfFile:dataFilePath];
        NSDictionary *rootDict = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil];
        NSArray *feedDicts = rootDict[@"shunfski"];

        NSMutableArray *entities = @[].mutableCopy;
        [feedDicts enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
            [entities addObject:[[FSEntity alloc] initWithDictionary:obj]];
        }];
        [self.datas removeAllObjects];
        [self.datas addObjectsFromArray:entities];
        [self.tableView.mj_header endRefreshing];
        [self.tableView reloadData];
    });
}

- (void)insertWithBottom
{
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        NSString *dataFilePath = [[NSBundle mainBundle] pathForResource:@"data" ofType:@"json"];
        NSData *data = [NSData dataWithContentsOfFile:dataFilePath];
        NSDictionary *rootDict = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil];
        NSArray *feedDicts = rootDict[@"shunfski"];

        NSMutableArray *entities = @[].mutableCopy;
        [feedDicts enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
            [entities addObject:[[FSEntity alloc] initWithDictionary:obj]];
        }];
        [self.datas addObjectsFromArray:entities];
        [self.tableView.mj_footer endRefreshing];
        [self.tableView reloadData];
    });

}

#pragma mark - UITableView
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 2;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return _datas.count;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    FSEntity *entity = _datas[indexPath.row];
    CGFloat height = [self.title isEqualToString:@"keyCache"]?[FSTestTableViewCell FSCellHeightForTableView:tableView indexPath:indexPath cacheKey:entity.identifier cellContentViewWidth:0 bottomOffset:0]:[FSTestTableViewCell FSCellHeightForTableView:tableView indexPath:indexPath cellContentViewWidth:0 bottomOffset:0];
    return height;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (indexPath.section == 0) {
        FSTestTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
        if (!cell) {
            cell = [[FSTestTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"];
        }
        cell.isDebug = self.isDebug;
        cell.entity = _datas[indexPath.row];
        return cell;
    }
    FSTestTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell2"];
    if (!cell) {
        cell = [[FSTestTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell2"];
    }
    cell.isDebug = self.isDebug;
    cell.entity = _datas[indexPath.row];
    return cell;
}

#pragma mark - Lazyload

- (NSMutableArray *)datas
{
    if (!_datas) {
        _datas = [NSMutableArray array];
    }
    return _datas;
}

@end


text:
layout: post
title: MMR - Me, My dog and Radiology
subtitle: Dr. Kushagra Garg and Dr. Apoorva Chitthajallu
date: 2018-06-20
bigimg: /img/Drsnowie.jpeg
---

I have recently passed my MDRD, and out of the vigour of youth, I do tend to work long hours and I finish a lot of cases every day.
A lot of my work is "teleradiology" where I have worked with some of the leading companies in the field.

Radiologists, and especially remote reporting doctors, are under constant pressure and scanner. We do a lot of cases in a relatively short period of time, causing a lot of frustration and irritation on the way.
In such conditions, no matter if I am working in the wee hours of the night or early morning, one person who is always ready to put his cute paws (or his naughty head) on my lap is my dog Dr. Snowie (Doctor, as he knows the exact treatment for all emotional conditions).
This guy instantly senses my temper and starts doing all sorts mischevious things to cool me down and cheer me up.
Sometimes he also wants see what I do on my laptop for so many hours and ends up barking like crazy when I scroll down the images. It has been a very tough roller coaster ride in the past 1 year of my work and there's no doubt in my mind that I wouldn't have survived for even a few months if Dr. Snowie wouldn't have been there in this journey with me.

It's a proven fact according to sciencedaily.com and ncbi.gov that pets play major role in relieving stress.
Stress doesn't rear it's ugly head because of the nature of work or the scans we are interpreting, rather due to the insane number of calls from assigners, clients and referring doctors which greatly increases the pressure on us.
During our post graduation, we would report hardly 30-40 cases per day on an average, and that too, under the supervision of our seniors and teachers in our department.
Now, we do end up clocking at over 100 cases per day and sometimes with clinical history of 1 word (Radiologists - you know what I'm talking about). To top it all, account managers and technicians expect us to complete the critical or stat cases as soon as possible leading to more stress and pressure.
We are human, and we also tend to make more mistakes which leads to more frustration and vice versa causing a vicious cycle.
The good Dr helps me reset my mind to work again with full force.

As I am writing this blog at 3am in the morning, this fellow is sitting right beside me as he won't sleep till I don't go to the bed and tell him bujjo nana (Telugu for go to sleep baby).
Lastly, it does make a lot of difference where you work also and with whom you are working. My place of work is comfortable because my family and my dog help in that and people I work with, especially 5C Network, due to their holistic approach towards work has made my work very easy.
I highy recommend having a bunch of dogs around you during working and have good people to work with for ease of work and a peaceful life.

I have taken my dose of MMR are you ready to take yours ? 😃


text:
package org.hl7.fhir.dstu3.model.valuesets;

import org.hl7.fhir.dstu3.model.EnumFactory;

public class BenefitNetworkEnumFactory implements EnumFactory<BenefitNetwork> {

  public BenefitNetwork fromCode(String codeString) throws IllegalArgumentException {
    if (codeString == null || "".equals(codeString))
      return null;
    if ("in".equals(codeString))
      return BenefitNetwork.IN;
    if ("out".equals(codeString))
      return BenefitNetwork.OUT;
    throw new IllegalArgumentException("Unknown BenefitNetwork code '"+codeString+"'");
  }

  public String toCode(BenefitNetwork code) {
    if (code == BenefitNetwork.IN)
      return "in";
    if (code == BenefitNetwork.OUT)
      return "out";
    return "?";
  }

    public String toSystem(BenefitNetwork code) {
      return code.getSystem();
      }

}


text:
<?php

use Fawkes\Users\UserRepository;

class ProfilesController extends \BaseController {
    /**
     * @var Fawkes\Users\UserRepository
     */
    private $userRepository;

    public function __construct(UserRepository $userRepository)
    {
        $this->userRepository = $userRepository;
    }

	/**
	 * Display a listing of the resource.
	 * GET /profiles
	 *
	 * @return Response
	 */
	public function index()
	{
	}

    /**
     * Display a listing of the resource.
     * GET /profiles
     *
     * @return Response
     */
    public function me()
    {
        return $this->show(Auth::id());
    }

	/**
	 * Show the form for creating a new resource.
	 * GET /profiles/create
	 *
	 * @return Response
	 */
	public function create()
	{
		//
	}

	/**
	 * Store a newly created resource in storage.
	 * POST /profiles
	 *
	 * @return Response
	 */
	public function store()
	{
		//
	}

	/**
	 * Display the specified resource.
	 * GET /profiles/{id}
	 *
	 * @param  int  $id
	 * @return Response
	 */
	public function show($id)
	{
//		$user = $this->userRepository->find($id);
        $user = Fenix::getPerson();
        return View::make('profiles.show', compact('user'));
	}

	/**
	 * Show the form for editing the specified resource.
	 * GET /profiles/{id}/edit
	 *
	 * @param  int  $id
	 * @return Response
	 */
	public function edit($id)
	{
		//
	}

	/**
	 * Update the specified resource in storage.
	 * PUT /profiles/{id}
	 *
	 * @param  int  $id
	 * @return Response
	 */
	public function update($id)
	{
		//
	}

	/**
	 * Remove the specified resource from storage.
	 * DELETE /profiles/{id}
	 *
	 * @param  int  $id
	 * @return Response
	 */
	public function destroy($id)
	{
		//
	}

}


text:
<resources>
    <string name="app_name">Shortrain</string>
    <string name="add_rail">Add rail</string>
    <string name="start_point">Set start point</string>
    <string name="tutorial_1">Add a new rail from Shortrain shortcuts menu (Long press)</string>
    <string name="tutorial_2">Tap the rail to build it, (Adding a new rail before building the last one will have devastating consequences)</string>
    <string name="tutorial_3">Further taps will change the rail direction. Rails can be removed, but not moved. Do not move them!</string>
    <string name="tutorial_4">Add as much starting stations as you wish</string>
    <string name="tutorial_5">Press the starting point and let the fascinating, magnificent and marvelous magic train roll on your screen</string>
    <string name="starting_point_explanation">Please drag the starting point to your homescreen</string>
</resources>


text:
package com.tvd12.ezyfox.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Import classes to the context to manage or process.
 *
 * @author tavandung12
 */

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
public @interface EzyImport {

    /**
     * the array of classes.
     *
     * @return array of classes
     */
    Class<?>[] value();
}


text:
package org.openntf.xsp.starter.renderkit;

import java.io.IOException;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;

import org.openntf.xsp.starter.components.XspCanvas;

import com.ibm.commons.util.StringUtil;
import com.ibm.xsp.renderkit.html_extended.HtmlTagRenderer;

public class HtmlCanvasRenderer extends HtmlTagRenderer {
	private static final String[] ATTRS = { "role" };
	private static final String TAG = "canvas";

	@Override
	protected void encodeAllAttributes(FacesContext context,
			UIComponent component, ResponseWriter writer, String[] properties)
			throws IOException {
		if (component instanceof XspCanvas) {
			XspCanvas canvas = (XspCanvas) component;
			encodeAttribute(writer, "ongesturechange", canvas
					.getOngesturechange(), "ongesturechange");
			encodeAttribute(writer, "ongestureend", canvas.getOngestureend(),
					"ongestureend");
			encodeAttribute(writer, "ongesturestart", canvas
					.getOngesturestart(), "ongesturestart");
			encodeAttribute(writer, "ontouchcancel", canvas.getOntouchcancel(),
					"ontouchcancel");
			encodeAttribute(writer, "ontouchend", canvas.getOntouchend(),
					"ontouchend");
			encodeAttribute(writer, "ontouchmove", canvas.getOntouchmove(),
					"ontouchmove");
			encodeAttribute(writer, "ontouchstart", canvas.getOntouchstart(),
					"ontouchstart");

		}
		super.encodeAllAttributes(context, component, writer, properties);
	}

	protected void encodeAttribute(ResponseWriter writer, String attrName,
			String value, String attrAlias) {
		if (StringUtil.isNotEmpty(value)) {
			try {
				writer.writeAttribute(attrName, value, attrAlias);
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
	}

	@Override
	public void encodeBegin(FacesContext context, UIComponent component)
			throws IOException {
		encodeBegin(context, component, TAG, ATTRS);
	}

	@Override
	public void encodeEnd(FacesContext context, UIComponent component)
			throws IOException {
		encodeEnd(context, component, TAG);
	}

}


text:
module Ruy
  module Conditions

    # Expects that a context attribute will be equal to a given value
    #
    class Eq < Condition
      attr_reader :obj

      # @param obj
      # @param key
      # @example evaluate that :key is 5
      #   Eq.new(5, :key)
      def initialize(obj, *key)
        super
        @obj = obj
        @key = key.first if key.any?
      end

      def ==(o)
        o.kind_of?(Eq) &&
          o.obj == @obj &&
          o.key == @key
      end

      protected

      # @see Condition#evaluate
      def evaluate(value)
        @obj == value
      end

    end
  end
end


text:
package com.duck8823.model.facebook;

import facebook4j.Facebook;
import facebook4j.FacebookFactory;
import facebook4j.auth.AuthorizationFactory;
import facebook4j.conf.ConfigurationBuilder;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;
import org.springframework.context.annotation.ScopedProxyMode;
import org.springframework.web.context.WebApplicationContext;

/**
 * Created by maeda on 2016/01/21.
 */
@Configuration
public class FacebookConfiguration {

	@Value("${my.oauth.appId}")
	private String appId;

	@Value("${my.oauth.appSecret}")
	private String appSecret;

	@Value("${my.oauth.permission}")
	private String permission;

	@Scope(proxyMode = ScopedProxyMode.TARGET_CLASS, value = WebApplicationContext.SCOPE_SESSION)
	@Bean(name = "authentication")
	public FacebookAuthentication authentication() {
		FacebookAuthentication authentication = new FacebookAuthentication();
		authentication.setFacebook(new FacebookFactory().getInstance());
		return authentication;
	}

	@Scope(proxyMode = ScopedProxyMode.TARGET_CLASS, value = WebApplicationContext.SCOPE_SESSION)
	@Bean(name = "myAuthentication")
	public FacebookAuthentication mayFacebookAuthentication() {
		FacebookAuthentication authentication = new FacebookAuthentication();
		authentication.setFacebook(facebook());
		return authentication;
	}

	@Bean(name = "myFacebook")
	public Facebook facebook(){
		ConfigurationBuilder builder = new ConfigurationBuilder();
		builder.setOAuthAppId(appId);
		builder.setOAuthAppSecret(appSecret);
		builder.setOAuthPermissions(permission);
		return new FacebookFactory().getInstance(AuthorizationFactory.getInstance(builder.build()));
	}

}


text:
#ifndef STDLIB_NDARRAY_BASE_UNARY_S_F_H
#define STDLIB_NDARRAY_BASE_UNARY_S_F_H

#include "stdlib/ndarray/ctor.h"
#include <stdint.h>

/*
* If C++, prevent name mangling so that the compiler emits a binary file having undecorated names, thus mirroring the behavior of a C compiler.
*/
#ifdef __cplusplus
extern "C" {
#endif

/**
* Applies a unary callback accepting and returning signed 8-bit integers to a signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to a single-precision floating-point number, and assigns results to elements in a single-precision floating-point output ndarray.
*/
int8_t stdlib_ndarray_s_f( struct ndarray *arrays[], void *fcn );

/**
* Applies a unary callback accepting and returning signed 8-bit integers to a zero-dimensional signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to a single-precision floating-point number, and assigns results to elements in a zero-dimensional single-precision floating-point output ndarray.
*/
int8_t stdlib_ndarray_s_f_0d( struct ndarray *arrays[], void *fcn );

/**
* Applies a unary callback accepting and returning signed 8-bit integers to a one-dimensional signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to a single-precision floating-point number, and assigns results to elements in a one-dimensional single-precision floating-point output ndarray.
*/
int8_t stdlib_ndarray_s_f_1d( struct ndarray *arrays[], void *fcn );

/**
* Applies a unary callback accepting and returning signed 8-bit integers to a two-dimensional signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to a single-precision floating-point number, and assigns results to elements in a two-dimensional single-precision floating-point output ndarray.
*/
int8_t stdlib_ndarray_s_f_2d( struct ndarray *arrays[], void *fcn );

/**
* Applies a unary callback accepting and returning signed 8-bit integers to a two-dimensional signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to a single-precision floating-point number, and assigns results to elements in a two-dimensional single-precision floating-point output ndarray.
*/
int8_t stdlib_ndarray_s_f_2d_blocked( struct ndarray *arrays[], void *fcn );

/**
* Applies a unary callback accepting and returning signed 8-bit integers to a three-dimensional signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to a single-precision floating-point number, and assigns results to elements in a three-dimensional single-precision floating-point output ndarray.
*/
int8_t stdlib_ndarray_s_f_3d( struct ndarray *arrays[], void *fcn );

/**
* Applies a unary callback accepting and returning signed 8-bit integers to a three-dimensional signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to a single-precision floating-point number, and assigns results to elements in a three-dimensional single-precision floating-point output ndarray.
*/
int8_t stdlib_ndarray_s_f_3d_blocked( struct ndarray *arrays[], void *fcn );

/**
* Applies a unary callback accepting and returning signed 8-bit integers to a four-dimensional signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to a single-precision floating-point number, and assigns results to elements in a four-dimensional single-precision floating-point output ndarray.
*/
int8_t stdlib_ndarray_s_f_4d( struct ndarray *arrays[], void *fcn );

/**
* Applies a unary callback accepting and returning signed 8-bit integers to a four-dimensional signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to a single-precision floating-point number, and assigns results to elements in a four-dimensional single-precision floating-point output ndarray.
*/
int8_t stdlib_ndarray_s_f_4d_blocked( struct ndarray *arrays[], void *fcn );

/**
* Applies a unary callback accepting and returning signed 8-bit integers to a five-dimensional signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to a single-precision floating-point number, and assigns results to elements in a five-dimensional single-precision floating-point output ndarray.
*/
int8_t stdlib_ndarray_s_f_5d( struct ndarray *arrays[], void *fcn );

/**
* Applies a unary callback accepting and returning signed 8-bit integers to a five-dimensional signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to a single-precision floating-point number, and assigns results to elements in a five-dimensional single-precision floating-point output ndarray.
*/
int8_t stdlib_ndarray_s_f_5d_blocked( struct ndarray *arrays[], void *fcn );

/**
* Applies a unary callback accepting and returning signed 8-bit integers to a six-dimensional signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to a single-precision floating-point number, and assigns results to elements in a six-dimensional single-precision floating-point output ndarray.
*/
int8_t stdlib_ndarray_s_f_6d( struct ndarray *arrays[], void *fcn );

/**
* Applies a unary callback accepting and returning signed 8-bit integers to a six-dimensional signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to a single-precision floating-point number, and assigns results to elements in a six-dimensional single-precision floating-point output ndarray.
*/
int8_t stdlib_ndarray_s_f_6d_blocked( struct ndarray *arrays[], void *fcn );

/**
* Applies a unary callback accepting and returning signed 8-bit integers to a seven-dimensional signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to a single-precision floating-point number, and assigns results to elements in a seven-dimensional single-precision floating-point output ndarray.
*/
int8_t stdlib_ndarray_s_f_7d( struct ndarray *arrays[], void *fcn );

/**
* Applies a unary callback accepting and returning signed 8-bit integers to a seven-dimensional signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to a single-precision floating-point number, and assigns results to elements in a seven-dimensional single-precision floating-point output ndarray.
*/
int8_t stdlib_ndarray_s_f_7d_blocked( struct ndarray *arrays[], void *fcn );

/**
* Applies a unary callback accepting and returning signed 8-bit integers to an eight-dimensional signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to a single-precision floating-point number, and assigns results to elements in an eight-dimensional single-precision floating-point output ndarray.
*/
int8_t stdlib_ndarray_s_f_8d( struct ndarray *arrays[], void *fcn );

/**
* Applies a unary callback accepting and returning signed 8-bit integers to an eight-dimensional signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to a single-precision floating-point number, and assigns results to elements in an eight-dimensional single-precision floating-point output ndarray.
*/
int8_t stdlib_ndarray_s_f_8d_blocked( struct ndarray *arrays[], void *fcn );

/**
* Applies a unary callback accepting and returning signed 8-bit integers to a nine-dimensional signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to a single-precision floating-point number, and assigns results to elements in a nine-dimensional single-precision floating-point output ndarray.
*/
int8_t stdlib_ndarray_s_f_9d( struct ndarray *arrays[], void *fcn );

/**
* Applies a unary callback accepting and returning signed 8-bit integers to a nine-dimensional signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to a single-precision floating-point number, and assigns results to elements in a nine-dimensional single-precision floating-point output ndarray.
*/
int8_t stdlib_ndarray_s_f_9d_blocked( struct ndarray *arrays[], void *fcn );

/**
* Applies a unary callback accepting and returning signed 8-bit integers to a ten-dimensional signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to a single-precision floating-point number, and assigns results to elements in a ten-dimensional single-precision floating-point output ndarray.
*/
int8_t stdlib_ndarray_s_f_10d( struct ndarray *arrays[], void *fcn );

/**
* Applies a unary callback accepting and returning signed 8-bit integers to a ten-dimensional signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to a single-precision floating-point number, and assigns results to elements in a ten-dimensional single-precision floating-point output ndarray.
*/
int8_t stdlib_ndarray_s_f_10d_blocked( struct ndarray *arrays[], void *fcn );

/**
* Applies a unary callback accepting and returning signed 8-bit integers to an n-dimensional signed 8-bit integer input ndarray, casts the callback's signed 8-bit integer return value to a single-precision floating-point number, and assigns results to elements in an n-dimensional single-precision floating-point output ndarray.
*/
int8_t stdlib_ndarray_s_f_nd( struct ndarray *arrays[], void *fcn );

#ifdef __cplusplus
}
#endif

#endif // !STDLIB_NDARRAY_BASE_UNARY_S_F_H


text:
<!DOCTYPE html>
<title>Test that video media documents have a black background.</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="media-file.js"></script>
<iframe></iframe>
<script>
async_test(function(t) {
    var iframe = document.querySelector("iframe");
    iframe.onload = t.step_func_done(function() {
        var iframeDocument = iframe.contentDocument;
        var iframeBody = iframeDocument.querySelector("body");

        var iframeBodyStyle = iframeDocument.defaultView.getComputedStyle(iframeBody);
        assert_equals(iframeBodyStyle.backgroundColor, "rgb(0, 0, 0)");
    });

    iframe.src = findMediaFile("video", "content/counting");
});
</script>


text:
const GraphUtils = require('../src/graph-utils');
const GraphTestUtils = require('./graph-test-utils');

test('simplify then bundle: data set diabolo', () => {
    let data = GraphTestUtils.readFile('./test/data/data_diabolo/data_diabolo.json');
    let data_result = GraphTestUtils.readFile('./test/data/data_diabolo/data_diabolo.simplify.bundle.json');

    let simplifyData = new GraphUtils(data).simplify().bundle().result();

    expect(simplifyData).toEqual(data_result);
});

test('simplify then bundle: data set 4', () => {
    let data = GraphTestUtils.readFile('./test/data/data_4/data_4.json');
    let data_result = GraphTestUtils.readFile('./test/data/data_4/data_4.simplify.bundle.json');

    let simplifyData = new GraphUtils(data).simplify().bundle().result();

    expect(simplifyData).toEqual(data_result);
});


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="abc_action_bar_home_description">"Navega a la pàgina d'inici"</string>
    <string name="abc_action_bar_home_description_format">%1$s, %2$s</string>
    <string name="abc_action_bar_home_subtitle_description_format">%1$s, %2$s, %3$s</string>
    <string name="abc_action_bar_up_description">Navega cap a dalt</string>
    <string name="abc_action_menu_overflow_description">Més opcions</string>
    <string name="abc_action_mode_done">Fet</string>
    <string name="abc_activity_chooser_view_see_all">"Mostra'ls tots"</string>
    <string name="abc_activitychooserview_choose_application">Selecciona una aplicació</string>
    <string name="abc_capital_off">DESACTIVAT</string>
    <string name="abc_capital_on">ACTIVAT</string>
    <string name="abc_search_hint">Cerca...</string>
    <string name="abc_searchview_description_clear">Esborra la consulta</string>
    <string name="abc_searchview_description_query">Consulta de cerca</string>
    <string name="abc_searchview_description_search">Cerca</string>
    <string name="abc_searchview_description_submit">Envia la consulta</string>
    <string name="abc_searchview_description_voice">Cerca per veu</string>
    <string name="abc_shareactionprovider_share_with">Comparteix amb</string>
    <string name="abc_shareactionprovider_share_with_application">Comparteix amb %s</string>
    <string name="abc_toolbar_collapse_description">Replega</string>
    <string name="common_android_wear_notification_needs_update_text">"%1$s necessita que s'actualitzi l'aplicació Android Wear."</string>
    <string name="common_android_wear_update_text">"%1$s no s'executarà fins que no actualitzis l'aplicació Android Wear."</string>
    <string name="common_android_wear_update_title">Actualitza Android Wear</string>
    <string name="common_google_play_services_api_unavailable_text">"%1$s necessita un o més serveis de Google Play que actualment no estan disponibles. Posa't en contacte amb el desenvolupador per obtenir ajuda."</string>
    <string name="common_google_play_services_enable_button">Activa els serveis de Google Play</string>
    <string name="common_google_play_services_enable_text">%1$s no funcionarà si no actives els serveis de Google Play.</string>
    <string name="common_google_play_services_enable_title">Activa els serveis de Google Play</string>
    <string name="common_google_play_services_error_notification_requested_by_msg">Sol·licitada per %1$s</string>
    <string name="common_google_play_services_install_button">Baixa els serveis de Google Play</string>
    <string name="common_google_play_services_install_text_phone">"%1$s no s'executarà si el telèfon no té instal·lats els serveis de Google Play."</string>
    <string name="common_google_play_services_install_text_tablet">"%1$s no s'executarà si la tauleta no té instal·lats els serveis de Google Play."</string>
    <string name="common_google_play_services_install_title">Baixa els serveis de Google Play</string>
    <string name="common_google_play_services_invalid_account_text">El compte especificat no existeix en aquest dispositiu. Tria un compte diferent.</string>
    <string name="common_google_play_services_invalid_account_title">Compte no vàlid</string>
    <string name="common_google_play_services_needs_enabling_title">"Una aplicació requereix que s'activin els serveis de Google Play."</string>
    <string name="common_google_play_services_network_error_text">Es requereix una connexió de dades per connectar amb els serveis de Google Play.</string>
    <string name="common_google_play_services_network_error_title">Error de xarxa</string>
    <string name="common_google_play_services_notification_needs_update_title">"Una aplicació requereix que s'actualitzin els serveis de Google Play."</string>
    <string name="common_google_play_services_notification_ticker">Error dels serveis de Google Play</string>
    <string name="common_google_play_services_sign_in_failed_text">"S'ha produït un error en iniciar la sessió al compte especificat. Selecciona un altre compte."</string>
    <string name="common_google_play_services_sign_in_failed_title">"S'ha produït un error en iniciar sessió."</string>
    <string name="common_google_play_services_unknown_issue">Error desconegut relacionat amb els serveis de Google Play.</string>
    <string name="common_google_play_services_unsupported_text">"%1$s depèn dels serveis de Google Play, que no són compatibles amb el teu dispositiu. Posa't en contacte amb el fabricant per obtenir ajuda."</string>
    <string name="common_google_play_services_unsupported_title">Serveis de Google Play</string>
    <string name="common_google_play_services_update_button">Actualitza</string>
    <string name="common_google_play_services_update_text">"%1$s no s'executarà si no actualitzes els serveis de Google Play."</string>
    <string name="common_google_play_services_update_title">Actualitza els serveis de Google Play</string>
    <string name="common_google_play_services_updating_text">"%1$s no s'executarà sense els serveis de Google Play, que s'estan actualitzant en aquest moment."</string>
    <string name="common_google_play_services_updating_title">Actualitzant els serveis de Google Play</string>
    <string name="common_open_on_phone">Obre al telèfon</string>
    <string name="common_signin_button_text">Inicia sessió</string>
    <string name="common_signin_button_text_long">Inicia la sessió amb Google</string>
    <string name="mr_media_route_button_content_description">Sortida de contingut multimèdia</string>
    <string name="mr_media_route_chooser_searching">"S'estan cercant dispositius…"</string>
    <string name="mr_media_route_chooser_title">Connecta al dispositiu</string>
    <string name="mr_media_route_controller_disconnect">Desconnecta</string>
    <string name="mr_system_route_name">Sistema</string>
    <string name="mr_user_route_category_name">Dispositius</string>
    <string name="status_bar_notification_info_overflow">+999</string>
    <string name="wallet_buy_button_place_holder">Compra amb Google</string>
    <string name="tw__allow_btn_txt">Permet-ho</string>
    <string name="tw__cta_text">"Obre'l al Vine"</string>
    <string name="tw__like_tweet">"M'agrada el tuit"</string>
    <string name="tw__liked_tweet">"Desfés l'agradament"</string>
    <string name="tw__loading_tweet">"S'està carregant el tuit"</string>
    <string name="tw__login_btn_txt">Inicia sessió amb Twitter</string>
    <string name="tw__not_now_btn_txt">Ara no</string>
    <string name="tw__pause">atura temporalment</string>
    <string name="tw__play">reprodueix</string>
    <string name="tw__replay">torna a reproduir</string>
    <string name="tw__retweeted_by_format">Retuitat per %1$s</string>
    <string name="tw__share_content_format">"Dóna un cop d'ull al tuit de @%1$s: https://twitter.com/%1$s/status/%2$s"</string>
    <string name="tw__share_email_desc">"Permet que %1$s accedeixi a l'adreça electrònica associada al compte de Twitter @%2$s perquè %1$s la pugui utilitzar d'acord amb la seva política de privacitat. Per exemple, %1$s et podria enviar actualitzacions i altres dades a aquesta adreça."</string>
    <string name="tw__share_email_title">"Comparteix l'adreça electrònica"</string>
    <string name="tw__share_subject_format">Tuit de %1$s (@%2$s)</string>
    <string name="tw__share_tweet">Comparteix el tuit</string>
    <string name="tw__tweet_content_description">%1$s. %2$s. %3$s.</string>
    <string name="tw__tweet_media">Tuit amb contingut multimèdia</string>
</resources>


text:
import logging

class Form(object):
  """
  Represents a form in sqoop.

  Example sqoop form dictionary received by server: [
    {
      "id": 1,
      "inputs": [
        {
          "id": 1,
          "name": "connection.jdbcDriver",
          "value": "org.apache.derby.jdbc.EmbeddedDriver",
          "type": "STRING",
          "size": 128,
          "sensitive": false
        },
        {
          "id": 2,
          "name": "connection.connectionString",
          "value": "jdbc%3Aderby%3A%2Ftmp%2Ftest",
          "type": "STRING",
          "size": 128,
          "sensitive": false
        },
        {
          "id": 3,
          "name": "connection.username",
          "type": "STRING",
          "size": 40,
          "sensitive": false
        },
        {
          "id": 4,
          "name": "connection.password",
          "type": "STRING",
          "size": 40,
          "sensitive": true
        },
        {
          "id": 5,
          "name": "connection.jdbcProperties",
          "type": "MAP",
          "value": {
            "key": "value"
          },
          "sensitive": false
        }
      ],
      "name": "connection",
      "type": "CONNECTION"
    }
  ],

  These forms are relatively unstructured. They will always have an ID, name, type, and inputs.
  The number of inputs will vary.
  Their definitions are dynamically generated from  annotations on classes in sqoop.
  The ID identifies the form in the sqoop metadata reprository.
  The ID could vary.
  The ID is unique per type.
  """
  def __init__(self, id, name, type, inputs=[]):
    self.id = id
    self.name = name
    self.type = type
    self.inputs = inputs

  @staticmethod
  def from_dict(form_dict):
    form_dict['inputs'] = [Input.from_dict(input_dict) for input_dict in form_dict.setdefault('inputs', [])]
    return Form(**form_dict)

  def to_dict(self):
    return {
      'id': self.id,
      'type': self.type,
      'name': self.name,
      'inputs': [input.to_dict() for input in self.inputs]
    }

class Input(object):
  """
  Represents an input in a sqoop form.

  Example sqoop input dictionary received by server: {
    "id": 2,
    "name": "connection.connectionString",
    "values": "jdbc%3Aderby%3A%2Ftmp%2Ftest",
    "type": "STRING",
    "size": 128,
    "sensitive": false
  }

  The ID identifies the input in the sqoop metadata repository.
  The ID could vary.
  The ID is unique per type and per form.
  """
  def __init__(self, id, type, name, value=None, values=None, sensitive=False, size=-1):
    self.id = id
    self.type = type
    self.name = name
    self.value = value
    self.values = values
    self.sensitive = sensitive
    self.size = size

  @staticmethod
  def from_dict(input_dict):
    if 'values' in input_dict and isinstance(input_dict['values'], basestring):
      input_dict['values'] = input_dict['values'].split(',')
    return Input(**input_dict)

  def to_dict(self):
    d = {
      'id': self.id,
      'type': self.type,
      'name': self.name,
      'sensitive': self.sensitive
    }
    if self.value:
      d['value'] = self.value
    if self.values:
      d['values'] = ','.join(self.values)
    if self.size != -1:
      d['size'] = self.size
    return d


text:
package com.example.mvp_practice02.login;

/**
 * Created by tzia on 19-May-17.
 */

public class LoginActivityMVP
{

    interface View
    {

        String getFirstName();

        void setFirstName( String fname );

        String getLastName();

        void setLastName( String lname );

        void showUserNotAvailable();

        void showInputError();

        void showUserSaved();

    }

    interface Presenter
    {

        void setView( LoginActivityMVP.View view );

        void loginButtonClicked();

        void getCurrentUser();

    }

    interface Model
    {
        void createUser( String fname, String lname );

        User getUser();

    }
}


text:
package net.jp2p.container.sequencer;

import java.util.ArrayList;
import java.util.Collection;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

import net.jp2p.container.context.IJp2pServiceBuilder.Components;

public class Jp2pBundleSequencer<T extends Object> implements IJp2pBundleSequencer<T> {

	private String bundle_id;
	private Collection<ISequenceEventListener<T>> listeners;
	private Collection<SequencerEvent<T>> events;

	private Lock lock;

	public Jp2pBundleSequencer( String bundle_id) {
		this.bundle_id = bundle_id;
		this.listeners = new ArrayList<ISequenceEventListener<T>>();
		events = new ArrayList<SequencerEvent<T>>();
		lock = new ReentrantLock();
	}

	public void clearEvents(){
		this.events.clear();
	}

	/* (non-Javadoc)
	 * @see net.jp2p.chaupal.sequencer.IJp2pBundleSequencer#getBundle_id()
	 */
	@Override
	public final String getBundleId() {
		return bundle_id;
	}

	/**
	 * Add a listener and notify it of events that had already occurred
	 * @param listener
	 */
	public void addListener( ISequenceEventListener<T>listener ){
		lock.lock();
		try{
			for( SequencerEvent<T> event: events )
				listener.notifySequenceEvent(event);
			this.listeners.add(listener);
		}
		finally{
			lock.unlock();
		}
	}

	public void removeListener( ISequenceEventListener<T> listener ){
		lock.lock();
		try{
			this.listeners.remove( listener);
		}
		finally{
			lock.unlock();
		}
	}

	/* (non-Javadoc)
	 * @see net.jp2p.chaupal.sequencer.IJp2pBundleSequencer#notifyBundleActive(net.jp2p.chaupal.sequencer.SequencerEvent)
	 */
	@Override
	public synchronized void notifyComponentChanged( SequencerEvent<T> event ){
		//ignore changes of the sequencer service
		if( Components.SEQUENCER_SERVICE.toString().equals( event.getComponentName() ))
			return;
		lock.lock();
		try{
			events.add( event );
			for( ISequenceEventListener<T> listener: this.listeners )
				listener.notifySequenceEvent(event);
		}
		finally{
			lock.unlock();
		}
	}
}


text:
<?php

class Manzana_model extends CI_Model
{
    private $tabla = "manzanas";
    private $select = "*";
    private $where = [];
    public function __construct()
    {
        parent::__construct();
    }
    public function getAll($type = "object")
    {
        $query = $this->db->query("SELECT * FROM {$this->tabla}");
        if ($type === "object") {
            return $query->result();
        } elseif ($type==="array") {
            return $query->result_array();
        }
    }
    public function get($select, $where)
    {
        $this->db->select($select);
        $query = $this->db->get_where("{$this->tabla}", $where);
        return $query->result();
    }
    public function insert($insert)
    {
        $query = $this->db->insert($this->tabla, $insert);
        $id_nueva_manzana = $this->db->insert_id();
        $select = "*";
        $where = ['id_manzana' => $id_nueva_manzana];
        $nueva_manzana = $this->get($select, $where);
        return $nueva_manzana;
    }
    public function update($set, $where)
    {
        $this->db->set($set);
        $this->db->where($where);
        $this->db->update($this->tabla);
        if ($this->db->affected_rows()) {
            $select = "calle, superficie, disponibilidad, col_norte, col_noreste, col_este, col_sureste, col_sur, col_suroeste, col_oeste, col_noroeste";
            return $this->get($select, $where);
        } else {
            return [];
        }
    }
    public function categories_mz()
    {
        $this->db->select(" CONCAT('mz',manzana) AS id,
                            CONCAT('Manzana ',manzana) AS title,
                            IF(disponibilidad !=0,'#3fbb9b','#7f8c8d') AS color,
                            manzana,
                            id_manzana AS _bd_id,
                            disponibilidad
                        ");
        $this->db->order_by('manzana', 'ASC');
        $this->db->from($this->tabla);
        $query = $this->db->get();
        return $query->result();
    }
    public function _get(){
        $this->db->select($this->select);
        $this->db->where($this->where);
        $query = $this->db->get($this->tabla);
        return $query->result();
    }
    public function where($where){
        $this->where = $where;
        return $this;
    }
    public function select($select){
        $this->select = $select;
        return $this;
    }
    public function get_() {
        $this->db->from($this->tabla);
        $query = $this->db->get();
        return $query->result();
    }
    public function from(){
        $this->db->from($this->tabla);
        return $this;
    }
}


text:
package com.packtpub.java7.concurrency.chapter7.recipe04.task;

import java.util.Date;

/**
 * This class implement your own Thread. It stores the creation date, the
 * start date and the finish date of the thread. It provides a mehtod that
 * calculates the execution time of the thread. Overrides the toString() method
 * to return information about the creationDate and the execution time of the thread
 */
public class MyThread extends Thread {

	/**
	 * Creation date of the thread
	 */
	private Date creationDate;

	/**
	 * Start date of the thread
	 */
	private Date startDate;

	/**
	 * Finish date of the thread
	 */
	private Date finishDate;

	/**
	 * Constructor of the class. It establishes the value of the creation date attribute
	 * @param target Runnable object that this thread is going to execute
	 * @param name Name of the thread
	 */
	public MyThread(Runnable target, String name ){
		super(target,name);
		setCreationDate();
	}

	/**
	 * Main method of the thread. Stores the start and finish date of the thread and calls
	 * the run() method of its parent class
	 */
	@Override
	public void run() {
		setStartDate();
		super.run();
		setFinishDate();
		System.out.printf("Thread: %s\n",toString());
	}

	/**
	 * Method that establish the creation date of the thread
	 */
	public void setCreationDate() {
		creationDate=new Date();
	}

	/**
	 * Method that establish the start date of the thread
	 */
	public void setStartDate() {
		startDate=new Date();
	}

	/**
	 * Method that establish the finish date of the thread
	 */
	public void setFinishDate() {
		finishDate=new Date();
	}

	/**
	 * Method that calculates the execution time of the thread as the difference
	 * between the finish date and the start date.
	 * @return
	 */
	public long getExecutionTime() {
		long ret;
		ret=finishDate.getTime()-startDate.getTime();
		return ret;
	}

	/**
	 * Method that generates a String with information about the creation date and the
	 * execution time of the thread
	 */
	public String toString(){
		StringBuffer buffer=new StringBuffer();
		buffer.append(getName());
		buffer.append(": ");
		buffer.append(" Creation Date: ");
		buffer.append(creationDate);
		buffer.append(" : Running time: ");
		buffer.append(getExecutionTime());
		buffer.append(" Milliseconds.");
		return buffer.toString();
	}
}


text:
package org.redisson.client.protocol.convertor;

public class EmptyConvertor<R> extends SingleConvertor<R> {

    @Override
    public R convert(Object obj) {
        return (R) obj;
    }

}


text:
import CoreLayout from "../layouts/Layout";
import { AppStore } from "../store/appStore";
import GameRoute from "./Game";
import Home from "./Home";

export const createRoutes = (store: AppStore) => ({
  childRoutes : [
    GameRoute(store),
  ],
  component   : CoreLayout,
  indexRoute  : Home,
  path        : "/",
});

export default createRoutes;


text:
package som.primitives.arithmetic;

import java.math.BigInteger;

import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.dsl.GenerateNodeFactory;
import com.oracle.truffle.api.dsl.Specialization;
import com.oracle.truffle.api.source.SourceSection;

import som.interpreter.nodes.nary.UnaryBasicOperation;
import som.primitives.Primitive;
import tools.dym.Tags.OpArithmetic;

@GenerateNodeFactory
@Primitive(primitive = "intSqrt:")
@Primitive(primitive = "doubleSqrt:")
@Primitive(selector = "sqrt", receiverType = {Long.class, BigInteger.class, Double.class})
public abstract class SqrtPrim extends UnaryBasicOperation {
  public SqrtPrim(final boolean eagWrap, final SourceSection source) {
    super(eagWrap, source);
  }

  @Override
  protected boolean isTaggedWithIgnoringEagerness(final Class<?> tag) {
    if (tag == OpArithmetic.class) {
      return true;
    } else {
      return super.isTaggedWithIgnoringEagerness(tag);
    }
  }

  @Specialization
  public final double doLong(final long receiver) {
    return Math.sqrt(receiver);
  }

  @Specialization
  @TruffleBoundary
  public final double doBigInteger(final BigInteger receiver) {
    return Math.sqrt(receiver.doubleValue());
  }

  @Specialization
  public final double doDouble(final double receiver) {
    return Math.sqrt(receiver);
  }
}


text:
package org.atnos.eff

import Eff._
import cats._
import cats.syntax.all._

import scala.annotation.tailrec
import scala.util.Random

sealed trait Choose[T]
case class ChooseZero[T]() extends Choose[T]
case object ChoosePlus extends Choose[Boolean]

/**
 * The Choose effect models non-determinism
 * So we can get results, either:
 *   - no results (when using ChooseZero)
 *   - the result for action1 or the result for action b (when using ChoosePlus)
 *
 * When running this effect we can "collect" the results with any
 * F which has an Alternative instance.
 *
 * For example if F is List then:
 *  - no results is the empty list
 *  - the result for a or b is List(a, b)
 *
 * If F is Option then:
 *  - no results is the None
 *  - the result for a or b is Some(a) or Some(b
 */
trait ChooseEffect extends
  ChooseCreation with
  ChooseInterpretation

object ChooseEffect extends ChooseEffect

trait ChooseCreation {

  type _Choose[R] = Choose <= R
  type _choose[R] = Choose |= R

  def zero[R :_choose, A]: Eff[R, A] =
    send[Choose, R, A](ChooseZero[A]())

  def plus[R :_choose, A](a1: => Eff[R, A], a2: => Eff[R, A]): Eff[R, A] =
    EffMonad[R].flatMap(send(ChoosePlus))((b: Boolean) => if (b) a1 else a2)

  def chooseFrom[R :_choose, A](as: List[A]): Eff[R, A] =
    as match {
      case Nil => send[Choose, R, A](ChooseZero[A]())
      case a :: rest => plus(EffMonad[R].pure(a), chooseFrom(rest))
    }
}

object ChooseCreation extends ChooseCreation

trait ChooseInterpretation {

  def runChoose[R, U, A, F[_] : Alternative](r: Eff[R, A])(implicit m: Member.Aux[Choose, R, U]): Eff[U, F[A]] = {
    def lastRun(l: Last[R]): Last[U] =
      l match {
        case Last(None) => Last[U](None)
        case Last(Some(last)) => Last.eff(runChoose[R, U, Unit, F](last.value).as(()))
      }

    val alternativeF = Alternative[F]

    @tailrec
    def go(stack: List[Eff[R, A]], result: Eff[U, F[A]] = EffMonad[U].pure(alternativeF.empty), resultLast: Option[Last[U]] = None): Eff[U, F[A]] =
      stack match {
        case Nil =>
          resultLast match {
            case Some(last) => result.addLast(last)
            case None       => result
          }

        case e :: rest =>
          e match {
            case Pure(a, last) =>
              go(rest, (EffMonad[U].pure(alternativeF.pure(a)), result).mapN(alternativeF.combineK), resultLast.map(_ <* lastRun(last)))

            case Impure(NoEffect(a), c, last) =>
              runChoose(c(a).addLast(last))

            case Impure(u: Union[_, _], c, last) =>
              m.project(u) match {
                case Left(u1) =>
                  val r1 = Impure(u1, c.interpret(runChoose[R, U, A, F])(_.interpret(l => runChoose[R, U, Unit, F](l).void))).addLast(lastRun(last))
                  go(rest, (r1, result).mapN(alternativeF.combineK))

                case Right(choose) =>
                  choose match {
                    case ChooseZero() => go(rest, result)
                    case _ =>
                      val continuation = c.asInstanceOf[Continuation[R, Boolean, A]]
                      go(continuation(false) :: continuation(true) :: rest, result)
                  }
              }

            case ap @ ImpureAp(_, _, _) =>
              go(ap.toMonadic :: rest, result)
          }
      }

    go(List(r))
  }

}

object ChooseInterpretation extends ChooseInterpretation

trait ChooseImplicits {
  /**
   * MonadCombine implementation for the Eff[R, *] type if R contains the Choose effect
   */
  def EffMonadAlternative[R](implicit m: Member[Choose, R]): Alternative[Eff[R, *]] = new Alternative[Eff[R, *]] with Monad[Eff[R, *]] {
    def pure[A](a: A): Eff[R, A] =
      EffMonad[R].pure(a)

    def flatMap[A, B](fa: Eff[R, A])(f: A => Eff[R, B]): Eff[R, B] =
      EffMonad[R].flatMap(fa)(f)

    def tailRecM[A, B](a: A)(f: A => Eff[R, Either[A, B]]): Eff[R, B] =
      flatMap(f(a)) {
        case Right(b)   => pure(b)
        case Left(next) => tailRecM(next)(f)
      }

    def empty[A]: Eff[R, A] =
      ChooseEffect.zero[R, A]

    def combineK[A](a1: Eff[R, A], a2: Eff[R, A]): Eff[R, A] =
      ChooseEffect.plus(a1, a2)
  }

}

object ChooseImplicits extends ChooseImplicits

/**
 * This class can be used as a F in runChoose
 * to generate random alternatives
 */
case class Rand[A](run: Random => Option[A])

object Rand {
  def none[A]: Rand[A] =
    Rand(_ => None)

  implicit def MonadCombineRandom: Alternative[Rand] = new Alternative[Rand] with Monad[Rand] {
    def pure[A](x: A): Rand[A] = Rand(_ => Option(x))

    def empty[A]: Rand[A] = Rand.none[A]

    def combineK[A](x: Rand[A], y: Rand[A]): Rand[A] =
      Rand { r =>
        if (r.nextBoolean()) {
          x.run(r) match {
            case Some(a) => Some(a)
            case None    => y.run(r)
          }
        } else y.run(r) match {
          case Some(a) => Some(a)
          case None    => x.run(r)
        }
      }

    def flatMap[A, B](fa: Rand[A])(f: (A) => Rand[B]): Rand[B] =
      Rand[B](rand => fa.run(rand).flatMap(f(_).run(rand)))

    def tailRecM[A, B](a: A)(f: (A) => Rand[Either[A, B]]): Rand[B] =
      Rand[B] { random =>
        Monad[Option].tailRecM(a)(f(_).run(random))
      }
  }

}


text:
using MasterDevs.ChromeDevTools;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;

namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM
{
	/// <summary>
	/// Sets attribute for an element with given id.
	/// </summary>
	[Command(ProtocolName.DOM.SetAttributeValue)]
	[SupportedBy("Chrome")]
	public class SetAttributeValueCommand: ICommand<SetAttributeValueCommandResponse>
	{
		/// <summary>
		/// Gets or sets Id of the element to set attribute for.
		/// </summary>
		public long NodeId { get; set; }
		/// <summary>
		/// Gets or sets Attribute name.
		/// </summary>
		public string Name { get; set; }
		/// <summary>
		/// Gets or sets Attribute value.
		/// </summary>
		public string Value { get; set; }
	}
}


text:
require "rake"
require "capistrano/scm"

load File.expand_path("../tasks/docker.rake", __FILE__)

module Capistrano
  class Docker < Capistrano::SCM
    VERSION = "0.0.1"

    def docker(*args)
      args.unshift :docker
      context.execute *args
    end

    module DefaultStrategy
      def test
      end

      def check
      end

      def clone
        update
      end

      def update
        docker :pull, repo_url
      end

      def release
        docker :pull, "#{repo_url}:#{fetch(:version)}"
      end

      def fetch_revision
        context.capture("docker images | grep #{repo_url} | grep #{fetch(:version)} | awk '{ print $3 }'")
      end
    end
  end
end