text:
/**
 * @ignore
 * animation for transform property
 * @author yiminghe@gmail.com
 */
KISSY.add('anim/timer/transform', function (S, Dom, Fx) {
    function toMatrixArray(matrix) {
        matrix = matrix.split(/,/);
        matrix = S.map(matrix, function (v) {
            return myParse(v);
        });
        return matrix;
    }

    function decomposeMatrix(matrix) {
        matrix = toMatrixArray(matrix);
        var scaleX, scaleY , skew ,
            A = matrix[0],
            B = matrix[1] ,
            C = matrix[2],
            D = matrix[3];

        // Make sure matrix is not singular
        if (A * D - B * C) {
            // step (3)
            scaleX = Math.sqrt(A * A + B * B);
            A /= scaleX;
            B /= scaleX;
            // step (4)
            skew = A * C + B * D;
            C -= A * skew;
            D -= B * skew;
            // step (5)
            scaleY = Math.sqrt(C * C + D * D);
            C /= scaleY;
            D /= scaleY;
            skew /= scaleY;
            // step (6)
            if (A * D < B * C) {
                A = -A;
                B = -B;
                skew = -skew;
                scaleX = -scaleX;
            }
            // matrix is singular and cannot be interpolated
        } else {
            // In this case the elem shouldn't be rendered, hence scale == 0
            scaleX = scaleY = skew = 0;
        }

        // The recomposition order is very important
        // see http://hg.mozilla.org/mozilla-central/file/7cb3e9795d04/layout/style/nsStyleAnimation.cpp#l971
        return {
            'translateX': myParse(matrix[4]),
            'translateY': myParse(matrix[5]),
            'rotate': myParse(Math.atan2(B, A) * 180 / Math.PI),
            'skewX': myParse(Math.atan(skew) * 180 / Math.PI),
            'skewY': 0,
            'scaleX': myParse(scaleX),
            'scaleY': myParse(scaleY)
        };
    }

    function defaultDecompose() {
        return {
            'translateX': 0,
            'translateY': 0,
            'rotate': 0,
            'skewX': 0,
            'skewY': 0,
            'scaleX': 1,
            'scaleY': 1
        };
    }

    function myParse(v) {
        return Math.round(parseFloat(v) * 1e5) / 1e5;
    }

    function getTransformInfo(transform) {
        transform = transform.split(")");
        var trim = S.trim,
            i = -1,
            l = transform.length - 1,
            split, prop, val,
            ret = defaultDecompose();

        // Loop through the transform properties, parse and multiply them
        while (++i < l) {
            split = transform[i].split("(");
            prop = trim(split[0]);
            val = split[1];
            switch (prop) {
                case "translateX":
                case "translateY":
                case 'scaleX':
                case 'scaleY':
                    ret[prop] = myParse(val);
                    break;

                case 'rotate':
                case 'skewX':
                case 'skewY':
                    var v = myParse(val);
                    if (!S.endsWith(val, 'deg')) {
                        v = v * 180 / Math.PI;
                    }
                    ret[prop] = v;
                    break;

                case 'translate':
                case 'translate3d':
                    val = val.split(",");
                    ret.translateX = myParse(val[0]);
                    ret.translateY = myParse(val[1] || 0);
                    break;

                case 'scale':
                    val = val.split(",");
                    ret.scaleX = myParse(val[0]);
                    ret.scaleY = myParse(val[1] || val[0]);
                    break;

                case 'matrix':
                    return decomposeMatrix(val);
                    break;
            }
        }

        return ret;
    }

    function TransformFx() {
        TransformFx.superclass.constructor.apply(this, arguments);
    }

    S.extend(TransformFx, Fx, {
        load: function () {
            var self = this;
            TransformFx.superclass.load.apply(self, arguments);
            // user value has priority over computed value
            self.from = Dom.style(self.anim.node, 'transform') || self.from;
            if (self.from && self.from != 'none') {
                self.from = getTransformInfo(self.from);
            } else {
                self.from = defaultDecompose();
            }
            if (self.to) {
                self.to = getTransformInfo(self.to);
            } else {
                self.to = defaultDecompose();
            }
        },

        interpolate: function (from, to, pos) {
            var interpolate = TransformFx.superclass.interpolate;
            var ret = {};
            ret.translateX = interpolate(from.translateX, to.translateX, pos);
            ret.translateY = interpolate(from.translateY, to.translateY, pos);
            ret.rotate = interpolate(from.rotate, to.rotate, pos);
            ret.skewX = interpolate(from.skewX, to.skewX, pos);
            ret.skewY = interpolate(from.skewY, to.skewY, pos);
            ret.scaleX = interpolate(from.scaleX, to.scaleX, pos);
            ret.scaleY = interpolate(from.scaleY, to.scaleY, pos);
            return S.substitute('translate3d({translateX}px,{translateY}px,0) ' +
                'rotate({rotate}deg) ' +
                'skewX({skewX}deg) ' +
                'skewY({skewY}deg) ' +
                'scale({scaleX},{scaleY})', ret);
        }
    });

    Fx.Factories.transform = TransformFx;

    return TransformFx;
}, {
    requires: ['dom', './fx']
});
/**
 * @ignore
 * refer:
 * - http://louisremi.github.io/jquery.transform.js/index.html
 * - http://hg.mozilla.org/mozilla-central/file/7cb3e9795d04/layout/style/nsStyleAnimation.cpp#l971
 */


text:
<title> / linq.collections.LinqListFunctionsJava7.All</title>
<link rel="stylesheet" href="..\..\style.css">

linq.collections / LinqListFunctionsJava7 / All

All

fun <ElementType> All(list: AbstractList<ElementType?>, condition: Java7Lambda<Boolean>): Boolean

Determines whether all elements of a sequence satisfy a condition.

Parameters

list - The collection to search

condition - a Java7Lambda that returns true or false to indicate whether all elements meet the condition

Return

whether all elements meet the condition

redpajama_set_name: RedPajamaGithub


text:
module Trade
  class HandRefund < Refund
    include Model::Refund::HandRefund
  end
end


text:
require 'helper'

class TestStateEquivalent < Test::Unit::TestCase

  context "Mixing-in StateEquivalent" do

    class TestClass
      def initialize(v, w)
        @value1 = v
        @value2 = w
      end
      attr_reader :value1, :value2
      include ModalSupport::StateEquivalent
    end

    should "provide equality" do
      assert_equal TestClass.new(11,22), TestClass.new(11,22)
      assert_equal TestClass.new(11,nil), TestClass.new(11,nil)
      assert_not_equal TestClass.new(11,22), TestClass.new(11,23)
      assert_not_equal TestClass.new(11,22), 11
      assert TestClass.new(11,22).eql?(TestClass.new(11,22))
      assert TestClass.new(11,nil).eql?(TestClass.new(11,nil))
      assert !TestClass.new(11,22).eql?(TestClass.new(11,23))
      assert !TestClass.new(11,22).eql?(11)
    end

    should "provide hash consistent with equality" do
      assert_equal TestClass.new(11,22).hash, TestClass.new(11,22).hash
      assert_equal TestClass.new(11,nil).hash, TestClass.new(11,nil).hash
      assert_not_equal TestClass.new(11,22).hash, TestClass.new(11,23).hash
    end

  end

end


text:
@class PositionEstimate;

@protocol LocationProvider <NSObject>

- (PositionEstimate *)location;

@end


text:
package actors

import akka.actor.{Actor, ActorRef, ActorSystem, Props}
import akka.testkit.{DefaultTimeout, ImplicitSender, TestKit}
import com.typesafe.config.ConfigFactory
import com.typesafe.scalalogging._
import org.scalatest.{BeforeAndAfterAll, Matchers, WordSpecLike}

import scala.concurrent.duration._
import scala.language.postfixOps

/**
  * a Test to show some TestKit examples
  */
class ForwardingActorSpec
  extends TestKit(ActorSystem("TestKitUsageSpec", ConfigFactory.parseString(ForwardingActorSpec.config)))
    with DefaultTimeout
    with ImplicitSender
    with WordSpecLike
    with Matchers
    with BeforeAndAfterAll
    with LazyLogging {

  import ForwardingActorSpec._

  val forwardRef: ActorRef = system.actorOf(Props(classOf[ForwardingActor], testActor))

  override def afterAll {
    shutdown()
  }

  "A ForwardingActor" should {

    "Forward a message it receives" in {
      within(500 millis) {
        forwardRef ! "test"
        expectMsg("test")
      }
    }
    "Forwards in chain of 100 actors" in {
      val forwardRef = system.actorOf(Props(classOf[ForwardingActor], testActor))
      val entryRef = (1 to 100).foldLeft(forwardRef)((ref, i) => system.actorOf(Props(classOf[ForwardingActor], ref)))
      within(3 seconds) {
        val messages = (1 to 10).map(i => s"Test msg $i")
        messages.foreach(entryRef ! _)
        messages.foreach(msg => expectMsg(msg))
      }
    }

    "Forwards in a chains of 100 and 101" in {
      val forwardRef = system.actorOf(Props(classOf[ForwardingActor], testActor))
      val entryRef1 = (1 to 100).foldLeft(forwardRef)((ref, i) => system.actorOf(Props(classOf[ForwardingActor], ref)))
      val entryRef2 = (1 to 101).foldLeft(forwardRef)((ref, i) => system.actorOf(Props(classOf[ForwardingActor], ref)))
      within(500 millis) {
        entryRef1 ! "test1"
        entryRef2 ! "test2"
        expectMsg("test1")
        expectMsg("test2")
      }
    }

    "Forwards in a chains of 100 and 100 with expectMsgAllOf" in {
      val forwardRef = system.actorOf(Props(classOf[ForwardingActor], testActor))
      val entryRef1 = (1 to 100).foldLeft(forwardRef)((ref, i) => system.actorOf(Props(classOf[ForwardingActor], ref)))
      val entryRef2 = (1 to 100).foldLeft(forwardRef)((ref, i) => system.actorOf(Props(classOf[ForwardingActor], ref)))
      within(500 millis) {
        entryRef1 ! "test1"
        entryRef2 ! "test2"
        entryRef2 ! "test3"
        expectMsgAllOf("test1", "test2", "test3")
      }
    }

    "Forwards in a chains of 100 and 102" in {
      val forwardRef = system.actorOf(Props(classOf[ForwardingActor], testActor))
      val entryRef1 = (1 to 100).foldLeft(forwardRef)((ref, i) => system.actorOf(Props(classOf[ForwardingActor], ref)))
      val entryRef2 = (1 to 102).foldLeft(forwardRef)((ref, i) => system.actorOf(Props(classOf[ForwardingActor], ref)))
      within(500 millis) {
        entryRef1 ! "test1"
        entryRef2 ! "test2"
        expectMsg("test1")
        expectMsg("test2")
      }
    }
    "Forwards in a chains of 100 and 103" in {
      val forwardRef = system.actorOf(Props(classOf[ForwardingActor], testActor))
      val entryRef1 = (1 to 100).foldLeft(forwardRef)((ref, i) => system.actorOf(Props(classOf[ForwardingActor], ref)))
      val entryRef2 = (1 to 103).foldLeft(forwardRef)((ref, i) => system.actorOf(Props(classOf[ForwardingActor], ref)))
      within(500 millis) {
        entryRef1 ! "test1"
        entryRef2 ! "test2"
        expectMsg("test1")
        expectMsg("test2")
      }
    }

  }
}

object ForwardingActorSpec {
  // Define your test specific configuration here
  val config =
    """
    akka {
      loglevel = "WARNING"
    }
    """

  /**
    * An Actor that forwards every message to a next Actor
    */
  class ForwardingActor(next: ActorRef) extends Actor with LazyLogging {
    def receive: PartialFunction[Any, Unit] = {
      case msg =>
        logger.info(s"Forwarding message $msg to $next")
        next ! msg
    }
  }

}


text:
<div<?php if (!$component->getOption('resetFormClass')) : ?> class="form-group"<?php endif; ?>>
    <label
        for="<?= $component->getId() ?>"
        class="control-label<?php if ($component->getOption('srOnly')) : ?> sr-only<?php endif; ?><?php if ($component->getHorizontal()) : ?> col-md-<?= $component->getHorizontal() ?><?php endif; ?>"
    ><?= $component->getLabel() ?><?php if ($component->getOption('required', false)) : ?> *<?php endif; ?>

    <?php if ($component->getHorizontal()) : ?>
    <div class="col-md-<?= 12 - $component->getHorizontal() ?>"><?php endif; ?>
        <input <?= $component->getIdAttribute() ?>
            <?= $component->getClassAttribute($component->getOption('resetFormClass', false) ? '' : 'form-control') ?>
            type="text"
            name="<?= $component->getName() ?>"
            value="<?= $component->getValue() ?>"
            <?= $component->getPlaceholderAttribute() ?>
            <?= $component->getEventAttributesCode() ?>
            <?php if ($component->getOption('disabled', false)) : ?>disabled="disabled"<?php endif; ?>
            <?php if ($component->getOption('readonly', false)) : ?>readonly="readonly"<?php endif; ?>
            <?php if ($component->getOption('required', false)) : ?>required="required"<?php endif; ?>
            <?php if ($component->getOption('autofocus', false)) : ?>autofocus="autofocus"<?php endif; ?>
        >
        <?php if ($component->getHorizontal()) : ?>
<?php endif; ?>


text:
package org.appcelerator.titanium.view;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.lang.ref.SoftReference;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.entity.BufferedHttpEntity;
import org.apache.http.impl.client.DefaultHttpClient;
import org.appcelerator.kroll.KrollDict;
import org.appcelerator.kroll.KrollProxy;
import org.appcelerator.kroll.common.Log;
import org.appcelerator.titanium.TiApplication;
import org.appcelerator.titanium.TiBlob;
import org.appcelerator.titanium.TiDimension;
import org.appcelerator.titanium.io.TiBaseFile;
import org.appcelerator.titanium.util.TiConvert;
import org.appcelerator.titanium.util.TiDownloadListener;
import org.appcelerator.titanium.util.TiDownloadManager;
import org.appcelerator.titanium.util.TiFileHelper;
import org.appcelerator.titanium.util.TiImageHelper;
import org.appcelerator.titanium.util.TiImageLruCache;
import org.appcelerator.titanium.util.TiUIHelper;
import org.appcelerator.titanium.util.TiUrl;

import android.app.Activity;
import android.content.pm.ApplicationInfo;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Matrix;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.util.DisplayMetrics;
import android.view.View;
import android.webkit.URLUtil;

/**
 * Helper class for loading, scaling, and caching images if necessary.
 */
public class TiDrawableReference
{
	private static Map<Integer, Bounds> boundsCache;
	static
	{
		boundsCache = Collections.synchronizedMap(new HashMap<Integer, Bounds>());
	}

	public enum DrawableReferenceType
	{
		NULL, URL, RESOURCE_ID, BLOB, FILE
	}

	public static class Bounds
	{
		public static final int UNKNOWN = TiDrawableReference.UNKNOWN;
		public int height = UNKNOWN;
		public int width = UNKNOWN;
	}

	private static final String TAG = "TiDrawableReference";
	private static final String FILE_PREFIX = "file://";
	private static final int UNKNOWN = -1;
	private static final int DEFAULT_SAMPLE_SIZE = 1;
	private int resourceId = UNKNOWN;
	private String url;
	private TiBlob blob;
	private TiBaseFile file;
	private DrawableReferenceType type;
	private boolean oomOccurred = false;
	private boolean anyDensityFalse = false;
	private boolean autoRotate;
	private int orientation = -1;

	// TIMOB-3599: A bug in Gingerbread forces us to retry decoding bitmaps when they initially fail
	public static final int DEFAULT_DECODE_RETRIES = 5;
	private int decodeRetries;

	private SoftReference<Activity> softActivity = null;

	public TiDrawableReference(Activity activity, DrawableReferenceType type)
	{
		this.type = type;
		softActivity = new SoftReference<Activity>(activity);
		ApplicationInfo appInfo;

		if (activity != null) {
			appInfo = activity.getApplicationInfo();
		} else {
			appInfo = TiApplication.getInstance().getApplicationInfo();
		}
		anyDensityFalse = (appInfo.flags & ApplicationInfo.FLAG_SUPPORTS_SCREEN_DENSITIES) == 0;
		decodeRetries = DEFAULT_DECODE_RETRIES;
	}

	/**
	 * A very primitive implementation based on org.apache.commons.lang3.builder.HashCodeBuilder,
	 * which is licensed under Apache 2.0 license.
	 * @see HashCodeBuilder
	 */
	@Override
	public int hashCode()
	{
		int total = 17;
		final int constant = 37;
		total = total * constant + type.ordinal();
		total = total * constant + (url == null ? 0 : url.hashCode());
		total = total * constant + (blob == null ? 0 : blob.hashCode());
		total = total * constant + (file == null ? 0 : file.hashCode());
		total = total * constant + resourceId;
		return total;
	}

	@Override
	public boolean equals(Object object)
	{
		if (!(object instanceof TiDrawableReference)) {
			return super.equals(object);
		}
		return (this.hashCode() == ((TiDrawableReference)object).hashCode());
	}

	public static TiDrawableReference fromResourceId(Activity activity, int resourceId)
	{
		TiDrawableReference ref = new TiDrawableReference(activity, DrawableReferenceType.RESOURCE_ID);
		ref.resourceId = resourceId;
		return ref;
	}

	/**
	 * Creates and returns a TiDrawableReference with type DrawableReferenceType.BLOB.
	 * @param activity the referenced activity.
	 * @param blob the referenced blob.
	 * @return A ready instance of TiDrawableReference.
	 * @module.api
	 */
	public static TiDrawableReference fromBlob(Activity activity, TiBlob blob)
	{
		TiDrawableReference ref = new TiDrawableReference(activity, DrawableReferenceType.BLOB);
		ref.blob = blob;
		return ref;
	}

	/**
	 * Resolves the url, then creates and returns a TiDrawableReference instance.
	 * @param proxy the activity proxy.
	 * @param url the url to resolve.
	 * @return A ready instance of TiDrawableReference.
	 * @module.api
	 */
	public static TiDrawableReference fromUrl(KrollProxy proxy, String url)
	{
		if (url == null || url.length() == 0 || url.trim().length() == 0) {
			return new TiDrawableReference(proxy.getActivity(), DrawableReferenceType.NULL);
		}
		return fromUrl(proxy.getActivity(), proxy.resolveUrl(null, url));
	}

	/**
	 * Creates and returns a TiDrawableReference with type DrawableReferenceType.URL.
	 * @param activity the referenced activity.
	 * @param url the resource's url.
	 * @return A ready instance of TiDrawableReference.
	 * @module.api
	 */
	public static TiDrawableReference fromUrl(Activity activity, String url)
	{
		TiDrawableReference ref = new TiDrawableReference(activity, DrawableReferenceType.URL);
		ref.url = url;

		// Could still be a resource image file in android/images/medium|high|low. Check once.
		if (url != null) {
			int id =  TiUIHelper.getResourceId(url);
			if (id != 0) {
				// This is a resource so handle it as such.  Is it evil to switch up the type on someone like this? Maybe...
				ref.type = DrawableReferenceType.RESOURCE_ID;
				ref.resourceId = id;
			}
		}
		return ref;
	}

	/**
	 * Creates and returns a TiDrawableReference with type DrawableReferenceType.FILE.
	 * @param activity the referenced activity.
	 * @param file the referenced file.
	 * @return A ready instance of TiDrawableReference.
	 */
	public static TiDrawableReference fromFile(Activity activity, TiBaseFile file)
	{
		TiDrawableReference ref = new TiDrawableReference(activity, DrawableReferenceType.FILE);
		ref.file = file;
		return ref;
	}

	public static TiDrawableReference fromDictionary(Activity activity, HashMap dict)
	{
		if (dict.containsKey("media")) {
			return fromBlob(activity, TiConvert.toBlob(new KrollDict(dict), "media"));
		} else {
			Log.w(TAG,
				"Unknown drawable reference inside dictionary.  Expected key 'media' to be a blob.  Returning null drawable reference");
			return fromObject(activity, null);
		}
	}
	/**
	 * Does its best to determine the type of reference (url, blob, etc) based on object parameter.
	 * @param activity the referenced activity.
	 * @param object the referenced object.
	 * @return A ready instance of TiDrawableReference.
	 * @module.api
	 */
	public static TiDrawableReference fromObject(Activity activity, Object object)
	{
		if (object == null) {
			return new TiDrawableReference(activity, DrawableReferenceType.NULL);
		}

		if (object instanceof String) {
			return fromUrl(activity, TiConvert.toString(object));
		} else if (object instanceof HashMap) {
			return fromDictionary(activity, (HashMap)object);
		} else if (object instanceof TiBaseFile) {
			return fromFile(activity, (TiBaseFile)object);
		} else if (object instanceof TiBlob) {
			return fromBlob(activity, TiConvert.toBlob(object));
		} else if (object instanceof Number) {
			return fromResourceId(activity, ((Number)object).intValue());
		} else {
			Log.w(TAG, "Unknown image resource type: " + object.getClass().getSimpleName()
				+ ". Returning null drawable reference");
			return fromObject(activity, null);
		}
	}

	public boolean isNetworkUrl()
	{
		return (type == DrawableReferenceType.URL && url != null && URLUtil.isNetworkUrl(this.url));
	}

	public boolean isTypeUrl()
	{
		return type == DrawableReferenceType.URL;
	}

	public boolean isTypeFile()
	{
		return type == DrawableReferenceType.FILE;
	}

	public boolean isTypeBlob()
	{
		return type == DrawableReferenceType.BLOB;
	}

	public boolean isTypeResourceId()
	{
		return type == DrawableReferenceType.RESOURCE_ID;
	}
	public boolean isTypeNull()
	{
		return type == DrawableReferenceType.NULL;
	}

	/**
	 * Gets the bitmap from the resource without respect to sampling/scaling.
	 * @return Bitmap, or null if errors occurred while trying to load or fetch it.
	 * @module.api
	 */
	public Bitmap getBitmap()
	{
		return getBitmap(false);
	}

	/**
	 * Gets the bitmap from the resource without respect to sampling/scaling.
	 * When needRetry is set to true, it will retry loading when decode fails.
	 * If decode fails because of out of memory, clear the memory and call GC and retry loading a smaller image.
	 * If decode fails because of the odd Android 2.3/Gingerbread behavior (TIMOB-3599), retry loading the original image.
	 * This method should be called from a background thread when needRetry is set to true because it may block
	 * the thread if it needs to retry several times.
	 * @param needRetry If true, it will retry loading when decode fails.
	 * @return Bitmap, or null if errors occurred while trying to load or fetch it.
	 * @module.api
	 */
	public Bitmap getBitmap(boolean needRetry)
	{
		return getBitmap(needRetry, false);
	}

	/**
	 * Gets the bitmap from the resource. If densityScaled is set to true, image is scaled
	 * based on the device density otherwise no sampling/scaling is done.
	 * When needRetry is set to true, it will retry loading when decode fails.
	 * If decode fails because of out of memory, clear the memory and call GC and retry loading a smaller image.
	 * If decode fails because of the odd Android 2.3/Gingerbread behavior (TIMOB-3599), retry loading the original image.
	 * This method should be called from a background thread when needRetry is set to true because it may block
	 * the thread if it needs to retry several times.
	 * @param needRetry If true, it will retry loading when decode fails.
	 * @return Bitmap, or null if errors occurred while trying to load or fetch it.
	 */
	public Bitmap getBitmap(boolean needRetry, boolean densityScaled)
	{
		InputStream is = getInputStream();
		Bitmap b = null;
		BitmapFactory.Options opts = new BitmapFactory.Options();
		opts.inInputShareable = true;
		opts.inPurgeable = true;
		opts.inPreferredConfig = Bitmap.Config.RGB_565;
		if (densityScaled) {
			DisplayMetrics dm = new DisplayMetrics();
			dm.setToDefaults();
			opts.inDensity = DisplayMetrics.DENSITY_MEDIUM;

			opts.inTargetDensity = dm.densityDpi;
			opts.inScaled = true;
		}

		try {
			if (needRetry) {
				for (int i = 0; i < decodeRetries; i++) {
					// getInputStream() fails sometimes but after retry it will get
					// input stream successfully.
					if (is == null) {
						Log.i(TAG, "Unable to get input stream for bitmap. Will retry.", Log.DEBUG_MODE);
						try {
							Thread.sleep(100);
						} catch (InterruptedException ie) {
							// Ignore
						}
						is = getInputStream();
						continue;
					}
					try {
						oomOccurred = false;
						b = BitmapFactory.decodeStream(is, null, opts);
						if (b != null) {
							break;
						}
						// Decode fails because of TIMOB-3599.
						// Really odd Android 2.3/Gingerbread behavior -- BitmapFactory.decode* Skia functions
						// fail randomly and seemingly without a cause. Retry 5 times by default w/ 250ms between each try.
						// Usually the 2nd or 3rd try succeeds, but the "decodeRetries" property in ImageView
						// will allow users to tweak this if needed
						Log.i(TAG, "Unable to decode bitmap. Will retry.", Log.DEBUG_MODE);
						try {
							Thread.sleep(250);
						} catch (InterruptedException ie) {
							// Ignore
						}
					} catch (OutOfMemoryError e) { // Decode fails because of out of memory
						oomOccurred = true;
						Log.e(TAG, "Unable to load bitmap. Not enough memory: " + e.getMessage(), e);
						Log.i(TAG, "Clear memory cache and signal a GC. Will retry load.", Log.DEBUG_MODE);
						TiImageLruCache.getInstance().evictAll();
						System.gc(); // See if we can force a compaction
						try {
							Thread.sleep(1000);
						} catch (InterruptedException ie) {
							// Ignore
						}
						opts.inSampleSize = (int) Math.pow(2, i);
					}
				}
				// If decoding fails, we try to get it from httpclient.
				if (b == null) {
					HttpClient client = new DefaultHttpClient();
					HttpGet request = new HttpGet(url);
					HttpResponse response;
					try {
						response = (HttpResponse)client.execute(request);
						HttpEntity entity = response.getEntity();
						BufferedHttpEntity bufferedEntity = new BufferedHttpEntity(entity);
						InputStream inputStream = bufferedEntity.getContent();
						b = BitmapFactory.decodeStream(inputStream, null, opts);
					} catch (ClientProtocolException e) {
						Log.e(TAG, "ClientProtocolException" + e.getStackTrace());
					} catch (IOException e) {
						//Ignore
					}
				}
			} else {
				if (is == null) {
					Log.w(TAG, "Could not open stream to get bitmap");
					return null;
				}
				try {
					oomOccurred = false;
					b = BitmapFactory.decodeStream(is, null, opts);
				} catch (OutOfMemoryError e) {
					oomOccurred = true;
					Log.e(TAG, "Unable to load bitmap. Not enough memory: " + e.getMessage(), e);
				}
			}
		} finally {
			if (is == null) {
				Log.w(TAG, "Could not open stream to get bitmap");
				return null;
			}
			try {
				is.close();
			} catch (IOException e) {
				Log.e(TAG, "Problem closing stream: " + e.getMessage(), e);
			}
		}

		return b;
	}

	private Resources getResources()
	{
		return TiApplication.getInstance().getResources();
	}

	private Drawable getResourceDrawable()
	{
		if (!isTypeResourceId()) {
			return null;
		}
		Drawable drawable = null;
		Resources resources = getResources();
		if (resources != null && resourceId > 0) {
			try {
				drawable = resources.getDrawable(resourceId);
			} catch (Resources.NotFoundException e) {
				drawable = null;
			}
		}
		return drawable;
	}
	/**
	 * Gets a resource drawable directly if the reference is to a resource, else
	 * makes a BitmapDrawable with the given attributes.
	 */
	public Drawable getDrawable(View parent, TiDimension destWidthDimension, TiDimension destHeightDimension)
	{
		Drawable drawable = getResourceDrawable();
		if (drawable == null) {
			Bitmap b = getBitmap(parent, destWidthDimension, destHeightDimension);
			if (b != null) {
				drawable = new BitmapDrawable(b);
			}
		}
		return drawable;
	}
	/**
	 * Gets a resource drawable directly if the reference is to a resource, else
	 * makes a BitmapDrawable with the given attributes.
	 */
	public Drawable getDrawable(int destWidth, int destHeight)
	{
		Drawable drawable = getResourceDrawable();
		if (drawable == null) {
			Bitmap b = getBitmap(destWidth, destHeight);
			if (b != null) {
				drawable = new BitmapDrawable(b);
			}
		}
		return drawable;
	}
	/**
	 * Gets a resource drawable directly if the reference is to a resource, else
	 * makes a BitmapDrawable with default attributes.
	 */
	public Drawable getDrawable()
	{
		Drawable drawable = getResourceDrawable();
		if (drawable == null) {
			Bitmap b = getBitmap();
			if (b != null) {
				drawable = new BitmapDrawable(b);
			}
		}
		return drawable;
	}

	/**
	 * Gets a scaled resource drawable directly if the reference is to a resource, else
	 * makes a BitmapDrawable with default attributes. Scaling is done based on the device
	 * resolution.
	 */
	public Drawable getDensityScaledDrawable()
	{
		Drawable drawable = getResourceDrawable();
		if (drawable == null) {
			Bitmap b = getBitmap(false, true);
			if (b != null) {
				drawable = new BitmapDrawable(b);
			}
		}
		return drawable;
	}
	/**
	 * Gets the bitmap, scaled to a specific width & height.
	 * @param destWidth Width in pixels of resulting scaled bitmap
	 * @param destHeight Height in pixels of resulting scaled bitmap
	 * @return Bitmap, or null if any problem getting it.  Check logcat if null.
	 */
	public Bitmap getBitmap(int destWidth, int destHeight)
	{
		return getBitmap(null,
			TiConvert.toTiDimension(new Integer(destWidth), TiDimension.TYPE_WIDTH),
			TiConvert.toTiDimension(new Integer(destHeight), TiDimension.TYPE_HEIGHT));
	}
	/**
	 * Gets the bitmap, scaled to a specific width, with the height matching the
	 * original aspect ratio.
	 * @param destWidth Width in pixels of resulting bitmap
	 * @return Bitmap, or null if any problem getting it.  Check logcat if null.
	 */
	public Bitmap getBitmap(int destWidth)
	{
		int srcWidth, srcHeight, destHeight;
		Bounds orig = peekBounds();
		srcWidth = orig.width;
		srcHeight = orig.height;
		if (srcWidth <= 0 || srcHeight <= 0) {
			Log.w(TAG, "Bitmap bounds could not be determined.  If bitmap is loaded, it won't be scaled.");
			return getBitmap(); // fallback
		}
		double aspectRatio = (double)srcWidth/(double)srcHeight;
		destHeight = (int) ((double)destWidth / aspectRatio);
		return getBitmap(destWidth, destHeight);
	}

	private Bounds calcDestSize(int srcWidth, int srcHeight, TiDimension destWidthDimension,
			TiDimension destHeightDimension, View parent)
	{
		Bounds bounds = new Bounds();
		int destWidth, destHeight, containerWidth, containerHeight,
			parentWidth, parentHeight;
		destWidth = destHeight = parentWidth = parentHeight =
			containerWidth = containerHeight = TiDrawableReference.UNKNOWN;
		boolean widthSpecified = false;
		boolean heightSpecified = false;

		if (parent != null) {
			parentWidth = parent.getWidth();
			parentHeight = parent.getHeight();
		}

		// Width to fit into
		if (destWidthDimension != null) {
			if (destWidthDimension.isUnitAuto()) {
				containerWidth = srcWidth;
			} else {
				widthSpecified = true;
				containerWidth = destWidthDimension.getAsPixels(parent);
			}
		} else {
			if (parentWidth >= 0) {
				containerWidth = parentWidth;
			}
		}
		if (containerWidth < 0) {
			Log.w(TAG, "Could not determine container width for image. Defaulting to source width. This shouldn't happen.");
			containerWidth = srcWidth;
		}

		// Height to fit into
		if (destHeightDimension != null) {
			if (destHeightDimension.isUnitAuto()) {
				containerHeight = srcHeight;
			} else {
				heightSpecified = true;
				containerHeight = destHeightDimension.getAsPixels(parent);
			}
		} else {
			if (parentHeight >= 0) {
				containerHeight = parentHeight;
			}
		}

		if (containerHeight < 0) {
			Log.w(TAG, "Could not determine container height for image. Defaulting to source height. This shouldn't happen.");
			containerHeight = srcHeight;
		}

		float origAspectRatio = (float) srcWidth / (float) srcHeight;

		if (widthSpecified && heightSpecified) {
			destWidth = containerWidth;
			destHeight = containerHeight;
		} else if (widthSpecified) {
			destWidth = containerWidth;
			destHeight = (int) ((float) destWidth / origAspectRatio);
		} else if (heightSpecified) {
			destHeight = containerHeight;
			destWidth = (int) ((float) destHeight * origAspectRatio);
		} else {
			if (origAspectRatio > 1f) {
				destWidth = containerWidth;
				destHeight = (int) ((float) destWidth / origAspectRatio);
			} else {
				destHeight = containerHeight;
				destWidth = (int) ((float) destHeight * origAspectRatio);
			}
		}

		bounds.width = destWidth;
		bounds.height = destHeight;
		return bounds;
	}

	/**
	 * Gets the bitmap, scaled to a width & height specified in TiDimension params.
	 * @param destWidthDimension (null-ok) TiDimension specifying the desired width.  If .isUnitAuto()
	 * then the width will be the source width.  If destWidthDimension is null, then the TiContext
	 * will be used to determine the activity window's decor width and use that.
	 * @param destHeightDimension (null-ok) TiDimension specifying the desired height.  If .isUnitAuto()
	 * then the height will be the source height.  If destHeightDimension is null, then resulting height will
	 * be at same ratio to the resulting width as the original height:width.
	 * @return Bitmap, or null if any problem getting it.  Check logcat if null.
	 */
	public Bitmap getBitmap(View parent, TiDimension destWidthDimension, TiDimension destHeightDimension)
	{
		int srcWidth, srcHeight, destWidth, destHeight;

		Bounds bounds = peekBounds();
		srcWidth = bounds.width;
		srcHeight = bounds.height;

		if (srcWidth <= 0 || srcHeight <= 0) {
			Log.w(TAG, "Bitmap bounds could not be determined. If bitmap is loaded, it won't be scaled.");
			return getBitmap(); // fallback
		}

		if (parent == null) {
			Activity activity = softActivity.get();
			if (activity != null && activity.getWindow() != null) {
				parent = activity.getWindow().getDecorView();
			}
		}

		Bounds destBounds = calcDestSize(srcWidth, srcHeight, destWidthDimension, destHeightDimension, parent);
		destWidth = destBounds.width;
		destHeight = destBounds.height;

		// If src and dest width/height are same, no need to go through all the sampling and scaling jazz.
		if (srcWidth == destWidth && srcHeight == destHeight) {
			return getBitmap();
		}

		if (destWidth <= 0 || destHeight <= 0) {
			// If we can't determine the size, then return null instead of an unscaled bitmap
			return getBitmap();
		}

		InputStream is = getInputStream();
		if (is == null) {
			Log.w(TAG, "Could not open stream to get bitmap");
			return null;
		}

		Bitmap b = null;
		try {
			BitmapFactory.Options opts = new BitmapFactory.Options();
			opts.inInputShareable = true;
			opts.inPurgeable = true;
			opts.inSampleSize =  calcSampleSize(srcWidth, srcHeight, destWidth, destHeight);
			if (Log.isDebugModeEnabled()) {
				StringBuilder sb = new StringBuilder();
				sb.append("Bitmap calcSampleSize results: inSampleSize=");
				sb.append(opts.inSampleSize);
				sb.append("; srcWidth=");
				sb.append(srcWidth);
				sb.append("; srcHeight=");
				sb.append(srcHeight);
				sb.append("; finalWidth=");
				sb.append(opts.outWidth);
				sb.append("; finalHeight=");
				sb.append(opts.outHeight);
				Log.d(TAG, sb.toString());
			}

			Bitmap bTemp = null;
			try {
				oomOccurred = false;
				bTemp = BitmapFactory.decodeStream(is, null, opts);
				if (bTemp == null) {
					Log.w(TAG, "Decoded bitmap is null");
					return null;
				}

				if (Log.isDebugModeEnabled()) {
					StringBuilder sb = new StringBuilder();
					sb.append("decodeStream resulting bitmap: .getWidth()=" + bTemp.getWidth());
					sb.append("; .getHeight()=" + bTemp.getHeight());
					sb.append("; getDensity()=" + bTemp.getDensity());
					Log.d(TAG, sb.toString());
				}

				// Set the bitmap density to match the view density before scaling, so that scaling
				// algorithm takes destination density into account.
				DisplayMetrics displayMetrics = new DisplayMetrics();
				displayMetrics.setToDefaults();
				bTemp.setDensity(displayMetrics.densityDpi);

				// Orient the image when orientation is set.
				if (autoRotate) {
					// Only set the orientation if it is uninitialized
					if(orientation < 0) {
						orientation = getOrientation();
					}
					if (orientation > 0) {
						return getRotatedBitmap(bTemp, orientation);
					}
				}

				if (bTemp.getNinePatchChunk() != null) {
					// Don't scale nine-patches
					b = bTemp;
					bTemp = null;
				} else {
					if (Log.isDebugModeEnabled()) {
						Log.d(TAG, "Scaling bitmap to " + destWidth + "x" + destHeight, Log.DEBUG_MODE);
					}

					// If anyDensity=false, meaning Android is automatically scaling
					// pixel dimensions, need to do that here as well, because Bitmap width/height
					// calculations do _not_ do that automatically.
					if (anyDensityFalse && displayMetrics.density != 1f) {
						destWidth = (int) (destWidth * displayMetrics.density + 0.5f); // 0.5 is to force round up of dimension. Casting to int drops decimals.
						destHeight = (int) (destHeight * displayMetrics.density + 0.5f);
					}

					// Created a scaled copy of the bitmap. Note we will get
					// back the same bitmap if no scaling is required.
					b = Bitmap.createScaledBitmap(bTemp, destWidth, destHeight, true);
				}

			} catch (OutOfMemoryError e) {
				oomOccurred = true;
				Log.e(TAG, "Unable to load bitmap. Not enough memory: " + e.getMessage(), e);

			} finally {
				// Recycle the temporary bitmap only if it isn't
				// the same instance as our scaled bitmap.
				if (bTemp != null && bTemp != b) {
					bTemp.recycle();
					bTemp = null;
				}
			}

		} finally {
			try {
				is.close();
			} catch (IOException e) {
				Log.e(TAG, "Problem closing stream: " + e.getMessage(), e);
			}
		}
		if (Log.isDebugModeEnabled()) {
			StringBuilder sb = new StringBuilder();
			sb.append("Details of returned bitmap: .getWidth()=" + b.getWidth());
			sb.append("; getHeight()=" + b.getHeight());
			sb.append("; getDensity()=" + b.getDensity());
			Log.d(TAG, sb.toString());
		}
		return b;
	}

	/**
	 * Just runs TiDownloadManager.download(URI, listener) giving it the passed listener.
	 */
	public void getBitmapAsync(TiDownloadListener listener)
	{
		if (!isNetworkUrl()) {
			Log.w(TAG, "getBitmapAsync called on non-network url.  Will attempt load.", Log.DEBUG_MODE);
		}

		try {
			TiDownloadManager.getInstance().download(new URI(TiUrl.getCleanUri(url).toString()), listener);
		} catch (URISyntaxException e) {
			Log.e(TAG, "URI Invalid: " + url, e);
		} catch (NullPointerException e) {
			Log.e(TAG, "NullPointerException: " + url, e);
		}
	}

	/**
	 * Uses BitmapFactory.Options' 'inJustDecodeBounds' to peak at the bitmap's bounds
	 * (height & width) so we can do some sampling and scaling.
	 * @return Bounds object with width and height.
	 */
	public Bounds peekBounds()
	{
		int hash = this.hashCode();
		if (boundsCache.containsKey(hash)) {
			return boundsCache.get(hash);
		}
		Bounds bounds = new Bounds();
		if (isTypeNull()) { return bounds; }

		InputStream stream = getInputStream();

		try {
			if (stream != null) {
				BitmapFactory.Options bfo = new BitmapFactory.Options();
				bfo.inJustDecodeBounds = true;
				BitmapFactory.decodeStream(stream, null, bfo);
				bounds.height = bfo.outHeight;
				bounds.width = bfo.outWidth;
			} else {
				Log.w(TAG, "Could not open stream for drawable, therefore bounds checking could not be completed");
			}
		} finally {
			try {
				if (stream != null) {
					stream.close();
				}
			} catch (IOException e) {
				Log.e(TAG, "problem closing stream: " + e.getMessage(), e);
			}
		}

		boundsCache.put(hash, bounds);
		return bounds;
	}

	/**
	 * Based on the underlying type of reference this is, figures out how to get
	 * an InputStream for it.  E.g., if a blob, calls blob.getInputStream, if
	 * a resource id, calls context.getTiApp().getResources().openRawResource(resourceId).
	 * @return InputStream or null if problem getting it (check logcat in that case)
	 */
	public InputStream getInputStream()
	{
		InputStream stream = null;

		if (isTypeUrl() && url != null) {
			try {
				stream = TiFileHelper.getInstance().openInputStream(url, false);

			} catch (IOException e) {
				Log.e(TAG, "Problem opening stream with url " + url + ": " + e.getMessage(), e);
			}

		} else if (isTypeFile() && file != null) {
			try {
				stream = file.getInputStream();
			} catch (IOException e) {
				Log.e(TAG, "Problem opening stream from file " + file.name() + ": " + e.getMessage(), e);
			}

		} else if (isTypeBlob() && blob != null) {
			stream = blob.getInputStream();
		} else if (isTypeResourceId() && resourceId != UNKNOWN) {
			try {
				stream = TiApplication.getInstance().getResources().openRawResource(resourceId);
			} catch (Resources.NotFoundException e) {
				Log.e(TAG, "Drawable resource could not be opened. Are you sure you have the resource for the current device configuration (orientation, screen size, etc.)?");
				throw e;
			}
		}

		return stream;
	}

	/**
	 * Calculates a value for the BitmapFactory.Options .inSampleSize property.
	 *
	 * @see BitmapFactory.Options.inSampleSize
	 * @param srcWidth int
	 * @param srcHeight int
	 * @param destWidth int
	 * @param destHeight int
	 * @return max of srcWidth/destWidth or srcHeight/destHeight
	 */
	public int calcSampleSize(int srcWidth, int srcHeight, int destWidth, int destHeight)
	{
		if (srcWidth <= 0 || srcHeight <= 0 || destWidth <= 0 || destHeight <= 0) {
			return DEFAULT_SAMPLE_SIZE;
		}
		return Math.max(srcWidth / destWidth, srcHeight / destHeight);
	}

	/**
	 * Calculates a value for the BitmapFactory.Options .inSampleSize property.
	 *
	 * @see BitmapFactory.Options.inSampleSize
	 * @param srcWidth int
	 * @param srcHeight int
	 * @param destWidthDimension TiDimension holding the destination width. If null, the TiContext's Activity's Window's decor width is used
	 * as the destWidth.
	 * @param destHeightDimension TiDimension holding the destination height.  If null, the destHeight will be proportional to destWidth as srcHeight
	 * is to srcWidth.
	 * @return max of srcWidth/destWidth or srcHeight/destHeight
	 */
	public int calcSampleSize(View parent, int srcWidth, int srcHeight, TiDimension destWidthDimension, TiDimension destHeightDimension)
	{
		int destWidth, destHeight;
		destWidth = destHeight = TiDrawableReference.UNKNOWN;
		Bounds destBounds = calcDestSize(srcWidth, srcHeight, destWidthDimension, destHeightDimension, parent);
		destWidth = destBounds.width;
		destHeight = destBounds.height;
		return calcSampleSize(srcWidth, srcHeight, destWidth, destHeight);
	}

	/**
	 * @return true if most recent attempt to getBitmap caused an OutOfMemoryError
	 */
	public boolean outOfMemoryOccurred()
	{
		return oomOccurred;
	}

	private Bitmap getRotatedBitmap(Bitmap src, int orientation) {
		Matrix m = new Matrix();
		m.postRotate(orientation);
		return Bitmap.createBitmap(src, 0, 0, src.getWidth(), src.getHeight(), m, false);
	}

	public int getOrientation()
	{
		String path = null;
		int orientation = 0;

		if (isTypeBlob() && blob != null) {
			path = blob.getNativePath();
		} else if (isTypeFile() && file != null) {
			path = file.getNativeFile().getAbsolutePath();
		} else {
			InputStream is = getInputStream();
			if (is != null) {
				File file = TiFileHelper.getInstance().getTempFileFromInputStream(is, "EXIF-TMP", true);
				path = file.getAbsolutePath();
			}
		}

		return TiImageHelper.getOrientation(path);

	}

	public void setAutoRotate(boolean autoRotate)
	{
		this.autoRotate = autoRotate;
	}

	public void setDecodeRetries(int decodeRetries)
	{
		this.decodeRetries = decodeRetries;
	}

	public String getUrl()
	{
		return url;
	}
}


text:
const router = express.Router();
const fs = require('fs');

// Get the mustache page that will be rendered for the accountRecovery route
const accountRecoveryMustache = fs.readFileSync(mustachePath + 'accountRecovery.mustache').toString();

// Render the accountRecovery mustache page
router.get('/accountRecovery', function (request, response) {
    response.writeHead(200, {
        'Content-Type': 'text.html'
    });
    renderWithPartial(accountRecoveryMustache, request, response);
});

module.exports = router;


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/ll_item_bank"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal"
    android:paddingBottom="@dimen/dp_10"
    android:paddingTop="@dimen/dp_10">

    <com.xinyu.mwp.view.SwipeListLayout
        android:id="@+id/swipeLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <LinearLayout
            android:layout_width="81dp"
            android:layout_height="match_parent"
            android:paddingLeft="@dimen/dp_10">

            <TextView
                android:id="@+id/deleteView"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:gravity="center"
                android:text="删除"
                android:textColor="@color/color_fefefe"
                android:textSize="@dimen/fontSize_14sp" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/itemLayout"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@drawable/bg_bind_bank_card_item"
            android:paddingBottom="@dimen/dp_16"
            android:paddingLeft="@dimen/dp_19"
            android:paddingRight="@dimen/dp_19"
            android:paddingTop="@dimen/dp_16">

            <RelativeLayout
                android:id="@+id/rl_bank"
                android:layout_width="match_parent"
                android:layout_height="match_parent">

                <com.xinyu.mwp.view.RoundImageView
                    android:id="@+id/iconView"
                    android:layout_width="40dp"
                    android:layout_height="40dp"
                    android:scaleType="centerCrop"
                    android:src="@mipmap/icon_bank_union_pay"
                    app:roundHeight="@dimen/dp_20"
                    app:roundWidth="@dimen/dp_20" />

                <TextView
                    android:id="@+id/titleView"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/dp_10"
                    android:layout_toRightOf="@id/iconView"
                    android:ellipsize="end"
                    android:maxLines="1"
                    android:text="招商银行"
                    android:textColor="@color/color_fefefe"
                    android:textSize="@dimen/fontSize_16sp" />

                <TextView
                    android:id="@+id/typeView"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignLeft="@id/titleView"
                    android:layout_below="@id/titleView"
                    android:layout_marginTop="@dimen/dp_3"
                    android:ellipsize="end"
                    android:maxLines="1"
                    android:text="储蓄卡"
                    android:textColor="@color/color_fefefe"
                    android:textSize="@dimen/fontSize_10sp" />

                <TextView
                    android:id="@+id/numberView"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignLeft="@id/titleView"
                    android:layout_below="@id/typeView"
                    android:layout_marginTop="@dimen/dp_25"
                    android:ellipsize="end"
                    android:maxLines="1"
                    android:text="****  ****  ****  6364"
                    android:textColor="@color/color_fefefe"
                    android:textSize="@dimen/fontSize_20sp" />

            </RelativeLayout>

        </LinearLayout>

    </com.xinyu.mwp.view.SwipeListLayout>

</LinearLayout>


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Xml;

namespace DotBPE.Gateway.Swagger
{
    public class XmlCommentResolver
    {

        private const string MemberXPath = "/doc/members/member";
        private const string SummaryTag = "summary";

        private Dictionary<string,string> MEMBER_CACHE = new Dictionary<string, string>();

        public XmlCommentResolver(List<string> xmlPaths)
        {
            //XElement booksFromFile = XElement.Load(@"books.xml");\
            LoadXmlFiles(xmlPaths);
        }

        private void LoadXmlFiles(List<string> xmlPaths)
        {
            if (xmlPaths != null && xmlPaths.Any())
            {
                foreach (var xml in xmlPaths)
                {
                    LoadXmlFile(xml);
                }
            }
        }

        private void LoadXmlFile(string xmlPath)
        {
            XmlDocument doc = new XmlDocument();

            doc.Load(xmlPath);

            foreach ( XmlNode node in doc.SelectNodes(MemberXPath))
            {
                string comment = node.SelectSingleNode(SummaryTag)?.InnerXml.Replace("\r\n", "").Trim();
                if (!string.IsNullOrEmpty(comment))
                {
                    MEMBER_CACHE.Add(node.Attributes["name"].Value,comment);
                }
            }
        }

        public string GetMemberInfoComment(MemberInfo memberInfo)
        {
            var key =  XmlCommentsMemberNameHelper.GetMemberNameForMember(memberInfo);
            return this.MEMBER_CACHE.ContainsKey(key) ? this.MEMBER_CACHE[key] : "";
        }

        public string GetTypeComment(Type type)
        {
            var key =  XmlCommentsMemberNameHelper.GetMemberNameForType(type);
            return this.MEMBER_CACHE.ContainsKey(key) ? this.MEMBER_CACHE[key] : "";
        }
        public string GetMethodComment(MethodInfo methodInfo)
        {
            var key =  XmlCommentsMemberNameHelper.GetMemberNameForMethod(methodInfo);
            return this.MEMBER_CACHE.ContainsKey(key) ? this.MEMBER_CACHE[key] : "";
        }

    }
}


text:
<?php
namespace Payum\Core\Request;

abstract class BaseGetStatus extends Generic implements GetStatusInterface
{
    /**
     * @var int
     */
    protected $status;

    /**
     * {@inheritDoc}
     */
    public function __construct($model)
    {
        parent::__construct($model);

        $this->markUnknown();
    }

    /**
     * {@inheritDoc}
     */
    public function getValue()
    {
        return $this->status;
    }
}


text:
import { call, put } from 'redux-saga/effects'
import { takeLatest } from 'redux-saga'
//TODO bc: move this to shared, under sagas since shared should not depend on client
import { fetchNcncaDraftEvents2017 } from 'client/temp/events'
import {
  calendarFetchSucceded,
  calendarFetchFailed,
 } from 'shared/actions/actions.js'

function* eventsSaga(requestEventFetchAction) {
  const { payload, calendarId = payload.calendarId } = requestEventFetchAction
  try {
    console.info('=> events saga is called') //eslint-disable-line

    const events = yield call(fetchNcncaDraftEvents2017, calendarId)
    yield put(calendarFetchSucceded({events: events, calendarId: calendarId}))

    console.info('=> events saga is succeded') //eslint-disable-line
  } catch (error) {
    console.error('=> events saga has failed: ' + error) //eslint-disable-line

    yield put(calendarFetchFailed(error))
  }
}

function* watchRequestEventsFetch() {
  // const { payload, calendarId = payload.calendarId } = yield take('Cal.REQUEST_EVENTS_FETCH')

  // yield fork(eventsSaga, calendarId)
  yield* takeLatest('Cal.REQUEST_EVENTS_FETCH', eventsSaga)
}

export default watchRequestEventsFetch


text:
/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/
"use strict";

module.exports = class LogInfoPlugin {
	constructor(source) {
		this.source = source;
	}

	apply(resolver) {
		const source = this.source;
		resolver.getHook(this.source).tapAsync("LogInfoPlugin", (request, resolveContext, callback) => {
			if(!resolveContext.log) return callback();
			const log = resolveContext.log;
			const prefix = "[" + source + "] ";
			if(request.path) log(prefix + "Resolving in directory: " + request.path);
			if(request.request) log(prefix + "Resolving request: " + request.request);
			if(request.module) log(prefix + "Request is an module request.");
			if(request.directory) log(prefix + "Request is a directory request.");
			if(request.query) log(prefix + "Resolving request query: " + request.query);
			if(request.descriptionFilePath) log(prefix + "Has description data from " + request.descriptionFilePath);
			if(request.relativePath) log(prefix + "Relative path from description file is: " + request.relativePath);
			callback();
		});
	}
};


text:
<?php
namespace Exception;
use \Debug;

class PHPErrorException extends FrameworkException
{
	protected $errfile;
	protected $errline;

	public function __construct($errfile = null, $errline = null, $message = null, $code = null, Exception $previous = null)
	{
		$this->errfile = $errfile;
		$this->errline = $errline;

		if($code == null)
			$code = 0x06;

		parent::__construct(null, $message, $code, $previous);
	}

	public function __toString()
	{
		switch($this->code)
		{
			case E_ERROR:
				$codestr = 'Fatal error (E_ERROR)';
				break;
			case E_WARNING:
				$codestr = 'Warning (E_WARNING)';
				break;
			case E_NOTICE:
				$codestr = 'Notice (E_NOTICE)';
				break;
			case E_STRICT:
				$codestr = 'Strictness (E_STRICT)';
				break;
			default:
				$codestr = 'Unknown(0x'.(!empty($this->code) ? dechex($this->code) : '0').')';
		}

		$str = "PHP Error: ";
		$str .=	"\n".
				'File: '.(!empty($this->errfile) ? $this->errfile : 'Unknown')."\n".
				'Line: '.(!empty($this->errline) ? $this->errline : 'Unknown')."\n".
				'Gravity: '.$codestr."\n".
				'Message: '.(!empty($this->message) ? $this->message : 'None');

		if($this->code != E_ERROR) //If it's not a fatal error, we print the error.
			$str .= "\n\nStack trace:\n----------\n".$this->getTraceAsString();

		return $str;
	}
}


text:
%w{  zabbix-agent zabbix sysstat cronie cronie-anacron crontabs  rsyslog vsftpd logrotate  tmux  python iptstate ntp  ruby  mc
htop iotop iftop atop vim-common wget curl  git }.each do |packages|
    package packages do
    action :install
    end
end


text:
function demoComprehensions() {
  var letters = ["A", "B", "C"];
  var numbers = [1, 2, 3];

  // similar to letters.map
  var lowerCased = [for (letter of letters) letter.toLowerCase()];
  console.log(lowerCased); // ["a", "b", "c"]

  // similar to letters.filter
  var filtered = [for (letter of letters) if (letter !== "A") letter];
  console.log(filtered); // ["B", "C"]

  // multiple arrays
  var combined = [for (letter of letters) for (number of numbers) letter + number];
  console.log(combined); // ["A1", "A2", "A3", "B1", ...]
}


text:
/**
 *  \file ScaleAxisTransform.cpp
 *  \brief Defines scale axis transform, a pruning algorithm
 *  \author Bastien Durix
 */

#include "ScaleAxisTransform.h"

// descreasing order
bool compare(const std::pair<unsigned int,double> &p1, const std::pair<unsigned int,double> &p2)
{
	return p1.second > p2.second;
}

template<typename Model>
bool ScaledIsIn(const typename skeleton::GraphCurveSkeleton<Model>::Ptr grskel, unsigned int ind1, unsigned int ind2, double scale)
{
	return grskel->getModel()->included(
			grskel->getModel()->resize(grskel->getNode(ind1),scale),
			grskel->getModel()->resize(grskel->getNode(ind2),scale));
}

template<typename Model>
inline typename skeleton::GraphCurveSkeleton<Model>::Ptr ScaleAxisTransform_helper(const typename skeleton::GraphCurveSkeleton<Model>::Ptr grskel, const double &scale)
{
	typename skeleton::GraphCurveSkeleton<Model>::Ptr grsimp(new skeleton::GraphCurveSkeleton<Model>(*grskel));

	std::list<unsigned int> list_ind;
	grsimp->getAllNodes(list_ind);

	std::list<std::pair<unsigned int,double> > list_ind_size;
	for(std::list<unsigned int>::iterator it = list_ind.begin(); it != list_ind.end(); it++)
	{
		list_ind_size.push_back(std::pair<unsigned int,double>(*it,grsimp->getModel()->getSize(grsimp->getNode(*it))));
	}

	//sort nodes in decreasing order
	list_ind_size.sort(compare);

	std::list<std::pair<unsigned int,double> >::iterator it = list_ind_size.begin();
	while(it != list_ind_size.end())
	{
		try
		{
			unsigned int refkey = it->first;

			std::list<unsigned int> l_nod;

			// get the neighbors of the node
			grsimp->getNeighbors(refkey,l_nod);

			bool removed = false;
			for(std::list<unsigned int>::iterator itno = l_nod.begin(); itno != l_nod.end() && !removed; itno++)
			{
				// if into is in the resized sphere, it is deleted
				if(ScaledIsIn<Model>(grsimp,refkey,*itno,scale))
				{
					std::vector<unsigned int> v_nod_nei(0);
					grsimp->getNeighbors(*itno,v_nod_nei);

					// link the actual node to the neighbors of the deleted node
					for(unsigned int i=0;i<v_nod_nei.size();i++)
						grsimp->addEdge(refkey,v_nod_nei[i]);

					grsimp->remNode(*itno);
					removed = true;
				}
			}
			if(!removed)
				it++;
		}
		catch(...)
		{
			it++;
		}
	}

	return grsimp;
}

skeleton::GraphSkel2d::Ptr algorithm::pruning::ScaleAxisTransform(const skeleton::GraphSkel2d::Ptr grskel, const double &scale)
{
	return ScaleAxisTransform_helper<skeleton::model::Classic<2> >(grskel,scale);
}

skeleton::GraphProjSkel::Ptr algorithm::pruning::ScaleAxisTransform(const skeleton::GraphProjSkel::Ptr grskel, const double &scale)
{
	return ScaleAxisTransform_helper<skeleton::model::Projective>(grskel,scale);
}


text:
/**
 * i18n module for available languages
 *
 * @author Mautilus s.r.o.
 * @class I18n
 * @singleton
 * @mixins Events
 */

I18n = (function(Events) {
	var I18n = {
		/**
		 * @property {Object} config General config hash
		 */
		config: null,
		/**
		 * @property {String} locale Current locale, eg. `EN`
		 */
		locale: null,
		/**
		 * @property {Object} translations Hash  of translations
		 */
		translations: {},
		/**
		 * @property {Object} languages List ob language codes ISO 639-2B/T
		 */
		languages: {
			'en': ['eng'],
			'cs': ['cze'],
			'sk': ['slo'],
			'sq': ['alb'],
			'ar': ['ara'],
			'ka': ['geo'],
			'de': ['ger'],
			'ru': ['rus'],
			'uk': ['ukr'],
			'pl': ['pol'],
			'ro': ['ron'],
			'sv': ['swe'],
			'fi': ['fin'],
			'et': ['est'],
			'bg': ['bul'],
			'fr': ['fra'],
			'hu': ['hun']
		}
	};

	$.extend(true, I18n, Events, {
		/**
		 * Initialise translation module
		 *
		 */
		init: function(config) {
			this.configure(config);

			this.locale = this.config.locale || CONFIG.locale;
		},
		/**
		 * Set class config hash
		 *
		 * @param {Object} config Hash of parameters
		 */
		configure: function(config) {
			this.config = $.extend(true, this.config || {}, config);
		},
		/**
		 * Translate given string
		 *
		 * @param {String} str String to translate
		 * @param {Object} [attributes] Hash of replacements
		 * @returns {String}
		 */
		translate: function(str, attributes) {
			if (!this.locale) {
				throw new Error('Locale is not set in I18n module');
			}

			var tr = this.translations[this.locale],
				l, exp;

			if (tr && typeof tr[str] !== 'undefined') {
				l = tr[str];

			} else {
				console.warn('Missing translation', str);
				l = str;
			}

			if (attributes) {
				for (var i in attributes) {
					if (attributes.hasOwnProperty(i)) {
						exp = new RegExp('{' + i + '}', 'g');
						l = l.replace(exp, attributes[i]);
					}
				}
			}

			return l;

		},
		/**
		 * Translate HTML elements. It means this function select all tag with the attribute data-i18n and call translate
		 *
		 * @param {Object} target jQuery collection what should be translated
		 * @returns {String}
		 */
		translateHTML: function(target) {
			var scope = this;
			$('[data-i18n]', target).each(function() {
				var el = $(this);
				var tr = el.attr('data-i18n').match(/^(\w+)(.*?)$/);
				var t;

				if (tr && (t = scope.translate(tr[1]))) {
					el.html(t + tr[2]);
				}
			});
		},
		/**
		 * Get language code ()
		 *
		 * @param {String} langCode in format ISO 639-2
		 * @returns {String} language code in format ISO 639-1
		 */
		getLanguage: function(langCode) {
			for (var i in this.languages) {
				if (this.languages[i][0] === langCode) {
					return i;
				}
			}

			return false;
		},
		/**
		 * Change to other language. If new language does exits, this class trigger event "langchange", which
		 * is captured by scenes and snippets.
		 *
		 * @param {String} language code EN, AR etc.
		 * @returns {Boolean} returns true if operation sucessed or false
		 */
		changeLanguage: function(langCode) {
			if (!langCode)
				return false;
			this.locale = langCode;
			this.trigger("langchange", false, langCode);
			return true;
		},
		/*
		 * This functions tests, if the value contains Arabic signs
		 *
         * @param {String} value string which be tested on arabic signs
		 * @returns {Boolean} returns true if string is arabic or false if not
		 */
		isArabic: function(value) {
			patt = /[\u0600-\u06FF\u0750-\u077F]/;
			return patt.test(value);
		}
	});

	// Initialize this class when Main is ready
	Main.ready(function() {
		I18n.init();
	});

	return I18n;

})(Events);


text:
var app = app || {};

app.BookView = Backbone.View.extend({
	tagName: 'div',
	className: 'bookContainer',
	template: _.template($('#bookTemplate').html()),
	render: function(){
		this.$el.html(this.template(this.model.toJSON()));
		return this;
	},
	events:{
		'click .delete': 'deleteBook'
	},
	deleteBook: function(){

		this.model.destroy();

		this.remove();
	}

})


text:
package alerter

import (
	"sync"
	"testing"

	"github.com/eleme/banshee/config"
	"github.com/eleme/banshee/models"
	"github.com/eleme/banshee/util"
	"github.com/eleme/banshee/util/safemap"
)

func TestHourInRange(t *testing.T) {
	util.Must(t, hourInRange(3, 0, 6))
	util.Must(t, !hourInRange(7, 0, 6))
	util.Must(t, !hourInRange(6, 0, 6))
	util.Must(t, hourInRange(23, 19, 10))
	util.Must(t, hourInRange(6, 19, 10))
	util.Must(t, !hourInRange(13, 19, 10))
}

func TestAlertRecordAlertNotifyAfterConfigDisabled(t *testing.T) {
	cfg := config.New()
	cfg.Alerter.NotifyAfter = 0
	a := &Alerter{cfg: cfg, alertRecords: safemap.New(), lock: &sync.RWMutex{}}
	metrics := &models.Metric{Name: "test", Stamp: 0, Value: 80}

	for i := 0; i <= 100; i++ {
		metrics.Stamp = uint32(i)
		util.Must(t, !a.checkAlertCount(metrics))
		a.setAlertRecord(metrics)
	}
}

func TestAlertRecordAlertNotifyAfterConfigSetNotifyAfterToTwo(t *testing.T) {
	cfg := config.New()
	cfg.Alerter.NotifyAfter = 2
	a := &Alerter{cfg: cfg, alertRecords: safemap.New(), lock: &sync.RWMutex{}}

	metrics := &models.Metric{Name: "test", Stamp: 80, Value: 80}
	util.Must(t, a.checkAlertCount(metrics))
	a.setAlertRecord(metrics)

	metrics.Stamp = 81
	util.Must(t, a.checkAlertCount(metrics))
	a.setAlertRecord(metrics)

	metrics.Stamp = 82
	util.Must(t, !a.checkAlertCount(metrics))
	a.setAlertRecord(metrics)

}

func TestAlertRecordAlertNotifyAfterConfigSetNotifyAfterToOne(t *testing.T) {
	cfg := config.New()
	cfg.Alerter.NotifyAfter = 1
	a := &Alerter{cfg: cfg, alertRecords: safemap.New(), lock: &sync.RWMutex{}}

	metrics := &models.Metric{Name: "test", Stamp: 80, Value: 80}
	util.Must(t, a.checkAlertCount(metrics))
	a.setAlertRecord(metrics)

	metrics.Stamp = 81
	util.Must(t, !a.checkAlertCount(metrics))
	a.setAlertRecord(metrics)
}


text:
<?php
class Shineisp_Validate_UniqueMailAddress extends Zend_Validate_Abstract {
	const EXISTS = "already exists within our databases.";
	protected $model;

	public function __construct(Mails $model) {
		$this->model = $model;
	}

	public function isValid($value, $context = null) {
		$this->_setValue ( $value );
		$user = $this->model->getByUsername($value);

		if($user){
			if(count($user)>0){
				$this->_error ( self::EXISTS );
				return false;
			}else{
				return true;
			}
		}else{
			return true;
		}
		return false;
	}
}


text:
using namespace cv;
using namespace std;

BlobAction::BlobAction(){

	// Setup SimpleBlobDetector parameters.
	SimpleBlobDetector::Params params;
	// Change thresholds
	params.minThreshold = 0;
	params.maxThreshold = 256;
	//Filter by Area
	params.filterByArea = true;
	params.minArea = 100;
	// Set up detector with params
	m_detector = new SimpleBlobDetector(params);

}

BlobAction::~BlobAction(){}

//might want to return a point evnetually
int BlobAction::updateAction(const Mat cframe) {
	//create Background Subtractor objects
	vector<KeyPoint> keypoints; // Storage for blobs

	ram_msgs::VisionNavFeedback feedback;
	Point2f center;
	center.x = 0;
	center.y = 0;

	m_detector->detect(cframe, keypoints);

	int max = 0;
	for(int i = 0; i < keypoints.size(); i++){
		if(keypoints[i].size > max){
			max = keypoints[i].size;
			center = keypoints[i].pt;
		}
	}

	if(center.x){
		feedback.x_offset = cframe.rows/2 - center.x;
		feedback.y_offset = cframe.cols/2 - center.y;
	}
	else{ //this is a hack
		feedback.x_offset = 0;
	}

	return center.x;

}


text:
package xyz.abhid.newsletterh.ui;

import android.support.v7.app.ActionBar;
import android.view.MenuItem;

public class BaseOnTopActivity extends BaseActivity {

    @Override
    protected void setupActionBar() {
        super.setupActionBar();

        ActionBar actionBar = getSupportActionBar();
        if (actionBar != null) {
            actionBar.setDisplayHomeAsUpEnabled(true);
        }
    }

    public boolean onOptionsItemSelected(MenuItem item) {
        int itemId = item.getItemId();
        if (itemId == android.R.id.home) {
            onBackPressed();
            return true;
        }
        return super.onOptionsItemSelected(item);
    }
}


text:
// Copyright (C) 2002-2008 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h

#ifndef __I_TIMER_H_INCLUDED__
#define __I_TIMER_H_INCLUDED__

#include "IReferenceCounted.h"

namespace irr
{

//! Interface for getting and manipulating the virtual time
class ITimer : public virtual IReferenceCounted
{
public:

	//! destructor
	virtual ~ITimer() {}

	//! Returns current real time in milliseconds of the system.
	/** This value does not start with 0 when the application starts.
	For example in one implementation the value returned could be the
	amount of milliseconds which have elapsed since the system was started.
	*/
	virtual u32 getRealTime() const = 0;

	//! Returns current virtual time in milliseconds.
	/** This value starts with 0 and can be manipulated using setTime(),
	stopTimer(), startTimer(), etc. This value depends on the set speed of
	the timer if the timer is stopped, etc. If you need the system time,
	use getRealTime() */
	virtual u32 getTime() const = 0;

	//! sets current virtual time
	virtual void setTime(u32 time) = 0;

	//! Stops the virtual timer.
	/** The timer is reference counted, which means everything which calls
	stop() will also have to call start(), otherwise the timer may not
	start/stop correctly again. */
	virtual void stop() = 0;

	//! Starts the virtual timer.
	/** The timer is reference counted, which means everything which calls
	stop() will also have to call start(), otherwise the timer may not
	start/stop correctly again. */
	virtual void start() = 0;

	//! Sets the speed of the timer
	/** The speed is the factor with which the time is running faster or
	slower then the real system time. */
	virtual void setSpeed(f32 speed = 1.0f) = 0;

	//! Returns current speed of the timer
	/** The speed is the factor with which the time is running faster or
	slower then the real system time. */
	virtual f32 getSpeed() const = 0;

	//! Returns if the virtual timer is currently stopped
	virtual bool isStopped() const = 0;

	//! Advances the virtual time
	/** Makes the virtual timer update the time value based on the real
	time. This is called automatically when calling IrrlichtDevice::run(),
	but you can call it manually if you don't use this method. */
	virtual void tick() = 0;
};

} // end namespace irr

#endif


text:
<?xml version="1.0" encoding="UTF-8"?>
<definitions id="definitions"
  xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
  xmlns:camunda="http://camunda.org/schema/1.0/bpmn"
  targetNamespace="Examples">

  <process id="process">

    <startEvent id="theStart" />

    <sequenceFlow sourceRef="theStart" targetRef="callSubProcess" />

    <callActivity id="callSubProcess" calledElement="simpleSubProcess" />

    <sequenceFlow sourceRef="callSubProcess" targetRef="theEnd" />

    <endEvent id="theEnd" />

    <boundaryEvent id="catchError" attachedToRef="callSubProcess">
      <errorEventDefinition errorRef="myError" />
    </boundaryEvent>

    <sequenceFlow sourceRef="catchError" targetRef="escalatedTask" />

    <userTask id="escalatedTask" />

  </process>

</definitions>


text:
Tool for downloading, uploading and syncing DNS zones to Digital Ocean.

# Usage

Setting the access token (get one [here](https://cloud.digitalocean.com/settings/api/tokens)):

`$ export DIGITALOCEAN_ACCESS_TOKEN=123456789abcdef123456789abcdef123456789abcdef123456789abcdef1234`

Retrieve a zone file for the zone example.com from Digital Ocean:

`$ dozone -download example.com > example.com.zone`

Synchronize local example.com-zone file to Digital Ocean:

`$ dozone example.com.zone`

Synchronize local zone without asking:

`$ dozone -yes example.com.zone`


text:
function CheckFolderSize()
{
    if ($global:ConfigXml.servermonitor.SelectNodes("foldersize").count -ne 1)
    {
        ShowInfo "foldersize node not found"
        return
    }

    $global:ConfigXml.servermonitor.foldersize.check |
    ForEach {
        CheckDirectory $_.GetAttribute("max") $_.GetAttribute("path")
    }
}

function AddFZItem([string]$message,[int32]$id = $smIdUnexpectedResult,[string]$type = "Warning")
{
     AddItem -info $message -Source "Folder Size Checker" -EventId $id -EventType $type
}

function CheckDirectory([String]$maxsize,[String]$folder)
{
    $intTreshold = [int64](invoke-expression ${maxsize})
    $folder = ExpandEnvironmentVariables $folder

    ShowInfo -info "Checking $folder for size $maxsize"

	$totalSize = get-childitem -recurse -force $folder `
	| measure-object -Property length -sum `
	| select-object sum

	if ($totalSize.Sum -gt $intTreshold)
	{
        $info = "'" + $folder + "' is too big, its total size is " + ($totalSize.Sum/1MB).ToString("N0") + " MB"
        $info += ", allowed are " + ($intTreshold/1MB).ToString("N0") + " MB`n"
        AddFZItem $info
	}
}


text:
{% load i18n %}

{% blocktrans with 'https://github.com/dcramer/raven' as link %}Start by installing raven-python and Blinker:{% endblocktrans %}

pip install raven blinker

{% trans "Blinker is required for signals to work within Flask." %}

{% trans "Add the required configuration in your application setup:" %}

from raven.contrib.flask import Sentry

app.config['SENTRY_DSN'] = '{% if dsn %}{{ dsn }}{% else %}SENTRY_DSN{% endif %}'
sentry = Sentry(app)

{% trans "That's it! Raven automatically installs an error handling hook to pipe all uncaught exceptions to Sentry." %}

{% blocktrans with 'http://raven.readthedocs.org' as link %}For more information on other uses of Raven with Flask, please see the official documentation for raven-python.{% endblocktrans %}


text:
namespace UILibrary.Win32.Const
{
    using System;

    public static class EM
    {
        public const int EM_GETSEL = 0xb0;
        public const int EM_LINEFROMCHAR = 0xc9;
        public const int EM_LINEINDEX = 0xbb;
        public const int EM_POSFROMCHAR = 0xd6;
    }
}


text:
#include <aws/dataexchange/model/Code.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>

using namespace Aws::Utils;

namespace Aws
{
  namespace DataExchange
  {
    namespace Model
    {
      namespace CodeMapper
      {

        static const int ACCESS_DENIED_EXCEPTION_HASH = HashingUtils::HashString("ACCESS_DENIED_EXCEPTION");
        static const int INTERNAL_SERVER_EXCEPTION_HASH = HashingUtils::HashString("INTERNAL_SERVER_EXCEPTION");
        static const int MALWARE_DETECTED_HASH = HashingUtils::HashString("MALWARE_DETECTED");
        static const int RESOURCE_NOT_FOUND_EXCEPTION_HASH = HashingUtils::HashString("RESOURCE_NOT_FOUND_EXCEPTION");
        static const int SERVICE_QUOTA_EXCEEDED_EXCEPTION_HASH = HashingUtils::HashString("SERVICE_QUOTA_EXCEEDED_EXCEPTION");
        static const int VALIDATION_EXCEPTION_HASH = HashingUtils::HashString("VALIDATION_EXCEPTION");
        static const int MALWARE_SCAN_ENCRYPTED_FILE_HASH = HashingUtils::HashString("MALWARE_SCAN_ENCRYPTED_FILE");

        Code GetCodeForName(const Aws::String& name)
        {
          int hashCode = HashingUtils::HashString(name.c_str());
          if (hashCode == ACCESS_DENIED_EXCEPTION_HASH)
          {
            return Code::ACCESS_DENIED_EXCEPTION;
          }
          else if (hashCode == INTERNAL_SERVER_EXCEPTION_HASH)
          {
            return Code::INTERNAL_SERVER_EXCEPTION;
          }
          else if (hashCode == MALWARE_DETECTED_HASH)
          {
            return Code::MALWARE_DETECTED;
          }
          else if (hashCode == RESOURCE_NOT_FOUND_EXCEPTION_HASH)
          {
            return Code::RESOURCE_NOT_FOUND_EXCEPTION;
          }
          else if (hashCode == SERVICE_QUOTA_EXCEEDED_EXCEPTION_HASH)
          {
            return Code::SERVICE_QUOTA_EXCEEDED_EXCEPTION;
          }
          else if (hashCode == VALIDATION_EXCEPTION_HASH)
          {
            return Code::VALIDATION_EXCEPTION;
          }
          else if (hashCode == MALWARE_SCAN_ENCRYPTED_FILE_HASH)
          {
            return Code::MALWARE_SCAN_ENCRYPTED_FILE;
          }
          EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
          if(overflowContainer)
          {
            overflowContainer->StoreOverflow(hashCode, name);
            return static_cast<Code>(hashCode);
          }

          return Code::NOT_SET;
        }

        Aws::String GetNameForCode(Code enumValue)
        {
          switch(enumValue)
          {
          case Code::ACCESS_DENIED_EXCEPTION:
            return "ACCESS_DENIED_EXCEPTION";
          case Code::INTERNAL_SERVER_EXCEPTION:
            return "INTERNAL_SERVER_EXCEPTION";
          case Code::MALWARE_DETECTED:
            return "MALWARE_DETECTED";
          case Code::RESOURCE_NOT_FOUND_EXCEPTION:
            return "RESOURCE_NOT_FOUND_EXCEPTION";
          case Code::SERVICE_QUOTA_EXCEEDED_EXCEPTION:
            return "SERVICE_QUOTA_EXCEEDED_EXCEPTION";
          case Code::VALIDATION_EXCEPTION:
            return "VALIDATION_EXCEPTION";
          case Code::MALWARE_SCAN_ENCRYPTED_FILE:
            return "MALWARE_SCAN_ENCRYPTED_FILE";
          default:
            EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
            if(overflowContainer)
            {
              return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
            }

            return {};
          }
        }

      } // namespace CodeMapper
    } // namespace Model
  } // namespace DataExchange
} // namespace Aws


text:
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0"  name="de.fu_berlin.imp.apiua.groundedtheory.services.CodeService">
   <implementation class="de.fu_berlin.imp.apiua.groundedtheory.services.impl.CodeService"/>
   <service>
      <provide interface="de.fu_berlin.imp.apiua.groundedtheory.services.ICodeService"/>
   </service>
</scr:component>


text:
In diesem GitHub Repository sind alle Inhalte zum .NET Jump Start Workshop enthalten.

- Modul 1: [Überblick über die Workshop Inhalte](01.%20Überblick)
- Modul 2: [Vorbereitung und Projektsetup](02.%20Projektsetup)
- Modul 3: [Datenmodellierung und -abfrage mit dem Entity Framework](03.%20Entity%20Framework)
- Modul 4: [Aufbau einer Webapplikation mit ASP.NET MVC](04.%20ASP.NET%20MVC)
- Modul 5: [Entwicklung einer Schnittstelle mit ASP.NET Web API](05.%20ASP.NET%20Web%20API)
- Modul 6: [Entwicklung einer App für die universelle Windows Plattform](06.%20Universal%20Windows%20Platform)

## Einrichtung

Klonen Sie das Repository oder laden es als ZIP-Archiv herunter. Wenn Sie das ZIP-Archiv heruntergeladen haben, müssen Sie es vor dem Entpacken "Zulassen". Hierzu machen Sie einen Rechtsklick auf das ZIP-Archiv und wählen **Eigenschaften**. Im unteren Teil des Fensters wählen Sie **Zulassen** aus und klicken OK.

## Ordnerstruktur

Innerhalb der Module befindet sich immer ein Ordner **Quellcode**, der den fertigen Quellcode eines Moduls enthält.

## Fertiger Quellcode

Die fertige Projektmappe als Musterbeispiel finden Sie unter [07. Fertige Projektmappe](07.%20Fertige%20Projektmappe).


text:
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2017 The Bitcoin Core developers
// Copyright (c) 2021 The PIVX developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef PIVX_WALLET_FEES_H
#define PIVX_WALLET_FEES_H

#include "amount.h"

class CTxMemPool;

/**
 * Return the minimum required fee taking into account the
 * floating relay fee and user set minimum transaction fee
 */
CAmount GetRequiredFee(unsigned int nTxBytes);

/**
 * Estimate the minimum fee considering user set parameters
 * and the required fee
 */
CAmount GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarget, const CTxMemPool& pool);

#endif // PIVX_WALLET_FEES_H


text:
'use strict';

import * as React from 'react';

import { MuiTheme } from '../components/MuiTheme'
import RaisedButton from 'material-ui/RaisedButton'
import TextField from 'material-ui/TextField'

import { Form } from '../../components/Form'
import { DisplayTitle } from '../components/DisplayTitle'

export const Layout = ({ dataKey }) => {
	return (
		<MuiTheme>
			<Form style={form} dataKey={dataKey} name="lecture-form" admin={true} resource="/post" >
				<DisplayTitle type='Post' />
				<input type="hidden" name="ID" value="" />
				<TextField name="title" hintText="Title" floatingLabelText="Title" fullWidth={true} />
				<TextField name="slug" hintText="Slug" floatingLabelText="Slug" fullWidth={true} />
				<TextField name="content" hintText="Content" floatingLabelText="Content" fullWidth={true} multiLine={true} rows={15} />
				<div style={buttonWrap}>
					<RaisedButton type="submit" primary={true}>Save</RaisedButton>
				</div>
			</Form>
		</MuiTheme>
	)
}

const buttonWrap: React.CSSProperties = {
	display: "flex",
	justifyContent: "center",
}

const form = {
	width: "100%",
	'@media (min-width: 960px)': {
		width: '960px',
	}
}


text:
using System;
namespace Mono.Google {
	public class GoogleService {
		public static GoogleService Picasa {
			get { return new GoogleService ("lh2"); }
		}

		public static GoogleService Calendar {
			get { return new GoogleService ("cl"); }
		}

		string service_code;
		public string ServiceCode {
			get { return service_code; }
		}

		private GoogleService (string service_code)
		{
			this.service_code = service_code;
		}
	}
}


text:
<?php
/**
 * Gets a list of gbmVoter objects.
 */
class gbmVoterGetUpcomingListProcessor extends modObjectGetListProcessor {
    public $classKey = 'gbmVoter';
    public $languageTopics = array('givingbackmore:default');
    public $defaultSortField = 'user_username';
    public $defaultSortDirection = 'ASC';

    /**
     * @param xPDOQuery $c
     * @return xPDOQuery
     */
    public function prepareQueryBeforeCount(xPDOQuery $c) {
        $c->select($this->modx->getSelectColumns($this->classKey, $this->classKey));
        $c->leftJoin('modUser', 'User');
        $c->select($this->modx->getSelectColumns('modUser', 'User', 'user_', array('id', 'username')));
        return $c;
    }

    /**
     * @param xPDOObject $object
     * @return array
     */
    public function prepareRow(xPDOObject $object) {
        $a = $object->toArray('', false, true);
        /*
            {name: 'used_votes', type: 'int'},
            {name: 'voted_on', type: 'string'}*/
        $a['used_votes'] = 0;
        $a['voted_on'] = array();

        $c = $this->modx->newQuery('gbmVote');
        $c->where(array(
            'voter' => $a['id']
        ));
        $c->leftJoin('gbmNominee', 'Nominee');
        $c->select($this->modx->getSelectColumns('gbmVote', 'gbmVote'));
        $c->select($this->modx->getSelectColumns('gbmNominee', 'Nominee', 'nominee_', array('name')));

        $votes = $this->modx->getCollection('gbmVote', $c);
        foreach ($votes as $vote) {
            /** @var gbmVote $vote */
            $va = $vote->toArray('', false, true);
            $a['used_votes'] += $va['num_votes'];
            $a['voted_on'][] = $va['nominee_name'] . ' (' . $va['num_votes'] . 'x)';
        }
        $a['voted_on'] = implode(', ', $a['voted_on']);
        return $a;
    }
}
return 'gbmVoterGetUpcomingListProcessor';


text:
"""General utilities"""
# Copyright (c) 2015-2022 Wibowo Arindrarto <contact@arindrarto.dev>
# SPDX-License-Identifier: BSD-3-Clause

import json
import os
import re
from contextlib import contextmanager
from os import PathLike, linesep
from pathlib import Path
from typing import cast, IO, Generator, List, Optional, TextIO, Union

import click
import yaml

LINESEPS = {"nt": "\r\n", "posix": "\n"}
RE_INT = re.compile(r"^([-+]?\d+)L?$")
RE_FLOAT = re.compile(r"^([-+]?\d*\.?\d+(?:[eE][-+]?[0-9]+)?)$")

def convert(raw_str: str) -> Union[str, int, float]:
    """Tries to convert a string to an int, float, or return it unchanged.

    The function tries first to convert to an int. If it fails, it tries
    to convert to a float. If it fails, the origin input string is returned.

    :param raw_str: Input string.

    """
    maybe_int = RE_INT.search(raw_str)
    if maybe_int is not None:
        return int(maybe_int.group(1))

    maybe_float = RE_FLOAT.search(raw_str)
    if maybe_float is not None:
        return float(maybe_float.group(1))

    return raw_str

def write_output(
    payload: Union[dict, List[dict]],
    out_handle: TextIO,
    fmt: str = "json",
    compact: bool = False,
    indent: int = 4,
) -> None:
    """Writes the given dictionary as JSON or YAML to the output handle.

    :param payload: Payload to write.
    :param out_handle: Output handle.
    :param fmt: Output format.
    :param compact: Whether to write a compact JSON or not. Ignored if the
        output format is JSON.
    :param indent: Indentation level (ignored if output ``compact`` is true).

    """
    if fmt == "json":
        if compact:
            json.dump(
                payload, out_handle, sort_keys=True, indent=None, separators=(",", ":")
            )
        else:
            json.dump(payload, out_handle, sort_keys=True, indent=indent)
            out_handle.write(linesep)
    else:
        out_handle.write(yaml.dump(payload, default_flow_style=False, indent=indent))

@contextmanager
def get_handle(
    input: Union[str, PathLike, IO],
    encoding: Optional[str] = None,
    mode: str = "r",
) -> Generator[TextIO, None, None]:
    """Context manager for opening files.

    This function returns a file handle of the given file name. You may also
    give an open file handle, in which case the file handle will be yielded
    immediately. The purpose of this is to allow the context manager handle
    both file objects and file names as inputs.

    If a file handle is given, it is not closed upon exiting the context.
    If a file name is given, it will be closed upon exit.

    :param input: Handle of open file or file name.
    :param encoding: Encoding of the file. Ignored if input is file handle.
    :param mode: Mode for opening file. Ignored if input is file handle.

    """
    if isinstance(input, (str, Path)):
        fh = cast(TextIO, click.open_file(f"{input}", mode=mode, encoding=encoding))
    else:
        fh = cast(TextIO, input)

    yield fh

    if isinstance(input, str):
        fh.close()

def get_linesep(system: Optional[str]) -> str:
    """Returns the line separator character(s) for the given system"""

    if system is None:
        return os.linesep

    linesep = LINESEPS.get(system.lower())
    if linesep is not None:
        return linesep

    raise ValueError(f"Can not resolve linesep for system {system!r}")


text:
@implementation UIImage (Cut)

- (UIImage *)clipImageWithScaleWithsize:(CGSize)asize
{
    UIImage *newimage;
    UIImage *image = self;
    if (nil == image) {
        newimage = nil;
    }
    else{
        CGSize oldsize = image.size;
        CGRect rect;
        if (asize.width/asize.height > oldsize.width/oldsize.height) {
            rect.size.width = asize.width;
            rect.size.height = asize.width*oldsize.height/oldsize.width;
            rect.origin.x = 0;
            rect.origin.y = (asize.height - rect.size.height)/2;
        }
        else{
            rect.size.width = asize.height*oldsize.width/oldsize.height;
            rect.size.height = asize.height;
            rect.origin.x = (asize.width - rect.size.width)/2;
            rect.origin.y = 0;
        }
        UIGraphicsBeginImageContext(asize);
        CGContextRef context = UIGraphicsGetCurrentContext();
        CGContextClipToRect(context, CGRectMake(0, 0, asize.width, asize.height));
        CGContextSetFillColorWithColor(context, [[UIColor clearColor] CGColor]);
        UIRectFill(CGRectMake(0, 0, asize.width, asize.height));//clear background
        [image drawInRect:rect];
        newimage = UIGraphicsGetImageFromCurrentImageContext();
        UIGraphicsEndImageContext();
    }
    return newimage;
}

- (UIImage *)compressImage:(UIImage *)image toMaxFileSize:(NSInteger)maxFileSize {
    CGFloat compression = 0.9f;
    CGFloat maxCompression = 0.1f;
    NSData *imageData = UIImageJPEGRepresentation(image, compression);
    while ([imageData length] > maxFileSize && compression > maxCompression) {
        compression -= 0.1;
        imageData = UIImageJPEGRepresentation(image, compression);
    }

    UIImage *compressedImage = [UIImage imageWithData:imageData];
    return compressedImage;
}

- (NSData *)compressImageData {

    CGFloat compression = 0.9f;
    CGFloat maxCompression = 0.1f;
    NSData *imageData = UIImageJPEGRepresentation(self, compression);
    while (([imageData length] > 0.1*1024*1024) && (compression >= maxCompression)) {
        compression -= 0.05;
        imageData = UIImageJPEGRepresentation(self, compression);
    }
    return imageData;
}

- (UIImage *)compressImage {
    NSData *imageData = [self compressImageData];
    UIImage *compressedImage = [UIImage imageWithData:imageData];
    return compressedImage;
}

@end


text:
1. Accessibility
  - This site uses agreed-upon tenets of accessible web design as the core design principles. The basic principles used here come from Web Accessibility in Mind (WebAIM) and Web Accessibility Initiative (WAI). These can be summarized using the acronym __*POUR*__:
    - **Perceivable** (especially to those with limited visual or auditory faculties)
    - **Operable** (for example, fully navigable without a mouse for those with limited motor skills)
    - **Understandable** (all content easily legible and comprehensible to as wide a variety of users as possible)
    - **Robust** (using widely-accepted tools to allow easy future compatibility)
  - For more information on these principles, see the resources listed under Accessibility in Sources at the end of the README. For the full list of specific web design principles I am aiming toward in this site, see http://webaim.org/intro/#principles.
2. Diversity and Inclusion
  - Arguably a superset of accessibility, diversity in users can only exist when accessibility has been made a priority. Every failure to make a site accessible automatically limits the diversity of its user base. But above and beyond diversity of users, this site prioritizes diversity of ideas and diversity of tools. **!!!!!!!!!!!!!!EXAMPLES??**
3. Research / Continuous Learning
  - Hopefully this principles section and the resources section in and of themselves are compelling evidence that I am invested in well-researched, thoroughly designed websites, where both the core concepts behind an app and the tools used within it work together to create a cohesive whole. My main research interests are those two (though not purely limited to them):
    - New web development concepts (higher-level ideas for UX/UI, structure, design, workflow, etc.)
    - New web development tools (specific front-end frameworks, state management methods, database management systems, object-relation mapping libraries, etc.)
  - The philosophy behind my continuous-learning focus is a variant of the concept of growth mindset, theorized by Dr. Carol Dweck. According to Dweck, 'growth mindset' is the belief that ability can be learned, rather than being innate. Someone who embraces this mindset in a certain aspect of life will be more likely to:
    - Keep trying in the face of difficulty, instead of giving up
    - Accept and learn from mistakes
    - Listen to and incorporate negative or critical feedback
    - Be inspired by the success of others and push themselves harder as a result
  - The most obvious outlet for continuous learning on this site is the blog, where I will post new things I learn and new tools I've discovered, but the site itself reflects the desire to use a variety of tools and approaches to solving problems, even within the structure of a given website. **!!!!!!!!!!!!!!EXAMPLES??**

## Getting Started

```
$ npm install
$ npm start
```

Now visit [localhost:4000](http://localhost:4000/)

### Running the Tests

There is a basic test framework in your `test/` folder. Here's how to use it:

```bash
$ npm test                 # runs all tests
$ npm test server/index.js # runs tests in a single file
```

## Generators

No generators installed (yet). Installing one will populate this section in the README.

## Made with Concatapult

See [the `pult` docs](https://github.com/Concatapult/pult#readme) for adding additional modules to this boilerplate.

## Sources
#### Accessibility
 - Web Accessibility in Mind (WebAIM) Principles and Implementation of Accessible Design http://webaim.org/intro/
 - Web Accessibility Initiative (WAI) at W3C Web Content Accessibility Guidelines (WCAG) 2.0 https://www.w3.org/WAI/intro/wcag.php
 - A very exhaustive list of best practices: https://www.webaccessibility.com/best_practices.php

#### Diversity

#### Research
 - 'Mindset: The New Psychology of Success' by Carol Dweck (more about her concepts at: https://www.mindsetworks.com/)


text:
<?php

namespace MakerLabs\PagerBundle\Twig\Extension;

use MakerLabs\PagerBundle\Pager;
use Symfony\Component\Routing\RouterInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;

/**
 * PagerExtension extends Twig with pagination capabilities.
 *
 * @author Marcin Butlak <contact@maker-labs.com>
 */
class PagerExtension extends \Twig_Extension
{
    /**
     *
     * @var RouterInterface
     */
    protected $router;
    /**
     *
     * @var \Twig_Environment
     */
    protected $environment;

    public function __construct(RouterInterface $router)
    {
        $this->router = $router;
    }

    public function initRuntime(\Twig_Environment $environment)
    {
        $this->environment = $environment;
    }

    public function getFunctions()
    {
        return array(
            'paginate' => new \Twig_Function_Method($this, 'paginate', array('is_safe' => array('html'))),
            'paginate_path' => new \Twig_Function_Method($this, 'path', array('is_safe' => array('html'))),
        );
    }

    public function paginate(Pager $pager, $route, array $parameters = array(), $template = 'MakerLabsPagerBundle:Pager:paginate.html.twig')
    {
        return $this->environment->render($template, array('pager' => $pager, 'route' => $route, 'parameters' => $parameters));
    }

    public function path($route, $page, array $parameters = array())
    {
        if (isset($parameters['_page'])) {
            $parameters[$parameters['_page']] = $page;

            unset($parameters['_page']);
        } else {
            $parameters['page'] = $page;
        }

        return $this->router->generate($route, $parameters);
    }

    public function getName()
    {
        return 'pager';
    }
}


text:
package com.team254.lib.util;

public class DriveSignal {
    public double leftMotor;
    public double rightMotor;

    public DriveSignal(double left, double right) {
        this.leftMotor = left;
        this.rightMotor = right;
    }

    public static DriveSignal NEUTRAL = new DriveSignal(0, 0);
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Index of new symbols in 2.2</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GTK+ Reference Manual">
<link rel="up" href="index.html" title="GTK+ Reference Manual">
<link rel="prev" href="api-index-deprecated.html" title="Index of deprecated symbols">
<link rel="next" href="api-index-2-4.html" title="Index of new symbols in 2.4">
<meta name="generator" content="GTK-Doc V1.15 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">

GTK+ Reference Manual

A
                      |
                   C
                      |
                   I
                      |
                   L
                      |
                   M
                      |
                   N
                      |
                   P
                      |
                   S
                      |
                   T
                      |
                   W

Index of new symbols in 2.2

A

GtkAccelGroupFindFunc, user_function in Keyboard Accelerators

C

gtk_clipboard_get_display, function in Clipboards

gtk_clipboard_get_for_display, function in Clipboards

GtkColorSelectionChangePaletteWithScreenFunc, user_function in GtkColorSelection

gtk_color_selection_set_change_palette_with_screen_hook, function in GtkColorSelection

I

gtk_icon_size_lookup_for_settings, function in Themeable Stock Images

gtk_invisible_get_screen, function in GtkInvisible

gtk_invisible_new_for_screen, function in GtkInvisible

gtk_invisible_set_screen, function in GtkInvisible

L

gtk_list_store_iter_is_valid, function in GtkListStore

gtk_list_store_move_after, function in GtkListStore

gtk_list_store_move_before, function in GtkListStore

gtk_list_store_reorder, function in GtkListStore

gtk_list_store_swap, function in GtkListStore

M

gtk_menu_set_screen, function in GtkMenu

gtk_menu_shell_select_first, function in GtkMenuShell

GtkModuleDisplayInitFunc, user_function in General

N

gtk_notebook_get_n_pages, function in GtkNotebook

P

gtk_plug_construct_for_display, function in GtkPlug

gtk_plug_new_for_display, function in GtkPlug

S

gtk_selection_clear, function in Selections

gtk_selection_owner_set_for_display, function in Selections

gtk_settings_get_for_screen, function in GtkSettings

GTK_STOCK_COLOR_PICKER, macro in Stock Items

T

gtk_tree_model_get_string_from_iter, function in GtkTreeModel

gtk_tree_model_sort_iter_is_valid, function in GtkTreeModelSort

gtk_tree_path_new_from_indices, function in GtkTreeModel

gtk_tree_row_reference_copy, function in GtkTreeModel

gtk_tree_selection_count_selected_rows, function in GtkTreeSelection

gtk_tree_selection_get_selected_rows, function in GtkTreeSelection

gtk_tree_selection_unselect_range, function in GtkTreeSelection

gtk_tree_store_iter_is_valid, function in GtkTreeStore

gtk_tree_store_move_after, function in GtkTreeStore

gtk_tree_store_move_before, function in GtkTreeStore

gtk_tree_store_reorder, function in GtkTreeStore

gtk_tree_store_swap, function in GtkTreeStore

gtk_tree_view_column_focus_cell, function in GtkTreeViewColumn

gtk_tree_view_expand_to_path, function in GtkTreeView

gtk_tree_view_set_cursor_on_cell, function in GtkTreeView

W

gtk_widget_class_find_style_property, function in GtkWidget

gtk_widget_class_list_style_properties, function in GtkWidget

gtk_widget_get_clipboard, function in GtkWidget

gtk_widget_get_display, function in GtkWidget

gtk_widget_get_root_window, function in GtkWidget

gtk_widget_get_screen, function in GtkWidget

gtk_widget_has_screen, function in GtkWidget

gtk_window_fullscreen, function in GtkWindow

gtk_window_get_screen, function in GtkWindow

gtk_window_get_skip_pager_hint, function in GtkWindow

gtk_window_get_skip_taskbar_hint, function in GtkWindow

gtk_window_set_auto_startup_notification, function in GtkWindow

gtk_window_set_default_icon_from_file, function in GtkWindow

gtk_window_set_icon_from_file, function in GtkWindow

gtk_window_set_screen, function in GtkWindow

gtk_window_set_skip_pager_hint, function in GtkWindow

gtk_window_set_skip_taskbar_hint, function in GtkWindow

gtk_window_unfullscreen, function in GtkWindow

          Generated by GTK-Doc V1.15