text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <meta name="viewport" content="width=, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Carreer</title>

    <meta charset="UTF-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

    <meta property="og:image" content="assets/images/ahs.png">
    <meta property="og:image:width" content="129">
    <meta property="og:image:height" content="129">

    <link rel="author" type="text/plain" href="/humans.txt">

    <link rel="dns-prefetch" href="//cdnjs.cloudflare.com">
    <link rel="dns-prefetch" href="//code.jquery.com">
    <link rel="dns-prefetch" href="//maxcdn.bootstrapcdn.com">

    <link rel="stylesheet" media="all" href="vendor/normalize/normalize.css">

    <link rel="stylesheet" media="all" href="css/fonts.css">
    <link rel="stylesheet" media="all" href="css/typography.css">
    <link rel="stylesheet" media="all" href="css/main.css">
    <link rel="stylesheet" media="all" href="css/grid.css">
    <link rel="stylesheet" media="all" href="css/carreer.css">

                        com'bo

WHAT WE DO

WHO WE ARE

PORTFOLIO

JOBS

CONTACT

JOBS

 Wij zijn op zoek naar jou!

Wil jij een plaatsje veroveren in ons team?

Graphic designer

Verlang jij naar een digitale job?
Je komt terecht in het team van zes geweldige dames, je bent creatief en ontwerpen ligt je nauw aan het hart. Een grafische vooropleiding is geen must maar wel zeker een pluspunt.

Je hebt kennis van de Adobe Creative Cloud als Illustrator, Photoshop en InDesign. Je kan goed functioneren in team, bent nauwkeurig en stelt stiptheid voorop!

                SOLLICITEER

Hoofd Communicatie

Neem jij graag de leiding en kan jij goed omgaan in teamverband?
Je bouwt de communicatiestrategie verder uit en bepaalt ook welke projecten hiervoor gerealiseerd moeten worden. Je staat in voor de interne en externe communicatie.
                    Het schrijven zit je in de vingers en je hebt kennis van de sociale mediakanalen.

                SOLLICITEER

com'bo © 2017 door Vanherck Bo


text:
<link rel="import" href="../../../bower_components/polymer/polymer.html">
<link rel="import" href="../../../behaviors/gr-patch-set-behavior/gr-patch-set-behavior.html">
<link rel="import" href="../../../styles/shared-styles.html">
<link rel="import" href="../../core/gr-navigation/gr-navigation.html">
<link rel="import" href="../../diff/gr-diff-mode-selector/gr-diff-mode-selector.html">
<link rel="import" href="../../diff/gr-patch-range-select/gr-patch-range-select.html">
<link rel="import" href="../../edit/gr-edit-controls/gr-edit-controls.html">
<link rel="import" href="../../shared/gr-editable-label/gr-editable-label.html">
<link rel="import" href="../../shared/gr-linked-chip/gr-linked-chip.html">
<link rel="import" href="../../shared/gr-rest-api-interface/gr-rest-api-interface.html">
<link rel="import" href="../../shared/gr-select/gr-select.html">
<link rel="import" href="../../shared/gr-button/gr-button.html">
<link rel="import" href="../../shared/gr-icons/gr-icons.html">
<link rel="import" href="../gr-file-list-constants.html">

<dom-module id="gr-file-list-header">
  <template>

        <template is="dom-if"
            if="[[showTitle]]">

Files

        </template>

          <gr-patch-range-select
              id="rangeSelect"
              change-comments="[[changeComments]]"
              change-num="[[changeNum]]"
              patch-num="[[patchNum]]"
              base-patch-num="[[basePatchNum]]"
              available-patches="[[allPatchSets]]"
              revisions="[[change.revisions]]"
              revision-info="[[revisionInfo]]"
              on-patch-range-change="_handlePatchChange">
          </gr-patch-range-select>

          <gr-commit-info
              change="[[change]]"
              server-config="[[serverConfig]]"
              commit-info="[[commitInfo]]"></gr-commit-info>

            Go to latest patch set

            <template
                is="dom-if"
                if="[[_patchsetDescription]]">
              <gr-linked-chip
                  id="descriptionChip"
                  text="[[_patchsetDescription]]"
                  removable="[[!_descriptionReadOnly]]"
                  on-remove="_handleDescriptionRemoved"></gr-linked-chip>
            </template>
            <template
                is="dom-if"
                if="[[!_patchsetDescription]]">
              <gr-editable-label
                  id="descriptionLabel"
                  uppercase
                  class="descriptionLabel"
                  label-text="Add patchset description"
                  value="[[_patchsetDescription]]"
                  placeholder="[[_computeDescriptionPlaceholder(_descriptionReadOnly)]]"
                  read-only="[[_descriptionReadOnly]]"
                  on-changed="_handleDescriptionChanged"></gr-editable-label>
            </template>

          <gr-edit-controls
              id="editControls"
              patch-num="[[patchNum]]"
              change="[[change]]"></gr-edit-controls>

          <gr-button link
              class="upload"
              on-tap="_handleUploadTap">Update Change</gr-button>

          <gr-button link
              class="download"
              on-tap="_handleDownloadTap">Download</gr-button>

          <gr-button link
              class="includedIn"
              on-tap="_handleIncludedInTap">Included In</gr-button>

        <template is="dom-if"
            if="[[_fileListActionsVisible(shownFileCount, _maxFilesForBulkActions)]]">
          <gr-button
              id="expandBtn"
              link
              on-tap="_expandAllDiffs">Expand All</gr-button>
          <gr-button
              id="collapseBtn"
              link
              on-tap="_collapseAllDiffs">Collapse All</gr-button>
        </template>
        <template is="dom-if"
            if="[[!_fileListActionsVisible(shownFileCount, _maxFilesForBulkActions)]]">

            Bulk actions disabled because there are too many files.

        </template>

          Diff view:
          <gr-diff-mode-selector
              id="modeSelect"
              mode="{{diffViewMode}}"
              save-on-change="[[!diffPrefsDisabled]]"></gr-diff-mode-selector>

            <gr-button
                link
                has-tooltip
                title="Diff preferences"
                class="prefsButton desktop"
                on-tap="_handlePrefsTap"><iron-icon icon="gr-icons:settings"></iron-icon></gr-button>

    <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
  </template>

</dom-module>

redpajama_set_name: RedPajamaGithub


text:
package com.swetha.easypark;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

import com.swetha.easypark.R;

public class SignUPActivity extends Activity
{
	EditText editTextUserName,editTextPassword,editTextConfirmPassword;
	Button btnCreateAccount;

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

		// get Instance  of Database Adapter
		easyParkLoginDBAdapter=new EasyParkLoginDBAdapter(this);
		easyParkLoginDBAdapter=easyParkLoginDBAdapter.open();

		// Get References of Views
		editTextUserName=(EditText)findViewById(R.id.editTextUserName);
		editTextPassword=(EditText)findViewById(R.id.editTextPassword);
		editTextConfirmPassword=(EditText)findViewById(R.id.editTextConfirmPassword);

		btnCreateAccount=(Button)findViewById(R.id.buttonCreateAccount);
		btnCreateAccount.setOnClickListener(new View.OnClickListener() {

		public void onClick(View v) {
			// TODO Auto-generated method stub

			String userName=editTextUserName.getText().toString();
			String password=editTextPassword.getText().toString();
			String confirmPassword=editTextConfirmPassword.getText().toString();

			// check if any of the fields are vacant
			if(userName.equals("")||password.equals("")||confirmPassword.equals(""))
			{
					Toast.makeText(getApplicationContext(), "Field Vacant", Toast.LENGTH_LONG).show();
					return;
			}
			// check if both password matches
			if(!password.equals(confirmPassword))
			{
				Toast.makeText(getApplicationContext(), "Password does not match", Toast.LENGTH_LONG).show();
				return;
			}
			else
			{
			    // Save the Data in Database
			    String returnString = easyParkLoginDBAdapter.insertEntry(userName, password);
			    Toast.makeText(getApplicationContext(), returnString, Toast.LENGTH_LONG).show();
			    Intent intent = new Intent(SignUPActivity.this, HomeActivity.class);
			    startActivity(intent);
			}
		}
	});
}
	@Override
	protected void onDestroy() {
		// TODO Auto-generated method stub
		super.onDestroy();

		easyParkLoginDBAdapter.close();
	}
}


text:
define(function () {
var Class = Class || (function (Object) {
  'use strict';

  /*! (C) Andrea Giammarchi - MIT Style License */

  var
    // shortcuts for minifiers and ES3 private keywords too
    CONSTRUCTOR = 'constructor',
    EXTENDS = 'extends',
    WITH = 'with',
    IMPLEMENTS = 'implements',
    INIT = 'init',
    PROTOTYPE = 'prototype',
    STATIC = 'static',
    SUPER = 'super',

    // used to copy non enumerable properties on IE
    nonEnumerables = [
      'hasOwnProperty',
      'isPrototypeOf',
      'propertyIsEnumerable',
      'toLocaleString',
      'toString',
      'valueOf'
    ],

    // IE < 9 bug only
    hasIEEnumerableBug = !{valueOf:0}[nonEnumerables[2]](nonEnumerables[5]),

    hOP = Object[nonEnumerables[0]],

    // basic ad-hoc private fallback for old browsers
    // use es5-shim if you want a properly patched Object.create polyfill
    create = Object.create || function (proto) {
      /*jshint newcap: false */
      var isInstance = this instanceof create;
      create[PROTOTYPE] = isInstance ? null : proto;
      return isInstance ? this : new create();
    },

    // redefined if not present
    defineProperty = Object.defineProperty,

    superRegExp = /create/.test(function () {
      create();
    }) ? /\bsuper\b/ : /.*/

  ;

  // verified broken IE8
  try {
    defineProperty({}, '{}', {});
  } catch(o_O) {
    defineProperty = function (object, name, descriptor) {
      object[name] = descriptor.value;
      return object;
    };
  }

  // copy all imported enumerable methods and properties
  function addMixins(mixins, target, inherits) {
    for (var
      source,
      init = [],
      i = 0; i < mixins.length; i++
    ) {
      source = mixins[i];
      if (hOP.call(source, INIT)) {
        init.push(source[INIT]);
      }
      copyEnumerables(source, target, inherits, false, false);
    }
    return init;
  }

  // configure enumerable source properties in the target
  function copyEnumerables(source, target, inherits, publicStatic, allowInit) {
    var key, i;
    for (key in source) {
      if (isNotASpecialKey(key, allowInit) && hOP.call(source, key)) {
        if (hOP.call(target, key)) {
          warn('duplicated: ' + key);
        }
        setProperty(inherits, target, key, source[key], publicStatic);
      }
    }
    if (hasIEEnumerableBug) {
      for (i = 0; i < nonEnumerables.length; i++) {
        key = nonEnumerables[i];
        if (hOP.call(source, key)) {
          setProperty(inherits, target, key, source[key], publicStatic);
        }
      }
    }
  }

  function define(target, key, value, publicStatic) {
    return defineProperty(target, key, {
      enumerable: publicStatic,
      configurable: !publicStatic,
      writable: !publicStatic,
      value: value
    });
  }

  function isNotASpecialKey(key, allowInit) {
    return  key !== CONSTRUCTOR &&
            key !== EXTENDS &&
            key !== IMPLEMENTS &&
            // Blackberry 7 and old WebKit bug only:
            //  user defined functions have
            //  enumerable prototype and constructor
            key !== PROTOTYPE &&
            key !== STATIC &&
            key !== SUPER &&
            key !== WITH &&
            (allowInit || key !== INIT);
  }

  // set a property via defineProperty using a common descriptor
  // only if properties where not defined yet.
  // If publicStatic is true, properties are both non configurable and non writable
  function setProperty(inherits, target, key, value, publicStatic) {
    if (publicStatic) {
      if (hOP.call(target, key)) {
        return target;
      }
    } else {
      if (typeof value === 'function' && superRegExp.test(value)) {
        value = wrap(inherits, target, key, value, publicStatic);
      }
    }
    return define(target, key, value, publicStatic);
  }

  function verifyImplementations(interfaces, target) {
    for (var
      current,
      key,
      i = 0; i < interfaces.length; i++
    ) {
      current = interfaces[i];
      for (key in current) {
        if (hOP.call(current, key) && !hOP.call(target, key)) {
          warn(key + ' is not implemented');
        }
      }
    }
  }

  function warn(message) {
    try {
      console.warn(message);
    } catch(meh) {
      /*\_(ツ)_*/
    }
  }

  function wrap(inherits, target, key, method, publicStatic) {
    return function () {
      if (!hOP.call(this, SUPER)) {
        // define it once in order to use
        // fast assignment every other time
        define(this, SUPER, null, publicStatic);
      }
      var
        previous = this[SUPER],
        current = (this[SUPER] = inherits[key]),
        result = method.apply(this, arguments)
      ;
      this[SUPER] = previous;
      return result;
    };
  }

  // Class({ ... })
  return function (description) {
    var
      hasConstructor = hOP.call(description, CONSTRUCTOR),
      constructor = hasConstructor ?
        description[CONSTRUCTOR] : function Class() {},
      hasParent = hOP.call(description, EXTENDS),
      parent = hasParent && description[EXTENDS],
      inherits = hasParent && typeof parent === 'function' ?
        parent[PROTOTYPE] : parent,
      prototype = hasParent ?
        setProperty(inherits, create(inherits), CONSTRUCTOR, constructor, false) :
        constructor[PROTOTYPE],
      mixins,
      length
    ;
    if (hOP.call(description, STATIC)) {
      // add new public static properties first
      copyEnumerables(description[STATIC], constructor, inherits, true, true);
    }
    if (hasParent) {
      // in case it's a function
      if (parent !== inherits) {
        // copy possibly inherited statics too
        copyEnumerables(parent, constructor, inherits, true, true);
      }
      constructor[PROTOTYPE] = prototype;
    }
    // add modules/mixins
    if (hOP.call(description, WITH)) {
      mixins = addMixins([].concat(description[WITH]), prototype, inherits);
      length = mixins.length;
      if (length) {
        constructor = (function (parent) {
          return function () {
            var i = 0;
            while (i < length) mixins[i++].call(this);
            return parent.apply(this, arguments);
          };
        }(constructor));
        constructor[PROTOTYPE] = prototype;
      }
    }
    // enrich the prototype
    copyEnumerables(description, prototype, inherits, false, true);
    if (hOP.call(description, IMPLEMENTS)) {
      verifyImplementations([].concat(description[IMPLEMENTS]), prototype);
    }
    return constructor;
  };

}(Object));
  return Class;

});


text:
#ifndef MrlServo_h
#define MrlServo_h

// servo event types
// ===== published sub-types based on device type begin ===
#define  SERVO_EVENT_STARTED          0
#define  SERVO_EVENT_STOPPED          1
// ===== published sub-types based on device type begin ===

/**
 * Servo Device
 */
class MrlServo : public Device {
  private:
    Servo* servo; // servo pointer - in case our device is a servo
    int pin;
    bool isMoving;
    bool isSweeping;
    int targetPosUs;
    float currentPosUs;
    int minUs;
    int maxUs;
    unsigned long lastUpdate;
    int velocity; // in deg/sec  |  velocity < 0 == no speed control
    int sweepStep;
    int acceleration;
    unsigned long moveStart;

  public:
    MrlServo(int deviceId);
    ~MrlServo();
    bool attach(byte pin, int initPos, int initVelocity);
    void attachPin(int pin);
    void detachPin();
    void update();
    // with speed control
    void moveToMicroseconds(int position);
    // without speed control ? necessary ?
    // void servoWriteMicroseconds(int position);
    void startSweep(int minUs, int maxUs, int step);
    void stopSweep();
    void stop();
    void setMaxVelocity(unsigned int velocity);
    void setVelocity(int velocity);
    void setAcceleration(int acceleration);
    void publishServoEvent(int type);
};

#endif


text:
var pageArray = ['1'];
var j=0;

function paginationInit(lastPage){
	$("#page").append("
");
	$(".pagination").append("
chevron_left
");
	$(".pagination").append("
1
");
	for(var i=2; i<=lastPage; i++){
		pageArray.push(i);
		$('.pagination').append("
"+i+"
");
	}
	$(".pagination").append("
chevron_right
");
	$(".pagination").append("
");
}

$("#page").on('click','li',function(){
	var previousPage= $(".active").attr('value');
	var value= $(this).attr('value')+"";
	if(value!="nex" && value!="prev"){
		$(this).addClass("active amber darken-2");
		$("#page"+pageArray[getActualPage(previousPage)]).removeClass('active amber darken-2');
		j=getActualPage(value);
		if(j!=0){
			var arrow= $(".disabled");
			arrow.addClass("waves-effect");
			arrow.removeClass("disabled");
		}
		if(j==pageArray.length-1){
			$("#next").addClass('disabled');
			$("#next").removeClass('waves-effect');
		}
		if(j==0){
			$("#previous").addClass('disabled');
			$("#previous").removeClass('waves-effect');
		}
	}
	else{
		if(value=='nex'){
			goNextPage();
		}
		else{
			goPreviousPage();
		}
	}
})

function getActualPage(value){
	var actualPage=0;
	for(var i=0; i<pageArray.length; i++){
		if(pageArray[i]==value){
			actualPage=i;
		}
	}
	return actualPage;
}

function goNextPage(){
	if(j!=pageArray.length-1){
		$("#page"+pageArray[j]).removeClass('active amber darken-2');
		j++;
		$("#page"+pageArray[j]).addClass('active amber darken-2');
		if(j==pageArray.length-1){
			$("#next").addClass('disabled');
			$("#next").removeClass('waves-effect');
		}
	}
	if($("#previous").attr('class')=="disabled"){
		$("#previous").addClass("waves-effect");
		$("#previous").removeClass("disabled");
	}
}

function goPreviousPage(){
	if(j!=0){
		$("#page"+pageArray[j]).removeClass('active amber darken-2');
		j--;
		$("#page"+pageArray[j]).addClass('active amber darken-2');
		if(j==0){
			$("#previous").addClass('disabled');
			$("#previous").removeClass('waves-effect');
		}
	}
	if($("#next").attr('class')=="disabled"){
		$("#next").addClass("waves-effect");
		$("#next").removeClass("disabled");
	}
}


text:
Zinc telluride, ZnTe

External links

Zinc telluride - Wikipedia


text:
package org.unitime.timetable.model.base;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import org.unitime.timetable.model.AcademicArea;
import org.unitime.timetable.model.PosMajor;
import org.unitime.timetable.model.PosMinor;
import org.unitime.timetable.model.Session;

/**
 * Do not change this class. It has been automatically generated using ant create-model.
 * @see org.unitime.commons.ant.CreateBaseModelFromXml
 */
public abstract class BaseAcademicArea implements Serializable {
	private static final long serialVersionUID = 1L;

	private Long iUniqueId;
	private String iExternalUniqueId;
	private String iAcademicAreaAbbreviation;
	private String iTitle;

	private Session iSession;
	private Set<PosMajor> iPosMajors;
	private Set<PosMinor> iPosMinors;

	public static String PROP_UNIQUEID = "uniqueId";
	public static String PROP_EXTERNAL_UID = "externalUniqueId";
	public static String PROP_ACADEMIC_AREA_ABBREVIATION = "academicAreaAbbreviation";
	public static String PROP_LONG_TITLE = "title";

	public BaseAcademicArea() {
		initialize();
	}

	public BaseAcademicArea(Long uniqueId) {
		setUniqueId(uniqueId);
		initialize();
	}

	protected void initialize() {}

	public Long getUniqueId() { return iUniqueId; }
	public void setUniqueId(Long uniqueId) { iUniqueId = uniqueId; }

	public String getExternalUniqueId() { return iExternalUniqueId; }
	public void setExternalUniqueId(String externalUniqueId) { iExternalUniqueId = externalUniqueId; }

	public String getAcademicAreaAbbreviation() { return iAcademicAreaAbbreviation; }
	public void setAcademicAreaAbbreviation(String academicAreaAbbreviation) { iAcademicAreaAbbreviation = academicAreaAbbreviation; }

	public String getTitle() { return iTitle; }
	public void setTitle(String title) { iTitle = title; }

	public Session getSession() { return iSession; }
	public void setSession(Session session) { iSession = session; }

	public Set<PosMajor> getPosMajors() { return iPosMajors; }
	public void setPosMajors(Set<PosMajor> posMajors) { iPosMajors = posMajors; }
	public void addToposMajors(PosMajor posMajor) {
		if (iPosMajors == null) iPosMajors = new HashSet<PosMajor>();
		iPosMajors.add(posMajor);
	}

	public Set<PosMinor> getPosMinors() { return iPosMinors; }
	public void setPosMinors(Set<PosMinor> posMinors) { iPosMinors = posMinors; }
	public void addToposMinors(PosMinor posMinor) {
		if (iPosMinors == null) iPosMinors = new HashSet<PosMinor>();
		iPosMinors.add(posMinor);
	}

	public boolean equals(Object o) {
		if (o == null || !(o instanceof AcademicArea)) return false;
		if (getUniqueId() == null || ((AcademicArea)o).getUniqueId() == null) return false;
		return getUniqueId().equals(((AcademicArea)o).getUniqueId());
	}

	public int hashCode() {
		if (getUniqueId() == null) return super.hashCode();
		return getUniqueId().hashCode();
	}

	public String toString() {
		return "AcademicArea["+getUniqueId()+"]";
	}

	public String toDebugString() {
		return "AcademicArea[" +
			"\n	AcademicAreaAbbreviation: " + getAcademicAreaAbbreviation() +
			"\n	ExternalUniqueId: " + getExternalUniqueId() +
			"\n	Session: " + getSession() +
			"\n	Title: " + getTitle() +
			"\n	UniqueId: " + getUniqueId() +
			"]";
	}
}


text:
<?php

require_once(HTML2PS_DIR.'box.generic.inline.php');

/**
 * @TODO: constructor required font properties to be known for the
 * "content" element; on the other side, "content" element may be one
 * without font properties defined/used. Currently, it is solved by
 * adding CSS_FONT and CSS_LETTER_SPACING to GenericFormattedBox::readCSS
 */
class BoxNoteCall extends GenericInlineBox {
  var $_note_number;
  var $_note_content;
  var $_note_marker_box;
  var $_note_call_box;

  function offset($dx, $dy) {
    parent::offset($dx, $dy);
    $this->_note_call_box->offset($dx, $dy);
  }

  function BoxNoteCall(&$content, &$pipeline) {
    $this->GenericInlineBox();

    $this->_note_content =& $content;

    $this->copy_style($content);
    $this->put_height_constraint(new HCConstraint(null, null, null));

    /**
     * Prepare ::note-call box
     */

    $this->_note_call_box = InlineBox::create_from_text(CSSListStyleType::format_number(LST_DECIMAL, 99),
                                                        WHITESPACE_NORMAL,
                                                        $pipeline);

    $this->_note_call_box->copy_style($content);
    $this->_note_call_box->content[0]->copy_style($content);

    $font = $this->_note_call_box->content[0]->getCSSProperty(CSS_FONT);
    $font = $font->copy();
    $font->size->scale(0.75);
    $this->_note_call_box->content[0]->setCSSProperty(CSS_FONT, $font);

    $this->_note_call_box->content[0]->setCSSProperty(CSS_VERTICAL_ALIGN, VA_SUPER);
    $this->_note_call_box->content[0]->setCSSProperty(CSS_LINE_HEIGHT, CSS::getDefaultValue(CSS_LINE_HEIGHT));

    /**
     * Prepare ::marker box
     */

    $this->_note_marker_box = InlineBox::create_from_text(CSSListStyleType::format_number(LST_DECIMAL, 99),
                                                          WHITESPACE_NORMAL,
                                                          $pipeline);

    $this->_note_marker_box->copy_style($content);
    $this->_note_marker_box->content[0]->copy_style($content);

    $font = $this->_note_marker_box->content[0]->getCSSProperty(CSS_FONT);
    $font = $font->copy();
    $font->size->scale(0.5);
    $this->_note_marker_box->content[0]->setCSSProperty(CSS_FONT, $font);

    $margin = $this->_note_marker_box->content[0]->getCSSProperty(CSS_MARGIN);
    $margin = $margin->copy();
    $margin->right = Value::fromData(FOOTNOTE_MARKER_MARGIN, UNIT_PT);
    $this->_note_marker_box->content[0]->setCSSProperty(CSS_MARGIN, $margin);

    $this->_note_marker_box->content[0]->setCSSProperty(CSS_VERTICAL_ALIGN, VA_SUPER);
    $this->_note_marker_box->content[0]->setCSSProperty(CSS_LINE_HEIGHT, CSS::getDefaultValue(CSS_LINE_HEIGHT));
  }

  function &create(&$content, &$pipeline) {
    $box = new BoxNoteCall($content, $pipeline);

    return $box;
  }

  function reflow(&$parent, &$context) {
    $parent->append_line($this->_note_call_box);

    $body = $parent;
    while ($body->parent) {
      $body = $body->parent;
    };

    /**
     * Reflow note content
     */
    $this->put_full_height(1000);
    $this->put_full_width($body->get_width());

    $this->_current_x = $this->get_left();
    $this->_current_y = $this->get_top();
    $this->_note_content->reflow($this, $context);

    $this->_current_x = $this->get_left();
    $this->_current_y = $this->get_top();
    $this->_note_marker_box->reflow($this, $context);

    $this->_current_x = $this->get_left();
    $this->_current_y = $this->get_top();
    $this->_note_call_box->reflow($this, $context);
    // This prevents note-call box from affecting line height
    $this->_note_call_box->put_full_height(0);

    /**
     * Reflow note-call itself
     */
    $this->put_full_height(0);
    $this->put_full_width(0);
    $this->guess_corner($parent);
    $parent->_current_x += $this->_note_call_box->content[0]->get_width();
    $this->_note_call_box->put_full_width($this->_note_call_box->content[0]->get_width());

    $this->_note_call_box->moveto($this->get_left(), $this->get_top());

//     $last =& $parent->last_in_line();
//     $last->note_call = true;

    return true;
  }

  function reflow_whitespace(&$linebox_started, &$previous_whitespace) {
    $ls = false;
    $pw = false;
    $this->_note_content->reflow_whitespace($ls, $pw);
  }

  function reflow_text(&$driver) {
    $this->_note_content->reflow_text($driver);
    $this->_note_marker_box->reflow_text($driver);
    $this->_note_call_box->reflow_text($driver);
    return true;
  }

  function _getFootnoteHeight(&$driver) {
    if ($driver->getFootnoteCount() == 0) {
      $footnote_height =
        $this->_note_content->get_full_height() +
        FOOTNOTE_LINE_TOP_GAP +
        FOOTNOTE_LINE_BOTTOM_GAP;
    } else {
      $footnote_height =
        $this->_note_content->get_full_height() +
        FOOTNOTE_GAP;
    };

    return $footnote_height;
  }

  function show(&$driver) {
    $footnote_height = $this->_getFootnoteHeight($driver);
    if (!$driver->willContain($this, $footnote_height)) {
      return true;
    };

    $driver->setFootnoteAreaHeight($driver->getFootnoteAreaHeight() + $footnote_height);
    $driver->setFootnoteCount($driver->getFootnoteCount() + 1);

    /**
     * Prepare box containing note number
     */
    $this->_note_number = $driver->getFootnoteCount();

    /**
     * Render reference number
     */
    $this->_note_call_box->content[0]->words[0] = CSSListStyleType::format_number(LST_DECIMAL,
                                                                                $this->_note_number);
    $this->_note_call_box->show_fixed($driver);

    return true;
  }

  function show_footnote(&$driver, $x, $y) {
    /**
     * Render note reference number
     */
    $this->_note_marker_box->content[0]->words[0] = CSSListStyleType::format_number(LST_DECIMAL,
                                                                                $this->_note_number);
    $this->_note_marker_box->moveto($x, $y);
    $this->_note_marker_box->show_fixed($driver);

    /**
     * Render note content
     */
    $this->_note_content->moveto($x + $this->_note_marker_box->content[0]->get_width()*0.75,
                                 $y);
    $this->_note_content->show_fixed($driver);

    return $y - $this->_note_content->get_full_height();
  }
}

?>


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Settings</title>
<meta name="date" content="2014-08-17">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

org.osate.xtext.aadl2.agcl.analysis.misc

Class Settings

java.lang.Object

org.osate.xtext.aadl2.agcl.analysis.misc.Settings

Direct Known Subclasses:

DefaultSettings

Deprecated.

@Deprecated
public class Settings
extends java.lang.Object

Objects of this class store general settings for the AGCL plug-in. These are:

 projectDir: the project directory ("project.dir" in settings.conf)

 templatesDir: the templates directory ("templates.dir" in settings.conf)

 nusmvSessionTemplate: the NuSMV session script template ("templates.nusmv.session_script" in settings.conf)

The reason to have a Settings class and not just a Properties class is that
 this class provides its clients with normalized, absolute paths according to the runtime platform,
 whereas the Properties class simply stores plain String values for these paths,
 which may not be platform-independent.

Author:

Ernesto Posse

Field Summary

Fields

Modifier and Type
Field and Description

static java.lang.String[]
propertyAttr

Deprecated.

static java.lang.String[]
propertyKeys

Deprecated.

Constructor Summary

Constructors

Constructor and Description

Settings()

Deprecated.

Method Summary

Methods

Modifier and Type
Method and Description

java.nio.file.Path
getAbsNusmvSessionTemplateFilePath()

Deprecated.

java.nio.file.Path
getAbsTemplatePath()

Deprecated.

java.lang.String
getAnalysisResultsDir()

Deprecated.

java.util.Map<java.lang.String,java.lang.String>
getKeys()

Deprecated.

java.lang.String
getNusmvSessionScript()

Deprecated.

java.lang.String
getNusmvSessionTemplate()

Deprecated.

java.lang.String
getProjectDir()

Deprecated.

Returns the project directory.

org.eclipse.core.resources.IProject
getSelectedProject(org.eclipse.ui.IWorkbenchWindow window)

Deprecated.

java.lang.String
getTemplatesDir()

Deprecated.

void
setAnalysisResultsDir(java.lang.String analysisResultsDir)

Deprecated.

void
setNusmvSessionScript(java.lang.String nusmvSessionScript)

Deprecated.

void
setNusmvSessionTemplate(java.lang.String nusmvSessionTemplate)

Deprecated.

void
setProjectDir(java.lang.String projectDir)

Deprecated.

void
setTemplatesDir(java.lang.String templatesDir)

Deprecated.

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

propertyKeys

public static final java.lang.String[] propertyKeys

Deprecated.

propertyAttr

public static final java.lang.String[] propertyAttr

Deprecated.

Constructor Detail

Settings

public Settings()

Deprecated.

Method Detail

getSelectedProject

public org.eclipse.core.resources.IProject getSelectedProject(org.eclipse.ui.IWorkbenchWindow window)

Deprecated.

Returns:

The project of the currently selected object, or null if none is selected.

getAbsNusmvSessionTemplateFilePath

public java.nio.file.Path getAbsNusmvSessionTemplateFilePath()

Deprecated.

Returns:

the absolute path to the nusmv template file

getAbsTemplatePath

public java.nio.file.Path getAbsTemplatePath()

Deprecated.

Returns:

the absolute path of the templates directory

getAnalysisResultsDir

public java.lang.String getAnalysisResultsDir()

Deprecated.

Returns:

the analysisResultsDir

getKeys

public java.util.Map<java.lang.String,java.lang.String> getKeys()

Deprecated.

Returns:

the keys

getNusmvSessionScript

public java.lang.String getNusmvSessionScript()

Deprecated.

Returns:

the nusmvSessionScript

getNusmvSessionTemplate

public java.lang.String getNusmvSessionTemplate()

Deprecated.

Returns:

the nusmvTemplateFile

getProjectDir

public java.lang.String getProjectDir()

Deprecated.

Returns the project directory. If the project directory is null then it sets the directory to
 the currently selected project from the workspace and returns this selection. Note that the directory
 is not null if it was previously set when loading the settings file.

Returns:

the projectDir

See Also:

ConfigManager.assignSettingsToProperties()

getTemplatesDir

public java.lang.String getTemplatesDir()

Deprecated.

Returns:

the templatesDir

setAnalysisResultsDir

public void setAnalysisResultsDir(java.lang.String analysisResultsDir)

Deprecated.

Parameters:

analysisResultsDir - the analysisResultsDir to set

setNusmvSessionScript

public void setNusmvSessionScript(java.lang.String nusmvSessionScript)

Deprecated.

Parameters:

nusmvSessionScript - the nusmvSessionScript to set

setNusmvSessionTemplate

public void setNusmvSessionTemplate(java.lang.String nusmvSessionTemplate)

Deprecated.

Parameters:

nusmvTemplateFile - the nusmvTemplateFile to set

setProjectDir

public void setProjectDir(java.lang.String projectDir)

Deprecated.

Parameters:

projectDir - the projectDir to set

setTemplatesDir

public void setTemplatesDir(java.lang.String templatesDir)

Deprecated.

Parameters:

templatesDir - the templatesDir to set

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2016 The WatchDesigner team

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

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

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  -->
<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">

    <android.support.design.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <fragment
                android:id="@+id/fraGrid"
                android:name="com.iopixel.watchface.wear.app.main.grid.WatchfaceGridFragment"
                android:layout_width="match_parent"
                android:layout_height="0px"
                android:layout_weight="1"
                tools:layout="@layout/watchface_grid" />

            <include
                android:id="@+id/conPersistentSnackbar"
                layout="@layout/main_persistent_snackbar" />
        </LinearLayout>

        <FrameLayout
            android:id="@+id/conLoading"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="?android:windowBackground"
            android:visibility="gone">

            <ProgressBar
                style="?android:attr/progressBarStyleLarge"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center" />

        </FrameLayout>

    </android.support.design.widget.CoordinatorLayout>
</layout>


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <base data-ice="baseUrl" href="../../">
  <title data-ice="title">Highendrawer | highendrawer</title>
  <link type="text/css" rel="stylesheet" href="css/style.css">
  <link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css">

<meta name="description" content="Highendrawer provides javascript and css drawers to your website and applications."><meta property="twitter:card" content="summary"><meta property="twitter:title" content="highendrawer"><meta property="twitter:description" content="Highendrawer provides javascript and css drawers to your website and applications.">

  Home
  Manual
  Reference
  Source

    <input class="search-input">

CHighendrawer

FaddEventListenerWithOptions

FgenerateId

FhasStyle

FisHTMLElement

FsetStyle

FunsetStyle

FisArray

FucFirst

VDEFAULT_DRAWER_PROPERTY

VDEFAULT_OVERLAY_PROPERTY

VDEFAULT_PROCESS

VDRAWER_STYLE

VOVERLAY_STYLE

VPREFIX

VTOUCH_EVENTS

VTRANSITION_STYLE

Vsupport

TDrawer

TOverlay

import Highendrawer from 'highendrawer/src/highendrawer.js'

  public
  class

  | source

Highendrawer

Class providing a drawer function.

Example:

var drawer = new Highendrawer({
  element: document.getElementById('drawer')
});

Constructor Summary

Public Constructor

      public

          constructor(drawer: Drawer)

Initialize object.

Member Summary

Public Members

      public

          state: string

Drawer status ('open' or 'close')

Private Members

      private

          _drawer: *

      private

          _enabled: boolean

      private

          _handler: *

      private

          _id: *

      private

          _intervalId: *

      private

          _overlay: *

      private

          _position: *

      private

          _process: *

      private

          _sizePixel: *

      private

          _timeoutId: *

Method Summary

Public Methods

      public

          close(duration: number, isFireEvent: boolean, isChangeHistory: boolean): Promise

Close drawer.

      public

          create()

Create the drawer set.

      public

          destroy()

Destroy the drawer set.

      public

          open(duration: number, isFireEvent: boolean, isChangeHistory: boolean): Promise

Open drawer.

      public

          toggle(duration: number, isFireEvent: boolean, isChangeHistory: boolean): Promise

Toggle drawer.

Private Methods

      private

          _changeOverlayState(state: string)

Change overlay state.

      private

          _changeState(position: number, duration: number, callbacks: Object, isChangeHistory: boolean): Promise

Return whether or not a valid touch.

      private

          _convertPixelAbs(value: string | number): number

Return a value converted to the absolute value of the pixel.

      private

          _createDrawer()

Create drawer.

      private

          _createOverlay()

Create overlay.

      private

          _cssAnimate(duration: number)

Make animation with CSS3.

      private

          _destroyDrawer()

Destroy drawer.

      private

          _destroyOverlay()

Destroy overlay.

      private

          _getDistance(moveInfo: Object): number

Return the distance of the drawer.

      private

          _getDrawerHandler(): Object

Return drawer event handler.

      private

          _getDrawerPositionFromStyle(): number

Return the position in the style.

      private

          _getDrawerPositionFromTouches(touchbasis: Object, touchlast: Object): number

Return the position of the drawer.

      private

          _getDrawerStyle(position: number, duration: number): Object

Return style for moving the drawer.

      private

          _getInitDrawerStyle(): Object

Return initial style of drawer.

      private

          _getMinPosition(): number

Return to the minimum position for the drawer.

      private

          _getOverlayOpacityFromPosition(position: number): number

Return the opacity of the overlay.

      private

          _getOverlayOpacityFromStyle(): number

Return the opacity in the style.

      private

          _getOverlayStyle(opacity: float, duration: number): Object

Return style for moving the overlay.

      private

          _getRange(value: string | number): Object

Return the swipe range.

      private

          _getStateFromPosition(): string

Return the state of the drawer.

      private

          _getTouchMoveInfo(touchbasis: Object, touchlast: Object): Object

Return the information of touch move.

      private

          _getTouchMoveState(): string

Return state by touch movement.

      private

          _handleCallback(promise: Promise, callbacks: Object): Promise

Return the information of touch move.

      private

          _hideDrawer()

Hide drawer.

      private

          _hideOverlay()

Hide overlay.

      private

          _isTouchDirectionActive(): boolean

Return whether or not a valid touch direction.

      private

          _isTouchPointActive(): boolean

Return whether or not a valid touch point.

      private

          _jsAnimate(duration: number)

Make animation with Javascript.

      private

          _normalizeNumber(value: string | number): Object

Return the numeric normalized information.

      private

          _normalizePixel(value: string | number): number

Return the normalized pixel value.

      private

          _onTouchFinish(ev: Event)

Touch finish event handler.

      private

          _onTouchMove(ev: Event)

Touch move event handler.

      private

          _onTouchStart(ev: Event)

Touch start event handler.

      private

          _resetDrawer(isUnset: boolean)

Reset drawer.

      private

          _setProps()

Set properties.

      private

          _showDrawer()

Show drawer.

      private

          _showOverlay()

Show overlay.

      private

          _touchHandler(ev: Event): boolean

Touch event handler.

Public Constructors

    public

    constructor(drawer: Drawer)

      source

Initialize object.

Params:

Name	Type	Attribute	Description

      drawer
      Drawer

Initial parameters of drawer.

Public Members

    public

    state: string

      source

Drawer status ('open' or 'close')

Private Members

    private

    _drawer: *

      source

    private

    _enabled: boolean

      source

    private

    _handler: *

      source

    private

    _id: *

      source

    private

    _intervalId: *

      source

    private

    _overlay: *

      source

    private

    _position: *

      source

    private

    _process: *

      source

    private

    _sizePixel: *

      source

    private

    _timeoutId: *

      source

Public Methods

    public

    close(duration: number, isFireEvent: boolean, isChangeHistory: boolean): Promise

      source

Close drawer.

Params:

Name	Type	Attribute	Description

      duration
      number

optional

Drawer moving time.

      isFireEvent
      boolean

optional

Whether to fire an event on the drawer.

      isChangeHistory
      boolean

optional

default: false

Make a change in history.

Return:

          Promise

Promise object for close.

    public

    create()

      source

Create the drawer set.

    public

    destroy()

      source

Destroy the drawer set.

    public

    open(duration: number, isFireEvent: boolean, isChangeHistory: boolean): Promise

      source

Open drawer.

Params:

Name	Type	Attribute	Description

      duration
      number

optional

Drawer moving time.

      isFireEvent
      boolean

optional

Whether to fire an event on the drawer.

      isChangeHistory
      boolean

optional

default: false

Make a change in history.

Return:

          Promise

Promise object for open.

    public

    toggle(duration: number, isFireEvent: boolean, isChangeHistory: boolean): Promise

      source

Toggle drawer.

Params:

Name	Type	Attribute	Description

      duration
      number

optional

Drawer moving time.

      isFireEvent
      boolean

optional

Whether to fire an event on the drawer.

      isChangeHistory
      boolean

optional

default: false

Make a change in history.

Return:

          Promise

Promise object for toggle.

Private Methods

    private

    _changeOverlayState(state: string)

      source

Change overlay state.

Params:

Name	Type	Attribute	Description

      state
      string

Drawer status ('open' or 'close')

    private

    _changeState(position: number, duration: number, callbacks: Object, isChangeHistory: boolean): Promise

      source

Return whether or not a valid touch.

Params:

Name	Type	Attribute	Description

      position
      number

Moving position.

      duration
      number

optional

default: null

Drawer moving time.

      callbacks
      Object

optional

default: null

Callback objects.

      isChangeHistory
      boolean

optional

default: false

Make a change in history.

Return:

          Promise

Promise object.

    private

    _convertPixelAbs(value: string | number): number

      source

Return a value converted to the absolute value of the pixel.

Params:

Name	Type	Attribute	Description

      value
      string | number

Target value.

Return:

          number

Converted to the absolute value of the pixel.

Throw:

Error

Is thrown if direction value is invalid.

    private

    _createDrawer()

      source

Create drawer.

    private

    _createOverlay()

      source

Create overlay.

    private

    _cssAnimate(duration: number)

      source

Make animation with CSS3.

Params:

Name	Type	Attribute	Description

      duration
      number

Drawer moving time.

    private

    _destroyDrawer()

      source

Destroy drawer.

    private

    _destroyOverlay()

      source

Destroy overlay.

    private

    _getDistance(moveInfo: Object): number

      source

Return the distance of the drawer.

Params:

Name	Type	Attribute	Description

      moveInfo
      Object

Movement information of the drawer.

Return:

          number

Distance of the drawer.

Throw:

Error

Is thrown if direction value is invalid.

    private

    _getDrawerHandler(): Object

      source

Return drawer event handler.

Return:

          Object

Drawer event handler.

    private

    _getDrawerPositionFromStyle(): number

      source

Return the position in the style.

Return:

          number

Position in the style.

    private

    _getDrawerPositionFromTouches(touchbasis: Object, touchlast: Object): number

      source

Return the position of the drawer.

Params:

Name	Type	Attribute	Description

      touchbasis
      Object

Basic touch information.

      touchlast
      Object

Last touch information.

Return:

          number

Position of the drawer.

    private

    _getDrawerStyle(position: number, duration: number): Object

      source

Return style for moving the drawer.

Params:

Name	Type	Attribute	Description

      position
      number

Moving position.

      duration
      number

optional

Drawer moving time.

Return:

          Object

Move style for drawer.

    private

    _getInitDrawerStyle(): Object

      source

Return initial style of drawer.

Return:

          Object

Style for drawer.

    private

    _getMinPosition(): number

      source

Return to the minimum position for the drawer.

Return:

          number

Minimum position for the drawer.

Throw:

Error

Is thrown if direction value is invalid.

    private

    _getOverlayOpacityFromPosition(position: number): number

      source

Return the opacity of the overlay.

Params:

Name	Type	Attribute	Description

      position
      number

Moving position.

Return:

          number

Position of the drawer.

    private

    _getOverlayOpacityFromStyle(): number

      source

Return the opacity in the style.

Return:

          number

Opacity in the style.

    private

    _getOverlayStyle(opacity: float, duration: number): Object

      source

Return style for moving the overlay.

Params:

Name	Type	Attribute	Description

      opacity
      float

Overlay opacity.

      duration
      number

optional

Drawer moving time.

Return:

          Object

Move style for overlay.

    private

    _getRange(value: string | number): Object

      source

Return the swipe range.

Params:

Name	Type	Attribute	Description

      value
      string | number

Target swipe area value.

Return:

          Object

Drag range.

Throw:

Error

Is thrown if direction value is invalid.

    private

    _getStateFromPosition(): string

      source

Return the state of the drawer.

Return:

          string

State of the drawer.

    private

    _getTouchMoveInfo(touchbasis: Object, touchlast: Object): Object

      source

Return the information of touch move.

Params:

Name	Type	Attribute	Description

      touchbasis
      Object

Basic touch information.

      touchlast
      Object

Last touch information.

Return:

          Object

Movement distance of the x, y direction, movement direction.

    private

    _getTouchMoveState(): string

      source

Return state by touch movement.

Return:

          string

State by touch movement.

    private

    _handleCallback(promise: Promise, callbacks: Object): Promise

      source

Return the information of touch move.

Params:

Name	Type	Attribute	Description

      promise
      Promise

Promise instance.

      callbacks
      Object

Callback function with the key to 'done', 'fail', 'always' (each optional).

Return:

          Promise

Promise instance.

    private

    _hideDrawer()

      source

Hide drawer.

    private

    _hideOverlay()

      source

Hide overlay.

    private

    _isTouchDirectionActive(): boolean

      source

Return whether or not a valid touch direction.

Return:

          boolean

Result of valid touch direction.

    private

    _isTouchPointActive(): boolean

      source

Return whether or not a valid touch point.

Return:

          boolean

Result of valid touch point.

    private

    _jsAnimate(duration: number)

      source

Make animation with Javascript.

Params:

Name	Type	Attribute	Description

      duration
      number

Drawer moving time.

    private

    _normalizeNumber(value: string | number): Object

      source

Return the numeric normalized information.

Params:

Name	Type	Attribute	Description

      value
      string | number

Target value.

Return:

          Object

Numeric normalized information.

Throw:

Error

Is thrown if value is invalid.

    private

    _normalizePixel(value: string | number): number

      source

Return the normalized pixel value.

Params:

Name	Type	Attribute	Description

      value
      string | number

Target value.

Return:

          number

Normalized pixel value.

Throw:

Error

Is thrown if direction value is invalid.

    private

    _onTouchFinish(ev: Event)

      source

Touch finish event handler.

Params:

Name	Type	Attribute	Description

      ev
      Event

Touch event object.

    private

    _onTouchMove(ev: Event)

      source

Touch move event handler.

Params:

Name	Type	Attribute	Description

      ev
      Event

Touch event object.

    private

    _onTouchStart(ev: Event)

      source

Touch start event handler.

Params:

Name	Type	Attribute	Description

      ev
      Event

Touch event object.

    private

    _resetDrawer(isUnset: boolean)

      source

Reset drawer.

Params:

Name	Type	Attribute	Description

      isUnset
      boolean

optional

Unset style.

    private

    _setProps()

      source

Set properties.

    private

    _showDrawer()

      source

Show drawer.

    private

    _showOverlay()

      source

Show overlay.

    private

    _touchHandler(ev: Event): boolean

      source

Touch event handler.

Params:

Name	Type	Attribute	Description

      ev
      Event

Touch event object.

Return:

          boolean

Event bubbling.

  Generated by ESDoc(1.0.4)


text:
import Layer from '../src/ol/layer/Layer.js';
import Map from '../src/ol/Map.js';
import Source from '../src/ol/source/Source.js';
import View from '../src/ol/View.js';
import Worker from 'worker-loader!./offscreen-canvas.worker.js'; //eslint-disable-line
import stringify from 'json-stringify-safe';
import {FullScreen} from '../src/ol/control.js';
import {compose, create} from '../src/ol/transform.js';
import {createXYZ} from '../src/ol/tilegrid.js';
import {toString as toTransformString} from '../src/ol/transform.js';

const worker = new Worker();

let container,
  transformContainer,
  canvas,
  rendering,
  workerFrameState,
  mainThreadFrameState;

// Transform the container to account for the differnece between the (newer)
// main thread frameState and the (older) worker frameState
function updateContainerTransform() {
  if (workerFrameState) {
    const viewState = mainThreadFrameState.viewState;
    const renderedViewState = workerFrameState.viewState;
    const center = viewState.center;
    const resolution = viewState.resolution;
    const rotation = viewState.rotation;
    const renderedCenter = renderedViewState.center;
    const renderedResolution = renderedViewState.resolution;
    const renderedRotation = renderedViewState.rotation;
    const transform = create();
    // Skip the extra transform for rotated views, because it will not work
    // correctly in that case
    if (!rotation) {
      compose(
        transform,
        (renderedCenter[0] - center[0]) / resolution,
        (center[1] - renderedCenter[1]) / resolution,
        renderedResolution / resolution,
        renderedResolution / resolution,
        rotation - renderedRotation,
        0,
        0
      );
    }
    transformContainer.style.transform = toTransformString(transform);
  }
}

const map = new Map({
  layers: [
    new Layer({
      render: function (frameState) {
        if (!container) {
          container = document.createElement('div');
          container.style.position = 'absolute';
          container.style.width = '100%';
          container.style.height = '100%';
          transformContainer = document.createElement('div');
          transformContainer.style.position = 'absolute';
          transformContainer.style.width = '100%';
          transformContainer.style.height = '100%';
          container.appendChild(transformContainer);
          canvas = document.createElement('canvas');
          canvas.style.position = 'absolute';
          canvas.style.left = '0';
          canvas.style.transformOrigin = 'top left';
          transformContainer.appendChild(canvas);
        }
        mainThreadFrameState = frameState;
        updateContainerTransform();
        if (!rendering) {
          rendering = true;
          worker.postMessage({
            action: 'render',
            frameState: JSON.parse(stringify(frameState)),
          });
        } else {
          frameState.animate = true;
        }
        return container;
      },
      source: new Source({
        attributions: [
          '© MapTiler',
          '© OpenStreetMap contributors',
        ],
      }),
    }),
  ],
  target: 'map',
  view: new View({
    resolutions: createXYZ({tileSize: 512}).getResolutions(),
    center: [0, 0],
    zoom: 2,
  }),
});
map.addControl(new FullScreen());

map.on('pointermove', function (evt) {
  if (evt.dragging) {
    return;
  }
  const pixel = map.getEventPixel(evt.originalEvent);
  worker.postMessage({
    action: 'requestFeatures',
    pixel: pixel,
  });
});

// Worker messaging and actions
worker.addEventListener('message', (message) => {
  if (message.data.action === 'loadImage') {
    // Image loader for ol-mapbox-style
    const image = new Image();
    image.crossOrigin = 'anonymous';
    image.addEventListener('load', function () {
      createImageBitmap(image, 0, 0, image.width, image.height).then(
        (imageBitmap) => {
          worker.postMessage(
            {
              action: 'imageLoaded',
              image: imageBitmap,
              src: message.data.src,
            },
            [imageBitmap]
          );
        }
      );
    });
    image.src = message.data.src;
  } else if (message.data.action === 'getFeatures') {
    showInfo(message.data.features);
  } else if (message.data.action === 'requestRender') {
    // Worker requested a new render frame
    map.render();
  } else if (canvas && message.data.action === 'rendered') {
    // Worker provies a new render frame
    requestAnimationFrame(function () {
      const imageData = message.data.imageData;
      canvas.width = imageData.width;
      canvas.height = imageData.height;
      canvas.getContext('2d').drawImage(imageData, 0, 0);
      canvas.style.transform = message.data.transform;
      workerFrameState = message.data.frameState;
      updateContainerTransform();
    });
    rendering = false;
  }
});

const info = document.getElementById('info');
function showInfo(propertiesFromFeatures) {
  if (propertiesFromFeatures.length == 0) {
    info.innerText = '';
    info.style.opacity = 0;
    return;
  }
  const properties = propertiesFromFeatures.map((e) =>
    Object.keys(e)
      .filter((key) => !key.includes(':'))
      .reduce((newObj, currKey) => ((newObj[currKey] = e[currKey]), newObj), {})
  );
  info.innerText = JSON.stringify(properties, null, 2);
  info.style.opacity = 1;
}


text:
package com.blnz.fxpl.core;

import com.blnz.fxpl.*;

import com.blnz.fxpl.xform.XForm;
import com.blnz.fxpl.xform.TransformException;

import com.blnz.xsl.om.Node;
import com.blnz.xsl.om.NodeExtension;
import com.blnz.xsl.om.ExtensionContext;
import com.blnz.xsl.om.NodeExtensionFactory;
import com.blnz.xsl.sax2.SAXTwoOMBuilder;
import com.blnz.xsl.tr.LoadContext;

import org.xml.sax.XMLReader;
import org.xml.sax.SAXException;
import org.xml.sax.ContentHandler;
import org.xml.sax.InputSource;
import org.xml.sax.helpers.AttributesImpl;

import org.w3c.dom.Document;
import org.w3c.dom.Element;

import javax.xml.parsers.DocumentBuilder;

import java.sql.Statement;

import java.text.DateFormat;

import java.util.Hashtable;
import java.util.Date;
import java.util.Enumeration;

import java.io.StringReader;
import java.io.IOException;

/**
 * The FX language processor configured with mappings
 * from Element names to classes which implement the
 * commands' semantics.
 */
public class XProcessorImpl implements XProcessor
{
    protected FXRequest _request = null;

    protected SimpleElementFactory _myNodeExtensionFactory = null;
    protected SimpleElementFactory _myResponseFactory = null;

    // number of currently active "eval" calls
    protected static int _activeProcesses = 0;

    protected static Hashtable _processTable = new Hashtable();

    protected String _urlString  = null;

    protected String _userID = null;
    protected String _connectionID = null;
    protected String _certificate = null;

    /**
     *
     */
    public XProcessorImpl()
    { init(null); }

    /**
     * @param factory an NodeExtensionFactory for the FX Command
     * objects appropriate to FX element names
     */
    public XProcessorImpl(SimpleElementFactory factory)
    { init(factory); }

    /**
     * @param factory an Object factory for the FX Command
     * objects appropriate to FX element names
     */
    private void init(SimpleElementFactory factory)
    {
        _myNodeExtensionFactory = factory;
        _myResponseFactory = factory;
    }

    /**
     *
     */
    public void setRequestFactory(SimpleElementFactory fact)
    { _myNodeExtensionFactory = fact; }

    /**
     *
     */
    public void setResponseFactory(SimpleElementFactory fact)
    { _myResponseFactory = fact; }

    public void setURL(String url)
    { _urlString = url; }

    /**
     *
     */
    public void setCredentials(String userID, String connectionID, String certificate)
    {
        _userID = userID;
        _connectionID = connectionID;
        _certificate = certificate;
    }
    /**
     * create an initial context for a request
     */
    public FXContext createContext()
    {
        return new FXContextImpl();
    }

    /**
     * returns the number of FX processes which are being processed
     * by instances of this class at this moment
     */
    public int getActiveProcessCount()
    { return _processTable.size(); }

    /**
     * evaluate the request
     */
    public void eval(FXContext context,
                     Node request,
                     ContentHandler responseTarget)
	throws Exception
    {

        //        System.out.println("XprocessorImpl::eval(context, request, response) entry " + request.getName().getLocalPart() + " === " + request.getNodeExtension().getClass().getName());
        // note an active evaluation thread
        ++_activeProcesses;
        recordThread();
        responseTarget.startDocument();

        // System.out.println("XprocessorImpl::eval(context, request, response) 1");

        NodeExtension ne = request.getNodeExtension();
        // System.out.println("XprocessorImpl::eval(context, request, response) 3");
        ne.eval(responseTarget, context);

        // System.out.println("XprocessorImpl::eval(context, request, response) 4");
        responseTarget.endDocument();
        removeThread();
        // System.out.println("XprocessorImpl::eval(context, request, response) 6");
        // evaluation thread finished
        --_activeProcesses;
        // System.out.println("XprocessorImpl::eval(context, request, response) exit");
    }

    /**
     *
     */
    public Node compile(XMLReader reader, InputSource src)
        throws SAXException, TransformException, IOException
    {
        return getRequest(reader, src);
    }

    /**
     * evaluate the request
     */
    public void eval(FXContext context,
                     XMLReader reader,
                     InputSource src,
                     ContentHandler responseTarget)
	throws Exception
    {
        if (reader == null) {
            throw new Exception("no reader for request");
        }

        Node request = getRequest(reader, src);

        if (request == null) {
            throw new Exception("null request");
        }
        eval(context, request, responseTarget);
    }

    /**
     * evaluate the request, constructing a OM result with
     * the default NodeExtensionFactory
     */
    public Node evalToResponse(FXContext ctx, Node request)
	throws Exception
    {
        if (request == null) {
            throw new Exception("FXRequest is null");
        }
        Node docNode = evalToOM(_myResponseFactory, ctx, request);

        return Util.rootElement(docNode);

    }

    /**
     * evaluate the request, constructing a DOM result with
     * the default NodeExtensionFactory
     */
    public Node evalToResponse(FXContext ctx, XMLReader reader,
                               InputSource src)
	throws Exception
    {
        return evalToResponse(ctx, getRequest(reader, src));
    }

    /**
     * evaluate the request, constructing a DOM result with
     * a custom elementFactory
     */
    private Node evalToOM(LoadContext factory, FXContext ctx, Node request)
	throws Exception
    {
        if (request == null) {
            throw new Exception("null FX request");
        }

        SAXTwoOMBuilder dw = XForm.createOMWriter(factory);
        eval(ctx, request, dw);
        return dw.getRootNode();
    }

    //
    //
    private Node getRequest(XMLReader sourceStream,
                            InputSource input)
        throws TransformException, SAXException, IOException
    {

        SAXTwoOMBuilder db =
            XForm.createOMWriter(_myNodeExtensionFactory);

        sourceStream.setContentHandler(db);
        sourceStream.parse(input);

        Node docNode = db.getRootNode();

        if (docNode == null) {
            throw new TransformException("unable to build OM from request");
        }
        return Util.rootElement(docNode);

    }

    /**
     *
     */
    private void removeThread()
    {

        Thread t = Thread.currentThread();

        ThreadInfo ti = (ThreadInfo) _processTable.get(t.getName());

        if (ti == null) {

        } else {
            ti.decrementProcessorCount();
            if (ti.getProcessorCount() == 0) {

                _processTable.remove(t.getName());

            }
        }
    }

    /**
     *
     */
    public void setThreadProperty(String propName, Object value)
    {
        Thread current = Thread.currentThread();
        String threadName = current.getName();

        ThreadInfo ti = (ThreadInfo) _processTable.get(threadName);

        if (ti == null) {

        } else {

            ti.setProperty(propName, value);
        }
    }

    /**
     *
     */
    public void listProcesses(ContentHandler ch)
        throws SAXException
    {

        AttributesImpl atts = new AttributesImpl();
        ch.startElement("", "activeProcesses", "activeProcesses", atts);

        Enumeration tiEnum = _processTable.elements();

        while (tiEnum.hasMoreElements()) {
            ThreadInfo ti = (ThreadInfo) tiEnum.nextElement();
            ti.asXML(ch);
        }

        ch.endElement("", "activeProcesses", "activeProcesses");

    }

    /**
     *
     */
    private void recordThread()
    {

        Thread t = Thread.currentThread();

        ThreadInfo ti = (ThreadInfo) _processTable.get(t.getName());
        if (ti == null) {
            ti = new ThreadInfo(t);
            _processTable.put(t.getName(), ti);

        }
        ti.addProcessorCount();

    }

    /**
     *  interrupts a running process
     */
    public void interruptProcess(String processName,
                                 String processId)
        throws Exception
    {

        ThreadInfo ti = (ThreadInfo) _processTable.get(processName);

        if (ti == null ) {
            throw new Exception("Process: " + processName + " not found");
        }

        if (!processId.equals("" + ti.getStartTime())) {
            throw new Exception("Process: " + processName +
                                " does not have id: " + processId);

        }

        Thread t = ti.getThread();

        //        t.interrupt();

        if ( t == Thread.currentThread() ) {
            throw new Exception("a thread should not kill itself");
        }

        if (!t.isAlive()) {

        } else {
            Statement stmt = (Statement) ti.getProperty("statement");
            if (stmt != null) {
                stmt.cancel();
            }

            t.interrupt();
        }

        _processTable.remove(processName);

    }

    /**
     * records some information related to an FX Processor thread
     */
    private class ThreadInfo
    {
        private Hashtable _properties = new Hashtable();
        private long _startTime;
        private Thread _thread = null;
        private int _xProcessors = 0;

        /**
         *
         */
        public ThreadInfo(Thread t)
        {
            _thread = t;
            _startTime = System.currentTimeMillis();
        }

        /**
         *
         */
        public void setProperty(String key, Object value)
        {
            if (value == null) {
                _properties.put(key, value);
            } else {
                _properties.remove(key);
            }
        }

        /**
         *
         */
        public Object getProperty(String key)
        {
            return _properties.get(key);
        }

        /**
         *
         */
        public Thread getThread()
        {
            return _thread;
        }

        /**
         *
         */
        public long getStartTime()
        {
            return _startTime;
        }

        /**
         *
         */
        public void addProcessorCount()
        { ++ _xProcessors; }

        /**
         */
        public void decrementProcessorCount()
        { -- _xProcessors; }

        /**
         */
        public int getProcessorCount()
        {  return _xProcessors; }

        /**
         * emit an XML representation of this thread metadata
         */
        public void asXML(ContentHandler ch) throws SAXException
        {
            AttributesImpl atts = new AttributesImpl();

            atts.addAttribute("", "name", "name", "CDATA",
                              _thread.getName());

            Date date = new Date(_startTime);

            String since = DateFormat.getInstance().format(date);
            atts.addAttribute("", "startTime", "startTime", "CDATA",
                              since);

            atts.addAttribute("", "startTimeMillis", "startTimeMillis", "CDATA",
                              "" + _startTime);

            ch.startElement("", "thread", "thread", atts);

            ch.endElement("", "thread", "thread");
        }
    }
}


text:
filter
======

Example for filter-function:

..  code-block:: cpp

    analog(a0).with_filter_callback( [&] {
        const int buflen = 100;
        static long sum = 0;
        static long values_count = 0;
        int v=IN(a0).read_int();
        sum += v;
        values_count ++;
        if(values_count >= buflen) {
            dev.measured_value().from(sum/values_count);
            values_count = 0;
            sum = 0;
            return true;
        }
        return false;
    });

There some pre-defined filters available:

-   **filter:** ``filter_average(TYPE, buflen, dev)``

    **example:** ``analog(a0).with_filter_callback(filter_average(int, 100, IN(a0)));``

    **description:** That's the same as above.

-   **filter:** ``filter_jmc_median(update_ms, dev)``

    **example:** ``analog(a0).with_filter_callback(filter_jmc_median(500, IN(a0)));``

    **description:** That's an estimated median giving a new value every 500ms.
    (The Jeff McClintock running median estimate.)

-   **filter:** ``filter_jmc_interval_median(interval, dev)``

    **description:** Derivation of jmc median over small time intervals

-   **filter:** ``filter_binarize(cutoff, high, low, dev)``

    **description:** Turn analog values into binary with a threshold level.

-   **filter:** ``filter_round(base, dev)``

    **description:** Round to the next multiple of base.

-   **filter:** ``filter_limit_time(interval, dev)``

    **description:** Return maximum one value per time interval (interval in ms).


text:
namespace SoccerManager.DAL.Migrations
{
    using System;
    using System.Data.Entity.Migrations;

    public partial class Remove_JogadorPosicaoTable : DbMigration
    {
        public override void Up()
        {
            DropForeignKey("dbo.Posicoes", "Jogador_Id", "dbo.Jogadores");
            DropForeignKey("dbo.JogadorPosicao", "Jogador_Id1", "dbo.Jogadores");
            DropForeignKey("dbo.JogadorPosicao", "Posicao_Id1", "dbo.Posicoes");
            DropIndex("dbo.Posicoes", new[] { "Jogador_Id" });
            DropIndex("dbo.JogadorPosicao", new[] { "Jogador_Id1" });
            DropIndex("dbo.JogadorPosicao", new[] { "Posicao_Id1" });
            AddColumn("dbo.Jogadores", "Posicao_Id", c => c.Int(nullable: false));
            CreateIndex("dbo.Jogadores", "Posicao_Id");
            AddForeignKey("dbo.Jogadores", "Posicao_Id", "dbo.Posicoes", "Id", cascadeDelete: true);
            DropColumn("dbo.Posicoes", "Jogador_Id");
            DropTable("dbo.JogadorPosicao");
        }

        public override void Down()
        {
            CreateTable(
                "dbo.JogadorPosicao",
                c => new
                    {
                        Id = c.Int(nullable: false, identity: true),
                        Jogador_Id = c.Int(nullable: false),
                        Posicao_Id = c.Int(nullable: false),
                        Jogador_Id1 = c.Int(),
                        Posicao_Id1 = c.Int(),
                    })
                .PrimaryKey(t => t.Id);

            AddColumn("dbo.Posicoes", "Jogador_Id", c => c.Int());
            DropForeignKey("dbo.Jogadores", "Posicao_Id", "dbo.Posicoes");
            DropIndex("dbo.Jogadores", new[] { "Posicao_Id" });
            DropColumn("dbo.Jogadores", "Posicao_Id");
            CreateIndex("dbo.JogadorPosicao", "Posicao_Id1");
            CreateIndex("dbo.JogadorPosicao", "Jogador_Id1");
            CreateIndex("dbo.Posicoes", "Jogador_Id");
            AddForeignKey("dbo.JogadorPosicao", "Posicao_Id1", "dbo.Posicoes", "Id");
            AddForeignKey("dbo.JogadorPosicao", "Jogador_Id1", "dbo.Jogadores", "Id");
            AddForeignKey("dbo.Posicoes", "Jogador_Id", "dbo.Jogadores", "Id");
        }
    }
}


text:
from django.db import models
from django_extensions.db.fields.json import JSONField
from django_extensions.db.models import TimeStampedModel

class IndexStatus(TimeStampedModel):
    shop = models.CharField(max_length=500)
    finished = models.BooleanField(default=False)
    data = JSONField(blank=True, null=True)
    config = JSONField(blank=True, null=True)

    def __unicode__(self):
        return self.shop


text:
tags: java
layout: post
title: "Invalid direct reference to form login page"
---

This seems to be a fairly common occurrence when dealing with form-based authentication in Tomcat. Heck, Matt even blogged about it a year and a half ago. The error occurs when someone tries to directly access the same resource used by Tomcat to display the login page (e.g., '/login.jsp', '/login.do', etc.).

There are a number of technical solutions about this so I don't think I need to add another. But most of them miss the big picture: the important thing to remember is you should never have a reference to this resource anywhere in your application. The only places it should appear are:

in your <tt>web.xml</tt> where you tell the container the resource to use for collecting a username and password from an unidentified user,

if necessary, in your framework configuration mapping URLs to resources -- in your Struts config or Spring URL mapping bean, for instance.

It should appear no place else -- no direct links, no redirects, nothing. The user should never see a URL with the name of your <tt>form-login-page</tt> in it.

The thing is, this login page isn't a real resource. It's just a tool the container whips out when it needs to find out who you are. This tool doesn't do anything by itself, it's just there to gather some information and move you onto where you actually want to be -- kind of like how it wouldn't make sense to give your credit card to the person at a busy grocery store who directs you to the next-to-open cash register.


text:
from dragonflow.db import db_store
from dragonflow.db.models import mixins

def _make_dict(iterable):
    return {o.id: o for o in iterable}

class Sync(object):
    '''Class that keeps local cache in sync with the NB database'''

    def __init__(self, nb_api, update_cb, delete_cb, selective=True):
        self._nb_api = nb_api
        self._update_cb = update_cb
        self._delete_cb = delete_cb
        self._db_store = db_store.get_instance()
        self._topics = set()
        self._selective = selective
        self._models = []

    def add_model(self, model):
        self._models.append(model)

    def add_topic(self, topic):
        '''Adds an new topic to watch in the NB database and pulls the new
           objects.
        '''
        if not self._selective or topic in self._topics:
            return

        # Sync here, new objects might rely on objects just added
        self.sync()

        for model in self._models:
            if not issubclass(model, mixins.Topic):
                continue

            for nb_obj in self._nb_api.get_all(model, topic):
                self._update_cb(nb_obj)

        self._topics.add(topic)

    def remove_topic(self, topic):
        '''Removes a watched topic and drops all its objects from the
           controller.
        '''
        if not self._selective or topic not in self._topics:
            return

        self._topics.remove(topic)

        # Reverse the model order, dependent objects deleted first
        for model in reversed(self._models):
            if not issubclass(model, mixins.Topic):
                continue

            cached_objs = list(self._db_store.get_all_by_topic(model, topic))
            for cached_obj in cached_objs:
                self._delete_cb(cached_obj)

    def sync(self):
        '''Syncs all the models for all relevant topics.
        '''
        for model in self._models:
            self._update_model(model)

        # Reverse order when deleting objects
        for model in reversed(self._models):
            self._cleanup_model(model)

    def _update_model(self, model):
        if not self._selective or not issubclass(model, mixins.Topic):
            desired = self._nb_api.get_all(model)
            self._update_objects(desired)
        else:
            for topic in self._topics:
                desired = self._nb_api.get_all(model, topic)
                self._update_objects(desired)

    def _update_objects(self, desired):
        for o in desired:
            self._update_cb(o)

    def _cleanup_model(self, model):
        if not self._selective or not issubclass(model, mixins.Topic):
            desired = self._nb_api.get_all(model)
            present = self._db_store.get_all(model)
            self._cleanup_objects(desired, present)
        else:
            present_all = self._db_store.get_all(model)
            present_by_topic = {}
            for o in present_all:
                present_by_topic.setdefault(o.topic, []).append(o)

            for topic in self._topics:
                # FIXME (dimak) can be avoided, we do this once in
                # _update_model for the exact same topics/models.
                # Maybe we can pass on the result somehow.
                desired = self._nb_api.get_all(model, topic)
                present = present_by_topic.pop(topic, [])
                self._cleanup_objects(desired, present)

            for objects in present_by_topic.values():
                for o in objects:
                    self._delete_cb(o)

    def _cleanup_objects(self, desired, present):
        desired = _make_dict(desired)
        present = _make_dict(present)

        desired_ids = set(desired.keys())
        present_ids = set(present.keys())

        for deleted_id in present_ids.difference(desired_ids):
            self._delete_cb(present[deleted_id])


text:
var index = require('../index.js')();
var mocha = require('mocha');
var chai = require('chai');
var expect = chai.expect;
var sinon = require('sinon');
var sinonChai = require('sinon-chai');
chai.use(sinonChai);
var utils = require('../../utils/utils');

var React = require('react');
var ReactDOM = require('react-dom');
var TestUtils = require('react-addons-test-utils');
var mockStore = require('../../utils/mockStore');
var mockRequire = require('mockrequire');
var _ = require('underscore');

//require specific components
var SetupNewRunOfAdHocExperiment = mockRequire('../../../server/client/containers/RunAdHocExperiment/SetupNewRunOfAdHocExperiment',{
  './SelectNonRandomOptions': utils.mockDivComponent('non-random-options'),
  './SelectRandomOptions': utils.mockDivComponent('random-options')
}, {jsx:true});

describe('SetupNewRunOfAdHocExperiment container', function () {
  var adHocExp;
  beforeEach(function(){
    var props = {};
    var obj = {
      Experiments: {
        acre:{
          indVars: ['barn','cow','donkey']
        }
      },
      IndVars : {
        barn: {_id: 'barn', randomized: false },
        cow: {_id: 'cow', randomized: false },
        donkey: {_id: 'donkey', randomized: true },
      }
    };
    props.store = mockStore(obj);
    props.expId = 'acre';
    props.sampleId = 'sickle';
    adHocExp = TestUtils.renderIntoDocument(React.createElement(SetupNewRunOfAdHocExperiment, props), 'root');
  });

  it('should pass the correct indvars and sample to non random indvars', function () {
    var nonRands = TestUtils.scryRenderedDOMComponentsWithClass(adHocExp, 'non-random-options');
    var text = _.pluck(nonRands,'textContent');
    expect(text).to.eql(['{"indVarIds":["barn","cow"],"sampleId":"sickle"}']);
  });

  it('should pass the correct indvars, sample, and expid to random indvars', function () {
    var rands = TestUtils.scryRenderedDOMComponentsWithClass(adHocExp, 'random-options');
    var text = _.pluck(rands,'textContent');
    expect(text).to.eql(['{"indVarIds":["donkey"],"expId":"acre","sampleId":"sickle"}']);
  });

});


text:
package com.hazelcast.internal.monitor;

import com.hazelcast.internal.management.dto.ClientEndPointDTO;
import com.hazelcast.internal.management.dto.ClusterHotRestartStatusDTO;
import com.hazelcast.json.internal.JsonSerializable;

import java.util.Collection;
import java.util.UUID;

/**
 * Local statistics for a Hazelcast member.
 */
public interface MemberState extends JsonSerializable {

    String getAddress();

    /**
     * Returns the UUID of this member.
     *
     * @return the UUID of this member.
     */
    UUID getUuid();

    /**
     * Returns the local CP member's UUID if this Hazelcast
     * member is part of the CP subsystem, returns null otherwise.
     *
     * @return local CP member's UUID if available, null otherwise
     */
    UUID getCpMemberUuid();

    /**
     * Returns the name of a Hazelcast member.
     * @return the name of a Hazelcast member.
     */
    String getName();

    Collection<ClientEndPointDTO> getClients();

    /**
     * Returns the local operation statistics.
     *
     * @return LocalOperationStats statistics
     */
    LocalOperationStats getOperationStats();

    MemberPartitionState getMemberPartitionState();

    NodeState getNodeState();

    HotRestartState getHotRestartState();

    ClusterHotRestartStatusDTO getClusterHotRestartStatus();
}


text:
class Error(Exception):
    """Generic error class."""

class ArgumentError(Error):
    """Raised when an invalid or conflicting function argument is supplied.

    This error generally corresponds to construction time state errors.

    """

class InvalidRequestError(ArgumentError):
    """aiopg.sa was asked to do something it can't do.

    This error generally corresponds to runtime state errors.

    """

class NoSuchColumnError(KeyError, InvalidRequestError):
    """A nonexistent column is requested from a ``RowProxy``."""

class ResourceClosedError(InvalidRequestError):
    """An operation was requested from a connection, cursor, or other
    object that's in a closed state."""


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Algorithms.BitManipulation
{
    public class ReturnNumberOfOnesInBinary
    {
        //<summary>
        // A function that returns number of one's(1) in a binary number
        //</summary>
        //<param name="a">binary number e.g(011)</param>
        public int numSetBits(long a)
        {
            int count = 0;
            while(a>0)
            {
                int rem = Convert.ToInt32(a%10);
                if(rem !=0)
                {
                    count++;
                }
                a = a / 10;
            }
            return count;
        }
    }
}


text: <sil-notices></sil-notices>


text:
package com.learning.ads.dynamicprogramming;

import static org.junit.Assert.assertEquals;

import org.junit.Before;
import org.junit.Test;

public class EditDistanceTest {

    EditDistance editDistance;

	@Before
	public void setUp() throws Exception {
		editDistance = new EditDistance();
    }

    @Test
    public void findDistance(){
        assertEquals(3, editDistance.findDistance("horse", "ros"));
        assertEquals(5, editDistance.findDistance("intention", "execution"));
    }

    @Test
    public void findDistanceTopDown(){
        assertEquals(3, editDistance.findDistanceTopDown("horse", "ros"));
        assertEquals(5, editDistance.findDistanceTopDown("intention", "execution"));
    }

    @Test
    public void findDistanceBottomUp(){
        assertEquals(3, editDistance.findDistanceBottomUp("horse", "ros"));
        assertEquals(5, editDistance.findDistanceBottomUp("intention", "execution"));
    }

}


text:
using UnityEngine;
using System.Collections;

[RequireComponent (typeof (Detonator))]
[AddComponentMenu("Detonator/Force")]
public class DetonatorForce : DetonatorComponent
{
	private float _baseRadius = 50.0f;
	private float _basePower = 4000.0f;
	private float _scaledRange;
	private float _scaledIntensity;
	private bool _delayedExplosionStarted = false;
	private float _explodeDelay;

	public float radius;
	public float power;
	public GameObject fireObject;
	public float fireObjectLife;

	private Collider[] _colliders;
	private GameObject _tempFireObject;

	private int myDamage = 30;

	override public void Init()
	{
		//unused
	}

	void Start(){
//		myDamage = GetComponent<Attack>().ATKDMG;
	}

	void Update()
	{
		if (_delayedExplosionStarted)
		{
			_explodeDelay = (_explodeDelay - Time.deltaTime);
			if (_explodeDelay <= 0f)
			{
				Explode();
			}
		}
	}

	private Vector3 _explosionPosition;

	override public void Explode()
	{
		if (!on) return;
		if (detailThreshold > detail) return;

		if (!_delayedExplosionStarted)
		{
			_explodeDelay = explodeDelayMin + (Random.value * (explodeDelayMax - explodeDelayMin));
		}
		if (_explodeDelay <= 0) //if the delayTime is zero
		{
			//tweak the position such that the explosion center is related to the explosion's direction
			_explosionPosition = transform.position; //- Vector3.Normalize(MyDetonator().direction);
			_colliders = Physics.OverlapSphere (_explosionPosition, radius);

			foreach (Collider hit in _colliders)
			{
				if (!hit)
				{
					continue;
				}

				if (hit.GetComponent<Obstacle>())
				{
					hit.GetComponent<Obstacle>().isDamaged(myDamage);
					//align the force along the object's rotation
					//this is wrong - need to attenuate the velocity according to distance from the explosion center
					//offsetting the explosion force position by the negative of the explosion's direction may help
//					hit.GetComponent<Rigidbody>().AddExplosionForce((power * size), _explosionPosition, (radius * size), (4f * MyDetonator().upwardsBias * size));

					//fixed 6/15/2013 - didn't work before, was sending message to this script instead :)
//					hit.gameObject.SendMessage("OnDetonatorForceHit", null, SendMessageOptions.DontRequireReceiver);

					//and light them on fire for Rune
/*
					if (fireObject)
					{
						//check to see if the object already is on fire. being on fire twice is silly
						if (hit.transform.Find(fireObject.name+"(Clone)"))
						{
							return;
						}

						_tempFireObject = (Instantiate(fireObject, this.transform.position, this.transform.rotation)) as GameObject;
						_tempFireObject.transform.parent = hit.transform;
						_tempFireObject.transform.localPosition = new Vector3(0f,0f,0f);
						if (_tempFireObject.GetComponent<ParticleEmitter>())
						{
							_tempFireObject.GetComponent<ParticleEmitter>().emit = true;
							Destroy(_tempFireObject,fireObjectLife);
						}
					}
*/
				}
			}
			_delayedExplosionStarted = false;
			_explodeDelay = 0f;
		}
		else
		{
			//tell update to start reducing the start delay and call explode again when it's zero
			_delayedExplosionStarted = true;
		}
	}

	public void Reset()
	{
		radius = _baseRadius;
		power = _basePower;
	}
}