text:
/*! UIkit 3.0.0-rc.25 | http://www.getuikit.com | (c) 2014 - 2018 YOOtheme | MIT License */

(function (global, factory) {
    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
    typeof define === 'function' && define.amd ? define('uikitnotification', ['uikit-util'], factory) :
    (global.UIkitNotification = factory(global.UIkit.util));
}(this, (function (uikitUtil) { 'use strict';

    var obj;

    var containers = {};

    var Component = {

        functional: true,

        args: ['message', 'status'],

        data: {
            message: '',
            status: '',
            timeout: 5000,
            group: null,
            pos: 'top-center',
            clsClose: 'uk-notification-close',
            clsMsg: 'uk-notification-message'
        },

        install: install,

        created: function() {

            if (!containers[this.pos]) {
                containers[this.pos] = uikitUtil.append(this.$container, ("

"));
            }

            var container = uikitUtil.css(containers[this.pos], 'display', 'block');

            this.$mount(uikitUtil.append(container,
                ("

" + (this.message) + "

")
            ));

        },

        connected: function() {
            var this$1 = this;

            var marginBottom = uikitUtil.toFloat(uikitUtil.css(this.$el, 'marginBottom'));
            uikitUtil.Transition.start(
                uikitUtil.css(this.$el, {opacity: 0, marginTop: -this.$el.offsetHeight, marginBottom: 0}),
                {opacity: 1, marginTop: 0, marginBottom: marginBottom}
            ).then(function () {
                if (this$1.timeout) {
                    this$1.timer = setTimeout(this$1.close, this$1.timeout);
                }
            });

        },

        events: ( obj = {

            click: function(e) {
                if (uikitUtil.closest(e.target, 'a[href="#"]')) {
                    e.preventDefault();
                }
                this.close();
            }

        }, obj[uikitUtil.pointerEnter] = function () {
                if (this.timer) {
                    clearTimeout(this.timer);
                }
            }, obj[uikitUtil.pointerLeave] = function () {
                if (this.timeout) {
                    this.timer = setTimeout(this.close, this.timeout);
                }
            }, obj ),

        methods: {

            close: function(immediate) {
                var this$1 = this;

                var removeFn = function () {

                    uikitUtil.trigger(this$1.$el, 'close', [this$1]);
                    uikitUtil.remove(this$1.$el);

                    if (!containers[this$1.pos].children.length) {
                        uikitUtil.css(containers[this$1.pos], 'display', 'none');
                    }

                };

                if (this.timer) {
                    clearTimeout(this.timer);
                }

                if (immediate) {
                    removeFn();
                } else {
                    uikitUtil.Transition.start(this.$el, {
                        opacity: 0,
                        marginTop: -this.$el.offsetHeight,
                        marginBottom: 0
                    }).then(removeFn);
                }
            }

        }

    };

    function install(UIkit) {
        UIkit.notification.closeAll = function (group, immediate) {
            uikitUtil.apply(document.body, function (el) {
                var notification = UIkit.getComponent(el, 'notification');
                if (notification && (!group || group === notification.group)) {
                    notification.close(immediate);
                }
            });
        };
    }

    /* global UIkit, 'notification' */

    if (typeof window !== 'undefined' && window.UIkit) {
        window.UIkit.component('notification', Component);
    }

    return Component;

})));


text:
using System;
using System.Text.Json;
using Azure.Core;

namespace Azure.ResourceManager.Media.Models
{
    public partial class LiveEventEncoding : IUtf8JsonSerializable
    {
        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
        {
            writer.WriteStartObject();
            if (Optional.IsDefined(EncodingType))
            {
                writer.WritePropertyName("encodingType");
                writer.WriteStringValue(EncodingType.Value.ToString());
            }
            if (Optional.IsDefined(PresetName))
            {
                writer.WritePropertyName("presetName");
                writer.WriteStringValue(PresetName);
            }
            if (Optional.IsDefined(StretchMode))
            {
                if (StretchMode != null)
                {
                    writer.WritePropertyName("stretchMode");
                    writer.WriteStringValue(StretchMode.Value.ToString());
                }
                else
                {
                    writer.WriteNull("stretchMode");
                }
            }
            if (Optional.IsDefined(KeyFrameInterval))
            {
                if (KeyFrameInterval != null)
                {
                    writer.WritePropertyName("keyFrameInterval");
                    writer.WriteStringValue(KeyFrameInterval.Value, "P");
                }
                else
                {
                    writer.WriteNull("keyFrameInterval");
                }
            }
            writer.WriteEndObject();
        }

        internal static LiveEventEncoding DeserializeLiveEventEncoding(JsonElement element)
        {
            Optional<LiveEventEncodingType> encodingType = default;
            Optional<string> presetName = default;
            Optional<InputVideoStretchMode?> stretchMode = default;
            Optional<TimeSpan?> keyFrameInterval = default;
            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("encodingType"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    encodingType = new LiveEventEncodingType(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("presetName"))
                {
                    presetName = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("stretchMode"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        stretchMode = null;
                        continue;
                    }
                    stretchMode = new InputVideoStretchMode(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("keyFrameInterval"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        keyFrameInterval = null;
                        continue;
                    }
                    keyFrameInterval = property.Value.GetTimeSpan("P");
                    continue;
                }
            }
            return new LiveEventEncoding(Optional.ToNullable(encodingType), presetName.Value, Optional.ToNullable(stretchMode), Optional.ToNullable(keyFrameInterval));
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
package com.appsfire.adunitsampleapp;

import com.appsfire.adUnitJAR.adUnit.Ad;
import com.appsfire.adUnitJAR.adUnit.Ad.AFFlatAdType;
import com.appsfire.adUnitJAR.sdk.AFAdSDK.AFAdSizeProvider;
import com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView;
import com.appsfire.adUnitJAR.utils.AFUtils;

import android.content.Context;
import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.RadialGradient;
import android.graphics.Paint.Style;
import android.graphics.RectF;
import android.graphics.Typeface;
import android.graphics.drawable.BitmapDrawable;
import android.text.Layout;
import android.text.StaticLayout;
import android.text.TextPaint;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.Display;
import android.view.MotionEvent;
import android.view.WindowManager;

public class MySashimiView extends AFAdSDKSashimiView {
	/** Tag for logging */
	private final static String CLASS_TAG = "MySashimiView";
	private final float m_fIconHeightFraction = 0.72f;
	private final float m_fTextHeightFraction = 0.75f;

	/**
	 * Constructor
	 *
	 * @param context application context
	 * @param ad ad being presented
	 * @param sizeProvider callback for the app to provide the size of the sashimi view
	 */
	public MySashimiView (Context context, Ad ad, AFAdSizeProvider sizeProvider) {
        super(context, ad, sizeProvider);

        m_context = context;
        m_styleMode = AFAdSDKSashimiStyleMode.AFAdSDKSashimiMinimalStyleModeLight;

        // Make the view focusable so as to get key events
        setFocusable (true);
        setFocusableInTouchMode (true);
        requestFocus ();

        // Create resources for drawing

        m_backgroundPaint = new Paint ();
        m_backgroundPaint.setColor (0xff8888ff);

        m_appPriceBackgroundPaint = new Paint ();
        m_appPriceBackgroundPaint.setColor (0xffccccff);
        m_appPriceBackgroundPaint.setAntiAlias (true);

        m_actionButtonNormalPaint = new Paint ();
        m_actionButtonNormalPaint.setStyle(Style.STROKE);
        m_actionButtonNormalPaint.setColor (Color.WHITE);
        m_actionButtonNormalPaint.setAntiAlias (true);

        m_actionButtonPushedPaint = new Paint ();
        m_actionButtonPushedPaint.setStyle(Style.STROKE);
        m_actionButtonPushedPaint.setColor (0xff999999);
        m_actionButtonPushedPaint.setAntiAlias (true);

        m_appNameTextPaint = new TextPaint ();
        m_appNameTextPaint.setColor (Color.WHITE);
        m_appNameTextPaint.setAntiAlias (true);

        m_appCategoryTextPaint = new TextPaint ();
        m_appCategoryTextPaint.setColor (0xffccccff);
        m_appCategoryTextPaint.setAntiAlias (true);

        m_appDetailsTextPaint = new TextPaint ();
        m_appDetailsTextPaint.setColor (Color.WHITE);
        m_appDetailsTextPaint.setAntiAlias (true);

        m_appPriceTextPaint = new TextPaint ();
        m_appPriceTextPaint.setColor (Color.BLACK);
        m_appPriceTextPaint.setTextAlign (Paint.Align.CENTER);
        m_appPriceTextPaint.setAntiAlias (true);

        m_actionButtonTextPaint = new TextPaint ();
        m_actionButtonTextPaint.setColor (Color.WHITE);
        m_actionButtonTextPaint.setAntiAlias (true);

        // Load image assets

        m_adBadgeImage = AFUtils.loadStaticBitmap (context, "adbadgedark.png");

    	m_normalTypeface = AFUtils.loadStaticTypeface (context, "affont.ttf");
    	m_boldTypeface = AFUtils.loadStaticTypeface (context, "affontbold.ttf");
    	m_blackTypeface = AFUtils.loadStaticTypeface (context, "affontblack.ttf");

    	if (m_normalTypeface != null) {
    		m_appCategoryTextPaint.setTypeface(m_normalTypeface);
    		m_appDetailsTextPaint.setTypeface(m_normalTypeface);
    	}

    	if (m_boldTypeface != null) {
    		m_appNameTextPaint.setTypeface(m_boldTypeface);
    		m_actionButtonTextPaint.setTypeface(m_boldTypeface);
    	}

    	if (m_blackTypeface != null) {
    		m_appPriceTextPaint.setTypeface(m_blackTypeface);
    	}
 	}

	/**
	 * Provide assets to the sashimi
	 *
	 * @param adIconBitmap bitmap to use for the ad's icon
	 * @param adScreenshotBitmap bitmap to use for the ad's screenshot
	 */
	public void onAssetsReceived (Bitmap adIconBitmap, Bitmap adScreenshotBitmap) {
    	// Apply round mask to app icon, and store the result as the icon image

    	BitmapDrawable iconImage;

    	if (adIconBitmap != null)
    		iconImage = new BitmapDrawable (m_context.getResources(), adIconBitmap);
    	else
    		iconImage = AFUtils.loadStaticBitmap (m_context, "default_icon.png");
    	m_roundMaskImage = AFUtils.loadStaticBitmap (m_context, "round_mask.png");
    	m_iconImage = new BitmapDrawable (m_context.getResources(), multiplyBitmaps (iconImage.getBitmap(), m_roundMaskImage.getBitmap()));

    	// Get screenshot

    	if (adScreenshotBitmap != null)
	    	m_screenshotImage = new BitmapDrawable (m_context.getResources(), AFUtils.fixBitmapEdges(adScreenshotBitmap));
    	else
    		m_screenshotImage = AFUtils.loadStaticBitmap (m_context, "default_screenshot.jpeg");
    	m_screenshotImage.setFilterBitmap(true);
    	m_screenshotImage.setAntiAlias(true);

		super.onAssetsReceived (adIconBitmap, adScreenshotBitmap);
	}

	/**
	 * Remove view, free resources
	 */
	public void finish() {
		// Stop drawing
		m_bFinished = true;
		if (m_iconImage != null) {
			Log.d (CLASS_TAG, "recycle sashimi bitmaps");
			m_iconImage.getBitmap().recycle();
			m_iconImage = null;
		}
	}

	/**
	 * Get style mode
	 *
	 * @return style mode
	 */
	public AFAdSDKSashimiStyleMode getStyleMode() {
		return m_styleMode;
	}

	/**
	 * Get background color for the content
	 *
	 * @return background color
	 */
	@Override
	public int getContentBackgroundColor () {
		return m_backgroundPaint.getColor ();
	}

	/**
	 * Set background color for the content (defaults to the style's background color)
	 *
	 * @param nColor new background color, such as Color.BLUE
	 */
	@Override
	public void setContentBackgroundColor (int nColor) {
		m_backgroundPaint.setColor (nColor);

		// Update background gradient as well
		RadialGradient gradient = new RadialGradient(m_nTotalViewWidth/2, m_nTotalViewHeight/2, Math.max (m_nTotalViewWidth,m_nTotalViewHeight)/2,
													 m_backgroundPaint.getColor(), (m_backgroundPaint.getColor() & 0x00ffffff) / 2 | 0xff000000,
													 android.graphics.Shader.TileMode.CLAMP);
        m_backgroundPaint.setShader (gradient);
	}

	/**
	 * Get the color of the application title
	 *
	 * @return label color
	 */
	@Override
	public int getTitleTextColor () {
		return m_appNameTextPaint.getColor();
	}

	/**
	 * Set the color of the application title (defaults to the style's title color)
	 *
	 * @param nColor new text color, such as Color.WHITE
	 */
	@Override
	public void setTitleTextColor (int nColor) {
		m_appNameTextPaint.setColor (nColor);
	}

	/**
	 * Get the color of the application category
	 *
	 * @return label color
	 */
	@Override
	public int getCategoryTextColor () {
		return m_appCategoryTextPaint.getColor();
	}

	/**
	 * Set the color of the application category (defaults to the style's category color)
	 *
	 * @param nColor new text color, such as Color.WHITE
	 */
	@Override
	public void setCategoryTextColor (int nColor) {
		m_appCategoryTextPaint.setColor (nColor);
	}

	/**
	 * Get the color of the application tagline
	 *
	 * @return label color
	 */
	@Override
	public int getTaglineTextColor () {
		return m_appDetailsTextPaint.getColor ();
	}

	/**
	 * Set the color of the application tagline (defaults to the style's tagline color)
	 *
	 * @param nColor new text color, such as Color.WHITE
	 */
	@Override
	public void setTaglineTextColor (int nColor) {
		m_appDetailsTextPaint.setColor (nColor);
	}

	/**
	 * Get the color of the application's price
	 *
	 * @return label color
	 */
	@Override
	public int getPriceTextColor () {
		return m_appPriceTextPaint.getColor ();
	}

	/**
	 * Set the color of the application's price (defaults to the style's price color)
	 *
	 * @param nColor new text color, such as Color.WHITE
	 */
	@Override
	public void setPriceTextColor (int nColor) {
		m_appPriceTextPaint.setColor (nColor);
	}

	/**
	 * Get background color for the price tag
	 *
	 * @return background color
	 */
	@Override
	public int getPriceBackgroundColor () {
		return m_appPriceBackgroundPaint.getColor ();
	}

	/**
	 * Set background color for the price tag (defaults to the style's price tag color)
	 *
	 * @param nColor new background color, such as 0xffb3c833
	 */
	@Override
	public void setPriceBackgroundColor (int nColor) {
		m_appPriceBackgroundPaint.setColor (nColor);
	}

	/**
	 * Get the color of the call to action button
	 *
	 * @param bPushed true to get the color in the pushed-down state, false to get the color in the normal state
	 *
	 * @return button color
	 */
	public int getCallToActionButtonColor (boolean bPushed) {
		if (bPushed)
			return m_actionButtonPushedPaint.getColor();
		else
			return m_actionButtonNormalPaint.getColor();
	}

	/**
	 * Set the color of the application title (defaults to the style's title color)
	 *
	 * @param bPushed true to set the color in the pushed-down state, false to set the color in the normal state
	 * @param nColor new button color, such as Color.WHITE
	 */
	public void setCallToActionButtonColor (boolean bPushed, int nColor) {
		if (bPushed)
			m_actionButtonPushedPaint.setColor(nColor);
		else
			m_actionButtonNormalPaint.setColor(nColor);
	}

	/**
	 * React to call to action button (Download now) being clicked
	 */
	void onActionButtonClicked () {
		onAdClicked ();
	}

	/**
	 * Handle initial size or size change
	 *
	 * @param w new width
	 * @param h new height
	 * @param oldw previous width
	 * @param oldh old height
	 */
	@Override
	protected void onSizeChanged (int w, int h, int oldw, int oldh) {
		int nImageWidth, nImageHeight, nRescaledImageWidth, nRescaledImageHeight, nTextSize;
		int nButtonWidth, nButtonHeight, nTextWidth, nTextHeight;
		int nMaxWidth = -1, nMaxHeight = -1, nDimForAdBadge = -1;

		// Mark size as known, to start drawing
		m_bSizeKnown = true;

        // Get display dimensions so as to figure out the maximum scaling for the ad
		if (m_context != null) {
	        WindowManager wm = (WindowManager) m_context.getSystemService (Context.WINDOW_SERVICE);

	        if (wm != null) {
	           Display display = wm.getDefaultDisplay();

	           if (display != null) {
	              DisplayMetrics dm = new DisplayMetrics ();
	              double fXDots;

	              display.getMetrics (dm);
	              fXDots = dm.widthPixels * dm.densityDpi;
	              if (fXDots < 115200) fXDots = 115200;
	              if (fXDots > 192000) fXDots = 192000;

	              nMaxWidth = (int) (dm.widthPixels * (0.9 - 0.3 * (fXDots - 115200.0) / (192000.0 - 115200.0)));
	              if (getFlatAdType() == AFFlatAdType.AFFlatAdTypeSashimi_ge)
		              nMaxHeight = (int) (nMaxWidth / 2.25);
	              else
		              nMaxHeight = nMaxWidth / 2;
	              nDimForAdBadge = Math.max(dm.widthPixels, dm.heightPixels);
	              if (dm.widthPixels < dm.heightPixels)
	            	  nDimForAdBadge = (int) (nDimForAdBadge * 0.8);
	           }
	        }
		}

		// Update background gradient
		RadialGradient gradient = new RadialGradient(w/2, h/2, Math.max (w,h)/2,
													 m_backgroundPaint.getColor(), (m_backgroundPaint.getColor() & 0x00ffffff) / 2 | 0xff000000,
													 android.graphics.Shader.TileMode.CLAMP);
        m_backgroundPaint.setShader (gradient);

		// Store view bounds

		m_nViewX = 0;
		m_nViewY = 0;
		m_nViewWidth = w;
		m_nViewHeight = h;
		m_nTotalViewWidth = w;
		m_nTotalViewHeight = h;

		if (nMaxWidth > 0 && nMaxHeight > 0) {
			if (m_nViewWidth > nMaxWidth) {
				m_nViewX = (m_nViewWidth - nMaxWidth) / 2;
				m_nViewWidth = nMaxWidth;
			}

			if (m_nViewHeight > nMaxHeight) {
				if (getFlatAdType() == AFFlatAdType.AFFlatAdTypeSashimi_ge) {
					// Extended format, put the ad content at the bottom
					m_nViewY = (m_nViewHeight - nMaxHeight);
					m_nViewHeight = nMaxHeight;
				}
				else {
					// Minimal format, center vertically
					m_nViewY = (m_nViewHeight - nMaxHeight) / 2;
					m_nViewHeight = nMaxHeight;
				}
			}
		}

		Log.d (CLASS_TAG, "view changed to " + m_nViewX + "," + m_nViewY + " " + w + " x " + h);

		// Decide on text height depending on the view dimensions

		if (m_iconImage != null) {
			nImageWidth = m_iconImage.getBitmap().getWidth ();
			nImageHeight = m_iconImage.getBitmap().getHeight ();
		}
		else {
			nImageWidth = 1;
			nImageHeight = 1;
		}
		nRescaledImageHeight = (int) (m_nViewHeight * m_fTextHeightFraction);
		nRescaledImageWidth = (int) (nImageWidth * nRescaledImageHeight / nImageHeight);

		nTextSize = (int) (nRescaledImageHeight * 0.14 * 14 / 11);
		if (nTextSize < 8) nTextSize = 8;
		if (nTextSize > 90) nTextSize = 90;
        m_appNameTextPaint.setTextSize(nTextSize);

		nTextSize = (int) (nRescaledImageHeight * 0.14);
		if (nTextSize < 8) nTextSize = 8;
		if (nTextSize > 90) nTextSize = 90;
        m_appCategoryTextPaint.setTextSize(nTextSize);

		nTextSize = (int) (nRescaledImageHeight * 0.14 * 12 / 11);
		if (nTextSize < 8) nTextSize = 8;
		if (nTextSize > 90) nTextSize = 90;
        m_appDetailsTextPaint.setTextSize(nTextSize);

        if (m_normalTypeface != null)
			nTextSize = (int) (nRescaledImageHeight * 0.18);
        else
			nTextSize = (int) (nRescaledImageHeight * 0.20);
		if (nTextSize < 8) nTextSize = 8;
		if (nTextSize > 90) nTextSize = 90;
        m_appPriceTextPaint.setTextSize(nTextSize);

		// Fit the call to action text on the button

        if (m_iconImage != null) {
			nImageWidth = m_iconImage.getBitmap().getWidth ();
			nImageHeight = m_iconImage.getBitmap().getHeight ();
        }
        else {
        	nImageWidth = 1;
        	nImageHeight = 1;
        }
		nRescaledImageHeight = (int) (m_nViewHeight * m_fIconHeightFraction);
		nRescaledImageWidth = (int) (nImageWidth * nRescaledImageHeight / nImageHeight);

		nButtonWidth = (int) (m_nViewWidth * 0.5);
		nButtonHeight = (int) (nRescaledImageHeight * 0.40);
		if (nButtonHeight < 8) nButtonHeight = 8;
		if (nButtonHeight > 150) nButtonHeight = 150;

		CharSequence buttonTextString = AFUtils.getActionButtonText();
		float fButtonTextSize = (float) nButtonHeight;
		if (fButtonTextSize > (int) (nRescaledImageHeight * 0.14 * 12 / 11))
			fButtonTextSize = (int) (nRescaledImageHeight * 0.14 * 12 / 11);
		m_actionButtonTextPaint.setTextSize (nButtonHeight);
		do {
			nTextWidth = (int) m_actionButtonTextPaint.measureText (buttonTextString.toString());
			nTextHeight = AFUtils.getTextHeight (buttonTextString, m_actionButtonTextPaint, nButtonWidth);
			if (nTextWidth >= (int)(nButtonWidth * 0.8) ||
				nTextHeight >= (int)(nButtonHeight * 0.6)) {
				fButtonTextSize -= 0.5f;
				m_actionButtonTextPaint.setTextSize (fButtonTextSize);
			}
		} while (nTextWidth >= (int)(nButtonWidth * 0.8) ||
				 nTextHeight >= (int)(nButtonHeight * 0.6));

		if (nDimForAdBadge > 0 && m_nViewWidth > 0) {
	        m_fAdBadgeWidthFraction = (nDimForAdBadge * 0.075f) / ((float) m_nViewWidth);
		}
	}

	@Override
	public boolean onTouchEvent (MotionEvent event) {
	    if (event.getAction() == MotionEvent.ACTION_DOWN) {
	    	setActionButtonState (true);
	    }

	    if (event.getAction() == MotionEvent.ACTION_UP || event.getAction() == MotionEvent.ACTION_CANCEL) {
	    	setActionButtonState (false);

	    	if (event.getAction() == MotionEvent.ACTION_UP) {
		        // Clicked the view
	    		Log.d (CLASS_TAG, "sashimi view tapped");
	    		onActionButtonClicked ();
	    	}
	    }

	    return true;
	}

	/**
	 * Set the action button state
	 *
	 * @param bPushed true if pushed down, false if up
	 */
	private void setActionButtonState (final boolean bPushed) {
		((Activity) m_context).runOnUiThread (new Runnable() {
			public void run() {
				m_bActionButtonPushed = bPushed;
				invalidate ();
			}
		});
	}

	/**
	 * Draw view group (like onDraw for a single view)
	 *
	 * @param canvas graphics canvas
	 */
	@Override
	protected void dispatchDraw (Canvas canvas) {
		if (m_bSizeKnown && !m_bFinished && m_iconImage != null && m_roundMaskImage != null && m_adBadgeImage != null &&
			m_iconImage.getBitmap().isRecycled() == false) {
			int nImageWidth, nImageHeight, nRescaledImageWidth, nRescaledImageHeight, nIconX, nIconY, nBannerWidth, nBannerHeight, nBadgeX, nBadgeY, nMargin;
			int nButtonX, nButtonY, nButtonWidth, nButtonHeight, nTextX, nAppTitleTextY, nAppCategoryTextY, nAppDescriptionTextY;
			int nRescaledBadgeImageWidth, nRescaledBadgeImageHeight;
			float cx, cy, y1, y2, gap, h1, h2, h3;
			Paint.FontMetrics fmTitle, fmPrice;

			// Paint ad content background
			canvas.drawRect (new RectF (0, 0, m_nTotalViewWidth, 0 + m_nTotalViewHeight), m_backgroundPaint);

			// Draw app icon

			nImageWidth = m_iconImage.getBitmap().getWidth ();
			nImageHeight = m_iconImage.getBitmap().getHeight ();
			nRescaledImageHeight = (int) (m_nViewHeight * m_fIconHeightFraction);
			nRescaledImageWidth = (int) (nImageWidth * nRescaledImageHeight / nImageHeight);

			nIconX = (int) (m_nTotalViewWidth * 0.035);
			nIconY = m_nViewY + (int) ((m_nViewHeight * 0.5) - (nRescaledImageHeight / 2));
			nMargin = (int) (nRescaledImageWidth / 200);
			if (nMargin < 1) nMargin = 1;
			m_iconImage.setBounds ((int) nIconX, (int) nIconY, (int) (nIconX + nRescaledImageWidth), (int) (nIconY + nRescaledImageHeight));
			m_iconImage.draw (canvas);

			// Draw action button

			nImageWidth = m_iconImage.getBitmap().getWidth ();
			nImageHeight = m_iconImage.getBitmap().getHeight ();
			nRescaledImageHeight = (int) (m_nViewHeight * m_fIconHeightFraction);
			nRescaledImageWidth = (int) (nImageWidth * nRescaledImageHeight / nImageHeight);

			nButtonWidth = (int) (m_nViewWidth * 0.5);
			nButtonHeight = (int) (nRescaledImageHeight * 0.40);
			if (nButtonHeight < 8) nButtonHeight = 8;
			if (nButtonHeight > 150) nButtonHeight = 150;
			int nTextHeight;
			nTextHeight = AFUtils.getTextHeight (AFUtils.getActionButtonText(), m_actionButtonTextPaint, nButtonWidth);
			if (nButtonHeight > (nTextHeight / 0.6))
				nButtonHeight = (int) (nTextHeight / 0.6);

			// Calculate location of "Ad" badge

			nImageWidth = m_adBadgeImage.getBitmap().getWidth ();
			nImageHeight = m_adBadgeImage.getBitmap().getHeight ();
			nRescaledBadgeImageWidth = (int) (m_nViewWidth * m_fAdBadgeWidthFraction);
			nRescaledBadgeImageHeight = (int) (nImageHeight * nRescaledBadgeImageWidth / nImageWidth);
			nBadgeX = m_nTotalViewWidth - (int) (m_nTotalViewWidth * 0.01) - nRescaledBadgeImageWidth;
			nBadgeY = (int) (m_nTotalViewHeight * 0.02);

			// Draw call to action button

			nButtonX = (int) (nIconX + nRescaledImageWidth + (m_nTotalViewWidth * 0.025));
			nButtonY = (int) (nIconY + nRescaledImageHeight - nButtonHeight + m_nViewHeight * 0);

			if (m_bActionButtonPushed) {
				// Pushed down state
				canvas.drawRoundRect(new RectF(nButtonX, nButtonY, nButtonX + nButtonWidth, nButtonY + nButtonHeight), (int) (nButtonWidth * 0.04), (int) (nButtonWidth * 0.04), m_actionButtonPushedPaint);
			}
			else {
				// Normal enabled state
				canvas.drawRoundRect(new RectF(nButtonX, nButtonY, nButtonX + nButtonWidth, nButtonY + nButtonHeight), (int) (nButtonWidth * 0.04), (int) (nButtonWidth * 0.04), m_actionButtonNormalPaint);
			}

			StaticLayout slCTA = new StaticLayout(AFUtils.getActionButtonText(), m_actionButtonTextPaint, nButtonWidth, Layout.Alignment.ALIGN_CENTER, 1, 1, false);
			canvas.save ();
			canvas.translate (nButtonX, (int) (nButtonY + ((nButtonHeight - slCTA.getHeight()) / 2)));
			slCTA.draw (canvas);
			canvas.restore ();

			// Draw advertised app name

			fmTitle = m_appNameTextPaint.getFontMetrics();
			nTextX = (int) (nIconX + nRescaledImageWidth + (m_nTotalViewWidth * 0.025));
			nAppTitleTextY = (int) (nIconY - m_nViewHeight * 0);
			canvas.drawText(getTitleText().toString(), nTextX, nAppTitleTextY + m_appNameTextPaint.getTextSize() - fmTitle.bottom, m_appNameTextPaint);

			int nDescriptionMaxWidth;
			if (canDrawPrice ())
				nDescriptionMaxWidth = (int) (nBadgeX - nTextX);
			else
				nDescriptionMaxWidth = (int) (m_nTotalViewWidth - (m_nTotalViewWidth * 0.025) - nTextX);

			String strDescription = getTaglineText().toString();
			StaticLayout slDescription;
			do {
				slDescription = new StaticLayout(strDescription, m_appDetailsTextPaint, nDescriptionMaxWidth, Layout.Alignment.ALIGN_NORMAL, 1, 1, false);

				if (slDescription.getLineCount() > 1) {
					String workingText = strDescription.substring(0, slDescription.getLineEnd(2 - 1)).trim();
                    int lastSpace = workingText.lastIndexOf(' ');
                    if (lastSpace == -1) {
                        break;
                    }
                    strDescription = workingText.substring(0, lastSpace) + "...";
				}
			} while (slDescription.getLineCount() > 1);

			int nCategoryMaxWidth = nDescriptionMaxWidth;
			StaticLayout slCategory = new StaticLayout(getCategoryText().toString(), m_appCategoryTextPaint, nCategoryMaxWidth, Layout.Alignment.ALIGN_NORMAL, 1, 1, false);

			h1 = m_appNameTextPaint.getTextSize();
			h2 = slCategory.getHeight();
			h3 = slDescription.getHeight();
			y1 = nAppTitleTextY + h1;
			y2 = nButtonY;

			// Draw advertised app category

			gap = (y2 - y1) - h2 - h3;
			nAppCategoryTextY = (int) (nAppTitleTextY + h1 + gap / 3);

			canvas.save ();
			canvas.translate (nTextX, nAppCategoryTextY);
			slCategory.draw (canvas);
			canvas.restore ();

			// Draw advertised app description

			nAppDescriptionTextY = (int) (nAppCategoryTextY + m_appDetailsTextPaint.getTextSize() + gap / 3);

			canvas.save ();
			canvas.translate (nTextX, nAppDescriptionTextY);
			slDescription.draw (canvas);
			canvas.restore ();

			// Draw "Ad" badge

			m_adBadgeImage.setBounds ((int) nBadgeX, (int) nBadgeY, (int) (nBadgeX + nRescaledBadgeImageWidth), (int) (nBadgeY + nRescaledBadgeImageHeight));
			m_adBadgeImage.draw (canvas);

			// Draw price banner

			cx = (int) (m_nTotalViewWidth * 0.965);
			if (getFlatAdType() == AFFlatAdType.AFFlatAdTypeSashimi_ge)
				cy = (int) (m_nViewY + m_nViewHeight * 0.85);
			else
				cy = (int) (m_nTotalViewHeight * 0.85);

			fmPrice = m_appPriceTextPaint.getFontMetrics();
			float fontHeight = fmPrice.bottom - fmPrice.top;
			nBannerWidth = (int) (m_nViewWidth * 0.5);
			nBannerHeight = (int) (fontHeight + (int) (m_nViewHeight * 0.041));

			if (canDrawPrice ()) {
				canvas.save ();
				canvas.translate (cx, cy);
				canvas.rotate (-45.0f, 0, 0);
				canvas.drawRect (new RectF (-nBannerWidth / 2, -nBannerHeight, nBannerWidth / 2, 0), m_appPriceBackgroundPaint);

				canvas.drawText(getPriceText().toString(), 0, -(m_appPriceTextPaint.descent() + m_appPriceTextPaint.ascent()) / 2 - (nBannerHeight / 2), m_appPriceTextPaint);
				canvas.restore();
			}
		}
	}

	/** Application context */
	private Context m_context;

	/** Display style mode */
	private AFAdSDKSashimiStyleMode m_styleMode;

	/** Brush for drawing the ad background */
	private Paint m_backgroundPaint;

	/** Brush for drawing the price banner */
	private Paint m_appPriceBackgroundPaint;

	/** Brush for drawing the call to action button in normal state */
	private Paint m_actionButtonNormalPaint;

	/** Brush for drawing the call to action button in pushed state */
	private Paint m_actionButtonPushedPaint;

	/** Brush for drawing the action button's text */
	private TextPaint m_actionButtonTextPaint;

	/** true if ad is finished and being cleaned up */
	private boolean m_bFinished;

	/** Brush for drawing the app name text */
	private TextPaint m_appNameTextPaint;

	/** Brush for drawing the app category text */
	private TextPaint m_appCategoryTextPaint;

	/** Brush for drawing the app details text */
	private TextPaint m_appDetailsTextPaint;

	/** Brush for drawing the app price text */
	private TextPaint m_appPriceTextPaint;

	/** Image to use for the "Ad" badge */
	private BitmapDrawable m_adBadgeImage;

	/** Round icon mask (also used for drawing the border) */
	private BitmapDrawable m_roundMaskImage;

	/** Image to use for the app icon */
	private BitmapDrawable m_iconImage;

	/** Image to use for the app screenshot */
	private BitmapDrawable m_screenshotImage;

	/** Normal typeface */
	private Typeface m_normalTypeface;

	/** Bold typeface */
	private Typeface m_boldTypeface;

	/** Black typeface */
	private Typeface m_blackTypeface;

	/** true if action button is currently pushed */
	private boolean m_bActionButtonPushed;

	/** true if the size of the view is known yet */
	private boolean m_bSizeKnown;

	/** X coordinate of top, left of the view's content */
	private int m_nViewX;

	/** Y coordinate of top, left of the view's content */
	private int m_nViewY;

	/** Width of the view's content */
	private int m_nViewWidth;

	/** Height of the view's content */
	private int m_nViewHeight;

	/** Total width of the view including borders */
	private int m_nTotalViewWidth;

	/** Total height of the view including borders */
	private int m_nTotalViewHeight;

	/** Fraction of the view width to use for the badge */
	private float m_fAdBadgeWidthFraction = 0.125f;
}


text:
package com.tle.web.entity.services.soap.interceptor;

import com.dytech.devlib.PropBagEx;
import com.tle.common.Check;
import com.tle.core.guice.Bind;
import com.tle.core.services.user.UserService;
import javax.inject.Inject;
import javax.inject.Singleton;
import javax.servlet.http.HttpServletRequest;
import javax.xml.namespace.QName;
import org.apache.cxf.binding.soap.SoapMessage;
import org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor;
import org.apache.cxf.headers.Header;
import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.phase.Phase;
import org.apache.cxf.transport.http.AbstractHTTPDestination;
import org.apache.log4j.Logger;
import org.w3c.dom.Element;

@SuppressWarnings("nls")
@Bind
@Singleton
public class TokenHeaderInInterceptor extends AbstractSoapInterceptor {
  private static final Logger LOGGER = Logger.getLogger(TokenHeaderInInterceptor.class);

  @Inject private UserService userService;

  public TokenHeaderInInterceptor() {
    super(Phase.POST_PROTOCOL);
  }

  @Override
  public void handleMessage(SoapMessage message) throws Fault {
    Header header = message.getHeader(new QName("equella"));
    if (header != null) {
      Element e = (Element) header.getObject();
      PropBagEx equella = new PropBagEx(e);
      String token = equella.getNode("token");
      if (!Check.isEmpty(token)) {
        HttpServletRequest request =
            (HttpServletRequest) message.get(AbstractHTTPDestination.HTTP_REQUEST);
        try {
          userService.loginWithToken(token, userService.getWebAuthenticationDetails(request), true);
        } catch (RuntimeException ex) {
          LOGGER.error(
              "Error initialising session with SOAP header token '"
                  + token
                  + "' for URL "
                  + request.getRequestURL().toString());
          throw ex;
        }
      }
    }
  }
}


text:
package server

import (
	"net/http"
)

///////////////////////////////////////////////////
// Handle functions
///////////////////////////////////////////////////
func HandleRoot(w http.ResponseWriter, req *http.Request) {
	if logged(w, req) {
		reload(w, req, "/contract")
		return
	}
	passdata := map[string]interface{}{
		"pagetitle":  "BankETH login - " + BANKNAME,
		"loginerror": false,
	}
	session, err := store.Get(req, SESSIONNAME)
	if err != nil {
		http.Error(w, err.Error(), http.StatusInternalServerError)
		return
	}
	loginerror, exists := session.Values["loginerror"]
	if exists && loginerror.(bool) {
		passdata["loginerror"] = true
	}
	templates.ExecuteTemplate(w, "login.html", passdata)
}


text:
license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

           http://www.apache.org/licenses/LICENSE-2.0

         Unless required by applicable law or agreed to in writing,
         software distributed under the License is distributed on an
         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
         KIND, either express or implied.  See the License for the
         specific language governing permissions and limitations

   under the License.
---

# 세계화

정보를 가져오고 사용자의 로캘 및 표준 시간대 관련 작업을 수행 합니다.

## 개체

*   GlobalizationError

## 메서드

*   globalization.getPreferredLanguage
*   globalization.getLocaleName
*   globalization.dateToString
*   globalization.stringToDate
*   globalization.getDatePattern
*   globalization.getDateNames
*   globalization.isDayLightSavingsTime
*   globalization.getFirstDayOfWeek
*   globalization.numberToString
*   globalization.stringToNumber
*   globalization.getNumberPattern
*   globalization.getCurrencyPattern

## 변수 범위

`globalization`개체의 자식 인지는 `navigator` 개체 및 따라서 전역 범위를 갖는.

    // The global globalization object
    var globalization = navigator.globalization;

## 기능 액세스

버전 3.0, 코르도바 *플러그인*으로 장치 수준 Api를 구현합니다. CLI의 사용 `plugin` 명령 설명에 명령줄 인터페이스를 추가 하거나 프로젝트에 대 한이 기능을 제거 하려면:

        $ cordova plugin add org.apache.cordova.globalization
        $ cordova plugin ls
        [ 'org.apache.cordova.globalization' ]
        $ cordova plugin rm org.apache.cordova.globalization

이 명령은 모든 타겟된 플랫폼에 적용 하지만 플랫폼 관련 구성 설정을 아래에 설명 된 수정:

*   (안 드 로이드`app/res/xml/config.xml`)

        <feature name="Globalization">
            <param name="android-package" value="org.apache.cordova.Globalization" />
        </feature>

일부 플랫폼은 특별 한 구성이 필요 없이이 기능을 지원할 수 있습니다. *플랫폼 지원* 개요 섹션에서을 참조 하십시오.


text:
DROP TABLE MFR_RANK_T;
DROP TABLE MFR_RANKIMAGE_T;

CREATE TABLE 'MFR_RANK_T' (
  'ID' bigint(20) NOT NULL AUTO_INCREMENT,
  'VERSION' int(11) NOT NULL,
  'UUID' varchar(36) NOT NULL,
  'CREATED' datetime NOT NULL,
  'CREATED_BY' varchar(36) NOT NULL,
  'MODIFIED' datetime NOT NULL,
  'MODIFIED_BY' varchar(36) NOT NULL,
  'TITLE' varchar(255) NOT NULL,
  'RANKTYPE' varchar(19) NOT NULL,
  'ASSIGNTO' varchar(255) DEFAULT NULL,
  'ASSIGNTODISPLAY' varchar(255) DEFAULT NULL,
  'MIN_POST' bigint(20) DEFAULT NULL,
  'CONTEXT_ID' varchar(255) NOT NULL,
  'RANKIMAGE' bigint(20) DEFAULT NULL,
  PRIMARY KEY ('ID')
);

CREATE TABLE 'MFR_RANKIMAGE_T' (
  'ID' bigint(20) NOT NULL AUTO_INCREMENT,
  'VERSION' int(11) NOT NULL,
  'CREATED' datetime NOT NULL,
  'CREATED_BY' varchar(255) NOT NULL,
  'MODIFIED' datetime NOT NULL,
  'MODIFIED_BY' varchar(255) NOT NULL,
  'ATTACHMENT_ID' varchar(255) NOT NULL,
  'ATTACHMENT_URL' varchar(255) NOT NULL,
  'ATTACHMENT_NAME' varchar(255) NOT NULL,
  'ATTACHMENT_SIZE' varchar(255) NOT NULL,
  'ATTACHMENT_TYPE' varchar(255) NOT NULL,
  'RANKID' bigint(20) DEFAULT NULL,
  PRIMARY KEY ('ID')
);


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

import { TuneBookService, Playlist, FilterSettings } from '../../business/index';

@Component({
    moduleId: module.id,
    selector: 'etb-playlist-list-item',
    templateUrl: 'playlist-list-item.component.html',
    styleUrls: ['playlist-list-item.component.css']
})
export class PlaylistListItemComponent implements OnInit {
    @Input() playlist: Playlist;
    filterSettings: FilterSettings;
    shown: boolean;
    checked: boolean;

    constructor(public tuneBookService: TuneBookService) {

    }

    ngOnInit() {
        this.filterSettings = this.tuneBookService.getCurrentFilterSettings();
        this.shown = true;
        this.checked = false;
    }
//TODO: remove (läuft hier sowie so nicht durch)
    onCheck() {
        if (this.filterSettings.applyPlaylistIds && this.checked) {
            this.shown = true;
        } else {
            this.shown = false;
        }
    }

    togglePlaylistSelection(e:Event) {
        if ((<any>e.target).checked) {
            this.filterSettings.addPlaylistId(this.playlist.id);

        } else {
            this.filterSettings.removePlaylistId(this.playlist.id);
        }
    }

    isSelected() {
        return this.filterSettings.playlistIds.indexOf(this.playlist.id) > -1;
    }
}


text:
package com.google.common.collect.testing;

import com.google.common.annotations.GwtCompatible;
import com.google.common.collect.testing.SampleElements.Unhashables;

import java.util.Collection;
import java.util.List;

/**
 * Creates collections containing unhashable sample elements, to be tested.
 *
 * <p>This class is GWT compatible.
 *
 * @author Regina O'Dell
 */
@GwtCompatible
public abstract class
    TestUnhashableCollectionGenerator<T extends Collection<UnhashableObject>>
    implements TestCollectionGenerator<UnhashableObject> {
  @Override
  public SampleElements<UnhashableObject> samples() {
    return new Unhashables();
  }

  @Override
  public T create(Object... elements) {
    UnhashableObject[] array = createArray(elements.length);
    int i = 0;
    for (Object e : elements) {
      array[i++] = (UnhashableObject) e;
    }
    return create(array);
  }

  /**
   * Creates a new collection containing the given elements; implement this
   * method instead of {@link #create(Object...)}.
   */
  protected abstract T create(UnhashableObject[] elements);

  @Override
  public UnhashableObject[] createArray(int length) {
    return new UnhashableObject[length];
  }

  @Override
  public Iterable<UnhashableObject> order(
      List<UnhashableObject> insertionOrder) {
    return insertionOrder;
  }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.vuforia.cegrano.RenderImage"
    android:versionCode="100"
    android:versionName="1.0">

    <!--
        The application's compatibility with one or more versions of the Android
        platform.

        android:minSdkVersion = application's required minimum API level to run
        android:targetSdkVersion = application's targeted API level
    -->
    <uses-sdk
        android:minSdkVersion="14"
        android:targetSdkVersion="22" />

    <uses-feature android:glEsVersion="0x00020000" />

    <!--
         The application requires a camera.

         NOTE: Any application that requests the CAMERA permission but does not
         declare any camera features with the <uses-feature> element will be
         assumed to use all camera features (auto-focus and flash). Thus, the
         application will not be compatible with devices that do not support
         all camera features. Please use <uses-feature> to declare only the
         camera features that your application does need. For instance, if you
         request the CAMERA permission, but you do not need auto-focus or
         flash, then declare only the android.hardware.camera feature. The
         other camera features that you do not request will no longer be
         assumed as required.
    -->
    <uses-feature android:name="android.hardware.camera" />

    <!--
        Add this permission to get access to the camera.
    -->
    <uses-permission android:name="android.permission.CAMERA" />

    <!--
        Add this permission to allow opening network sockets.
    -->
    <uses-permission android:name="android.permission.INTERNET" />

    <!--
        Add this permission to check which network access properties (e.g.
        active type: 3G/WiFi).
     -->
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

    <!--
      NOTE: The setting 'android:launchMode="singleTask"' makes sure
      that the activity can begin only one task and the device can hold only
      one instance of the activity at a time. However, it allows other
      activities to be part of its task (unlike the 'singleInstance' mode).
      It's at the root of the activity stack, but other activities (necessarily
      "standard" and "singleTop" activities) can be launched into the same task.
      If this attribute is not set, the default value 'standard' is used, which
      would allow the activity to be launched multiple times.

      NOTE 2: The setting
      'android:theme="@android:style/Theme.NoTitleBar.Fullscreen"' ensures
      that the application starts in full screen mode without a title bar.
    -->
    <application
        android:allowBackup="true"
        android:description="@string/app_description"
        android:icon="@drawable/icon"
        android:label="@string/app_name"
        android:launchMode="singleTask"
        android:theme="@style/SampleAppsTheme">

        <!--
         NOTE: The values in 'android:configChanges' ensure that Android will
         not destroy and re-create the activity when the user flips the
         keyboard, changes the orientation of the device, or the actual or
         physical screen resolution changes, but calls the Activity's
         onConfigurationChanged() function instead.

         NOTE 2: In order to prevent automatic reactions to orientation
         changes in addition to setting proper values for
         'android:configChanges', you also must explicitly specify the screen
         orientation used by the application, either by setting the attribute
         'android:screenOrientation' or in code by calling
         Activity.setRequestedOrientation().
       -->
        <!-- Splash Screen Activity -->

        <activity
            android:name=".ui.ActivityList.ActivitySplashScreen"
            android:configChanges="orientation|keyboardHidden"
            android:noHistory="true"
            android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity
            android:name=".ui.ActivityList.AboutScreen"
            android:configChanges="orientation|keyboardHidden"
            android:screenOrientation="portrait"></activity>

        <activity
            android:name=".app.VideoPlayback.ImagePlayback"
            android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize"
            android:launchMode="singleTask"
            android:theme="@style/SampleAppsTheme" />
        <activity
            android:name=".app.VideoPlayback.VideoPlayback"
            android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize"
            android:launchMode="singleTask"
            android:theme="@style/SampleAppsTheme" />
        <activity
            android:name=".app.VideoPlayback.FullscreenPlayback"
            android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize"
            android:launchMode="singleTask"
            android:theme="@style/SampleAppsTheme" />

        <!--
            This is the activity that holds the full screen media player.
        -->

    </application>

</manifest>


text:
package com.magnet.yak;

public class MMXSettings {
	private final String HOST = "localhost";
	private final int port = 5222;
}


text:
package com.facebook.buck.android.support.exopackage;

import java.lang.reflect.Constructor;

import android.annotation.TargetApi;
import android.app.Application;
import android.content.Context;
import android.content.res.Configuration;

/**
 * A base class for implementing an Application that delegates to an {@link ApplicationLike}
 * instance. This is used in conjunction with secondary dex files so that the logic that would
 * normally live in the Application class is loaded after the secondary dexes are loaded.
 */
public abstract class ExopackageApplication<T extends ApplicationLike> extends Application {

  private static final int SECONDARY_DEX_MASK = 1;
  private static final int NATIVE_LIBRARY_MASK = 2;
  private static final int RESOURCES_MASK = 4;

  private final String delegateClassName;
  private final int exopackageFlags;
  private T delegate;

  /**
   * @param exopackageFlags Bitmask used to determine which exopackage feature is enabled in the
   * current build. This should usually be {@code BuildConfig.EXOPACKAGE_FLAGS}.
   */
  protected ExopackageApplication(int exopackageFlags) {
    this(DefaultApplicationLike.class.getName(), exopackageFlags);
  }

  /**
   * @param delegateClassName The fully-qualified name of the {@link ApplicationLike} class
   * that will act as the delegate for application lifecycle callbacks.
   * @param exopackageFlags Bitmask used to determine which exopackage feature is enabled in the
   * current build. This should usually be {@code BuildConfig.EXOPACKAGE_FLAGS}.
   */
  protected ExopackageApplication(
      String delegateClassName,
      int exopackageFlags) {
    this.delegateClassName = delegateClassName;
    this.exopackageFlags = exopackageFlags;
  }

  private boolean isExopackageEnabledForSecodaryDex() {
    return (exopackageFlags & SECONDARY_DEX_MASK) != 0;
  }

  private boolean isExopackageEnabledForNativeLibraries() {
    return (exopackageFlags & NATIVE_LIBRARY_MASK) != 0;
  }

  private boolean isExopackageEnabledForResources() {
    return (exopackageFlags & RESOURCES_MASK) != 0;
  }

  private T createDelegate() {
    if (isExopackageEnabledForSecodaryDex()) {
      ExopackageDexLoader.loadExopackageJars(this);
    }

    if (isExopackageEnabledForNativeLibraries()) {
      ExopackageSoLoader.init(this);
    }

    if (isExopackageEnabledForResources()) {
      ResourcesLoader.init(this);
    }

    try {
      // Use reflection to create the delegate so it doesn't need to go into the primary dex.
      Class<T> implClass = (Class<T>) Class.forName(delegateClassName);
      Constructor<T> constructor = implClass.getConstructor(Application.class);
      return constructor.newInstance(this);
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }

  private synchronized void ensureDelegate() {
    if (delegate == null) {
      delegate = createDelegate();
    }
  }

  /**
   * Hook for sub-classes to run logic after the {@link Application#attachBaseContext} has been
   * called but before the delegate is created. Implementors should be very careful what they do
   * here since {@link android.app.Application#onCreate} will not have yet been called.
   */
  protected void onBaseContextAttached() {
  }

  /**
   * @return the delegate, or {@code null} if not set up.
   */
  // @Nullable  - Don't want to force a reference to that annotation in the primary dex.
  public final T getDelegateIfPresent() {
    return delegate;
  }

  @Override
  protected final void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    onBaseContextAttached();
    ensureDelegate();
  }

  @Override
  public final void onCreate() {
    super.onCreate();
    ensureDelegate();
    delegate.onCreate();
  }

  @Override
  public final void onTerminate() {
    super.onTerminate();
    if (delegate != null) {
      delegate.onTerminate();
    }
  }

  @Override
  public final void onLowMemory() {
    super.onLowMemory();
    if (delegate != null) {
      delegate.onLowMemory();
    }
  }

  @TargetApi(14)
  @Override
  public final void onTrimMemory(int level) {
    super.onTrimMemory(level);
    if (delegate != null) {
      delegate.onTrimMemory(level);
    }
  }

  @Override
  public void onConfigurationChanged(Configuration newConfig) {
    super.onConfigurationChanged(newConfig);
    if (delegate != null) {
      delegate.onConfigurationChanged(newConfig);
    }
  }

  @Override
  public Object getSystemService(String name) {
    if (delegate != null) {
      Object service = delegate.getSystemService(name);
      if (service != null) {
        return service;
      }
    }
    return super.getSystemService(name);
  }
}


text:
using namespace std;

#define MAX_UINT64 0xffffffffffffffffui64
#define MAX_UINT32 0xffffffffU
#define MAX_UINT8  0xffU

struct CLUModInfoData
{
    CLUModInfoData()
    {
        index = MAX_UINT32;
        codeBytes = NULL;
        startRva = GT_INVALID_RVADDR;
        endRva = 0;
        codeSize = 0;
        codeOffset = 0;
    };

    ~CLUModInfoData()
    {
        if (codeBytes)
        {
            free(codeBytes);
        }

        codeBytes = NULL;
        startRva = GT_INVALID_RVADDR;
        endRva = 0;
        codeSize = 0;
        codeOffset = 0;
    }

    void setCodeBytes(unsigned char* b) { codeBytes = b; };
    unsigned char* getCodeBytes() { return codeBytes; } ;

    UINT32   index;         // Index of this entry used by CLU data to refer to a module
    UINT8*   codeBytes;
    gtRVAddr startRva;      // Starting RVA of codeBytes
    gtRVAddr endRva;        // Ending RVA of codeBytes
    UINT32   codeSize;
    UINT32   codeOffset;
};

typedef map<wstring, CLUModInfoData > CLUModInfoMap;

typedef pair<UINT64, UINT8 > TimeStampType; // Timestamp with bool isRemote
typedef list<TimeStampType > AddrData;  // Timestamps
typedef pair<gtVAddr, UINT64 > AddrMapKey;  // VA and PA
typedef map<AddrMapKey, AddrData > AddrMap;

struct PidRIPData
{
    // data maintained for each instruction between evictions

    PidRIPData()
    {
        rw_bytes = 0;
        access_bitmap = 0;
        rw_count = 0;
        modIndex = MAX_UINT32;
        SpanCount = 0;
        bSizeUnknown = 0;
        dataAddresses.clear();
    }

    UINT64  access_bitmap;  // bitmap of bytes accessed by this instruction
    UINT64  rw_bytes;       // Number of bytes read / written
    UINT32  rw_count;       // Number of reads / writes
    UINT32  modIndex;       // The index of the module for which this RIP belongs
    UINT32  SpanCount;      // Number of times an access crossed cache line boundaries
    bool    bSizeUnknown;   // Size of operation can't be determined by disassembler
    AddrMap dataAddresses;  // All VA's of the data accesses and timestamps
};

struct PidRIPKey
{
    PidRIPKey(UINT32 pid, UINT32 tid, gtVAddr rip, UINT8 _core)
    {
        PID = pid;
        TID = tid;
        RIP = rip;
        core = _core;
    };

    bool operator< (const PidRIPKey& other) const
    {
        if (other.PID != this->PID)
        {
            return (other.PID > this->PID);
        }

        if (other.core != this->core)
        {
            return (other.core > this->core);
        }

        if (other.TID != this->TID)
        {
            return (other.TID > this->TID);
        }

        if (other.RIP > this->RIP)
        {
            return true;
        }

        return false;
    };

    UINT32  PID;
    UINT32  TID;
    gtVAddr RIP;
    UINT8   core;
};

typedef map< PidRIPKey, PidRIPData > PidRIPMap; // Key is PID/RIP

struct CacheDataStuff   // "For each cache line" data
{
    CacheDataStuff()
    {
        tag = 0;
        access_bitmap = 0;
        tot_rw_bytes = 0;
        tot_rw = 0;
        tot_evictions = 0;
        min_bytes = MAX_UINT8;
        max_bytes = 0;
    };

    UINT64      tag;            // Cache line tag
    UINT64      access_bitmap;  // bitmap of bytes accessed in the line, full run
    UINT64      tot_rw_bytes;   // # bytes read / written - total for this line, full run
    UINT64      timestamp;      // Used for LRU determination
    PidRIPMap   pidripmap;      // Instructions accessing this line
    UINT32      tot_rw;         // # reads / writes - total for this line, full run
    UINT32      tot_evictions;  // # times this line was evicted - total, full run
    UINT8       min_bytes;      // Minimum access size in bytes
    UINT8       max_bytes;      // Maximum access size in bytes
};

typedef multimap<unsigned int, CacheDataStuff > CacheMap;   // Key is the cache index (phy addr[14:6]), data is cache lines

typedef map<unsigned char, CacheMap > CoreCacheMap;     // Key is processor core

struct CLUKey
{
    CLUKey(UINT32 _core, ProcessIdType PID, ThreadIdType TID, gtVAddr _RIP, UINT32 line)
    {
        RIP = _RIP;
        core = _core;
        cache_line = line;
        ThreadID = TID;
        ProcessID = PID;
    };

    bool operator< (const CLUKey& other) const
    {
        if (other.ProcessID != this->ProcessID)
        {
            return (other.ProcessID > this->ProcessID);
        }

        if (other.core != this->core)
        {
            return (other.core > this->core);
        }

        if (other.cache_line != this->cache_line)
        {
            return (other.cache_line > this->cache_line);
        }

        if (other.ThreadID != this->ThreadID)
        {
            return (other.ThreadID > this->ThreadID);
        }

        if (other.RIP > this->RIP)
        {
            return true;
        }

        return false;
    };

    gtVAddr         RIP;
    ProcessIdType   ProcessID;
    ThreadIdType    ThreadID;
    UINT32          cache_line;
    UINT32          core;
};

struct CLUData
{
    CLUData()
    {
        tot_rw = 0;
        num_rw = 0;
        byteMask = 0;
        min_bytes = MAX_UINT8;
        max_bytes = 0;
        tot_evictions = 0;
        bSizeUnknown = 0;
        modIndex = MAX_UINT32;
        SpanCount = 0;
        sumMax = 0;
    };

    void clear(void)
    {
        tot_rw = 0;
        num_rw = 0;
        byteMask = 0;
        min_bytes = MAX_UINT8;
        max_bytes = 0;
        tot_evictions = 0;
        bSizeUnknown = 0;
        modIndex = MAX_UINT32;
        SpanCount = 0;
        sumMax = 0;
        dataAddresses.clear();
    };

    // addition operator overloading
    CLUData& operator+= (const CLUData& other)
    {
        this->tot_rw += other.tot_rw;
        this->tot_evictions += other.tot_evictions;
        this->byteMask |= other.byteMask;
        this->num_rw += other.num_rw;
        this->modIndex = other.modIndex;
        this->SpanCount += other.SpanCount;
        this->min_bytes = min(this->min_bytes, other.min_bytes);
        this->max_bytes = max(this->max_bytes, other.max_bytes);
        this->sumMax += other.max_bytes;
        this->bSizeUnknown = this->bSizeUnknown || other.bSizeUnknown;

        AddrMap::const_iterator otherIt = other.dataAddresses.cbegin();

        for (; otherIt != other.dataAddresses.cend(); otherIt++)
        {
            AddrMap::iterator thisIt;
            thisIt = this->dataAddresses.find(otherIt->first);

            if (thisIt == this->dataAddresses.end())
            {
                this->dataAddresses.insert(AddrMap::value_type(otherIt->first, otherIt->second));
            }
            else
            {
                AddrData tmpData;
                tmpData = otherIt->second;
                thisIt->second.splice(thisIt->second.end(), tmpData);
            }
        }

        return *this;
    };

    UINT64  tot_rw;         // Total number of bytes read / written
    // Utilization is calculated as bytes_accessed / 64 / tot_evictions
    // (a/64) = util. for 1 eviction
    // (a/64) + (b/64) = (a+b)/64; therefore ((a+b)/64)/2) = util. for 2 evictions
    // (a+b+...) = bytes_accessed
    // Total util. = ((bytes_accessed)/64)/tot_evictions
    UINT64  tot_evictions;  // Total number of evictions
    UINT64  byteMask;       // bitmap of bytes accessed in this line
    UINT32  sumMax;         // Used for aggregation
    UINT32  num_rw;         // Total number of reads / writes from this line
    UINT32  modIndex;       // The index of the module for which this RIP belongs
    UINT32  SpanCount;      // Number of times an access crossed cache line boundaries
    AddrMap dataAddresses;  // All VA's of the data accesses and timestamps
    SourceLineInfo lineInfo;        // Line number info for this RIP
    UINT8   min_bytes;      // minimum # bytes accessed between evictions
    UINT8   max_bytes;      // maximum # bytes accesses between evictions
    UINT8   bSizeUnknown;   // Couldn't disassemble and determine size
};

typedef map<CLUKey, CLUData > CLUMap;

struct CLUripData
{
    UINT32      count;
    char        mnem[50];
};

typedef std::map<gtVAddr, CLUripData > CLUErrData;

struct CLUERRData
{
    UINT64      count;
    CLUErrData  errMap;
};

typedef std::map<unsigned char, CLUERRData > CLUErrorMap;

// Error codes from CLU processing
#define MODULE_NOT_IN_MAP       0xff
#define CANNOT_OPEN             0xfe
#define OFFSET_OVERFLOW         0xfd
#define DISASM_FAILED           0xfc
#define NO_MEMOPS               0xfb
#define SIZE_ERROR              0xfa
#define MODULE_NAME_EMPTY       0xf9
#define RIP_OVERRUN             0x80

// if return value is < CA_DATA_SIZE_MAX then size is valid
#define CA_DATA_SIZE_MAX        0x40

// On error, assume the access was this size
#define CLU_DEFAULT_SIZE        4

class Cache;

class CluInfo
{
public:
    CluInfo(UINT8 l1DcAssoc,
            UINT8 l1DcLineSize,
            UINT8 l1DcLinesPerTag,
            UINT8 l1DcSize);

    ~CluInfo();

    CLUMap* GetCLUData()
    {
        return m_pCacheUtilMap;
    }

    void RecordCacheLdSt(IBSOpRecordData* ibsOpRec,
                         TiModuleInfo* pModInfo,
                         NameModuleMap* pMMap,
                         bool isLoad);

    void CacheLineCleanup();

    double GetAvgUtil()
    {
        if (!m_initialized)
        {
            return 0.0;
        }

        return (double) m_totCacheBytes / (double) m_totCacheEvictions / 64.0 * 100.0;
    }

private:
    void IncrCacheByteCount(CacheDataStuff& cData,
                            IBSOpRecordData* ibsOpRec,
                            unsigned char size,
                            unsigned int offset,
                            bool isLoad,
                            bool isUnaligned,
                            UINT32 modIndex,
                            bool bSpansLines);

    unsigned char GetOperationSize(gtVAddr RIP,
                                   BOOL isLoad,
                                   TiModuleInfo* pModInfo,
                                   NameModuleMap* pMMap,
                                   bool& bErr,
                                   UINT32* modIndex);

    void CacheEvent(IBSOpRecordData* ibsOpRec,
                    unsigned char size,
                    bool isLoad,
                    bool isUnaligned,
                    UINT32 modIndex,
                    bool bSpansLines);

    void CacheLineEviction(CacheDataStuff& cData, unsigned int index, unsigned char core);

    void AddToErrorMap(unsigned char err, gtVAddr RIPx, const char* mnemx);

    bool Initialize();

    Cache*          m_pCache;
    CLUMap*         m_pCacheUtilMap;
    CLUErrorMap*    m_pCacheErrors;
    CLUModInfoMap*  m_pModInfoMap;
    UINT64          m_totCacheBytes;
    UINT64          m_totCacheEvictions;
    UINT32          m_modIndex;
    UINT32          m_funcIndex;
    bool            m_initialized;
    UINT8           m_l1DcAssoc;
    UINT8           m_l1DcLineSize;
    UINT8           m_l1DcLinesPerTag;
    UINT8           m_l1DcSize;
};

#endif // _CLUINFO_H_


text:
using System;
using System.Collections.Generic;
using HaloOnline.Server.Model.Serialization;
using HaloOnline.Server.Model.User;
using Newtonsoft.Json;

namespace HaloOnline.Server.Model.Unused
{
    public class UserScoreboardStats
    {
        public UserId User { get; set; }
        public int Outcome { get; set; }
        public int Place { get; set; }
        public int Kills { get; set; }
        public int Deaths { get; set; }
        public int Suicides { get; set; }
        public int Assists { get; set; }
        [JsonConverter(typeof(UnixEpochMillisecondsJsonConverter))]
        public DateTime TimePlayedMs { get; set; }
        public List<KeyIntegerValuePair> GameStats { get; set; }
        [JsonProperty("BIEvents")]
        public List<KeyIntegerValuePair> BiEvents { get; set; }
    }
}


text:
"""Install script for Work Queue and SHADHO config.

This executable performs post-install steps to get the Work Queue library and
set up SHADHO config and extra scripts. By default, these are installed to
`$HOME/.shadhorc` and `$HOME/.shadho/`.
"""

import argparse
import configparser
import os
import pathlib
import re
import shutil
import site
import subprocess
import sys
import tempfile

def parse_args(args=None):
    homedir = str(pathlib.Path().home())

    p = argparse.ArgumentParser(
        description="""
            Install the .shadho support directory, Work Queue, and additional
            files needed to run SHADHO.
        """)

    p.add_argument('--prefix', type=str, default=homedir,
                   help='install directory of the .shadho directory')
    p.add_argument('--user', action='store_true',
                   help='pass to perform a Python user-level install')

    return p.parse_args(args=None)

def install_workqueue(prefix):
    """Install Work Queue and SHADHO supplementary files.

    Parameters
    ----------
    prefix : str
        Install directory of the .shadho directory.

    Returns
    -------
    prefix : str or None
        Identical to ``prefix``. Set to None if intallation failed.
    """
    try:
        homedir = str(pathlib.Path().home())
        if prefix == homedir:
            prefix = os.path.join(prefix, '.shadho')
        tempdir = tempfile.mkdtemp(prefix='shadho_install.')

        os.makedirs(prefix, exist_ok=True)
        print('Building and installing Work Queue to {}.'.format(prefix))

        installer = os.path.join(os.path.dirname(__file__),
                                 'install_workqueue.sh')
        subprocess.check_output(
            ['sh', installer, tempdir, prefix],
            stderr=subprocess.STDOUT)
        result = 'not None'

    except subprocess.CalledProcessError as e:
        logfile = os.path.abspath('shadho_install.log')
        print('Error installing Work Queue.')
        print('Dumping install logs to {}'.format(logfile))
        with open(logfile, 'w') as f:
            f.write(e.output.decode())
        result = None
    finally:
        shutil.rmtree(tempdir)

    return result

def write_shadhorc(shadho_dir):
    """Create the .shadhorc config file.

    Parameters
    ----------
    prefix : str
        Path to install SHADHO config and Work Queue to.
    shadho_dir : str
        Path to the .shadho install directory.
    """
    # Set up the default config values
    default_config = {
        'global': {
            'wrapper': 'shadho_worker.py',
            'utils': 'shadho_utils.py',
            'output': 'out.tar.gz',
            'result_file': 'performance.json',
            'optimize': 'loss',
            'param_file': 'hyperparameters.json',
            'backend': 'json',
            'manager': 'workqueue'
        },
        'workqueue': {
            'port': '9123',
            'name': 'shadho_master',
            'shutdown': 'True',
            'logfile': 'shadho_master.log',
            'debugfile': 'shadho_master.debug',
            'password': 'False'
        },
        'backend': {
            'type': 'sql',
            'url': 'sqlite:///:memory:'
        }
    }

    default_config['global']['shadho_dir'] = str(shadho_dir)

    # Load the default config into a ConfigParser. The try block is for
    # Python3+, the except block is for Python 2.7.
    try:
        config = configparser.ConfigParser()
        config.read_dict(default_config)
    except AttributeError:
        config = configparser.RawConfigParser()
        for section in default_config:
            config.add_section(str(section))
            for entry in default_config[section]:
                if type(default_config[section]) is dict:
                    config.set(str(section),
                               str(entry),
                               str(default_config[section][entry]))

    # Write the .shadhorc.
    homedir = str(pathlib.Path().home())
    with open(os.path.join(homedir, '.shadhorc'), 'w') as f:
        config.write(f)

def install_shadho_files(prefix, sp_prefix):
    """Setup up additional SHADHO files.

    Parameters
    ----------
    prefix : str
        Install directory of the .shadho directory.
    sp_prefix : str
        Path to the site-packages directory where work_queue was installed.
    """
    maj = sys.version_info.major
    min = sys.version_info.minor
    source = os.path.join(prefix, 'lib', f'python{maj}.{min}', 'site-packages')
    shutil.copy(os.path.join(source, 'work_queue.py'), sp_prefix)
    shutil.copy(os.path.join(source, '_work_queue.so'), sp_prefix)

def main(prefix='~', user=False):
    homedir = str(pathlib.Path().home())

    if '~' in prefix:
        prefix = os.path.expanduser(prefix)

    if prefix == homedir:
        prefix = os.path.join(prefix, '.shadho')

    maj = sys.version_info.major
    min = sys.version_info.minor

    sp_prefix = os.path.join('lib',
                             'python{}.{}'.format(maj, min),
                             'site-packages')

    if not os.path.isfile(os.path.join(prefix, 'work_queue.py')):
        result = install_workqueue(prefix)

    if user:
        sp_prefix = os.path.join(site.USER_BASE, sp_prefix)
    else:
        sp_prefix = os.path.join(sys.prefix, sp_prefix)

    if result is not None:
        install_shadho_files(prefix, sp_prefix)

    write_shadhorc(prefix)

if __name__ == '__main__':
    args = parse_args()
    main(prefix=args.prefix, user=args.user)


text:
package co.navdeep.popmovies.tmdb.model;

import java.util.ArrayList;
import java.util.List;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

public class MovieVideosResponse {

    @SerializedName("id")
    @Expose
    private Integer id;
    @SerializedName("results")
    @Expose
    private List<MovieVideosResult> results = new ArrayList<MovieVideosResult>();

    /**
     *
     * @return
     *     The id
     */
    public Integer getId() {
        return id;
    }

    /**
     *
     * @param id
     *     The id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     *
     * @return
     *     The results
     */
    public List<MovieVideosResult> getResults() {
        return results;
    }

    /**
     *
     * @param results
     *     The results
     */
    public void setResults(List<MovieVideosResult> results) {
        this.results = results;
    }

}


text:
layout: product_category
title: Brennroboter
image: icons/burning-robots.svg
navigation_image: icons/burning-robots.svg
---


text:
#include <string>
#include <cassert>

#include "statementnode.h"
class VariableNode;
class ExpressionNode;

class AssignmentNode : public StatementNode
    {
    public:
        AssignmentNode( VariableNode *v, ExpressionNode *e ) : lhs(v), rhs(e)
            {
            assert( v != NULL );
            assert( e != NULL );
            };
        virtual ~AssignmentNode();
        virtual std::string pretty_print( int indent ) const;
        virtual ASTNode *evaluate( TypeEnvironment *types_env, VariableEnvironment *vars_env );

    private:
        VariableNode *lhs;
        ExpressionNode *rhs;
    } ;

#endif


text:
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace App.Client.Infastructure.ViewModels
{
    public class AdminVm
    {

        public class CreateUser
        {
            [Display(Name = "Email")]
            [Required(ErrorMessage = "Required!", AllowEmptyStrings = false)]
            [EmailAddress]
            public string Email { get; set; }

            [Display(Name = "Password")]
            [Required]
            [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
            [DataType(DataType.Password)]
            public string Password { get; set; }

            [Display(Name = "Confirm password")]
            [DataType(DataType.Password)]
            [System.ComponentModel.DataAnnotations.Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
            public string ConfirmPassword { get; set; }
        }

        public class EditUser
        {
            public string Id { get; set; }

            [Display(Name = "Username")]
            //[Required(ErrorMessage = "Required!", AllowEmptyStrings = false)]
            [EmailAddress]
            public string UserName { get; set; }

            [Display(Name = "Email")]
            //[Required(ErrorMessage = "Required!", AllowEmptyStrings = false)]
            [EmailAddress]
            public string Email { get; set; }

            [Display(Name = "Email Confirmed")]
            public bool EmailConfirmed { get; set; }

            public IEnumerable<SelectListItem> RolesList { get; set; }
        }

        public class ResetUserPassword
        {
            public string Id { get; set; }

            [Display(Name = "Username")]
            public string Username { get; set; }

            [Display(Name = "New Password")]
            [Required(ErrorMessage = "Required!", AllowEmptyStrings = false)]
            [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
            [DataType(DataType.Password)]
            public string NewPassword { get; set; }
        }
    }
}


text:
using System;
using System.ComponentModel.Design;
using System.Drawing;
using System.Reflection;
using System.Windows.Forms;

namespace GuruComponents.Netrix.UserInterface.TypeEditors
{
	/// <summary>
	/// ScriptCollectionEditor lets the user edit script blocks outside the editor using
	/// the PropertyGrid.
	/// </summary>
	/// <remarks>
    /// This editor is used to support the PropertyGrid.
    /// You should not use this class directly from user code as far as you don't write
    /// your own PropertyGrid support.
    /// <para>
	/// This is a <seealso cref="System.ComponentModel.Design.CollectionEditor">
	/// System.ComponentModel.Design.CollectionEditor</seealso> derived class changing some of the
	/// base features via reflection.</para>
	/// </remarks>
	public class ScriptCollectionEditor : CollectionEditor
	{
        /// <summary>
        /// Instantiates the collection editor the first time.
        /// </summary>
        /// <remarks>
        /// This method supports the NetRix infrastructure and should not beeing used from user code.
        /// </remarks>
        /// <param name="type"></param>
        public ScriptCollectionEditor(Type type) : base(type)
        {
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="itemType"></param>
        /// <returns></returns>
        protected override object CreateInstance(Type itemType)
        {
            if (itemType.BaseType.Name.EndsWith("Element"))
            {
                // need to pull the editor to override the default ctor behavior
                IDesignerHost host = this.GetService(typeof(IDesignerHost)) as IDesignerHost;
                IHtmlEditor editor = null;
                if (host != null)
                {
                    editor = host.GetType().GetField("editor", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(host) as IHtmlEditor;
                }
                return Activator.CreateInstance(itemType, editor);
            }
            else
            {
                return base.CreateInstance(itemType);
            }
        }

        /// <summary>
        /// Takes the base collection form and apply some changes.
        /// </summary>
        /// <remarks>
        /// This method uses reflection to change the internal collection editor dialog on-thy-fly.
        /// </remarks>
        /// <returns>The changed form is beeing returned completely.</returns>
        protected override CollectionForm CreateCollectionForm()
        {
            CollectionForm form = base.CreateCollectionForm();
            form.FormBorderStyle = FormBorderStyle.SizableToolWindow;
            form.Text = "<SCRIPT> Editor";
            Type t = form.GetType();
            // Get the private variables via Reflection and change whatever we need to change...
            FieldInfo fieldInfo;
			fieldInfo = t.GetField("listbox", BindingFlags.NonPublic | BindingFlags.Instance);
			if (fieldInfo != null)
			{
				ListBox lb = (ListBox) fieldInfo.GetValue(form);
				if (lb != null)
				{
					lb.Width += 45;
					lb.Height += 35;
				}
			}
			fieldInfo = t.GetField("propertyBrowser", BindingFlags.NonPublic | BindingFlags.Instance);
            if (fieldInfo != null)
            {
                PropertyGrid propertyGrid = (PropertyGrid) fieldInfo.GetValue(form);
                if (propertyGrid != null)
                {
                    propertyGrid.ToolbarVisible = false;
                    propertyGrid.HelpVisible = true;
                }
            }
            fieldInfo = t.GetField("upButton", BindingFlags.NonPublic | BindingFlags.Instance);
            if (fieldInfo != null)
            {
                Button upButton = (Button) fieldInfo.GetValue(form);
                upButton.Visible = false;
            }
            fieldInfo = t.GetField("downButton", BindingFlags.NonPublic | BindingFlags.Instance);
            if (fieldInfo != null)
            {
                Button downButton = (Button) fieldInfo.GetValue(form);
                downButton.Visible = false;
            }
            fieldInfo = t.GetField("addButton", BindingFlags.NonPublic | BindingFlags.Instance);
            if (fieldInfo != null)
            {
                Button addButton = (Button) fieldInfo.GetValue(form);
                addButton.Visible = false;
            }
            fieldInfo = t.GetField("removeButton", BindingFlags.NonPublic | BindingFlags.Instance);
            if (fieldInfo != null)
            {
                Button removeButton = (Button) fieldInfo.GetValue(form);
                removeButton.Visible = false;
            }
            fieldInfo = t.GetField("helpButton", BindingFlags.NonPublic | BindingFlags.Instance);
            if (fieldInfo != null)
            {
                Button helpButton = (Button) fieldInfo.GetValue(form);
                helpButton.Visible = false;
            }
			fieldInfo = t.GetField("okButton", BindingFlags.NonPublic | BindingFlags.Instance);
			if (fieldInfo != null)
			{
				Button okButton = (Button) fieldInfo.GetValue(form);
				okButton.Left += okButton.Width + 3;
                okButton.FlatStyle = FlatStyle.System;
			}
			fieldInfo = t.GetField("cancelButton", BindingFlags.NonPublic | BindingFlags.Instance);
			if (fieldInfo != null)
			{
				Button cancelButton = (Button) fieldInfo.GetValue(form);
				cancelButton.Left += cancelButton.Width + 3;
                cancelButton.FlatStyle = FlatStyle.System;
			}
			Label memberLabel = new Label();
            memberLabel.Text = ResourceManager.GetString("ScriptCollectionEditor.memberLabel.Text");
            memberLabel.Location = new Point(10, 8);
            memberLabel.Size = new Size(200, 15);
            form.Controls.Add(memberLabel);
            memberLabel.BringToFront();
            return form;
        }

        /// <summary>
        /// Prohibits the removing of instances.
        /// </summary>
        /// <remarks>
        /// The purpose of this method is to avoid the user from removing script blocks using the collection editor.
        /// This is necessary because the user cannot recognize the real position of the script fragment within the
        /// HTML page using this editor. Removing and adding can cause scripting errors because JavaScript and VBScript
        /// fragments depends on their position of the page.
        /// <para>
        /// It is recommended to replace the script editing features with a more sophisticated solution based on the DOM
        /// instead of using this editor in a real life environment. The purpose of this editor is to have an fast and simple
        /// access to the script fragments on the page without any programming tasks required.
        /// </para>
        /// </remarks>
        /// <param name="value">The current value. Not beeing used here.</param>
        /// <returns>Returns always <c>false</c> to prohibit instance removing.</returns>
        protected override bool CanRemoveInstance(object value)
        {
            return false;
        }

        /// <summary>
        /// Prohibits the selection of multiple instances.
        /// </summary>
        /// <remarks>
        /// It is not allowed to edit multiple instances of the script editor at the same time.
        /// </remarks>
        /// <returns></returns>
        protected override bool CanSelectMultipleInstances()
        {
            return false;
        }

	}
}


text:
package com.zepp.www.musicplayer.widget;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.drawable.Animatable;
import android.util.AttributeSet;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.LinearInterpolator;
import android.widget.ImageView;
import com.zepp.www.musicplayer.R;

/**
 * Created by xubinggui on 7/18/16.
 * //                            _ooOoo_
 * //                           o8888888o
 * //                           88" . "88
 * //                           (| -_- |)
 * //                            O\ = /O
 * //                        ____/`---'\____
 * //                      .   ' \\| |// `.
 * //                       / \\||| : |||// \
 * //                     / _||||| -:- |||||- \
 * //                       | | \\\ - /// | |
 * //                     | \_| ''\---/'' | |
 * //                      \ .-\__ `-` ___/-. /
 * //                   ___`. .' /--.--\ `. . __
 * //                ."" '< `.___\_<|>_/___.' >'"".
 * //               | | : `- \`.;`\ _ /`;.`/ - ` : | |
 * //                 \ \ `-. \_ __\ /__ _/ .-` / /
 * //         ======`-.____`-.___\_____/___.-`____.-'======
 * //                            `=---='
 * //
 * //         .............................................
 * //                  佛祖镇楼                  BUG辟易
 */
public class CoverView extends ImageView implements Animatable {
    public static final int SHAPE_RECTANGLE = 0;
    public static final int SHAPE_CIRCLE = 1;
    public static final int TACK_ALPHA_TRANSPARENT = 0;
    public static final int TACK_ALPHA_OPAQUE = 255;

    private static final float TRACK_SIZE = 10;
    private static final float TRACK_WIDTH = 1;
    private static final int TRACK_COLOR = Color.parseColor("#56FFFFFF");

    private static final float FULL_ANGLE = 360;
    private static final float HALF_ANGLE = FULL_ANGLE / 2;
    private static final int DURATION = 3000;
    private static final float DURATION_PER_DEGREES = DURATION / FULL_ANGLE;

    private final ValueAnimator mStartAnimator;
    private final int mTrackAlpha;
    private final float mTrackSize;
    private final Paint mTrackPaint;
    private final Path mClipPath = new Path();
    private final Path mRectPath = new Path();
    private final Path mTrackPath = new Path();
    private ValueAnimator mEndAnimator;
    private float mRadius = 0;
    private int mShape = SHAPE_RECTANGLE;

    private Callbacks mCallbacks;

    public CoverView(Context context) {
        this(context, null, 0);
    }

    public CoverView(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public CoverView(Context context, AttributeSet attrs, final int defStyleAttr) {
        super(context, attrs, defStyleAttr);

        final float density = getResources().getDisplayMetrics().density;
        mTrackAlpha = Color.alpha(TRACK_COLOR);
        mTrackSize = TRACK_SIZE * density;
        mTrackPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
        mTrackPaint.setStyle(Paint.Style.STROKE);
        mTrackPaint.setStrokeWidth(TRACK_WIDTH * density);
        mTrackPaint.setColor(TRACK_COLOR);

        mStartAnimator = ObjectAnimator.ofFloat(this, View.ROTATION, 0, FULL_ANGLE);
        mStartAnimator.setInterpolator(new LinearInterpolator());
        mStartAnimator.setRepeatCount(Animation.INFINITE);
        mStartAnimator.setDuration(DURATION);
        mStartAnimator.addListener(new AnimatorListenerAdapter() {
            @Override
            public void onAnimationCancel(Animator animation) {
                float current = getRotation();
                float target = current > HALF_ANGLE ? FULL_ANGLE : 0; // Choose the shortest distance to 0 rotation
                float diff = target > 0 ? FULL_ANGLE - current : current;
                mEndAnimator = ObjectAnimator.ofFloat(CoverView.this, View.ROTATION, current, target);
                mEndAnimator.setInterpolator(new LinearInterpolator());
                mEndAnimator.setDuration((int) (DURATION_PER_DEGREES * diff));
                mEndAnimator.addListener(new AnimatorListenerAdapter() {
                    @Override
                    public void onAnimationEnd(Animator animation) {
                        setRotation(0);
                        if (mCallbacks != null) {
                            mCallbacks.onStopAnimation();
                        }
                    }
                });
                mEndAnimator.start();
            }
        });

        TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.CoverView);
        int shape = a.getInt(R.styleable.CoverView_shape, SHAPE_RECTANGLE);
        int alpha = a.getInt(R.styleable.CoverView_trackAlpha, TACK_ALPHA_TRANSPARENT);
        mShape = shape;
        mTrackPaint.setAlpha(alpha * mTrackAlpha / TACK_ALPHA_OPAQUE);
        a.recycle();
    }

    public void setShape(int shape) {
        if (shape != mShape) {
            mShape = shape;
            // Invalidate the radius value
            mRadius = 0;
        }
    }

    public float getTransitionRadius() {
        return mRadius;
    }

    public void setTransitionRadius(float radius) {
        if (radius != mRadius) {
            mRadius = radius;
            final int w = getWidth();
            final int h = getHeight();
            final float centerX = w / 2f;
            final float centerY = h / 2f;
            mClipPath.reset();
            mClipPath.addCircle(centerX, centerY, mRadius, Path.Direction.CW);
            invalidate();
        }
    }

    public int getTrackAlpha() {
        return mTrackPaint.getAlpha() * TACK_ALPHA_OPAQUE / mTrackAlpha;
    }

    public void setTrackAlpha(int alpha) {
        if (alpha != getTrackAlpha()) {
            mTrackPaint.setAlpha(alpha * mTrackAlpha / TACK_ALPHA_OPAQUE);
            invalidate();
        }
    }

    public float getMinRadius() {
        final int w = getMeasuredWidth();
        final int h = getMeasuredHeight();
        return Math.min(w, h) / 2f;
    }

    public float getMaxRadius() {
        final int w = getMeasuredWidth();
        final int h = getMeasuredHeight();
        return (float) Math.hypot(w / 2f, h / 2f);
    }

    public void setCallbacks(Callbacks callbacks) {
        mCallbacks = callbacks;
    }

    @Override
    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
        super.onSizeChanged(w, h, oldw, oldh);

        mRectPath.reset();
        mRectPath.addRect(0, 0, w, h, Path.Direction.CW);

        final float centerX = w / 2f;
        final float centerY = h / 2f;

        if (mRadius == 0) {
            if (SHAPE_CIRCLE == mShape) {
                mRadius = getMinRadius();
            } else {
                mRadius = getMaxRadius();
            }
        }

        mClipPath.reset();
        mClipPath.addCircle(centerX, centerY, mRadius, Path.Direction.CW);

        final int trackRadius = Math.min(w, h);
        final int trackCount = (int) (trackRadius / mTrackSize);
        mTrackPath.reset();
        for (int i = 1; i < trackCount - 2; i++) {
            mTrackPath.addCircle(centerX, centerY, trackRadius * (i / (float) trackCount), Path.Direction.CW);
        }
        if (!isInEditMode()) {
            mTrackPath.op(mRectPath, Path.Op.INTERSECT);
        }

    }

    @Override
    public void draw(Canvas canvas) {
        // Clip before any draw operation
        canvas.clipPath(mClipPath);
        super.draw(canvas);
    }

    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        canvas.drawPath(mTrackPath, mTrackPaint);
    }

    @Override
    public void start() {
        mStartAnimator.start();
    }

    @Override
    public void stop() {
        if (isRunning()) {
            mStartAnimator.cancel();
        } else {
            if (mCallbacks != null) {
                mCallbacks.onStopAnimation();
            }
        }
    }

    @Override
    public boolean isRunning() {
        return mStartAnimator.isRunning()
                || (mEndAnimator != null && mEndAnimator.isRunning());
    }

    public interface Callbacks {
        void onStopAnimation();
    }
}


text:
// Orfeas Eleftheriou 2016

#pragma once

#include "Components/ActorComponent.h"
#include "Public/Character/MainCharacter.h"
#include "Public/HUDs/MainCharacterHUD.h"
#include "CharacterRaycastComponent.generated.h"

UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class PROJECTNA_API UCharacterRaycastComponent : public UActorComponent
{
	GENERATED_BODY()

private:
	/** Main Character Reference */
	AMainCharacter* MainCharRef;

	/** The actor that the camera is currently pointing to */
	AActor* SeeingActor;

	/** HUD Reference */
	AMainCharacterHUD* HUDRef;

	/** Performs a line raycast to find any usable items in the direction the player is looking */
	void SearchForUsableItems();

public:
	// Sets default values for this component's properties
	UCharacterRaycastComponent();

	// Called when the game starts
	virtual void BeginPlay() override;

	// Called every frame
	virtual void TickComponent( float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction ) override;

	/** Returns the SeeingActor from the performed raycast */
	FORCEINLINE AActor* GetSeeingActor() { return SeeingActor; }

	/** Sets a new HUD reference */
	inline void SetHUDReference(AHUD* HUD) { HUDRef = Cast<AMainCharacterHUD>(HUD); }

protected:

	/** The length (in units) that the raycast is performed */
	UPROPERTY(EditAnywhere)
	float RaycastLength = 200.f;

	/** True if you want a visual representation of the performed raycast in the viewport */
	UPROPERTY(EditAnywhere)
	bool bVisualizeRaycast = false;

};


text:
PLEASE NOTE: This document applies to the HEAD of the source tree

If you are using a released version of Kubernetes, you should
refer to the docs that go with that version.

The latest release of this document can be found
[here](http://releases.k8s.io/release-1.2/examples/elasticsearch/README.md).

Documentation for other releases can be found at
[releases.k8s.io](http://releases.k8s.io).

--

# Elasticsearch for Kubernetes

Kubernetes makes it trivial for anyone to easily build and scale [Elasticsearch](http://www.elasticsearch.org/) clusters. Here, you'll find how to do so.
Current Elasticsearch version is `1.7.1`.

[A more robust example that follows Elasticsearch best-practices of separating nodes concern is also available](production_cluster/README.md).

 Current pod descriptors use an `emptyDir` for storing data in each data node container. This is meant to be for the sake of simplicity and [should be adapted according to your storage needs](../../docs/design/persistent-storage.md).

## Docker image

This example uses [this pre-built image](https://github.com/pires/docker-elasticsearch-kubernetes) will not be supported. Feel free to fork to fit your own needs, but mind yourself that you will need to change Kubernetes descriptors accordingly.

## Deploy

Let's kickstart our cluster with 1 instance of Elasticsearch.

```
kubectl create -f examples/elasticsearch/service-account.yaml
kubectl create -f examples/elasticsearch/es-svc.yaml
kubectl create -f examples/elasticsearch/es-rc.yaml
```

Let's see if it worked:

```
$ kubectl get pods
NAME             READY     STATUS    RESTARTS   AGE
es-kfymw         1/1       Running   0          7m
kube-dns-p3v1u   3/3       Running   0          19m
```

```
$ kubectl logs es-kfymw
log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.DailyRollingFileAppender.
log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.DailyRollingFileAppender.
log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.DailyRollingFileAppender.
[2015-08-30 10:01:31,946][INFO ][node                     ] [Hammerhead] version[1.7.1], pid[7], build[b88f43f/2015-07-29T09:54:16Z]
[2015-08-30 10:01:31,946][INFO ][node                     ] [Hammerhead] initializing ...
[2015-08-30 10:01:32,110][INFO ][plugins                  ] [Hammerhead] loaded [cloud-kubernetes], sites []
[2015-08-30 10:01:32,153][INFO ][env                      ] [Hammerhead] using [1] data paths, mounts [[/data (/dev/sda9)]], net usable_space [14.4gb], net total_space [15.5gb], types [ext4]
[2015-08-30 10:01:37,188][INFO ][node                     ] [Hammerhead] initialized
[2015-08-30 10:01:37,189][INFO ][node                     ] [Hammerhead] starting ...
[2015-08-30 10:01:37,499][INFO ][transport                ] [Hammerhead] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/10.244.48.2:9300]}
[2015-08-30 10:01:37,550][INFO ][discovery                ] [Hammerhead] myesdb/n2-6uu_UT3W5XNrjyqBPiA
[2015-08-30 10:01:43,966][INFO ][cluster.service          ] [Hammerhead] new_master [Hammerhead][n2-6uu_UT3W5XNrjyqBPiA][es-kfymw][inet[/10.244.48.2:9300]]{master=true}, reason: zen-disco-join (elected_as_master)
[2015-08-30 10:01:44,010][INFO ][http                     ] [Hammerhead] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/10.244.48.2:9200]}
[2015-08-30 10:01:44,011][INFO ][node                     ] [Hammerhead] started
[2015-08-30 10:01:44,042][INFO ][gateway                  ] [Hammerhead] recovered [0] indices into cluster_state
```

So we have a 1-node Elasticsearch cluster ready to handle some work.

## Scale

Scaling is as easy as:

```
kubectl scale --replicas=3 rc es
```

Did it work?

```
$ kubectl get pods
NAME             READY     STATUS    RESTARTS   AGE
es-78e0s         1/1       Running   0          8m
es-kfymw         1/1       Running   0          17m
es-rjmer         1/1       Running   0          8m
kube-dns-p3v1u   3/3       Running   0          30m
```

Let's take a look at logs:

```
$ kubectl logs es-kfymw
log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.DailyRollingFileAppender.
log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.DailyRollingFileAppender.
log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.DailyRollingFileAppender.
[2015-08-30 10:01:31,946][INFO ][node                     ] [Hammerhead] version[1.7.1], pid[7], build[b88f43f/2015-07-29T09:54:16Z]
[2015-08-30 10:01:31,946][INFO ][node                     ] [Hammerhead] initializing ...
[2015-08-30 10:01:32,110][INFO ][plugins                  ] [Hammerhead] loaded [cloud-kubernetes], sites []
[2015-08-30 10:01:32,153][INFO ][env                      ] [Hammerhead] using [1] data paths, mounts [[/data (/dev/sda9)]], net usable_space [14.4gb], net total_space [15.5gb], types [ext4]
[2015-08-30 10:01:37,188][INFO ][node                     ] [Hammerhead] initialized
[2015-08-30 10:01:37,189][INFO ][node                     ] [Hammerhead] starting ...
[2015-08-30 10:01:37,499][INFO ][transport                ] [Hammerhead] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/10.244.48.2:9300]}
[2015-08-30 10:01:37,550][INFO ][discovery                ] [Hammerhead] myesdb/n2-6uu_UT3W5XNrjyqBPiA
[2015-08-30 10:01:43,966][INFO ][cluster.service          ] [Hammerhead] new_master [Hammerhead][n2-6uu_UT3W5XNrjyqBPiA][es-kfymw][inet[/10.244.48.2:9300]]{master=true}, reason: zen-disco-join (elected_as_master)
[2015-08-30 10:01:44,010][INFO ][http                     ] [Hammerhead] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/10.244.48.2:9200]}
[2015-08-30 10:01:44,011][INFO ][node                     ] [Hammerhead] started
[2015-08-30 10:01:44,042][INFO ][gateway                  ] [Hammerhead] recovered [0] indices into cluster_state
[2015-08-30 10:08:02,517][INFO ][cluster.service          ] [Hammerhead] added {[Tenpin][2gv5MiwhRiOSsrTOF3DhuA][es-78e0s][inet[/10.244.54.4:9300]]{master=true},}, reason: zen-disco-receive(join from node[[Tenpin][2gv5MiwhRiOSsrTOF3DhuA][es-78e0s][inet[/10.244.54.4:9300]]{master=true}])
[2015-08-30 10:10:10,645][INFO ][cluster.service          ] [Hammerhead] added {[Evilhawk][ziTq2PzYRJys43rNL2tbyg][es-rjmer][inet[/10.244.33.3:9300]]{master=true},}, reason: zen-disco-receive(join from node[[Evilhawk][ziTq2PzYRJys43rNL2tbyg][es-rjmer][inet[/10.244.33.3:9300]]{master=true}])
```

So we have a 3-node Elasticsearch cluster ready to handle more work.

## Access the service

*Don't forget* that services in Kubernetes are only acessible from containers in the cluster. For different behavior you should [configure the creation of an external load-balancer](http://kubernetes.io/v1.0/docs/user-guide/services.html#type-loadbalancer). While it's supported within this example service descriptor, its usage is out of scope of this document, for now.

```
$ kubectl get service elasticsearch
NAME            LABELS                    SELECTOR                  IP(S)           PORT(S)
elasticsearch   component=elasticsearch   component=elasticsearch   10.100.108.94   9200/TCP
                                                                                9300/TCP
```

From any host on your cluster (that's running `kube-proxy`), run:

```
$ curl 10.100.108.94:9200
```

You should see something similar to the following:

```json
{
  "status" : 200,
  "name" : "Hammerhead",
  "cluster_name" : "myesdb",
  "version" : {
    "number" : "1.7.1",
    "build_hash" : "b88f43fc40b0bcd7f173a1f9ee2e97816de80b19",
    "build_timestamp" : "2015-07-29T09:54:16Z",
    "build_snapshot" : false,
    "lucene_version" : "4.10.4"
  },
  "tagline" : "You Know, for Search"
}
```

Or if you want to check cluster information:

```
curl 10.100.108.94:9200/_cluster/health?pretty
```

You should see something similar to the following:

```json
{
  "cluster_name" : "myesdb",
  "status" : "green",
  "timed_out" : false,
  "number_of_nodes" : 3,
  "number_of_data_nodes" : 3,
  "active_primary_shards" : 0,
  "active_shards" : 0,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 0,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0
}
```

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/examples/elasticsearch/README.md?pixel)]()