text:
var $window = $(window);

(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

(function($) {
  return $.fn.mason = function(options, complete) {
    var $self, callback, debug_elements, defaults, elements, mason_clear;
    defaults = {
      itemSelector: '',
      ratio: 0,
      sizes: [],
      columns: [[0, 480, 1], [480, 780, 2], [780, 1080, 3], [1080, 1320, 4], [1320, 1680, 5]],
      promoted: [],
      filler: {
        itemSelector: options.itemSelector,
        filler_class: 'mason_filler',
        keepDataAndEvents: false
      },
      randomSizes: false,
      randomFillers: false,
      layout: 'none',
      gutter: 0,
      debug: false
    };
    $self = null;
    debug_elements = {
      container: $("

"),
      block: "

"
    };
    mason_clear = "

";
    if (complete) {
      callback = {
        complete: complete
      };
    }
    elements = {
      block: {
        height: 0,
        width: 0
      },
      matrix: [],
      startWidth: 0
    };
    this.each(function() {
      var callbacks, columnSize, debug, layBricks, mason, resize, settings, setup, sizeElements;
      settings = $.extend(defaults, options);
      callbacks = $.extend(callback, complete);
      $self = $(this);
      setup = function() {
        if (settings.debug) {
          console.log("SETUP");
        }
        if ($self.children(".mason_clear").length < 1) {
          $self.append(mason_clear);
        }
        elements.block.height = Math.round(parseFloat(($self.width() / columnSize()) / settings.ratio)).toFixed(2);
        elements.block.width = Math.round(parseFloat($self.width() / columnSize())).toFixed(2);
        elements.startWidth = $self.width();
        sizeElements();
        if (settings.debug) {
          console.log("############## Running In Debug Mode ##############");
          return debug();
        }
      };
      sizeElements = function() {
        var $block;
        if (columnSize() === 1) {
          $block = $self.children("" + settings.itemSelector);
          $block.height(elements.block.height - (settings.gutter * 2));
          $block.width(elements.block.width - (settings.gutter * 2));
          $block.css({
            'margin': settings.gutter
          });
          if (typeof callbacks.complete !== "undefined") {
            return callbacks.complete();
          }
        } else {
          $self.children("" + settings.itemSelector, "." + settings.filler.filler_class).each(function() {
            var h, p, promoted, promoted_size, ran, size, w;
            $block = $(this);
            p = 0;
            promoted = false;
            promoted_size = 0;
            while (p < settings.promoted.length) {
              if ($block.hasClass(settings.promoted[p][0])) {
                promoted = true;
                promoted_size = p;
              }
              p++;
            }
            if (promoted) {
              size = settings.promoted[promoted_size];
              $block.data('size', promoted_size);
              $block.data('promoted', true);
              h = parseFloat(elements.block.height * size[2]).toFixed(0);
              h = h - (settings.gutter * 2);
              w = parseFloat(elements.block.width * size[1]).toFixed(0);
              w = w - (settings.gutter * 2);
            } else {
              ran = Math.floor(Math.random() * settings.sizes.length);
              size = settings.sizes[ran];
              $block.data('size', ran);
              h = parseFloat(elements.block.height * size[1]).toFixed(0);
              h = h - (settings.gutter * 2);
              w = parseFloat(elements.block.width * size[0]).toFixed(0);
              w = w - (settings.gutter * 2);
            }
            $block.height(h + 'px');
            $block.width(w + 'px');
            return $block.css({
              'margin': settings.gutter
            });
          });
          return mason();
        }
      };
      mason = function() {
        var block_h, c, col, el_h, r;
        col = columnSize();
        el_h = $self.height();
        block_h = Math.round(el_h / elements.block.height);
        elements.matrix = [];
        r = 0;
        while (r < block_h) {
          elements.matrix[r] = [];
          c = 0;
          while (c < col) {
            elements.matrix[r][c] = false;
            c++;
          }
          r++;
        }
        $self.children("" + settings.itemSelector).each(function() {
          var $block, a, bh, bw, h, l, results, s, t, w;
          $block = $(this);
          l = Math.round($block.position().left / elements.block.width);
          t = Math.round($block.position().top / elements.block.height);
          s = parseFloat($block.data('size'));
          if ($block.data('promoted')) {
            h = settings.promoted[s][2];
            w = settings.promoted[s][1];
            a = h * w;
          } else {
            h = settings.sizes[s][1];
            w = settings.sizes[s][0];
            a = h * w;
          }
          r = 0;
          results = [];
          while (r < a) {
            bh = 0;
            while (bh < h) {
              bw = 0;
              elements.matrix[t + bh][l] = true;
              while (bw < w) {
                elements.matrix[t + bh][l + bw] = true;
                bw++;
              }
              bh++;
            }
            results.push(r++);
          }
          return results;
        });
        return layBricks();
      };
      layBricks = function() {
        var $filler, c, filler_index, filler_total, h, r, w, x, y;
        r = 0;
        filler_total = $("" + settings.filler.itemSelector).not("." + settings.filler.filler_class).length;
        filler_index = -1;
        while (r < elements.matrix.length) {
          c = 0;
          while (c < elements.matrix[r].length) {
            if (!elements.matrix[r][c]) {
              h = elements.block.height;
              w = elements.block.width;
              x = (r * h) + settings.gutter;
              y = (c * w) + settings.gutter;
              h = h - settings.gutter * 2;
              w = w - settings.gutter * 2;
              if (settings.randomFillers) {
                filler_index = Math.floor(Math.random() * filler_total);
              } else {
                if (filler_index < filler_total) {
                  filler_index++;
                }
                if (filler_index === filler_total) {
                  filler_index = 0;
                }
              }
              $filler = $("" + settings.filler.itemSelector).not("." + settings.filler.filler_class).eq(filler_index).clone(settings.filler.keepDataAndEvents);
              $filler.addClass(settings.filler.filler_class);
              $filler.css({
                position: 'absolute',
                top: x + 'px',
                left: y + 'px',
                height: h + 'px',
                width: w + 'px',
                margin: '0px'
              });
              $filler.appendTo($self);
            }
            c++;
          }
          r++;
        }
        if ($self.width() < elements.startWidth) {
          return $(window, $self).trigger('resize');
        } else {
          if (typeof callbacks.complete !== "undefined") {
            return callbacks.complete();
          }
        }
      };
      columnSize = function() {
        var cols, colsCount, i, w;
        w = parseFloat($self.width());
        cols = 0;
        colsCount = settings.columns.length - 1;
        if (w >= settings.columns[colsCount[1]]) {
          cols = settings.columns[colsCount[2]];
        } else {
          i = 0;
          while (i <= colsCount) {
            if (w > settings.columns[i][0] && settings.columns[i][1]) {
              cols = settings.columns[i][2];
            }
            i++;
          }
        }
        return Math.floor(cols);
      };
      debug = function() {
        var $debug, block, block_h, c, col, el_h, i;
        $debug = $self.parent();
        col = columnSize();
        el_h = $self.height();
        block_h = el_h / elements.block.height;
        debug_elements.container.css({
          position: 'absolute',
          top: '0',
          left: '0',
          height: $self.height(),
          width: $self.width()
        });
        i = 0;
        while (i < block_h) {
          c = 0;
          while (c < col) {
            block = $(debug_elements.block);
            block.css({
              height: elements.block.height - (settings.gutter * 2),
              width: elements.block.width - (settings.gutter * 2),
              margin: settings.gutter
            });
            debug_elements.container.append(block);
            c++;
          }
          i++;
        }
        debug_elements.container.append(mason_clear);
        return $debug.prepend(debug_elements.container);
      };
      if (settings.layout === "fluid") {
          //new code
        resize = null;

        $(window).on('debouncedwidth', (function(_this) {
            console.log('width simple');
              return function(event) {
                $("." + settings.filler.filler_class).remove();
                elements.matrix = [];
                clearTimeout(resize);
                resize = null;
                return resize = setTimeout(function() {
                  return setup();
                }, 0);
              };

        })(this));
          //new code
      }
      return setup();
    });
    return {
      destroy: function() {
        return $(window, $self).off('resize');
      }
    };
  };
})(jQuery);

},{}]},{},[1]);


text:
/*
 ONOS GUI -- Topology Toolbar Module.
 Functions for creating and interacting with the toolbar.
 */

(function () {
    'use strict';

    // injected references
    var $log, fs, tbs, ps, tov, tds, api;

    // API:
    //  getActionEntry
    //  setUpKeys

    // internal state
    var toolbar, keyData, cachedState, thirdRow, ovRset, ovIndex;

    // constants
    var name = 'topo-tbar',
        cooktag = 'topo_prefs',
        soa = 'switchOverlayActions: ',
        selOver = 'Select overlay here ⇧',
        defaultOverlay = 'traffic';

    // key to button mapping data
    var k2b = {
        O: { id: 'summary-tog', gid: 'm_summary', isel: true},
        I: { id: 'instance-tog', gid: 'm_uiAttached', isel: true },
        D: { id: 'details-tog', gid: 'm_details', isel: true },
        H: { id: 'hosts-tog', gid: 'm_endstation', isel: false },
        M: { id: 'offline-tog', gid: 'm_switch', isel: true },
        P: { id: 'ports-tog', gid: 'm_ports', isel: true },
        B: { id: 'bkgrnd-tog', gid: 'm_map', isel: false },
        G: { id: 'bkgrnd-sel', gid: 'm_selectMap' },
        S: { id: 'sprite-tog', gid: 'm_cloud', isel: false },

        Z: { id: 'oblique-tog', gid: 'm_oblique', isel: false },
        N: { id: 'filters-btn', gid: 'm_filters' },
        L: { id: 'cycleLabels-btn', gid: 'm_cycleLabels' },
        R: { id: 'resetZoom-btn', gid: 'm_resetZoom' },

        E: { id: 'eqMaster-btn', gid: 'm_eqMaster' }
    };

    var prohibited = [
        'T', 'backSlash', 'slash',
        'X' // needed until we re-instate X above.
    ];
    prohibited = prohibited.concat(d3.map(k2b).keys());

    // initial toggle state: default settings and tag to key mapping
    var defaultPrefsState = {
            insts: 1,
            summary: 1,
            detail: 1,
            hosts: 0,
            offdev: 1,
            dlbls: 0,
            porthl: 1,
            bg: 0,
            spr: 0,
            ovidx: 1,   // default to traffic overlay
            toolbar: 0
        },
        prefsMap = {
            summary: 'O',
            insts: 'I',
            detail: 'D',
            hosts: 'H',
            offdev: 'M',
            porthl: 'P',
            bg: 'B',
            spr: 'S'
            // NOTE: toolbar state is handled separately
        };

    function init(_api_) {
        api = _api_;
        // retrieve initial toggle button settings from user prefs
        setInitToggleState();
    }

    function topoDefPrefs() {
        return angular.extend({}, defaultPrefsState);
    }

    function setInitToggleState() {
        cachedState = ps.asNumbers(ps.getPrefs(cooktag, defaultPrefsState));
        $log.debug('TOOLBAR---- read prefs state:', cachedState);

        if (!cachedState) {
            cachedState = topoDefPrefs();
            ps.setPrefs(cooktag, cachedState);
            $log.debug('TOOLBAR---- Set default prefs state:', cachedState);
        }

        angular.forEach(prefsMap, function (v, k) {
            var cfg = k2b[v];
            cfg && (cfg.isel = !!cachedState[k]);
        });
    }

    function initKeyData() {
        // TODO: use angular forEach instead of d3.map
        keyData = d3.map(k2b);
        keyData.forEach(function(key, value) {
            var data = api.getActionEntry(key);
            value.cb = data[0];                     // on-click callback
            value.tt = data[1] + ' (' + key + ')';  // tooltip
        });
    }

    function addButton(key) {
        var v = keyData.get(key);
        v.btn = toolbar.addButton(v.id, v.gid, v.cb, v.tt);
    }

    function addToggle(key, suppressIfMobile) {
        var v = keyData.get(key);
        if (suppressIfMobile && fs.isMobile()) { return; }
        v.tog = toolbar.addToggle(v.id, v.gid, v.isel, v.cb, v.tt);
    }

    function addFirstRow() {
        addToggle('I');
        addToggle('O');
        addToggle('D');
        toolbar.addSeparator();

        addToggle('H');
        addToggle('M');
        addToggle('P', true);
        addToggle('B');
        addButton('G');
        addToggle('S', true);
    }

    function addSecondRow() {
        //addToggle('X');
        addToggle('Z');
        addButton('N');
        addButton('L');
        addButton('R');
        toolbar.addSeparator();
        addButton('E');
    }

    function addOverlays() {
        toolbar.addSeparator();

        // generate radio button set for overlays; start with 'none'
        var rset = [{
                gid: 'm_unknown',
                tooltip: 'No Overlay',
                cb: function () {
                    tov.tbSelection(null, switchOverlayActions);
                }
            }];
        ovIndex = tov.augmentRbset(rset, switchOverlayActions);
        ovRset = toolbar.addRadioSet('topo-overlays', rset);
    }

    // invoked by overlay service to switch out old buttons and switch in new
    function switchOverlayActions(oid, keyBindings) {
        var prohibits = [],
            kb = fs.isO(keyBindings) || {},
            order = fs.isA(kb._keyOrder) || [];

        if (keyBindings && !keyBindings._keyOrder) {
            $log.warn(soa + 'no _keyOrder property defined');
        } else {
            // sanity removal of reserved property names
            ['esc', '_keyListener', '_helpFormat'].forEach(function (k) {
                fs.removeFromArray(k, order);
            });
        }

        // ensure dialog has closed (if opened by outgoing overlay)
        tds.closeDialog();
        thirdRow.clear();

        // persist our choice of overlay...
        persistTopoPrefs('ovidx', ovIndex[oid] || 0);

        if (!order.length) {
            thirdRow.setText(selOver);
            thirdRow.classed('right', true);
            api.setUpKeys(); // clear previous overlay key bindings

        } else {
            thirdRow.classed('right', false);
            angular.forEach(order, function (key) {
                var value, bid, gid, tt;

                if (prohibited.indexOf(key) > -1) {
                    prohibits.push(key);

                } else {
                    value = keyBindings[key];
                    bid = oid + '-' + key;
                    gid = tov.mkGlyphId(oid, value.gid);
                    tt = value.tt + ' (' + key + ')';
                    thirdRow.addButton(bid, gid, value.cb, tt);
                }
            });
            api.setUpKeys(keyBindings); // add overlay key bindings
        }

        if (prohibits.length) {
            $log.warn(soa + 'Prohibited key bindings ignored:', prohibits);
        }
    }

    function createToolbar() {
        initKeyData();
        toolbar = tbs.createToolbar(name);
        addFirstRow();
        toolbar.addRow();
        addSecondRow();
        addOverlays();
        thirdRow = toolbar.addRow();
        thirdRow.setText(selOver);
        thirdRow.classed('right', true);

        if (cachedState.toolbar) {
            toolbar.show();
        } else {
            toolbar.hide();
        }
    }

    function destroyToolbar() {
        tbs.destroyToolbar(name);
        tov.resetOnToolbarDestroy();
    }

    // allows us to ensure the button states track key strokes
    function keyListener(key) {
        var v = keyData.get(key);

        if (v) {
            // we have a valid button mapping
            if (v.tog) {
                // it's a toggle button
                v.tog.toggleNoCb();
            }
        }
    }

    function persistTopoPrefs(key, val) {
        var prefs = ps.getPrefs(cooktag, defaultPrefsState);
        prefs[key] = val === undefined ? !prefs[key] : val;
        ps.setPrefs('topo_prefs', prefs);
    }

    function toggleToolbar() {
        toolbar.toggle();
        persistTopoPrefs('toolbar');
    }

    function setDefaultOverlay(prefsIdx) {
        var idx = ovIndex[defaultOverlay] || 0;
        if (prefsIdx >= 0 && prefsIdx < ovRset.size()) {
            idx = prefsIdx;
        }
        ovRset.selectedIndex(idx);
    }

    // an overlay was selected via Function-Key press
    function fnkey(idx) {
        if (idx < ovRset.size() && idx !== ovRset.selectedIndex()) {
            ovRset.selectedIndex(idx);
        }
    }

    angular.module('ovTopo')
        .factory('TopoToolbarService',
        ['$log', 'FnService', 'ToolbarService', 'PrefsService',
            'TopoOverlayService', 'TopoDialogService',

        function (_$log_, _fs_, _tbs_, _ps_, _tov_, _tds_) {
            $log = _$log_;
            fs = _fs_;
            tbs = _tbs_;
            ps = _ps_;
            tov = _tov_;
            tds = _tds_;

            return {
                init: init,
                createToolbar: createToolbar,
                destroyToolbar: destroyToolbar,
                keyListener: keyListener,
                toggleToolbar: toggleToolbar,
                setDefaultOverlay: setDefaultOverlay,
                defaultPrefs: defaultPrefsState,
                fnkey: fnkey
            };
        }]);
}());

redpajama_set_name: RedPajamaGithub


text:
using UnityEngine;
using System.Collections;

namespace RootMotion.Demos {

	/// <summary>
	/// The base abstract class for all character animation controllers.
	/// </summary>
	public abstract class CharacterAnimationBase: MonoBehaviour {

		public bool smoothFollow = true;
		public float smoothFollowSpeed = 20f;

		private Vector3 lastPosition;
		private Vector3 localPosition;
		private Quaternion localRotation;
		private Quaternion lastRotation;

		// Gets the rotation pivot of the character
		public virtual Vector3 GetPivotPoint() {
			return transform.position;
		}

		// Is the animator playing the grounded state?
		public virtual bool animationGrounded {
			get {
				return true;
			}
		}

		// Gets angle around y axis from a world space direction
		public float GetAngleFromForward(Vector3 worldDirection) {
			Vector3 local = transform.InverseTransformDirection(worldDirection);
			return Mathf.Atan2 (local.x, local.z) * Mathf.Rad2Deg;
		}

		protected virtual void Start() {
			if (transform.parent.GetComponent<CharacterBase>() == null) {
				Debug.LogWarning("Animation controllers should be parented to character controllers!", transform);
			}

			lastPosition = transform.position;
			localPosition = transform.parent.InverseTransformPoint(transform.position);
			lastRotation = transform.rotation;
			localRotation = Quaternion.Inverse(transform.parent.rotation) * transform.rotation;
		}

		// Smooth interpolation of character position. Helps to smooth out hectic rigidbody motion
		protected virtual void LateUpdate() {
			if (smoothFollow) {
				transform.position = Vector3.Lerp(lastPosition, transform.parent.TransformPoint(localPosition), Time.deltaTime * smoothFollowSpeed);
				transform.rotation = Quaternion.Lerp(lastRotation, transform.parent.rotation * localRotation, Time.deltaTime * smoothFollowSpeed);
			}

			lastPosition = transform.position;
			lastRotation = transform.rotation;
		}
	}

}


text:
package org.apache.activemq.artemis.utils;

import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;

public class FutureLatch implements Runnable {

   private final CountDownLatch latch;

   public FutureLatch() {
      super();
      latch = new CountDownLatch(1);
   }

   public FutureLatch(int latches) {
      super();
      latch = new CountDownLatch(latches);
   }

   public boolean await(final long timeout) {
      try {
         return latch.await(timeout, TimeUnit.MILLISECONDS);
      } catch (InterruptedException e) {
         return false;
      }
   }

   @Override
   public void run() {
      latch.countDown();
   }

   @Override
   public String toString() {
      return FutureLatch.class.getSimpleName() + "(latch=" + latch + ")";
   }
}


text:
import React from 'react';
import { Link } from 'react-router-dom';

export default class NavigationBar extends React.Component {
  render() {
    return (

           Kanbanello
           <Link className="w3-bar-item w3-button" to='/'>
           Home</Link>
           <Link className="w3-bar-item w3-button" to='/iojson'>
           Import & Export JSON File</Link>

            Sign Up

            Login

    );
  }
}


text:
MIT_6.00_assignments
====================

assignments for MIT 6.00 Intro to CS and Programming

http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00-introduction-to-computer-science-and-programming-fall-2008/assignments/


text:
NSString * const TI_APPLICATION_DEPLOYTYPE = @"development";
NSString * const TI_APPLICATION_ID = @"com.appcelerator.sample.rss";
NSString * const TI_APPLICATION_PUBLISHER = @"Appcelerator";
NSString * const TI_APPLICATION_URL = @"http://appcelerator.com";
NSString * const TI_APPLICATION_NAME = @"RSS Reader";
NSString * const TI_APPLICATION_VERSION = @"2.0.0";
NSString * const TI_APPLICATION_DESCRIPTION = @"undefined";
NSString * const TI_APPLICATION_COPYRIGHT = @"2015 by Appcelerator, Inc.";
NSString * const TI_APPLICATION_GUID = @"7bee4ee0-bac3-473a-9666-cc2e61cda704";
BOOL const TI_APPLICATION_ANALYTICS = true;
NSString * const TI_APPLICATION_BUILD_TYPE = @"";

#ifdef TARGET_IPHONE_SIMULATOR
NSString * const TI_APPLICATION_RESOURCE_DIR = @"";
#endif

int main(int argc, char *argv[]) {
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

#ifdef __LOG__ID__
	NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
	NSString *documentsDirectory = [paths objectAtIndex:0];
	NSString *logPath = [documentsDirectory stringByAppendingPathComponent:[NSString stringWithFormat:@"%s.log",STRING(__LOG__ID__)]];
	freopen([logPath cStringUsingEncoding:NSUTF8StringEncoding],"w+",stderr);
	fprintf(stderr,"[INFO] Application started\n");
#endif

	int retVal = UIApplicationMain(argc, argv, nil, @"TiApp");
    [pool release];
    return retVal;
}


text:
<?php

namespace Scrutinizer\PhpAnalyzer\PhpParser\Traversal;

use Scrutinizer\PhpAnalyzer\PhpParser\NodeTraversal;

abstract class AbstractPostOrderCallback implements CallbackInterface
{
    public function shouldTraverse(NodeTraversal $traversal, \PHPParser_Node $node, \PHPParser_Node $parent = null)
    {
        return true;
    }
}


text:
<xml id="toolbox" style="display: none">
<category id="catVariables" custom="VARIABLE"></category>
<sep></sep>
<category id="catBoard">
  <block type="board_server">
      <value name="server_">
        <block type="text"></block>
      </value>
    </block>
  <block type="board_ready">
    <value name="device_">
      <block type="text"></block>
    </value>
  </block>
</category>
<category id="catPir">
  <block type="variables_set">
    <field name="VAR">pir</field>
    <value name="VALUE">
      <block type="pir_new">
        <field name="pin_">10</field>
      </block>
    </value>
  </block>
  <block type="pir_status"></block>
</category>
<category id="catTutorials">
  <block type="light"></block>
</category>
<sep></sep>
</xml>


text:
OBJS = test.o dataops.o
include ../Makefile.common


text:
/**
 * 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.
 */
package org.apache.aurora.scheduler.storage.db;

import java.util.List;
import java.util.Map;

import javax.annotation.Nullable;

import org.apache.aurora.gen.ResourceAggregate;
import org.apache.aurora.scheduler.storage.db.views.DBResourceAggregate;
import org.apache.aurora.scheduler.storage.db.views.DBSaveQuota;
import org.apache.ibatis.annotations.Param;

/**
 * MyBatis mapper class for QuotaMapper.xml.
 */
interface QuotaMapper {
  /**
   * Inserts the quota for the given {@code role}.
   *
   * @param role Role to insert quota for.
   * @param quota Quota value to store.
   * @param result Container for auto-generated ID of the inserted row.
   */
  void insert(
      @Param("role") String role,
      @Param("quota") ResourceAggregate quota,
      @Param("result") InsertResult result);

  /**
   * Insert quota resources.
   *
   * @param quotaId Quota ID to merge resources for.
   * @param values Resources to merge.
   */
  void insertResources(
      @Param("quotaId") long quotaId,
      @Param("values") Map<Integer, String> values);

  /**
   * Gets the quota assigned to a role.
   *
   * @param role Role to select quota for.
   * @return The previously-saved quota for the role, if it exists.
   */
  @Nullable
  DBResourceAggregate select(String role);

  /**
   * Gets all saved quotas.
   *
   * @return All quotas stored in the database.
   */
  List<DBSaveQuota> selectAll();

  /**
   * Removes the quota stored for a role.
   *
   * @param role Role to delete the quota entry for, if one exists.
   */
  void delete(String role);

  /**
   * Removes all stored quota records.
   */
  void truncate();
}


text:
using System;

namespace Tests.Common
{
    [AttributeUsage( AttributeTargets.All )]
    public class TypeParameterAttribute : Attribute
    {
        public TypeParameterAttribute( Type property )
        {
            this.Property = property;
        }

        public Type Property { get; private set; }
    }
}


text:
package com.smoketurner.graphiak.resources;

import static org.assertj.core.api.Assertions.assertThat;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import javax.ws.rs.client.Entity;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.Response;
import org.junit.ClassRule;
import org.junit.Test;
import io.dropwizard.testing.junit.ResourceTestRule;

public class DashboardResourceTest {

    @ClassRule
    public static final ResourceTestRule resources = ResourceTestRule.builder()
            .addResource(new DashboardResource()).build();

    @Test
    public void testGetFind() throws Exception {
        final Response response = resources.client().target("/dashboard/find")
                .request().get();
        final Map<String, List<String>> actual = response
                .readEntity(new GenericType<Map<String, List<String>>>() {
                });

        assertThat(response.getStatus()).isEqualTo(200);
        assertThat(actual.get("dashboards")).isEqualTo(Collections.emptyList());
    }

    @Test
    public void testGetFindJSONP() throws Exception {
        final Response response = resources.client().target("/dashboard/find")
                .request().accept("text/javascript").get();
        final String actual = response.readEntity(String.class);

        assertThat(response.getStatus()).isEqualTo(200);
        assertThat(actual).isEqualTo("callback({\"dashboards\":[]})");
    }

    @Test
    public void testPostFind() throws Exception {
        final Response response = resources.client().target("/dashboard/find")
                .request().post(Entity.json(String.class));
        final Map<String, List<String>> actual = response
                .readEntity(new GenericType<Map<String, List<String>>>() {
                });

        assertThat(response.getStatus()).isEqualTo(200);
        assertThat(actual.get("dashboards")).isEqualTo(Collections.emptyList());
    }

    @Test
    public void testGetLoad() throws Exception {
        final Response response = resources.client()
                .target("/dashboard/load/test").request().get();
        final Map<String, String> actual = response
                .readEntity(new GenericType<Map<String, String>>() {
                });

        assertThat(response.getStatus()).isEqualTo(404);
        assertThat(actual.get("error"))
                .isEqualTo("Dashboard 'test' does not exist");
    }

    @Test
    public void testGetLoadJSONP() throws Exception {
        final Response response = resources.client()
                .target("/dashboard/load/test").request()
                .accept("text/javascript").get();
        final String actual = response.readEntity(String.class);

        assertThat(response.getStatus()).isEqualTo(404);
        assertThat(actual).isEqualTo(
                "callback({\"error\":\"Dashboard 'test' does not exist\"})");
    }

    @Test
    public void testPostLoad() throws Exception {
        final Response response = resources.client()
                .target("/dashboard/load/test").request()
                .post(Entity.json(String.class));
        final Map<String, String> actual = response
                .readEntity(new GenericType<Map<String, String>>() {
                });

        assertThat(response.getStatus()).isEqualTo(404);
        assertThat(actual.get("error"))
                .isEqualTo("Dashboard 'test' does not exist");
    }
}


text:
var valuesDesc = Object.getOwnPropertyDescriptor(Array.prototype, 'values');
assertEquals('object', typeof valuesDesc);
assertSame(Array.prototype[Symbol.iterator], valuesDesc.value);
assertTrue(valuesDesc.configurable);
assertTrue(valuesDesc.writable);
assertFalse(valuesDesc.enumerable);
assertTrue(Array.prototype[Symbol.unscopables].values);
assertThrows(() => new Array.prototype[Symbol.iterator], TypeError);


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

<TITLE>
TLinkableAdapter (GNU Trove for Java API v2.1.0)
</TITLE>

<META NAME="date" CONTENT="2009-08-14">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

GNU Trove

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

gnu.trove

Class TLinkableAdapter

java.lang.Object
  gnu.trove.TLinkableAdapter

All Implemented Interfaces:
TLinkable, java.io.Serializable

public class TLinkableAdapter
extends java.lang.Object
implements TLinkable

Adapter for TLinkable interface which implements the interface and can
 therefore be extended trivially to create TLinkable objects without
 having to implement the obvious.

 Created: Thurs Nov 15 16:25:00 2001

Version:

$Id: TLinkableAdapter.java,v 1.1 2006/11/10 23:27:56 robeden Exp $

Author:

Jason Baldridge

See Also:
TLinkedList,
Serialized Form

Constructor Summary

TLinkableAdapter()

Method Summary

 TLinkable
getNext()

          Returns the linked list node after this one.

 TLinkable
getPrevious()

          Returns the linked list node before this one.

 void
setNext(TLinkable linkable)

          Sets the linked list node after this one.

 void
setPrevious(TLinkable linkable)

          Sets the linked list node before this one.

Methods inherited from class java.lang.Object

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

Constructor Detail

TLinkableAdapter

public TLinkableAdapter()

Method Detail

getNext

public TLinkable getNext()

Returns the linked list node after this one.

Specified by:
getNext in interface TLinkable

Returns:
a TLinkable value

getPrevious

public TLinkable getPrevious()

Returns the linked list node before this one.

Specified by:
getPrevious in interface TLinkable

Returns:
a TLinkable value

setNext

public void setNext(TLinkable linkable)

Sets the linked list node after this one.

Specified by:
setNext in interface TLinkable

Parameters:
linkable - a TLinkable value

setPrevious

public void setPrevious(TLinkable linkable)

Sets the linked list node before this one.

Specified by:
setPrevious in interface TLinkable

Parameters:
linkable - a TLinkable value

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

GNU Trove

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

GNU Trove is copyright © 2001-2009 Eric D. Friedman. All Rights Reserved.


text:
import IteratorNext = require('../2016/IteratorNext');
export = IteratorNext;


text:
import React, {Component} from 'react'
import {connect} from 'react-redux'
import Timeline from './Timeline'
import {getTimelines} from '../../actions'
import Posting from './Posting'
import './style.css'

class MainContent extends Component {
  constructor(props) {
    super(props)
    this.userProfile = JSON.parse(window.localStorage.getItem('userProfile'))
  }

  componentDidMount() {
    this.props.getTimelines(this.userProfile.id)
  }

  render() {
    return (
      <div className="column is-6">
        <Posting/>
        { this.props.timelines.map(timeline => <Timeline key={timeline.id} timeline={timeline}/>) }
      </div>
    )
  }
}

const mapStateToProps = state => ({
  loggedIn: state.loggedIn,
  timelines: state.dashboards.timelines
})

const dispatchStateToProps = dispatch => ({
  getTimelines: profileId => dispatch(getTimelines(profileId))
})

export default connect(mapStateToProps, dispatchStateToProps)(MainContent)


text:
<resources>

    <string name="app_name">Falling Down Detection</string>
    <string name="action_settings">Settings</string>
    <string name="hello_world">Hello world!</string>
    <string name="menu">What do you want to do?</string>
    <string name="diagnosis">Live Data</string>
    <string name="patientInfo">Enter the patient information:</string>
    <string name="startDiagno">Start Diagnosis</string>
    <string name="sex_female">female</string>
    <string name="sex_male">male</string>
    <string name="runDiagno">Run</string>
    <string name="stopDiagno">Stop</string>
    <string name="sex">sex</string>
    <string name="startDiagnoContinuousWave">Continuous Wave</string>
    <string name="uploadDBtoServer">Upload To Database</string>

</resources>


text:
#ifndef _PROTO_CHANNEL_H
#define _PROTO_CHANNEL_H

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <common/config.h>
#include <common/chunk.h>
#include <common/memory.h>
#include <common/ticks.h>
#include <common/time.h>

#include <types/global.h>

extern struct pool_head *pool2_channel;

/* perform minimal intializations, report 0 in case of error, 1 if OK. */
int init_channel();

unsigned long long __channel_forward(struct channel *chn, unsigned long long bytes);

/* SI-to-channel functions working with buffers */
int bi_putblk(struct channel *chn, const char *str, int len);
int bi_putchr(struct channel *chn, char c);
int bo_inject(struct channel *chn, const char *msg, int len);
int bo_getline(struct channel *chn, char *str, int len);
int bo_getblk(struct channel *chn, char *blk, int len, int offset);

/* Initialize all fields in the channel. */
static inline void channel_init(struct channel *chn)
{
	chn->buf->o = 0;
	chn->buf->i = 0;
	chn->buf->p = chn->buf->data;
	chn->to_forward = 0;
	chn->total = 0;
	chn->pipe = NULL;
	chn->analysers = 0;
	chn->cons = NULL;
	chn->flags = 0;
}

/* Schedule up to <bytes> more bytes to be forwarded via the channel without
 * notifying the owner task. Any data pending in the buffer are scheduled to be
 * sent as well, in the limit of the number of bytes to forward. This must be
 * the only method to use to schedule bytes to be forwarded. If the requested
 * number is too large, it is automatically adjusted. The number of bytes taken
 * into account is returned. Directly touching ->to_forward will cause lockups
 * when buf->o goes down to zero if nobody is ready to push the remaining data.
 */
static inline unsigned long long channel_forward(struct channel *chn, unsigned long long bytes)
{
	/* hint: avoid comparisons on long long for the fast case, since if the
	 * length does not fit in an unsigned it, it will never be forwarded at
	 * once anyway.
	 */
	if (bytes <= ~0U) {
		unsigned int bytes32 = bytes;

		if (bytes32 <= chn->buf->i) {
			/* OK this amount of bytes might be forwarded at once */
			b_adv(chn->buf, bytes32);
			return bytes;
		}
	}
	return __channel_forward(chn, bytes);
}

/*********************************************************************/
/* These functions are used to compute various channel content sizes */
/*********************************************************************/

/* Reports non-zero if the channel is empty, which means both its
 * buffer and pipe are empty. The construct looks strange but is
 * jump-less and much more efficient on both 32 and 64-bit than
 * the boolean test.
 */
static inline unsigned int channel_is_empty(struct channel *c)
{
	return !(c->buf->o | (long)c->pipe);
}

/* Returns non-zero if the buffer input has all of its reserve available. This
 * is used to decide when a request or response may be parsed when some data
 * from a previous exchange might still be present.
 */
static inline int channel_reserved(const struct channel *chn)
{
	int rem = chn->buf->size;

	rem -= chn->buf->o;
	rem -= chn->buf->i;
	rem -= global.tune.maxrewrite;
	return rem >= 0;
}

/* Returns non-zero if the buffer input is considered full. This is used to
 * decide when to stop reading into a buffer when we want to ensure that we
 * leave the reserve untouched after all pending outgoing data are forwarded.
 * The reserved space is taken into account if ->to_forward indicates that an
 * end of transfer is close to happen. Note that both ->buf->o and ->to_forward
 * are considered as available since they're supposed to leave the buffer. The
 * test is optimized to avoid as many operations as possible for the fast case
 * and to be used as an "if" condition.
 */
static inline int channel_full(const struct channel *chn)
{
	int rem = chn->buf->size;

	rem -= chn->buf->o;
	rem -= chn->buf->i;
	if (!rem)
		return 1; /* buffer already full */

	if (chn->to_forward >= chn->buf->size ||
	    (CHN_INFINITE_FORWARD < MAX_RANGE(typeof(chn->buf->size)) && // just there to ensure gcc
	     chn->to_forward == CHN_INFINITE_FORWARD))                  // avoids the useless second
		return 0;                                               // test whenever possible

	rem -= global.tune.maxrewrite;
	rem += chn->buf->o;
	rem += chn->to_forward;
	return rem <= 0;
}

/* Returns true if the channel's input is already closed */
static inline int channel_input_closed(struct channel *chn)
{
	return ((chn->flags & CF_SHUTR) != 0);
}

/* Returns true if the channel's output is already closed */
static inline int channel_output_closed(struct channel *chn)
{
	return ((chn->flags & CF_SHUTW) != 0);
}

/* Check channel timeouts, and set the corresponding flags. The likely/unlikely
 * have been optimized for fastest normal path. The read/write timeouts are not
 * set if there was activity on the channel. That way, we don't have to update
 * the timeout on every I/O. Note that the analyser timeout is always checked.
 */
static inline void channel_check_timeouts(struct channel *chn)
{
	if (likely(!(chn->flags & (CF_SHUTR|CF_READ_TIMEOUT|CF_READ_ACTIVITY|CF_READ_NOEXP))) &&
	    unlikely(tick_is_expired(chn->rex, now_ms)))
		chn->flags |= CF_READ_TIMEOUT;

	if (likely(!(chn->flags & (CF_SHUTW|CF_WRITE_TIMEOUT|CF_WRITE_ACTIVITY))) &&
	    unlikely(tick_is_expired(chn->wex, now_ms)))
		chn->flags |= CF_WRITE_TIMEOUT;

	if (likely(!(chn->flags & CF_ANA_TIMEOUT)) &&
	    unlikely(tick_is_expired(chn->analyse_exp, now_ms)))
		chn->flags |= CF_ANA_TIMEOUT;
}

/* Erase any content from channel <buf> and adjusts flags accordingly. Note
 * that any spliced data is not affected since we may not have any access to
 * it.
 */
static inline void channel_erase(struct channel *chn)
{
	chn->buf->o = 0;
	chn->buf->i = 0;
	chn->to_forward = 0;
	chn->buf->p = chn->buf->data;
}

/* marks the channel as "shutdown" ASAP for reads */
static inline void channel_shutr_now(struct channel *chn)
{
	chn->flags |= CF_SHUTR_NOW;
}

/* marks the channel as "shutdown" ASAP for writes */
static inline void channel_shutw_now(struct channel *chn)
{
	chn->flags |= CF_SHUTW_NOW;
}

/* marks the channel as "shutdown" ASAP in both directions */
static inline void channel_abort(struct channel *chn)
{
	chn->flags |= CF_SHUTR_NOW | CF_SHUTW_NOW;
	chn->flags &= ~CF_AUTO_CONNECT;
}

/* allow the consumer to try to establish a new connection. */
static inline void channel_auto_connect(struct channel *chn)
{
	chn->flags |= CF_AUTO_CONNECT;
}

/* prevent the consumer from trying to establish a new connection, and also
 * disable auto shutdown forwarding.
 */
static inline void channel_dont_connect(struct channel *chn)
{
	chn->flags &= ~(CF_AUTO_CONNECT|CF_AUTO_CLOSE);
}

/* allow the producer to forward shutdown requests */
static inline void channel_auto_close(struct channel *chn)
{
	chn->flags |= CF_AUTO_CLOSE;
}

/* prevent the producer from forwarding shutdown requests */
static inline void channel_dont_close(struct channel *chn)
{
	chn->flags &= ~CF_AUTO_CLOSE;
}

/* allow the producer to read / poll the input */
static inline void channel_auto_read(struct channel *chn)
{
	chn->flags &= ~CF_DONT_READ;
}

/* prevent the producer from read / poll the input */
static inline void channel_dont_read(struct channel *chn)
{
	chn->flags |= CF_DONT_READ;
}

/*************************************************/
/* Buffer operations in the context of a channel */
/*************************************************/

/* Return the number of reserved bytes in the channel's visible
 * buffer, which ensures that once all pending data are forwarded, the
 * buffer still has global.tune.maxrewrite bytes free. The result is
 * between 0 and global.tune.maxrewrite, which is itself smaller than
 * any chn->size.
 */
static inline int buffer_reserved(const struct channel *chn)
{
	int ret = global.tune.maxrewrite - chn->to_forward - chn->buf->o;

	if (chn->to_forward == CHN_INFINITE_FORWARD)
		return 0;
	if (ret <= 0)
		return 0;
	return ret;
}

/* Return the max number of bytes the buffer can contain so that once all the
 * pending bytes are forwarded, the buffer still has global.tune.maxrewrite
 * bytes free. The result sits between chn->size - maxrewrite and chn->size.
 */
static inline int buffer_max_len(const struct channel *chn)
{
	return chn->buf->size - buffer_reserved(chn);
}

/* Return the amount of bytes that can be written into the buffer at once,
 * excluding reserved space, which is preserved.
 */
static inline int buffer_contig_space_res(const struct channel *chn)
{
	return buffer_contig_space_with_res(chn->buf, buffer_reserved(chn));
}

/* Returns the amount of space available at the input of the buffer, taking the
 * reserved space into account if ->to_forward indicates that an end of transfer
 * is close to happen. The test is optimized to avoid as many operations as
 * possible for the fast case.
 */
static inline int bi_avail(const struct channel *chn)
{
	int rem = chn->buf->size;
	int rem2;

	rem -= chn->buf->o;
	rem -= chn->buf->i;
	if (!rem)
		return rem; /* buffer already full */

	if (chn->to_forward >= chn->buf->size ||
	    (CHN_INFINITE_FORWARD < MAX_RANGE(typeof(chn->buf->size)) && // just there to ensure gcc
	     chn->to_forward == CHN_INFINITE_FORWARD))                  // avoids the useless second
		return rem;                                             // test whenever possible

	rem2 = rem - global.tune.maxrewrite;
	rem2 += chn->buf->o;
	rem2 += chn->to_forward;

	if (rem > rem2)
		rem = rem2;
	if (rem > 0)
		return rem;
	return 0;
}

/* Cut the "tail" of the channel's buffer, which means strip it to the length
 * of unsent data only, and kill any remaining unsent data. Any scheduled
 * forwarding is stopped. This is mainly to be used to send error messages
 * after existing data.
 */
static inline void bi_erase(struct channel *chn)
{
	if (!chn->buf->o)
		return channel_erase(chn);

	chn->to_forward = 0;
	if (!chn->buf->i)
		return;

	chn->buf->i = 0;
}

/*
 * Advance the channel buffer's read pointer by <len> bytes. This is useful
 * when data have been read directly from the buffer. It is illegal to call
 * this function with <len> causing a wrapping at the end of the buffer. It's
 * the caller's responsibility to ensure that <len> is never larger than
 * chn->o. Channel flag WRITE_PARTIAL is set.
 */
static inline void bo_skip(struct channel *chn, int len)
{
	chn->buf->o -= len;

	if (buffer_empty(chn->buf))
		chn->buf->p = chn->buf->data;

	/* notify that some data was written to the SI from the buffer */
	chn->flags |= CF_WRITE_PARTIAL;
}

/* Tries to copy chunk <chunk> into the channel's buffer after length controls.
 * The chn->o and to_forward pointers are updated. If the channel's input is
 * closed, -2 is returned. If the block is too large for this buffer, -3 is
 * returned. If there is not enough room left in the buffer, -1 is returned.
 * Otherwise the number of bytes copied is returned (0 being a valid number).
 * Channel flag READ_PARTIAL is updated if some data can be transferred. The
 * chunk's length is updated with the number of bytes sent.
 */
static inline int bi_putchk(struct channel *chn, struct chunk *chunk)
{
	int ret;

	ret = bi_putblk(chn, chunk->str, chunk->len);
	if (ret > 0)
		chunk->len -= ret;
	return ret;
}

/* Tries to copy string <str> at once into the channel's buffer after length
 * controls.  The chn->o and to_forward pointers are updated. If the channel's
 * input is closed, -2 is returned. If the block is too large for this buffer,
 * -3 is returned. If there is not enough room left in the buffer, -1 is
 * returned.  Otherwise the number of bytes copied is returned (0 being a valid
 * number).  Channel flag READ_PARTIAL is updated if some data can be
 * transferred.
 */
static inline int bi_putstr(struct channel *chn, const char *str)
{
	return bi_putblk(chn, str, strlen(str));
}

/*
 * Return one char from the channel's buffer. If the buffer is empty and the
 * channel is closed, return -2. If the buffer is just empty, return -1. The
 * buffer's pointer is not advanced, it's up to the caller to call bo_skip(buf,
 * 1) when it has consumed the char.  Also note that this function respects the
 * chn->o limit.
 */
static inline int bo_getchr(struct channel *chn)
{
	/* closed or empty + imminent close = -2; empty = -1 */
	if (unlikely((chn->flags & CF_SHUTW) || channel_is_empty(chn))) {
		if (chn->flags & (CF_SHUTW|CF_SHUTW_NOW))
			return -2;
		return -1;
	}
	return *buffer_wrap_sub(chn->buf, chn->buf->p - chn->buf->o);
}

#endif /* _PROTO_CHANNEL_H */

/*
 * Local variables:
 *  c-indent-level: 8
 *  c-basic-offset: 8
 * End:
 */


text:
define({
  "_widgetLabel": "Gegevens toevoegen",
  "noOptionsConfigured": "Geen opties geconfigureerd.",
  "tabs": {
    "search": "Zoeken",
    "url": "URL",
    "file": "Bestand"
  },
  "search": {
    "featureLayerTitlePattern": "{serviceName} - {layerName}",
    "layerInaccessible": "De laag is niet toegankelijk.",
    "loadError": "AddData, kan niet worden geladen:",
    "searchBox": {
      "search": "Zoeken",
      "placeholder": "Zoeken..."
    },
    "bboxOption": {
      "bbox": "Binnen kaart"
    },
    "scopeOptions": {
      "anonymousContent": "Content",
      "myContent": "Mijn Content",
      "myOrganization": "Mijn Organisatie",
      "curated": "Samengesteld",
      "ArcGISOnline": "ArcGIS Online"
    },
    "sortOptions": {
      "prompt": "Sorteren op:",
      "relevance": "Relevantie",
      "title": "Titel",
      "owner": "Eigenaar",
      "rating": "Beoordeling",
      "views": "Weergaven",
      "date": "Datum",
      "switchOrder": "Wijzigen"
    },
    "typeOptions": {
      "prompt": "Type",
      "mapService": "Kaartenservice",
      "featureService": "Featureservice",
      "imageService": "Imageservice",
      "vectorTileService": "Vectrotileservice",
      "kml": "KML",
      "wms": "WMS"
    },
    "resultsPane": {
      "noMatch": "Geen resultaten gevonden."
    },
    "paging": {
      "first": "<<",
      "firstTip": "Eerste",
      "previous": "<",
      "previousTip": "Vorige",
      "next": ">",
      "nextTip": "Volgende",
      "pagePattern": "{page}"
    },
    "resultCount": {
      "countPattern": "{count} {type}",
      "itemSingular": "Item",
      "itemPlural": "Items"
    },
    "item": {
      "actions": {
        "add": "Toevoegen",
        "close": "Sluiten",
        "remove": "Verwijderen",
        "details": "Details",
        "done": "Gereed",
        "editName": "Naam bewerken"
      },
      "messages": {
        "adding": "Bezig met toevoegen...",
        "removing": "Bezig met verwijderen",
        "added": "Toegevoegd",
        "addFailed": "Add failed",
        "unsupported": "Niet-ondersteund"
      },
      "typeByOwnerPattern": "{type} by {owner}",
      "dateFormat": "d. MMMM yyyy",
      "datePattern": "{date}",
      "ratingsCommentsViewsPattern": "{ratings} {ratingsIcon} {comments} {commentsIcon} {views} {viewsIcon}",
      "ratingsCommentsViewsLabels": {
        "ratings": "ratings\", \"comments\": \"comments\", \"views\": \"views"
      },
      "types": {
        "Map Service": "Kaartenservice",
        "Feature Service": "Featureservice",
        "Image Service": "Imageservice",
        "Vector Tile Service": "Vectrotileservice",
        "WMS": "WMS",
        "KML": "KML"
      }
    }
  },
  "addFromUrl": {
    "type": "Type",
    "url": "URL",
    "types": {
      "ArcGIS": "Een ArcGIS Server-webservice",
      "WMS": "Een WMS OGC-webservice",
      "WMTS": "Een WMTS OGC-webservice",
      "WFS": "Een WFS OGC-webservice",
      "KML": "Een KML-bestand",
      "GeoRSS": "Een GeoRSS-bestand",
      "CSV": "Een CSV-bestand"
    },
    "samplesHint": "Voorbeeld URL(s)"
  },
  "addFromFile": {
    "intro": "U kunt de volgende bestandstypen zoeken of plaatsen:",
    "types": {
      "Shapefile": "Een shapefile (.zip, ZIP-archief met alle shapefile-bestanden)",
      "CSV": "Een CSV-bestand (.csv met adres of breedtegraad, lengtegraad en komma, puntkomma of tabscheidingstekens)",
      "KML": "Een KML-bestand (.kml)",
      "GPX": "Een GPX-bestand (.gpx, GPS Exchange Format)",
      "GeoJSON": "Een GeoJSON-bestand (.geo.json of .geojson)"
    },
    "generalizeOn": "Objecten generaliseren voor webweergave",
    "dropOrBrowse": "Zoeken of plaatsen",
    "browse": "Bladeren",
    "invalidType": "Dit bestandstype worden niet ondersteund.",
    "addingPattern": "{filename}: bezig met toevoegen...",
    "addFailedPattern": "{filename}: toevoegen mislukt",
    "featureCountPattern": "{filename}: {count} object(en)",
    "invalidTypePattern": "{filename}: dit type wordt niet ondersteund",
    "maxFeaturesAllowedPattern": "Een maximum van {count} objecten is toegestaan",
    "layerNamePattern": "{filename} - {name}",
    "generalIssue": "Er is een probleem opgetreden.",
    "kmlProjectionMismatch": "De ruimtelijke referentie van de kaart en de KML-laag stemmen niet overeen, en de conversie kan niet worden uitgevoerd op de client."
  },
  "layerList": {
    "caption": "Kaartlagen",
    "noLayersAdded": "Er zijn geen lagen toegevoegd.",
    "removeLayer": "Laag verwijderen",
    "back": "Terug"
  }
});


text:
module latte{
    /**
     * Represents a view who presents items in columns
     **/
    export class ColumnView extends View{

        /**
         *
         **/
        private _columnWeights: Array<number> = [];

        /**
         *
         **/
        private _columns: number;

        /**
         *
         */
        private _paddingColumns: number = 10;

        /**
         * Collection of items inside the view's columns
         **/
        items: Collection<Item>;

        /**
         * Creates the View with the specified amount of columns.
         **/
        constructor(columns: number = 1){

            super();

            this.element.addClass('column');

            this.items = new Collection<Item>(this.onAddItem, this.onRemoveItem, this);

            if(columns > 0){
                this.columns = columns;
            }

        }

        /**
         * Called when an item is added to the items collection
         **/
         onAddItem(item: Item){

            var column = this.getColumnAt( (this.items.count - 1) % this.columns );

            // Append to current column
            item.appendTo(column);

            // Padding between items
            item.element.css('margin-bottom', this.columnPadding);

            // Layout item
            item.onLayout();

        }

        /**
         * Called when an item is removed to the items collection
         **/
        onRemoveItem(item: Item){

            item.element.detach();

        }

        /**
         * Returns the column at the specified index. First column is zero
         **/
        getColumnAt(index: number): JQuery{

            if(!_isNumber(index) || index < 0 || index >= this.columns)
                throw new InvalidArgumentEx('index', index);

            return this.container.find('.column').eq(index).find('.column-content');

        }

        /**
         * Raises the <c>layout</c> event
         **/
        onLayout(){

            super.onLayout();

            if(this.columnWeights.length > 0){
                //this.columnWeights = this.columnWeights;
            }else{
                if(View.smallScreen){
                    this.container.children().css('width', '');
                }else{
                    let w = Math.floor(100 / this.columns);
                    this.container.children().css('width', w + '%');
                }

            }

            // Update Items
            this.items.each(item => item.onLayout());

        }

        /**
         * Gets or sets the weights of columns for computing their width.
         Weights must be numbers between 0 and 100.
         **/
        get columnWeights(): Array<number>{
            return this._columnWeights;
        }

        /**
         * Gets or sets the weights of columns for computing their width.
         Weights must be numbers between 0 and 100.
         **/
        set columnWeights(value: Array<number>){

            if(value.length != this._columns)
                throw new Ex();

            this._columnWeights = value;

            if(View.smallScreen){
                for(var i = 0; i < this.columns; i++){
                    this.getColumnAt(i).parent().css('width', '');
                }
            }else{
                for(var i = 0; i < this.columns; i++){
                    this.getColumnAt(i).parent().css('width', value[i] + '%');
                }
            }

            this.onLayout();

        }

        /**
         * Gets or sets the number of columns in the view.
         **/
        get columns(): number{
            return this._columns;
        }

        /**
         * Gets or sets the number of columns in the view.
         **/
        set columns(value: number){

            if(!_isNumber(value))
                throw new InvalidArgumentEx('value', value);

            this._columns = value;

            var i = 0;

            // Detach items
            for(i = 0; i < this.items.count; i++)
                this.items.item(i).element.detach();

            // Clear space
            this.container.empty();

            if(value > 0){
                var w = Math.floor(100 / value);

                for(i = 0; i < value; i++){

                    // Create column
                    var c = $('<div>')
                        .addClass('column')
                        .css('width', w + '%')
                        .appendTo(this.container);

                    // Create container
                    $('<div>')
                        .addClass('column-content')
                        .appendTo(c);
                }

                var buffer = [];

                // Buffer items
                for(i = 0; i < this.items.count; i++)
                    buffer.push(this.items.item(i));

                // Clear items
                this.items.clear();

                // Reatach items
                for(i = 0; i < buffer.length; i++)
                    this.items.add(buffer[i]);

            }

            this.columnPadding = this.columnPadding;

        }

        /**
         * Gets or sets the column padding inside of columns
         **/
        get columnPadding(): number{
            return this._paddingColumns;
        }

        /**
         * Gets or sets the column  padding inside of columns
         **/
        set columnPadding(value: number){

            this.container.find('.column-content').css('margin', value);
            this.container.find('.column-content > .latte-item').css('margin-bottom', value);

            this._paddingColumns = value;

        }
    }
}


text:
/*
  DO NOT EDIT THIS FILE - the content was created using a source code generator
*/

#ifndef QABSTRACTEVENTDISPATCHERSLOTS_H
#define QABSTRACTEVENTDISPATCHERSLOTS_H

#include <QtCore/QObject>
#include <QtCore/QCoreApplication>
#include <QtCore/QString>

#include <QtCore/QAbstractEventDispatcher>

#include "qt4xhb_common.h"
#include "qt4xhb_macros.h"
#include "qt4xhb_utils.h"
#include "qt4xhb_signals.h"

class QAbstractEventDispatcherSlots: public QObject
{
  Q_OBJECT
  public:
  QAbstractEventDispatcherSlots( QObject * parent = 0 );
  ~QAbstractEventDispatcherSlots();
  public slots:
  void aboutToBlock();
  void awake();
};

#endif /* QABSTRACTEVENTDISPATCHERSLOTS_H */


text:
                            // ShoppingClient.java
                            // A Simple Shopping Cart
                            // Client.
package client ;
import server.* ;
import java.io.* ;
import java.rmi.* ;
import java.util.* ;
import javax.ejb.* ;
import javax.naming.* ;
import javax.rmi.* ;
public class ShoppingClient
{
    private static Cart cart ;
    private static Customer customer ;
    private static Cashier cashier ;
    private static InventoryHome inventoryHome ;
    private static CustomerHome customerHome ;
    private static final int ID_WIDTH = 5 ;
    private static final int DESCRIPTION_WIDTH = 20 ;
    private static final int QUANTITY_WIDTH = 5 ;
    private static final int PRICE_WIDTH = 10 ;
    private static final int TOTAL_WIDTH = 34 ;
    private static BufferedReader keyboard =
        new BufferedReader(
            new InputStreamReader( System.in ) ) ;
    private static final String [] menu =
    {
        "[A] Add",
        "[R] Remove",
        "[B] Buy",
        "[C] Cancel"
    } ;
    public static void main( String [] args )
    {
        try
        {
            InitialContext nameService =
                new InitialContext() ;
            Object object =
                nameService.lookup( "ejb/Cart" ) ;
            CartHome cartHome = ( CartHome )
                PortableRemoteObject.narrow
                    ( object, CartHome.class ) ;
            cart = cartHome.create() ;
            object = nameService.lookup( "ejb/Cashier" ) ;
            CashierHome cashierHome = ( CashierHome )
                PortableRemoteObject.narrow
                    ( object, CashierHome.class ) ;
            cashier = cashierHome.create() ;
            object = nameService.lookup
                ( "ejb/Inventory" ) ;
            inventoryHome = ( InventoryHome )
                PortableRemoteObject.narrow
                    ( object, InventoryHome.class ) ;
            object = nameService.lookup
                ( "ejb/Customer" ) ;
            customerHome = ( CustomerHome )
                PortableRemoteObject.narrow
                    ( object, CustomerHome.class ) ;
            login() ;
            shop() ;
        }
        catch ( Exception e )
        {
            System.out.println( "\n" + e.getMessage() ) ;
        }
        finally
        {
            try
            {
                if ( cashier != null )
                    cashier.remove() ;
            }
            catch ( Exception e )
            {
                System.out.println( e.getMessage() ) ;
            }
            try
            {
                if ( cart != null )
                    cart.remove() ;
            }
            catch ( Exception e )
            {
                System.out.println( e.getMessage() ) ;
            }
        }
    }
    public static char getMenu( int itemCount )
        throws IOException
    {
        System.out.println() ;
        for ( int i = 0 ; i < menu.length ; i++ )
        {
            if ( itemCount == 0 )
            {
                if ( i == 0 || i >= 3 )
                    System.out.print( menu[ i ] + "  " ) ;
            }
            else
                System.out.print( menu[ i ] + "  " ) ;
        }
        System.out.print( "Choice : " ) ;
        return keyboard.readLine().
            toUpperCase().trim().charAt( 0 ) ;
    }
    public static int printItems() throws RemoteException
    {
        Iterator items = cart.getItems().iterator() ;
        int i = 0 ;
        System.out.println( "\nContents Of Cart" ) ;
        System.out.print( "======================" ) ;
        System.out.println( "=====================" ) ;
        System.out.print
            ( "ID    Description            " ) ;
        System.out.println
            ( "Qty      Price" ) ;
        for ( ; items.hasNext() ; i++ )
        {
            ItemInfo item = ( ItemInfo ) items.next() ;
            String id = item.getID() ;
            String description = item.getDescription() ;
            int quantity = item.getQuantity() ;
            double price = item.getPrice() ;
            System.out.print
                ( Utilities.leftJustify
                    ( id, ID_WIDTH ) ) ;
            System.out.print( " " ) ;
            System.out.print
                ( Utilities.leftJustify
                    ( description, DESCRIPTION_WIDTH ) ) ;
            System.out.print( " " ) ;
            System.out.print
                ( Utilities.rightJustify
                    ( quantity, QUANTITY_WIDTH ) ) ;
            System.out.print( " " ) ;
            System.out.println
                ( Utilities.rightJustify
                    ( price, PRICE_WIDTH ) ) ;
        }
        System.out.print( "======================" ) ;
        System.out.println( "=====================" ) ;
        return i ;
    }
    public static void printTotals()
        throws RemoteException, ShoppingException
    {
        OrderSummary summary = cashier.checkOut
            ( customer.getID(), cart.getItems() ) ;
        System.out.println
            ( "Subtotal " + Utilities.rightJustify
            ( summary.getSubtotal(), TOTAL_WIDTH ) ) ;
        System.out.println
            ( "Tax      " + Utilities.rightJustify
            ( summary.getTax(), TOTAL_WIDTH ) ) ;
        System.out.println
            ( "Total    " + Utilities.rightJustify
            ( summary.getTotal(), TOTAL_WIDTH ) ) ;
    }
    public static void printCustomer() throws
        IOException, RemoteException, ShoppingException
    {
        CustomerInfo custInfo = customer.getCustomer() ;
        System.out.print( "\nCust ID     : " ) ;
        System.out.println( custInfo.getID() ) ;
        System.out.print( "Name        : " ) ;
        System.out.println( custInfo.getName() ) ;
        System.out.print( "Email       : " ) ;
        System.out.println( custInfo.getEmail() ) ;
    }
    public static String read( String prompt )
        throws IOException
    {
        System.out.print( prompt ) ;
        String reply =
            keyboard.readLine().trim().toUpperCase() ;
        return reply ;
    }
    public static void shop() throws
        IOException, RemoteException, ShoppingException
    {
        char choice = '\0' ;
        int itemCount = 0 ;
        boolean done = false ;
        while ( ! done )
        {
            itemCount = printItems() ;
            try
            {
                choice = getMenu( itemCount ) ;
                switch( choice )
                {
                    case 'A' :
                        addItem() ;
                        break ;
                    case 'R' :
                        removeItem() ;
                        break ;
                    case 'B' :
                        System.out.println
                            ( "\nOrder Confirmed" ) ;
                        printCustomer() ;
                        printItems() ;
                        printTotals() ;
                        done = true ;
                        break ;
                    case 'C' :
                        System.out.println
                            ( "\nOrder Cancelled" ) ;
                        done = true ;
                        break ;
                    default :
                        System.out.print
                            ( "\nInvalid Selection. " ) ;
                        System.out.println
                            ( "Try Again" ) ;
                        break ;
                }
            }
            catch ( ShoppingException store )
            {
                System.out.println
                    ( "\n" + store.getMessage() ) ;
            }
            catch ( NumberFormatException numberFormat )
            {
                System.out.print
                    ( "\nQuantity And Price " ) ;
                System.out.print
                    ( "Must Be Numbers. " ) ;
                System.out.println
                    ( "Try Again" ) ;
            }
        }
    }
    public static void addItem() throws
        IOException, RemoteException, ShoppingException
    {
        String itemID = read( "\nItem ID     : " ) ;
                            // See if the item exists.
        try
        {
            Inventory inventory =
                inventoryHome.findByPrimaryKey( itemID ) ;
            ItemInfo existingItem = inventory.getItem() ;
                            // Continue only if it does.
            String quantityString =
                read( "Quantity    : " ) ;
            int quantity =
                Integer.parseInt( quantityString ) ;
            existingItem.setQuantity( quantity ) ;
            cart.addItem( existingItem ) ;
        }
        catch ( FinderException finder )
        {
            String message =
                "Unable To Locate Inventory Item " +
                itemID ;
            throw new ShoppingException( message ) ;
        }
    }
    public static void removeItem() throws
        IOException, RemoteException, ShoppingException
    {
        String itemID = read( "\nItem ID     : " ) ;
        String quantityString = read( "Quantity    : " ) ;
        int quantity = Integer.parseInt( quantityString ) ;
        ItemInfo item = null ;
        try
        {
            item = new ItemInfo
                ( itemID, "Anything", quantity, 0 ) ;
        }
        catch ( ShoppingException store )
        {
        }
        cart.removeItem( item ) ;
    }
    public static void login()
        throws IOException, ShoppingException
    {
        String custID = read( "\nCustomer ID  : " ) ;
        try
        {
            customer =
                customerHome.findByPrimaryKey( custID ) ;
        }
        catch ( FinderException finder )
        {
            String message =
                "Unable To Locate Customer " + custID ;
            throw new ShoppingException( message ) ;
        }
    }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Sydowia 9: 9 (1955)

#### Original name
Meliola besleriae Hansf.

### Remarks
null


text:
package scala.scalajs.tools.json

import scala.collection.mutable

class JSONObjExtractor(rawData: Object) {
  import JSONDeserializer._

  /** pseudo-deserializer to trick json api into not deserializing
    * field values */
  private object objectJSON extends IdentityDeserializer[Object]

  private val deserializer = mapJSON(stringJSON, objectJSON)
  private val data = fromJSON[Map[String,Object]](rawData)(deserializer)

  def fld[T : JSONDeserializer](name: String): T =
    fromJSON[T](data(name))

  def opt[T : JSONDeserializer](name: String): Option[T] =
    data.get(name).map(fromJSON[T] _)
}


text:
<?php

class Option
{
    public $label;
    public $disabled = false;
    public $selected = false;
    public $value;
    public $optionString;

    #region Public Properties
    public function setValue($param){
        $this->value = $param;
    }
    public function getName(){
        return $this->name;
    }
    public function setName($param){
        $this->name = $param;
    }
    public function setType($param){
        $this->type = $param;
    }
    public function setRequired(){
        $this->required = true;
    }
    public function isRequired(){
        return $this->required;
    }
    public function getLabelTag(){
        return ucfirst($this->label);
    }
    public function setLabel($label){
        $this->label = $label;
    }
    public function getValidator(){
        return $this->validator;
    }
    public function setValidator($param){
        $name = null;
        if(is_array($param)){
            $name = key($param);
        }
        elseif(is_string($param)){
            $name = ucfirst($param);
        }

        if(!$name) return false;
        require_once CLASSES . 'Validator/' . $name . '.php';
        $validator = new $name;

        switch(true){
            case $validator instanceof StringLength:
                $validator->setMinimum($param['StringLength']['minimum']);
                $validator->setMaximum($param['StringLength']['maximum']);
                break;
        }

        $this->validator = $validator;
        return $this;
    }
    public function isValid(){
        return $this->valid;
    }
    public function setValid(){
        $this->valid = true;
    }
    #endregion

    #region Functions and Methods
    public function getOption(){
        $option = "<option ";
        $option .= $this->value ? " value=\"$this->value\"" : null;
        $option .= $this->disabled ? " disabled" : null;
        $option .= $this->label ? " label=\"$this->label\"" : null;
        $option .= $this->selected ? " selected" : null;
        $option .= ">";
        $option .= $this->optionString;
        $option .= "</option>";
        return $option;

    }
    public function getOptions($options){
        $results = null;
        foreach($options as $option){
            $value = ucwords($option);
            $this->value = $value;
            $this->optionString = $value;
            $results[] = $this->getOption($option);
        }
        return $results ?: false;
    }

    #endregion

}


text:
namespace ppapi {

PPB_AudioConfig_Shared::PPB_AudioConfig_Shared(ResourceObjectType type,
                                               PP_Instance instance)
    : Resource(type, instance),
      sample_rate_(PP_AUDIOSAMPLERATE_NONE),
      sample_frame_count_(0) {
}

PPB_AudioConfig_Shared::~PPB_AudioConfig_Shared() {
}

PP_Resource PPB_AudioConfig_Shared::Create(
    ResourceObjectType type,
    PP_Instance instance,
    PP_AudioSampleRate sample_rate,
    uint32_t sample_frame_count) {
  scoped_refptr<PPB_AudioConfig_Shared> object(
      new PPB_AudioConfig_Shared(type, instance));
  if (!object->Init(sample_rate, sample_frame_count))
    return 0;
  return object->GetReference();
}

// static
uint32_t PPB_AudioConfig_Shared::RecommendSampleFrameCount_1_0(
    PP_AudioSampleRate sample_rate,
    uint32_t requested_sample_frame_count) {
  // Version 1.0: Don't actually query to get a value from the
  // hardware; instead return the input for in-range values.
  if (requested_sample_frame_count < PP_AUDIOMINSAMPLEFRAMECOUNT)
    return PP_AUDIOMINSAMPLEFRAMECOUNT;
  if (requested_sample_frame_count > PP_AUDIOMAXSAMPLEFRAMECOUNT)
    return PP_AUDIOMAXSAMPLEFRAMECOUNT;
  return requested_sample_frame_count;
}

// static
uint32_t PPB_AudioConfig_Shared::RecommendSampleFrameCount_1_1(
    PP_Instance instance,
    PP_AudioSampleRate sample_rate,
    uint32_t sample_frame_count) {
  // Version 1.1: Query the back-end hardware for sample rate and buffer size,
  // and recommend a best fit based on request.
  thunk::EnterInstanceNoLock enter(instance);
  if (enter.failed())
    return 0;

  // Get the hardware config.
  PP_AudioSampleRate hardware_sample_rate = static_cast<PP_AudioSampleRate>(
      enter.functions()->GetAudioHardwareOutputSampleRate(instance));
  uint32_t hardware_sample_frame_count =
      enter.functions()->GetAudioHardwareOutputBufferSize(instance);
  if (sample_frame_count < PP_AUDIOMINSAMPLEFRAMECOUNT)
    sample_frame_count = PP_AUDIOMINSAMPLEFRAMECOUNT;

  // If client is using same sample rate as audio hardware, then recommend a
  // multiple of the audio hardware's sample frame count.
  if (hardware_sample_rate == sample_rate && hardware_sample_frame_count > 0) {
    // Round up input sample_frame_count to nearest multiple.
    uint32_t multiple = (sample_frame_count + hardware_sample_frame_count - 1) /
        hardware_sample_frame_count;
    uint32_t recommendation = hardware_sample_frame_count * multiple;
    if (recommendation > PP_AUDIOMAXSAMPLEFRAMECOUNT)
      recommendation = PP_AUDIOMAXSAMPLEFRAMECOUNT;
    return recommendation;
  }

  // Otherwise, recommend a conservative 50ms buffer based on sample rate.
  const uint32_t kDefault50msAt44100kHz = 2205;
  const uint32_t kDefault50msAt48000kHz = 2400;
  switch (sample_rate) {
    case PP_AUDIOSAMPLERATE_44100:
      return kDefault50msAt44100kHz;
    case PP_AUDIOSAMPLERATE_48000:
      return kDefault50msAt48000kHz;
    case PP_AUDIOSAMPLERATE_NONE:
      return 0;
  }
  // Unable to make a recommendation.
  return 0;
}

// static
PP_AudioSampleRate PPB_AudioConfig_Shared::RecommendSampleRate(
    PP_Instance instance) {
  thunk::EnterInstanceNoLock enter(instance);
  if (enter.failed())
    return PP_AUDIOSAMPLERATE_NONE;
  PP_AudioSampleRate hardware_sample_rate = static_cast<PP_AudioSampleRate>(
    enter.functions()->GetAudioHardwareOutputSampleRate(instance));
  return hardware_sample_rate;
}

thunk::PPB_AudioConfig_API* PPB_AudioConfig_Shared::AsPPB_AudioConfig_API() {
  return this;
}

PP_AudioSampleRate PPB_AudioConfig_Shared::GetSampleRate() {
  return sample_rate_;
}

uint32_t PPB_AudioConfig_Shared::GetSampleFrameCount() {
  return sample_frame_count_;
}

bool PPB_AudioConfig_Shared::Init(PP_AudioSampleRate sample_rate,
                                  uint32_t sample_frame_count) {
  // TODO(brettw): Currently we don't actually check what the hardware
  // supports, so just allow sample rates of the "guaranteed working" ones.
  if (sample_rate != PP_AUDIOSAMPLERATE_44100 &&
      sample_rate != PP_AUDIOSAMPLERATE_48000)
    return false;

  // TODO(brettw): Currently we don't actually query to get a value from the
  // hardware, so just validate the range.
  if (sample_frame_count > PP_AUDIOMAXSAMPLEFRAMECOUNT ||
      sample_frame_count < PP_AUDIOMINSAMPLEFRAMECOUNT)
    return false;

  sample_rate_ = sample_rate;
  sample_frame_count_ = sample_frame_count;
  return true;
}

}  // namespace ppapi


text:
package com.swtworkbench.community.xswt.dataparser.parsers;

import java.net.URL;
import java.util.StringTokenizer;

import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;

import com.swtworkbench.community.xswt.ClassBuilder;
import com.swtworkbench.community.xswt.XSWTException;
import com.swtworkbench.community.xswt.dataparser.DisposableDataParser;
import com.swtworkbench.community.xswt.metalogger.Logger;

/**
 * Class ImageDataParser.
 *
 * @author daveo
 */
public class ImageDataParser extends DisposableDataParser  {

    /* (non-Javadoc)
     * @see com.swtworkbench.community.xswt.dataparser.IDataParser#parse(java.lang.String)
     */
    public Object parse(String source) throws XSWTException {
        StringTokenizer stringTokenizer = new StringTokenizer(source, " \t\r\n");
        String classname = stringTokenizer.nextToken();
        String relativePath = stringTokenizer.nextToken();
        Image result = null;
        try {
            // FIXME: This only works at runtime.  It will not find the proper
            // class if the class is in a project you're developing inside
            // Eclipse.
            //
            // The fix would be to have the Eclipse plug-in supply a different
            // classloader that searches the project's build path
            Class relativeClass = ClassBuilder.getDefault().getClass(classname);
            URL imageLocation = relativeClass.getResource(relativePath);

            // FIXME: This won't work with the XSWT compiler
            result = new Image(Display.getCurrent(), imageLocation.openStream());
        } catch (Exception e) {
            Logger.log().error(e, "Unable to load Image");
        }
        return result;
    }

}


text:
/*
	hex.h
	Mattia Tristo
	2004
*/

#ifndef _HEX_H
#define _HEX_H
#endif

#ifndef _STRING_H
#include <String.h>
#endif

#ifndef _CHAR_H
#include "char.h"
#endif

class Hex
{

public:
			  Hex();
			  ~Hex();
        void  Set(char value);
        void  Set(uint8 value);
        void  Set(int value);
        void  Set(BChar value);
	 BString  GetString();

private:

	 BString  HexString;

        void  UInt8ToString(uint8 decimal);

};


text:
package org.openqa.selenium.devtools;

import org.openqa.selenium.Capabilities;
import org.openqa.selenium.HasCapabilities;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.internal.Require;
import org.openqa.selenium.remote.http.ClientConfig;
import org.openqa.selenium.remote.http.HttpClient;

import java.net.URI;
import java.net.URISyntaxException;
import java.util.Map;
import java.util.Optional;

public class SeleniumCdpConnection extends Connection {

  private SeleniumCdpConnection(HttpClient client, String url) {
    super(client, url);
  }

  public static Optional<Connection> create(WebDriver driver) {
    if (!(driver instanceof HasCapabilities)) {
      throw new IllegalStateException("Given webdriver instance must have capabilities");
    }

    return create(((HasCapabilities) driver).getCapabilities());
  }

  public static Optional<Connection> create(Capabilities capabilities) {
    Require.nonNull("Capabilities", capabilities);
    return create(HttpClient.Factory.createDefault(), capabilities);
  }

  public static Optional<Connection> create(HttpClient.Factory clientFactory, Capabilities capabilities) {
    Require.nonNull("HTTP client factory", clientFactory);
    Require.nonNull("Capabilities", capabilities);

    return getCdpUri(capabilities).map(uri -> new SeleniumCdpConnection(
      clientFactory.createClient(ClientConfig.defaultConfig().baseUri(uri)),
      uri.toString()));
  }

  public static Optional<URI> getCdpUri(Capabilities capabilities) {
    Object options = capabilities.getCapability("se:options");

    if (!(options instanceof Map)) {
      return Optional.empty();
    }

    Object cdp = ((Map<?, ?>) options).get("cdp");
    if (!(cdp instanceof String)) {
      return Optional.empty();
    }

    try {
      return Optional.of(new URI((String) cdp));
    } catch (URISyntaxException e) {
      return Optional.empty();
    }
  }
}


text:
set -ae

# GC logging set to default value of path.logs
CRATE_GC_LOG_DIR="/data/log"
CRATE_HEAP_DUMP_PATH="/data/data"
# Make sure directories exist as they are not automatically created
# This needs to happen at runtime, as the directory could be mounted.
mkdir -pv $CRATE_GC_LOG_DIR $CRATE_HEAP_DUMP_PATH

# Special VM options for Java in Docker
CRATE_JAVA_OPTS="-Des.cgroups.hierarchy.override=/ $CRATE_JAVA_OPTS"

if [ "${1:0:1}" = '-' ]; then
    set -- crate "$@"
fi

if [ "$1" = 'crate' -a "$(id -u)" = '0' ]; then
    chown -R crate:crate /data
    exec chroot --userspec=1000 / "$@"
fi

exec "$@"


text:
@interface DownloadWindowController ()

@property (nonatomic, weak) Book *book;

@end

@implementation DownloadWindowController

#pragma mark - Initialize

- (id)initWithBook:(Book *)book
{
    if (self = [super initWithWindowNibName:@"DownloadWindow"]) {
        _book = book;
    }
    return self;
}

#pragma mark - UI Button Actions

- (void)beginDownloadToDirectoryURL:(NSURL *)directoryURL
{
    [self.book downloadToDirectoryURL:directoryURL delegate:self];
}

- (IBAction)cancelDownload:(id)sender
{
    [self.book cancelDownload];
}

- (IBAction)closeSheet:(id)sender
{
    [NSApp endSheet:self.window returnCode:DownloadSheetCloseButton];
}

- (IBAction)saveToPDF:(id)sender
{
    [NSApp endSheet:self.window returnCode:DownloadSheetSaveButton];
}

#pragma mark - Show/Hide Buttons

- (void)showCancelButton
{
    [self.cancelButton setHidden:NO];

    [self.closeButton setHidden:YES];
    [self.saveAsPDFButton setHidden:YES];
}

- (void)showFinishButtons
{
    [self.cancelButton setHidden:YES];

    [self.closeButton setHidden:NO];
    [self.saveAsPDFButton setHidden:NO];
}

#pragma mark - Book Delegate

#pragma mark JSON Notifications

- (void)book:(Book *)book JSONLoadDidFailWithError:(NSError *)error
{
    [self logToTextView:@"Failed to load JSON data from Google Books server.\n"
     "%@", [self messageFromError:error]];
}

- (void)book:(Book *)book JSONLoadDidReceiveErrorResponse:(NSHTTPURLResponse *)response
{
    [self logToTextView:@"Failed to load JSON data from Google Books server.\n"
     "  URL: %@\n"
     "  Status: %ld %@",
     [response.URL absoluteString], response.statusCode, response.statusText];
}

- (void)book:(Book *)book JSONParseDidFailWithError:(NSError *)error
{
    [self logToTextView:@"Failed to parse JSON data.\n"
     "%@", [self messageFromError:error]];
}

#pragma mark Page Notifications

- (void)book:(Book *)book pageAlreadyExists:(NSString *)pageID
{
    [self logToTextView:@"Skipping page %@. Page has already been downloaded.", pageID];
}

- (void)book:(Book *)book pageURLUnavailable:(NSString *)pageID
{
    [self logToTextView:@"Page %@ is missing a URL. "
                         "Google Books may be limiting your page views. "
                         "Re-try download again some time later.", pageID];
}

- (void)book:(Book *)book page:(NSString *)pageID didReceiveErrorResponse:(NSHTTPURLResponse *)response
{
    [self logToTextView:@"Page %@ download failed.\n"
     "  URL: %@\n"
     "  Status: %ld %@",
     pageID, [response.URL absoluteString], response.statusCode, response.statusText];
}

- (void)book:(Book *)book page:(NSString *)pageID didFailToLoadWithError:(NSError *)error
{
    [self logToTextView:@"Page %@ download failed.\n%@",
     pageID, [self messageFromError:error]];
}

- (void)book:(Book *)book page:(NSString *)pageID didFailToWriteToFileWithError:(NSError *)error
{
    [self logToTextView:@"Could not save page %@ image to file.\n%@",
     pageID, [self messageFromError:error]];
}

- (void)book:(Book *)book page:(NSString *)pageID didDownloadToPath:(NSString *)path
{
    [self logToTextView:@"Page %@ has been downloaded to %@.", pageID, path];
}

#pragma mark Book Notifications

- (void)book:(Book *)book didAttemptPageLoadAt:(NSUInteger)pageIndex
{
    // Page Index starts from 0. Page Number starts from 1.
    self.downloadedPageCountLabel.stringValue =
        [[NSString alloc] initWithFormat:@"Downloading page %lu of %lu",
         pageIndex + 1, book.pageCount];

    self.progressBar.doubleValue = (double)(pageIndex + 1) / (double)book.pageCount;
}

- (void)bookDidFinishDownload:(Book *)book
{
    [self bookDidFinishDownload:book cancel:NO];
}

- (void)bookDidCancelDownload:(Book *)book
{
    [self bookDidFinishDownload:book cancel:YES];
}

- (void)bookDidFinishDownload:(Book *)book cancel:(BOOL)cancel
{
    [self showFinishButtons];

    NSMutableString *message =
        [[NSMutableString alloc] initWithString:@"----------------------------------------------------------------------------\n"];
    if (cancel) {
        [message appendString:@"Download has been cancelled. You can resume your download again later.\n\n"];
    } else {
        [message appendString:@"Download has finished.\n\n"];
    }

    [message appendFormat:@"Pages have been downloaded to %@.\n"
     "Downloaded %lu of %lu pages. ",
     [book.downloadDirectoryURL path], book.downloadedPageCount, book.pageCount];

    NSUInteger remainingPageCount = book.pageCount - book.downloadedPageCount;
    if (remainingPageCount > 0) {
        [message appendFormat:@"You have %lu page(s) not downloaded yet.", remainingPageCount];
    } else {
        [message appendString:@"You've downloaded all the pages in the book."];
    }

    [self logToTextView:@"%@", message];
}

#pragma mark - Log

// Helper method to log some text to the NSTextView.
- (void)logToTextView:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2)
{
    va_list args;
    va_start(args, format);

    [self.textView.textStorage.mutableString
        appendString:[[NSMutableString alloc] initWithFormat:format arguments:args]];
    [self.textView.textStorage.mutableString appendString:@"\n\n"];

    va_end(args);
}

// Returns a user-friendly message from the error object.
- (NSString *)messageFromError:(NSError *)error
{
    NSMutableString *message = [[NSMutableString alloc] init];
    NSString *indentSpace = @"  "; // 2 spaces indentation

    if (error.localizedDescription) {
        [message appendFormat:@"%@", indentSpace];
        [message appendFormat:@"Error: %@", error.localizedDescription];
    }

    if (error.localizedRecoverySuggestion) {
        [message appendFormat:@"\n%@", indentSpace];
        [message appendFormat:@"More Info: %@", error.localizedRecoverySuggestion];
    }

    if (error.localizedFailureReason) {
        [message appendFormat:@"\n%@", indentSpace];
        [message appendFormat:@"Reason: %@", error.localizedFailureReason];
    }

    NSString *errorURLString = error.userInfo[NSURLErrorFailingURLStringErrorKey];
    if (errorURLString) {
        [message appendFormat:@"\n%@", indentSpace];
        [message appendFormat:@"URL: %@", errorURLString];
    }

    NSString *errorFilePath = error.userInfo[NSFilePathErrorKey];
    if (errorFilePath) {
        [message appendFormat:@"\n%@", indentSpace];
        [message appendFormat:@"File Path: %@", errorFilePath];
    }

    NSString *debugDescription = error.userInfo[@"NSDebugDescription"];
    if (debugDescription) {
        [message appendFormat:@"\n%@", indentSpace];
        [message appendFormat:@"Debug: %@", debugDescription];
    }

    return message;
}

@end


text:
<!DOCTYPE html>

	<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/u/bs-3.3.6/jqc-1.12.3,dt-1.10.12/datatables.min.css"/>
	<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.2.0/css/buttons.dataTables.min.css"/>

					Name
					Email
					Viewed?
					Viewed Date
					RSVP
					RSVP Date
					Notes


text:
/*
 * The Network class is the base class for classes that implement the
 * interconnection network between components (processor/cache
 * components and memory/directory components).  The interconnection
 * network as described here is not a physical network, but a
 * programming concept used to implement all communication between
 * components.  Thus parts of this 'network' will model the on-chip
 * connections between cache controllers and directory controllers as
 * well as the links between chip and network switches.
 */

#ifndef __MEM_RUBY_NETWORK_NETWORK_HH__
#define __MEM_RUBY_NETWORK_NETWORK_HH__

#include <iostream>
#include <string>
#include <vector>

#include "mem/protocol/LinkDirection.hh"
#include "mem/protocol/MessageSizeType.hh"
#include "mem/ruby/common/TypeDefines.hh"
#include "mem/ruby/network/Topology.hh"
#include "mem/packet.hh"
#include "params/RubyNetwork.hh"
#include "sim/clocked_object.hh"

class NetDest;
class MessageBuffer;

class Network : public ClockedObject
{
  public:
    typedef RubyNetworkParams Params;
    Network(const Params *p);
    const Params * params() const
    { return dynamic_cast<const Params *>(_params); }

    virtual ~Network();
    virtual void init();

    static uint32_t getNumberOfVirtualNetworks() { return m_virtual_networks; }
    int getNumNodes() const { return m_nodes; }

    static uint32_t MessageSizeType_to_int(MessageSizeType size_type);

    // returns the queue requested for the given component
    virtual void setToNetQueue(NodeID id, bool ordered, int netNumber,
                               std::string vnet_type, MessageBuffer *b) = 0;
    virtual void setFromNetQueue(NodeID id, bool ordered, int netNumber,
                                 std::string vnet_type, MessageBuffer *b) = 0;

    virtual void makeOutLink(SwitchID src, NodeID dest, BasicLink* link,
                             LinkDirection direction,
                             const NetDest& routing_table_entry) = 0;
    virtual void makeInLink(NodeID src, SwitchID dest, BasicLink* link,
                            LinkDirection direction,
                            const NetDest& routing_table_entry) = 0;
    virtual void makeInternalLink(SwitchID src, SwitchID dest, BasicLink* link,
                                  LinkDirection direction,
                                  const NetDest& routing_table_entry) = 0;

    virtual void collateStats() = 0;
    virtual void print(std::ostream& out) const = 0;

    /*
     * Virtual functions for functionally reading and writing packets in
     * the network. Each network needs to implement these for functional
     * accesses to work correctly.
     */
    virtual bool functionalRead(Packet *pkt)
    { fatal("Functional read not implemented.\n"); }
    virtual uint32_t functionalWrite(Packet *pkt)
    { fatal("Functional write not implemented.\n"); }

  protected:
    // Private copy constructor and assignment operator
    Network(const Network& obj);
    Network& operator=(const Network& obj);

    uint32_t m_nodes;
    static uint32_t m_virtual_networks;
    Topology* m_topology_ptr;
    static uint32_t m_control_msg_size;
    static uint32_t m_data_msg_size;

    // vector of queues from the components
    std::vector<std::vector<MessageBuffer*> > m_toNetQueues;
    std::vector<std::vector<MessageBuffer*> > m_fromNetQueues;

    std::vector<bool> m_in_use;
    std::vector<bool> m_ordered;

  private:
    //! Callback class used for collating statistics from all the
    //! controller of this type.
    class StatsCallback : public Callback
    {
      private:
        Network *ctr;

      public:
        virtual ~StatsCallback() {}

        StatsCallback(Network *_ctr)
            : ctr(_ctr)
        {
        }

        void process() {ctr->collateStats();}
    };
};

inline std::ostream&
operator<<(std::ostream& out, const Network& obj)
{
    obj.print(out);
    out << std::flush;
    return out;
}

#endif // __MEM_RUBY_NETWORK_NETWORK_HH__


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Asylo: Member List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="/favicons/favicon.ico" rel="shortcut icon" type="image/x-icon"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

Asylo

asylo

SharedResourceManager

asylo::SharedResourceManager Member List

This is the complete list of members for asylo::SharedResourceManager, including all inherited members.

AcquireResource(const SharedName &name)	asylo::SharedResourceManager	inline

RegisterManagedResource(const SharedName &name, T *pointer)	asylo::SharedResourceManager	inline

RegisterUnmanagedResource(const SharedName &name, T *pointer)	asylo::SharedResourceManager	inline

ReleaseResource(const SharedName &name)	asylo::SharedResourceManager


text:
package xmessage

import (
	"encoding/json"
	"errors"
	"fmt"
	"strings"
)

type temp map[string]interface{} // use for middleware maintain state
func (t *temp) getRealKey(scope, key string) string {
	return scope + "." + key
}

func (t temp) Get(scope, key string) interface{} {
	return t[t.getRealKey(scope, key)]
}

func (t temp) Put(scope, key string, v interface{}) {
	t[t.getRealKey(scope, key)] = v
}

type Req struct {
	Id     string `json:"id"`
	Method string `json:"method"`
	Params string `json:"params"`
	Data   string `json:"data"`
	Temp   temp   // use for middleware maintain state
}

type Res struct {
	Id     string `json:"id"`
	Method string `json:"method"`
	Params string `json:"params"`
	Data   string `json:"data"`
	Error  string `json:"error"`
	Temp   temp   // use for middleware maintain state
}

type Ctx struct {
	res        *Res
	req        *Req
	reqParams  map[string]interface{}
	echoParams []string
	Method     string
	Middleware map[string]interface{}
	Params     map[string]string
	Data       string
	Error      CtxError
	Temp       temp // use for middleware maintain state
}

type ParamConfig struct {
	Key      string
	Required bool
	Default  string
	Echo     bool
}

/*
	error
*/

type CtxError struct {
	Warn  []string
	Fatal []string
}

func (c *CtxError) NewFatal(info string) {
	c.Fatal = append(c.Fatal, info)
}

func (c *CtxError) NewWarn(info string) {
	c.Warn = append(c.Warn, info)
}

/*
	init
*/
func (r *Req) Init() {
	r.Temp = make(map[string]interface{})
}

func (r *Res) Init() {
}

func (c *Ctx) Init() {
	c.Middleware = msg.Middleware.Map
	c.Params = make(map[string]string)
	c.reqParams = make(map[string]interface{})
	c.parseParams()
}

func (c *Ctx) parseParams() {
	s := c.req.Params
	err := json.Unmarshal([]byte(s), &c.reqParams)
	if err != nil {
		c.Error.NewFatal("Params parse error.")
	}
}

/*
	context methods used in processors
*/

func (c *Ctx) getReqParamString(key string) string {
	switch c.reqParams[key].(type) {
	case string:
		return c.reqParams[key].(string)
	case float64:
		return fmt.Sprint(c.reqParams[key].(float64))
	default:
		c.Error.NewWarn(fmt.Sprint("Param type error, not a known type."))
		return fmt.Sprint(c.reqParams[key])
	}
}

func (c *Ctx) Set(data interface{}) {
	var setWitchConfig = func(p *ParamConfig) {
		switch {
		case p.Echo:
			c.echoParams = append(c.echoParams, p.Key)
			fallthrough
		case p.Default != "":
			c.Params[p.Key] = p.Default
		case p.Required:
			c.Error.NewFatal("Lack required param.")
		default:
			c.Params[p.Key] = c.getReqParamString(p.Key)
		}
	}
	switch d := data.(type) {
	case *ParamConfig:
		setWitchConfig(d)
	case []*ParamConfig:
		for _, c := range d {
			setWitchConfig(c)
		}
	default:
		c.Error.NewWarn("Error params to *Ctx.Set().")
	}
}

func (c *Ctx) Get(key string) string {
	return c.Params[key]
}

/*
	set res
*/
func (c *Ctx) setResParams() {
	var toEscaped = func(s string) string {
		return strings.Replace(s, `"`, `\"`, -1)
	}
	// var params []string
	// var stringMapMarshal = func(m map[string]string) string {
	// 	var kvs []string
	// 	for k, v := range m {
	// 		kvs = append(kvs, `"`+toEscaped(k)+`":"`+toEscaped(v)+`"`)
	// 	}
	// 	return "{" + strings.Join(kvs, ",") + "}"
	// }
	var stringMapPartlyMarshal = func(m map[string]string, keys []string) (string, error) {
		var kvs []string
		var err error
		for _, k := range keys {
			if v, ok := m[k]; ok {
				kvs = append(kvs, `"`+toEscaped(k)+`":"`+toEscaped(v)+`"`)
			} else {
				err = errors.New("Cannot find one given key in the map.")
			}
		}
		return "{" + strings.Join(kvs, ",") + "}", err
	}
	json, _ := stringMapPartlyMarshal(c.Params, c.echoParams)
	c.res.Params = json
}