text:
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "config.h"

#include <wtf/HashSet.h>
#include <wtf/RefPtr.h>
#include <wtf/Vector.h>

#include "Document.h"
#include "Frame.h"
#include "Page.h"
#include "V8Binding.h"
#include "V8DOMWindow.h"
#include "V8Index.h"
#include "V8Proxy.h"
#undef LOG

#include "grit/webkit_resources.h"
#include "third_party/WebKit/WebKit/chromium/src/WebViewImpl.h"
#include "webkit/glue/devtools/debugger_agent_impl.h"
#include "webkit/glue/devtools/debugger_agent_manager.h"
#include "webkit/glue/glue_util.h"
#include "webkit/glue/webdevtoolsagent_impl.h"
#include "webkit/glue/webkit_glue.h"

using WebCore::DOMWindow;
using WebCore::Document;
using WebCore::Frame;
using WebCore::Page;
using WebCore::String;
using WebCore::V8ClassIndex;
using WebCore::V8Custom;
using WebCore::V8DOMWindow;
using WebCore::V8DOMWrapper;
using WebCore::V8Proxy;
using WebKit::WebViewImpl;

DebuggerAgentImpl::DebuggerAgentImpl(
    WebViewImpl* web_view_impl,
    DebuggerAgentDelegate* delegate,
    WebDevToolsAgentImpl* webdevtools_agent)
    : web_view_impl_(web_view_impl),
      delegate_(delegate),
      webdevtools_agent_(webdevtools_agent),
      auto_continue_on_exception_(false) {
  DebuggerAgentManager::DebugAttach(this);
}

DebuggerAgentImpl::~DebuggerAgentImpl() {
  DebuggerAgentManager::DebugDetach(this);
}

void DebuggerAgentImpl::GetContextId() {
  delegate_->SetContextId(webdevtools_agent_->host_id());
}

void DebuggerAgentImpl::DebuggerOutput(const String& command) {
  delegate_->DebuggerOutput(command);
  webdevtools_agent_->ForceRepaint();
}

// static
void DebuggerAgentImpl::CreateUtilityContext(
    Frame* frame,
    v8::Persistent<v8::Context>* context) {
  v8::HandleScope scope;

  // TODO(pfeldman): Validate against Soeren.
  // Set up the DOM window as the prototype of the new global object.
  v8::Handle<v8::Context> window_context =
      V8Proxy::context(frame);
  v8::Handle<v8::Object> window_global = window_context->Global();
  v8::Handle<v8::Object> window_wrapper =
      V8DOMWrapper::lookupDOMWrapper(V8ClassIndex::DOMWINDOW, window_global);

  ASSERT(V8DOMWrapper::convertDOMWrapperToNative<DOMWindow>(window_wrapper) ==
      frame->domWindow());

  v8::Handle<v8::ObjectTemplate> global_template = v8::ObjectTemplate::New();

  // TODO(yurys): provide a function in v8 bindings that would make the
  // utility context more like main world context of the inspected frame,
  // otherwise we need to manually make it satisfy various invariants
  // that V8Proxy::getEntered and some other V8Proxy methods expect to find
  // on v8 contexts on the contexts stack.
  // See V8Proxy::createNewContext.
  //
  // Install a security handler with V8.
  global_template->SetAccessCheckCallbacks(
      V8DOMWindow::namedSecurityCheck,
      V8DOMWindow::indexedSecurityCheck,
      v8::Integer::New(V8ClassIndex::DOMWINDOW));
  // We set number of internal fields to match that in V8DOMWindow wrapper.
  // See http://crbug.com/28961
  global_template->SetInternalFieldCount(
      V8Custom::kDOMWindowInternalFieldCount);

  *context = v8::Context::New(
      NULL /* no extensions */,
      global_template,
      v8::Handle<v8::Object>());
  v8::Context::Scope context_scope(*context);
  v8::Handle<v8::Object> global = (*context)->Global();

  v8::Handle<v8::String> implicit_proto_string = v8::String::New("__proto__");
  global->Set(implicit_proto_string, window_wrapper);

  // Give the code running in the new context a way to get access to the
  // original context.
  global->Set(v8::String::New("contentWindow"), window_global);

  // Inject javascript into the context.
  base::StringPiece injectjs_webkit =
      webkit_glue::GetDataResource(IDR_DEVTOOLS_INJECT_WEBKIT_JS);
  v8::Script::Compile(
      v8::String::New(injectjs_webkit.as_string().c_str()))->Run();
  base::StringPiece inject_dispatchjs = webkit_glue::GetDataResource(
      IDR_DEVTOOLS_INJECT_DISPATCH_JS);
  v8::Script::Compile(v8::String::New(
      inject_dispatchjs.as_string().c_str()))->Run();
}

String DebuggerAgentImpl::ExecuteUtilityFunction(
    v8::Handle<v8::Context> context,
    int call_id,
    const char* object,
    const String &function_name,
    const String& json_args,
    bool async,
    String* exception) {
  v8::HandleScope scope;
  ASSERT(!context.IsEmpty());
  if (context.IsEmpty()) {
    *exception = "No window context.";
    return "";
  }
  v8::Context::Scope context_scope(context);

  DebuggerAgentManager::UtilityContextScope utility_scope;

  v8::Handle<v8::Object> dispatch_object = v8::Handle<v8::Object>::Cast(
      context->Global()->Get(v8::String::New(object)));

  v8::Handle<v8::Value> dispatch_function =
      dispatch_object->Get(v8::String::New("dispatch"));
  ASSERT(dispatch_function->IsFunction());
  v8::Handle<v8::Function> function = v8::Handle<v8::Function>::Cast(dispatch_function);

  v8::Handle<v8::String> function_name_wrapper = v8::Handle<v8::String>(
      v8::String::New(function_name.utf8().data()));
  v8::Handle<v8::String> json_args_wrapper = v8::Handle<v8::String>(
      v8::String::New(json_args.utf8().data()));
  v8::Handle<v8::Number> call_id_wrapper = v8::Handle<v8::Number>(
      v8::Number::New(async ? call_id : 0));

  v8::Handle<v8::Value> args[] = {
    function_name_wrapper,
    json_args_wrapper,
    call_id_wrapper
  };

  v8::TryCatch try_catch;
  v8::Handle<v8::Value> res_obj = function->Call(context->Global(), 3, args);
  if (try_catch.HasCaught()) {
    *exception = WebCore::toWebCoreString(try_catch.Message()->Get());
    return "";
  } else {
    return WebCore::toWebCoreStringWithNullCheck(res_obj);
  }
}

void DebuggerAgentImpl::ExecuteVoidJavaScript(v8::Handle<v8::Context> context) {
  v8::HandleScope scope;
  ASSERT(!context.IsEmpty());
  v8::Context::Scope context_scope(context);
  DebuggerAgentManager::UtilityContextScope utility_scope;

  v8::Handle<v8::Value> function =
      context->Global()->Get(v8::String::New("devtools$$void"));
  ASSERT(function->IsFunction());
  v8::Handle<v8::Value> args[] = {
    v8::Local<v8::Value>()
  };
  v8::Handle<v8::Function>::Cast(function)->Call(context->Global(), 0, args);
}

WebCore::Page* DebuggerAgentImpl::GetPage() {
  return web_view_impl_->page();
}


text:
<Record name="pdp_pmt_typ_t" type="delimited">
  <Field name="pmt_typ_cd"                      type="string"     nullable="true"  trim="false" delimiter="|"  />
  <Field name="obj_id"                          type="string"     nullable="true"  trim="false" delimiter="|"  />
  <Field name="ver_nbr"                         type="numeric"    nullable="true"  trim="false" delimiter="|"  />
  <Field name="pmt_typ_desc"                    type="string"     nullable="true"  trim="false" delimiter="|\r\n" />
</Record>

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Jan Renz</title>
    <description>Nerd, Researcher, PhD Candidate</description>
    <link>http://localhost:4000//</link>
    <atom:link href="http://localhost:4000//feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Wed, 23 Nov 2016 17:28:53 +0100</pubDate>
    <lastBuildDate>Wed, 23 Nov 2016 17:28:53 +0100</lastBuildDate>
    <generator>Jekyll v3.3.1</generator>

      <item>
        <title>openWHO</title>
        <description>
OpenWHO is WHO's new, interactive, web-based platform that offers Massive Open Online Courses (MOOCs) to people preparing to work in health emergencies or already doing so. OpenWHO transfers often life-saving expertise from WHO and its key partners to front-line responders. WHO's strengths include its global expertise and convening power. The OpenWHO platform delivers WHO's and partners' expertise closer to where it is needed and provides information in user-friendly formats. Together with WHO we not only provide the platform, we also investigate how MOOCs can be used in this context and how the concept and the underlying technology can be optimized for this important use-case.

</description>
        <pubDate>Tue, 01 Mar 2016 00:00:00 +0100</pubDate>
        <link>http://localhost:4000//2016/03/01/openwho.html</link>
        <guid isPermaLink="true">http://localhost:4000//2016/03/01/openwho.html</guid>

      </item>

      <item>
        <title>openSAP</title>
        <description>
openSAP is the MOOC platform where SAP provides free courses. As a part of the research team on knowledge and learning engineering we are responsible for development and research in the field of enterprise MOOCs. I mainly work in the field of learning analytics, UI/UX and Offline Support.

</description>
        <pubDate>Tue, 01 Mar 2016 00:00:00 +0100</pubDate>
        <link>http://localhost:4000//2016/03/01/opensap.html</link>
        <guid isPermaLink="true">http://localhost:4000//2016/03/01/opensap.html</guid>

      </item>

      <item>
        <title>Mobile Apps</title>
        <description>
Users who do learn ubiquitous (mobile and in the browser) tend to have far better completion rates. To support this native mobile apps for all our MOOC platforms are offered. They support and platform specific UI/UX and the possibility to learn offline.

</description>
        <pubDate>Tue, 01 Mar 2016 00:00:00 +0100</pubDate>
        <link>http://localhost:4000//2016/03/01/mobileapps.html</link>
        <guid isPermaLink="true">http://localhost:4000//2016/03/01/mobileapps.html</guid>

      </item>

      <item>
        <title>openHPI</title>
        <description>
openHPI is the MOOC platform of the Hasso Plattner Institute. As a part of the research team on knowledge and learning engineering i am responsible for development and running the platform, but more important also do research in the field of massive scalable e-learning. openHPI is based on an SOA with 20+ Microservices, mostly written in Ruby. I also host courses from time to time.
openHPI started in 2013 and is build with the help of a large crowd of students helping us with new features and research.

</description>
        <pubDate>Wed, 03 Feb 2016 00:00:00 +0100</pubDate>
        <link>http://localhost:4000//2016/02/03/openhpi.html</link>
        <guid isPermaLink="true">http://localhost:4000//2016/02/03/openhpi.html</guid>

      </item>

      <item>
        <title>Schul-Cloud</title>
        <description>
The Schul-Cloud is an pilot project to investigate how cloud infrastructure can be used to support the digitalsation of learning in a school context.

</description>
        <pubDate>Tue, 02 Feb 2016 00:00:00 +0100</pubDate>
        <link>http://localhost:4000//2016/02/02/schulcloud.html</link>
        <guid isPermaLink="true">http://localhost:4000//2016/02/02/schulcloud.html</guid>

      </item>

      <item>
        <title>nanou</title>
        <description>
Established learning patterns from the world of MOOCs do not work for users that are mobile-only. Nanou is a research project to investigate how Nano-Learning can be used in combination with a knowledge graph to support mobile learning patterns. It is written in Python and a first prototype is expected to be released in early 2017.

</description>
        <pubDate>Fri, 01 Jan 2016 00:00:00 +0100</pubDate>
        <link>http://localhost:4000//2016/01/01/nanou.html</link>
        <guid isPermaLink="true">http://localhost:4000//2016/01/01/nanou.html</guid>

      </item>

  </channel>
</rss>


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="AppCompatCaptureTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="android:windowDrawsSystemBarBackgrounds">true</item>
        <item name="android:statusBarColor">#ffb341</item>
    </style>
</resources>


text:
import numpy as np
from nose.tools import assert_raises, assert_equal, assert_true
from numpy.testing import assert_array_equal
from os import path as op
import warnings

import mne

from mne.io import Raw
from mne.utils import sum_squared
from mne.time_frequency import compute_epochs_csd, tfr_morlet

warnings.simplefilter('always')
base_dir = op.join(op.dirname(__file__), '..', '..', 'io', 'tests', 'data')
raw_fname = op.join(base_dir, 'test_raw.fif')
event_fname = op.join(base_dir, 'test-eve.fif')

def _get_data():
    # Read raw data
    raw = Raw(raw_fname)
    raw.info['bads'] = ['MEG 2443', 'EEG 053']  # 2 bads channels

    # Set picks
    picks = mne.pick_types(raw.info, meg=True, eeg=False, eog=False,
                           stim=False, exclude='bads')

    # Read several epochs
    event_id, tmin, tmax = 1, -0.2, 0.5
    events = mne.read_events(event_fname)[0:100]
    epochs = mne.Epochs(raw, events, event_id, tmin, tmax, proj=True,
                        picks=picks, baseline=(None, 0), preload=True,
                        reject=dict(grad=4000e-13, mag=4e-12))

    # Create an epochs object with one epoch and one channel of artificial data
    event_id, tmin, tmax = 1, 0.0, 1.0
    epochs_sin = mne.Epochs(raw, events[0:5], event_id, tmin, tmax, proj=True,
                            picks=[0], baseline=(None, 0), preload=True,
                            reject=dict(grad=4000e-13))
    freq = 10
    epochs_sin._data = np.sin(2 * np.pi * freq *
                              epochs_sin.times)[None, None, :]
    return epochs, epochs_sin

def test_compute_epochs_csd():
    """Test computing cross-spectral density from epochs
    """
    epochs, epochs_sin = _get_data()
    # Check that wrong parameters are recognized
    assert_raises(ValueError, compute_epochs_csd, epochs, mode='notamode')
    assert_raises(ValueError, compute_epochs_csd, epochs, fmin=20, fmax=10)
    assert_raises(ValueError, compute_epochs_csd, epochs, fmin=20, fmax=20.1)
    assert_raises(ValueError, compute_epochs_csd, epochs, tmin=0.15, tmax=0.1)
    assert_raises(ValueError, compute_epochs_csd, epochs, tmin=0, tmax=10)
    assert_raises(ValueError, compute_epochs_csd, epochs, tmin=10, tmax=11)

    data_csd_mt = compute_epochs_csd(epochs, mode='multitaper', fmin=8,
                                     fmax=12, tmin=0.04, tmax=0.15)
    data_csd_fourier = compute_epochs_csd(epochs, mode='fourier', fmin=8,
                                          fmax=12, tmin=0.04, tmax=0.15)

    # Check shape of the CSD matrix
    n_chan = len(data_csd_mt.ch_names)
    assert_equal(data_csd_mt.data.shape, (n_chan, n_chan))
    assert_equal(data_csd_fourier.data.shape, (n_chan, n_chan))

    # Check if the CSD matrix is hermitian
    assert_array_equal(np.tril(data_csd_mt.data).T.conj(),
                       np.triu(data_csd_mt.data))
    assert_array_equal(np.tril(data_csd_fourier.data).T.conj(),
                       np.triu(data_csd_fourier.data))

    # Computing induced power for comparison
    epochs.crop(tmin=0.04, tmax=0.15)
    tfr = tfr_morlet(epochs, freqs=[10], n_cycles=0.6, return_itc=False)
    power = np.mean(tfr.data, 2)

    # Maximum PSD should occur for specific channel
    max_ch_power = power.argmax()
    max_ch_mt = data_csd_mt.data.diagonal().argmax()
    max_ch_fourier = data_csd_fourier.data.diagonal().argmax()
    assert_equal(max_ch_mt, max_ch_power)
    assert_equal(max_ch_fourier, max_ch_power)

    # Maximum CSD should occur for specific channel
    ch_csd_mt = [np.abs(data_csd_mt.data[max_ch_power][i])
                 if i != max_ch_power else 0 for i in range(n_chan)]
    max_ch_csd_mt = np.argmax(ch_csd_mt)
    ch_csd_fourier = [np.abs(data_csd_fourier.data[max_ch_power][i])
                      if i != max_ch_power else 0 for i in range(n_chan)]
    max_ch_csd_fourier = np.argmax(ch_csd_fourier)
    assert_equal(max_ch_csd_mt, max_ch_csd_fourier)

    # Check a list of CSD matrices is returned for multiple frequencies within
    # a given range when fsum=False
    csd_fsum = compute_epochs_csd(epochs, mode='fourier', fmin=8, fmax=20,
                                  fsum=True)
    csds = compute_epochs_csd(epochs, mode='fourier', fmin=8, fmax=20,
                              fsum=False)
    freqs = [csd.frequencies[0] for csd in csds]

    csd_sum = np.zeros_like(csd_fsum.data)
    for csd in csds:
        csd_sum += csd.data

    assert(len(csds) == 2)
    assert(len(csd_fsum.frequencies) == 2)
    assert_array_equal(csd_fsum.frequencies, freqs)
    assert_array_equal(csd_fsum.data, csd_sum)

def test_compute_epochs_csd_on_artificial_data():
    """Test computing CSD on artificial data
    """
    epochs, epochs_sin = _get_data()
    sfreq = epochs_sin.info['sfreq']

    # Computing signal power in the time domain
    signal_power = sum_squared(epochs_sin._data)
    signal_power_per_sample = signal_power / len(epochs_sin.times)

    # Computing signal power in the frequency domain
    data_csd_fourier = compute_epochs_csd(epochs_sin, mode='fourier')
    data_csd_mt = compute_epochs_csd(epochs_sin, mode='multitaper')
    fourier_power = np.abs(data_csd_fourier.data[0, 0]) * sfreq
    mt_power = np.abs(data_csd_mt.data[0, 0]) * sfreq
    assert_true(abs(fourier_power - signal_power) <= 0.5)
    assert_true(abs(mt_power - signal_power) <= 1)

    # Power per sample should not depend on time window length
    for tmax in [0.2, 0.4, 0.6, 0.8]:
        for add_n_fft in [30, 0, 30]:
            t_mask = (epochs_sin.times >= 0) & (epochs_sin.times <= tmax)
            n_samples = sum(t_mask)
            n_fft = n_samples + add_n_fft

            data_csd_fourier = compute_epochs_csd(epochs_sin, mode='fourier',
                                                  tmin=None, tmax=tmax, fmin=0,
                                                  fmax=np.inf, n_fft=n_fft)
            fourier_power_per_sample = np.abs(data_csd_fourier.data[0, 0]) *\
                sfreq / data_csd_fourier.n_fft
            assert_true(abs(signal_power_per_sample -
                            fourier_power_per_sample) < 0.003)
        # Power per sample should not depend on number of tapers
        for n_tapers in [1, 2, 3, 5]:
            for add_n_fft in [30, 0, 30]:
                mt_bandwidth = sfreq / float(n_samples) * (n_tapers + 1)
                data_csd_mt = compute_epochs_csd(epochs_sin, mode='multitaper',
                                                 tmin=None, tmax=tmax, fmin=0,
                                                 fmax=np.inf,
                                                 mt_bandwidth=mt_bandwidth,
                                                 n_fft=n_fft)
                mt_power_per_sample = np.abs(data_csd_mt.data[0, 0]) *\
                    sfreq / data_csd_mt.n_fft
                # The estimate of power gets worse for small time windows when
                # more tapers are used
                if n_tapers == 5 and tmax == 0.2:
                    delta = 0.05
                else:
                    delta = 0.004
                assert_true(abs(signal_power_per_sample -
                                mt_power_per_sample) < delta)


text:
package net.iaeste.iws.api.requests.exchange;

import net.iaeste.iws.api.constants.IWSConstants;
import net.iaeste.iws.api.util.Paginatable;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import java.util.HashMap;
import java.util.Map;

/**
 * @author  Kim Jensen / last $Author:$
 * @version $Revision:$ / $Date:$
 * @since   IWS 1.0
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "fetchPublishGroupsRequest", propOrder = {})
public final class FetchPublishGroupsRequest extends Paginatable {

    /** {@link IWSConstants#SERIAL_VERSION_UID}. */
    private static final long serialVersionUID = IWSConstants.SERIAL_VERSION_UID;

    // =========================================================================
    // Object Constructors
    // =========================================================================

    // =========================================================================
    // Standard Setters & Getters
    // =========================================================================

    // =========================================================================
    // Standard Request Methods
    // =========================================================================

    /**
     * {@inheritDoc}
     */
    @Override
    public Map<String, String> validate() {
        return new HashMap<>(0);
    }
}


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

<title>Overview List</title>
<meta name="date" content="2017-03-07">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

All Classes

Packages

com.controller

com.main

com.model.algorithm

com.model.board

com.model.board.shape

com.model.history

com.model.implementation

com.model.player

com.view.console

com.view.gui

com.view.gui.lib

com.view.gui.panel

com.view.gui.popup

test.subtester


text:
<!DOCTYPE html>

    <title>ArcGIS Developers 開発リソース集</title>

      <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="revised" content="2022-11-10T15:09:42 JST">
<title>フレームワークの統合 :: ArcGIS Developers 開発リソース集</title>
<link rel="shortcut icon" href="/arcgis-dev-resources/images/favicon.png" type="image/x-icon" />
<link href="/arcgis-dev-resources/css/nucleus.css" rel="stylesheet">
<link href="/arcgis-dev-resources/css/font-awesome.min.css" rel="stylesheet">
<link href="/arcgis-dev-resources/css/hybrid.css" rel="stylesheet">
<link href="/arcgis-dev-resources/css/featherlight.min.css" rel="stylesheet">
<link href="/arcgis-dev-resources/css/auto-complete.css" rel="stylesheet">
<link href="/arcgis-dev-resources/theme-original/style.css" rel="stylesheet">

<link rel="stylesheet" href="/arcgis-dev-resources/css/bootstrap.min.css">

<meta name="description" content="Calcite Components は、JavaScriptフレームワークやビルドツールと簡単に統合でき、サンプル集が提供されているので、使い始めるのに便利です。">

    ArcGIS Developers 開発リソース集

		    <input data-search-input id="search-by" type="text" placeholder="検索...">

      スタートアップ ガイド

            開発者アカウントの作成

            API キーの取得

      ロケーションサービスの利用

            フィーチャサービスの作成

            Web マップの作成

      アプリ開発

            ArcGIS API for JavaScript

            Esri Leaflet

            MapLibre GL JS

            OpenLayers

            Android

            iOS

            .NET

            セキュリティと認証

            デプロイ

      もっと学ぶ

            Esri Japan GitHub

            ArcGIS 開発者コミュニティ

      技術 Tips 集

      ArcGIS API for JavaScript

            インストールおよびセットアップ方法

            インストール ガイド

            バージョン 4.x と 3.x の選択

            バージョン 3.x から 4.x への移行

            ウィジェット開発

            Arcade

            カスタム フォント

      ArcGIS Experience Builder (Developer Edition)

      コア コンセプト

            ページ(Page)

            ウィンドウ(Window)

            セクションとビュー(Section and view)

            画面グループ(Screen groups)

            レイアウト(Layout)

            テーマ(Theme)

            ウィジェット(Widget)

            Jimu

            データ ソース(Data source)

            データアクション(Data action)

            メッセージ と アクション(Message and action)

            マップ/シーン ビュー(Map/Scene View)

            拡張ポイント(Extension points)

            インストール ガイド

      カスタム ウィジェット開発ガイド

            ウィジェット開発のスタート

            ウィジェット manifest

            ウィジェットの実装

            ウィジェット UI の作成

            ウィジェットでデータソースを使用

            ウィジェット間の通信

            ウィジェット開発のデバック

            サードパーティ製のライブラリ使用

            単体テスト

            assets の使用

            コードリンティング

            デプロイ パターン

            デプロイ

            チュートリアル

      ArcGIS Web AppBuilder (Developer Edition)

            インストール ガイド

            カスタム ウィジェット開発ガイド

            デプロイ パターン

            Web アプリケーションのデプロイ

      ウィジェット一覧表

            ウィジェット一覧表 (ArcGIS Online)

            ウィジェット一覧表 (ArcGIS Enterprise)

            ウィジェット一覧表 (Developer Edition)

      ArcGIS Runtime SDK for .NET

            インストール ガイド

            アプリケーション配布ガイド

            バージョン 10.2.x から 100.x への移行

      ArcGIS Runtime SDK for Android

            インストール ガイド

            アプリケーション配布ガイド

            バージョン 10.2.x から 100.x への移行

      ArcGIS Runtime SDK for iOS

            インストール ガイド

            アプリケーション配布ガイド

            バージョン 10.2.x から 100.x への移行

      ArcGIS API for Python

            ArcGIS API for Python のコンセプト

            ArcGIS API for Python のための基礎環境:conda入門

            インストール ガイド

            Jupyter Notebook を使ってみよう

            Jupyter Lab を使ってみよう

            スクリプト実行の自動化

            matplotlib での日本語利用について

      ArcGIS Pro SDK

      ArcGIS AppStudio

      Calcite Design System

            はじめに

            Web コンセプト

            アクセシビリティ

            ローカライゼーション

            フレームワークの統合

            チュートリアル

      その他

      データ ビジュアライゼーション

            データ可視化のワークフロー

            データ可視化の手順

            地図上に賢くデータを可視化するための 6 つの方法

      サンプル集

            ミートアップ

 Github

© Esri Japan. All rights reserved.

 ArcGIS Developers 開発リソース集 > 技術 Tips 集 > Calcite Design System > フレームワークの統合

TypeScript

Calcite Components React

使い方

その他

フレームワークの統合

出典:Calcite Design System (Beta) - Framework integration

Calcite Components は、JavaScript フレームワークやビルドツールと簡単に統合でき、始めるのに役立つサンプルが提供されています。ここでは、フレームワークごとの解説をしています。特定のフレームワークやビルドツールを選んで使った経験がない方は、npm を使って始めてみましょう。

TypeScript

Stencil はすべてのコンポーネントに対して、完全な型付けを提供します。TypeScript がこれらのコンポーネントを認識できるようにするには、ライブラリをインポートするだけです。

import "@esri/calcite-components";

これにより、コンポーネント名/プロパティのオートコンプリート、および追加の HTML 要素タイプが提供されます。

// 作成された要素は、自動で正しい型を持つようになります。
const loader = document.createElement("calcite-loader");
document.body.appendChild(loader);
loader.active = true;

// また、生成された型を使って自分で要素を持たせることもできます。
// 型名は常に HTML{CamelCaseComponentName}Element としてフォーマットされます。
const loader = document.querySelector(".my-loader-element") as HTMLCalciteLoaderElement;
loader.active = true;

Calcite Components React

Calcite Components React は、Web コンポーネントをラップする React コンポーネントのセットです。React は合成イベントシステムを使用しているため、Web コンポーネントから発行されるカスタムイベントは React の JSX では動作しません。例えば、calcite-slider が変化したときに値を更新するには、標準の Web コンポーネントを使用して、要素にrefを保存し、イベントリスナーを追加する必要があります。

const sliderEl = useRef(null);
const [sliderValue, setSliderValue] = useState(50);

useEffect(() => {
  sliderEl.current.addEventListener("calciteSliderUpdate", event => setSliderValue(event.target.value));
}, [sliderEl]);

esri/calcite-components-react を使用すると、イベントが接続されるようになります。

const [sliderValue, setSliderValue] = useState(50);
<CalciteSlider onCalciteSliderUpdate={event => setSliderValue(event.target.value)} />;

TypeScript を使用している場合、イベントリスナーやプロップなどの型安全性も向上します。

使い方

まず、npm で esri/calcite-components-react をインストールします。

npm install @esri/calcite-components-react

このパッケージには、Web コンポーネントライブラリの互換バージョンが依存関係として含まれているので、@esri/calcite-components を個別にインストールする必要はありません。次に、npm で使い始める手順に従います。最後に、アプリケーションで使用したい Calcite の React コンポーネントをインポートします。

import { CalciteButton, CalciteIcon, CalciteSlider } from "@esri/calcite-components-react";

完全なセットアップについては、React サンプルをご覧ください。

その他

boolean 属性

Calcite Design System React コンポーネントに boolean 属性を渡すと、値が文字列に変換されます。この問題については、stencil issuesがあります。実際には、disabled={false} は disabled={"false"} となり、真偽不明になってしまいます。falsy boolean 属性値に対する回避策としては

属性を設定しない

falseの代わりに undefined を使用する

例えば、CalcitePickListItem を選択します。

const selected = false;
<CalcitePickListItem key={0} label="Fried Egg Jellyfish" value="jellyfish" selected={selected}></CalcitePickListItem>

上記の通り selected を undefined に設定することでいずれの項目も選択されることはなくなります。

const selected = false;
<CalcitePickListItem key={1} label="Satanic Leaf-Tailed Gecko" value="gecko"></CalcitePickListItem>
<CalcitePickListItem key={2} label="Red-Lipped Batfish" value="batfish" selected={undefined}></CalcitePickListItem>
<CalcitePickListItem key={3} label="Star-Nosed Mole" value="mole" selected={selected ? true : undefined}></CalcitePickListItem>

Jestの設定

Jestで設定する場合は、Jest の設定ファイルの transformIgnorePatterns に @esri/calcite-components-react を追加する必要があります。

"transformIgnorePatterns": [
    "/node_modules/(?!(@esri/calcite-components-react))"
 ]

 ローカライゼーション
    チュートリアル


text:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages, Extension
import sys

import Adafruit_DHT.platform_detect as platform_detect

# Check if an explicit platform was chosen with a command line parameter.
# Kind of hacky to manipulate the argument list before calling setup, but it's
# the best simple option for adding optional config to the setup.
platform = platform_detect.UNKNOWN
pi_version = None
if '--force-pi' in sys.argv:
    platform = platform_detect.RASPBERRY_PI
    pi_version = 1
    sys.argv.remove('--force-pi')
elif '--force-pi2' in sys.argv:
    platform = platform_detect.RASPBERRY_PI
    pi_version = 2
    sys.argv.remove('--force-pi2')
elif '--force-bbb' in sys.argv:
    platform = platform_detect.BEAGLEBONE_BLACK
    sys.argv.remove('--force-bbb')
elif '--force-test' in sys.argv:
    platform = 'TEST'
    sys.argv.remove('--force-test')
else:
    # No explicit platform chosen, detect the current platform.
    platform = platform_detect.platform_detect()

# Pick the right extension to compile based on the platform.
extensions = []
if platform == platform_detect.RASPBERRY_PI:
    # Get the Pi version (1 or 2)
    if pi_version is None:
        pi_version = platform_detect.pi_version()
    # Build the right extension depending on the Pi version.
    if pi_version == 1:
        extensions.append(Extension("Adafruit_DHT.Raspberry_Pi_Driver",
                                    ["source/_Raspberry_Pi_Driver.c", "source/common_dht_read.c", "source/Raspberry_Pi/pi_dht_read.c", "source/Raspberry_Pi/pi_mmio.c"],
                                    libraries=['rt'],
                                    extra_compile_args=['-std=gnu99']))
    elif pi_version == 2:
        extensions.append(Extension("Adafruit_DHT.Raspberry_Pi_2_Driver",
                                    ["source/_Raspberry_Pi_2_Driver.c", "source/common_dht_read.c", "source/Raspberry_Pi_2/pi_2_dht_read.c", "source/Raspberry_Pi_2/pi_2_mmio.c"],
                                    libraries=['rt'],
                                    extra_compile_args=['-std=gnu99']))
    else:
        raise RuntimeError('Detected Pi version that has no appropriate driver available.')
elif platform == platform_detect.BEAGLEBONE_BLACK:
    extensions.append(Extension("Adafruit_DHT.Beaglebone_Black_Driver",
                                ["source/_Beaglebone_Black_Driver.c", "source/common_dht_read.c", "source/Beaglebone_Black/bbb_dht_read.c", "source/Beaglebone_Black/bbb_mmio.c"],
                                libraries=['rt'],
                                extra_compile_args=['-std=gnu99']))
elif platform == 'TEST':
    extensions.append(Extension("Adafruit_DHT.Test_Driver",
                                ["source/_Test_Driver.c", "source/Test/test_dht_read.c"],
                                extra_compile_args=['-std=gnu99']))
else:
    print('Could not detect if running on the Raspberry Pi or Beaglebone Black.  If this failure is unexpected, you can run again with --force-pi or --force-bbb parameter to force using the Raspberry Pi or Beaglebone Black respectively.')
    sys.exit(1)

classifiers = ['Development Status :: 4 - Beta',
               'Operating System :: POSIX :: Linux',
               'License :: OSI Approved :: MIT License',
               'Intended Audience :: Developers',
               'Programming Language :: Python :: 2.7',
               'Programming Language :: Python :: 3',
               'Topic :: Software Development',
               'Topic :: System :: Hardware']

# Call setuptools setup function to install package.
setup(name              = 'Adafruit_DHT',
      version           = '1.3.0',
      author            = 'Tony DiCola',
      author_email      = 'tdicola@adafruit.com',
      description       = 'Library to get readings from the DHT11, DHT22, and AM2302 humidity and temperature sensors on a Raspberry Pi or Beaglebone Black.',
      license           = 'MIT',
      classifiers       = classifiers,
      url               = 'https://github.com/adafruit/Adafruit_Python_DHT/',
      packages          = find_packages(),
      ext_modules       = extensions)


text:
use parking_lot::Mutex;

use crate::language::sem_analysis::{ClassDefinitionId, FctDefinitionId, TraitDefinitionId};
use crate::language::ty::{SourceType, SourceTypeArray};
use crate::vm::{
    specialize_class_id, specialize_class_id_params, AnnotationDefinitionId, ClassInstanceId,
    EnumDefinitionId, StructDefinitionId, VM,
};

#[derive(Debug)]
pub struct KnownElements {
    pub classes: KnownClasses,
    pub traits: KnownTraits,
    pub annotations: KnownAnnotations,
    pub functions: KnownFunctions,
    pub enums: KnownEnums,
    pub structs: KnownStructs,

    pub byte_array_class_instance: Mutex<Option<ClassInstanceId>>,
    pub int_array_class_instance: Mutex<Option<ClassInstanceId>>,
    pub str_class_instance: Mutex<Option<ClassInstanceId>>,
    pub obj_class_instance: Mutex<Option<ClassInstanceId>>,
    pub ste_class_instance: Mutex<Option<ClassInstanceId>>,
    pub ex_class_instance: Mutex<Option<ClassInstanceId>>,

    pub free_object_class_instance: Option<ClassInstanceId>,
    pub free_array_class_instance: Option<ClassInstanceId>,
    pub code_class_instance: Option<ClassInstanceId>,
}

impl KnownElements {
    pub fn new() -> KnownElements {
        KnownElements {
            classes: KnownClasses::new(),
            functions: KnownFunctions::new(),
            traits: KnownTraits::new(),
            enums: KnownEnums::new(),
            annotations: KnownAnnotations::new(),
            structs: KnownStructs::new(),

            byte_array_class_instance: Mutex::new(None),
            int_array_class_instance: Mutex::new(None),
            str_class_instance: Mutex::new(None),
            obj_class_instance: Mutex::new(None),
            ste_class_instance: Mutex::new(None),
            ex_class_instance: Mutex::new(None),

            free_object_class_instance: None,
            free_array_class_instance: None,
            code_class_instance: None,
        }
    }

    pub fn free_object_class_instance(&self) -> ClassInstanceId {
        self.free_object_class_instance.expect("uninitialized")
    }

    pub fn free_array_class_instance(&self) -> ClassInstanceId {
        self.free_array_class_instance.expect("uninitialized")
    }

    pub fn code_class_instance(&self) -> ClassInstanceId {
        self.code_class_instance.expect("uninitialized")
    }
}

#[derive(Debug)]
pub struct KnownEnums {
    pub option: Option<EnumDefinitionId>,
}

impl KnownEnums {
    pub fn new() -> KnownEnums {
        KnownEnums { option: None }
    }

    pub fn option(&self) -> EnumDefinitionId {
        self.option.expect("uninitialized")
    }
}

#[derive(Debug)]
pub struct KnownClasses {
    pub atomic_int32: Option<ClassDefinitionId>,
    pub atomic_int64: Option<ClassDefinitionId>,
    pub array: Option<ClassDefinitionId>,
    pub string: Option<ClassDefinitionId>,
    pub string_buffer: Option<ClassDefinitionId>,
    pub stacktrace: Option<ClassDefinitionId>,
    pub stacktrace_element: Option<ClassDefinitionId>,
    pub thread: Option<ClassDefinitionId>,
    pub lambda: Option<ClassDefinitionId>,
}

impl KnownClasses {
    pub fn new() -> KnownClasses {
        KnownClasses {
            atomic_int32: None,
            atomic_int64: None,
            array: None,
            string: None,
            string_buffer: None,
            stacktrace: None,
            stacktrace_element: None,
            thread: None,
            lambda: None,
        }
    }

    pub fn atomic_int32(&self) -> ClassDefinitionId {
        self.atomic_int32.expect("uninitialized")
    }

    pub fn atomic_int64(&self) -> ClassDefinitionId {
        self.atomic_int64.expect("uninitialized")
    }

    pub fn array(&self) -> ClassDefinitionId {
        self.array.expect("uninitialized")
    }

    pub fn string(&self) -> ClassDefinitionId {
        self.string.expect("uninitialized")
    }

    pub fn string_buffer(&self) -> ClassDefinitionId {
        self.string_buffer.expect("uninitialized")
    }

    pub fn stacktrace(&self) -> ClassDefinitionId {
        self.stacktrace.expect("uninitialized")
    }

    pub fn stacktrace_element(&self) -> ClassDefinitionId {
        self.stacktrace_element.expect("uninitialized")
    }

    pub fn thread(&self) -> ClassDefinitionId {
        self.thread.expect("uninitialized")
    }

    pub fn thread_class_instance(&self, vm: &VM) -> ClassInstanceId {
        specialize_class_id(vm, self.thread())
    }

    pub fn lambda(&self) -> ClassDefinitionId {
        self.lambda.expect("uninitialized")
    }
}

#[derive(Debug)]
pub struct KnownStructs {
    pub bool: Option<StructDefinitionId>,
    pub uint8: Option<StructDefinitionId>,
    pub char: Option<StructDefinitionId>,
    pub int32: Option<StructDefinitionId>,
    pub int64: Option<StructDefinitionId>,
    pub float32: Option<StructDefinitionId>,
    pub float64: Option<StructDefinitionId>,
}

impl KnownStructs {
    pub fn new() -> KnownStructs {
        KnownStructs {
            bool: None,
            uint8: None,
            char: None,
            int32: None,
            int64: None,
            float32: None,
            float64: None,
        }
    }

    pub fn bool(&self) -> StructDefinitionId {
        self.bool.expect("uninitialized")
    }

    pub fn uint8(&self) -> StructDefinitionId {
        self.uint8.expect("uninitialized")
    }

    pub fn char(&self) -> StructDefinitionId {
        self.char.expect("uninitialized")
    }

    pub fn int32(&self) -> StructDefinitionId {
        self.int32.expect("uninitialized")
    }

    pub fn int64(&self) -> StructDefinitionId {
        self.int64.expect("uninitialized")
    }

    pub fn float32(&self) -> StructDefinitionId {
        self.float32.expect("uninitialized")
    }

    pub fn float64(&self) -> StructDefinitionId {
        self.float64.expect("uninitialized")
    }
}

#[derive(Debug)]
pub struct KnownTraits {
    pub equals: Option<TraitDefinitionId>,
    pub comparable: Option<TraitDefinitionId>,
    pub stringable: Option<TraitDefinitionId>,
    pub iterator: Option<TraitDefinitionId>,
    pub zero: Option<TraitDefinitionId>,
}

impl KnownTraits {
    pub fn new() -> KnownTraits {
        KnownTraits {
            equals: None,
            comparable: None,
            stringable: None,
            iterator: None,
            zero: None,
        }
    }

    pub fn equals(&self) -> TraitDefinitionId {
        self.equals.expect("uninitialized")
    }

    pub fn comparable(&self) -> TraitDefinitionId {
        self.comparable.expect("uninitialized")
    }

    pub fn stringable(&self) -> TraitDefinitionId {
        self.stringable.expect("uninitialized")
    }

    pub fn iterator(&self) -> TraitDefinitionId {
        self.iterator.expect("uninitialized")
    }

    pub fn zero(&self) -> TraitDefinitionId {
        self.zero.expect("uninitialized")
    }
}

#[derive(Debug)]
pub struct KnownAnnotations {
    pub internal: Option<AnnotationDefinitionId>,
    pub pub_: Option<AnnotationDefinitionId>,
    pub static_: Option<AnnotationDefinitionId>,
    pub test: Option<AnnotationDefinitionId>,
    pub cannon: Option<AnnotationDefinitionId>,
    pub optimize_immediately: Option<AnnotationDefinitionId>,
}

impl KnownAnnotations {
    pub fn new() -> KnownAnnotations {
        KnownAnnotations {
            internal: None,
            pub_: None,
            static_: None,
            test: None,
            cannon: None,
            optimize_immediately: None,
        }
    }

    pub fn internal(&self) -> AnnotationDefinitionId {
        self.internal.expect("uninitialized")
    }

    pub fn pub_(&self) -> AnnotationDefinitionId {
        self.pub_.expect("uninitialized")
    }

    pub fn static_(&self) -> AnnotationDefinitionId {
        self.static_.expect("uninitialized")
    }

    pub fn test(&self) -> AnnotationDefinitionId {
        self.test.expect("uninitialized")
    }

    pub fn cannon(&self) -> AnnotationDefinitionId {
        self.cannon.expect("uninitialized")
    }

    pub fn optimize_immediately(&self) -> AnnotationDefinitionId {
        self.optimize_immediately.expect("uninitialized")
    }
}

#[derive(Debug)]
pub struct KnownFunctions {
    pub string_buffer_empty: Option<FctDefinitionId>,
    pub string_buffer_append: Option<FctDefinitionId>,
    pub string_buffer_to_string: Option<FctDefinitionId>,
    pub assert: Option<FctDefinitionId>,
    pub option_is_some: Option<FctDefinitionId>,
    pub option_is_none: Option<FctDefinitionId>,
    pub option_unwrap: Option<FctDefinitionId>,
    pub stacktrace_retrieve: Option<FctDefinitionId>,
    pub compile: Option<FctDefinitionId>,
}

impl KnownFunctions {
    pub fn new() -> KnownFunctions {
        KnownFunctions {
            string_buffer_empty: None,
            string_buffer_append: None,
            string_buffer_to_string: None,
            assert: None,
            option_is_none: None,
            option_is_some: None,
            option_unwrap: None,
            stacktrace_retrieve: None,
            compile: None,
        }
    }

    pub fn string_buffer_empty(&self) -> FctDefinitionId {
        self.string_buffer_empty.expect("uninitialized")
    }

    pub fn string_buffer_append(&self) -> FctDefinitionId {
        self.string_buffer_append.expect("uninitialized")
    }

    pub fn string_buffer_to_string(&self) -> FctDefinitionId {
        self.string_buffer_to_string.expect("uninitialized")
    }

    pub fn assert(&self) -> FctDefinitionId {
        self.assert.expect("uninitialized")
    }

    pub fn option_is_some(&self) -> FctDefinitionId {
        self.option_is_some.expect("uninitialized")
    }

    pub fn option_is_none(&self) -> FctDefinitionId {
        self.option_is_none.expect("uninitialized")
    }

    pub fn option_unwrap(&self) -> FctDefinitionId {
        self.option_unwrap.expect("uninitialized")
    }

    pub fn stacktrace_retrieve(&self) -> FctDefinitionId {
        self.stacktrace_retrieve.expect("uninitialized")
    }

    pub fn compile(&self) -> FctDefinitionId {
        self.compile.expect("uninitialized")
    }
}

impl KnownElements {
    pub fn array_ty(&self, element: SourceType) -> SourceType {
        SourceType::Class(self.classes.array(), SourceTypeArray::single(element))
    }

    pub fn byte_array(&self, vm: &VM) -> ClassInstanceId {
        let mut byte_array_def = self.byte_array_class_instance.lock();

        if let Some(cls_id) = *byte_array_def {
            cls_id
        } else {
            let type_args = SourceTypeArray::single(SourceType::UInt8);
            let cls_id = specialize_class_id_params(vm, self.classes.array(), &type_args);
            *byte_array_def = Some(cls_id);
            cls_id
        }
    }

    pub fn int_array(&self, vm: &VM) -> ClassInstanceId {
        let mut int_array_def = self.int_array_class_instance.lock();

        if let Some(cls_id) = *int_array_def {
            cls_id
        } else {
            let type_args = SourceTypeArray::single(SourceType::Int32);
            let cls_id = specialize_class_id_params(vm, self.classes.array(), &type_args);
            *int_array_def = Some(cls_id);
            cls_id
        }
    }

    pub fn str(&self, vm: &VM) -> ClassInstanceId {
        let mut str_class_def = self.str_class_instance.lock();

        if let Some(cls_id) = *str_class_def {
            cls_id
        } else {
            let cls_id = specialize_class_id(vm, self.classes.string());
            *str_class_def = Some(cls_id);
            cls_id
        }
    }

    pub fn stack_trace_element(&self, vm: &VM) -> ClassInstanceId {
        let mut ste_class_def = self.ste_class_instance.lock();

        if let Some(cls_id) = *ste_class_def {
            cls_id
        } else {
            let cls_id = specialize_class_id(vm, self.classes.stacktrace_element());
            *ste_class_def = Some(cls_id);
            cls_id
        }
    }
}


text:
require 'faraday'
require 'openamplify/response/raise_client_error'
require 'openamplify/response/raise_server_error'

module OpenAmplify
  module Connection

    private

    def connection(options)
      default_options = {
        :url => options.fetch(:endpoint, endpoint)
      }

      @connection ||= Faraday.new(default_options) do |builder|
        builder.use OpenAmplify::Response::RaiseClientError
        builder.use OpenAmplify::Response::RaiseServerError

        # TODO: Make logging optional
        # builder.response :logger

        builder.adapter adapter
      end
    end

  end # Connection

end


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

   <title>STUI:Telescope:Slew Window:Options:Keep Offsets</title>

STUI:Telescope:Slew Window:Options:Keep Offsets

Allows you to specify which offsets should be retained and which offsets should be zeroed for a slew. Checked offsets are retained and unchecked offsets are zeroed. See Offset Types for more information on each type of offset.

Object: the object offset

Arc: the arc offset

Boresight: the boresight offset

Guide Corr: the guide correction

Calibration: the calibration offset

Warning: like all option panels, this one must be visible for its settings to have any effect. If you close (hide) it then default values will be used.

Defaults: restores this panel to its default values (the same values that will be used if you slew with this panel closed).


text:
require 'test_helper'

class <%= class_name %>ControllerTest < ActionController::TestCase
<% if actions.include?("index") -%>
  context 'GET to index' do
    setup { get :index }

    should_render_template :index
    should_respond_with    :success
  end

<% end -%>
<% if actions.include?("new") -%>
  context 'GET to new' do
    setup { get :new }

    should_assign_to       :<%= resource %>
    should_render_template :new
    should_respond_with    :success
  end

<% end -%>
<% if actions.include?("create") -%>
  context 'POST to create with valid parameters' do
    setup do
      post :create, :<%= resource %> => Factory.attributes_for(:<%= resource %>)
    end

    should_set_the_flash_to /created/i
    should_redirect_to('<%= resources %> index') { <%= resources %>_path }
  end

<% end -%>
<% if actions.include?("show") -%>
  context 'GET to show for existing <%= resource %>' do
    setup do
      @<%= resource %> = Factory(:<%= resource %>)
      <%= resource_class %>.stubs(:find).returns(@<%= resource %>)
      get :show, :id => @<%= resource %>.to_param
    end

    should 'find <%= resource %>' do
      assert_received(<%= resource_class %>, :find) do |expects|
        expects.with(@<%= resource %>.to_param)
      end
    end

    should_render_template :show
    should_respond_with    :success
  end

<% end -%>
<% if actions.include?("edit") -%>
  context 'GET to edit for existing <%= resource %>' do
    setup do
      @<%= resource %> = Factory(:<%= resource %>)
      <%= resource_class %>.stubs(:find).returns(@<%= resource %>)
      get :edit, :id => @<%= resource %>.to_param
    end

    should 'find <%= resource %>' do
      assert_received(<%= resource_class %>, :find) do |expects|
        expects.with(@<%= resource %>.to_param)
      end
    end

    should_render_template :edit
    should_respond_with    :success
  end

<% end -%>
<% if actions.include?("update") -%>
  context 'PUT to update for existing <%= resource %>' do
    setup do
      @<%= resource %> = Factory(:<%= resource %>)
      put :update, :id => @<%= resource %>.to_param,
        :<%= resource %> => Factory.attributes_for(:<%= resource %>)
    end

    should_set_the_flash_to /updated/i
    should_redirect_to('<%= resources %> index') { <%= resources %>_path }
  end

<% end -%>
<% if actions.include?("destroy") -%>
  context 'given a <%= resource %>' do
    setup { @<%= resource %> = Factory(:<%= resource %>) }

    context 'DELETE to destroy' do
      setup { delete :destroy, :id => @<%= resource %>.to_param }

      should_set_the_flash_to /deleted/i
      should_redirect_to('<%= resources %> index') { <%= resources %>_path }
    end
  end

<% end -%>
end


text:
require 'optparse'
require 'fileutils'
require 'bundler'

options = {}

opt_parser = OptionParser.new do |opts|
  opts.banner = 'Usage: origen extract FILE [options]'
end
opt_parser.parse! ARGV

archive = ARGV.first

unless File.exist?(archive)
  Origen.log.error "File not found: #{archive}"
  exit 1
end

dirname = Pathname.new(archive).basename('.origen').to_s

if File.exist?(dirname)
  Origen.log.error "The application directory already exists (#{dirname}), delete it and then try again if you want to overwrite it"
  exit 1
end

passed = system "tar -xvzf #{archive}"
unless passed
  Origen.log.error 'A problem was encountered extracting the tarball, extraction aborted!'
  exit 1
end

Dir.chdir dirname do
  Bundler.with_clean_env do
    Origen.log.info 'Trying to boot the application...'

    passed = system "#{File.join('lbin', 'origen')} -v"
    if passed
      Origen.log.success 'Your application has been extracted and can boot up'
    else
      Origen.log.error 'Something went wrong at the final hurdle, your application has been extracted but cannot boot'
    end
  end
end


text:
<!doctype>

    <meta content='Clock Tik Tok - Anu Scribbles' name='title' />
    <meta content='Clock Tik Tok - Anu Scribbles' name='og:title' />
    <title>Clock Tik Tok - Anu Scribbles</title>
    <link href='http://localhost:4000/images/fav.png' rel='shortcut icon'>
<link href='http://localhost:4000/stylesheets/style.css' rel='stylesheet' type='text/css' />
<link href='http://localhost:4000/stylesheets/syntax.css' rel='stylesheet' type='text/css' />

<meta content='width=device-width, initial-scale=1.0, user-scalable=no' name='viewport'>
<meta content='text/html; charset=utf-8' http-equiv='content-type' />

  <meta content='http://localhost:4000/posts/untitled-dark' property='og:url' />
  <meta content="I wrote this poem when I was going through a very low phase in life.Many of my beliefs were shaken and I used to feel..." property='og:description' />
  <meta content="article" property="og:type" />

Anu Scribbles

             Posts

             About me

27 Jul 2016

              Clock Tik Tok

              Tweet

I wrote this poem when I was going through a very low phase in life.
Many of my beliefs were shaken and I used to feel very helpless. I had to swallow a lot of pride and crawl
back to life. The pain in chest and the weakness in knees were some physical symptoms of the emotional turmoil I was in.
I hope this little poem conveys the intensity of emotions which we as humans are capable of facing.

Numb, inert and sickened

Clutch in the stomach so tight

Watching the room clock

Slowly go tik tok tik tok

Easy to fight with foes

Much harder with friends

All your shots but some

Hurt you more than them

The struggle is worthless

The pain is crippling

Watch again the room clock

Go slower tik tok tik tok\

But as with any suffering and pain, you only grow wiser and stronger. As Rumi says:

The wound is the place where the Light enters you.

  Til next time,

  Anu
  at 00:00

    ‹

    ›

      Built with Jekyll using Scribble.


text:
'''
Created on Oct 18, 2016
https://leetcode.com/problems/add-two-numbers/
@author: Windy Darian (Ruoyu Fan)
'''

# Definition for singly-linked list.
# class ListNode(object):
#     def __init__(self, x):
#         self.val = x
#         self.next = None

class Solution(object):
    def addTwoNumbers(self, l1, l2):
        """
        :type l1: ListNode
        :type l2: ListNode
        :rtype: ListNode
        """

        def get_value_and_next(node):
            if not node:
                return 0, None
            else:
                # in c++ we can just use a reference to pointer to force node point to next
                return node.val, node.next

        result_root = ListNode(None)
        current = result_root
        carry = 0
        while l1 is not None or l2 is not None or carry:
            v1, l1 = get_value_and_next(l1)
            v2, l2 = get_value_and_next(l2)
            carry, new_val = divmod(v1 + v2 + carry, 10)
            current.next = ListNode(new_val)
            current = current.next

        return result_root.next


text:
#ifndef MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_OS_SPECIFIC_INLINE_H_
#define MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_OS_SPECIFIC_INLINE_H_

#include <math.h>

#include BOSS_WEBRTC_U_rtc_base__system__arch_h //original-code:"rtc_base/system/arch.h"

#if defined(WEBRTC_POSIX)
#define WebRtcIsac_lrint lrint
#elif (defined(WEBRTC_ARCH_X86) && defined(WIN32))
static __inline long int WebRtcIsac_lrint(double x_dbl) {
  long int x_int;

  __asm {
    fld x_dbl
    fistp x_int
  }
  ;

  return x_int;
}
#else  // Do a slow but correct implementation of lrint

static __inline long int WebRtcIsac_lrint(double x_dbl) {
  long int x_int;
  x_int = (long int)floor(x_dbl + 0.499999999999);
  return x_int;
}

#endif

#endif  // MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_OS_SPECIFIC_INLINE_H_


text:
#region -- License Terms --
//
// MessagePack for CLI
//
// Copyright (C) 2012-2014 FUJIWARA, Yusuke
//
//    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.
//
#endregion -- License Terms --

#if UNITY_STANDALONE || UNITY_WEBPLAYER || UNITY_WII || UNITY_IPHONE || UNITY_ANDROID || UNITY_PS3 || UNITY_XBOX360 || UNITY_FLASH || UNITY_BKACKBERRY || UNITY_WINRT
#define UNITY
#endif

using System;
using System.Collections;
using System.Collections.Generic;
#if !UNITY
using System.Diagnostics.Contracts;
#endif // !UNITY
using System.Globalization;

namespace MsgPack.Serialization.DefaultSerializers
{
	/// <summary>
	///		Defines serializer factory for well known structured types.
	/// </summary>
	public static class GenericSerializer
	{
		public static MessagePackSerializer<T> Create<T>( SerializationContext context )
		{
			return Create( context, typeof( T ) ) as MessagePackSerializer<T>;
		}

		public static IMessagePackSingleObjectSerializer Create( SerializationContext context, Type targetType )
		{
			if ( targetType.IsArray )
			{
				return CreateArraySerializer( context, targetType );
			}

			Type nullableUnderlyingType;
			if ( ( nullableUnderlyingType = Nullable.GetUnderlyingType( targetType ) ) != null )
			{
				return CreateNullableSerializer( context, nullableUnderlyingType );
			}

			if ( targetType.GetIsGenericType() )
			{
				var typeDefinition = targetType.GetGenericTypeDefinition();
				if ( typeDefinition == typeof( List<> ) )
				{
					return CreateListSerializer( context, targetType.GetGenericArguments()[ 0 ] );
				}

				if ( typeDefinition == typeof( Dictionary<,> ) )
				{
					var genericTypeArguments = targetType.GetGenericArguments();
					return CreateDictionarySerializer( context, genericTypeArguments[ 0 ], genericTypeArguments[ 1 ] );
				}
			}

			return TryCreateImmutableCollectionSerializer( context, targetType );
		}

		private static IMessagePackSingleObjectSerializer CreateArraySerializer( SerializationContext context, Type targetType )
		{
#if DEBUG && !UNITY
			Contract.Assert( targetType.IsArray );
#endif // DEBUG && !UNITY
			return ArraySerializer.Create( context, targetType );
		}

		private static IMessagePackSingleObjectSerializer CreateNullableSerializer( SerializationContext context, Type underlyingType )
		{
			var factoryType = typeof( NullableInstanceFactory<> ).MakeGenericType( underlyingType );
			var instanceFactory = Activator.CreateInstance( factoryType ) as IInstanceFactory;
#if DEBUG && !UNITY
			Contract.Assert( instanceFactory != null );
#endif // DEBUG && !UNITY
			return instanceFactory.Create( context ) as IMessagePackSingleObjectSerializer;
		}

		private static IMessagePackSingleObjectSerializer CreateListSerializer( SerializationContext context, Type itemType )
		{
			var factoryType = typeof( ListInstanceFactory<> ).MakeGenericType( itemType );
			var instanceFactory = Activator.CreateInstance( factoryType ) as IInstanceFactory;
#if DEBUG && !XAMIOS && !XAMDROID && !UNITY_IPHONE && !UNITY_ANDROID
			Contract.Assert( instanceFactory != null );
			if ( SerializerDebugging.AvoidsGenericSerializer )
			{
				return null;
			}
#endif // DEBUG && !XAMIOS && !XAMDROID && !UNITY_IPHONE && !UNITY_ANDROID
			return instanceFactory.Create( context ) as IMessagePackSingleObjectSerializer;
		}

		private static IMessagePackSingleObjectSerializer CreateDictionarySerializer( SerializationContext context, Type keyType, Type valueType )
		{
			var factoryType = typeof( DictionaryInstanceFactory<,> ).MakeGenericType( keyType, valueType );
			var instanceFactory = Activator.CreateInstance( factoryType ) as IInstanceFactory;
#if DEBUG && !XAMIOS && !XAMDROID && !UNITY_IPHONE && !UNITY_ANDROID
			Contract.Assert( instanceFactory != null );
			if ( SerializerDebugging.AvoidsGenericSerializer )
			{
				return null;
			}
#endif // DEBUG && !XAMIOS && !XAMDROID && !UNITY_IPHONE && !UNITY_ANDROID
			return instanceFactory.Create( context ) as IMessagePackSingleObjectSerializer;
		}

#if SILVERLIGHT || NETFX_35 || NETFX_40
		[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "context", Justification = "Used in other platform" )]
		[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "targetType", Justification = "Used in other platform" )]
#endif // SILVERLIGHT
		private static IMessagePackSingleObjectSerializer TryCreateImmutableCollectionSerializer( SerializationContext context, Type targetType )
		{
#if NETFX_35 || NETFX_40 || SILVERLIGHT
			// ImmutableCollections does not support above platforms.
			return null;
#else
			if ( targetType.Namespace != "System.Collections.Immutable" )
			{
				return null;
			}

			if ( !targetType.GetIsGenericType() )
			{
				return null;
			}

			switch ( targetType.GetGenericTypeDefinition().Name )
			{
				case "ImmutableList`1":
				case "ImmutableHashSet`1":
				case "ImmutableSortedSet`1":
				case "ImmutableQueue`1":
				{
					return
						Activator.CreateInstance(
							typeof( ImmutableCollectionSerializer<,> )
								.MakeGenericType( targetType, targetType.GetGenericArguments()[ 0 ] ),
							context
						) as IMessagePackSingleObjectSerializer;
				}
				case "ImmutableStack`1":
				{
					return
						Activator.CreateInstance(
							typeof( ImmutableStackSerializer<,> )
								.MakeGenericType( targetType, targetType.GetGenericArguments()[ 0 ] ),
							context
						) as IMessagePackSingleObjectSerializer;
				}
				case "ImmutableDictionary`2":
				case "ImmutableSortedDictionary`2":
				{
					return
						Activator.CreateInstance(
							typeof( ImmutableDictionarySerializer<,,> )
								.MakeGenericType( targetType, targetType.GetGenericArguments()[ 0 ], targetType.GetGenericArguments()[ 1 ] ),
							context
						) as IMessagePackSingleObjectSerializer;
				}
				default:
				{
#if DEBUG && !UNITY
					Contract.Assert( false, "Unknown type:" + targetType );
#endif // DEBUG && !UNITY
					// ReSharper disable HeuristicUnreachableCode
					return null;
					// ReSharper restore HeuristicUnreachableCode
				}
			}
#endif // NETFX_35 || NETFX_40 || SILVERLIGHT
		}

		public static IMessagePackSingleObjectSerializer CreateCollectionInterfaceSerializer( SerializationContext context, Type abstractType, Type concreteType )
		{
			Type serializerType;

			if ( abstractType.GetIsGenericType() && abstractType.GetGenericTypeDefinition() == typeof( IList<> ) )
			{
				serializerType = typeof( ListSerializer<> ).MakeGenericType( abstractType.GetGenericArguments()[ 0 ] );
			}
#if !NETFX_35 && !UNITY
			else if ( abstractType.GetIsGenericType() && abstractType.GetGenericTypeDefinition() == typeof( ISet<> ) )
			{
				serializerType = typeof( SetSerializer<> ).MakeGenericType( abstractType.GetGenericArguments()[ 0 ] );
			}
#endif // !NETFX_35 && !UNITY
			else if ( abstractType.GetIsGenericType() && abstractType.GetGenericTypeDefinition() == typeof( ICollection<> ) )
			{
				serializerType = typeof( CollectionSerializer<> ).MakeGenericType( abstractType.GetGenericArguments()[ 0 ] );
			}
			else if ( abstractType.GetIsGenericType() && abstractType.GetGenericTypeDefinition() == typeof( IEnumerable<> ) )
			{
				serializerType = typeof( EnumerableSerializer<> ).MakeGenericType( abstractType.GetGenericArguments()[ 0 ] );

			}
			else if ( abstractType.GetIsGenericType() && abstractType.GetGenericTypeDefinition() == typeof( IDictionary<,> ) )
			{
				serializerType =
					typeof( DictionarySerializer<,> ).MakeGenericType(
					abstractType.GetGenericArguments()[ 0 ],
					abstractType.GetGenericArguments()[ 1 ]
					);
			}
			else if ( abstractType == typeof( IList ) )
			{
				serializerType = typeof( NonGenericListSerializer );
			}
			else if ( abstractType == typeof( ICollection ) )
			{
				serializerType = typeof( NonGenericCollectionSerializer );
			}
			else if ( abstractType == typeof( IEnumerable ) )
			{
				serializerType = typeof( NonGenericEnumerableSerializer );

			}
			else if ( abstractType == typeof( IDictionary ) )
			{
				serializerType = typeof( NonGenericDictionarySerializer );
			}
			else
			{
				throw new NotSupportedException(
					String.Format( CultureInfo.CurrentCulture, "Abstract type '{0}' is not supported.", abstractType )
				);
			}

			return Activator.CreateInstance( serializerType, context, concreteType ) as IMessagePackSingleObjectSerializer;
		}

		/// <summary>
		///		Defines non-generic factory method.
		/// </summary>
		private interface IInstanceFactory
		{
			object Create( SerializationContext context );
		}

		public sealed class NullableInstanceFactory<T> : IInstanceFactory
			where T : struct
		{
			public NullableInstanceFactory() { }

			public object Create( SerializationContext context )
			{
				return new NullableMessagePackSerializer<T>( context );
			}
		}

        public sealed class ListInstanceFactory<T> : IInstanceFactory
		{
			public ListInstanceFactory() { }

			public object Create( SerializationContext context )
			{
				return new System_Collections_Generic_List_1MessagePackSerializer<T>( context );
			}
		}

        public sealed class DictionaryInstanceFactory<TKey, TValue> : IInstanceFactory
		{
			public DictionaryInstanceFactory() { }

			public object Create( SerializationContext context )
			{
				return new System_Collections_Generic_Dictionary_2MessagePackSerializer<TKey, TValue>( context );
			}
		}
	}
}


text:
title: Rule no-comma-dangle
layout: doc
---
<!-- Note: No pull requests accepted for this file. See README.md in the root directory for details. -->
# Disallow Dangling Commas (no-comma-dangle)

**Deprecation notice**: This rule is deprecated and has been superseded by the [comma-dangle](comma-dangle) rule. It will be removed in ESLint v1.0.

Trailing commas in object literals are valid according to the ECMAScript 5 (and ECMAScript 3!) spec, however IE8 (when not in IE8 document mode) and below will throw an error when it encounters trailing commas in JavaScript.

```js
var foo = {
    bar: "baz",
    qux: "quux",
};
```

## Rule Details

This rule is aimed at detecting trailing commas in object literals. As such, it will warn whenever it encounters a trailing comma in an object literal.

The following are considered warnings:

```js
var foo = {
    bar: "baz",
    qux: "quux",
};

var arr = [1,2,];

foo({
  bar: "baz",
  qux: "quux",
});
```

The following are okay and will not raise warnings:

```js
var foo = {
    bar: "baz",
    qux: "quux"
};

var arr = [1,2];

foo({
  bar: "baz",
  qux: "quux"
});
```

## When Not To Use It

If your code will not be run in IE8 or below (a NodeJS application, for example) and you'd prefer to allow trailing commas, turn this rule off.

## Version

This rule was introduced in ESLint 0.0.9.

## Resources

* [Rule source](https://github.com/eslint/eslint/tree/master/lib/rules/no-comma-dangle.js)
* [Documentation source](https://github.com/eslint/eslint/tree/master/docs/rules/no-comma-dangle.md)


text:
@extends('core::app.layout')

@section('content')

Inventory

Value Report

Detail

Inventory Value Report "{{ $warehouse ? $warehouse->name : 'All' }}"

{{$item->codeName}}

                    {!! $list_inventory->appends([
                        'search'=>app('request')->get('search'),
                        'date_from'=>app('request')->get('date_from'),
                        'date_to'=>app('request')->get('date_to'),
                        'account'=>app('request')->get('account'),
                        'warehouse_id'=>app('request')->get('warehouse_id')
                        ])->render() !!}

                            @if(!$warehouse) Warehouse	 @endif
                            Reference
                            Vendor
                            Date
                            I/O
                            Remaining Stock

                        <?php
                        $opening_inventory = \Point\Framework\Models\Inventory::where('item_id', '=', $item->id)
                            ->where('form_date', '<', $date_from)
                            ->where(function ($query) use ($warehouse) {
                                if ($warehouse) {
                                    $query->where('warehouse_id', '=', $warehouse->id);
                                }
                            })
                            ->orderBy('form_date', '=', 'asc')
                            ->orderBy('formulir_id', '=', 'asc')
                            ->first();
                        $total_quantity = $opening_inventory ? $opening_inventory->total_quantity : 0;
                        $total_value = $opening_inventory ? $opening_inventory->total_value : 0;
                        $cogs = $opening_inventory ? $opening_inventory->cogs : 0;
                        ?>

                            @if(!$warehouse) {{$opening_inventory ? $opening_inventory->warehouse->name : '-' }}	 @endif

                                -

                            -
                            {{date_format_view($date_from)}}
                            -
                            {{number_format_quantity($total_quantity)}}

                        @foreach($list_inventory as $inventory)
                            <?php $total_quantity += $inventory->quantity ?>
                            <?php $total_value += $inventory->quantity * $inventory->cogs ?>

recalculate == 1) style="background: red;color:white;" @endif>
                                @if(!$warehouse) {{$inventory->warehouse->name}}	 @endif
                                <?php
                                $model = $inventory->formulir->formulirable_type;
                                ?>
                                {!! formulir_url($inventory->formulir) !!}

                                    <?php
                                    $model = $inventory->formulir->formulirable_type;
                                    $class = $model::find($inventory->formulir->formulirable_id);
                                    ?>
                                    @if ($class->person)
                                        {{ $class->person->name }}
                                    @endif

                                {{date_format_view($inventory->form_date)}}
                                {{number_format_quantity($inventory->quantity)}}
                                {{number_format_quantity($inventory->total_quantity)}}

                        @endforeach

                    {!! $list_inventory->appends([
                        'search'=>app('request')->get('search'),
                        'date_from'=>app('request')->get('date_from'),
                        'date_to'=>app('request')->get('date_to'),
                        'account'=>app('request')->get('account'),
                        'warehouse_id'=>app('request')->get('warehouse_id')
                        ])->render() !!}

@stop


text:
define(['mout/random/choice', './helper-mockRandom'], function (choice, mockRandom) {

    describe('random/choice()', function () {

        beforeEach(function(){
            mockRandom.start();
        });

        afterEach(function() {
            mockRandom.end();
        });

        it('should pick a random argument', function(){
            var choices = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
            var a = choice.apply(null, choices),
                b = choice.apply(null, choices);

            expect( choices ).toContain( a );
            expect( choices ).toContain( b );
            expect( a ).not.toEqual( b );
        });

        it('should work with array', function(){
            var arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

            var a = choice(arr),
                b = choice(arr);

            expect( arr ).toContain( a );
            expect( arr ).toContain( b );
            expect( a ).not.toEqual( b );
        });

    });

});


text:
layout: page
title: "Matthew Ryan Hallowell"
comments: true
description: "blanks"
keywords: "Matthew Ryan Hallowell,CU,Boulder"
---
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://dl.dropboxusercontent.com/s/pc42nxpaw1ea4o9/highcharts.js?dl=0"></script>
<!-- <script src="../assets/js/highcharts.js"></script> -->
<style type="text/css">@font-face {
	font-family: "Bebas Neue";
	src: url(https://www.filehosting.org/file/details/544349/BebasNeue Regular.otf) format("opentype");
	}
	h1.Bebas {
		font-family: "Bebas Neue", Verdana, Tahoma;
	}
</style>
</head>

#### TEACHING INFORMATION

**College**: College of Engineering and Applied Science

**Classes taught**: CVEN 3246, CVEN 3256, CVEN 5226, CVEN 5836

#### CVEN 3246: Introduction to Construction

**Terms taught**: Fall 2008, Fall 2009, Fall 2009, Fall 2010, Fall 2010, Spring 2011, Spring 2012, Spring 2013, Spring 2014, Spring 2017

**Instructor rating**: 5.78

**Standard deviation in instructor rating**: 0.08

**Average grade** (4.0 scale): 3.22

**Standard deviation in grades** (4.0 scale): 0.11

**Average workload** (raw): 2.5

**Standard deviation in workload** (raw): 0.19

#### CVEN 3256: Construction Equipment and Methods

**Terms taught**: Fall 2011, Fall 2012, Fall 2013, Fall 2016

**Instructor rating**: 5.57

**Standard deviation in instructor rating**: 0.16

**Average grade** (4.0 scale): 3.27

**Standard deviation in grades** (4.0 scale): 0.18

**Average workload** (raw): 2.62

**Standard deviation in workload** (raw): 0.13

#### CVEN 5226: Construction Safety

**Terms taught**: Spring 2009, Spring 2010, Spring 2011, Spring 2012, Spring 2013, Spring 2014, Spring 2015, Fall 2016

**Instructor rating**: 5.79

**Standard deviation in instructor rating**: 0.13

**Average grade** (4.0 scale): 3.81

**Standard deviation in grades** (4.0 scale): 0.14

**Average workload** (raw): 3.32

**Standard deviation in workload** (raw): 0.26

#### CVEN 5836: Special Topics for Seniors/Grads

**Terms taught**: Fall 2010

**Instructor rating**: 0.0

**Standard deviation in instructor rating**: 0.0

**Average grade** (4.0 scale): 3.56

**Standard deviation in grades** (4.0 scale): 0.0

**Average workload** (raw): 0.0

**Standard deviation in workload** (raw): 0.0


text:
using System;
using System.Collections.Generic;
using System.IO;
using Newtonsoft.Json;

namespace Nest
{
	public interface IXPackUsageResponse : IResponse
	{
		[JsonProperty("graph")]
		XPackUsage Graph { get; }

		[JsonProperty("monitoring")]
		MonitoringUsage Monitoring { get; }

		[JsonProperty("ml")]
		MachineLearningUsage MachineLearning { get; }

		[JsonProperty("watcher")]
		AlertingUsage Alerting { get; }

		[JsonProperty("security")]
		SecurityUsage Security { get; }
	}

	public class XPackUsageResponse : ResponseBase, IXPackUsageResponse
	{
		[JsonProperty("graph")]
		public XPackUsage Graph { get; internal set; }

		[JsonProperty("monitoring")]
		public MonitoringUsage Monitoring { get; internal set; }

		[JsonProperty("ml")]
		public MachineLearningUsage MachineLearning { get; internal set; }

		[JsonProperty("watcher")]
		public AlertingUsage Alerting { get; internal set; }

		[JsonProperty("security")]
		public SecurityUsage Security { get; internal set; }
	}

	public class XPackUsage
	{
		public bool Available { get; internal set; }
		public bool Enabled { get; internal set; }
	}

	public class SecurityUsage : XPackUsage
	{
		[JsonProperty("system_key")]
		public SecurityFeatureToggle SystemKey { get; internal set; }

		[JsonProperty("anonymous")]
		public SecurityFeatureToggle Anonymous { get; internal set; }

		[JsonProperty("ssl")]
		public SslUsage Ssl { get; internal set; }

		[JsonProperty("ipfilter")]
		public IpFilterUsage IpFilter { get; internal set; }

		[JsonProperty("audit")]
		public AuditUsage Audit { get; internal set; }

		[JsonProperty("roles")]
		public IReadOnlyDictionary<string, RoleUsage> Roles { get; internal set; } = EmptyReadOnly<string, RoleUsage>.Dictionary;

		[JsonProperty("realms")]
		public IReadOnlyDictionary<string, RealmUsage> Realms { get; internal set; } = EmptyReadOnly<string, RealmUsage>.Dictionary;

		public class AuditUsage : SecurityFeatureToggle
		{
			[JsonProperty("outputs")]
			public IReadOnlyCollection<string> Outputs { get; internal set; } = EmptyReadOnly<string>.Collection;
		}

		public class IpFilterUsage
		{
			[JsonProperty("http")]
			public bool Http { get; internal set; }

			[JsonProperty("transport")]
			public bool Transport { get; internal set; }
		}

		public class RealmUsage : XPackUsage
		{
			[JsonProperty("name")]
			public IReadOnlyCollection<string> Name { get; internal set; } = EmptyReadOnly<string>.Collection;

			[JsonProperty("size")]
			public IReadOnlyCollection<long> Size { get; internal set; } = EmptyReadOnly<long>.Collection;

			[JsonProperty("order")]
			public IReadOnlyCollection<long> Order { get; internal set; } = EmptyReadOnly<long>.Collection;
		}

		public class RoleUsage
		{
			[JsonProperty("dls")]
			public bool Dls { get; internal set; }

			[JsonProperty("fls")]
			public bool Fls { get; internal set; }

			[JsonProperty("size")]
			public long Size { get; internal set; }
		}

		public class SslUsage
		{
			[JsonProperty("http")]
			public SecurityFeatureToggle Http { get; internal set; }

			[JsonProperty("transport")]
			public SecurityFeatureToggle Transport { get; internal set; }
		}

		public class SecurityFeatureToggle
		{
			[JsonProperty("enabled")]
			public bool Enabled { get; internal set; }
		}
	}

	public class AlertingUsage : XPackUsage
	{
		[JsonProperty("execution")]
		public AlertingExecution Execution { get; internal set; }

		[JsonProperty("count")]
		public AlertingCount Count { get; internal set; }

		public class AlertingExecution
		{
			[JsonProperty("actions")]
			public IReadOnlyDictionary<string, ExecutionAction> Actions { get; internal set; } = EmptyReadOnly<string, ExecutionAction>.Dictionary;
		}

		public class ExecutionAction
		{
			[JsonProperty("total")]
			public long Total { get; internal set; }

			[JsonProperty("total_in_ms")]
			public long TotalInMilliseconds { get; internal set; }
		}

		public class AlertingCount
		{
			[JsonProperty("total")]
			public long Total { get; internal set; }

			[JsonProperty("active")]
			public long Active { get; internal set; }
		}
	}

	public class MonitoringUsage : XPackUsage
	{
		[JsonProperty("enabled_exporters")]
		public IReadOnlyDictionary<string, long> EnabledExporters { get; set; } = EmptyReadOnly<string, long>.Dictionary;
	}

	public class MachineLearningUsage : XPackUsage
	{
		[JsonProperty("jobs")]
		public IReadOnlyDictionary<string, Job> Jobs { get; set; } = EmptyReadOnly<string, Job>.Dictionary;

		[JsonProperty("datafeeds")]
		public IReadOnlyDictionary<string, DataFeed> Datafeeds { get; set; } = EmptyReadOnly<string, DataFeed>.Dictionary;

		public class DataFeed
		{
			[JsonProperty("count")]
			public long Count { get; internal set; }
		}

		public class Job
		{
			[JsonProperty("count")]
			public long Count { get; internal set; }

			[JsonProperty("detectors")]
			public JobStatistics Detectors { get; internal set; }

			[JsonProperty("model_size")]
			public JobStatistics ModelSize { get; internal set; }
		}

		public class JobStatistics
		{
			[JsonProperty("total")]
			public double Total { get; internal set; }

			[JsonProperty("min")]
			public double Minimum { get; internal set; }

			[JsonProperty("max")]
			public double Maximum { get; internal set; }

			[JsonProperty("avg")]
			public double Average { get; internal set; }
		}
	}
}


text:
package org.gearvrf;

import org.gearvrf.utility.ResourceCache;
import org.joml.Matrix4f;
import org.joml.Vector4f;

import java.util.HashMap;

/**
 * Causes a shadow map to be rendered from the viewpoint
 * of the scene object which owns the shadow map.
 * A shadow map is only rendered if a light is
 * attached to the owning scene object.
 * All of the shadow maps are kept in a single
 * texture array and they must all be the same size.
 * This array is created the first time a GVRShadowMap
 * component is created.
 * @see GVRRenderTarget
 * @see GVRRenderTextureArray
 */
public class GVRShadowMap extends GVRRenderTarget
{
    /**
     * When the application is restarted we recreate the render texture array
     * since all of the GL textures have been deleted.
     */
    static
    {
        GVRContext.addResetOnRestartHandler(new Runnable()
        {
            @Override
            public void run()
            {
                sShadowMaps = null;
                sShadowMaterial = null;
            }
        });
    }

    /**
     * Constructs a shadow map using the given material.
     *
     * @param ctx GVRContext to associate the shadow map with.
     * @param camera GVRCamera used to cast shadow
     */
    public GVRShadowMap(GVRContext ctx, GVRCamera camera)
    {
        super(ctx, NativeShadowMap.ctor(getShadowMaterial(ctx).getNative()));
        mShadowMatrix = new Matrix4f();
        mTemp = new Vector4f();
        mTempMtx = new float[16];
        if (sShadowMaps == null)
        {
            sShadowMaps = new GVRRenderTextureArray(ctx, 1024, 1024, 4);
            sBiasMatrix = new Matrix4f();
            sBiasMatrix.scale(0.5f);
            sBiasMatrix.setTranslation(0.5f, 0.5f, 0.5f);
        }
        setTexture(sShadowMaps);
        setCamera(camera);
    }

    /**
     * Adds an orthographic camera constructed from the designated
     * perspective camera to describe the shadow projection.
     * The field of view and aspect ration of the perspective
     * camera are used to obtain the view volume of the
     * orthographic camera. This type of camera is used
     * for shadows generated by direct lights at infinite distance.
     * @param centerCam GVRPerspectiveCamera to derive shadow projection from
     * @return Orthographic camera to use for shadow casting
     * @see GVRDirectLight
     */
    static GVRCamera makeOrthoShadowCamera(GVRPerspectiveCamera centerCam)
    {
        GVROrthogonalCamera shadowCam = new GVROrthogonalCamera(centerCam.getGVRContext());
        GVRMaterial shadowMtl = getShadowMaterial(centerCam.getGVRContext());
        float near = shadowMtl.hasUniform("shadow_near") ? shadowMtl.getFloat("shadow_near") : centerCam.getNearClippingDistance();
        float far = shadowMtl.hasUniform("shadow_far") ? shadowMtl.getFloat("shadow_far") : centerCam.getFarClippingDistance();
        float fovy = (float) Math.toRadians(centerCam.getFovY());
        float h = (float) (Math.atan(fovy / 2.0f) * far) / 2.0f;

        shadowCam.setLeftClippingDistance(-h);
        shadowCam.setRightClippingDistance(h);
        shadowCam.setTopClippingDistance(h);
        shadowCam.setBottomClippingDistance(-h);
        shadowCam.setNearClippingDistance(near);
        shadowCam.setFarClippingDistance(far);
        return shadowCam;
    }

    /**
     * Adds a perspective camera constructed from the designated
     * perspective camera to describe the shadow projection.
     * This type of camera is used for shadows generated by spot lights.
     * @param centerCam GVRPerspectiveCamera to derive shadow projection from
     * @param coneAngle spot light cone angle
     * @return Perspective camera to use for shadow casting
     * @see GVRSpotLight
     */
    static GVRCamera makePerspShadowCamera(GVRPerspectiveCamera centerCam, float coneAngle)
    {
        GVRPerspectiveCamera camera = new GVRPerspectiveCamera(centerCam.getGVRContext());
        GVRMaterial shadowMtl = GVRLightBase.getShadowMaterial(centerCam.getGVRContext());
        float near = shadowMtl.hasUniform("shadow_near") ? shadowMtl.getFloat("shadow_near") : centerCam.getNearClippingDistance();
        float far = shadowMtl.hasUniform("shadow_far") ? shadowMtl.getFloat("shadow_far") : centerCam.getFarClippingDistance();

        camera.setNearClippingDistance(near);
        camera.setFarClippingDistance(far);
        camera.setFovY((float) Math.toDegrees(coneAngle));
        camera.setAspectRatio(1.0f);
        return camera;
    }

    /**
     * Sets the shadow matrix for the spot light from the input model/view
     * matrix and the shadow camera projection matrix.
     * @param modelView light model/view transform
     * @param light     spot light component to update
     */
    void setPerspShadowMatrix(Matrix4f modelView, GVRLightBase light)
    {
        GVRPerspectiveCamera camera = (GVRPerspectiveCamera) getCamera();

        if (camera == null)
        {
            return;
        }
        float angle = (float) Math.acos(light.getFloat("outer_cone_angle")) * 2.0f;

        modelView.invert();
        modelView.get(mTempMtx);
        camera.setViewMatrix(mTempMtx);
        camera.setFovY((float) Math.toDegrees(angle));
        mShadowMatrix.setPerspective(angle, 1.0f, camera.getNearClippingDistance(), camera.getFarClippingDistance());
        mShadowMatrix.mul(modelView);
        sBiasMatrix.mul(mShadowMatrix, mShadowMatrix);
        mShadowMatrix.getColumn(0, mTemp);
        light.setVec4("sm0", mTemp.x, mTemp.y, mTemp.z, mTemp.w);
        mShadowMatrix.getColumn(1, mTemp);
        light.setVec4("sm1", mTemp.x, mTemp.y, mTemp.z, mTemp.w);
        mShadowMatrix.getColumn(2, mTemp);
        light.setVec4("sm2", mTemp.x, mTemp.y, mTemp.z, mTemp.w);
        mShadowMatrix.getColumn(3, mTemp);
        light.setVec4("sm3", mTemp.x, mTemp.y, mTemp.z, mTemp.w);
    }

    /**
     * Sets the direct light shadow matrix for the light from the input model/view
     * matrix and the shadow camera projection matrix.
     * @param modelView light model/view transform
     * @param light     direct light component to update
     */
    void setOrthoShadowMatrix(Matrix4f modelView, GVRLightBase light)
    {
        GVROrthogonalCamera camera = (GVROrthogonalCamera) getCamera();
        if (camera == null)
        {
            return;
        }

        float w = camera.getRightClippingDistance() - camera.getLeftClippingDistance();
        float h = camera.getTopClippingDistance() - camera.getBottomClippingDistance();
        float near = camera.getNearClippingDistance();
        float far = camera.getFarClippingDistance();

        modelView.invert();
        modelView.get(mTempMtx);
        camera.setViewMatrix(mTempMtx);
        mShadowMatrix.setOrthoSymmetric(w, h, near, far);
        mShadowMatrix.mul(modelView);
        sBiasMatrix.mul(mShadowMatrix, mShadowMatrix);
        mShadowMatrix.getColumn(0, mTemp);
        light.setVec4("sm0", mTemp.x, mTemp.y, mTemp.z, mTemp.w);
        mShadowMatrix.getColumn(1, mTemp);
        light.setVec4("sm1", mTemp.x, mTemp.y, mTemp.z, mTemp.w);
        mShadowMatrix.getColumn(2, mTemp);
        light.setVec4("sm2", mTemp.x, mTemp.y, mTemp.z, mTemp.w);
        mShadowMatrix.getColumn(3, mTemp);
        light.setVec4("sm3", mTemp.x, mTemp.y, mTemp.z, mTemp.w);
    }

    /**
     * Gets the shadow material used in constructing shadow maps.
     *
     * @return shadow map material
     */
    static GVRMaterial getShadowMaterial(GVRContext ctx)
    {
        if (sShadowMaterial == null)
        {
            sShadowMaterial = new GVRMaterial(ctx);
            GVRShaderTemplate depthShader = ctx.getMaterialShaderManager().retrieveShaderTemplate(GVRDepthShader.class);
            depthShader.bindShader(ctx, sShadowMaterial);
        }
        return sShadowMaterial;
    }

    protected Matrix4f mShadowMatrix;
    protected Vector4f mTemp;
    protected float[] mTempMtx;
    static Matrix4f sBiasMatrix = null;
    static GVRRenderTextureArray sShadowMaps = null;
    static GVRMaterial sShadowMaterial = null;
}

class NativeShadowMap
{
    static native long ctor(long material);
}


text:
package org.apache.hadoop.mapred.jobcontrol;

import java.io.IOException;
import java.util.ArrayList;

import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hdfs.server.namenodeFBT.msg.MessageException;
import org.apache.hadoop.hdfs.server.namenodeFBT.service.ServiceException;
import org.apache.hadoop.mapred.FileInputFormat;
import org.apache.hadoop.mapred.JobClient;
import org.apache.hadoop.mapred.JobConf;
import org.apache.hadoop.mapred.JobID;
import org.apache.hadoop.mapred.RunningJob;
import org.apache.hadoop.util.StringUtils;

/** This class encapsulates a MapReduce job and its dependency. It monitors
 *  the states of the depending jobs and updates the state of this job.
 *  A job starts in the WAITING state. If it does not have any depending jobs, or
 *  all of the depending jobs are in SUCCESS state, then the job state will become
 *  READY. If any depending jobs fail, the job will fail too.
 *  When in READY state, the job can be submitted to Hadoop for execution, with
 *  the state changing into RUNNING state. From RUNNING state, the job can get into
 *  SUCCESS or FAILED state, depending the status of the job execution.
 *
 */

public class Job {

  // A job will be in one of the following states
  final public static int SUCCESS = 0;
  final public static int WAITING = 1;
  final public static int RUNNING = 2;
  final public static int READY = 3;
  final public static int FAILED = 4;
  final public static int DEPENDENT_FAILED = 5;

  private JobConf theJobConf;
  private int state;
  private String jobID; 		// assigned and used by JobControl class
  private JobID mapredJobID; // the job ID assigned by map/reduce
  private String jobName;		// external name, assigned/used by client app
  private String message;		// some info for human consumption,
  // e.g. the reason why the job failed
  private ArrayList<Job> dependingJobs;	// the jobs the current job depends on

  private JobClient jc = null;		// the map reduce job client

  /**
   * Construct a job.
   * @param jobConf a mapred job configuration representing a job to be executed.
   * @param dependingJobs an array of jobs the current job depends on
 * @throws MessageException
   */
  public Job(JobConf jobConf, ArrayList<Job> dependingJobs) throws IOException, MessageException {
    this.theJobConf = jobConf;
    this.dependingJobs = dependingJobs;
    this.state = Job.WAITING;
    this.jobID = "unassigned";
    this.mapredJobID = null; //not yet assigned
    this.jobName = "unassigned";
    this.message = "just initialized";
    this.jc = new JobClient(jobConf);
  }

  /**
   * Construct a job.
   *
   * @param jobConf mapred job configuration representing a job to be executed.
   * @throws IOException
 * @throws MessageException
   */
  public Job(JobConf jobConf) throws IOException, MessageException {
    this(jobConf, null);
  }

  @Override
  public String toString() {
    StringBuffer sb = new StringBuffer();
    sb.append("job name:\t").append(this.jobName).append("\n");
    sb.append("job id:\t").append(this.jobID).append("\n");
    sb.append("job state:\t").append(this.state).append("\n");
    sb.append("job mapred id:\t").append(this.mapredJobID==null ? "unassigned"
        : this.mapredJobID).append("\n");
    sb.append("job message:\t").append(this.message).append("\n");

    if (this.dependingJobs == null || this.dependingJobs.size() == 0) {
      sb.append("job has no depending job:\t").append("\n");
    } else {
      sb.append("job has ").append(this.dependingJobs.size()).append(" dependeng jobs:\n");
      for (int i = 0; i < this.dependingJobs.size(); i++) {
        sb.append("\t depending job ").append(i).append(":\t");
        sb.append((this.dependingJobs.get(i)).getJobName()).append("\n");
      }
    }
    return sb.toString();
  }

  /**
   * @return the job name of this job
   */
  public String getJobName() {
    return this.jobName;
  }

  /**
   * Set the job name for  this job.
   * @param jobName the job name
   */
  public void setJobName(String jobName) {
    this.jobName = jobName;
  }

  /**
   * @return the job ID of this job assigned by JobControl
   */
  public String getJobID() {
    return this.jobID;
  }

  /**
   * Set the job ID for  this job.
   * @param id the job ID
   */
  public void setJobID(String id) {
    this.jobID = id;
  }

  /**
   * @return the mapred ID of this job
   * @deprecated use {@link #getAssignedJobID()} instead
   */
  @Deprecated
  public String getMapredJobID() {
    return this.mapredJobID.toString();
  }

  /**
   * Set the mapred ID for this job.
   * @param mapredJobID the mapred job ID for this job.
   * @deprecated use {@link #setAssignedJobID(JobID)} instead
   */
  @Deprecated
  public void setMapredJobID(String mapredJobID) {
    this.mapredJobID = JobID.forName(mapredJobID);
  }

  /**
   * @return the mapred ID of this job as assigned by the
   * mapred framework.
   */
  public JobID getAssignedJobID() {
    return this.mapredJobID;
  }

  /**
   * Set the mapred ID for this job as assigned by the
   * mapred framework.
   * @param mapredJobID the mapred job ID for this job.
   */
  public void setAssignedJobID(JobID mapredJobID) {
    this.mapredJobID = mapredJobID;
  }

  /**
   * @return the mapred job conf of this job
   */
  public JobConf getJobConf() {
    return this.theJobConf;
  }

  /**
   * Set the mapred job conf for this job.
   * @param jobConf the mapred job conf for this job.
   */
  public void setJobConf(JobConf jobConf) {
    this.theJobConf = jobConf;
  }

  /**
   * @return the state of this job
   */
  public synchronized int getState() {
    return this.state;
  }

  /**
   * Set the state for this job.
   * @param state the new state for this job.
   */
  protected synchronized void setState(int state) {
    this.state = state;
  }

  /**
   * @return the message of this job
   */
  public String getMessage() {
    return this.message;
  }

  /**
   * Set the message for this job.
   * @param message the message for this job.
   */
  public void setMessage(String message) {
    this.message = message;
  }

  /**
   * @return the job client of this job
   */
  public JobClient getJobClient(){
          return this.jc;
  }

  /**
   * @return the depending jobs of this job
   */
  public ArrayList<Job> getDependingJobs() {
    return this.dependingJobs;
  }

  /**
   * Add a job to this jobs' dependency list. Dependent jobs can only be added while a Job
   * is waiting to run, not during or afterwards.
   *
   * @param dependingJob Job that this Job depends on.
   * @return <tt>true</tt> if the Job was added.
   */
  public synchronized boolean addDependingJob(Job dependingJob) {
    if (this.state == Job.WAITING) { //only allowed to add jobs when waiting
      if (this.dependingJobs == null) {
        this.dependingJobs = new ArrayList<Job>();
      }
      return this.dependingJobs.add(dependingJob);
    } else {
      return false;
    }
  }

  /**
   * @return true if this job is in a complete state
   */
  public boolean isCompleted() {
    return this.state == Job.FAILED ||
      this.state == Job.DEPENDENT_FAILED ||
      this.state == Job.SUCCESS;
  }

  /**
   * @return true if this job is in READY state
   */
  public boolean isReady() {
    return this.state == Job.READY;
  }

  /**
   * Check the state of this running job. The state may
   * remain the same, become SUCCESS or FAILED.
 * @throws MessageException
 * @throws ServiceException
   */
  private void checkRunningState() throws MessageException, ServiceException {
    RunningJob running = null;
    try {
      running = jc.getJob(this.mapredJobID);
      if (running.isComplete()) {
        if (running.isSuccessful()) {
          this.state = Job.SUCCESS;
        } else {
          this.state = Job.FAILED;
          this.message = "Job failed!";
          try {
            running.killJob();
          } catch (IOException e1) {

          }
          try {
            this.jc.close();
          } catch (IOException e2) {

          }
        }
      }

    } catch (IOException ioe) {
      this.state = Job.FAILED;
      this.message = StringUtils.stringifyException(ioe);
      try {
        if (running != null)
          running.killJob();
      } catch (IOException e1) {

      }
      try {
        this.jc.close();
      } catch (IOException e1) {

      }
    }
  }

  /**
   * Check and update the state of this job. The state changes
   * depending on its current state and the states of the depending jobs.
 * @throws MessageException
 * @throws ServiceException
   */
   synchronized int checkState() throws MessageException, ServiceException {
    if (this.state == Job.RUNNING) {
      checkRunningState();
    }
    if (this.state != Job.WAITING) {
      return this.state;
    }
    if (this.dependingJobs == null || this.dependingJobs.size() == 0) {
      this.state = Job.READY;
      return this.state;
    }
    Job pred = null;
    int n = this.dependingJobs.size();
    for (int i = 0; i < n; i++) {
      pred = this.dependingJobs.get(i);
      int s = pred.checkState();
      if (s == Job.WAITING || s == Job.READY || s == Job.RUNNING) {
        break; // a pred is still not completed, continue in WAITING
        // state
      }
      if (s == Job.FAILED || s == Job.DEPENDENT_FAILED) {
        this.state = Job.DEPENDENT_FAILED;
        this.message = "depending job " + i + " with jobID "
          + pred.getJobID() + " failed. " + pred.getMessage();
        break;
      }
      // pred must be in success state
      if (i == n - 1) {
        this.state = Job.READY;
      }
    }

    return this.state;
  }

  /**
   * Submit this job to mapred. The state becomes RUNNING if submission
   * is successful, FAILED otherwise.
 * @throws MessageException
 * @throws ServiceException
   */
  protected synchronized void submit() throws MessageException, ServiceException {
    try {
      if (theJobConf.getBoolean("create.empty.dir.if.nonexist", false)) {
        FileSystem fs = FileSystem.get(theJobConf);
        Path inputPaths[] = FileInputFormat.getInputPaths(theJobConf);
        for (int i = 0; i < inputPaths.length; i++) {
          if (!fs.exists(inputPaths[i])) {
            try {
              fs.mkdirs(inputPaths[i]);
            } catch (IOException e) {

            }
          }
        }
      }
      RunningJob running = jc.submitJob(theJobConf);
      this.mapredJobID = running.getID();
      this.state = Job.RUNNING;
    } catch (IOException ioe) {
      this.state = Job.FAILED;
      this.message = StringUtils.stringifyException(ioe);
    }
  }

}


text:
module.exports = [<% if (includeLodash) { %>
    './app/bower_components/lodash/lodash.js:lodash',<% } %><% if (includeFluxxor) { %>
    './app/bower_components/fluxxor/build/fluxxor.js:fluxxor',<% } %>
    './app/bower_components/director/build/director.js:director',<% if (cssFramework === 'SASSBootstrap') { %>
    './app/bower_components/sass-bootstrap/dist/js/bootstrap.js:bootstrap',<% } %>
    './app/bower_components/jquery/dist/jquery.js:jquery'
];