text:
package com.hotels.styx.api.metrics.codahale;

import com.codahale.metrics.Counter;
import com.codahale.metrics.Gauge;
import com.codahale.metrics.Histogram;
import com.codahale.metrics.Meter;
import com.codahale.metrics.MetricRegistryListener;
import com.codahale.metrics.Timer;
import com.hotels.styx.api.MetricRegistry;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.sameInstance;
import static org.hamcrest.core.Is.is;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;

public class CodaHaleMetricRegistryTest {
    private final Gauge<String> gauge = () -> "someValue";

    private MetricRegistry metricRegistry;
    private MetricRegistryListener listener;

    @BeforeEach
    public void setUp() {
        this.metricRegistry = new CodaHaleMetricRegistry(new com.codahale.metrics.MetricRegistry());
        this.listener = mock(MetricRegistryListener.class);
    }

    @Test
    public void retrievesPreviouslyRegisteredTimer() {
        Timer timer = metricRegistry.timer("newTimer");

        assertThat(timer, is(notNullValue()));
        assertThat(metricRegistry.timer("newTimer"), is(sameInstance(timer)));
    }

    @Test
    public void throwsExceptionIfTryingToCreateTimerWhenOtherMetricExistsWithSameName() {
        metricRegistry.counter("foo");
        assertThrows(IllegalArgumentException.class,
                () -> metricRegistry.timer("foo"));
    }

    @Test
    public void notifiesListenersOnGaugeRegistration() {
        metricRegistry.addListener(listener);
        metricRegistry.register("thing", gauge);
        verify(listener).onGaugeAdded("thing", gauge);
    }

    @Test
    public void notifiesListenersOnScopedGaugeRegistration() {
        MetricRegistry scopedRegistry = metricRegistry.scope("one").scope("two");
        scopedRegistry.addListener(listener);
        scopedRegistry.register("thing", gauge);
        verify(listener).onGaugeAdded("one.two.thing", gauge);
    }

    @Test
    public void notifiesListenersOnGaugeRemoval() {
        MetricRegistry scopedRegistry = metricRegistry.scope("one").scope("two");
        scopedRegistry.addListener(listener);

        scopedRegistry.register("thing", gauge);
        scopedRegistry.deregister("thing");

        verify(listener).onGaugeRemoved("one.two.thing");
    }

    @Test
    public void willNotNotifyListenerOnceRemoved() {
        metricRegistry.addListener(listener);
        metricRegistry.register("thing", gauge);
        verify(listener).onGaugeAdded("thing", gauge);

        metricRegistry.removeListener(listener);

        metricRegistry.register("thing1", gauge);
        verify(listener, never()).onGaugeAdded("thing1", gauge);
    }

    @Test
    public void notifiesListenersOnCounterRegistration() {
        Counter counter = new Counter();
        metricRegistry.addListener(listener);
        metricRegistry.register("counter", counter);

        verify(listener).onCounterAdded("counter", counter);
    }

    @Test
    public void notifiesListenersOnScopedCounterRegistration() {
        Counter counter = new Counter();
        MetricRegistry scopedRegistry = metricRegistry.scope("one").scope("two");
        scopedRegistry.addListener(listener);
        scopedRegistry.register("counter", counter);
        verify(listener).onCounterAdded("one.two.counter", counter);
    }

    @Test
    public void notifiesListenersOnCounterRemoval() {
        MetricRegistry scopedRegistry = metricRegistry.scope("one").scope("two");
        scopedRegistry.addListener(listener);

        scopedRegistry.register("thing", new Counter());
        scopedRegistry.deregister("thing");

        verify(listener).onCounterRemoved("one.two.thing");
    }

    @Test
    public void notifiesListenersOnHistogramRegistration() {
        metricRegistry.addListener(listener);
        Histogram histogram = metricRegistry.histogram("histogram");
        verify(listener).onHistogramAdded("histogram", histogram);
    }

    @Test
    public void notifiesListenersOnScopedHistogramRegistration() {
        MetricRegistry scopedRegistry = metricRegistry.scope("one").scope("two");
        scopedRegistry.addListener(listener);
        Histogram histogram = scopedRegistry.histogram("histogram");
        verify(listener).onHistogramAdded("one.two.histogram", histogram);
    }

    @Test
    public void notifiesListenersOnHistogramDeegistration() {
        MetricRegistry scopedRegistry = metricRegistry.scope("one").scope("two");
        scopedRegistry.addListener(listener);

        scopedRegistry.histogram("thing");
        scopedRegistry.deregister("thing");

        verify(listener).onHistogramRemoved("one.two.thing");
    }

    @Test
    public void notifiesListenersOnMeterRegistration() {
        metricRegistry.addListener(listener);
        Meter meter = metricRegistry.meter("meter");
        verify(listener).onMeterAdded("meter", meter);
    }

    @Test
    public void notifiesListenersOnScopedMeterRegistration() {
        MetricRegistry scopedRegistry = metricRegistry.scope("one").scope("two");
        scopedRegistry.addListener(listener);
        Meter meter = scopedRegistry.meter("meter");
        verify(listener).onMeterAdded("one.two.meter", meter);
    }

    @Test
    public void notifiesListenersOnMeterDeregistration() {
        MetricRegistry scopedRegistry = metricRegistry.scope("one").scope("two");
        scopedRegistry.addListener(listener);

        scopedRegistry.meter("thing");
        scopedRegistry.deregister("thing");

        verify(listener).onMeterRemoved("one.two.thing");
    }

    @Test
    public void notifiesListenersOnTimerRegistration() {
        metricRegistry.addListener(listener);
        Timer timer = metricRegistry.timer("timer");
        verify(listener).onTimerAdded("timer", timer);
    }

    @Test
    public void notifiesListenersOnScopedTimerRegistration() {
        MetricRegistry scopedRegistry = metricRegistry.scope("one").scope("two");
        scopedRegistry.addListener(listener);
        Timer timer = scopedRegistry.timer("timer");
        verify(listener).onTimerAdded("one.two.timer", timer);
    }

    @Test
    public void notifiesListenersOnTimerDeregistration() {
        MetricRegistry scopedRegistry = metricRegistry.scope("one").scope("two");
        scopedRegistry.addListener(listener);

        scopedRegistry.timer("thing");
        scopedRegistry.deregister("thing");

        verify(listener).onTimerRemoved("one.two.thing");
    }

    @Test
    public void notifiesNewlyAddedListenerWithPreviouslyRegisteredMetrics() {
        Gauge<String> newGauge = metricRegistry.register("gauge", gauge);
        Counter newCounter = metricRegistry.register("counter", new Counter());

        metricRegistry.addListener(listener);

        verify(listener).onGaugeAdded("gauge", newGauge);
        verify(listener).onCounterAdded("counter", newCounter);
    }

    @Test
    public void createsTimerBackedByLatencyStats() {
        Timer timer = metricRegistry.timer("timer");
        assertThat(timer.getSnapshot(), is(instanceOf(SlidingWindowHistogramReservoir.HistogramSnapshot.class)));
    }
}


text:
position:absolute;
background-color: #333;
color: #fff;
border-radius: 0.2em;
display:block;
}
#tooltip p{padding:0.2em;margin:0;font-size:1em}

redpajama_set_name: RedPajamaGithub


text:
#include "Threading.h"

namespace pGina
{
	namespace Threading
	{
		Thread::Thread() :
			m_threadHandle(0),
			m_running(false)
		{
		}

		Thread::~Thread()
		{
			if(Running())
				Stop();

			if(m_threadHandle != 0)
				CloseHandle(m_threadHandle);
		}

		void Thread::Start()
		{
			if(Running())
				return;

			Running(true);
			m_threadHandle = CreateThread(NULL, 0, _internal_threadmain, this, 0, 0);
		}

		void Thread::Stop()
		{
			if(!Running())
				return;

			Running(false);
			WaitForSingleObject(m_threadHandle, INFINITE);
			CloseHandle(m_threadHandle);
			m_threadHandle = 0;
		}

		bool Thread::Running()
		{
			ScopedLock lock(m_mutex);
			return m_running;
		}

		void Thread::Running(bool v)
		{
			ScopedLock lock(m_mutex);
			m_running = v;
		}

		/* static */
		DWORD WINAPI Thread::_internal_threadmain(LPVOID arg)
		{
			Thread *thread = static_cast<Thread *>(arg);
			return thread->ThreadMain();
		}

		Mutex::Mutex()
		{
			m_mutexHandle = CreateMutex(NULL, FALSE, NULL);
		}

		bool Mutex::Lock()
		{
			DWORD res = WaitForSingleObject(m_mutexHandle, INFINITE);
			if(res == WAIT_OBJECT_0 || res == WAIT_ABANDONED)
				return true;

			return false;
		}

		bool Mutex::Unlock()
		{
			if(ReleaseMutex(m_mutexHandle))
				return true;

			return false;
		}
	}
}


text:
package remoteeventcollector

import (
	"github.com/trusch/susi/apiserver"
	"github.com/trusch/susi/config"
	"github.com/trusch/susi/events"
	"github.com/trusch/susi/session"
	"github.com/trusch/susi/state"
	"log"
	"testing"
	"time"
)

func TestRemoteEventCollector(t *testing.T) {
	events.Go()
	state.Go()
	config.Go()
	session.Go()

	state.Set("apiserver.port", "12345")
	state.Set("apiserver.tls.port", "")
	state.Set("apiserver.tls.cert", "")
	state.Set("apiserver.tls.key", "")

	apiserver.Go()

	New([]string{"foo"})

	testChan, _ := events.Subscribe("*", 0)
	go func() {
		for event := range testChan {
			log.Print(event)
		}
	}()

	event := events.NewEvent("hosts::new", "localhost:12345")
	event.AuthLevel = 0
	events.Publish(event)

	ch, _ := events.Subscribe("test", 0)

	time.Sleep(100 * time.Millisecond)
	event = events.NewEvent("test@foo", nil)
	events.Publish(event)

	event = <-ch
	if event.Topic != "test" {
		t.Error("wrong event")
	}

}


text:
<!DOCTYPE html>

    <meta http-equiv="refresh" content="0;URL=constant.PR_CAPBSET_READ.html">

Redirecting to constant.PR_CAPBSET_READ.html...


text:
'use strict';

import 'vs/css!./hover';
import * as nls from 'vs/nls';
import {ListenerUnbind} from 'vs/base/common/eventEmitter';
import {KeyCode, KeyMod} from 'vs/base/common/keyCodes';
import * as platform from 'vs/base/common/platform';
import {TPromise} from 'vs/base/common/winjs.base';
import {IKeyboardEvent} from 'vs/base/browser/keyboardEvent';
import {IOpenerService} from 'vs/platform/opener/common/opener';
import {KbExpr} from 'vs/platform/keybinding/common/keybindingService';
import {Range} from 'vs/editor/common/core/range';
import {EditorAction} from 'vs/editor/common/editorAction';
import {Behaviour} from 'vs/editor/common/editorActionEnablement';
import * as editorCommon from 'vs/editor/common/editorCommon';
import {CommonEditorRegistry, ContextKey, EditorActionDescriptor} from 'vs/editor/common/editorCommonExtensions';
import {ICodeEditor, IEditorMouseEvent} from 'vs/editor/browser/editorBrowser';
import {EditorBrowserRegistry} from 'vs/editor/browser/editorBrowserExtensions';
import {ModesContentHoverWidget} from './modesContentHover';
import {ModesGlyphHoverWidget} from './modesGlyphHover';

class ModesHoverController implements editorCommon.IEditorContribution {

	static ID = 'editor.contrib.hover';

	private _editor: ICodeEditor;
	private _toUnhook:ListenerUnbind[];

	private _contentWidget: ModesContentHoverWidget;
	private _glyphWidget: ModesGlyphHoverWidget;

	static getModesHoverController(editor: editorCommon.ICommonCodeEditor): ModesHoverController {
		return <ModesHoverController>editor.getContribution(ModesHoverController.ID);
	}

	constructor(editor: ICodeEditor,
		@IOpenerService openerService: IOpenerService
	) {
		this._editor = editor;

		this._toUnhook = [];

		if (editor.getConfiguration().hover) {
			this._toUnhook.push(this._editor.addListener(editorCommon.EventType.MouseDown, (e: IEditorMouseEvent) => this._onEditorMouseDown(e)));
			this._toUnhook.push(this._editor.addListener(editorCommon.EventType.MouseMove, (e: IEditorMouseEvent) => this._onEditorMouseMove(e)));
			this._toUnhook.push(this._editor.addListener(editorCommon.EventType.MouseLeave, (e: IEditorMouseEvent) => this._hideWidgets()));
			this._toUnhook.push(this._editor.addListener(editorCommon.EventType.KeyDown, (e:IKeyboardEvent) => this._onKeyDown(e)));
			this._toUnhook.push(this._editor.addListener(editorCommon.EventType.ModelChanged, () => this._hideWidgets()));
			this._toUnhook.push(this._editor.addListener(editorCommon.EventType.ModelDecorationsChanged, () => this._onModelDecorationsChanged()));
			this._toUnhook.push(this._editor.addListener('scroll', () => this._hideWidgets()));

			this._contentWidget = new ModesContentHoverWidget(editor, openerService);
			this._glyphWidget = new ModesGlyphHoverWidget(editor);
		}
	}

	private _onModelDecorationsChanged(): void {
		this._contentWidget.onModelDecorationsChanged();
		this._glyphWidget.onModelDecorationsChanged();
	}

	private _onEditorMouseDown(mouseEvent: IEditorMouseEvent): void {
		var targetType = mouseEvent.target.type;

		if (targetType === editorCommon.MouseTargetType.CONTENT_WIDGET && mouseEvent.target.detail ===  ModesContentHoverWidget.ID) {
			// mouse down on top of content hover widget
			return;
		}

		if (targetType === editorCommon.MouseTargetType.OVERLAY_WIDGET && mouseEvent.target.detail === ModesGlyphHoverWidget.ID) {
			// mouse down on top of overlay hover widget
			return;
		}

		this._hideWidgets();
	}

	private _onEditorMouseMove(mouseEvent: IEditorMouseEvent): void {
		var targetType = mouseEvent.target.type;
		var stopKey = platform.isMacintosh ? 'metaKey' : 'ctrlKey';

		if (targetType === editorCommon.MouseTargetType.CONTENT_WIDGET && mouseEvent.target.detail ===  ModesContentHoverWidget.ID && !mouseEvent.event[stopKey]) {
			// mouse moved on top of content hover widget
			return;
		}

		if (targetType === editorCommon.MouseTargetType.OVERLAY_WIDGET && mouseEvent.target.detail === ModesGlyphHoverWidget.ID && !mouseEvent.event[stopKey]) {
			// mouse moved on top of overlay hover widget
			return;
		}

		if (this._editor.getConfiguration().hover && targetType === editorCommon.MouseTargetType.CONTENT_TEXT) {
			this._glyphWidget.hide();
			this._contentWidget.startShowingAt(mouseEvent.target.range, false);
		} else if (targetType === editorCommon.MouseTargetType.GUTTER_GLYPH_MARGIN) {
			this._contentWidget.hide();
			this._glyphWidget.startShowingAt(mouseEvent.target.position.lineNumber);
		} else {
			this._hideWidgets();
		}
	}

	private _onKeyDown(e: IKeyboardEvent): void {
		var stopKey = platform.isMacintosh ? KeyCode.Meta : KeyCode.Ctrl;
		if (e.keyCode !== stopKey) {
			// Do not hide hover when Ctrl/Meta is pressed
			this._hideWidgets();
		}
	}

	private _hideWidgets(): void {
		this._glyphWidget.hide();
		this._contentWidget.hide();
	}

	public showContentHover(range: editorCommon.IEditorRange, focus: boolean): void {
		this._contentWidget.startShowingAt(range, focus);
	}

	public getId(): string {
		return ModesHoverController.ID;
	}

	public dispose(): void {
		while(this._toUnhook.length > 0) {
			this._toUnhook.pop()();
		}
		if (this._glyphWidget) {
			this._glyphWidget.dispose();
			this._glyphWidget = null;
		}
		if (this._contentWidget) {
			this._contentWidget.dispose();
			this._contentWidget = null;
		}
	}
}

class ShowHoverAction extends EditorAction {
	static ID = 'editor.action.showHover';

	constructor(descriptor: editorCommon.IEditorActionDescriptorData, editor: editorCommon.ICommonCodeEditor) {
		super(descriptor, editor, Behaviour.TextFocus);
	}

	public run(): TPromise<any> {
		const position = this.editor.getPosition();
		const range = new Range(position.lineNumber, position.column, position.lineNumber, position.column);
		(<ModesHoverController>this.editor.getContribution(ModesHoverController.ID)).showContentHover(range, true);

		return TPromise.as(null);
	}
}

EditorBrowserRegistry.registerEditorContribution(ModesHoverController);
CommonEditorRegistry.registerEditorAction(new EditorActionDescriptor(ShowHoverAction, ShowHoverAction.ID, nls.localize('showHover', "Show Hover"), {
	context: ContextKey.EditorTextFocus,
	kbExpr: KbExpr.has(editorCommon.KEYBINDING_CONTEXT_EDITOR_TEXT_FOCUS),
	primary: KeyMod.chord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_I)
}, 'Show Hover'));


text:
<TITLE>Welcome to Capital One highlighter test</TITLE>

Welcome to Capital One

Visit Our Bloghello


text:
module Main where

import           GHCJS.DOM
import           GHCJS.DOM.Document
import           GHCJS.DOM.Element
import           GHCJS.DOM.HTMLInputElement (getValue)
import           GHCJS.DOM.Types            hiding (Event)

import           Control.Concurrent
import           Control.Monad              hiding (sequence_)

main :: IO ()
main = do
  Just doc <- currentDocument
  Just body <- getBody doc
  setInnerHTML body $ Just initialHtml
  Just inElem <- fmap castToHTMLInputElement <$> getElementById doc "in"
  Just out <- getElementById doc "out"
  forever $ do
    Just val <- getValue inElem :: IO (Maybe String)
    setInnerHTML out $ Just val
    threadDelay 500000

initialHtml :: String
initialHtml = "<input id=\"in\"></input>

"


text:
package stone

import (
	"fmt"
	"net/http"

	"github.com/PMoneda/flow"
	"github.com/mundipagg/boleto-api/config"
	"github.com/mundipagg/boleto-api/log"
	"github.com/mundipagg/boleto-api/metrics"
	"github.com/mundipagg/boleto-api/models"
	"github.com/mundipagg/boleto-api/tmpl"
	"github.com/mundipagg/boleto-api/util"
	"github.com/mundipagg/boleto-api/validations"
)

type bankStone struct {
	validate *models.Validator
	log      *log.Log
}

//New Create a new Stone Integration Instance
func New() bankStone {
	b := bankStone{
		validate: models.NewValidator(),
		log:      log.CreateLog(),
	}

	b.validate.Push(validations.ValidateAmount)
	b.validate.Push(validations.ValidateExpireDate)
	b.validate.Push(validations.ValidateBuyerDocumentNumber)
	b.validate.Push(validations.ValidateRecipientDocumentNumber)

	b.validate.Push(stoneValidateAccessKeyNotEmpty)
	b.validate.Push(validations.ValidateInterest)
	b.validate.Push(validations.ValidateFine)

	return b
}

func (b bankStone) ProcessBoleto(boleto *models.BoletoRequest) (models.BoletoResponse, error) {
	errs := b.ValidateBoleto(boleto)
	if len(errs) > 0 {
		return models.BoletoResponse{Errors: errs}, nil
	}

	if accToken, err := authenticate(boleto.Authentication.AccessKey, b.log); err != nil {
		return models.GetBoletoResponseError("MP500", err.Error()), nil
	} else {
		boleto.Authentication.AuthorizationToken = accToken
	}
	return b.RegisterBoleto(boleto)
}

func (b bankStone) RegisterBoleto(boleto *models.BoletoRequest) (models.BoletoResponse, error) {
	var response string
	var header string
	var status int
	var err error

	stoneURL := config.Get().URLStoneRegister
	boleto.Title.BoletoType, boleto.Title.BoletoTypeCode = getBoletoType(boleto)

	body := flow.NewFlow().From("message://?source=inline", boleto, templateRequest, tmpl.GetFuncMaps()).GetBody().(string)
	head := hearders(boleto.Authentication.AuthorizationToken)
	b.log.Request(body, stoneURL, head)

	duration := util.Duration(func() {
		response, header, status, err = util.PostReponseWithHeader(stoneURL, util.SanitizeBody(body), config.Get().TimeoutRegister, head)
	})
	metrics.PushTimingMetric("stone-register-boleto-time", duration.Seconds())

	params := getLogResponseProperties(header)

	b.log.Response(response, stoneURL, params)

	return mapStoneResponse(boleto, response, status, err), nil
}

func getLogResponseProperties(header string) map[string]interface{} {
	m := make(map[string]interface{})
	m["Header"] = header

	return m
}

func mapStoneResponse(request *models.BoletoRequest, response string, status int, httpErr error) models.BoletoResponse {
	f := flow.NewFlow().To("set://?prop=body", response)
	switch status {
	case 0, 504:
		var msg string
		if httpErr != nil {
			msg = fmt.Sprintf("%v", httpErr)
		} else {
			msg = "GatewayTimeout"
		}
		return models.GetBoletoResponseError("MPTimeout", msg)
	case 201:
		f.To("transform://?format=json", templateResponse, templateAPI, tmpl.GetFuncMaps())
		f.To("unmarshall://?format=json", new(models.BoletoResponse))
	default:
		f.To("transform://?format=json", templateError, templateAPI, tmpl.GetFuncMaps())
		f.To("unmarshall://?format=json", new(models.BoletoResponse))
	}

	switch t := f.GetBody().(type) {
	case *models.BoletoResponse:
		if hasOurNumberFail(t) {
			return models.GetBoletoResponseError("MPOurNumberFail", "our number was not returned by the bank")
		} else {
			return *t
		}
	case error:
		return models.GetBoletoResponseError("MP500", t.Error())
	case string:
		return models.GetBoletoResponseError("MP500", t)
	}

	return models.GetBoletoResponseError("MP500", "Internal Error")
}

func (b bankStone) ValidateBoleto(request *models.BoletoRequest) models.Errors {
	return models.Errors(b.validate.Assert(request))
}

func (b bankStone) GetBankNumber() models.BankNumber {
	return models.Stone
}

func (b bankStone) GetBankNameIntegration() string {
	return "Stone"
}

func (b bankStone) GetErrorsMap() map[string]int {
	var erros = map[string]int{
		"srn:error:validation":          http.StatusBadRequest,
		"srn:error:unauthenticated":     http.StatusInternalServerError,
		"srn:error:unauthorized":        http.StatusBadGateway,
		"srn:error:not_found":           http.StatusBadGateway,
		"srn:error:conflict":            http.StatusBadGateway,
		"srn:error:product_not_enabled": http.StatusBadRequest,
	}
	return erros
}

func (b bankStone) Log() *log.Log {
	return b.log
}

func getBoletoType(boleto *models.BoletoRequest) (bt string, btc string) {
	return "DM", "bill_of_exchange"
}

func hearders(token string) map[string]string {
	return map[string]string{"Authorization": "Bearer " + token, "Content-Type": "application/json"}
}

func hasOurNumberFail(response *models.BoletoResponse) bool {
	return !response.HasErrors() && response.OurNumber == ""
}


text:
angular.module('travelApp.directives.canvasjs', [])
    .directive('angularCanvasjs', function() {
        return {
            restrict: 'A',
            scope: {
                kpis: '=kpis',
                slot: '=',
                name: '@'
            },
            controller: function($scope, $element) {

                jQuery(document).ready(function() {
                    var slot = parseInt($scope.slot);
                    var chartData = $scope.kpis[slot];
                    var name = $scope.name;

                    var chart = new CanvasJS.Chart(name, chartData);

                    chart.render();

                });

            }
        };
    });


text:
package com.asksven.android.system;

import android.os.Build;
/**
 * Handles android version detection
 * @author sven
 *
 */
public class AndroidVersion
{
	public static boolean isFroyo()
	{
		boolean bRet = false;
		if (Build.VERSION.SDK_INT == Build.VERSION_CODES.FROYO)
		{
			bRet = true;
		}

		return bRet;
	}

	public static boolean isGingerbread()
	{
		boolean bRet = false;
		if (Build.VERSION.SDK_INT == Build.VERSION_CODES.GINGERBREAD)
		{
			bRet = true;
		}

		return bRet;
	}

	public static boolean isIcs()
	{
		boolean bRet = false;
		if (Build.VERSION.SDK_INT == Build.VERSION_CODES.ICE_CREAM_SANDWICH)
		{
			bRet = true;
		}

		return bRet;
	}

	public static boolean isKitKat()
	{
		boolean bRet = false;
		if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT)
		{
			bRet = true;
		}

		return bRet;
	}

	public static boolean isLolipop()
	{
		boolean bRet = false;
		if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP)
		{
			bRet = true;
		}

		return bRet;
	}
}


text:
using System.Xml.Serialization;

namespace GeckoUBL.Ubl21.Udt
{
	[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.33440")]
	[System.SerializableAttribute]
	[System.Diagnostics.DebuggerStepThroughAttribute]
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	[XmlType(TypeName = "NumericType", Namespace = "urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2")]
	public class NumericType
	{
		[XmlAttribute]
		public string format { get; set; }

		[XmlText]
		public decimal Value { get; set; }
	}
}


text:
define(['ng-module!./module1', 'ng-module!./module2'], function() {
	return [];
});


text:
import PollController from '../controllers/poll.server.controller';

module.exports = function(app){
	app.route('/poll/list').post(PollController.pollList);
	app.route('/poll/poll').post(PollController.poll);
	app.route('/poll/pollResult').post(PollController.pollResult);
	app.route('/poll/pollResultVoters').post(PollController.pollResultVoters);
};