text:
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Struct template c_regex_traits</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../../xpressive/reference.html#header.boost.xpressive.xpressive_fwd_hpp" title="Header <boost/xpressive/xpressive_fwd.hpp>">
<link rel="prev" href="cpp_regex_traits.html" title="Struct template cpp_regex_traits">
<link rel="next" href="null_regex_traits.html" title="Struct template null_regex_traits">

Home
Libraries
People
FAQ
More

Struct template c_regex_traits

boost::xpressive::c_regex_traits — Encapsaulates the standard C locale functions for use by the basic_regex<> class template.

Synopsis

// In header: <boost/xpressive/xpressive_fwd.hpp>

template<typename Char>
struct c_regex_traits {
  // construct/copy/destruct
  c_regex_traits(locale_type const & = locale_type());

  // public member functions
  bool operator==(c_regex_traits< char_type > const &) const;
  bool operator!=(c_regex_traits< char_type > const &) const;
  string_type fold_case(char_type) const;
  locale_type imbue(locale_type);
  template<> char widen(char);
  template<> wchar_t widen(char);
  template<> unsigned char hash(char);
  template<> unsigned char hash(wchar_t);
  template<> int value(char, int);
  template<> int value(wchar_t, int);

  // public static functions
  static char_type widen(char);
  static unsigned char hash(char_type);
  static char_type translate(char_type);
  static char_type translate_nocase(char_type);
  static char_type tolower(char_type);
  static char_type toupper(char_type);
  static bool in_range(char_type, char_type, char_type);
  static bool in_range_nocase(char_type, char_type, char_type);
  template<typename FwdIter> static string_type transform(FwdIter, FwdIter);
  template<typename FwdIter>
    static string_type transform_primary(FwdIter, FwdIter);
  template<typename FwdIter>
    static string_type lookup_collatename(FwdIter, FwdIter);
  template<typename FwdIter>
    static char_class_type lookup_classname(FwdIter, FwdIter, bool);
  static bool isctype(char_type, char_class_type);
  static int value(char_type, int);
  static locale_type getloc();
};

Description

c_regex_traits
        public
       construct/copy/destruct

c_regex_traits(locale_type const & loc = locale_type());

Initialize a c_regex_traits object to use the global C locale.

c_regex_traits public member functions

bool operator==(c_regex_traits< char_type > const &) const;

Checks two c_regex_traits objects for equality

<colgroup>
<col align="left" valign="top">
<col>
</colgroup>

Returns:

true.

bool operator!=(c_regex_traits< char_type > const &) const;

Checks two c_regex_traits objects for inequality

<colgroup>
<col align="left" valign="top">
<col>
</colgroup>

Returns:

false.

string_type fold_case(char_type ch) const;

Returns a string_type containing all the characters that compare equal disregrarding case to the one passed in. This function can only be called if has_fold_case<c_regex_traits<Char> >::value is true.

<colgroup>
<col align="left" valign="top">
<col>
</colgroup>

Parameters:

<colgroup>
<col align="left" valign="top">
<col>
</colgroup>

ch

The source character.

Returns:

string_type containing all chars which are equal to ch when disregarding case

locale_type imbue(locale_type loc);

No-op

template<> char widen(char ch);

template<> wchar_t widen(char ch);

template<> unsigned char hash(char ch);

template<> unsigned char hash(wchar_t ch);

template<> int value(char ch, int radix);

template<> int value(wchar_t ch, int radix);

c_regex_traits public static functions

static char_type widen(char ch);

Convert a char to a Char

<colgroup>
<col align="left" valign="top">
<col>
</colgroup>

Parameters:

<colgroup>
<col align="left" valign="top">
<col>
</colgroup>

ch

The source character.

Returns:

ch if Char is char, std::btowc(ch) if Char is wchar_t.

static unsigned char hash(char_type ch);

Returns a hash value for a Char in the range [0, UCHAR_MAX]

<colgroup>
<col align="left" valign="top">
<col>
</colgroup>

Parameters:

<colgroup>
<col align="left" valign="top">
<col>
</colgroup>

ch

The source character.

Returns:

a value between 0 and UCHAR_MAX, inclusive.

static char_type translate(char_type ch);

No-op

<colgroup>
<col align="left" valign="top">
<col>
</colgroup>

Parameters:

<colgroup>
<col align="left" valign="top">
<col>
</colgroup>

ch

The source character.

Returns:

ch

static char_type translate_nocase(char_type ch);

Converts a character to lower-case using the current global C locale.

<colgroup>
<col align="left" valign="top">
<col>
</colgroup>

Parameters:

<colgroup>
<col align="left" valign="top">
<col>
</colgroup>

ch

The source character.

Returns:

std::tolower(ch) if Char is char, std::towlower(ch) if Char is wchar_t.

static char_type tolower(char_type ch);

Converts a character to lower-case using the current global C locale.

<colgroup>
<col align="left" valign="top">
<col>
</colgroup>

Parameters:

<colgroup>
<col align="left" valign="top">
<col>
</colgroup>

ch

The source character.

Returns:

std::tolower(ch) if Char is char, std::towlower(ch) if Char is wchar_t.

static char_type toupper(char_type ch);

Converts a character to upper-case using the current global C locale.

<colgroup>
<col align="left" valign="top">
<col>
</colgroup>

Parameters:

<colgroup>
<col align="left" valign="top">
<col>
</colgroup>

ch

The source character.

Returns:

std::toupper(ch) if Char is char, std::towupper(ch) if Char is wchar_t.

static bool in_range(char_type first, char_type last, char_type ch);

Checks to see if a character is within a character range.

<colgroup>
<col align="left" valign="top">
<col>
</colgroup>

Parameters:

<colgroup>
<col align="left" valign="top">
<col>
</colgroup>

ch

The source character.

first

The bottom of the range, inclusive.

last

The top of the range, inclusive.

Returns:

first <= ch && ch <= last.

static bool in_range_nocase(char_type first, char_type last, char_type ch);

Checks to see if a character is within a character range, irregardless of case.

Note

The default implementation doesn't do proper Unicode case folding, but this is the best we can do with the standard C locale functions.

<colgroup>
<col align="left" valign="top">
<col>
</colgroup>

Parameters:

<colgroup>
<col align="left" valign="top">
<col>
</colgroup>

ch

The source character.

first

The bottom of the range, inclusive.

last

The top of the range, inclusive.

Returns:

in_range(first, last, ch) || in_range(first, last, tolower(ch)) || in_range(first, last, toupper(ch))

template<typename FwdIter>
  static string_type transform(FwdIter begin, FwdIter end);

Returns a sort key for the character sequence designated by the iterator range [F1, F2) such that if the character sequence [G1, G2) sorts before the character sequence [H1, H2) then v.transform(G1, G2) < v.transform(H1, H2).

Note

Not currently used

template<typename FwdIter>
  static string_type transform_primary(FwdIter begin, FwdIter end);

Returns a sort key for the character sequence designated by the iterator range [F1, F2) such that if the character sequence [G1, G2) sorts before the character sequence [H1, H2) when character case is not considered then v.transform_primary(G1, G2) < v.transform_primary(H1, H2).

Note

Not currently used

template<typename FwdIter>
  static string_type lookup_collatename(FwdIter begin, FwdIter end);

Returns a sequence of characters that represents the collating element consisting of the character sequence designated by the iterator range [F1, F2). Returns an empty string if the character sequence is not a valid collating element.

Note

Not currently used

template<typename FwdIter>
  static char_class_type
  lookup_classname(FwdIter begin, FwdIter end, bool icase);

For the character class name represented by the specified character sequence, return the corresponding bitmask representation.

<colgroup>
<col align="left" valign="top">
<col>
</colgroup>

Parameters:

<colgroup>
<col align="left" valign="top">
<col>
</colgroup>

begin

A forward iterator to the start of the character sequence representing the name of the character class.

end

The end of the character sequence.

icase

Specifies whether the returned bitmask should represent the case-insensitive version of the character class.

Returns:

A bitmask representing the character class.

static bool isctype(char_type ch, char_class_type mask);

Tests a character against a character class bitmask.

<colgroup>
<col align="left" valign="top">
<col>
</colgroup>

Parameters:

<colgroup>
<col align="left" valign="top">
<col>
</colgroup>

ch

The character to test.

mask

The character class bitmask against which to test.

Requires:

mask is a bitmask returned by lookup_classname, or is several such masks bit-or'ed together.

Returns:

true if the character is a member of any of the specified character classes, false otherwise.

static int value(char_type ch, int radix);

Convert a digit character into the integer it represents.

<colgroup>
<col align="left" valign="top">
<col>
</colgroup>

Parameters:

<colgroup>
<col align="left" valign="top">
<col>
</colgroup>

ch

The digit character.

radix

The radix to use for the conversion.

Requires:

radix is one of 8, 10, or 16.

Returns:

-1 if ch is not a digit character, the integer value of the character otherwise. If char_type is char, std::strtol is used for the conversion. If char_type is wchar_t, std::wcstol is used.

static locale_type getloc();

No-op

Copyright © 2007 Eric Niebler

        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)


text:
using System;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
using Grpc.Core;
using Grpc.Core.Internal;
using Grpc.Core.Utils;
using NUnit.Framework;

namespace Grpc.Core.Tests
{
    public class ClientServerTest
    {
        const string Host = "localhost";
        const string ServiceName = "/tests.Test";

        static readonly Method<string, string> EchoMethod = new Method<string, string>(
            MethodType.Unary,
            "/tests.Test/Echo",
            Marshallers.StringMarshaller,
            Marshallers.StringMarshaller);

        static readonly Method<string, string> ConcatAndEchoMethod = new Method<string, string>(
            MethodType.ClientStreaming,
            "/tests.Test/ConcatAndEcho",
            Marshallers.StringMarshaller,
            Marshallers.StringMarshaller);

        static readonly Method<string, string> NonexistentMethod = new Method<string, string>(
            MethodType.Unary,
            "/tests.Test/NonexistentMethod",
            Marshallers.StringMarshaller,
            Marshallers.StringMarshaller);

        static readonly ServerServiceDefinition ServiceDefinition = ServerServiceDefinition.CreateBuilder(ServiceName)
            .AddMethod(EchoMethod, EchoHandler)
            .AddMethod(ConcatAndEchoMethod, ConcatAndEchoHandler)
            .Build();

        Server server;
        Channel channel;

        [TestFixtureSetUp]
        public void InitClass()
        {
            GrpcEnvironment.Initialize();
        }

        [SetUp]
        public void Init()
        {
            server = new Server();
            server.AddServiceDefinition(ServiceDefinition);
            int port = server.AddListeningPort(Host, Server.PickUnusedPort);
            server.Start();
            channel = new Channel(Host, port);
        }

        [TearDown]
        public void Cleanup()
        {
            channel.Dispose();
            server.ShutdownAsync().Wait();
        }

        [TestFixtureTearDown]
        public void CleanupClass()
        {
            GrpcEnvironment.Shutdown();
        }

        [Test]
        public void UnaryCall()
        {
            var call = new Call<string, string>(ServiceName, EchoMethod, channel, Metadata.Empty);
            Assert.AreEqual("ABC", Calls.BlockingUnaryCall(call, "ABC", CancellationToken.None));
        }

        [Test]
        public void UnaryCall_ServerHandlerThrows()
        {
            var call = new Call<string, string>(ServiceName, EchoMethod, channel, Metadata.Empty);
            try
            {
                Calls.BlockingUnaryCall(call, "THROW", CancellationToken.None);
                Assert.Fail();
            }
            catch (RpcException e)
            {
                Assert.AreEqual(StatusCode.Unknown, e.Status.StatusCode);
            }
        }

        [Test]
        public void AsyncUnaryCall()
        {
            var call = new Call<string, string>(ServiceName, EchoMethod, channel, Metadata.Empty);
            var result = Calls.AsyncUnaryCall(call, "ABC", CancellationToken.None).Result;
            Assert.AreEqual("ABC", result);
        }

        [Test]
        public void AsyncUnaryCall_ServerHandlerThrows()
        {
            Task.Run(async () =>
            {
                var call = new Call<string, string>(ServiceName, EchoMethod, channel, Metadata.Empty);
                try
                {
                    await Calls.AsyncUnaryCall(call, "THROW", CancellationToken.None);
                    Assert.Fail();
                }
                catch (RpcException e)
                {
                    Assert.AreEqual(StatusCode.Unknown, e.Status.StatusCode);
                }
            }).Wait();
        }

        [Test]
        public void ClientStreamingCall()
        {
            Task.Run(async () =>
            {
                var call = new Call<string, string>(ServiceName, ConcatAndEchoMethod, channel, Metadata.Empty);
                var callResult = Calls.AsyncClientStreamingCall(call, CancellationToken.None);

                await callResult.RequestStream.WriteAll(new string[] { "A", "B", "C" });
                Assert.AreEqual("ABC", await callResult.Result);
            }).Wait();
        }

        [Test]
        public void ClientStreamingCall_CancelAfterBegin()
        {
            Task.Run(async () =>
            {
                var call = new Call<string, string>(ServiceName, ConcatAndEchoMethod, channel, Metadata.Empty);

                var cts = new CancellationTokenSource();
                var callResult = Calls.AsyncClientStreamingCall(call, cts.Token);

                // TODO(jtattermusch): we need this to ensure call has been initiated once we cancel it.
                await Task.Delay(1000);
                cts.Cancel();

                try
                {
                    await callResult.Result;
                }
                catch (RpcException e)
                {
                    Assert.AreEqual(StatusCode.Cancelled, e.Status.StatusCode);
                }
            }).Wait();
        }

        [Test]
        public void UnaryCall_DisposedChannel()
        {
            channel.Dispose();

            var call = new Call<string, string>(ServiceName, EchoMethod, channel, Metadata.Empty);
            Assert.Throws(typeof(ObjectDisposedException), () => Calls.BlockingUnaryCall(call, "ABC", CancellationToken.None));
        }

        [Test]
        public void UnaryCallPerformance()
        {
            var call = new Call<string, string>(ServiceName, EchoMethod, channel, Metadata.Empty);
            BenchmarkUtil.RunBenchmark(100, 100,
                                       () => { Calls.BlockingUnaryCall(call, "ABC", default(CancellationToken)); });
        }

        [Test]
        public void UnknownMethodHandler()
        {
            var call = new Call<string, string>(ServiceName, NonexistentMethod, channel, Metadata.Empty);
            try
            {
                Calls.BlockingUnaryCall(call, "ABC", default(CancellationToken));
                Assert.Fail();
            }
            catch (RpcException e)
            {
                Assert.AreEqual(StatusCode.Unimplemented, e.Status.StatusCode);
            }
        }

        private static async Task<string> EchoHandler(ServerCallContext context, string request)
        {
            if (request == "THROW")
            {
                throw new Exception("This was thrown on purpose by a test");
            }
            return request;
        }

        private static async Task<string> ConcatAndEchoHandler(ServerCallContext context, IAsyncStreamReader<string> requestStream)
        {
            string result = "";
            await requestStream.ForEach(async (request) =>
            {
                if (request == "THROW")
                {
                    throw new Exception("This was thrown on purpose by a test");
                }
                result += request;
            });
            // simulate processing takes some time.
            await Task.Delay(250);
            return result;
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ChangeListManager">
    <list default="true" id="f2d45c82-3b69-4bf8-9eb4-252420ccdf4d" name="Default" comment="">
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Gemfile.lock" afterPath="$PROJECT_DIR$/Gemfile.lock" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/jar_wrapper.gemspec" afterPath="$PROJECT_DIR$/jar_wrapper.gemspec" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/jar_wrapper.iml" afterPath="$PROJECT_DIR$/.idea/jar_wrapper.iml" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
    </list>
    <ignored path="jar_wrapper.iws" />
    <ignored path=".idea/workspace.xml" />
    <option name="TRACKING_ENABLED" value="true" />
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
    <option name="LAST_RESOLUTION" value="IGNORE" />
  </component>
  <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
  <component name="CoverageDataManager">
    <SUITE FILE_PATH="coverage/jar_wrapper@JarWrapper__Runner_build__jar_wrapper.coverage" NAME="JarWrapper::Runner#build: jar_wrapper Coverage Results" MODIFIED="1385224490937" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="jar_wrapper" />
    <SUITE FILE_PATH="coverage/jar_wrapper@JarWrapper__Runner_build_should_execute_java_jar_file__jar_wrapper.coverage" NAME="JarWrapper::Runner#build should execute java jar file: jar_wrapper Coverage Results" MODIFIED="1385223504816" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="jar_wrapper" />
    <SUITE FILE_PATH="coverage/jar_wrapper@Run_spec__jar_wrapper_spec___jar_wrapper.coverage" NAME="Run spec 'jar_wrapper_spec': jar_wrapper Coverage Results" MODIFIED="1384649370217" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="jar_wrapper" />
  </component>
  <component name="CreatePatchCommitExecutor">
    <option name="PATCH_PATH" value="" />
  </component>
  <component name="DaemonCodeAnalyzer">
    <disable_hints />
  </component>
  <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
  <component name="FavoritesManager">
    <favorites_list name="jar_wrapper" />
  </component>
  <component name="FileEditorManager">
    <leaf>
      <file leaf-file-name="jar_wrapper.gemspec" pinned="false" current="true" current-in-tab="true">
        <entry file="file://$PROJECT_DIR$/jar_wrapper.gemspec">
          <provider selected="true" editor-type-id="text-editor">
            <state line="19" column="52" selection-start="713" selection-end="713" vertical-scroll-proportion="0.47658864" vertical-offset="0" max-vertical-offset="598">
              <folding />
            </state>
          </provider>
        </entry>
      </file>
    </leaf>
  </component>
  <component name="FindManager">
    <FindUsagesManager>
      <setting name="OPEN_NEW_TAB" value="false" />
    </FindUsagesManager>
  </component>
  <component name="Git.Settings">
    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
  </component>
  <component name="GitLogSettings">
    <option name="myDateState">
      <MyDateState />
    </option>
  </component>
  <component name="IdeDocumentHistory">
    <option name="changedFiles">
      <list>
        <option value="$PROJECT_DIR$/lib/jar_wrapper/jar_wrapper.rb" />
        <option value="$PROJECT_DIR$/jar_wrapper.gemspec" />
        <option value="$PROJECT_DIR$/.ruby-gemset" />
        <option value="$PROJECT_DIR$/lib/jar_wrapper/version.rb" />
        <option value="$PROJECT_DIR$/spec/spec_helper.rb" />
        <option value="$PROJECT_DIR$/spec/jar_wrapper_spec.rb" />
        <option value="$PROJECT_DIR$/.ruby-version" />
        <option value="$PROJECT_DIR$/spec/runner_spec.rb" />
        <option value="$PROJECT_DIR$/Gemfile" />
        <option value="$PROJECT_DIR$/lib/jar_wrapper.rb" />
        <option value="$PROJECT_DIR$/lib/jar_wrapper/runner.rb" />
        <option value="$PROJECT_DIR$/jar_wrapper.gemspec.erb" />
        <option value="$PROJECT_DIR$/README.md" />
        <option value="$PROJECT_DIR$/CHANGES" />
        <option value="$PROJECT_DIR$/Rakefile" />
      </list>
    </option>
  </component>
  <component name="ProjectFrameBounds">
    <option name="x" value="44" />
    <option name="y" value="22" />
    <option name="width" value="1636" />
    <option name="height" value="1028" />
  </component>
  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
    <OptionsSetting value="true" id="Add" />
    <OptionsSetting value="true" id="Remove" />
    <OptionsSetting value="true" id="Checkout" />
    <OptionsSetting value="true" id="Update" />
    <OptionsSetting value="true" id="Status" />
    <OptionsSetting value="true" id="Edit" />
    <ConfirmationsSetting value="0" id="Add" />
    <ConfirmationsSetting value="0" id="Remove" />
  </component>
  <component name="ProjectReloadState">
    <option name="STATE" value="0" />
  </component>
  <component name="ProjectView">
    <navigator currentView="ProjectPane" proportions="" version="1" splitterProportion="0.5">
      <flattenPackages />
      <showMembers />
      <showModules />
      <showLibraryContents />
      <hideEmptyPackages />
      <abbreviatePackageNames />
      <autoscrollToSource />
      <autoscrollFromSource />
      <sortByType />
    </navigator>
    <panes>
      <pane id="ProjectPane">
        <subPane>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="jar_wrapper" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="jar_wrapper" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="jar_wrapper" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="jar_wrapper" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="jar_wrapper" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="spec" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="jar_wrapper" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="jar_wrapper" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="lib" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="jar_wrapper" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="jar_wrapper" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="lib" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="jar_wrapper" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
        </subPane>
      </pane>
      <pane id="Scope" />
    </panes>
  </component>
  <component name="PropertiesComponent">
    <property name="options.splitter.main.proportions" value="0.3" />
    <property name="WebServerToolWindowFactoryState" value="false" />
    <property name="options.lastSelected" value="org.jetbrains.plugins.ruby.settings.RubyActiveModuleSdkConfigurable" />
    <property name="options.searchVisible" value="true" />
    <property name="options.splitter.details.proportions" value="0.2" />
    <property name="recentsLimit" value="5" />
    <property name="FullScreen" value="false" />
    <property name="last_opened_file_path" value="$PROJECT_DIR$/../web_app_builder" />
  </component>
  <component name="RunManager" selected="RSpec.JarWrapper::Runner#build: jar_wrapper">
    <configuration default="false" name="Run spec 'jar_wrapper_spec': jar_wrapper" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
      <predefined_log_file id="RUBY_RSPEC" enabled="true" />
      <module name="jar_wrapper" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
      <envs>
        <env name="JRUBY_OPTS" value="-X+O" />
      </envs>
      <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
      <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
      <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
        <COVERAGE_PATTERN ENABLED="true">
          <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
        </COVERAGE_PATTERN>
      </EXTENSION>
      <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/runner_spec.rb" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
      <RunnerSettings RunnerId="RubyRunner" />
      <ConfigurationWrapper RunnerId="RubyRunner" />
      <method />
    </configuration>
    <configuration default="false" name="JarWrapper::Runner#build: jar_wrapper" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
      <predefined_log_file id="RUBY_RSPEC" enabled="true" />
      <module name="jar_wrapper" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
      <envs>
        <env name="JRUBY_OPTS" value="-X+O" />
      </envs>
      <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
      <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
      <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
        <COVERAGE_PATTERN ENABLED="true">
          <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
        </COVERAGE_PATTERN>
      </EXTENSION>
      <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/runner_spec.rb" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="JarWrapper::Runner#build" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
      <RunnerSettings RunnerId="RubyRunner" />
      <ConfigurationWrapper RunnerId="RubyRunner" />
      <method />
    </configuration>
    <configuration default="false" name="JarWrapper::Runner#build should execute java jar file: jar_wrapper" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
      <predefined_log_file id="RUBY_RSPEC" enabled="true" />
      <module name="jar_wrapper" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
      <envs>
        <env name="JRUBY_OPTS" value="-X+O" />
      </envs>
      <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
      <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
      <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
        <COVERAGE_PATTERN ENABLED="true">
          <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
        </COVERAGE_PATTERN>
      </EXTENSION>
      <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/runner_spec.rb" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="JarWrapper::Runner#build should execute java jar file" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
      <RunnerSettings RunnerId="RubyDebugRunner" />
      <RunnerSettings RunnerId="RubyRunner" />
      <ConfigurationWrapper RunnerId="RubyDebugRunner" />
      <ConfigurationWrapper RunnerId="RubyRunner" />
      <method />
    </configuration>
    <configuration default="false" name="JarWrapper::Runner: jar_wrapper" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
      <predefined_log_file id="RUBY_RSPEC" enabled="true" />
      <module name="jar_wrapper" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
      <envs>
        <env name="JRUBY_OPTS" value="-X+O" />
      </envs>
      <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
      <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
      <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
        <COVERAGE_PATTERN ENABLED="true">
          <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
        </COVERAGE_PATTERN>
      </EXTENSION>
      <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/runner_spec.rb" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="JarWrapper::Runner" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
      <RunnerSettings RunnerId="RubyCover" />
      <ConfigurationWrapper RunnerId="RubyCover" />
      <method />
    </configuration>
    <configuration default="true" type="JavaScriptTestRunnerKarma" factoryName="Karma" singleton="true" config-file="">
      <envs />
      <method />
    </configuration>
    <configuration default="true" type="RSpecRunConfigurationType" factoryName="RSpec">
      <predefined_log_file id="RUBY_RSPEC" enabled="true" />
      <module name="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
      <envs />
      <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
      <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
      <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
        <COVERAGE_PATTERN ENABLED="true">
          <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
        </COVERAGE_PATTERN>
      </EXTENSION>
      <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
      <method />
    </configuration>
    <configuration default="true" type="RubyRunConfigurationType" factoryName="Ruby">
      <module name="" />
      <RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
      <RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="" />
      <RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
      <RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
      <RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
      <envs />
      <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
      <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
      <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
        <COVERAGE_PATTERN ENABLED="true">
          <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
        </COVERAGE_PATTERN>
      </EXTENSION>
      <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
      <RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="" />
      <RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
      <method />
    </configuration>
    <configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug" singleton="true">
      <method />
    </configuration>
    <configuration default="true" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest">
      <predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
      <module name="" />
      <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
      <RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
      <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
      <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
      <RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
      <envs />
      <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
      <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
      <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
        <COVERAGE_PATTERN ENABLED="true">
          <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
        </COVERAGE_PATTERN>
      </EXTENSION>
      <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
      <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
      <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
      <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
      <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
      <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
      <RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
      <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
      <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
      <method />
    </configuration>
    <list size="4">
      <item index="0" class="java.lang.String" itemvalue="RSpec.Run spec 'jar_wrapper_spec': jar_wrapper" />
      <item index="1" class="java.lang.String" itemvalue="RSpec.JarWrapper::Runner#build: jar_wrapper" />
      <item index="2" class="java.lang.String" itemvalue="RSpec.JarWrapper::Runner#build should execute java jar file: jar_wrapper" />
      <item index="3" class="java.lang.String" itemvalue="RSpec.JarWrapper::Runner: jar_wrapper" />
    </list>
    <recent_temporary>
      <list size="4">
        <item index="0" class="java.lang.String" itemvalue="RSpec.JarWrapper::Runner#build: jar_wrapper" />
        <item index="1" class="java.lang.String" itemvalue="RSpec.JarWrapper::Runner: jar_wrapper" />
        <item index="2" class="java.lang.String" itemvalue="RSpec.JarWrapper::Runner#build should execute java jar file: jar_wrapper" />
        <item index="3" class="java.lang.String" itemvalue="RSpec.Run spec 'jar_wrapper_spec': jar_wrapper" />
      </list>
    </recent_temporary>
  </component>
  <component name="ShelveChangesManager" show_recycled="false" />
  <component name="TaskManager">
    <task active="true" id="Default" summary="Default task">
      <changelist id="f2d45c82-3b69-4bf8-9eb4-252420ccdf4d" name="Default" comment="" />
      <created>1360707349325</created>
      <updated>1360707349325</updated>
    </task>
    <task id="LOCAL-00001" summary="Bug fixes, adding specs">
      <created>1385224668727</created>
      <updated>1385224668727</updated>
    </task>
    <option name="localTasksCounter" value="2" />
    <servers />
  </component>
  <component name="ToolWindowManager">
    <frame x="44" y="22" width="1636" height="1028" extended-state="0" />
    <editor active="false" />
    <layout>
      <window_info id="Dilbert" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3290461" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Changes" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.3290461" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3290461" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Heroku" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39978564" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3290461" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3290461" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.26981133" sideWeight="0.67042255" order="0" side_tool="false" content_ui="combo" />
      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3290461" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
    </layout>
  </component>
  <component name="Vcs.Log.UiProperties">
    <option name="RECENTLY_FILTERED_USERS">
      <collection />
    </option>
  </component>
  <component name="VcsContentAnnotationSettings">
    <option name="myLimit" value="2678400000" />
  </component>
  <component name="VcsManagerConfiguration">
    <option name="myTodoPanelSettings">
      <TodoPanelSettings />
    </option>
    <MESSAGE value="Bug fixes, adding specs" />
    <option name="LAST_COMMIT_MESSAGE" value="Bug fixes, adding specs" />
  </component>
  <component name="XDebuggerManager">
    <breakpoint-manager>
      <option name="time" value="1" />
    </breakpoint-manager>
  </component>
  <component name="editorHistoryManager">
    <entry file="file://$PROJECT_DIR$/spec/runner_spec.rb">
      <provider selected="true" editor-type-id="text-editor">
        <state line="22" column="20" selection-start="616" selection-end="616" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="630">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/lib/jar_wrapper/runner.rb">
      <provider selected="true" editor-type-id="text-editor">
        <state line="5" column="0" selection-start="204" selection-end="221" vertical-scroll-proportion="0.0" vertical-offset="75" max-vertical-offset="2520">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/.ruby-gemset">
      <provider selected="true" editor-type-id="text-editor">
        <state line="0" column="11" selection-start="11" selection-end="11" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="90">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/.ruby-version">
      <provider selected="true" editor-type-id="text-editor">
        <state line="0" column="126" selection-start="10" selection-end="10" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="90">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/spec/runner_spec.rb">
      <provider selected="true" editor-type-id="text-editor">
        <state line="15" column="42" selection-start="451" selection-end="451" vertical-scroll-proportion="0.0" vertical-offset="225" max-vertical-offset="570">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/lib/jar_wrapper.rb">
      <provider selected="true" editor-type-id="text-editor">
        <state line="0" column="11" selection-start="11" selection-end="11" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="330">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/lib/jar_wrapper/runner.rb">
      <provider selected="true" editor-type-id="text-editor">
        <state line="113" column="11" selection-start="2751" selection-end="2751" vertical-scroll-proportion="0.0" vertical-offset="1695" max-vertical-offset="2520">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/README.md">
      <provider selected="true" editor-type-id="text-editor">
        <state line="11" column="0" selection-start="158" selection-end="547" vertical-scroll-proportion="0.0" vertical-offset="165" max-vertical-offset="555">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/spec/runner_spec.rb">
      <provider selected="true" editor-type-id="text-editor">
        <state line="7" column="30" selection-start="167" selection-end="167" vertical-scroll-proportion="0.0" vertical-offset="105" max-vertical-offset="420">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/lib/jar_wrapper/version.rb">
      <provider selected="true" editor-type-id="text-editor">
        <state line="0" column="3" selection-start="3" selection-end="3" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="120" />
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/jar_wrapper.gemspec.erb">
      <provider selected="true" editor-type-id="text-editor">
        <state line="14" column="30" selection-start="571" selection-end="571" vertical-scroll-proportion="0.0" vertical-offset="210" max-vertical-offset="375" />
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Rakefile">
      <provider selected="true" editor-type-id="text-editor">
        <state line="14" column="52" selection-start="363" selection-end="363" vertical-scroll-proportion="0.0" vertical-offset="210" max-vertical-offset="645">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/README.md">
      <provider selected="true" editor-type-id="text-editor">
        <state line="21" column="112" selection-start="412" selection-end="412" vertical-scroll-proportion="0.0" vertical-offset="315" max-vertical-offset="555">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/lib/jar_wrapper/runner.rb">
      <provider selected="true" editor-type-id="text-editor">
        <state line="113" column="11" selection-start="2751" selection-end="2751" vertical-scroll-proportion="0.0" vertical-offset="1695" max-vertical-offset="2520">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/.ruby-version">
      <provider selected="true" editor-type-id="text-editor">
        <state line="0" column="5" selection-start="5" selection-end="5" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="90" />
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/lib/jar_wrapper.rb">
      <provider selected="true" editor-type-id="text-editor">
        <state line="0" column="11" selection-start="11" selection-end="11" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="330">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/LICENSE">
      <provider selected="true" editor-type-id="text-editor">
        <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="0" />
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/spec/spec_helper.rb">
      <provider selected="true" editor-type-id="text-editor">
        <state line="2" column="0" selection-start="60" selection-end="60" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="120">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/.ruby-version">
      <provider selected="true" editor-type-id="text-editor">
        <state line="0" column="126" selection-start="10" selection-end="10" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="598">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/.ruby-gemset">
      <provider selected="true" editor-type-id="text-editor">
        <state line="0" column="11" selection-start="11" selection-end="11" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="90">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/spec/runner_spec.rb">
      <provider selected="true" editor-type-id="text-editor">
        <state line="3" column="16" selection-start="96" selection-end="96" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="660">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Gemfile">
      <provider selected="true" editor-type-id="text-editor">
        <state line="4" column="4" selection-start="55" selection-end="55" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="465">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/lib/jar_wrapper.rb">
      <provider selected="true" editor-type-id="text-editor">
        <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="105">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/lib/jar_wrapper/runner.rb">
      <provider selected="true" editor-type-id="text-editor">
        <state line="38" column="53" selection-start="1145" selection-end="1145" vertical-scroll-proportion="0.62983423" vertical-offset="0" max-vertical-offset="2670">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/lib/jar_wrapper/version.rb">
      <provider selected="true" editor-type-id="text-editor">
        <state line="0" column="3" selection-start="3" selection-end="3" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="120">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/jar_wrapper.gemspec.erb">
      <provider selected="true" editor-type-id="text-editor">
        <state line="19" column="29" selection-start="646" selection-end="646" vertical-scroll-proportion="0.323496" vertical-offset="0" max-vertical-offset="881">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/README.md">
      <provider selected="true" editor-type-id="text-editor">
        <state line="23" column="46" selection-start="461" selection-end="461" vertical-scroll-proportion="-12.777778" vertical-offset="0" max-vertical-offset="555">
          <folding />
        </state>
      </provider>
      <provider editor-type-id="MarkdownPreviewEditor">
        <state />
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/CHANGES">
      <provider selected="true" editor-type-id="text-editor">
        <state line="19" column="80" selection-start="201" selection-end="201" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="375">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Rakefile">
      <provider selected="true" editor-type-id="text-editor">
        <state line="37" column="64" selection-start="812" selection-end="812" vertical-scroll-proportion="0.6132597" vertical-offset="0" max-vertical-offset="905">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/jar_wrapper.gemspec">
      <provider selected="true" editor-type-id="text-editor">
        <state line="19" column="52" selection-start="713" selection-end="713" vertical-scroll-proportion="0.47658864" vertical-offset="0" max-vertical-offset="598">
          <folding />
        </state>
      </provider>
    </entry>
  </component>
</project>


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

/*********************/
  angular
    .module('portal.services')
    .factory('Agendas',Agendas)
    .factory('alert',alert);

function Agendas (BaseUrl,$http) {
    return {
    	getAgenda:getAgenda,
    	getDia:getDia,
    	getHoy:getHoy,
    	// getExperiencias:getExperiencias
  }

  function getAgenda(){

	 return $http({
	  method: 'GET',
	  url: BaseUrl+'/agendas',
	  headers: {'Content-Type': 'application/json; charset=utf-8'}
	 }).then(function(res){
	 	 return res.data.data;
	 });
  }
function getDia(dia){

   return $http({
    method: 'GET',
    url: BaseUrl+'/agendas/'+dia,
    headers: {'Content-Type': 'application/json; charset=utf-8'}
   }).then(function(res){
     return res.data;
   });
  }

  function getHoy(){

   return $http({
    method: 'GET',
    url: BaseUrl+'/agendasHoy',
    headers: {'Content-Type': 'application/json; charset=utf-8'}
   }).then(function(res){
     return res.data;
   });
  }

}

 function alert($uibModal) {

    function show(action, event) {
      return $uibModal.open({
        templateUrl: '../views/agenda-modal.tpl.html',
        controller: function() {
          var vm = this;
          vm.action = action;
          vm.event = event;
        },
        controllerAs: 'vm'
      });
    }

    return {
      show: show
    };

  }

})();


text:
//Project: Hotspotizer (https://github.com/mbaytas/hotspotizer, https://github.com/birbilis/hotspotizer)
//File: Models / IManager.cs
//Version: 20151208

using System.Collections.ObjectModel;

namespace Hotspotizer.Models
{
  public interface IManager
  {

    #region --- Properties ---

    ObservableCollection<Gesture> GestureCollection { get; set; }

    bool CanSaveGestureCollection { get; }
    bool CanAddNewGesture { get; }

    #endregion

    #region --- Methods ---

    Gesture AddNewGesture();
    void CreateNewGestureCollection();
    void LoadGestureCollection();
    void SaveGestureCollection();
    void EditGesture(Gesture g);
    void DeleteGesture(Gesture g);

    #endregion
  }
}


text:
namespace clang {
namespace format {

struct FormatToken;
class AnnotatedLine;

class AffectedRangeManager {
public:
  AffectedRangeManager(const SourceManager &SourceMgr,
                       const ArrayRef<CharSourceRange> Ranges)
      : SourceMgr(SourceMgr), Ranges(Ranges.begin(), Ranges.end()) {}

  // Determines which lines are affected by the SourceRanges given as input.
  // Returns \c true if at least one line between I and E or one of their
  // children is affected.
  bool computeAffectedLines(SmallVectorImpl<AnnotatedLine *>::iterator I,
                            SmallVectorImpl<AnnotatedLine *>::iterator E);

  // Returns true if 'Range' intersects with one of the input ranges.
  bool affectsCharSourceRange(const CharSourceRange &Range);

private:
  // Returns true if the range from 'First' to 'Last' intersects with one of the
  // input ranges.
  bool affectsTokenRange(const FormatToken &First, const FormatToken &Last,
                         bool IncludeLeadingNewlines);

  // Returns true if one of the input ranges intersect the leading empty lines
  // before 'Tok'.
  bool affectsLeadingEmptyLines(const FormatToken &Tok);

  // Marks all lines between I and E as well as all their children as affected.
  void markAllAsAffected(SmallVectorImpl<AnnotatedLine *>::iterator I,
                         SmallVectorImpl<AnnotatedLine *>::iterator E);

  // Determines whether 'Line' is affected by the SourceRanges given as input.
  // Returns \c true if line or one if its children is affected.
  bool nonPPLineAffected(AnnotatedLine *Line,
                         const AnnotatedLine *PreviousLine);

  const SourceManager &SourceMgr;
  const SmallVector<CharSourceRange, 8> Ranges;
};

} // namespace format
} // namespace clang

#endif // LLVM_CLANG_LIB_FORMAT_AFFECTEDRANGEMANAGER_H


text:
from model_mommy.recipe import Recipe

from cla_common.constants import DIAGNOSIS_SCOPE
from diagnosis.models import DiagnosisTraversal

diagnosis = Recipe(DiagnosisTraversal)

diagnosis_yes = Recipe(DiagnosisTraversal, state=DIAGNOSIS_SCOPE.INSCOPE)


text:
    package de.fastr.phonegap.plugins;

    import android.content.Context;
    import android.content.res.AssetManager;
    import android.util.Log;
    import android.webkit.WebView;
    import android.webkit.WebViewClient;

    import org.apache.cordova.CordovaInterface;
    import org.apache.cordova.CordovaPlugin;
    import org.apache.cordova.CallbackContext;

    import org.apache.cordova.CordovaWebView;
    import org.apache.cordova.CordovaWebViewEngine;
    import org.apache.cordova.engine.SystemWebView;
    import org.apache.cordova.engine.SystemWebViewClient;
    import org.apache.cordova.engine.SystemWebViewEngine;
    import org.json.JSONArray;
    import org.json.JSONException;
    import org.json.JSONObject;

    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;

    /**
     * This class echoes a string called from JavaScript.
     */
    public class Inject extends CordovaPlugin {
        @Override
        public void initialize(CordovaInterface cordova, CordovaWebView webView) {
            super.initialize(cordova, webView);
            Injecter.getInstance().setCordova(cordova);
        }

        @Override
        public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
            if (action.equals("javascriptFile")){
                String script = args.getString(0);
                Injecter.getInstance().injectJavascriptFile(script);
                return true;
            }else if (action.equals("javascriptString")){
                String script = args.getString(0);
                Injecter.getInstance().injectJavascriptString(script);
            }else if (action.equals("getCookies")){
                String domain = args.getString(0);
								JSONObject json = new JSONObject();
                String value = Injecter.getInstance().getCookies(domain);

								json.put("domain", domain);
								json.put("cookies", value);
								callbackContext.success(json);
            }else if (action.equals("getCookie")){
                String domain = args.getString(0);
                String name = args.getString(1);
								JSONObject json = new JSONObject();
                String value = Injecter.getInstance().getCookie(domain, name);

								json.put("domain", domain);
								json.put("name", name);
								json.put("value", value);
								callbackContext.success(json);
            }
            return false;
        }
    }


text:
.pfitempagestreetview{width: 100%;height: 400px;}
.pfitempagestreetview img,#pfitempagestreetviewMap img {max-width: none!important;}


text:
package scheduler

import ()

type Scheduler struct {
	EventChan chan interface{}
}

func NewScheduler() *Scheduler {
	return &Scheduler{
		EventChan: make(chan interface{}),
	}
}

func (s *Scheduler) Loop() {
	for {
		event := <-s.EventChan
		switch event := event.(type) {
		default:
		case SubmittedJob:
			event.ContextId += 1
		case int:
		case *bool:
		case *int:
		}
	}
}


text:
'use strict';
'require form';
'require network';
'require tools.widgets as widgets';

network.registerPatternVirtual(/^gre6-.+$/);

return network.registerProtocol('grev6', {
	getI18n: function() {
		return _('GRE tunnel over IPv6');
	},

	getIfname: function() {
		return this._ubus('l3_device') || 'gre6-%s'.format(this.sid);
	},

	getOpkgPackage: function() {
		return 'gre';
	},

	isFloating: function() {
		return true;
	},

	isVirtual: function() {
		return true;
	},

	getDevices: function() {
		return null;
	},

	containsDevice: function(ifname) {
		return (network.getIfnameOf(ifname) == this.getIfname());
	},

	renderFormOptions: function(s) {
		var o;

		// -- general ---------------------------------------------------------------------

		o = s.taboption('general', form.Value, 'peer6addr', _("Remote IPv6 address or FQDN"), _("The IPv6 address or the fully-qualified domain name of the remote tunnel end."));
		o.optional = false;
		o.datatype = 'or(hostname,ip6addr("nomask"))';

		o = s.taboption('general', form.Value, 'ip6addr', _("Local IPv6 address"), _("The local IPv6 address over which the tunnel is created (optional)."));
		o.optional = true;
		o.datatype = 'ip6addr("nomask")';
		o.load = function(section_id) {
			return network.getWAN6Networks().then(L.bind(function(nets) {
				if (Array.isArray(nets) && nets.length)
					this.placeholder = nets[0].getIP6Addr();
				return form.Value.prototype.load.apply(this, [section_id]);
			}, this));
		};

		o = s.taboption('general', widgets.NetworkSelect, 'weakif', _("Source interface"), _("Logical network from which to select the local endpoint if local IPv6 address is empty and no WAN IPv6 is available (optional)."));
		o.exclude = s.section;
		o.nocreate = true;
		o.optional = true;

		// -- advanced ---------------------------------------------------------------------

		o = s.taboption('advanced', widgets.NetworkSelect, 'tunlink', _("Bind interface"), _("Bind the tunnel to this interface (optional)."));
		o.exclude = s.section;
		o.nocreate = true;
		o.optional = true;

		o = s.taboption('advanced', form.Value, 'mtu', _("Override MTU"), _("Specify an MTU (Maximum Transmission Unit) other than the default (1280 bytes) (optional)."));
		o.optional = true;
		o.placeholder = 1280;
		o.datatype = 'range(68, 9200)';

		o = s.taboption('advanced', form.Value, 'ttl', _("Override TTL"), _("Specify a TTL (Time to Live) for the encapsulating packet other than the default (64) (optional)."));
		o.optional = true;
		o.placeholder = 64;
		o.datatype = 'min(1)';

		o = s.taboption('advanced', form.Value, 'tos', _("Traffic Class"), _("Specify a TOS (Type of Service). Can be inherit (the outer header inherits the value of the inner header) or an hexadecimal value 00..FF (optional)."));
		o.optional = true;
		o.validate = function(section_id, value) {
			if (value.length > 0 && !value.match(/^[a-f0-9]{1,2}$/i) && !value.match(/^inherit$/i))
				return _("Invalid Traffic Class value, expected 00..FF or inherit");

			return true;
		};

		o = s.taboption('advanced', form.Flag, 'nohostroute', _("No host route"), _("Do not create host route to peer (optional)."));
		o.optional = true;

		o = s.taboption('advanced', form.Flag, 'multicast', _("Multicast"), _("Enable support for multicast traffic (optional)."));
		o.optional = true;

		o = s.taboption('advanced', form.Value, 'ikey', _("Incoming key"), _("Key for incoming packets (optional)."));
		o.optional = true;
		o.datatype = 'integer';

		o = s.taboption('advanced', form.Value, 'okey', _("Outgoing key"), _("Key for outgoing packets (optional)."));
		o.optional = true;
		o.datatype = 'integer';

		s.taboption('advanced', form.Flag, 'icsum', _("Incoming checksum"), _("Require incoming checksum (optional)."));
		s.taboption('advanced', form.Flag, 'ocsum', _("Outgoing checksum"), _("Compute outgoing checksum (optional)."));
		s.taboption('advanced', form.Flag, 'iseqno', _("Incoming serialization"), _("Require incoming packets serialization (optional)."));
		s.taboption('advanced', form.Flag, 'oseqno', _("Outgoing serialization"), _("Perform outgoing packets serialization (optional)."));

	}
});


text:
import identifyCoin from './identifyCoin.js';

export default function calculateChangesSinceLastRun(persistedData, { globalData, coinsMarketData, totalsData }) {
  const { btc } = globalData;

  for (const coinInfo of persistedData.coins) {
    const coin = identifyCoin(coinsMarketData, coinInfo.identifier);
    if (coin) {
      coin.changeSinceLastRun = 100 * ((btc.price * coin.priceBTC) / (coinInfo.priceBTC * persistedData.priceBTC) - 1);
    }
  }

  // for (const coin of coinsMarketData) {
  //   console.log(coin);
  //   const persistedCoin = persistedData.coins.find(({ identifier }) => identifier == coin.symbol.toLowerCase());
  //   if (persistedCoin) {
  //     coin.changeSinceLastRun = 100 * ((btc.price * coin.priceBTC) / (persistedCoin.priceBTC * persistedData.priceBTC) - 1);
  //   }
  // }

  totalsData.valueChange = 100 * (totalsData.totalValue / persistedData.totals.totalValue - 1);
  totalsData.valueDiff = totalsData.totalValue - persistedData.totals.totalValue;

  totalsData.valueChangeETH = 100 * (totalsData.totalValueETH / persistedData.totals.totalValueETH - 1);
  totalsData.valueChangeBTC = 100 * (totalsData.totalValueBTC / persistedData.totals.totalValueBTC - 1);
}


text:
/// <reference path='../../ts/typings/tsd.d.ts' />
import Moment = require('moment');
import IEvent = require('../interfaces/IEvent');
import IEventSource = require('../interfaces/IEventSource');
import ICourse = require('../interfaces/ICourse');
import ISection = require('../interfaces/ISection');
import IColorPalette = require('../interfaces/IColorPalette');

class SectionEventSource implements IEventSource {

    public static DAYS = {
        'M' : 1,
        'T': 2,
        'W' : 3,
        'Th': 4,
        'F' : 5
    };

    public id: number;
    public course_id: number;
    public events: IEvent[];
    public textColor: string;
    public borderColor: string;
    public backgroundColor: string;
    public className: string;
    public section_type: string;
    public section_capacity: number;
    public section_enrollment: number;

    constructor(section: ISection, course: ICourse, colors: IColorPalette) {
        this.id = section.id;
        this.course_id = course.id;
        this.textColor = colors.dark;
        this.borderColor = colors.dark;
        this.backgroundColor = colors.light;
        this.section_type = section.section_type;
        this.section_capacity = section.section_capacity;
        this.section_enrollment = section.section_enrollment;

        // by default, a newly constructed section is previewed until enrolled"
        this.className = "cal-unconfirmed";

        // for tooltip display
        var tooltipEnrollment: string = this.section_enrollment + "/" + this.section_capacity;

        var inputTimeFormat = "hh:mm a";
        var outputTimeFormat = "HH:mm:ss";
        this.events = [];
        for (var j = 0; j < section.meetings.length; j++) {
            var meeting = section.meetings[j];
            var days = meeting.days.split(' ');
            var numDays = days[days.length - 1] ? days.length : days.length - 1;

            // ignore last element of the result of split, which is
            // empty string due to the format of the input
            for (var k = 0; k < numDays; k++) {
                var day = days[k];
                var date = this.getAgendaDate(day);
                var startTime = Moment(meeting.start_time, inputTimeFormat).format(outputTimeFormat);
                var endTime = Moment(meeting.end_time, inputTimeFormat).format(outputTimeFormat);
                var start = date + 'T' + startTime;
                var end = date + 'T' + endTime;
                this.events.push(<any> /* TODO(dxue): fix type */ {
                    title: course.primary_listing + " " + section.name,
                    start: start,
                    end: end,
                    location: meeting.location,
                    enrollment: tooltipEnrollment,
                });
            }
        }
    }

    /**
     * gets the date of the day in the current week
     */
    private getAgendaDate(day: string): string {
        var todayOffset = Moment().isoWeekday();
        var dayOffset = SectionEventSource.DAYS[day];
        var diff: number = +(dayOffset - todayOffset);
        var date = Moment().add(diff, 'days').format('YYYY-MM-DD');
        return date;
    }
}

export = SectionEventSource;


text:
In the [previous section](Middleware.md), we explored how Redux middleware can intercept, delay or transform actions before they reach the reducer. There are a variety of use cases for middleware; logging and crash reporting being great examples. However, the most common use case for middleware is expressing asynchronous API calls.

In the [basics guide](../basics/README.md), we built a simple todo application. It was fully synchronous. Every time an action was dispatched, the state was updated immediately.

In this guide, we will build a different, asynchronous application. It will use the Reddit API to show the current headlines for a select subreddit. How does asynchronicity fit into Redux flow?

## Actions

Even if you call an asynchronous API, you need to dispatch actions to change the stored data, and they will be processed by reducers synchronously. Usually, for any API request you'll want to dispatch at least three different kinds of actions:

* **An action informing the reducers that the request began.**

  The reducers may handle this action by toggling an `isFetching` flag in the state. This way the UI knows it's time to show a spinner.

* **An action informing the reducers that the request finished successfully.**

  The reducers may handle this action by merging the new data into the state they manage and resetting `isFetching`. The UI would hide the spinner, and display the fetched data.

* **An action informing the reducers that the request failed.**

  The reducers may handle this action by resetting `isFetching`. Maybe, some reducers will also want to store the error message so the UI can display it.

You may use a dedicated `status` field in your actions:

```js
{ type: 'FETCH_POSTS' }
{ type: 'FETCH_POSTS', status: 'error', error: 'Oops' }
{ type: 'FETCH_POSTS', status: 'success', response: { ... } }
```

Or you can define separate types for them:

```js
{ type: 'FETCH_POSTS_REQUEST' }
{ type: 'FETCH_POSTS_FAILURE', error: 'Oops' }
{ type: 'FETCH_POSTS_SUCCESS', response: { ... } }
```

Choosing whether to use a single action type with flags, or multiple action types, is up to you. It's a convention you need to decide with your team. Multiple types leave less room for a mistake, but this is not an issue if you generate action creators and reducers with a helper library like [redux-actions](https://github.com/acdlite/redux-actions).

Whatever convention you choose, stick with it throughout the application.
We'll use separate types in this tutorial.

## Synchronous Action Creators

Let's start by defining several synchronous action types and action creators for them. In our app, the user can select a reddit to display:

```js
export const SELECT_REDDIT = 'SELECT_REDDIT';

export function selectReddit(reddit) {
  return {
    type: SELECT_REDDIT,
    reddit
  };
}
```

They can also press a "refresh" button to update it:

```js
export const INVALIDATE_REDDIT = 'INVALIDATE_REDDIT';

export function invalidateReddit(reddit) {
  return {
    type: INVALIDATE_REDDIT,
    reddit
  };
}
```

These were the actions governed by the user interaction. We will also have another kind of action, governed by the network requests. We will see how to dispatch them later, but for now, we just want to define them.

When it's time to fetch the posts for some reddit, we will dispatch a `REQUEST_POSTS` action:

```js
export const REQUEST_POSTS = 'REQUEST_POSTS';

export function requestPosts(reddit) {
  return {
    type: REQUEST_POSTS,
    reddit
  };
}
```

It is important for it to be separate from `SELECT_REDDIT` or `INVALIDATE_REDDIT`. While they may occur one after another, as the app grows more complex, you might want to fetch some data independently of the user action (for example, to prefetch the most popular reddits, or to refresh stale data once in a while). You may also want to fetch in response to a route change, so it's not wise to couple fetching to some particular UI event early on.

Finally, when the network request comes through, we will dispatch `RECEIVE_POSTS`:

```js
export const RECEIVE_POSTS = 'RECEIVE_POSTS';

export function receivePosts(reddit, json) {
  return {
    type: RECEIVE_POSTS,
    reddit,
    posts: json.data.children.map(child => child.data),
    receivedAt: Date.now()
  };
}
```

This is all we need to know for now. The particular mechanism to dispatch these actions together with network requests will be discussed later.

>##### Note on Error Handling

>In a real app, you'd also want to dispatch an action on request failure. We won't implement error handling in this tutorial, but the [real world example](../introduction/Examples.html#real-world) shows one of the possible approaches.

## Designing the State Shape

Just like in the basic tutorial, you'll need to [design the shape of your application's state](../basics/Reducers.md#designing-the-state-shape) before rushing into the implementation. With asynchronous code, there is more state to take care of, so we need to think it through.

This part is often confusing to beginners, because it is not immediately clear what information describes the state of an asynchronous application, and how to organize it in a single tree.

We'll start with the most common use case: lists. Web applications often show lists of things. For example, a list of posts, or a list of friends. You'll need to figure out what sorts of lists your app can show. You want to store them separately in the state, because this way you can cache them and only fetch again if necessary.

Here's what the state shape for our "Reddit headlines" app might look like:

```js
{
  selectedReddit: 'frontend',
  postsByReddit: {
    frontend: {
      isFetching: true,
      didInvalidate: false,
      items: []
    },
    reactjs: {
      isFetching: false,
      didInvalidate: false,
      lastUpdated: 1439478405547,
      items: [{
        id: 42,
        title: 'Confusion about Flux and Relay'
      }, {
        id: 500,
        title: 'Creating a Simple Application Using React JS and Flux Architecture'
      }]
    }
  }
}
```

There are a few important bits here:

* We store each subreddit's information separately so we can cache every subreddit. When the user switches between them the second time, the update will be instant, and we won't need to refetch unless we want to. Don't worry about all these items being in memory: unless you're dealing with tens of thousands of items, and your user rarely closes the tab, you won't need any sort of cleanup.

* For every list of items, you'll want to store `isFetching` to show a spinner, `didInvalidate` so you can later toggle it when the data is stale, `lastUpdated` so you know when it was fetched the last time, and the `items` themselves. In a real app, you'll also want to store pagination state like `fetchedPageCount` and `nextPageUrl`.

>##### Note on Nested Entities

>In this example, we store the received items together with the pagination information. However, this approach won't work well if you have nested entities referencing each other, or if you let the user edit items. Imagine the user wants to edit a fetched post, but this post is duplicated in several places in the state tree. This would be really painful to implement.

>If you have nested entities, or if you let users edit received entities, you should keep them separately in the state as if it was a database. In pagination information, you would only refer to them by their IDs. This lets you always keep them up to date. The [real world example](../introduction/Examples.html#real-world) shows this approach, together with [normalizr](https://github.com/gaearon/normalizr) to normalize the nested API responses. With this approach, your state might look like this:

>```js
> {
>   selectedReddit: 'frontend',
>   entities: {
>     users: {
>       2: {
>         id: 2,
>         name: 'Andrew'
>       }
>     },
>     posts: {
>       42: {
>         id: 42,
>         title: 'Confusion about Flux and Relay',
>         author: 2
>       },
>       100: {
>         id: 100,
>         title: 'Creating a Simple Application Using React JS and Flux Architecture',
>         author: 2
>       }
>     }
>   },
>   postsByReddit: {
>     frontend: {
>       isFetching: true,
>       didInvalidate: false,
>       items: []
>     },
>     reactjs: {
>       isFetching: false,
>       didInvalidate: false,
>       lastUpdated: 1439478405547,
>       items: [42, 100]
>     }
>   }
> }
>```

>In this guide, we won't normalize entities, but it's something you should consider for a more dynamic application.

## Handling Actions

Before going into the details of dispatching actions together with network requests, we will write the reducers for the actions we defined above.

>##### Note on Reducer Composition

> Here, we assume that you understand reducer composition with [`combineReducers()`](../api/combineReducers.md), as described in the [Splitting Reducers](../basics/Reducers.md#splitting-reducers) section on the [basics guide](../basics/README.md). If you don't, please [read it first](../basics/Reducers.md#splitting-reducers).

#### `reducers.js`

```js
import { combineReducers } from 'redux';
import {
  SELECT_REDDIT, INVALIDATE_REDDIT,
  REQUEST_POSTS, RECEIVE_POSTS
} from '../actions';

function selectedReddit(state = 'reactjs', action) {
  switch (action.type) {
  case SELECT_REDDIT:
    return action.reddit;
  default:
    return state;
  }
}

function posts(state = {
  isFetching: false,
  didInvalidate: false,
  items: []
}, action) {
  switch (action.type) {
  case INVALIDATE_REDDIT:
    return Object.assign({}, state, {
      didInvalidate: true
    });
  case REQUEST_POSTS:
    return Object.assign({}, state, {
      isFetching: true,
      didInvalidate: false
    });
  case RECEIVE_POSTS:
    return Object.assign({}, state, {
      isFetching: false,
      didInvalidate: false,
      items: action.posts,
      lastUpdated: action.receivedAt
    });
  default:
    return state;
  }
}

function postsByReddit(state = { }, action) {
  switch (action.type) {
  case INVALIDATE_REDDIT:
  case RECEIVE_POSTS:
  case REQUEST_POSTS:
    return Object.assign({}, state, {
      [action.reddit]: posts(state[action.reddit], action)
    });
  default:
    return state;
  }
}

const rootReducer = combineReducers({
  postsByReddit,
  selectedReddit
});

export default rootReducer;
```

In this code, there are two interesting parts:

* We use ES6 computed property syntax so we can update `state[action.reddit]` with `Object.assign()` in a terse way. This:

    ```js
    return Object.assign({}, state, {
      [action.reddit]: posts(state[action.reddit], action)
    });
    ```
  is equivalent to this:

  ```js
    let nextState = {};
    nextState[action.reddit] = posts(state[action.reddit], action);
    return Object.assign({}, state, nextState);
  ```
* We extracted `posts(state, action)` that manages the state of a specific post list. This is just [reducer composition](../basics/Reducers.md#splitting-reducers)! It is our choice how to split the reducer into smaller reducers, and in this case, we're delegating updating items inside an object to a `posts` reducer. The [real world example](../introduction/Examples.html#real-world) goes even further, showing how to create a reducer factory for parameterized pagination reducers.

Remember that reducers are just functions, so you can use functional composition and higher-order functions as much as you feel comfortable.

## Async Action Creators

Finally, how do we use the synchronous action creators we [defined earlier](#synchronous-action-creators) together with network requests? Surely, we can do this manually:

```js
import fetch from 'isomorphic-fetch';
import { createStore } from 'redux';
import { selectReddit, requestPosts, receivePosts } from './actions';
import rootReducer from './reducers';

const store = createStore(rootReducer);

store.dispatch(selectReddit('reactjs'));

store.dispatch(requestPosts('reactjs'));
fetch(`http://www.reddit.com/r/${reddit}.json`)
  .then(response => response.json())
  .then(json =>
    store.dispatch(receivePosts(reddit, json))
  )
  .then(() => {
    console.log(store.getState());
  });
```

>##### Note on `fetch`

>We use [`fetch` API](https://developer.mozilla.org/en/docs/Web/API/Fetch_API) in the examples. It is a new API for making network requests that replaces `XMLHttpRequest` for most common needs. Because most browsers don't yet support it natively, we suggest that you use [`isomorphic-fetch`](https://github.com/matthew-andrews/isomorphic-fetch) library:

>```js
// Do this in every file where you use `fetch`
>import fetch from 'isomorphic-fetch';
>```

>Internally, it uses [`whatwg-fetch` polyfill](https://github.com/github/fetch) on the client, and [`node-fetch`](https://github.com/bitinn/node-fetch) on the server, so you won't need to change API calls if you change your app to be [universal](https://medium.com/@mjackson/universal-javascript-4761051b7ae9).

>Be aware that any `fetch` polyfill assumes a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) polyfill is already present. The easiest way to ensure you have a Promise polyfill is to enable Babel's ES6 polyfill in your entry point before any other code runs:

>```js
>// Do this once before any other code in your app
>import 'babel-core/polyfill';
>```

We can call the APIs and dispatch the relevant actions from our components, too. However, it quickly gets tedious. Usually you want some kind of common logic before performing a request, such as looking up something in the state, and maybe deciding not to fetch because the data is cached.

Clearly, actions can't express control flow. The best tool for control flow is a function. A function can have an `if` statement, or an early `return`. If a function has access to a `dispatch` method, it can call it many times, potentially asynchronously. Does this ring a bell?

In the [previous section](Middleware.md), we explored the most common extension mechanism for Redux: the middleware. Middleware lets you inject custom logic between the initial `dispatch()` call and the time the action reaches a reducer.

What if we wrote a middleware that lets us **return functions from action creators**? By the way, functions that return functions are traditionally called "thunks", so we'll call it "thunk middleware". It could look like this:

```js
const thunkMiddleware = store => next => action => {
  if (typeof action !== 'function') {
    // Normal action, pass it on
    return next(action);
  }

  // Woah, somebody tried to dispatch a function!
  // We will invoke it immediately and give `store.dispatch`
  // to it. This will invert control and let it dispatch
  // many times. We will also pass `getState` to it so it
  // can peek into the current state and make decisions based on it.

  const result = action(store.dispatch, store.getState);

  // Whatever the user returned from that function, we'll return too,
  // so it becomes `dispatch()` returns value. This is convenient
  // in case user wants to return a Promise to wait for.

  return result;
};
```

If this doesn't make sense, you need to go back to the [middleware introduction](Middleware.md). This lets us rewrite our example so that `fetchPosts()` is just another action creator, but it returns a function:

#### `actions.js`

```js
import fetch from 'isomorphic-fetch';

export const REQUEST_POSTS = 'REQUEST_POSTS';
function requestPosts(reddit) {
  return {
    type: REQUEST_POSTS,
    reddit
  };
}

export const RECEIVE_POSTS = 'RECEIVE_POSTS'
function receivePosts(reddit, json) {
  return {
    type: RECEIVE_POSTS,
    reddit,
    posts: json.data.children.map(child => child.data),
    receivedAt: Date.now()
  };
}

export function fetchPosts(reddit) {
  // thunk middleware knows how to handle functions
  return function (dispatch) {
    dispatch(requestPosts(reddit));

    // Return a promise to wait for
    // (this is not required by thunk middleware, but it is convenient for us)
    return fetch(`http://www.reddit.com/r/${reddit}.json`)
      .then(response => response.json())
      .then(json =>
        // We can dispatch many times!
        dispatch(receivePosts(reddit, json))
      );
  };
}
```

#### `index.js`

```js
import thunkMiddleware from 'redux-thunk';
import loggerMiddleware from 'redux-logger';
import { createStore, applyMiddleware } from 'redux';
import { selectReddit, fetchPosts } from './actions';
import rootReducer from './reducers';

const createStoreWithMiddleware = applyMiddleware(
  thunkMiddleware, // lets us dispatch() functions
  loggerMiddleware // neat middleware that logs actions
)(createStore);

const store = createStoreWithMiddleware(rootReducer);

store.dispatch(selectReddit('reactjs'));
store.dispatch(fetchPosts('reactjs')).then(() =>
  console.log(store.getState());
);
```

The nice thing about thunks is that they can dispatch results of each other:

#### `actions.js`

```js
import fetch from 'isomorphic-fetch';

export const REQUEST_POSTS = 'REQUEST_POSTS';
function requestPosts(reddit) {
  return {
    type: REQUEST_POSTS,
    reddit
  };
}

export const RECEIVE_POSTS = 'RECEIVE_POSTS'
function receivePosts(reddit, json) {
  return {
    type: RECEIVE_POSTS,
    reddit,
    posts: json.data.children.map(child => child.data),
    receivedAt: Date.now()
  };
}

function fetchPosts(reddit) {
  return dispatch => {
    dispatch(requestPosts(reddit));
    return fetch(`http://www.reddit.com/r/${reddit}.json`)
      .then(response => response.json())
      .then(json => dispatch(receivePosts(reddit, json)));
  };
}

function shouldFetchPosts(state, reddit) {
  const posts = state.postsByReddit[reddit];
  if (!posts) {
    return true;
  } else if (posts.isFetching) {
    return false;
  } else {
    return posts.didInvalidate;
  }
}

export function fetchPostsIfNeeded(reddit) {
  return (dispatch, getState) => {
    if (shouldFetchPosts(getState(), reddit)) {
      // Dispatch a thunk from thunk!
      return dispatch(fetchPosts(reddit));
    } else {
      // Let the calling code know there's nothing to wait for.
      return Promise.resolve();
    }
  };
}
```

This lets us write more sophisticated async control flow gradually, while the consuming code can stay pretty much the same:

#### `index.js`

```js
store.dispatch(fetchPostsIfNeeded('reactjs')).then(() =>
  console.log(store.getState());
);
```

>##### Note about Server Rendering

>Async action creators are especially convenient for server rendering. You can create a store, dispatch a single async action creator that dispatches other async action creators to fetch data for a whole section of your app, and only render after the Promise it returns, completes. Then your store will already be hydrated with the state you need before rendering.

[Thunk middleware](https://github.com/gaearon/redux-thunk) isn't the only way to orchestrate asynchronous actions in Redux. You can use [redux-promise](https://github.com/acdlite/redux-promise) or [redux-promise-middleware](https://github.com/pburtchaell/redux-promise-middleware) to dispatch Promises instead of functions. You can dispatch Observables with [redux-rx](https://github.com/acdlite/redux-rx). You can even write a custom middleware to describe calls to your API, like the [real world example](../introduction/Examples.html#real-world) does. It is up to you to try a few options, choose a convention you like, and follow it, whether with, or without the middleware.

## Connecting to UI

Dispatching async actions is no different from dispatching synchronous actions, so we won't discuss this in detail. See [Usage with React](../basics/UsageWithReact.md) for an introduction into using Redux from React components. See [Example: Reddit API](ExampleRedditAPI.md) for the complete source code discussed in this example.

## Next Steps

Read [Async Flow](AsyncFlow.md) to recap how async actions fit into the Redux flow.


text:
#ifndef OWL_VOLUMERENDERABLE
#define OWL_VOLUMERENDERABLE
#include <OgrePrerequisites.h>
#include <OgreSimpleRenderable.h>

/** Direct Volume Rendering.
 	TODO: LOD: reduce number of slices in distance
 	TODO: option to generate normals for lighting
 	@author W.J. van der Laan
*/
class VolumeRenderable: public Ogre::SimpleRenderable {
public:
	VolumeRenderable(size_t nSlices, float size, const Ogre::String & texture);
	~VolumeRenderable();

	// Copydoc Ogre::SimpleRenderable::notifyCurrentCamera
	void _notifyCurrentCamera( Ogre::Camera* cam );
	void getWorldTransforms( Ogre::Matrix4* xform ) const;

	/**
	 * Retrieves ratios of the origin-centered bounding sphere for this
	 * object.
	 */
	Ogre::Real getBoundingRadius() const;

	/**
	 * Returns the camera-relative squared depth of this renderable.
	 */
	Ogre::Real getSquaredViewDepth(const Ogre::Camera*) const;
protected:
	void initialise();

	size_t mSlices;
	float mSize;
	float mRadius;
	Ogre::Matrix3 mFakeOrientation;
	Ogre::String mTexture;
	Ogre::TextureUnitState *mUnit;
};
#endif


text:
class AddUserIdToIceCreams < ActiveRecord::Migration[5.0]
  def change
    add_column :ice_creams, :user_id, :integer
  end
end


text:
import sqlalchemy
from sqlalchemy.engine import create_engine
from sqlalchemy.pool import SingletonThreadPool

from terroroftinytown.tracker.model import Session, Base

class Database(object):
    def __init__(self, path, delete_everything=False):
        if path.startswith('sqlite:'):
            self.engine = create_engine(path, poolclass=SingletonThreadPool)
            sqlalchemy.event.listen(
                self.engine, 'connect', self._apply_pragmas_callback)
        else:
            self.engine = create_engine(path)

        Session.configure(bind=self.engine)

        if delete_everything == 'yes-really!':
            self._delete_everything()

        Base.metadata.create_all(self.engine)

    @classmethod
    def _apply_pragmas_callback(cls, connection, record):
        connection.execute('PRAGMA journal_mode=WAL')
        connection.execute('PRAGMA synchronous=NORMAL')

    def _delete_everything(self):
        Base.metadata.drop_all(self.engine)


text:
import nodemailer from 'nodemailer';
import smtpTransport from 'nodemailer-smtp-transport';

/**
  * Sends Email notification
  *
  * @param {object} emailParams - Details required to send email
  *
  * @returns {void} null
  */
function sendEmail(emailParams) {
  const mailOptions = {
    from: emailParams.senderAddress,
    to: emailParams.recepientAddress,
    subject: emailParams.subject,
    html: emailParams.emailBody
  };

  const transporter = nodemailer.createTransport(smtpTransport({
    service: 'gmail',
    port: 465,
    auth: {
      user: 'noreply.swiftpost@gmail.com',
      pass: process.env.EMAIL_PASSWORD
    }
  }));

  if (process.env.NODE_ENV !== 'production') {
    transporter.sendMail(mailOptions, (error, info) => {
      if (error) {
        console.log(error);
      } else {
        console.log(`Email sent:${info.response}`);
      }
    });
  } else {
    transporter.sendMail(mailOptions);
  }
}
export default sendEmail;