text:
package org.heaven7.core.view;

import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.view.ViewTreeObserver;
import android.widget.EditText;

import static android.graphics.Paint.ANTI_ALIAS_FLAG;

/*
 * usage like this:
 *
 * <p>
 <com.yyh.singcat.view.PasswordInputView
 android:id="@+id/password_input_view"
 android:layout_width="match_parent"
 android:layout_height="56dp"
 android:layout_marginLeft="5dp"
 android:layout_marginRight="5dp"
 android:layout_marginTop="20dp"
 android:inputType="number"
 android:cursorVisible="false"
 android:padding="0dp"
 android:maxLength="6"
 app:piv_borderRadius="@dimen/custom_ev_border_radius"
 app:piv_borderWidth="0.5dp"
 app:piv_passwordLength="6"
 app:piv_passwordColor="@color/mublack"
 app:piv_passwordWidth="@dimen/custom_ev_password_width"
 />
 </p>
 */
public class PasswordInputView extends EditText {

    private int textLength;

    private int borderColor;
    private float borderWidth;
    private float borderRadius;

    public  boolean isClear;

    private int passwordLength;
    private int passwordColor;
    private int passwordColorTwo;
    private float passwordWidth;
    private float passwordRadius;

    private Paint passwordPaint = new Paint(ANTI_ALIAS_FLAG);
    private Paint passwortwodPaint = new Paint(ANTI_ALIAS_FLAG);
    private Paint borderPaint = new Paint(ANTI_ALIAS_FLAG);

    private final int defaultContMargin = 2;
    private final int defaultSplitLineWidth = 2;

    private final RectF mBorderRect = new RectF();
    private final RectF mContentRect = new RectF();

    public PasswordInputView(Context context, AttributeSet attrs) {
        super(context, attrs);
        final Resources res = getResources();

        final int defaultBorderColor = res.getColor(R.color.piv_default_border_color);
        final int defaultPasswordColor = res.getColor(R.color.piv_default_password_color);

        final float defaultBorderWidth = res.getDimension(R.dimen.piv_default_border_width);
        final float defaultBorderRadius = res.getDimension(R.dimen.piv_default_border_radius);
        final int defaultPasswordLength = res.getInteger(R.integer.piv_default_password_length);
        final float defaultPasswordWidth = res.getDimension(R.dimen.piv_default_password_width);
        final float defaultPasswordRadius = res.getDimension(R.dimen.piv_default_password_radius);

        TypedArray a = context.getTheme().obtainStyledAttributes(attrs, R.styleable.PasswordInputView, 0, 0);
        try {
           //passwordColorTwo = getResources().getColor(R.color.white_two);
            borderColor = a.getColor(R.styleable.PasswordInputView_piv_borderColor, defaultBorderColor);
            borderWidth = a.getDimension(R.styleable.PasswordInputView_piv_borderWidth, defaultBorderWidth);
            borderRadius = a.getDimension(R.styleable.PasswordInputView_piv_borderRadius, defaultBorderRadius);
            passwordLength = a.getInt(R.styleable.PasswordInputView_piv_passwordLength, defaultPasswordLength);
            passwordColor = a.getColor(R.styleable.PasswordInputView_piv_passwordColor, defaultPasswordColor);
            passwordColorTwo = a.getColor(R.styleable.PasswordInputView_piv_passwordColor2, defaultPasswordColor);
            passwordWidth = a.getDimension(R.styleable.PasswordInputView_piv_passwordWidth, defaultPasswordWidth);
            passwordRadius = a.getDimension(R.styleable.PasswordInputView_piv_passwordRadius, defaultPasswordRadius);
        } finally {
            a.recycle();
        }

        borderPaint.setStrokeWidth(defaultSplitLineWidth);
        borderPaint.setColor(borderColor);
        passwordPaint.setStrokeWidth(passwordWidth);
        passwordPaint.setStyle(Paint.Style.FILL);
        passwordPaint.setColor(passwordColor);

        passwortwodPaint.setStrokeWidth(passwordWidth);
        passwortwodPaint.setStyle(Paint.Style.FILL);
        passwortwodPaint.setColor(passwordColorTwo);

        getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
            @Override
            public boolean onPreDraw() {
                final int width = getWidth();
                final int height = getHeight();
                mBorderRect.set(0,0, width,height);
                mContentRect.set(mBorderRect.left + defaultContMargin, mBorderRect.top + defaultContMargin,
                        mBorderRect.right - defaultContMargin, mBorderRect.bottom - defaultContMargin);
                getViewTreeObserver().removeOnPreDrawListener(this);
                return true;
            }
        });
    }

    @Override
    protected void onDraw(Canvas canvas) {
        int width = getWidth();
        int height = getHeight();

        // 外边框
        borderPaint.setColor(borderColor);
        canvas.drawRoundRect(mBorderRect, borderRadius, borderRadius, borderPaint);

        // 内容区
        borderPaint.setColor(Color.WHITE);
        canvas.drawRoundRect(mContentRect, borderRadius, borderRadius, borderPaint);

        // 分割线
        borderPaint.setColor(borderColor);
        borderPaint.setStrokeWidth(defaultSplitLineWidth);
        for (int i = 1; i < passwordLength; i++) {
            float x = width * i / passwordLength;
            canvas.drawLine(x, 0, x, height, borderPaint);
        }

        if(isClear){
            // 密码
            float cx, cy = height / 2;
            float half = width / passwordLength / 2;
            for (int i = 0; i < passwordLength; i++) {
                cx = width * i / passwordLength + half;
                canvas.drawCircle(cx, cy, passwordWidth, passwortwodPaint);
            }
            isClear = false;
        }else {
            // 密码
            float cx, cy = height / 2;
            float half = width / passwordLength / 2;
            for (int i = 0; i < textLength; i++) {
                cx = width * i / passwordLength + half;
                canvas.drawCircle(cx, cy, passwordWidth, passwordPaint);
            }
        }
    }

    @Override
    protected void onTextChanged(CharSequence text, int start, int lengthBefore, int lengthAfter) {
        super.onTextChanged(text, start, lengthBefore, lengthAfter);
        this.textLength = text.toString().length();
        invalidate();
    }

    public int getBorderColor() {
        return borderColor;
    }

    public void setBorderColor(int borderColor) {
        this.borderColor = borderColor;
        borderPaint.setColor(borderColor);
        invalidate();
    }

    public float getBorderWidth() {
        return borderWidth;
    }

    public void setBorderWidth(float borderWidth) {
        this.borderWidth = borderWidth;
        borderPaint.setStrokeWidth(defaultSplitLineWidth);
        invalidate();
    }

    public float getBorderRadius() {
        return borderRadius;
    }

    public void setBorderRadius(float borderRadius) {
        this.borderRadius = borderRadius;
        invalidate();
    }

    public int getPasswordLength() {
        return passwordLength;
    }

    public void setPasswordLength(int passwordLength) {
        this.passwordLength = passwordLength;
        invalidate();
    }

    public int getPasswordColor() {
        return passwordColor;
    }

    public void setPasswordColor(int passwordColor) {
        this.passwordColor = passwordColor;
        passwordPaint.setColor(passwordColor);
        invalidate();
    }

    public float getPasswordWidth() {
        return passwordWidth;
    }

    public void setPasswordWidth(float passwordWidth) {
        this.passwordWidth = passwordWidth;
        passwordPaint.setStrokeWidth(passwordWidth);
        invalidate();
    }

    public float getPasswordRadius() {
        return passwordRadius;
    }

    public void setPasswordRadius(float passwordRadius) {
        this.passwordRadius = passwordRadius;
        invalidate();
    }

    public void setTextLength(int textLength) {
        this.textLength = textLength;
    }

    public void setIsClear(boolean isClear) {
        this.isClear = isClear;
    }
}


text:
(function(){
  'use strict';

  angular.module('platanus.prettyLoad', [])

})();

redpajama_set_name: RedPajamaGithub


text:
/** # Parallel

Wrapper for standard web workers, that includes bootstraping and a future oriented interface.
*/
var Parallel = exports.Parallel = declare({
	/** The constructor may take a worker instance to deal with. If not given, a new worker is build
	using `newWorker()`. If given, it must be properly initialized.
	*/
	constructor: function Parallel(worker) {
		if (!worker) {
			worker = Parallel.newWorker();
		}
		worker.onmessage = this.__onmessage__.bind(this);
		this.worker = worker;
	},

	/** `newWorker()` builds a new web worker. Loading `creatartis-base` in its environment. Sets up
	a message handler that evaluates posted messages as code, posting the results back.
	*/
	"static newWorker": function newWorker() {
		var src = 'self.base = ('+ exports.__init__ +')();'+
				'self.onmessage = ('+ (function (msg) {
					try {
						self.base.Future.when(eval(msg.data)).then(function (result) {
							self.postMessage(JSON.stringify({ result: result }));
						});
					} catch (err) {
						self.postMessage(JSON.stringify({ error: err +'' }));
					}
				}) +');',
			blob = new Blob([src], { type: 'text/javascript' });
		return new Worker(URL.createObjectURL(blob));
	},

	/** The handler for the `worker.onmessage` event is the `__onmessage__(msg)` method. It deals
	with the futures issued by `run()`.
	*/
	__onmessage__: function __onmessage__(msg) {
		var future = this.__future__;
		if (future) {
			this.__future__ = null;
			try {
				var data = JSON.parse(msg.data);
				if (data.error) {
					future.reject(data.error);
				} else {
					future.resolve(data.result);
				}
			} catch (err) {
				future.reject(err);
			}
		}
	},

	/** `run(code)` sends the code to run in the web worker in parallel.

	Warning! This method will raise an error if it is called while a previous execution is still
	running.
	*/
	run: function run(code) {
		if (this.__future__) {
			throw new Error('Worker is working!');
		}
		this.__future__ = new Future();
		this.worker.postMessage(code +'');
		return this.__future__;
	},

	/** A _"static"_ version of `run(code)` is provided also. It creates a web worker to run this
	code in parallel, and returns a future for its result. After its finished the web worker is
	terminated.
	*/
	"static run": function run(code) {
		var parallel = new Parallel();
		return parallel.run(code).always(function () {
			parallel.worker.terminate();
		});
	},

	/** The method `importScripts` runs the same call in the worker.
	*/
	importScripts: function importScripts() {
		return this.run('importScripts('+
			Array.prototype.slice.call(arguments).map(JSON.stringify).join(',') +');');
	},

	/** `loadModule` loads a module in the worker. The module has to have a `__name__`, an
	`__init__` function that builds the module and a `__dependencies__` array of modules.
	*/
	loadModule: function loadModule(module, recursive) {
		var parallel = this;
		return Future.sequence(recursive ? module.__dependencies__ : [], function (dep) {
			return parallel.loadModule(dep, recursive);
		}).then(function () {
			return parallel.run('self.'+ module.__name__ +' || (self.'+ module.__name__ +'=('+
				module.__init__ +')('+ 	module.__dependencies__.map(function (dep) {
					return dep.__name__;
				}).join(',') +')), "OK"'
			);
		});
	},

	/** `consoleLog` is a version of `run` that logs the resulting value in the `console`. It is
	useful for testing.
	*/
	consoleLog: function consoleLog(code) {
		var f = this.run(code);
		f.done(console.log);
		return f;
	}
}); // declare Parallel.


text:
@class Milestone;

@interface MilestoneCache : NSObject
{
    // maps milestone number <-> milestone
    NSMutableDictionary * milestoneMappings;

    // maps milestone number <-> project key
    NSMutableDictionary * projectMappings;
}

#pragma mark Instantiation and initialization

+ (id)cache;

#pragma mark Initialization

- (id)init;

#pragma mark Milestone objects

- (void)setMilestone:(id)milestone forKey:(id)milestoneKey;
- (id)milestoneForKey:(id)milestoneKey;
- (NSDictionary *)allMilestones;

#pragma mark Project mappings

- (void)setProjectKey:(id)projectKey forKey:(id)milestoneKey;
- (id)projectKeyForKey:(id)milestoneKey;
- (NSDictionary *)allProjectMappings;

#pragma mark Clearing the cache

- (void)clear;
- (void)removeMilestonesForProjectKey:(id)key;

@end


text:
namespace Gu.Units
{
    using System;
    using System.ComponentModel;

    /// <summary>
    /// A type for the unit <see cref="Gu.Units.AreaDensity"/>.
    /// Contains logic for conversion and formatting.
    /// </summary>
    [Serializable]
    [TypeConverter(typeof(AreaDensityUnitTypeConverter))]
    public struct AreaDensityUnit : IUnit, IUnit<AreaDensity>, IEquatable<AreaDensityUnit>
    {
        /// <summary>
        /// The KilogramsPerSquareMetre unit
        /// Contains logic for conversion and formatting.
        /// </summary>
        public static readonly AreaDensityUnit KilogramsPerSquareMetre = new AreaDensityUnit(kilogramsPerSquareMetre => kilogramsPerSquareMetre, kilogramsPerSquareMetre => kilogramsPerSquareMetre, "kg/m²");

#pragma warning disable SA1307 // Accessible fields must begin with upper-case letter
#pragma warning disable SA1304 // Non-private readonly fields must begin with upper-case letter
        /// <summary>
        /// Gets the symbol for the <see cref="Gu.Units.AreaDensityUnit"/>.
        /// </summary>
        internal readonly string symbol;
#pragma warning restore SA1304 // Non-private readonly fields must begin with upper-case letter
#pragma warning restore SA1307 // Accessible fields must begin with upper-case letter

        private readonly Func<double, double> toKilogramsPerSquareMetre;
        private readonly Func<double, double> fromKilogramsPerSquareMetre;

        /// <summary>
        /// Initializes a new instance of the <see cref="AreaDensityUnit"/> struct.
        /// </summary>
        /// <param name="toKilogramsPerSquareMetre">The conversion to <see cref="KilogramsPerSquareMetre"/></param>
        /// <param name="fromKilogramsPerSquareMetre">The conversion to <paramref name="symbol"/></param>
        /// <param name="symbol">The symbol for the <see cref="KilogramsPerSquareMetre"/></param>
        public AreaDensityUnit(Func<double, double> toKilogramsPerSquareMetre, Func<double, double> fromKilogramsPerSquareMetre, string symbol)
        {
            this.toKilogramsPerSquareMetre = toKilogramsPerSquareMetre;
            this.fromKilogramsPerSquareMetre = fromKilogramsPerSquareMetre;
            this.symbol = symbol;
        }

        /// <summary>
        /// Gets the symbol for the <see cref="Gu.Units.AreaDensityUnit"/>.
        /// </summary>
        public string Symbol => this.symbol;

        /// <summary>
        /// Gets the default unit for <see cref="Gu.Units.AreaDensityUnit"/>
        /// </summary>
        public AreaDensityUnit SiUnit => KilogramsPerSquareMetre;

        /// <inheritdoc />
        IUnit IUnit.SiUnit => KilogramsPerSquareMetre;

        /// <summary>
        /// Multiplies <paramref name="left"/> with <paramref name="right"/>
        /// </summary>
        /// <param name="left">The left value</param>
        /// <param name="right">The right value</param>
        /// <returns>The <see cref="AreaDensity"/> that is the result from the multiplication.</returns>
        public static AreaDensity operator *(double left, AreaDensityUnit right)
        {
            return AreaDensity.From(left, right);
        }

        /// <summary>
        /// Indicates whether two <see cref="Gu.Units.AreaDensityUnit"/> instances are equal.
        /// </summary>
        /// <returns>
        /// true if the quantitys of <paramref name="left"/> and <paramref name="right"/> are equal; otherwise, false.
        /// </returns>
        /// <param name="left">The left instance of <see cref="Gu.Units.AreaDensityUnit"/>.</param>
        /// <param name="right">The right instance of <see cref="Gu.Units.AreaDensityUnit"/>.</param>
        public static bool operator ==(AreaDensityUnit left, AreaDensityUnit right)
        {
            return left.Equals(right);
        }

        /// <summary>
        /// Indicates whether two <see cref="Gu.Units.AreaDensityUnit"/> instances are not equal.
        /// </summary>
        /// <returns>
        /// true if the quantitys of <paramref name="left"/> and <paramref name="right"/> are not equal; otherwise, false.
        /// </returns>
        /// <param name="left">The left instance of <see cref="Gu.Units.AreaDensityUnit"/>.</param>
        /// <param name="right">The right instance of <see cref="Gu.Units.AreaDensityUnit"/>.</param>
        public static bool operator !=(AreaDensityUnit left, AreaDensityUnit right)
        {
            return !left.Equals(right);
        }

        /// <summary>
        /// Constructs a <see cref="AreaDensityUnit"/> from a string.
        /// Leading and trailing whitespace characters are allowed.
        /// </summary>
        /// <param name="text">The text representation of this unit.</param>
        /// <returns>An instance of <see cref="AreaDensityUnit"/></returns>
        public static AreaDensityUnit Parse(string text)
        {
            return UnitParser<AreaDensityUnit>.Parse(text);
        }

        /// <summary>
        /// Creates an instance of <see cref="Gu.Units.AreaDensityUnit"/> from its string representation
        /// </summary>
        /// <param name="text">The string representation of the <see cref="Gu.Units.AreaDensityUnit"/></param>
        /// <param name="result">The parsed <see cref="AreaDensityUnit"/></param>
        /// <returns>True if an instance of <see cref="AreaDensityUnit"/> could be parsed from <paramref name="text"/></returns>
        public static bool TryParse(string text, out AreaDensityUnit result)
        {
            return UnitParser<AreaDensityUnit>.TryParse(text, out result);
        }

        /// <summary>
        /// Converts <paramref name="value"/> to KilogramsPerSquareMetre.
        /// </summary>
        /// <param name="value">The value in the unit of this instance.</param>
        /// <returns>The converted value</returns>
        public double ToSiUnit(double value)
        {
            return this.toKilogramsPerSquareMetre(value);
        }

        /// <summary>
        /// Converts a value from kilogramsPerSquareMetre.
        /// </summary>
        /// <param name="kilogramsPerSquareMetre">The value in KilogramsPerSquareMetre</param>
        /// <returns>The converted value</returns>
        public double FromSiUnit(double kilogramsPerSquareMetre)
        {
            return this.fromKilogramsPerSquareMetre(kilogramsPerSquareMetre);
        }

        /// <summary>
        /// Creates a quantity with this unit
        /// </summary>
        /// <param name="value">The scalar value"</param>
        /// <returns>new AreaDensity(<paramref name="value"/>, this)</returns>
        public AreaDensity CreateQuantity(double value)
        {
            return new AreaDensity(value, this);
        }

        /// <summary>
        /// Gets the scalar value of <paramref name="quantity"/> in KilogramsPerSquareMetre
        /// </summary>
        /// <param name="quantity">The quanity.</param>
        /// <returns>The SI-unit value.</returns>
        public double GetScalarValue(AreaDensity quantity)
        {
            return this.FromSiUnit(quantity.kilogramsPerSquareMetre);
        }

        /// <inheritdoc />
        public override string ToString()
        {
            return this.symbol;
        }

        /// <summary>
        /// Converts the unit value of this instance to its equivalent string representation.
        /// </summary>
        /// <param name="format">The format to use when convereting</param>
        /// <returns>The string representation of the value of this instance.</returns>
        public string ToString(string format)
        {
            AreaDensityUnit unit;
            var paddedFormat = UnitFormatCache<AreaDensityUnit>.GetOrCreate(format, out unit);
            if (unit != this)
            {
                return format;
            }

            using (var builder = StringBuilderPool.Borrow())
            {
                builder.Append(paddedFormat.PrePadding);
                builder.Append(paddedFormat.Format);
                builder.Append(paddedFormat.PostPadding);
                return builder.ToString();
            }
        }

        /// <summary>
        /// Converts the unit value of this instance to its equivalent string representation.
        /// </summary>
        /// <param name="symbolFormat">Specifies the symbol format to use when creating the string representation.</param>
        /// <returns>The string representation of the value of this instance.</returns>
        public string ToString(SymbolFormat symbolFormat)
        {
            var paddedFormat = UnitFormatCache<AreaDensityUnit>.GetOrCreate(this, symbolFormat);
            using (var builder = StringBuilderPool.Borrow())
            {
                builder.Append(paddedFormat.PrePadding);
                builder.Append(paddedFormat.Format);
                builder.Append(paddedFormat.PostPadding);
                return builder.ToString();
            }
        }

        /// <summary>
        /// Returns a quantity indicating whether this instance is equal to a specified <see cref="Gu.Units.AreaDensityUnit"/> object.
        /// </summary>
        /// <param name="other">An instance of <see cref="Gu.Units.AreaDensityUnit"/> object to compare with this instance.</param>
        /// <returns>
        /// true if <paramref name="other"/> represents the same AreaDensityUnit as this instance; otherwise, false.
        /// </returns>
        public bool Equals(AreaDensityUnit other)
        {
            return this.symbol == other.symbol;
        }

        /// <inheritdoc />
        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj))
            {
                return false;
            }

            return obj is AreaDensityUnit && this.Equals((AreaDensityUnit)obj);
        }

        /// <inheritdoc />
        public override int GetHashCode()
        {
            if (this.symbol == null)
            {
                return 0; // Needed due to default ctor
            }

            return this.symbol.GetHashCode();
        }
    }
}


text:
(function(undefined) {

  pl.extend(ke.ext.util.selectorsUtil, {
    import: [],

    getDashFromId: function(e, n) {
      return e.getAttribute('id').split('-')[n || 0];
    },

    getHistoryItemId: function(e) {
      var id;

      for(var i = 0; i <= 8; ++i) {
        var currentElement = pl(e).parent(i);
        if(currentElement.hasClass('history-item-wrap')) {
          id = currentElement.attr('class').split(' ')[1].split('-')[1];
          break;
        }
      }

      return +id;
    },

    isMainVariantPlaque: function(e) {
      var isPlaque = false;

      for(var i = 0; i <= 3; ++i) {
        var currentElement = pl(e).parent(i);
        if(currentElement.hasClass('main-variant-wrap')) {
          isPlaque = true;
          break;
        }
      }

      return isPlaque;
    },

    getSwitchFlagId: function(e) {
      return +pl(e).attr('class').split(' ')[1].split('-')[3];
    },

    getHistoryOriginalLang: function(e) {
      return pl('.i-' + ke.ext.util.selectorsUtil.getHistoryItemId(e.target)).find('.input-particle').attr('class').split(' ')[2].split('-')[1];
    },

    getHistoryToLang: function(e) {
      return pl('.i-' + ke.ext.util.selectorsUtil.getHistoryItemId(e.target)).find('.main-output-particle').attr('class').split(' ')[2].split('-')[1];
    }
  })

})();


text:
PersonTracker
=============

An app to display and manage detection and tracking algorithm results.

Requeriments
------------

This app needs an OpenGL 3.0 or greater compliant graphic card.


text:
:Date: 3 June 2009
:Author: Anand Patil
:Contact: anand.prabhakar.patil@gmail.com
:Copyright: Anand Patil, 2009.
:License: See LICENSE

Selfless provides stateless, lazy dataflow for Clojure. It separates the dataflow model and the state, so many states can be updated concurrently.

**NOTE**: The 'delay' branch (which you are using) requires the par branch of clojure, available from http://github.com/richhickey/clojure/tree/par. To build it, you'll need Rich Hickey's build of the jsr166 from http://cloud.github.com/downloads/richhickey/clojure/jsr166y.jar on your classpath.

Usage
-----

First, build a dataflow::

    (defn fn2 [a b c d e] [a b c d e])
    (defn fn3 [fn2] (apply + fn2))

    (def flow (add-root {} :fn1))
    (def flow2 (add-node flow :fn2 fn2 [:fn1 17 :fn1 2 5]))
    (def flow3 (add-oblivious flow2 :fn3 fn3 [:fn2]))

The arguments of ``add-node`` and ``add-oblivious`` are ``[flow key fun & [args]]``. The resulting dataflow is a ``{:key node}`` map. Nodes hold functions, parents, children, and timing slots. Timing can be lazy (the default) and oblivious, meaning a node does not do anything in response to parent updates. ``add-root`` is a version of ``add-node`` that assumes the node has no parents & that a value for it must be provided.

Having created the dataflow, you can create functions ``flow3-init``, ``flow3-forget`` and ``flow3-change`` with::

    (def-flosures flow3)

or if you don't want to bind the functions to vars you can create them in a map keyed by ``:init``, ``:forget`` and ``:change`` with::

    (flosures flow3)

Then you can use the ``with-flosures`` macro, which creates a context within which the functions ``init``, ``forget`` and ``change`` are understood to pertain to the given flow::

    (with-flosures (flosures flow3)
        (let
            [init-state (init {:fn1 3})
            init-vals (force-state init-state)
            partial-state (forget init-state :fn2)
            altered-state (change new-state {:fn1 3})]
            [init-state init-vals altered-state]))

Concurrency
-----------

Nodes' values are wrapped in delays. When you force a value, it forces its parents' values, and so on. Evaluations are done concurrently (using ``pmap``) where possible. The ``force-state`` function evaluates the entire state and strips away the delays.


text:
import hjson = require('hjson');

let deserializedObj: any;
let deserializeOptions: hjson.DeserializeOptions;
let serializedObj: string;
let serializeOptions: hjson.SerializeOptions;

deserializeOptions = {};
serializeOptions = {};

deserializedObj = hjson.parse('foo');
deserializedObj = hjson.parse('foo', deserializeOptions);

serializedObj = hjson.stringify({ foo: 'bar' });
serializedObj = hjson.stringify({ foo: 'bar' }, serializeOptions);


text:
package org.edgexfoundry.domain;

import org.edgexfoundry.domain.BACNetAttribute;
import org.edgexfoundry.domain.meta.DeviceObject;

public class BACNetObject extends DeviceObject {

	private BACNetAttribute attributes;

	public BACNetObject(DeviceObject object) {
		this.setName(object.getName());
		this.setTag(object.getTag());
		this.setDescription(object.getDescription());
		this.setProperties(object.getProperties());
		this.setAttributes(new BACNetAttribute(object.getAttributes()));
	}

	@Override
	public BACNetAttribute getAttributes() {
		return attributes;
	}

	public void setAttributes(BACNetAttribute attributes) {
		this.attributes = attributes;
	}

	@Override
	public String toString() {
		return "BACNetObject [ " + super.toString() + ", attributes=" + attributes + "]";
	}

}


text:
/***********************************************************
* Developer: Minhas Kamal (minhaskamal024@gmail.com)       *
* Modification Date: 05-Oct-2016                           *
* License: MIT License                                     *
***********************************************************/

package com.minhaskamal.egami.matrix;

public abstract class MatrixTransformer {

	protected int constant;
	protected double constant2;

	public MatrixTransformer() {
		this(0, 0);
	}

	public MatrixTransformer(int constant) {
		this(constant, 0);
	}

	public MatrixTransformer(int constant, double constant2) {
		this.constant = constant;
		this.constant2 = constant2;
	}

	public Matrix transform(Matrix matrix){
		int rows = matrix.getRows(),
			cols = matrix.getCols(),
			type = matrix.getType();

		Matrix matrix2 = new Matrix(rows, cols, type);
		for(int i=0; i<rows; i++) {
			for(int j=0; j<cols; j++) {
				for(int k=0; k<type; k++){
					matrix2.pixels[i][j][k] = transformFunction(matrix.pixels[i][j][k], i, j, k);
				}
			}
		}

		return matrix2;
	}

	public abstract int transformFunction(int pixel, int rowNo, int colNo, int colorSpaceNo);
}


text:
export default RenderEvent;
declare class RenderEvent extends Event {
    /**
     * @param {import("./EventType.js").default} type Type.
     * @param {import("../transform.js").Transform} [opt_inversePixelTransform] Transform for
     *     CSS pixels to rendered pixels.
     * @param {import("../PluggableMap.js").FrameState} [opt_frameState] Frame state.
     * @param {?(CanvasRenderingContext2D|WebGLRenderingContext)} [opt_context] Context.
     */
    constructor(type: any, opt_inversePixelTransform?: number[] | undefined, opt_frameState?: import("../PluggableMap.js").FrameState | undefined, opt_context?: CanvasRenderingContext2D | WebGLRenderingContext | null | undefined);
    /**
     * Transform from CSS pixels (relative to the top-left corner of the map viewport)
     * to rendered pixels on this event's `context`. Only available when a Canvas renderer is used, null otherwise.
     * @type {import("../transform.js").Transform|undefined}
     * @api
     */
    inversePixelTransform: import("../transform.js").Transform | undefined;
    /**
     * An object representing the current render frame state.
     * @type {import("../PluggableMap.js").FrameState|undefined}
     * @api
     */
    frameState: import("../PluggableMap.js").FrameState | undefined;
    /**
     * Canvas context. Not available when the event is dispatched by the map. For Canvas 2D layers,
     * the context will be the 2D rendering context.  For WebGL layers, the context will be the WebGL
     * context.
     * @type {CanvasRenderingContext2D|WebGLRenderingContext|undefined}
     * @api
     */
    context: CanvasRenderingContext2D | WebGLRenderingContext | undefined;
}
import Event from "../events/Event.js";
//# sourceMappingURL=Event.d.ts.map


text:
package com.github.cxfplus.com.sun.xml.bind.v2.runtime;

import java.io.IOException;

import javax.xml.stream.XMLStreamException;

import com.github.cxfplus.com.sun.istack.NotNull;
import com.github.cxfplus.com.sun.xml.bind.api.AccessorException;

import org.xml.sax.SAXException;

/**
 * Transducer that signals the runtime that this binary data shall be always inlined.
 *
 * @author Kohsuke Kawaguchi
 */
public class InlineBinaryTransducer<V> extends FilterTransducer<V> {
    public InlineBinaryTransducer(Transducer<V> core) {
        super(core);
    }

    @Override
    public @NotNull CharSequence print(@NotNull V o) throws AccessorException {
        XMLSerializer w = XMLSerializer.getInstance();
        boolean old = w.setInlineBinaryFlag(true);
        try {
            return core.print(o);
        } finally {
            w.setInlineBinaryFlag(old);
        }
    }

    @Override
    public void writeText(XMLSerializer w, V o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException {
        boolean old = w.setInlineBinaryFlag(true);
        try {
            core.writeText(w,o,fieldName);
        } finally {
            w.setInlineBinaryFlag(old);
        }
    }

    @Override
    public void writeLeafElement(XMLSerializer w, Name tagName, V o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException {
        boolean old = w.setInlineBinaryFlag(true);
        try {
            core.writeLeafElement(w, tagName, o, fieldName);
        } finally {
            w.setInlineBinaryFlag(old);
        }
    }
}


text:
layout: post
microblog: true
audio:
photo:
date: 2017-07-27 23:03:47 -0700
guid: http://curt.micro.blog/2017/07/28/finally-mccains-actions.html
---
Finally McCain's actions match his rhetoric. ["Senate Rejects Slimmed Down Obamacare Repeal as McCain Votes No"](https://www.nytimes.com/2017/07/27/us/politics/obamacare-partial-repeal-senate-republicans-revolt.html)


text:
using System;
#endregion

namespace RectangleCollision
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main()
        {
            using (RectangleCollisionGame game = new RectangleCollisionGame())
            {
                game.Run();
            }
        }
    }
}


text:
from __future__ import unicode_literals, division, absolute_import
from builtins import *  # noqa pylint: disable=unused-import, redefined-builtin

import logging
from sys import maxsize

from flexget import plugin
from flexget.event import event
from flexget.utils.log import log_once

log = logging.getLogger('content_size')

class FilterContentSize(object):
    schema = {
        'type': 'object',
        'properties': {
            'min': {'type': 'number'},
            'max': {'type': 'number'},
            'strict': {'type': 'boolean', 'default': True},
        },
        'additionalProperties': False,
    }

    def process_entry(self, task, entry, config, remember=True):
        """Rejects this entry if it does not pass content_size requirements. Returns true if the entry was rejected."""
        if 'content_size' in entry:
            size = entry['content_size']
            log.debug('%s size %s MB' % (entry['title'], size))
            # Avoid confusion by printing a reject message to info log, as
            # download plugin has already printed a downloading message.
            if size < config.get('min', 0):
                log_once('Entry `%s` too small, rejecting' % entry['title'], log)
                entry.reject(
                    'minimum size %s MB, got %s MB' % (config['min'], size), remember=remember
                )
                return True
            if size > config.get('max', maxsize):
                log_once('Entry `%s` too big, rejecting' % entry['title'], log)
                entry.reject(
                    'maximum size %s MB, got %s MB' % (config['max'], size), remember=remember
                )
                return True

    @plugin.priority(130)
    def on_task_filter(self, task, config):
        # Do processing on filter phase in case input plugin provided the size
        for entry in task.entries:
            self.process_entry(task, entry, config, remember=False)

    @plugin.priority(150)
    def on_task_modify(self, task, config):
        if task.options.test or task.options.learn:
            log.info(
                'Plugin is partially disabled with --test and --learn because size information may not be '
                'available'
            )
            return

        num_rejected = len(task.rejected)
        for entry in task.accepted:
            if 'content_size' in entry:
                self.process_entry(task, entry, config)
            elif config['strict']:
                log.debug(
                    'Entry %s size is unknown, rejecting because of strict mode (default)'
                    % entry['title']
                )
                log.info('No size information available for %s, rejecting' % entry['title'])
                if 'file' not in entry:
                    entry.reject('no size info available nor file to read it from', remember=True)
                else:
                    entry.reject('no size info available from downloaded file', remember=True)

        if len(task.rejected) > num_rejected:
            # Since we are rejecting after the filter event,
            # re-run this task to see if there is an alternate entry to accept
            task.rerun()

@event('plugin.register')
def register_plugin():
    plugin.register(FilterContentSize, 'content_size', api_ver=2)


text:
package com.ms.square.android.expandabletextview.sample;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.app.ListFragment;
import android.support.v4.view.ViewPager;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.ms.square.android.expandabletextview.ExpandableTextView;
import com.ms.square.android.mymodule.app.R;

/**
 * Demo Activity which demos the features of the ExpandableTextView.
 *
 * @author Manabu-GT
 */
public class DemoActivity extends ActionBarActivity implements ActionBar.TabListener {

    /**
     * The {@link android.support.v4.view.PagerAdapter} that will provide
     * fragments for each of the sections. We use a
     * {@link FragmentPagerAdapter} derivative, which will keep every
     * loaded fragment in memory. If this becomes too memory intensive, it
     * may be best to switch to a
     * {@link android.support.v4.app.FragmentStatePagerAdapter}.
     */
    SectionsPagerAdapter mSectionsPagerAdapter;

    /**
     * The {@link ViewPager} that will host the section contents.
     */
    ViewPager mViewPager;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_demo);

        // Set up the action bar.
        final ActionBar actionBar = getSupportActionBar();
        actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);

        // Create the adapter that will return a fragment for each of the three
        // primary sections of the activity.
        mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());

        // Set up the ViewPager with the sections adapter.
        mViewPager = (ViewPager) findViewById(R.id.pager);
        mViewPager.setAdapter(mSectionsPagerAdapter);

        // When swiping between different sections, select the corresponding
        // tab. We can also use ActionBar.Tab#select() to do this if we have
        // a reference to the Tab.
        mViewPager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {
            @Override
            public void onPageSelected(int position) {
                actionBar.setSelectedNavigationItem(position);
            }
        });

        // For each of the sections in the app, add a tab to the action bar.
        for (int i = 0; i < mSectionsPagerAdapter.getCount(); i++) {
            // Create a tab with text corresponding to the page title defined by
            // the adapter. Also specify this Activity object, which implements
            // the TabListener interface, as the callback (listener) for when
            // this tab is selected.
            actionBar.addTab(
                    actionBar.newTab()
                            .setText(mSectionsPagerAdapter.getPageTitle(i))
                            .setTabListener(this));
        }
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.demo, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();
        if (id == R.id.action_settings) {
            return true;
        }
        return super.onOptionsItemSelected(item);
    }

    @Override
    public void onTabSelected(ActionBar.Tab tab, android.support.v4.app.FragmentTransaction fragmentTransaction) {
        // When the given tab is selected, switch to the corresponding page in
        // the ViewPager.
        mViewPager.setCurrentItem(tab.getPosition());
    }

    @Override
    public void onTabUnselected(ActionBar.Tab tab, android.support.v4.app.FragmentTransaction fragmentTransaction) {

    }

    @Override
    public void onTabReselected(ActionBar.Tab tab, android.support.v4.app.FragmentTransaction fragmentTransaction) {

    }

    /**
     * A {@link FragmentPagerAdapter} that returns a fragment corresponding to
     * one of the sections/tabs/pages.
     */
    public class SectionsPagerAdapter extends FragmentPagerAdapter {

        public SectionsPagerAdapter(FragmentManager fm) {
            super(fm);
        }

        @Override
        public Fragment getItem(int position) {
            if (position == 0) {
                return Demo1Fragment.newInstance();
            } else {
                return Demo2Fragment.newInstance();
            }
        }

        @Override
        public int getCount() {
            return 2;
        }

        @Override
        public CharSequence getPageTitle(int position) {
            switch (position) {
                case 0:
                    return getString(R.string.title_demo1);
                case 1:
                    return getString(R.string.title_demo2);
            }
            return null;
        }
    }

    public static class Demo1Fragment extends Fragment {

        public static Demo1Fragment newInstance() {
            Demo1Fragment fragment = new Demo1Fragment();
            return fragment;
        }

        @Override
        public View onCreateView(LayoutInflater inflater, ViewGroup container,
                                 Bundle savedInstanceState) {
            View rootView = inflater.inflate(R.layout.fragment_demo1, container, false);

            ((TextView) rootView.findViewById(R.id.sample1).findViewById(R.id.title)).setText("Sample 1");
            ((TextView) rootView.findViewById(R.id.sample2).findViewById(R.id.title)).setText("Sample 2");

            ExpandableTextView expTv1 = (ExpandableTextView) rootView.findViewById(R.id.sample1)
                    .findViewById(R.id.expand_text_view);
            final ExpandableTextView expTv2 = (ExpandableTextView) rootView.findViewById(R.id.sample2)
                    .findViewById(R.id.expand_text_view);

            expTv1.setText(getString(R.string.dummy_text1));
            expTv2.setText(getString(R.string.dummy_text2));

            return rootView;
        }
    }

    public static class Demo2Fragment extends ListFragment {

        public static Demo2Fragment newInstance() {
            Demo2Fragment fragment = new Demo2Fragment();
            return fragment;
        }

        @Override
        public void onViewCreated(View view, Bundle savedInstanceState) {
            super.onViewCreated(view, savedInstanceState);
            SampleTextListAdapter adapter = new SampleTextListAdapter(getActivity());
            setListAdapter(adapter);
        }
    }
}


text:
UPDATE meta set meta_value="38" where meta_key="schema_version";

# Add info_type & info_text columns to xref

ALTER TABLE xref ADD COLUMN info_type ENUM('PROJECTION', 'MISC');
ALTER TABLE xref ADD COLUMN info_text VARCHAR(255);
ALTER TABLE xref ADD INDEX info_type_idx (info_type);

# Change name of release column in external_db since release is a reserved word
ALTER TABLE external_db CHANGE COLUMN release db_release VARCHAR(40) NOT NULL;

# Add the two new Unmapped Object tables:-

################################################################################
#
# Table structure for table 'unmapped_object'
#
# Describes why a particular external entity was not mapped to an ensembl one.

CREATE TABLE unmapped_object (

  unmapped_object_id    INT UNSIGNED NOT NULL AUTO_INCREMENT,
  type                  ENUM('xref', 'cDNA', 'Marker') NOT NULL,
  analysis_id           INT(10) UNSIGNED NOT NULL,
  external_db_id        INT NOT NULL,
  identifier            VARCHAR(255) NOT NULL,
  unmapped_reason_id    SMALLINT(5) UNSIGNED NOT NULL,
  query_score           DOUBLE,
  target_score          DOUBLE,
  ensembl_id            INT(10) unsigned default '0',
  ensembl_object_type   ENUM('RawContig','Transcript','Gene','Translation') collate latin1_bin default 'RawContig',
  PRIMARY KEY            ( unmapped_object_id ),
  KEY                    id_idx( identifier ),
  KEY                    anal_idx( analysis_id ),
  KEY                    anal_exdb_idx( analysis_id, external_db_id)

) COLLATE=latin1_swedish_ci TYPE=MyISAM;

################################################################################
#
# Table structure for table 'unmapped_reason'
#
# Describes the reason why a mapping failed.

CREATE TABLE unmapped_reason (

  unmapped_reason_id     SMALLINT(5) UNSIGNED NOT NULL AUTO_INCREMENT,
  summary_description    VARCHAR(255),
  full_description       VARCHAR(255),

  PRIMARY KEY ( unmapped_reason_id )

) COLLATE=latin1_swedish_ci TYPE=MyISAM;

# Add some more columns to mapping_session

ALTER TABLE mapping_session ADD COLUMN new_assembly varchar(20) NOT NULL default '' AFTER new_db_name;
ALTER TABLE mapping_session ADD COLUMN old_assembly varchar(20) NOT NULL default '' AFTER new_db_name;
ALTER TABLE mapping_session ADD COLUMN new_release varchar(5) NOT NULL default '' AFTER new_db_name;
ALTER TABLE mapping_session ADD COLUMN old_release varchar(5) NOT NULL default '' AFTER new_db_name;
ALTER TABLE mapping_session CHANGE created created DATETIME NOT NULL;

# Add the new oligo tables, which replace the affy tables

CREATE TABLE oligo_feature (
       oligo_feature_id   INT NOT NULL auto_increment,
       seq_region_id      INT UNSIGNED NOT NULL,
       seq_region_start   INT NOT NULL,
       seq_region_end     INT NOT NULL,
       seq_region_strand  TINYINT NOT NULL,

       mismatches         TINYINT,
       oligo_probe_id     INT NOT NULL,
       analysis_id        INT(10) UNSIGNED NOT NULL,

       PRIMARY KEY (oligo_feature_id),
       KEY seq_region_idx (seq_region_id, seq_region_start),
       KEY probe_idx (oligo_probe_id)
) COLLATE=latin1_swedish_ci TYPE=MyISAM;

CREATE TABLE oligo_probe (
       oligo_probe_id  INT NOT NULL auto_increment,
       oligo_array_id  INT NOT NULL,
       probeset        VARCHAR(40),
       name            VARCHAR(20),
       description     TEXT,
       length          SMALLINT NOT NULL,

       PRIMARY KEY (oligo_probe_id, oligo_array_id),
       KEY probeset_idx (probeset),
       KEY array_idx (oligo_array_id)
) COLLATE=latin1_swedish_ci TYPE=MyISAM;

CREATE TABLE oligo_array (
       oligo_array_id   INT NOT NULL auto_increment,
       parent_array_id  INT,
       probe_setsize    TINYINT NOT NULL,
       name             VARCHAR(40) NOT NULL,
       type             ENUM( 'AFFY', 'OLIGO' ),

       PRIMARY KEY (oligo_array_id)
) COLLATE=latin1_swedish_ci TYPE=MyISAM;

# Copy any existing data from the affy tables to the oligo tables

INSERT INTO oligo_array (oligo_array_id, parent_array_id,
       probe_setsize, name, type)
SELECT affy_array_id, parent_array_id, probe_setsize, name, 'AFFY'
FROM   affy_array;

INSERT INTO oligo_probe (oligo_probe_id, oligo_array_id,
       probeset, name, description, length)
SELECT affy_probe_id, affy_array_id, probeset, name, NULL, 25
FROM   affy_probe;

INSERT INTO oligo_feature (oligo_feature_id, seq_region_id,
       seq_region_start, seq_region_end, seq_region_strand,
       mismatches, oligo_probe_id, analysis_id)
SELECT affy_feature_id, seq_region_id, seq_region_start, seq_region_end,
       seq_region_strand, mismatches, affy_probe_id, analysis_id
FROM   affy_feature;

UPDATE meta_coord
SET    table_name='oligo_feature'
WHERE  table_name='affy_feature';

# Drop the affy tables

DROP TABLE affy_array;
DROP TABLE affy_probe;
DROP TABLE affy_feature;

# change column 'value' in attrib tables from VARCHAR(255) to TEXT

ALTER TABLE misc_attrib DROP INDEX type_val_idx;
ALTER TABLE misc_attrib CHANGE value value TEXT NOT NULL DEFAULT '';
ALTER TABLE misc_attrib ADD INDEX type_val_idx (attrib_type_id, value(40));

ALTER TABLE seq_region_attrib DROP INDEX type_val_idx;
ALTER TABLE seq_region_attrib CHANGE value value TEXT NOT NULL DEFAULT '';
ALTER TABLE seq_region_attrib ADD INDEX type_val_idx (attrib_type_id, value(40));

ALTER TABLE gene_attrib DROP INDEX type_val_idx;
ALTER TABLE gene_attrib CHANGE value value TEXT NOT NULL DEFAULT '';
ALTER TABLE gene_attrib ADD INDEX type_val_idx (attrib_type_id, value(40));

ALTER TABLE transcript_attrib DROP INDEX type_val_idx;
ALTER TABLE transcript_attrib CHANGE value value TEXT NOT NULL DEFAULT '';
ALTER TABLE transcript_attrib ADD INDEX type_val_idx (attrib_type_id, value(40));

ALTER TABLE translation_attrib DROP INDEX type_val_idx;
ALTER TABLE translation_attrib CHANGE value value TEXT NOT NULL DEFAULT '';
ALTER TABLE translation_attrib ADD INDEX type_val_idx (attrib_type_id, value(40));

# consistent analysis_id foreign key columns across database

ALTER TABLE gene CHANGE analysis_id analysis_id INT(10) UNSIGNED NOT NULL;
ALTER TABLE identity_xref CHANGE analysis_id analysis_id INT(10) UNSIGNED NOT NULL;
ALTER TABLE prediction_transcript CHANGE analysis_id analysis_id INT(10) UNSIGNED NOT NULL;
ALTER TABLE qtl_feature CHANGE analysis_id analysis_id INT(10) UNSIGNED NOT NULL;
ALTER TABLE density_type CHANGE analysis_id analysis_id INT(10) UNSIGNED NOT NULL;
ALTER TABLE regulatory_feature CHANGE analysis_id analysis_id INT(10) UNSIGNED NOT NULL;
ALTER TABLE regulatory_search_region CHANGE analysis_id analysis_id INT(10) UNSIGNED NOT NULL;

# add column analysis_id to transcript

ALTER TABLE transcript ADD COLUMN analysis_id INT(10) UNSIGNED NOT NULL AFTER gene_id;
ALTER TABLE transcript ADD INDEX analysis_idx (analysis_id);
UPDATE transcript t, gene g set t.analysis_id = g.analysis_id WHERE t.gene_id = g.gene_id;


text:
/***
* Inferno Engine v4 2015-2017
* Written by Tomasz "Rex Dex" Jonarski
*
* [#filter: rtti\overrides #]
***/

#include "build.h"
#include "streamTextWriter.h"
#include "streamTextReader.h"
#include "streamBinaryWriter.h"
#include "streamBinaryReader.h"
#include "rttiOverrides.h"
#include "rttiClassType.h"
#include "rttiProperty.h"

#include "base/containers/include/stringBuilder.h"
#include "base/containers/include/stringParser.h"
#include "base/containers/include/bitUtils.h"

namespace base
{
    namespace rtti
    {

        PropertyOverrideMask::PropertyOverrideMask()
        {
        }

        void PropertyOverrideMask::calcHash(base::CRC64& crc) const
        {
			crc << m_mask;
        }

        const Bool PropertyOverrideMask::operator==(const PropertyOverrideMask& other) const
        {
            return m_mask == other.m_mask;
        }

        const Bool PropertyOverrideMask::operator!=(const PropertyOverrideMask& other) const
        {
            return m_mask != other.m_mask;
        }

        const Bool PropertyOverrideMask::canOverrideProperty(const Property* prop) const
        {
            return prop && prop->isOverridable();
        }

        const Bool PropertyOverrideMask::isPropertyOverridden(const Property* prop) const
        {
            if (!prop || !prop->isOverridable())
                return false;

            const auto overrideIndex = prop->getOverrideIndex();
            FATAL_ASSERT(overrideIndex != -1);
            return TestBit(&m_mask, overrideIndex);
        }

        void PropertyOverrideMask::togglePropertyOverride(const Property* prop, const Bool flag)
        {
            FATAL_ASSERT(prop != nullptr);

            const auto overrideIndex = prop->getOverrideIndex();
            FATAL_ASSERT(overrideIndex != -1);

            if (flag)
				SetBit(&m_mask, (Uint32)overrideIndex);
            else
				ClearBit(&m_mask, (Uint32)overrideIndex);
        }

        const Bool PropertyOverrideMask::writeText(const rtti::TypeSerializationContext& typeContext, stream::ITextWriter& stream) const
        {
            FATAL_ASSERT(nullptr != typeContext.m_classContext);

            StringBuilder propertyList;

            // write the names of the set properties
            const auto &allProps = typeContext.m_classContext->getAllProperties();
            for (const auto *prop : allProps)
            {
                const auto overrideIndex = prop->getOverrideIndex();
                if (INDEX_NONE != overrideIndex)
                {
                    // save the name of the overridden property
                    if (TestBit(&m_mask, overrideIndex))
                    {
                        if (!propertyList.empty())
                            propertyList.append(";");
                        propertyList.append(prop->getName().c_str());
                    }
                }
            }

            // write the list of names
            stream.writeValue(propertyList.c_str());
            return true;
        }

        const Bool PropertyOverrideMask::writeBinary(const rtti::TypeSerializationContext& typeContext, stream::IBinaryWriter& stream) const
        {
            FATAL_ASSERT(nullptr != typeContext.m_classContext);

            // write the names of the set properties
            const auto &allProps = typeContext.m_classContext->getAllProperties();
            for (const auto *prop : allProps)
            {
                const auto overrideIndex = prop->getOverrideIndex();
                if (INDEX_NONE != overrideIndex)
                {
                    // save the name of the overridden property
					if (TestBit(&m_mask, overrideIndex))
                        stream << prop->getName();
                }
            }

            // end of list
            stream << StringID::EMPTY();

            // written
            return true;
        }

        const Bool PropertyOverrideMask::readBinary(const rtti::TypeSerializationContext& typeContext, stream::IBinaryReader& stream)
        {
            // reset to no overrides, we will load a new set
			m_mask = 0;

            // keep reading the properties
            for (;;)
            {
                // read name of the property, empty name means end of list
                base::StringID name;
                stream >> name;
                if (name.empty())
                    break;

                // find property in the class
                if (nullptr != typeContext.m_classContext)
                {
                    const auto* prop = typeContext.m_classContext->findProperty(name);
                    if (nullptr != prop)
                    {
                        if (prop->isOverridable())
                        {
                            const auto overrideIndex = prop->getOverrideIndex();
                            FATAL_ASSERT(INDEX_NONE != overrideIndex);

							SetBit(&m_mask, range_cast<Uint32>(overrideIndex));
                        }
                        else
                        {
                            TRACE_WARNING("Property '{}' in class '{}' is no longer overridden", prop->getName(), typeContext.m_classContext->getName());
                        }
                    }
                    else
                    {
                        TRACE_WARNING("Property '{}' in class '{}' does not exist any more and cannot be overridden", name, typeContext.m_classContext->getName());
                    }
                }
                else
                {
                    TRACE_WARNING("Property '{}' in class '{}' cannot be overridden", name, typeContext.m_classContext->getName());
                }
            }

            // loaded
            return true;
        }

        const Bool PropertyOverrideMask::readText(const rtti::TypeSerializationContext& typeContext, stream::ITextReader& stream)
        {
			// reset to no overrides, we will load a new set
			m_mask = 0;

            // load property list
            StringView<AnsiChar> propertyList;
            if (!stream.readValue(propertyList))
                return false;

            // process properties
            StringParser parser(propertyList);
            while (parser.parseWhitespaces())
            {
                // get the name of the property
                StringID name;
                if (!parser.parseIdentifier(name))
                {
                    TRACE_ERROR("Unable to read name of the overridden property");
                    return false;
                }

                // parse the list limiter
                parser.parseKeyword(";");

                // find property in the class
                if (nullptr != typeContext.m_classContext)
                {
                    const auto *prop = typeContext.m_classContext->findProperty(name);
                    if (nullptr != prop)
                    {
                        if (prop->isOverridable())
                        {
                            const auto overrideIndex = prop->getOverrideIndex();
                            FATAL_ASSERT(INDEX_NONE != overrideIndex);

							SetBit(&m_mask, range_cast<Uint32>(overrideIndex));
                        }
                        else
                        {
                            TRACE_WARNING("Property '{}' in class '{}' is no longer overridden", prop->getName(), typeContext.m_classContext->getName());
                        }
                    }
                    else
                    {
                        TRACE_WARNING("Property '{}' in class '{}' does not exist any more and cannot be overridden", name, typeContext.m_classContext->getName());
                    }
                }
                else
                {
                    TRACE_WARNING("Property '{}' in class '{}' cannot be overridden", name, typeContext.m_classContext->getName());
                }
            }

            // loaded
            return true;
        }

    } // rtti
} // base


text:
* This is my ![site map](/week-2/imgs/site-map.png) below:

1. What are the 6 Phases of Web Design?

   Answer: 1. Information Gathering
           2. Planning
           3. Design
           4. Development
           5. Testing and Delivery
           6. Maintenance

2. What is your site's primary goal or purpose? What kind of content will your site feature?

   Answer:My site's primary goal is to teach people how to read and speak Chinese and to let people know Chinese culture.

   My site will have Chinese lectures and videos for people to learn Chinese, have cultural stories, history, and literature for people to learn Chinese culture, and have challenges and games for people to learn Chinese with big fun.

3. What is your target audience's interests and how do you see your site addressing them?

   Answer: My target audience's interests is to find a better way to learn Chinese and they looking forward to authentic Chinese culture.

   My site will provide lots of interesting lectures and videos on how to learn Chinese, lots of historical legends, heroes, myths, and literature on what is authentic Chinese culture. The site will also give many fun games and challenges for people to test how well they master Chinese.

4. What is the primary "action" the user should take when coming to your site? Do you want them to search for information, contact you, or see your portfolio? It's ok to have several actions at once, or different actions for different kinds of visitors.

   Answer: For new members, they need to sign up to the site and start the visual class on-line. Also they will play games using keyboard to test how well they grasp Chinese and collect points for the advanced stuff on the site.

   For old members, they need to log in the site and customize their own class and portfolios for other members to socialize with.

   I do wish they may search more information on ShenYun.com which is a very grand website for people to learn Chinese culture and to practice meditation. I am willing to get contact with my audience.

5. What are the main things someone should know about design and user experience?

   Answer: Design is about providing solutions to problems, to raise the performance of the site so that users may have good experience surfing on your site. Also, design is to meet users' expectations and demands on what they need.

   User experience is how a person feels when interfacing with a system. The system could be a website, a web application or desktop software and, in modern contexts, is generally denoted by some form of human-computer interaction. People who work on user experience are looking for ease of use, perception of the value of the system, utility, efficiency in performing tasks and so forth.

6. What is user experience design and why is it valuable?

   Answer: User Experience design is to improve user satisfaction and experience by improving the usability, accessibility, problem-solving provided in the interaction between the user and the product. User experience design is also about human–computer interaction design.

   Firstly, UX design improves the satisfaction of users so that users will stick to your site looking for things they want, which let you make a great deal of revenue from your site. Secondly, UX design will let users experience your site from different kind of accessing ways such as mobile, vast landscape of browsers, and diverse Internet connections. UX design may help websites to enhance the pleasant of users.

7. Which parts of the challenge did you find tedious?

   Answer: I like every one of the challenges. I am open-minded and willing to learn everything.


text:
@interface GasManager : PlacesManager

@end


text:
title: Technical Links
order: 50
---

Collection of links to various git related documentation,

[https://gist.github.com/schacon/6092633](https://gist.github.com/schacon/6092633)

[https://github.com/git/git/blob/master/Documentation/technical/pack-protocol.txt](https://github.com/git/git/blob/master/Documentation/technical/pack-protocol.txt)

[https://github.com/git/git/blob/master/Documentation/technical/http-protocol.txt](https://github.com/git/git/blob/master/Documentation/technical/http-protocol.txt)

[https://github.com/git/git/blob/master/Documentation/technical/protocol-capabilities.txt](https://github.com/git/git/blob/master/Documentation/technical/protocol-capabilities.txt)

[https://github.com/git/git/blob/master/Documentation/technical/pack-format.txt](https://github.com/git/git/blob/master/Documentation/technical/pack-format.txt)

[https://github.com/git/git/tree/master/Documentation/technical](https://github.com/git/git/tree/master/Documentation/technical)

[http://alblue.bandlem.com/2011/08/git-tip-of-week-objects.html](http://alblue.bandlem.com/2011/08/git-tip-of-week-objects.html)

[https://git-scm.herokuapp.com/book/en/Git-Internals-Transfer-Protocols](https://git-scm.herokuapp.com/book/en/Git-Internals-Transfer-Protocols)

[https://github.com/git/git/blob/master/builtin/receive-pack.c](https://github.com/git/git/blob/master/builtin/receive-pack.c)

[http://stefan.saasen.me/articles/git-clone-in-haskell-from-the-bottom-up/](http://stefan.saasen.me/articles/git-clone-in-haskell-from-the-bottom-up/)

```bash
set GIT_CURL_VERBOSE=1
$env:GIT_CURL_VERBOSE=1
$env:GIT_TRACE=1
git config --global http.proxy %HTTP_PROXY%
git config --global --unset http.proxy
git config --global http.sslVerify false
GIT_TRACE=2 GIT_CURL_VERBOSE=2 GIT_TRACE_PERFORMANCE=2 GIT_TRACE_PACK_ACCESS=2 GIT_TRACE_PACKET=2 GIT_TRACE_PACKFILE=2 GIT_TRACE_SETUP=2 GIT_TRACE_SHALLOW=2
```


text:
RSpec.describe Magick do
  describe '::Magick_features' do
    it 'works' do
      expect(Magick::Magick_features).to be_instance_of(String)
    end
  end

  describe '::OpaqueAlpha' do
    it 'works' do
      expect(Magick::OpaqueAlpha).to eq(Magick::QuantumRange)
    end
  end

  describe '::TransparentAlpha' do
    it 'works' do
      expect(Magick::TransparentAlpha).to eq(0)
    end
  end

  describe '::PercentGeometry' do
    it 'works' do
      expect(Magick::PercentGeometry).to be_kind_of(Magick::GeometryValue)
      expect(Magick::PercentGeometry.to_s).to eq('PercentGeometry')
      expect(Magick::PercentGeometry.to_i).to eq(1)
    end
  end

  describe '::AspectGeometry' do
    it 'works' do
      expect(Magick::AspectGeometry).to be_kind_of(Magick::GeometryValue)
      expect(Magick::AspectGeometry.to_s).to eq('AspectGeometry')
      expect(Magick::AspectGeometry.to_i).to eq(2)
    end
  end

  describe '::LessGeometry' do
    it 'works' do
      expect(Magick::LessGeometry).to be_kind_of(Magick::GeometryValue)
      expect(Magick::LessGeometry.to_s).to eq('LessGeometry')
      expect(Magick::LessGeometry.to_i).to eq(3)
    end
  end

  describe '::GreaterGeometry' do
    it 'works' do
      expect(Magick::GreaterGeometry).to be_kind_of(Magick::GeometryValue)
      expect(Magick::GreaterGeometry.to_s).to eq('GreaterGeometry')
      expect(Magick::GreaterGeometry.to_i).to eq(4)
    end
  end

  describe '::AreaGeometry' do
    it 'works' do
      expect(Magick::AreaGeometry).to be_kind_of(Magick::GeometryValue)
      expect(Magick::AreaGeometry.to_s).to eq('AreaGeometry')
      expect(Magick::AreaGeometry.to_i).to eq(5)
    end
  end

  describe '::MinimumGeometry' do
    it 'works' do
      expect(Magick::MinimumGeometry).to be_kind_of(Magick::GeometryValue)
      expect(Magick::MinimumGeometry.to_s).to eq('MinimumGeometry')
      expect(Magick::MinimumGeometry.to_i).to eq(6)
    end
  end

  if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.0.0')
    describe 'Ractor' do
      it 'is supported' do
        expect do
          r = Ractor.new do
            img = Magick::ImageList.new
            img.new_image(200, 200, Magick::GradientFill.new(100, 50, 100, 50, 'khaki1', 'turquoise'))
            img.resize(20, 20)
          end
          r.take
        end.not_to raise_error

        expect do
          r = Ractor.new do
            img = Magick::ImageList.new
            img.new_image(40, 40, Magick::HatchFill.new('white', 'lightcyan2'))
            gc = Magick::Draw.new

            gc.font_weight(Magick::NormalWeight)
            gc.font_style(Magick::NormalStyle)
            gc.text(5, 20, "'20,20'")
            gc.draw(img)
          end
          r.take
        end.not_to raise_error

        expect do
          r = Ractor.new do
            Magick.formats # rubocop:disable RSpec/DescribedClass
          end
          r.take
        end.not_to raise_error
      end
    end
  end
end


text:
import {customElement, observe, property} from '@polymer/decorators';
import {html, PolymerElement} from '@polymer/polymer';
import '../../../components/polymer/irons_and_papers';
import {LegacyElementMixin} from '../../../components/polymer/legacy_element_mixin';
import '../tf_graph/tf-graph';
import * as tf_graph from '../tf_graph_common/graph';
import * as tf_graph_hierarchy from '../tf_graph_common/hierarchy';
import * as tf_graph_render from '../tf_graph_common/render';
import {ColorBy} from '../tf_graph_common/view_types';
import '../tf_graph_info/tf-graph-info';

/**
 * Some UX features, such as 'color by structure', rely on the 'template'
 * information of a graph. This can be very expensive to compute when the
 * graph is too large. This object's constants determine what constitutes
 * a 'large' graph. Graphs that exceed all these constraints should not
 * have templates computed by default.
 */
const maxGraphSizeToComputeTemplates = {
  MAX_NODE_COUNT: 10000,
  MAX_EDGE_COUNT: 10000,
};

/**
 * Element for putting tf-graph and tf-graph-info side by side.
 *
 * Example
 * <tf-graph-board graph=[[graph]]></tf-graph-board>
 */
@customElement('tf-graph-board')
class TfGraphBoard extends LegacyElementMixin(PolymerElement) {
  static readonly template = html`

    <template is="dom-if" if="[[_isNotComplete(progress)]]">

[[progress.msg]]

        <paper-progress value="[[progress.value]]"></paper-progress>

    </template>

        <tf-graph
          id="graph"
          graph-hierarchy="{{graphHierarchy}}"
          basic-graph="[[graph]]"
          hierarchy-params="[[hierarchyParams]]"
          render-hierarchy="{{renderHierarchy}}"
          devices-for-stats="[[devicesForStats]]"
          stats="[[stats]]"
          selected-node="{{selectedNode}}"
          highlighted-node="{{_highlightedNode}}"
          color-by="[[colorBy]]"
          color-by-params="{{colorByParams}}"
          progress="{{progress}}"
          edge-label-function="[[edgeLabelFunction]]"
          edge-width-function="[[edgeWidthFunction]]"
          node-names-to-health-pills="[[nodeNamesToHealthPills]]"
          health-pill-step-index="[[healthPillStepIndex]]"
          handle-node-selected="[[handleNodeSelected]]"
          handle-edge-selected="[[handleEdgeSelected]]"
          trace-inputs="[[traceInputs]]"
          auto-extract-nodes="[[autoExtractNodes]]"
        ></tf-graph>

        <tf-graph-info
          id="graph-info"
          title="selected"
          graph-hierarchy="[[graphHierarchy]]"
          render-hierarchy="[[renderHierarchy]]"
          graph="[[graph]]"
          selected-node="{{selectedNode}}"
          selected-node-include="{{_selectedNodeInclude}}"
          highlighted-node="{{_highlightedNode}}"
          color-by="[[colorBy]]"
          color-by-params="[[colorByParams]]"
          debugger-data-enabled="[[debuggerDataEnabled]]"
          are-health-pills-loading="[[areHealthPillsLoading]]"
          debugger-numeric-alerts="[[debuggerNumericAlerts]]"
          node-names-to-health-pills="[[nodeNamesToHealthPills]]"
          all-steps-mode-enabled="{{allStepsModeEnabled}}"
          specific-health-pill-step="{{specificHealthPillStep}}"
          health-pill-step-index="{{healthPillStepIndex}}"
          compat-node-title="[[compatNodeTitle]]"
          on-node-toggle-inclusion="_onNodeInclusionToggled"
          on-node-toggle-seriesgroup="_onNodeSeriesGroupToggled"
        ></tf-graph-info>

  `;
  @property({type: Object})
  graphHierarchy: tf_graph_hierarchy.Hierarchy;
  @property({type: Object})
  graph: tf_graph.SlimGraph;
  // TODO(psybuzz): ideally, this would be a required property and the component
  // that owns <tf-graph-board> and the graph loader should create these params.
  @property({type: Object})
  hierarchyParams: tf_graph_hierarchy.HierarchyParams =
    tf_graph_hierarchy.DefaultHierarchyParams;
  @property({type: Object})
  stats: object;
  /**
   * A number between 0 and 100 denoting the % of progress
   * for the progress bar and the displayed message.
   * @type {{value: number, msg: string}}
   */
  @property({type: Object})
  progress: object;
  @property({type: Boolean})
  traceInputs: boolean;
  @property({type: Boolean})
  autoExtractNodes: boolean;
  @property({
    type: String,
    notify: true,
  })
  colorBy: ColorBy;
  @property({
    type: Object,
    notify: true,
  })
  colorByParams: object;
  @property({
    type: Object,
    notify: true,
  })
  renderHierarchy: tf_graph_render.RenderGraphInfo;
  // Whether debugger data is enabled for this instance of Tensorboard.
  @property({type: Boolean})
  debuggerDataEnabled: boolean;
  // Whether health pills are currently being loaded.
  @property({type: Boolean})
  areHealthPillsLoading: boolean;
  @property({
    type: Array,
    notify: true,
  })
  // An array of alerts (in chronological order) provided by debugging libraries on when bad
  // values (NaN, +/- Inf) appear.
  debuggerNumericAlerts: unknown[];
  @property({type: Object})
  // A mapping between node name to the tf.graph.scene.HealthPill to render.
  nodeNamesToHealthPills: object;
  // Whether the user can request health pills for individual steps from the server. This can be
  // slow compared the default of showing sampled health pills.
  @property({
    type: Boolean,
    notify: true,
  })
  allStepsModeEnabled: boolean = false;
  // Relevant if allStepsModeEnabled. The specific step for which to fetch health pills from the
  // server for.
  @property({
    type: Number,
    notify: true,
  })
  specificHealthPillStep: number = 0;
  // The step of health pills to show throughout the graph.
  @property({type: Number})
  healthPillStepIndex: number;
  @property({
    type: String,
    notify: true,
  })
  selectedNode: string;
  @property({
    type: String,
  })
  compatNodeTitle: string = 'TPU Compatibility';
  // A function with signature EdgeThicknessFunction that computes the
  // thickness of a given edge.
  @property({type: Object})
  edgeWidthFunction: object;
  // The enum value of the include property of the selected node.
  @property({type: Number})
  _selectedNodeInclude: number;
  @property({type: String})
  _highlightedNode: string;
  // An optional function that takes a node selected event (whose `detail`
  // property is the selected node ... which could be null if a node is
  // deselected). Called whenever a node is selected or deselected.
  @property({type: Object})
  handleNodeSelected: object;
  // An optional function that computes the label for an edge. Should
  // implement the EdgeLabelFunction signature.
  @property({type: Object})
  edgeLabelFunction: object;
  // An optional callback that implements the tf.graph.edge.EdgeSelectionCallback signature. If
  // provided, edges are selectable, and this callback is run when an edge is selected.
  @property({type: Object})
  handleEdgeSelected: object;
  fit() {
    (this.$.graph as any).fit();
  }
  async downloadAsImage(filename: string) {
    const blob = await (this.$.graph as any).getImageBlob();
    const element = document.createElement('a');
    (element as any).href = (URL as any).createObjectURL(blob);
    element.download = filename;
    element.click();
    URL.revokeObjectURL(element.href);
  }
  /** True if the progress is not complete yet (< 100 %). */
  _isNotComplete(progress) {
    return progress.value < 100;
  }
  _getContainerClass(progress) {
    var result = 'container';
    if (progress.error) {
      result += ' error';
    }
    if (this._isNotComplete(progress)) {
      result += ' loading';
    }
    return result;
  }
  _onNodeInclusionToggled(event) {
    (this.$.graph as any).nodeToggleExtract(event.detail.name);
  }
  _onNodeSeriesGroupToggled(event) {
    (this.$.graph as any).nodeToggleSeriesGroup(event.detail.name);
  }
  @observe('selectedNode', 'renderHierarchy')
  _updateNodeInclude() {
    const node = !this.renderHierarchy
      ? null
      : this.renderHierarchy.getNodeByName(this.selectedNode);
    this._selectedNodeInclude = node
      ? node.include
      : tf_graph.InclusionType.UNSPECIFIED;
  }
  @observe('graph')
  _slimGraphChanged() {
    // By default, avoid coloring by 'structure' for large graphs, since it may be very expensive.
    // Color by 'structure' is still available to users via explicit gesture.
    if (!this.graph) {
      return;
    }
    const {MAX_NODE_COUNT, MAX_EDGE_COUNT} = maxGraphSizeToComputeTemplates;
    const isGraphTooLarge =
      Object.keys(this.graph.nodes).length > MAX_NODE_COUNT &&
      this.graph.edges.length > MAX_EDGE_COUNT;
    if (isGraphTooLarge && this.colorBy === ColorBy.STRUCTURE) {
      this.colorBy = ColorBy.NONE;
    }
  }
  @observe('colorBy', 'graphHierarchy')
  _ensureTemplates() {
    if (!this.graphHierarchy || this.colorBy !== ColorBy.STRUCTURE) {
      return;
    }
    if (this.graphHierarchy.getTemplateIndex()) {
      return;
    }
    this.graphHierarchy.updateTemplates();
  }
}


text:
package org.apache.felix.scr.annotations;

import java.lang.annotation.*;

/**
 * Allows to define multiple {@link Reference} annotations for one type.
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.CLASS)
@Documented
public @interface References {

    /**
     * List of {@link Reference} annotations.
     */
    Reference[] value();

}


text:
using System.Threading.Tasks;
using Akka.Actor;
using Akka.IO;
using Akka.Remote.Transport;
using ByteString = Google.ProtocolBuffers.ByteString;

namespace Akka.Remote.AkkaIOTransport
{
    class ConnectionAssociationHandle : AssociationHandle
    {
        private readonly IActorRef _connection;

        public ConnectionAssociationHandle(IActorRef connection, Address localAddress, Address remoteAddress)
            : base(localAddress, remoteAddress)
        {
            _connection = connection;
            ReadHandlerSource = new TaskCompletionSource<IHandleEventListener>();
            ReadHandlerSource.Task.PipeTo(connection);
        }

        public override bool Write(ByteString payload)
        {
            _connection.Tell(payload);
            return true;
        }

        public override void Disassociate()
        {
            //TODO: Should we close connection?
            //_connection.Tell(Tcp.Close.Instance);
        }
    }

    class ConnectionAssociationActor : UntypedActor, IWithUnboundedStash
    {
        private readonly IActorRef _connection;

        public ConnectionAssociationActor(IActorRef connection)
        {
            _connection = connection;
            connection.Tell(new Tcp.Register(Self));
        }

        protected override void OnReceive(object message)
        {
            if (message is IHandleEventListener)
            {
                var el = message as IHandleEventListener;
                Context.Become(Receiving(el));
                Stash.UnstashAll();
            }
            else
            {
                Stash.Stash();
            }
        }

        private UntypedReceive Receiving(IHandleEventListener el)
        {
            return message =>
            {
                if (message is Tcp.Received)
                {
                    var received = message as Tcp.Received;
                    el.Notify(new InboundPayload(ByteString.CopyFrom(received.Data.ToArray())));
                }
                if (message is ByteString)
                {
                    var bs = message as ByteString;
                    _connection.Tell(Tcp.Write.Create(IO.ByteString.Create(bs.ToByteArray())));
                }
                else
                {
                    Unhandled(message);
                }
            };
        }

        public IStash Stash { get; set; }
    }
}


text:
angular
 .module('login')
 .controller('LogoutCtrl', ['$scope', '$rootScope', '$state', 'localStorageService', LogoutCtrl]);

function LogoutCtrl($scope, $rootScope, $state, localStorageService) {

	localStorageService.remove('authToken');

	$state.go('app.login');
}


text:
<!DOCTYPE  html>

    <meta charset="utf-8">

    <title>doc</title>

Compress Commons v0.1.6

Compress Commons is a library that defines a common interface for working with archives within node.

Install

npm install compress-commons --save

You can also use npm install https://github.com/ctalkington/node-compress-commons/archive/master.tar.gz to test upcoming versions.

Things of Interest

Source Docs (coming soon)

Changelog

Contributing

MIT License

Credits

Concept inspired by Apache Commons Compress™.

Some logic derived from Apache Commons Compress™ and OpenJDK 7.


text:
package com.rhomobile.nfc;

import android.app.Activity;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import com.rhomobile.rhodes.RhodesActivity;
import com.rhomobile.rhodes.util.Utils;

public class NfcActivity  extends Activity {

	private static final String TAG = NfcActivity.class.getSimpleName();

	private static Intent ourIntent = null;

	private static int getSDKVersion() {
		return Build.VERSION.SDK_INT;
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		Utils.platformLog(TAG, " $$$$$$$  NfcActivity onCreate !!! START ");
		super.onCreate(savedInstanceState);
		Intent intent = getIntent();
		String action = intent.getAction();
		Utils.platformLog(TAG, " NfcActivity onCreate !!! Action = "+action);
		processNewIntent(intent);
		finish();
	}

	@Override
	public void onStart() {
		Utils.platformLog(TAG, " $$$$$$$  NfcActivity onStart !!! START ");
		super.onStart();
	}

	@Override
	public void onResume() {
		Utils.platformLog(TAG, " $$$$$$$  NfcActivity onResume !!! START ");
 		super.onResume();
 		//finish();
 	}

    @Override
    public void onPause()
    {
		Utils.platformLog(TAG, " $$$$$$$  NfcActivity onPause !!! START ");
    	super.onPause();
    }

    @Override
	public void onStop()
	{
		Utils.platformLog(TAG, " $$$$$$$  NfcActivity onStop !!! START ");
		super.onStop();
	}

	@Override
	public void onDestroy() {
		Utils.platformLog(TAG, " $$$$$$$  NfcActivity onDestroy !!! START ");
		super.onDestroy();
	}

	@Override
	protected void onNewIntent(Intent intent) {
		Utils.platformLog(TAG, " $$$$$$$  NfcActivity onNewIntent !!! START ");
	    super.onNewIntent(intent);
		String action = intent.getAction();
		Utils.platformLog(TAG, " NfcActivity onNewIntent !!! Action = "+action);
	    processNewIntent(intent);
	}

	private void processNewIntent(Intent intent) {
		/*
	    super.onNewIntent(intent);
		String action = intent.getAction();

		Utils.platformLog(TAG, " NfcActivity processNewIntent !!! Action = "+action);

		if ( (NfcAdapter.ACTION_TAG_DISCOVERED.equals(action)) ||
		(NfcAdapter.ACTION_NDEF_DISCOVERED.equals(action))  ||
		(NfcAdapter.ACTION_TECH_DISCOVERED.equals(action)) ) {

			Nfc.log("NfcActivity: RhodesActivity is not Foreground - save messages and start Activity");

			Nfc.setApplicationStartupIntent(intent);

	        Intent run_intent = new Intent();
	        run_intent.setClass(this, RhodesActivity.class);
	     	startActivity(run_intent);

		}
		*/
	}

	public static boolean isRhodesActivityOnForeground() {
		RhodesActivity rhodes_activity = null;
		// check RhodesActivity state
		try {
			rhodes_activity = RhodesActivity.safeGetInstance();
		}
		catch(NullPointerException e) {

		}
		boolean isForeground = false;
		if (rhodes_activity != null) {
			isForeground = rhodes_activity.isForegroundNow();
		}
		return isForeground;
	}

}


text:
layout: page
title: Lester Mind International Award Ceremony
date: 2016-05-24
author: Daniel Boyer
tags: weekly links, java
status: published
summary: Curabitur augue metus, porttitor eget ultrices in, tristique.
banner: images/banner/office-01.jpg
booking:
  startDate: 03/16/2016
  endDate: 03/21/2016
  ctyhocn: CLLTXHX
  groupCode: LMIAC
published: true
---
Sed eget congue est. Sed ut lectus ut orci ultrices finibus et eu magna. Curabitur ipsum turpis, consectetur vitae nisl et, congue lobortis ipsum. Vestibulum vitae consequat dolor, ac tristique velit. Nulla pretium pretium nibh. Maecenas vel efficitur augue, vitae euismod turpis. Nullam convallis leo sit amet porttitor sodales. Quisque mollis ex commodo tincidunt pulvinar. Pellentesque bibendum volutpat sagittis. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

* Aenean et ex vitae velit iaculis pellentesque
* Etiam ut velit ut sem semper euismod at quis orci
* Donec eu velit imperdiet, blandit ante sit amet, aliquam erat
* Vivamus ut lacus eu sapien bibendum finibus sed et dui.

Etiam ut eros eget elit porttitor efficitur non non ante. Cras non commodo neque. Sed nibh ipsum, iaculis id egestas sit amet, rutrum nec justo. Sed viverra sem tortor, vel semper arcu ornare nec. Curabitur blandit urna in nisi faucibus, ut iaculis dolor scelerisque. Aenean sollicitudin semper lacus non porttitor. Phasellus lacus elit, molestie non urna id, pharetra ornare eros. Fusce condimentum odio lorem, sit amet congue dui faucibus eget. Integer efficitur libero vitae arcu consectetur, ac euismod lacus pharetra. Donec magna nibh, consequat quis arcu non, rutrum aliquet libero.
Praesent neque turpis, porttitor eu lacinia a, pharetra ac nisi. Nulla dignissim elementum purus, id vulputate quam fringilla ut. Suspendisse non nibh semper, molestie ante id, ultricies ante. Morbi sollicitudin, nibh vel convallis aliquam, justo mi efficitur leo, ac rhoncus justo odio non mi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin enim ipsum, porttitor vitae ornare quis, commodo sed risus. Cras ultricies suscipit orci.


text:
require 'chef/recipe'
require 'chef/resource'
require 'chef/provider'

class Chef
  module Sugar
    require_relative 'sugar/architecture'
    require_relative 'sugar/cloud'
    require_relative 'sugar/constraints'
    require_relative 'sugar/constraints_dsl'
    require_relative 'sugar/data_bag'
    require_relative 'sugar/docker'
    require_relative 'sugar/filters'
    require_relative 'sugar/init'
    require_relative 'sugar/ip'
    require_relative 'sugar/kernel'
    require_relative 'sugar/node'
    require_relative 'sugar/platform'
    require_relative 'sugar/platform_family'
    require_relative 'sugar/ruby'
    require_relative 'sugar/run_context'
    require_relative 'sugar/shell'
    require_relative 'sugar/vagrant'
    require_relative 'sugar/version'
    require_relative 'sugar/virtualization'
  end
end

Chef::Recipe.send(:include, Chef::Sugar::DSL)
Chef::Recipe.send(:include, Chef::Sugar::RecipeDSL) # TODO: this is a hack
Chef::Resource.send(:include, Chef::Sugar::DSL)
Chef::Provider.send(:include, Chef::Sugar::DSL)

Object.send(:include, Chef::Sugar::Kernel)


text:
package logging

type Config struct {
	File  string `toml:"file"`
	Level string `toml:"level"`
}

func NewConfig() Config {
	return Config{
		File:  "STDERR",
		Level: "INFO",
	}
}


text:
/**
 * Server config constants
 */

class Sconfig {

    static IP: string = '192.168.1.3'; // Dev

    static DB_CONNECTION_STRING = 'mongodb://192.168.1.3:27017/hkRainDB'; // Dev

    static PORT_NUM: number = 3100;

    static TIME_ZONE: string = 'Asia/Hong_Kong';

    static SECRET: string = 'Great knowledge comes from the humblest of origins.';

}

Object.seal(Sconfig);
export = Sconfig;