text:
@class NSDictionary, NSMutableDictionary;
@class NSPrintInfo;

@interface OAColorProfile : NSObject <NSCopying>
{
    BOOL isMutable;
    void *rgbProfile, *cmykProfile, *grayProfile;
}

+ (OAColorProfile *)defaultDocumentProfile;
+ (OAColorProfile *)defaultDisplayProfile;
+ (OAColorProfile *)currentProfile;

+ (OAColorProfile *)defaultProofProfile;
+ (OAColorProfile *)workingCMYKProfile;
+ (NSArray *)proofingDeviceProfileNames;
+ (OAColorProfile *)proofProfileForDeviceProfileName:(NSString *)deviceProfileName;
+ (OAColorProfile *)proofProfileForPrintInfo:(NSPrintInfo *)printInfo;

+ (NSArray *)rgbProfileNames;
+ (NSArray *)cmykProfileNames;
+ (NSArray *)grayProfileNames;
+ (OAColorProfile *)colorProfileWithRGBNamed:(NSString *)rgbName cmykNamed:(NSString *)cmykName grayNamed:(NSString *)grayName;

+ (OAColorProfile *)colorProfileFromPropertyListRepresentation:(NSDictionary *)dict;
- (NSMutableDictionary *)propertyListRepresentation;

- (void)set;
- (void)unset;

- (BOOL)isEqualToProfile:(OAColorProfile *)otherProfile;

- (NSString *)rgbName;
- (NSString *)cmykName;
- (NSString *)grayName;
- (NSData *)rgbData;
- (NSData *)cmykData;
- (NSData *)grayData;

// For use by conversions
- (BOOL)_hasRGBSpace;
- (BOOL)_hasCMYKSpace;
- (BOOL)_hasGraySpace;
- (BOOL)_hasRGBSpace;
- (BOOL)_hasCMYKSpace;
- (BOOL)_hasGraySpace;
- (void)_setRGBColor:(NSColor *)aColor;
- (void)_setCMYKColor:(NSColor *)aColor;
- (void)_setGrayColor:(NSColor *)aColor;
- (void *)_rgbConversionWorldForOutput:(OAColorProfile *)aProfile;
- (void *)_cmykConversionWorldForOutput:(OAColorProfile *)aProfile;
- (void *)_grayConversionWorldForOutput:(OAColorProfile *)aProfile;

// For use by subclasses
- (void **)_cachedRGBColorWorldForOutput:(OAColorProfile *)aProfile;
- (void **)_cachedCMYKColorWorldForOutput:(OAColorProfile *)aProfile;
- (void **)_cachedGrayColorWorldForOutput:(OAColorProfile *)aProfile;
- (void *)_rgbProfile;
- (void *)_cmykProfile;
- (void *)_grayProfile;
@end

extern NSString * const OADefaultDocumentColorProfileDidChangeNotification;
extern NSString * const OAColorProofingDevicesDidChangeNotification;

redpajama_set_name: RedPajamaGithub


text:
\hypertarget{testing__registry_8h_source}{\section{testing\-\_\-registry.\-h}
}

\begin{DoxyCode}
00001
00007 \textcolor{preprocessor}{#ifndef TESTING\_REGISTRY\_H\_20111217183516441}
00008 \textcolor{preprocessor}{}\textcolor{preprocessor}{#define TESTING\_REGISTRY\_H\_20111217183516441}
00009 \textcolor{preprocessor}{}\textcolor{preprocessor}{#include <map>}
00010 \textcolor{comment}{//
      ------------------------------------------------------------------------------}
00011 \textcolor{comment}{// macro definition}
00012 \textcolor{comment}{//
      ------------------------------------------------------------------------------}
00013 \textcolor{comment}{//
      ------------------------------------------------------------------------------}
00014 \textcolor{comment}{// namespace}
00015 \textcolor{comment}{//
      ------------------------------------------------------------------------------}
00016 \textcolor{keyword}{namespace }hryky
00017 \{
00018 \textcolor{keyword}{namespace }testing
00019 \{
00021     \textcolor{keyword}{class }Registry;
00022
00024     \textcolor{keywordtype}{int} \hyperlink{namespacehryky_1_1testing_a3f6a3cf63bf23525fe1e462fd3b83474}{main_impl}(\textcolor{keywordtype}{int}, \textcolor{keywordtype}{char} \textcolor{keyword}{const} * \textcolor{keyword}{const}[]);
00025
00026 \textcolor{keyword}{namespace }unit
00027 \{
00028     \textcolor{keyword}{class }Base;
00029 \}
00030 \}
00031 \}
00032 \textcolor{comment}{//
      ------------------------------------------------------------------------------}
00033 \textcolor{comment}{// class declaration}
00034 \textcolor{comment}{//
      ------------------------------------------------------------------------------}
\hypertarget{testing__registry_8h_source_l00038}{}\hyperlink{classhryky_1_1testing_1_1_registry}{00038} \textcolor{comment}{}\textcolor{keyword}{class }\hyperlink{classhryky_1_1testing_1_1_registry}{hryky::testing::Registry}
00039 \{
00040 \textcolor{keyword}{public} :
00041
00042
\hypertarget{testing__registry_8h_source_l00043}{}\hyperlink{classhryky_1_1testing_1_1_registry_ab12764189072e5208e8919e31ab49aac}{00043}     \textcolor{keyword}{typedef} \hyperlink{classhryky_1_1testing_1_1_registry}{hryky::testing::Registry}                \hyperlink{classhryky_1_1testing_1_1_registry_ab12764189072e5208e8919e31ab49aac}{this_type};
00044     \textcolor{keyword}{typedef} \hyperlink{classhryky_1_1testing_1_1unit_1_1_base}{unit::Base} *                            \hyperlink{classhryky_1_1testing_1_1unit_1_1_base}{unit_type};
00045
\hypertarget{testing__registry_8h_source_l00047}{}\hyperlink{classhryky_1_1testing_1_1_registry_1_1_enregister}{00047}     \textcolor{keyword}{class }\hyperlink{classhryky_1_1testing_1_1_registry_1_1_enregister}{Enregister}
00048     \{
00049         \textcolor{keyword}{friend} \textcolor{keyword}{class }\hyperlink{classhryky_1_1testing_1_1unit_1_1_base}{unit::Base};
00050         \hyperlink{classhryky_1_1testing_1_1_registry_1_1_enregister}{Enregister}(
00051             \hyperlink{classhryky_1_1testing_1_1_registry}{Registry} & registry, \textcolor{keywordtype}{char} \textcolor{keyword}{const} * name, \hyperlink{classhryky_1_1testing_1_1unit_1_1_base}{unit_type} unit) \{
00052             registry.enregister(name, unit);
00053         \}
00054     \};
00055
00057     \textcolor{keyword}{static} \hyperlink{classhryky_1_1testing_1_1_registry}{Registry} & \hyperlink{classhryky_1_1testing_1_1_registry_adf6d2875f479e3b523a0ceab5434319f}{instance}();
00058
00060     \hyperlink{classhryky_1_1testing_1_1unit_1_1_base}{unit_type} \hyperlink{classhryky_1_1testing_1_1_registry_aeed75a668cad923da49123e78153cac6}{operator[]}(\textcolor{keywordtype}{char} \textcolor{keyword}{const} * name) \textcolor{keyword}{const};
00061
00062 \textcolor{keyword}{protected} :
00063
00064 \textcolor{keyword}{private} :
00065
00066     \textcolor{keyword}{typedef} std::map<std::string, unit\_type >   table\_type;
00067
00069     \textcolor{keyword}{explicit} \hyperlink{classhryky_1_1testing_1_1_registry}{Registry}(\hyperlink{classhryky_1_1testing_1_1_registry}{Registry} \textcolor{keyword}{const} &);
00070
00072     \hyperlink{classhryky_1_1testing_1_1_registry}{Registry} & operator=(\hyperlink{classhryky_1_1testing_1_1_registry}{Registry} \textcolor{keyword}{const} &rhs);
00073
00075     \textcolor{keyword}{explicit} \hyperlink{classhryky_1_1testing_1_1_registry}{Registry}();
00076
00078     ~\hyperlink{classhryky_1_1testing_1_1_registry}{Registry}();
00079
00081     \textcolor{keywordtype}{void} enregister(\textcolor{keywordtype}{char} \textcolor{keyword}{const} * name, \hyperlink{classhryky_1_1testing_1_1unit_1_1_base}{unit_type} unit);
00082
00083     table\_type table\_;
00084
00085 \};
00086 \textcolor{comment}{//
      ------------------------------------------------------------------------------}
00087 \textcolor{comment}{// public member functions}
00088 \textcolor{comment}{//
      ------------------------------------------------------------------------------}
00089 \textcolor{comment}{//
      ------------------------------------------------------------------------------}
00090 \textcolor{comment}{// protected member functions}
00091 \textcolor{comment}{//
      ------------------------------------------------------------------------------}
00092 \textcolor{comment}{//
      ------------------------------------------------------------------------------}
00093 \textcolor{comment}{// private member functions}
00094 \textcolor{comment}{//
      ------------------------------------------------------------------------------}
00095 \textcolor{preprocessor}{#endif // TESTING\_REGISTRY\_H\_20111217183516441}
00096 \textcolor{preprocessor}{}\textcolor{comment}{// end of file}
\end{DoxyCode}


text:
'use strict';

/**
 * Route configuration for the RDash module.
 */
angular.module('RDash').config(['$stateProvider', '$urlRouterProvider',
    function($stateProvider, $urlRouterProvider) {

        // For unmatched routes
        $urlRouterProvider.otherwise('/');

        // Application routes
        //
        // Note: Each state MUST be unique

        $stateProvider
            .state('index', {
                url: '/',
                templateUrl: 'templates/dashboard.html'
            })
            .state('rates', {
                url: '/rates',
                templateUrl: 'templates/rates.html', controller: 'RateCtrl'
            })
            .state('rates_add', {
                url: '/ratesadd',
                templateUrl: 'templates/rates_add.html', controller: 'RateCtrlAdd'
            })
            .state('rates_mod', {
                url: '/ratesmod',
                templateUrl: 'templates/501_not_implemented.html', controller: '501Ctrl'
            })
            .state('profiles', {
                url: '/profiles',
                templateUrl: 'templates/profiles.html', controller: 'ProfileCtrl'
            })
            .state('profiles_add', {
                url: '/profilesadd',
                templateUrl: 'templates/profiles_add.html', controller: 'ProfileCtrlAdd'
            })
            .state('profiles_mod', {
                url: '/profilesmod',
                templateUrl: 'templates/501_not_implemented.html', controller: '501Ctrl'
            })
            .state('sources', {
                url: '/sources',
                templateUrl: 'templates/sources.html', controller: 'SourceCtrl'
            })
            .state('sources_add', {
                url: '/sourcesadd',
                templateUrl: 'templates/sources_add.html', controller: 'SourceCtrlAdd'
            })
            .state('sources_mod', {
                url: '/sourcesmod',
                templateUrl: 'templates/501_not_implemented.html', controller: '501Ctrl'
            })
            .state('services', {
                url: '/services',
                templateUrl: 'templates/services.html', controller: 'ServiceCtrl'
            })
            .state('services_add', {
                url: '/servicesadd',
                templateUrl: 'templates/services_add.html', controller: 'ServiceCtrlAdd'
            })
            .state('services_mod', {
                url: '/servicesmod',
                templateUrl: 'templates/501_not_implemented.html', controller: '501Ctrl'
            })
            .state('services_start', {
                url: '/servicesstart',
                templateUrl: 'templates/501_not_implemented.html', controller: '501Ctrl'
            })
            .state('services_stop', {
                url: '/servicesstop',
                templateUrl: 'templates/501_not_implemented.html', controller: '501Ctrl'
            })
            //.state('appliances', {
            //    url: '/appliances',
            //    templateUrl: 'templates/appliances.html', controller: 'ApplianceCtrl'
            //})
            .state('vues', {
                url: '/vues',
                templateUrl: 'templates/vues.html', controller: 'VueCtrl'
            })
            .state('vues_add', {
                url: '/vuesadd',
                templateUrl: 'templates/vues_add.html', controller: 'VueCtrlAdd'
            })
            .state('vues_501', {
                url: '/vues501',
                templateUrl: 'templates/501_not_implemented.html', controller: '501Ctrl'
            })
            .state('test', {
                url: '/test',
                templateUrl: 'templates/test.html',
                controller: 'TestRateCtrl'
                //resolve: TestRateCtrl.resolve
            })
            .state('files', {
                url: '/files',
                templateUrl: 'templates/files.html', controller: 'FileCtrl'
            });
    }
]);


text:
import warnings
warnings.warn("Module is deprecated.", DeprecationWarning)

### Note, these are placeholder solutions

# Since this module is meant to offer safety wrappers around some numpy
# functions, if we can't import numpy, then gracefully handle the import error
# and define stubs.

try:
    from numpy import amin, amax, mean, median, reshape, asarray, isnan, \
                      compress, isfinite, where, inf

    def _asarray1d(arr):
        """ Ensure 1d array for one array.
        """
        m = asarray(arr)
        if len(m.shape)==0:
            m = reshape(m,(1,))
        return m

    def nanmin(x,axis=-1):
        """ Find the minimium over the given axis ignoring nans.
        """
        y = where(isnan(x), inf, x)
        return amin(y,axis)

    def nanmax(x,axis=-1):
        """ Find the maximum over the given axis ignoring nans.
        """
        y = where(isnan(x), -inf, x)
        return amax(-1,axis)

    def nanmean(x):
        """ Find the mean of x ignoring nans.

            fixme: should be fixed to work along an axis.
        """
        x = _asarray1d(x).copy()
        y = compress(isfinite(x), x)
        return mean(y)

    def nanmedian(x):
        """ Find the median over the given axis ignoring nans.

            fixme: should be fixed to work along an axis.
        """
        x = _asarray1d(x).copy()
        y = compress(isfinite(x), x)
        return median(y)

except ImportError:

    _asarray1d = nanmin = nanmax = nanmean = nanmedian = None


text:
SYNONYM

#### According to
Index Fungorum

#### Published in
Revis. gen. pl. (Leipzig) 2: 872 (1891)

#### Original name
Corticium cremoricolor Berk. & M.A. Curtis, 1873

### Remarks
null


text:
namespace pythonic
{

  namespace __builtin__
  {

    namespace set
    {
      template <class T, class U>
      void discard(types::set<T> &set, U const &elem);

      template <class T, class U>
      void discard(types::set<T> &&set, U const &elem);

      template <class U>
      void discard(types::empty_set const &set, U const &elem);

      PROXY_DECL(pythonic::__builtin__::set, discard);
    }
  }
}
#endif


text:
namespace caffe {

template <typename Dtype>
void MultinomialLogisticLossLayer<Dtype>::FurtherSetUp(
    const vector<Blob<Dtype>*>& bottom, vector<Blob<Dtype>*>* top) {
  CHECK_EQ(bottom[1]->channels(), 1);
  CHECK_EQ(bottom[1]->height(), 1);
  CHECK_EQ(bottom[1]->width(), 1);
}

template <typename Dtype>
Dtype MultinomialLogisticLossLayer<Dtype>::Forward_cpu(
    const vector<Blob<Dtype>*>& bottom, vector<Blob<Dtype>*>* top) {
  const Dtype* bottom_data = bottom[0]->cpu_data();
  const Dtype* bottom_label = bottom[1]->cpu_data();
  int num = bottom[0]->num();
  int dim = bottom[0]->count() / bottom[0]->num();
  Dtype loss = 0;
  for (int i = 0; i < num; ++i) {
    int label = static_cast<int>(bottom_label[i]);
    Dtype prob = std::max(
        bottom_data[i * dim + label], Dtype(kLOG_THRESHOLD));
    loss -= log(prob);
  }
  if (top->size() == 1) {
    (*top)[0]->mutable_cpu_data()[0] = loss / num;
  }
  return loss / num;
}

template <typename Dtype>
void MultinomialLogisticLossLayer<Dtype>::Backward_cpu(
    const vector<Blob<Dtype>*>& top, const vector<bool>& propagate_down,
    vector<Blob<Dtype>*>* bottom) {
  if (propagate_down[1]) {
    LOG(FATAL) << this->type_name()
               << " Layer cannot backpropagate to label inputs.";
  }
  if (propagate_down[0]) {
    const Dtype* bottom_data = (*bottom)[0]->cpu_data();
    const Dtype* bottom_label = (*bottom)[1]->cpu_data();
    Dtype* bottom_diff = (*bottom)[0]->mutable_cpu_diff();
    int num = (*bottom)[0]->num();
    int dim = (*bottom)[0]->count() / (*bottom)[0]->num();
    caffe_set((*bottom)[0]->count(), Dtype(0), bottom_diff);
    for (int i = 0; i < num; ++i) {
      int label = static_cast<int>(bottom_label[i]);
      Dtype prob = std::max(
          bottom_data[i * dim + label], Dtype(kLOG_THRESHOLD));
      bottom_diff[i * dim + label] = -1. / prob / num;
    }
  }
}

INSTANTIATE_CLASS(MultinomialLogisticLossLayer);

}  // namespace caffe


text:
using System;

public class CalculatingCubeProperties
{
    public static void Main()
    {
        //Input
        double lenght = double.Parse(Console.ReadLine());
        string property = Console.ReadLine();
        double result = 0;

        //Logic
        switch (property)
        {
            case "face":
                result = CalculatingFace(lenght);
                break;
            case "space":
                result = CalculatingSpace(lenght);
                break;
            case "volume":
                result = CalculatingVolume(lenght);
                break;
            case "area":
                result = CalculatingArea(lenght);
                break;
            default:
                Console.WriteLine("No such property! Try again....");
                break;
        }

        //Output
        Console.WriteLine("{0:f2}", result);
    }

    public static double CalculatingFace(double lenght)
    {
        double face = Math.Sqrt(2 * (Math.Pow(lenght, 2)));

        return face;
    }

    public static double CalculatingSpace(double lenght)
    {
        double space = Math.Sqrt(3 * Math.Pow(lenght, 2));

        return space;
    }

    public static double CalculatingVolume(double lenght)
    {
        double volume = lenght * lenght * lenght;
        return volume;
    }
    public static double CalculatingArea(double lenght)
    {
        double singleArea = Math.Pow(lenght, 2);
        double area = 6 * singleArea;

        return area;
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 338103 $ -->

<refentry xml:id="yar-concurrent-client.loop" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 <refnamediv>
  <refname>Yar_Concurrent_Client::loop</refname>
  <refpurpose>Send all calls</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <modifier>public</modifier> <modifier>static</modifier> <type>boolean</type><methodname>Yar_Concurrent_Client::loop</methodname>
   <methodparam choice="opt"><type>callable</type><parameter>callback</parameter></methodparam>
   <methodparam choice="opt"><type>callable</type><parameter>error_callback</parameter></methodparam>
  </methodsynopsis>
  <para>
    Send all registed remote RPC calls.
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <variablelist>
   <varlistentry>
    <term><parameter>callback</parameter></term>
    <listitem>
     <para>
      If this callback is set, then Yar will call this callback after all
      calls are sent and before any response return, with a $callinfo NULL.
     </para>
     <para>
      Then, if user didn't specify callback when registering concurrent call,
      this callback will be used to handle response, otherwise, the callback
      specified while registering will be used.
     </para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term><parameter>error_callback</parameter></term>
    <listitem>
     <para>
      If this callback is set, then Yar will call this callback while error
      occurred.
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>

  </para>
 </refsect1>

 <refsect1 role="examples">
  &reftitle.examples;
  <example>
   <title><function>Yar_Concurrent_Client::loop</function> example</title>
   <programlisting role="php">
<![CDATA[
<?php
function callback($retval, $callinfo) {
     if ($callinfo == NULL) {
        echo "Now, all requests are sent, and no any response available\n";
     } else {
        echo "This is a remote call response, the method name is", $callinfo["method"],
             ". calling sequence is " , $callinfo["sequence"] , "\n";
        var_dump($retval);
     }
}

function error_callback($type, $error, $callinfo) {
    error_log($error);
}

Yar_Concurrent_Client::call("http://host/api/", "some_method", array("parameters"), "callback");
Yar_Concurrent_Client::call("http://host/api/", "some_method", array("parameters"));   // if the callback is not specificed,
                                                                               // callback in loop will be used
Yar_Concurrent_Client::call("http://host/api/", "some_method", array("parameters"), "callback", NULL, array(YAR_OPT_PACKAGER => "json"));
                                                                               //this server accept json packager
Yar_Concurrent_Client::call("http://host/api/", "some_method", array("parameters"), "callback", NULL, array(YAR_OPT_TIMEOUT=>1));
                                                                               //custom timeout

Yar_Concurrent_Client::loop("callback", "error_callback"); //send the requests,
                                                           //the error_callback is optional
?>
]]>
   </programlisting>
   &example.outputs.similar;
   <screen>
<![CDATA[
Now, all requests are sent, and no any response available
This is a remote call response, the method name issome_method. calling sequence is 4
string(11) "some_method"
This is a remote call response, the method name issome_method. calling sequence is 1
string(11) "some_method"
This is a remote call response, the method name issome_method. calling sequence is 2
string(11) "some_method"
This is a remote call response, the method name issome_method. calling sequence is 3
string(11) "some_method"
]]>
   </screen>
  </example>
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <simplelist>
   <member><methodname>Yar_Concurrent_Client::call</methodname></member>
   <member><methodname>Yar_Concurrent_Client::reset</methodname></member>
   <member><methodname>Yar_Server::__construct</methodname></member>
   <member><methodname>Yar_Server::handle</methodname></member>
  </simplelist>
 </refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->


text:
<!DOCTYPE html>

<meta charset="utf-8">

<title>Working examples - Web Experience Toolkit (WET)</title>
<link href="images/favicon.ico" rel="shortcut icon">
<meta content="width=device-width, initial-scale=1" name="viewport">

<link rel="stylesheet" href="css/wb.base.css">
<link rel="stylesheet" href="css/theme.css">

Skip to main content

Skip to footer

Close

Navigation

Site Menu

WET Project

About WET

What is WET?

Benefits

Accolades for WET

Known implementations

Events

Main project

Terms and conditions of use

Roadmap of past and future releases

Version history

External projects used in WET

About the Web Standards

Standard on Optimizing Websites and Applications for Mobile Devices

Standard on Web Accessibility

Standard on Web Usability

Standard on Web Interoperability

Implement WET

Getting started

Getting started with WET

Using Github for WET

Download WET

Designing sites and page layouts

Using grids to design pages

Themes and style

Optimal content examples

Working with WET

Working examples

Documentation

Core framework

Variants

Themes and style

Plugins

Polyfills

Contribute to WET

Contributor guidelines

Filing a bug or an issue

Creating a pull request

Testing your code

Participating in a project

Developing for WET

Creating documentation

Testing a component

Breadcrumb trail

Home

Working examples

 Close

Search

  <form action="#" method="post">

      Search website
      <input id="wb-srch-txt" name="wb-srch-txt" type="search" value="" class="form-control" size="27" maxlength="150" />
      <button  id="wb-srch-submit" class="wb-srch-submit btn btn-primary" name="wb-srch-submit" type="submit"> Search </button>

  </form>

 Close

Settings

Languages

English (current)

Français

About

About

About the Web Experience Toolkit

About the Web Standards

Contact us

Questions or comments?

News

Recent project activity

Stay Connected

Twitter

      <object type="image/svg+xml" tabindex="-1" role="img" data="images/logo.svg" aria-label="Web Experience Toolkit">
      </object>

Menu

Search

Settings

Languages

English (current)

Français

      <object type="theme-wet/images/svg+xml" tabindex="-1" role="img" data="images/logo.svg" aria-label="Web Experience Toolkit">
      </object>

Web Experience Toolkit (WET) Collaborative open source project led by the Government of Canada

Search

        <form action="#" method="post" class="form-inline">

            Search website
            <input id="wb-srch-txt" class="wb-srch-txt form-control" name="wb-srch-txt" type="search" value="" size="27" maxlength="150" />
            <button type="submit"  id="wb-srch-submit" class="wb-srch-submit btn btn-primary btn-small" name="wb-srch-submit">Search</button>

        </form>

Navigation

Site Menu

WET Project

About WET

What is WET?

Benefits

Accolades for WET

Known implementations

Events

Main project

Terms and conditions of use

Roadmap of past and future releases

Version history

External projects used in WET

About the Web Standards

Standard on Optimizing Websites and Applications for Mobile Devices

Standard on Web Accessibility

Standard on Web Usability

Standard on Web Interoperability

Implement WET

Getting started

Getting started with WET

Using Github for WET

Download WET

Designing sites and page layouts

Using grids to design pages

Themes and style

Optimal content examples

Working with WET

Working examples

Documentation

Core framework

Variants

Themes and style

Plugins

Polyfills

Contribute to WET

Contributor guidelines

Filing a bug or an issue

Creating a pull request

Testing your code

Participating in a project

Developing for WET

Creating documentation

Testing a component

Breadcrumb trail

Home

Working examples

Web Experience Toolkit (WET)

Heading 2

Heading 3

Heading 4

Heading 5

Heading 6

Paragraph default appearance

blockquote

Link - default appearance

Link (mailto:) - default appearance

Link (rel="external") - default appearance

Link - file downloads based on file type (.doc, .psd, .zip, .pdf, .xls, .xlt, .rtf and .txt - default appearance

Abbreviation - default appearance: GC.

unordered list (ul) - level 1 - default appearance

unordered list (ul) - level 2 - default appearance

unordered list (ul) - level 3 - default appearance

ordered list (ol) - level 1 - default appearance

ordered list (ol) - level 1 - default appearance

ordered list (ol) - level 2 - default appearance

ordered list (ol) - level 2 - default appearance

ordered list (ol) - level 3 - default appearance

ordered list (ol) - level 3 - default appearance

            #
            First Name
            Last Name
            Username

            1
            Mark
            Otto
            @mdo

            2
            Jacob
            Thornton
            @fat

            3
            Larry
            the Bird
            @twitter

      <form>
        <fieldset>
        <legend>Legend</legend>

          Email address
          <input type="text" class="form-control" id="exampleInputEmail" placeholder="Enter email">

          Password
          <input type="password" class="form-control" id="exampleInputPassword" placeholder="Password">

        <button type="submit" class="btn btn-primary">Submit</button>
        </fieldset>
      </form>

About

About

About the Web Experience Toolkit

About the Web Standards

Contact us

Questions or comments?

News

Recent project activity

Stay Connected

Twitter


text:
<?php

namespace Ise\Bread;

return [
    'controller_map' => [
        'Ise' => true,
    ],
    'template_map'   => [
        'ise/bread/bread/browse' => realpath(__DIR__ . '/../view/ise/bread/bread/browse.phtml'),
        'ise/bread/bread/read'   => realpath(__DIR__ . '/../view/ise/bread/bread/read.phtml'),
        'ise/bread/bread/add'    => realpath(__DIR__ . '/../view/ise/bread/bread/add.phtml'),
        'ise/bread/bread/edit'   => realpath(__DIR__ . '/../view/ise/bread/bread/edit.phtml'),
        'ise/bread/bread/dialog' => realpath(__DIR__ . '/../view/ise/bread/bread/dialog.phtml'),
        'partial/dialog'         => realpath(__DIR__ . '/../view/partial/dialog.phtml'),
    ],
];


text:
var fs = require('fs');
var chokidar = require('chokidar');
var path = require('path');
var babel = require('babel-core')
var think = require('thinkit');
think = think.default || think;

var list = require('./package.js');

list.forEach(function(dir) {
  dir = '../' + dir;
  dir = path.join(process.cwd(), dir);
  var sourcePath = path.join(dir, 'src');
  if(!think.isDir(sourcePath)) return;
  var targetPath = path.join(dir, 'lib');
  think.mkdir(targetPath);
  chokidar.watch(sourcePath, {
    persistent: true,
  }).on('all', function(event, changedPath) {
    if(!think.isFile(changedPath)) return;
    compileFile(sourcePath, targetPath, changedPath);
  });
});

function compileFile(sourcePath, targetPath, changedPath) {
  console.log('compile file ', changedPath);
  var content = fs.readFileSync(changedPath, 'utf8');
  try{
    var data = babel.transform(content, {
      filename: changedPath,
      presets: ['es2015-loose', 'stage-1'],
      plugins: ['transform-runtime'],
      sourceMaps: true,
      sourceFileName: changedPath
    });
    var file = changedPath.substr(sourcePath.length + 1);
    var saveFile = path.join(targetPath, file);
    think.mkdir(path.dirname(saveFile));
    var prefix = '//# sourceMappingURL=';
    if(data.code.indexOf(prefix) === -1){
      data.code = data.code + '\n' + prefix + saveFile + '.map';
    }
    fs.writeFileSync(saveFile, data.code);
    var sourceMap = data.map;
    //file value must be equal sources values
    sourceMap.file = sourceMap.sources[0];
    fs.writeFileSync(saveFile + '.map', JSON.stringify(sourceMap, undefined, 4));
  }catch(e){
    console.error(e.stack);
  }
}


text: Rails.application.config.session_store :cookie_store, key: '_consigliere_session'


text:
package org.jbpm.persistence;

import javax.persistence.EntityManager;

import org.drools.persistence.jpa.JpaPersistenceContextManager;
import org.kie.api.runtime.Environment;
import org.kie.api.runtime.EnvironmentName;

public class JpaProcessPersistenceContextManager extends JpaPersistenceContextManager
    implements
    ProcessPersistenceContextManager {

    public JpaProcessPersistenceContextManager(Environment env) {
        super( env );
    }

    public ProcessPersistenceContext getProcessPersistenceContext() {
        Boolean locking = (Boolean) env.get(EnvironmentName.USE_PESSIMISTIC_LOCKING);
        if( locking == null ) {
            locking = false;
        }

        boolean useJTA = true;
        return new JpaProcessPersistenceContext( getCommandScopedEntityManager(), useJTA, locking, txm );
    }

    @Override
    public EntityManager getCommandScopedEntityManager() {
        EntityManager em = super.getCommandScopedEntityManager();
        // ensure em is set in the environment to cover situation when em is taken from tx directly
        // when using per process instance runtime strategy
        if (env.get(EnvironmentName.CMD_SCOPED_ENTITY_MANAGER) == null) {
            env.set(EnvironmentName.CMD_SCOPED_ENTITY_MANAGER, em);
        }

        return em;
    }

}


text:
Fan

Contributor

Download Pre-order

Box Set Pre-order

{{store.model.current_highlight.description}}

Includes:

{{component.name}}

{{component.description}}

 This is a {{component.type}} item.

				A download link will be accessible in your profile page when released.

				This item will be shipped to the provided address when released.

				+ {{reward}}

			<button class = 'btn btn-default add_to_cart' ng-click = "store.addItem('getCurrent')" analytics-on="click" analytics-event="Added Item To Cart" analytics-category="Store-Detail" analytics-label="{{campaign.project.project}}, Level {{store.model.current_highlight.level}}">{{store.model.cart_btn_text}}</button>

Item Added to Cart

 Membership Levels

Fan

Contributor

Download Pre-order

Box Set Pre-order

{{::unique.name}}

+ {{::reward_related}}

 0}">

 Contribute:

					{{::incentive.price | currency}}


text:
#ifndef __ERASURE_TOOLS_H_
#define __ERASURE_TOOLS_H_

#ifdef __cplusplus
extern "C" {
#endif

#include <stdio.h>

extern int _debug;
#define debug_printf(...) \
   if (_debug > 0) { \
      printf(__VA_ARGS__); \
   }

#define REED_SOL_VAN    0
#define REED_SOL_R6_OP  1
#define CAUCHY_ORIG     2
#define CAUCHY_GOOD     3
#define BLAUM_ROTH      4
#define LIBERATION      5
#define LIBER8TION      6
#define RAID4           7
#define N_JE_METHODS    8

extern const char *JE_method[N_JE_METHODS];

typedef struct erasure_plan_s erasure_plan_t;

struct erasure_plan_s {    //** Contains the erasure parameters
    long long int strip_size;   //** Size of each data strip
    int method;                 //** Encoding/Decoding method used
    int data_strips;            //** Number of data devices
    int parity_strips;          //** Number of coding or parity devices
    int w;                      //** Word size
    int packet_size;            //** Chunk size for operations
    int base_unit;              //** Typically the register size in bytes
    int *encode_matrix;         //** Encoding Matrix
    int *encode_bitmatrix;      //** Encoding bit Matrix
    int **encode_schedule;      //** Encoding Schedule
    int (*form_encoding_matrix)(erasure_plan_t *plan);  //**Routine to form encoding matrix
    int (*form_decoding_matrix)(erasure_plan_t *plan);  //**Routine to form encoding matrix
    void (*encode_block)(erasure_plan_t *plan, char **ptr, int block_size);  //**Routine for encoding the block
    int (*decode_block)(erasure_plan_t *plan, char **ptr, int block_size, int *erasures);  //**Routine for decoding the block
};

int nearest_prime(int w, int force_larger);
int et_method_type(char *meth);
erasure_plan_t *et_new_plan(int method, long long int strip_size,
                            int data_strips, int parity_strips, int w, int packet_size, int base_unit);
erasure_plan_t *et_generate_plan(long long int file_size, int method,
                                 int data_strips, int parity_strips, int w, int packet_low, int packet_high);
void et_destroy_plan(erasure_plan_t *plan);
int et_encode(erasure_plan_t *plan, const char *fname, long long int foffset, const char *pname, long long int poffset, int buffersize);
int et_decode(erasure_plan_t *plan, long long int fsize, const char *fname, long long int foffset, const char *pname, long long int poffset, int buffersize, int *erasures);

#ifdef __cplusplus
}
#endif

#endif


text:
require 'serf/command'
require 'xmlrpc/client'

require 'moogle/error'
require 'moogle/events/blog_entry_pushed'
require 'moogle/requests/push_blog_entry'

module Moogle
module Commands

  ##
  # Posts an entry to a target blog.
  #
  class PushBlogEntry
    include Serf::Command

    self.request_factory = Moogle::Requests::PushBlogEntry

    def call
      # Xml-Rpc server
      server = XMLRPC::Client.new request.host, request.path, request.port

      # Makes the metaWeblog new post API call
      post_ref = server.call(
        'metaWeblog.newPost',
        request.blog_id,
        request.username,
        request.password,
        {
          'title' => request.subject,
          'link' => request.blog_uri,
          'description' => request.html_body,
          'categories' => request.categories
        },
        request.publish_immediately)

      # Return an event representing this action.
      event_class = opts :event_class, Moogle::Events::BlogEntryPushed
      return event_class.new(
        request.create_child_uuids.merge(
          message_origin: request.message_origin,
          target_id: request.target_id,
          post_ref: post_ref))
    rescue XMLRPC::FaultException => e
      e.extend Moogle::Error
      raise e
    rescue => e
      e.extend Moogle::Error
      raise e
    end
  end

end
end


text:
package org.darkstorm.darkbot.minecraftbot.protocol.v5x.play.server;

import java.io.*;

import org.darkstorm.darkbot.minecraftbot.protocol.*;
import org.darkstorm.darkbot.minecraftbot.protocol.ProtocolX.State;

public class PacketS03_TimeUpdate extends AbstractPacketX implements ReadablePacket {
	private long worldAge, time;

	public PacketS03_TimeUpdate() {
		super(0x03, State.PLAY, Direction.DOWNSTREAM);
	}

	@Override
	public void readData(DataInputStream in) throws IOException {
		worldAge = in.readLong();
		time = in.readLong();
	}

	public long getWorldAge() {
		return worldAge;
	}

	public long getTime() {
		return time;
	}
}


text:
class TokyoMetro::Factory::Generate::Static::MetaClass::Group::Fundamental::FromHash < TokyoMetro::Factory::Generate::Static::MetaClass::Group::Fundamental

  private

  # YAML ファイルからインスタンスを生成する際のロジック
  # @return [Proc]
  def generating_procedure( d_yaml )
    raise "Error" unless d_yaml.instance_of?( ::Hash )

    group_new = self.class.hash_class_for_this_factory.new
    d_yaml.each do | key , value |
      group_new[ key ] = self.class.info_class_for_this_factory.generate_from_hash( key , value )
    end
    group_new
  end

  def self.hash_class_for_this_factory
    hash_class
  end

  # ハッシュのクラス
  # @return [Const (class name)]
  def self.hash_class
    raise "The class method \"#{__method__}\" is not defined yet in this class."
  end

end


text:
local ax                                        = require "cp.fn.ax"

local Button                                    = require "cp.ui.Button"
local Group                                     = require "cp.ui.Group"
local ScrollArea                                = require "cp.ui.ScrollArea"
local SplitGroup                                = require "cp.ui.SplitGroup"
local Splitter                                  = require "cp.ui.Splitter"
local TextArea                                  = require "cp.ui.TextArea"
local Window                                    = require "cp.ui.Window"

local Sidebar                                   = require "cp.highland2.Sidebar"

local go                                        = require "cp.rx.go"
local Do                                        = go.Do

local Document = Window:subclass("cp.highland2.Document")

--- cp.highland2.Document.matches(element) -> boolean
--- Function
--- Checks if the element is a Document.
---
--- Parameters:
---  * element - The element to check.
---
--- Returns:
---  * `true` if the element matches, `false` otherwise.
function Document.static.matches(e)
    return Window.matches(e) and e:attributeValue("AXSubrole") == "AXStandardWindow"
        and TextArea.matches(Window.findSectionUI(e, "AXContent"))
end

--- cp.highland2.Document:documentPath() -> cp.prop <string; live>
--- Field
--- The current path for the document.
function Document.lazy.prop:documentPath()
    return ax.prop(self.UI, "AXDocument")
end

function Document.lazy.value:_splitGroup()
    return SplitGroup(
        self, self.UI:mutate(ax.childMatching(SplitGroup.matches)),
        {
            Button, -- Template Picker
            Button, -- Theme Picker
            Button, -- Revision Mode
            Button, -- Sprint
            Sidebar,
            Splitter,
            Group,
        }
    )
end

--- cp.highland2.Document.templatePicker <cp.ui.Button>
--- Field
--- The Template Picker button.
function Document.lazy.value:templatePicker()
    return self._splitGroup.children[1]
end

--- cp.highland2.Document.themePicker <cp.ui.Button>
--- Field
--- The Theme Picker button.
function Document.lazy.value:themePicker()
    return self._splitGroup.children[2]
end

--- cp.highland2.Document.revisionMode <cp.ui.Button>
--- Field
--- The Revision Mode button.
function Document.lazy.value:revisionMode()
    return self._splitGroup.children[3]
end

--- cp.highland2.Document.sprint <cp.ui.Button>
--- Field
--- The Sprint button.
function Document.lazy.value:sprint()
    return self._splitGroup.children[4]
end

--- cp.highland2.Document.sidebar <cp.highland2.Sidebar>
--- Field
--- The [Sidebar](cp.highland2.Sidebar.md).
function Document.lazy.value:sidebar()
    return self._splitGroup.children[5]
end

--- cp.highland2.Document.splitter <cp.ui.Splitter>
--- Field
--- The Splitter.
function Document.lazy.value:splitter()
    return self._splitGroup.children[6]
end

-- cp.highland2.Document._textGroup <cp.ui.Group>
-- Field
-- The Text [Group](cp.ui.Group.md).
function Document.lazy.value:_textGroup()
    return self._splitGroup.children[7]
end

-- cp.highland2.Document._textScrollArea <cp.ui.ScrollArea>
-- Field
-- The Text [ScrollArea](cp.ui.ScrollArea.md).
function Document.lazy.value:_textScrollArea()
    return ScrollArea(self, self._textGroup.UI:mutate(ax.childMatching(ScrollArea.matches)))
end

--- cp.highland2.Document.text <cp.ui.TextArea>
--- Field
--- The [TextArea](cp.ui.TextArea.md) containing the document text.
function Document.lazy.value:text()
    return TextArea(self, self._textScrollArea.UI:mutate(ax.childMatching(TextArea.matches)))
end

--- cp.highland2.Document.doShow <cp.rx.go.Statement>
--- Field
--- A [Statement](cp.rx.go.Statement.md) that will show the `Document` when run.
function Document.lazy.value:doShow()
    return Do(self:doFocus())
end

return Document


text:
echo "正在生成图标......"

desktopFilename='NetEaseMusic.desktop'
touch $desktopFilename
currentPath=`dirname $(readlink -f $0)`

echo "#!/usr/bin/env xdg-open
[Desktop Entry]
Type=Application
Name=NetEaseMusic
Comment=NetEaseMusic Launcher
Exec=$currentPath/main.py
Icon=$currentPath/icons/format.png
Terminal=false
StartupNotify=true
" > $desktopFilename
echo "尝试生成桌面图标..."
sudo cp $desktopFilename ~/Desktop

echo "让程序可以被系统搜索..."
sudo cp $desktopFilename ~/.local/share/applications/

if [ $? -eq 0 ]; then
    echo "全部完成!"
else
    echo "貌似出现了什么错误..."
fi


text:
layout: single
title: "FISH 6003 Syllabus"
permalink: /courses/6003Stats/6003Syllabus/
author_profile: false
---

# Statistics and Study Design for Fisheries

- **Instructor:** TBA
- **Times:** TBA
- **Office Hours:** TBA

# Official Course Description

Deriving trends from data is a key aspect of fisheries science. In this course, students learn the fundamentals of data exploration, study design, and statistical modelling.

The course will be taught from an applied perspective - while theory will be covered as needed, emphasis will be placed on when, where, and how to use these models.

# Learning Outcomes

The fundmental competencies that you will develop in this course are:
* Able to design a statistically powerful study
* Able to define, build, and run an appropriate model for a dataset, using R Statistical Software
* Understand regression-type analysis ranging from simple linear regression to more complex generalized linear mixed effects models, and how to apply them
* Understand and be able to use model selection approaches
* Use power analysis to determine the size of study needed
* Be able to apply the technique of meta-analysis to measure weight of evidence on a given topic

We will focus extensively on regression-type models due to their ubiquity in the life sciences, and their ability to be applied to many relevant situations within fisheries. Our goal is to develop a statistical mindset, and understand how to make smart decisions during design and analysis.

# Expectations and Aspirations

Statistics can be intimidating, but that doesn't need to be the case. This class will dymystify common statistical techniques that are relevant to pretty much anyone in fisheries science, and will help you learn how to do them yourself in R. We will start with the fundamentals and conclude with some fairly advanced analysis. We will focus on statistical principles, such that you are empowered to self-study and learn new techniques after the class is over.

My expectations are that you engage meaningfully with the course material. Come in and do your best, and don't be afraid to make mistakes. This will be a supportive environment.

It is expected that you are an intermediate-level R user. Normally, students enrolled in FISH 6003 will have completed [FISH 6002](https://mifisheriesscience.github.io/courses/6002Data/) or an equivalent training course, or demonstrated their abilities in R through some other way. I do not intend to spend much time teaching R specifically, so if you have not taken 6002 then please ensure you are familiar with:
*	Basic R syntax, including mathematical operators
*	Basic R coding style
*	R Projects and R Studio
* 	Importing and Exporting data
*	Tidy data, including using tidyverse packages to clean and shape data for analysis
*	Plotting (in both ggplot and base plot)
* 	Basic familiarity with R Markdown

# Course Structure

The course will meet twice weekly - one 1-hr block and one 2-hr block. Lectures will balance theory and practice, and there will be in-class activities.

Generally, a topic will be introduced within a lecture on Tuesday. On Wednesday, we will discuss how to implement the theory into practice, using R.

# Reference Books

We will mostly rely on primary literature in this course. I do not require that you buy any books for this course, although I have compiled a list of some key useful references below.

## Important papers

Data exploration:
[Zuur, A.F., Ieno, E.N., and Elphick, C.S. (2009). A protocol for data exploration to avoid common statistical problems. Methods in Ecology and Evolution 1:1, 3-14.](http://onlinelibrary.wiley.com/doi/10.1111/j.2041-210X.2009.00001.x/full)

LMs and GLMs:
[Introudction to Generalized Linear Models. STAT 504: Analysis of Discrete Data, Penn State Eberly College of Science](https://onlinecourses.science.psu.edu/stat504/node/216)

Mixed models:
* [Bolker, B.M., Brooks, M.E., Clark, C.J., Geange, S.W., Poulsen, J.R., Stevens, M.H.H., and White, J-S.S. (2009). Generalized linear mixed models: a practical guide for ecology and evolution. Trends in Ecology and Evolution 24:3, 127-135.](http://www.sciencedirect.com/science/article/pii/S0169534709000196?via%3Dihub)
See also: [http://glmm.wikidot.com/](http://glmm.wikidot.com/)
* [Nakagawa, S., and Schielzeth, H. (2013). A general and simple method for obtaining R2 from generalized linear mixed-effects models. Methods in Ecology and Evolution 4, 133-142.](http://onlinelibrary.wiley.com/doi/10.1111/j.2041-210x.2012.00261.x/pdf)
* [GLMM worked examples, by Dr. Ben Bolker](https://ms.mcmaster.ca/~bolker/R/misc/foxchapter/bolker_chap.html)

Power analysis:
[Kain, M.P., Bolker, B.M., and McCoy, M.W. (2015). A practical guide and power analysis for GLMMs: detecting among treatment variation in random effects. PeerJ e1226. doi: 10.7717/peerj.1226](https://peerj.com/articles/1226/?utm_source=TrendMD&utm_campaign=PeerJ_TrendMD_1&utm_medium=TrendMD)

Conducting and reporting regressions:
[Zuur, A.F., and Ieno, E.N. (2016). A protocol for conducting and presenting results of regression-type analyses. Methods in Ecology and Evolution 7:5, 636-645.](http://onlinelibrary.wiley.com/doi/10.1111/2041-210X.12577/abstract)

Meta-analysis:
[Harrison, F. (2011). Getting started with meta-analysis. Methods in Ecology and Evolution 2:1, 1-10.](http://onlinelibrary.wiley.com/doi/10.1111/j.2041-210X.2010.00056.x/abstract)

## Useful online courses

* [GLMM course on Github](https://github.com/seananderson/glmm-course), By [Dr. Sean Anderson](http://seananderson.ca/)
* [Biology 501: Quantitative Methods in Ecology and Evolution](https://www.zoology.ubc.ca/~bio501/R/), by [Dr. Dolph Schluter](https://www.zoology.ubc.ca/~schluter/R/)
* [STAT 545: Data wrangling, exploration, and analysis with R](http://stat545.com/), by [Dr. Jenny Bryan](https://www.stat.ubc.ca/~jenny/)

## Useful textbooks

* [Zuur, A., Ieno, E.N., Walker, N., Saveliev, A.A., and Smith, G.M. (2009). Mixed effects models and extensions in ecology with R. Springer, 574 pp.](http://www.springer.com/gp/book/9780387874579)
* [Koricheva, J., Gurevitch, J., and Mengersen, K. (2013). Handbook of meta-analysis in ecology and evolution. Princeton University Press, 520 pp.](https://press.princeton.edu/titles/10045.html)

# Course Policies

## Social Media
I will post relevant information using the Twitter hashtag #MIStats. You may use this hashtag as well. Please do not post things that occur in class (e.g. quotes, pictures) without permission.

## Code of Conduct
You have the right to expect a supportive, safe environment in this course. This course will be governed by my [Fisheries Science Code of Conduct](/courses/coursesCodeofConduct), which all participants are expected to respect.

## Digital Competency
Students are expected to have computer competency. You should be able to operate Microsoft Word, Powerpoint, and Excel, or equivalent (e.g. [OpenOffice](https://www.openoffice.org/) or [Google Docs](https://docs.google.com/)). You should be able to download and install software onto your computer. Please install [R Statistical Software](https://www.r-project.org/) and [RStudio](https://www.rstudio.com/) prior to begining the course.

If you lack these skills, please consult [training materials](https://www.microsoft.com/en-us/learning/training.aspx) on your own time. **Please bring a laptop to every class.**

Students should be proficient with R Statistical Software. Normally, students will have completed [FISH 6002](https://mifisheriesscience.github.io/courses/6002Data/) or equivalent training prior to starting FISH 6003. FISH 6002 is not a formal pre-requisite - you may demonstrate R competency in other ways.

## E-mail Policy
E-mail is not a primary tool for communication in this class. If you have questions about course content, your order of operation should be:

1. Check the syllabus
2. Ask in class, or discuss with colleagues
3. Ask on Microsoft Teams (this way, everyone can benefit from an answer)
4. Request a meeting with me (normally, to be held during office hours)

If emailing me a meeting request, use the subject line "FISH 6003: Meeting request." Please indicate three potential meeting times (Start with my office hours. Only if those don't work, propose alternatives) and explain in 1-3 lines what you want to meet about.

E-mail is impersonal, burdeonsome, and adds to confusion, so let's minimize it.

## Microsoft Teams
Microsoft Teams is a collaboration suite that we will use in this class. We will use it for submission of all assignments, and I will give feedback through this platform.

All Marine Institute students have access to this by default. Students not enrolled at MI will coordinate with the instructor to get temporary Teams access.

## Class Participation
There will be a LOT going on in this class. Most assignments are designed to be completed mostly in-class time. The class is highly collaborative, meaning you need to be present to do it.

Accomodations will be made for serious illness or other extenuating circumstances. However, it is the student's responsibility to stay caught up with course materials - and missing in-class activities will result in a decreased participation grade.

So please, don't make it your plan to miss class!

## Academic Honesty
This course is governed by MUN's [regulations on academic misconduct](http://www.mun.ca/regoff/calendar/sectionNo=REGS-0748).

# Course Schedule

| **Chapter**  | **Dates**  | **Theme**  |
|-----------|------------|-------------|
|1| January 7 and 8  | [Introduction, and the Philosophy of Statistics](/courses/6003Stats/6003Week1/)|
|2| January 14, 15, 28, 29 | [Data Exploration](/courses/6003Stats/6003Week2/) |
|3| February 4 and 5   | [Simple Linear Regression](/courses/6003Stats/6003Week3/)  |
|4| February 11 and 12 | [Multiple Linear Regression](/courses/6003Stats/6003Week4/) |
|X| February 17 - 21 | [*Winter semester break*] |
|5| February 25 and 26 | [Model Selection](/courses/6003Stats/6003Week5/) |
|6| March 3 and 4 | [Generalized Linear Models: Part 1](/courses/6003Stats/6003Week6/)|
|7| March 10 and 11 | [Generalized Linear Models: Part 2](/courses/6003Stats/6003Week7/) |
|8| March 17 and 18 | [Mixed Models](/courses/6003Stats/6003Week8/) |
|9| March 24 and 25 | [Generalized Linear Mixed Models](/courses/6003Stats/6003Week9/) |
|10| March 31 and April 1  | [Generalized Linear Mixed Models: Part 2](/courses/6003Stats/6003Week9/) |
|11| April 7 and 8 | [Meta-Analysis](/courses/6003Stats/6003Week12/) |
|12| April 7 and 8 | [Brief Intro to Power Analysis, and Bayesian Stats](/courses/6003Stats/6003Week11/) |

# Assignments and Grading

- Major assignment (60%)
- Minor assignments (30%)
- Participation in in-class activities and assignments (10%)


text:
package org.smartdata.hdfs.action;

import org.apache.hadoop.fs.Path;
import static org.junit.Assert.*;

import org.apache.hadoop.hdfs.protocol.HdfsFileStatus;
import org.junit.Test;

import java.util.HashMap;
import java.util.Map;

public class TestErasureCodingAction extends TestErasureCodingMiniCluster {

  @Test
  public void testEcActionForFile() throws Exception {
    String srcPath = "/ec/test_file";
    createTestFile(srcPath, 1000);
    dfsClient.setStoragePolicy(srcPath, "COLD");
    HdfsFileStatus srcFileStatus = dfsClient.getFileInfo(srcPath);
    // The file is expected to be stored in replication.
    assertEquals(null, srcFileStatus.getErasureCodingPolicy());

    ErasureCodingAction ecAction = new ErasureCodingAction();
    ecAction.setContext(smartContext);
    String ecTmpPath = "/ssm/ec_tmp/tmp_file";
    Map<String, String> args = new HashMap<>();
    args.put(HdfsAction.FILE_PATH, srcPath);
    args.put(ErasureCodingBase.EC_TMP, ecTmpPath);
    args.put(ErasureCodingAction.EC_POLICY_NAME, ecPolicy.getName());
    ecAction.init(args);
    ecAction.run();
    assertTrue(ecAction.getExpectedAfterRun());
    HdfsFileStatus fileStatus = dfsClient.getFileInfo(srcPath);
    // The file is expected to be stored in EC with default policy.
    assertEquals(ecPolicy, fileStatus.getErasureCodingPolicy());
    // Examine the consistency of file attributes.
    assertEquals(srcFileStatus.getLen(), fileStatus.getLen());
    assertEquals(srcFileStatus.getModificationTime(), fileStatus.getModificationTime());
    assertEquals(srcFileStatus.getAccessTime(), fileStatus.getAccessTime());
    assertEquals(srcFileStatus.getOwner(), fileStatus.getOwner());
    assertEquals(srcFileStatus.getGroup(), fileStatus.getGroup());
    assertEquals(srcFileStatus.getPermission(), fileStatus.getPermission());
    // UNDEF storage policy makes the converted file's storage type uncertain, so it is excluded.
    if (srcFileStatus.getStoragePolicy() != 0) {
      assertEquals(srcFileStatus.getStoragePolicy(), fileStatus.getStoragePolicy());
    }
  }

  @Test
  public void testEcActionForDir() throws Exception {
    String srcDirPath = "/test_dir/";
    dfs.mkdirs(new Path(srcDirPath));
    assertEquals(null, dfsClient.getErasureCodingPolicy(srcDirPath));

    ErasureCodingAction ecAction = new ErasureCodingAction();
    ecAction.setContext(smartContext);
    Map<String, String> args = new HashMap<>();
    args.put(HdfsAction.FILE_PATH, srcDirPath);
    args.put(ErasureCodingAction.EC_POLICY_NAME, ecPolicy.getName());
    ecAction.init(args);
    ecAction.run();
    assertTrue(ecAction.getExpectedAfterRun());
    assertEquals(dfsClient.getErasureCodingPolicy(srcDirPath), ecPolicy);

    String srcFilePath = "/test_dir/test_file";
    createTestFile(srcFilePath, 1000);
    // The newly created file should has the same EC policy as parent directory.
    assertEquals(dfsClient.getErasureCodingPolicy(srcFilePath), ecPolicy);
  }
}


text:
require 'settingslogic'
require 'rest_client'

require 'takenet_sms/app_config'
require 'takenet_sms/models'


text:
<?php

/*******************************************************************************

 *  Marketplace Web Service PHP5 Library
 *  Generated: Thu May 07 13:07:36 PDT 2009
 *
 */

/**
 *  @see MarketplaceWebService_Model
 */
include_once (__DIR__ . '/../Model.php');

/**
 * MarketplaceWebService_Model_ManageReportScheduleResult
 *
 * Properties:
 *

 *
 *
Count: int

 *
ReportSchedule: MarketplaceWebService_Model_ReportSchedule

 *
 *

 */
class MarketplaceWebService_Model_ManageReportScheduleResult extends MarketplaceWebService_Model
{

    /**
     * Construct new MarketplaceWebService_Model_ManageReportScheduleResult
     *
     * @param mixed $data DOMElement or Associative Array to construct from.
     *
     * Valid properties:
     *

     *
     *
Count: int

     *
ReportSchedule: MarketplaceWebService_Model_ReportSchedule

     *
     *

     */
    public function __construct($data = null)
    {
        $this->fields = array (
        'Count' => array('FieldValue' => null, 'FieldType' => 'int'),
        'ReportSchedule' => array('FieldValue' => array(), 'FieldType' => array('MarketplaceWebService_Model_ReportSchedule')),
        );
        parent::__construct($data);
    }

        /**
     * Gets the value of the Count property.
     *
     * @return int Count
     */
    public function getCount()
    {
        return $this->fields['Count']['FieldValue'];
    }

    /**
     * Sets the value of the Count property.
     *
     * @param int Count
     * @return this instance
     */
    public function setCount($value)
    {
        $this->fields['Count']['FieldValue'] = $value;
        return $this;
    }

    /**
     * Sets the value of the Count and returns this instance
     *
     * @param int $value Count
     * @return MarketplaceWebService_Model_ManageReportScheduleResult instance
     */
    public function withCount($value)
    {
        $this->setCount($value);
        return $this;
    }

    /**
     * Checks if Count is set
     *
     * @return bool true if Count  is set
     */
    public function isSetCount()
    {
        return !is_null($this->fields['Count']['FieldValue']);
    }

    /**
     * Gets the value of the ReportSchedule.
     *
     * @return array of ReportSchedule ReportSchedule
     */
    public function getReportScheduleList()
    {
        return $this->fields['ReportSchedule']['FieldValue'];
    }

    /**
     * Sets the value of the ReportSchedule.
     *
     * @param mixed ReportSchedule or an array of ReportSchedule ReportSchedule
     * @return this instance
     */
    public function setReportScheduleList($reportSchedule)
    {
        if (!$this->_isNumericArray($reportSchedule)) {
            $reportSchedule =  array ($reportSchedule);
        }
        $this->fields['ReportSchedule']['FieldValue'] = $reportSchedule;
        return $this;
    }

    /**
     * Sets single or multiple values of ReportSchedule list via variable number of arguments.
     * For example, to set the list with two elements, simply pass two values as arguments to this function
     * withReportSchedule($reportSchedule1, $reportSchedule2)
     *
     * @param ReportSchedule  $reportScheduleArgs one or more ReportSchedule
     * @return MarketplaceWebService_Model_ManageReportScheduleResult  instance
     */
    public function withReportSchedule($reportScheduleArgs)
    {
        foreach (func_get_args() as $reportSchedule) {
            $this->fields['ReportSchedule']['FieldValue'][] = $reportSchedule;
        }
        return $this;
    }

    /**
     * Checks if ReportSchedule list is non-empty
     *
     * @return bool true if ReportSchedule list is non-empty
     */
    public function isSetReportSchedule()
    {
        return count ($this->fields['ReportSchedule']['FieldValue']) > 0;
    }

}


text:
package net.sf.jasperreports.charts;

import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;

/**
 * Used only in combination with High-Low charts, this type of plot lets users customize
 * the labels for both axes, like all the other axis-oriented plots.
 *

 * This special type of plot draws the items as vertical lines that start at the high value and
 * go downward to the low value. On each line the plot displays by default small ticks to
 * indicate the open and close values corresponding to the current item. To suppress these
 * ticks, set to false the two flags available inside the plot definition: isShowCloseTicks
 * and isShowOpenTicks.
 *
 * @author Ionut Nedelcu (ionutned@users.sourceforge.net)
 * @version $Id: JRHighLowPlot.java 7199 2014-08-27 13:58:10Z teodord $
 */
public interface JRHighLowPlot extends JRChartPlot, JRTimeAxisFormat, JRValueAxisFormat
{

	/**
	 *
	 */
	public JRExpression getTimeAxisLabelExpression();

	/**
	 *
	 */
	public JRExpression getValueAxisLabelExpression();

	/**
	 *
	 */
	public JRExpression getDomainAxisMinValueExpression();

	/**
	 *
	 */
	public JRExpression getDomainAxisMaxValueExpression();

	/**
	 *
	 */
	public JRExpression getRangeAxisMinValueExpression();

	/**
	 *
	 */
	public JRExpression getRangeAxisMaxValueExpression();

	/**
	 *
	 */
	public Boolean getShowOpenTicks();

	/**
	 *
	 */
	public Boolean getShowCloseTicks();

}


text:
package hudson.maven.reporters;

import hudson.maven.MavenEmbedder;
import hudson.maven.MavenEmbedderException;
import hudson.model.Action;
import hudson.model.TaskListener;

import java.io.IOException;
import java.io.PrintStream;
import java.util.List;
import java.util.Map;

import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.deployer.ArtifactDeployer;
import org.apache.maven.artifact.deployer.ArtifactDeploymentException;
import org.apache.maven.artifact.factory.ArtifactFactory;
import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
import org.apache.maven.artifact.installer.ArtifactInstallationException;
import org.apache.maven.artifact.installer.ArtifactInstaller;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.project.artifact.ProjectArtifactMetadata;
import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
import hudson.maven.AggregatableAction;
import hudson.maven.MavenAggregatedReport;
import hudson.maven.MavenBuild;
import hudson.maven.MavenModule;
import hudson.maven.MavenModuleSetBuild;
import hudson.maven.MavenUtil;
import hudson.maven.RedeployPublisher.WrappedArtifactRepository;

/**
 * {@link Action} that remembers {@link MavenArtifact artifact}s that are built.
 *
 * Defines the methods and UIs to do (delayed) deployment and installation.
 *
 * @author Kohsuke Kawaguchi
 * @see MavenArtifactArchiver
 */
public class MavenArtifactRecord extends MavenAbstractArtifactRecord<MavenBuild> implements AggregatableAction {
    /**
     * The build to which this record belongs.
     */
    public final MavenBuild parent;

    /**
     * POM artifact.
     */
    public final MavenArtifact pomArtifact;

    /**
     * The main artifact (like jar or war, but could be anything.)
     *
     * If this is a POM module, the main artifact contains the same value as {@link #pomArtifact}.
     */
    public final MavenArtifact mainArtifact;

    /**
     * Attached artifacts. Can be empty but never null.
     */
    public final List<MavenArtifact> attachedArtifacts;

    public MavenArtifactRecord(MavenBuild parent, MavenArtifact pomArtifact, MavenArtifact mainArtifact, List<MavenArtifact> attachedArtifacts) {
        assert parent!=null;
        assert pomArtifact!=null;
        assert attachedArtifacts!=null;
        if(mainArtifact==null)  mainArtifact=pomArtifact;

        this.parent = parent;
        this.pomArtifact = pomArtifact;
        this.mainArtifact = mainArtifact;
        this.attachedArtifacts = attachedArtifacts;
    }

    public MavenBuild getBuild() {
        return parent;
    }

    public boolean isPOM() {
        return mainArtifact.isPOM();
    }

    public MavenAggregatedReport createAggregatedAction(MavenModuleSetBuild build, Map<MavenModule, List<MavenBuild>> moduleBuilds) {
        return new MavenAggregatedArtifactRecord(build);
    }

    @Override
    public void deploy(MavenEmbedder embedder, ArtifactRepository deploymentRepository, TaskListener listener) throws MavenEmbedderException, IOException, ComponentLookupException, ArtifactDeploymentException {
        ArtifactHandlerManager handlerManager = embedder.lookup(ArtifactHandlerManager.class);

        ArtifactFactory factory = embedder.lookup(ArtifactFactory.class);
        PrintStream logger = listener.getLogger();
        boolean maven3orLater = MavenUtil.maven3orLater(parent.getModuleSetBuild().getMavenVersionUsed());
        if (!deploymentRepository.isUniqueVersion() && maven3orLater) {
            logger.println("uniqueVersion == false is not anymore supported in maven 3");
            ((WrappedArtifactRepository) deploymentRepository).setUniqueVersion( true );
        }
        Artifact main = mainArtifact.toArtifact(handlerManager,factory,parent);
        if(!isPOM())
            main.addMetadata(new ProjectArtifactMetadata(main,pomArtifact.getFile(parent)));

        // deploy the main artifact. This also deploys the POM
        logger.println(Messages.MavenArtifact_DeployingMainArtifact(main.getFile().getName()));
        deployMavenArtifact( main, deploymentRepository, embedder );

        for (MavenArtifact aa : attachedArtifacts) {
            Artifact a = aa.toArtifact(handlerManager,factory, parent);
            logger.println(Messages.MavenArtifact_DeployingAttachedArtifact(a.getFile().getName()));
            deployMavenArtifact( a, deploymentRepository, embedder );
        }
    }

    protected void deployMavenArtifact(Artifact artifact, ArtifactRepository deploymentRepository, MavenEmbedder embedder)
        throws ArtifactDeploymentException, ComponentLookupException {

        ArtifactDeployer deployer = embedder.lookup(ArtifactDeployer.class,"maven2");
        deployer.deploy(artifact.getFile(),artifact,deploymentRepository,embedder.getLocalRepository());
    }
    /**
     * Installs the artifact to the local Maven repository.
     */
    public void install(MavenEmbedder embedder) throws MavenEmbedderException, IOException, ComponentLookupException, ArtifactInstallationException {
        ArtifactHandlerManager handlerManager = embedder.lookup(ArtifactHandlerManager.class);
        ArtifactInstaller installer = embedder.lookup(ArtifactInstaller.class);
        ArtifactFactory factory = embedder.lookup(ArtifactFactory.class);

        Artifact main = mainArtifact.toArtifact(handlerManager,factory,parent);
        if(!isPOM())
            main.addMetadata(new ProjectArtifactMetadata(main,pomArtifact.getFile(parent)));
        installer.install(mainArtifact.getFile(parent),main,embedder.getLocalRepository());

        for (MavenArtifact aa : attachedArtifacts)
            installer.install(aa.getFile(parent),aa.toArtifact(handlerManager,factory,parent),embedder.getLocalRepository());
    }

    public void recordFingerprints() throws IOException {
        // record fingerprints
        if(mainArtifact!=null)
            mainArtifact.recordFingerprint(parent);
        for (MavenArtifact a : attachedArtifacts)
            a.recordFingerprint(parent);
    }
}


text:
package agozon

import (
	"encoding/xml"
	"io/ioutil"
	"net/http"
	"net/url"
	"strings"
	"time"
	//"github.com/parnurzeal/gorequest"
	//"crypto/tls"
	"fmt"
)

// Default User agent.
// User can customize it later.
var UserAgent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36"

// Get response, from url
func HTTPGet(theURL string) (response []byte, err error) {
	/*tr := &http.Transport{
		TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
	}*/

	client := &http.Client{ /*Transport:tr*/ }

	fmt.Println(theURL)

	req, err := http.NewRequest("GET", theURL, nil)
	req.Close = true
	req.Header.Set("User-Agent", UserAgent)

	resp, err := client.Do(req)

	if err != nil {
		return
	}

	defer resp.Body.Close()

	response, err = ioutil.ReadAll(resp.Body)
	if err != nil {
		return
	}
	return
	/*request := gorequest.New()
	_, body, errs := request.Get(theURL).Set("User-Agent", UserAgent).End()
	if len(errs) > 0 {
		return []byte(""), errs[0]
	}
	return []byte(body), */
}

// type Request from default XML Schema
type Request struct {
	// Exported Fields
	IsValid                 bool                     `xml:",omitempty" json:",omitempty"`
	BrowseNodeLookupRequest *BrowseNodeLookupRequest `xml:",omitempty" json:",omitempty"`
	ItemSearchRequest       *ItemSearchRequest       `xml:",omitempty" json:",omitempty"`
	ItemLookupRequest       *ItemLookupRequest       `xml:",omitempty" json:",omitempty"`
	SimilarityLookupRequest *SimilarityLookupRequest `xml:",omitempty" json:",omitempty"`
	CartGetRequest          *CartGetRequest          `xml:",omitempty" json:",omitempty"`
	CartAddRequest          *CartAddRequest          `xml:",omitempty" json:",omitempty"`
	CartCreateRequest       *CartCreateRequest       `xml:",omitempty" json:",omitempty"`
	CartModifyRequest       *CartModifyRequest       `xml:",omitempty" json:",omitempty"`
	CartClearRequest        *CartClearRequest        `xml:",omitempty" json:",omitempty"`
	Errors                  *Errors                  `xml:"Errors>Error,omitempty" json:",omitempty"`
	URL                     url.URL

	// Unexported fields, for internal use only
	associateTag, awsAccessKeyId, secretKey string
	response                                string
	locale                                  string
}

func (r *Request) setConfig(AssociateTag string, AWSAccessKeyId string, SecretAccessKey string) {
	r.associateTag = AssociateTag
	r.awsAccessKeyId = AWSAccessKeyId
	r.secretKey = SecretAccessKey
}

// Create new Request, with default params
func (r *Request) create() {
	// build default query
	q := url.Values{
		"Service":        []string{ServiceName},
		"AWSAccessKeyId": []string{r.awsAccessKeyId},
		"AssociateTag":   []string{r.associateTag},
		"Version":        []string{Version},
	}.Encode()

	// add query
	r.URL.RawQuery = q
}

// Set locale information.
func (r *Request) SetLocale(localeName string) (err error) {
	r.locale = localeName
	// base url
	endpoint := locales.Select(localeName)
	u, err := url.Parse(endpoint)
	r.URL = *u
	return
}

// Add single param, to the request.
func (r *Request) AddParam(key string, val string) {
	// add single query to URL
	q := r.URL.Query()
	q.Add(key, val)

	// encode url again
	r.URL.RawQuery = q.Encode()
}

// Add multiple params, to the request.
func (r *Request) AddParams(queries map[string]string) {
	// range the queries
	for key, val := range queries {
		// if value is empty,
		// delete the query from queries.
		if val == "" {
			delete(queries, key)
		}
	}
	// add multiple params, to the query
	q := r.URL.Query()
	for key, val := range queries {
		q.Add(key, val)
	}
	// apply to raw query
	r.URL.RawQuery = q.Encode()
}

// Set Response Group
func (r *Request) SetResponseGroup(responseGroup ...string) {
	q := r.URL.Query()
	q.Add("ResponseGroup", strings.Join(responseGroup, ","))
	r.URL.RawQuery = q.Encode()
}

// Call the operation
func (r *Request) CallOperation(operationName string) (err error) {
	r.AddParam("Timestamp", time.Now().Format(time.RFC3339))
	r.AddParam("Operation", operationName)
	signedURL := new(SignedURL)
	signedURL.Create(r.URL.String(), r.secretKey)

	// get request
	theURL := signedURL.String()

	// Get response via REST http get call
	response, err := HTTPGet(theURL)

	// if error not null return error
	if err != nil {
		return
	}
	// convert response to string,
	// and add to response
	r.response = string(response)
	return
}

// Get Response from Amazon.
// And convert it to corresponding struct.
func (r *Request) Get(response interface{}) (err error) {
	// unmarshal the response xml, to defined
	// response struct
	err = xml.Unmarshal([]byte(r.response), response)

	// if error return error
	if err != nil {
		return
	}

	// return the struct
	return
}


text:
module Plugins::FrontCache::FrontCacheHelper

  # save as cache all pages configured on settings of this plugin for public users
  def front_cache_front_before_load
    if current_site.get_option("refresh_cache") # clear cache every restart server
      front_cache_clean
      current_site.set_option("refresh_cache", false)
    end

    return if signin? || Rails.env == "development" || Rails.env == "test" || !request.get? # avoid cache if current visitor is logged in or development environment

    cache_key = request.fullpath.parameterize
    if !flash.keys.present? && front_cache_exist?(cache_key) # recover cache file
      Rails.logger.info "Camaleon CMS - readed cache: #{front_cache_plugin_get_path(cache_key)}"
      response.headers['PLUGIN_FRONT_CACHE'] = 'TRUE'
      args = {data: front_cache_get(cache_key).gsub("{{form_authenticity_token}}", form_authenticity_token)}; hooks_run('front_cache_reading_cache', args)
      render html: args[:data].html_safe
      return
    end

    @caches = current_site.get_meta("front_cache_elements")
    @_plugin_do_cache = false
    if @caches[:paths].include?(request.original_url) || @caches[:paths].include?(request.path_info) || front_cache_plugin_match_path_patterns?(request.original_url, request.path_info) || (params[:action] == 'index' && params[:controller] == 'camaleon_cms/frontend' && @caches[:home].present?) # cache paths and home page
      @_plugin_do_cache = true
    elsif params[:action] == "post" && params[:controller] == 'camaleon_cms/frontend' && !params[:draft_id].present?
      begin
        post = current_site.the_posts.find_by_slug(params[:slug]).decorate
        if post.can_visit? && post.visibility != "private"
          post = post
          if (@caches[:skip_posts] || []).include?(post.id.to_s)
            @_plugin_do_cache = false
          else
            @_plugin_do_cache = true  if (@caches[:post_types] || []).include?(post.post_type_id.to_s) || (@caches[:posts] || []).include?(post.id.to_s)
          end
        end
      rescue # skip post not found
      end
    end
    response.headers['PLUGIN_FRONT_CACHE'] = 'TRUE' if @_plugin_do_cache
  end

  def front_cache_front_after_load
    cache_key = request.fullpath.parameterize
    if @_plugin_do_cache && !flash.keys.present?
      args = {data: response.body
                        .gsub(/csrf-token" content="(.*?)"/, 'csrf-token" content="{{form_authenticity_token}}"')
                        .gsub(/name="authenticity_token" value="(.*?)"/, 'name="authenticity_token" value="{{form_authenticity_token}}"')}
      hooks_run('front_cache_writing_cache', args)
      front_cache_plugin_cache_create(cache_key, args[:data])
      Rails.logger.info "Camaleon CMS - cache saved as: #{front_cache_plugin_get_path(cache_key)}"
    end
  end

  # on install plugin
  def front_cache_on_active(plugin)
    current_site.set_meta("front_cache_elements", {paths: [],
        posts: [],
        post_types: [current_site.post_types.where(slug: "page").first.id],
        skip_posts: [],
        home: true,
        cache_login: true}) unless current_site.get_meta("front_cache_elements", nil).present?
  end

  # on uninstall plugin
  def front_cache_on_inactive(plugin)
    # current_site.delete_meta("front_cache_elements")
  end

  # cache actions (for logged users)
  def front_cache_on_render(args)
  end

  # expire cache for a page after comment registered or updated
  def front_cache_before_load
  end

  def front_cache_plugin_options(arg)
    arg[:links] << link_to(t('plugin.front_cache.settings'), admin_plugins_front_cache_settings_path)
    arg[:links] << link_to(t('plugin.front_cache.clean_cache'), admin_plugins_front_cache_clean_path)
  end

  # save as cache all post requests
  def front_cache_post_requests
    if (request.post? || request.patch?)
      front_cache_clean()
    end
  end

  # clear all frontend cache files
  def front_cache_clean
    FileUtils.rm_rf(front_cache_plugin_get_path) # clear site pages cache
  end

  private

  def front_cache_exist?(key)
    File.exist?(front_cache_plugin_get_path(key))
  end

  def front_cache_get(key)
    File.read(front_cache_plugin_get_path(key))
  end

  def front_cache_destroy(key)
    FileUtils.rm_f(front_cache_plugin_get_path(key)) # clear site pages cache
  end

  def front_cache_plugin_cache_create(key, content)
    FileUtils.mkdir_p(front_cache_plugin_get_path) unless Dir.exist?(front_cache_plugin_get_path)
    File.open(front_cache_plugin_get_path(key), 'wb'){ |fo| fo.write(content) }
    content
  end

  # return the physical path of cache directory
  # key: (string, optional) the key of the cached page
  def front_cache_plugin_get_path(key = nil)
    unless key.nil?
      Rails.root.join("tmp", "cache", "pages", current_site.id.to_s, "#{key}.html").to_s
    else
      Rails.root.join("tmp", "cache", "pages", current_site.id.to_s).to_s
    end

  end

  def front_cache_plugin_match_path_patterns?(key, key2)
    @caches[:paths].any?{|path_pattern| key =~ Regexp.new(path_pattern) || key2 =~ Regexp.new(path_pattern) }
  end
end


text:
package fr.lteconsulting.hexacss.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.shared.GWT;
import com.google.gwt.event.dom.client.ChangeEvent;
import com.google.gwt.event.dom.client.ChangeHandler;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.ListBox;
import com.google.gwt.user.client.ui.RootPanel;

import fr.lteconsulting.hexa.client.css.ThemeManager;

public class Application implements EntryPoint
{
	@Override
	public void onModuleLoad()
	{
		MyCss css = GWT.create( MyCss.class );

		final ListBox listBox = new ListBox();
		listBox.addItem( "theme-1" );
		listBox.addItem( "theme-2" );
		listBox.addItem( "theme-3" );
		listBox.addChangeHandler( new ChangeHandler()
		{
			@Override
			public void onChange( ChangeEvent event )
			{
				ThemeManager.get().setTheme( listBox.getSelectedValue() );
			}
		} );

		Label label = new Label("This is the application, you can change theme with the list box above");
		label.addStyleName( css.panel() );

		RootPanel.get().add( listBox );
		RootPanel.get().add( label );
	}
}


text:
import { configure, shallow, ShallowWrapper } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import React from 'react';

import { ILineGraphProps, LineGraph } from './LineGraph';

configure({ adapter: new Adapter() });

describe('Paginator', () => {
  let props: ILineGraphProps;

  beforeAll(() => {
    props = {
      data: [{ id: '', data: [] }],
      yAxisLabel: '',
      xAxisLabel: '',
      xAxisUnits: '',
      yAxisUnits: '',
    };
  });

  describe('Shallow component', () => {
    let shallowWrapper: ShallowWrapper;

    beforeEach(() => {
      shallowWrapper = shallow(<LineGraph {...props} />);
    });

    it('Renders without crashing', () => {
      expect(shallowWrapper.length).toEqual(1);
    });

    it('Matches percent y-axis snapshot', () => {
      shallowWrapper.setProps({
        data: [
          {
            id: '% Test',
            data: [{ x: 1614803627951, y: 0 }],
          },
        ],
        yAxisLabel: 'Percent (%)',
        xAxisLabel: 'Time Stamp',
      });
      expect(shallowWrapper).toMatchSnapshot();
    });

    it('Matches throughput y-axis snapshot', () => {
      shallowWrapper.setProps({
        data: [
          {
            id: 'Test',
            data: [{ x: 1614803627951, y: 0 }],
          },
        ],
        yAxisLabel: 'Raw Throughput (Bytes/Minute)',
        xAxisLabel: 'Time Stamp',
      });
      expect(shallowWrapper).toMatchSnapshot();
    });
  });
});


text:
package org.apache.directory.shared.kerberos.codec.krbPriv.actions;

import org.apache.directory.api.asn1.DecoderException;
import org.apache.directory.api.asn1.ber.grammar.GrammarAction;
import org.apache.directory.api.asn1.ber.tlv.TLV;
import org.apache.directory.api.i18n.I18n;
import org.apache.directory.shared.kerberos.codec.krbPriv.KrbPrivContainer;
import org.apache.directory.shared.kerberos.messages.KrbPriv;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * The action used to initialize the KrbPriv object
 *
 * @author Apache Directory Project
 */
public class KrbPrivInit extends GrammarAction<KrbPrivContainer>
{
    /** The logger */
    private static final Logger LOG = LoggerFactory.getLogger( KrbPrivInit.class );

    /** Speedup for logs */
    private static final boolean IS_DEBUG = LOG.isDebugEnabled();

    /**
     * Instantiates a new KrbPrivInit action.
     */
    public KrbPrivInit()
    {
        super( "Creates a KrbPriv instance" );
    }

    /**
     * {@inheritDoc}
     */
    public void action( KrbPrivContainer krbPrivContainer ) throws DecoderException
    {
        TLV tlv = krbPrivContainer.getCurrentTLV();

        // The Length should not be null
        if ( tlv.getLength() == 0 )
        {
            LOG.error( I18n.err( I18n.ERR_04066 ) );

            // This will generate a PROTOCOL_ERROR
            throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
        }

        KrbPriv krbPriv = new KrbPriv();
        krbPrivContainer.setKrbPriv( krbPriv );

        if ( IS_DEBUG )
        {
            LOG.debug( "KrbPriv created" );
        }
    }
}


text:
import formatterPtBR from "./pt-BR/formatter";

const factory = locale => {
    switch ( locale ) {
        case "pt-BR":
            return formatterPtBR;
        default:
            return null;
    }
};

const formatter = locale => factory( locale );
export default formatter;


text:
      SUBROUTINE DLARRR( N, D, E, INFO )
*
*  -- LAPACK auxiliary routine (version 3.1) --
*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
*     November 2006
*
*     .. Scalar Arguments ..
      INTEGER            N, INFO
*     ..
*     .. Array Arguments ..
      DOUBLE PRECISION   D( * ), E( * )
*     ..
*
*
*  Purpose
*  =======
*
*  Perform tests to decide whether the symmetric tridiagonal matrix T
*  warrants expensive computations which guarantee high relative accuracy
*  in the eigenvalues.
*
*  Arguments
*  =========
*
*  N       (input) INTEGER
*          The order of the matrix. N > 0.
*
*  D       (input) DOUBLE PRECISION array, dimension (N)
*          The N diagonal elements of the tridiagonal matrix T.
*
*  E       (input/output) DOUBLE PRECISION array, dimension (N)
*          On entry, the first (N-1) entries contain the subdiagonal
*          elements of the tridiagonal matrix T; E(N) is set to ZERO.
*
*  INFO    (output) INTEGER
*          INFO = 0(default) : the matrix warrants computations preserving
*                              relative accuracy.
*          INFO = 1          : the matrix warrants computations guaranteeing
*                              only absolute accuracy.
*
*  Further Details
*  ===============
*
*  Based on contributions by
*     Beresford Parlett, University of California, Berkeley, USA
*     Jim Demmel, University of California, Berkeley, USA
*     Inderjit Dhillon, University of Texas, Austin, USA
*     Osni Marques, LBNL/NERSC, USA
*     Christof Voemel, University of California, Berkeley, USA
*
*  =====================================================================
*
*     .. Parameters ..
      DOUBLE PRECISION   ZERO, RELCOND
      PARAMETER          ( ZERO = 0.0D0,
     $                     RELCOND = 0.999D0 )
*     ..
*     .. Local Scalars ..
      INTEGER            I
      LOGICAL            YESREL
      DOUBLE PRECISION   EPS, SAFMIN, SMLNUM, RMIN, TMP, TMP2,
     $          OFFDIG, OFFDIG2

*     ..
*     .. External Functions ..
      DOUBLE PRECISION   DLAMCH
      EXTERNAL           DLAMCH
*     ..
*     .. Intrinsic Functions ..
      INTRINSIC          ABS
*     ..
*     .. Executable Statements ..
*
*     As a default, do NOT go for relative-accuracy preserving computations.
      INFO = 1

      SAFMIN = DLAMCH( 'Safe minimum' )
      EPS = DLAMCH( 'Precision' )
      SMLNUM = SAFMIN / EPS
      RMIN = SQRT( SMLNUM )

*     Tests for relative accuracy
*
*     Test for scaled diagonal dominance
*     Scale the diagonal entries to one and check whether the sum of the
*     off-diagonals is less than one
*
*     The sdd relative error bounds have a 1/(1- 2*x) factor in them,
*     x = max(OFFDIG + OFFDIG2), so when x is close to 1/2, no relative
*     accuracy is promised.  In the notation of the code fragment below,
*     1/(1 - (OFFDIG + OFFDIG2)) is the condition number.
*     We don't think it is worth going into "sdd mode" unless the relative
*     condition number is reasonable, not 1/macheps.
*     The threshold should be compatible with other thresholds used in the
*     code. We set  OFFDIG + OFFDIG2 <= .999 =: RELCOND, it corresponds
*     to losing at most 3 decimal digits: 1 / (1 - (OFFDIG + OFFDIG2)) <= 1000
*     instead of the current OFFDIG + OFFDIG2 < 1
*
      YESREL = .TRUE.
      OFFDIG = ZERO
      TMP = SQRT(ABS(D(1)))
      IF (TMP.LT.RMIN) YESREL = .FALSE.
      IF(.NOT.YESREL) GOTO 11
      DO 10 I = 2, N
         TMP2 = SQRT(ABS(D(I)))
         IF (TMP2.LT.RMIN) YESREL = .FALSE.
         IF(.NOT.YESREL) GOTO 11
         OFFDIG2 = ABS(E(I-1))/(TMP*TMP2)
         IF(OFFDIG+OFFDIG2.GE.RELCOND) YESREL = .FALSE.
         IF(.NOT.YESREL) GOTO 11
         TMP = TMP2
         OFFDIG = OFFDIG2
 10   CONTINUE
 11   CONTINUE

      IF( YESREL ) THEN
         INFO = 0
         RETURN
      ELSE
      ENDIF
*

*
*     *** MORE TO BE IMPLEMENTED ***
*

*
*     Test if the lower bidiagonal matrix L from T = L D L^T
*     (zero shift facto) is well conditioned
*

*
*     Test if the upper bidiagonal matrix U from T = U D U^T
*     (zero shift facto) is well conditioned.
*     In this case, the matrix needs to be flipped and, at the end
*     of the eigenvector computation, the flip needs to be applied
*     to the computed eigenvectors (and the support)
*

*
      RETURN
*
*     END OF DLARRR
*
      END


text:
namespace importer {

// Returns the key to be used in HKCU to look for IE's favorites order blob.
// Overridable by tests via ImporterTestRegistryOverrider.
std::wstring GetIEFavoritesOrderKey();

// Returns the key to be used in HKCU to look for IE7 passwords.
// Overridable by tests via ImporterTestRegistryOverrider.
std::wstring GetIE7PasswordsKey();

// Returns the key to be used in HKCU to look for IE settings.
// Overridable by tests via ImporterTestRegistryOverrider.
std::wstring GetIESettingsKey();

}  // namespace importer

#endif  // CHROME_COMMON_IMPORTER_IE_IMPORTER_UTILS_WIN_H_


text:
<Alloy>
	<Window id = "container">
		<ImageView id = "topImage"></ImageView>

		<ImageView id = "battleTop"></ImageView>

		<View id="scrollContainer">
			<ScrollableView id="scrollView1">
				<View class ="batman">
					BATMAN
				</View>

				<View class = "superman">
					SUPERMAN
				</View>

				<View class = "spiderman">
					SPIDERMAN
				</View>

				<View class = "ironman">
					IRONMAN
				</View>

			</ScrollableView>

			<ImageView id = "versus"></ImageView>
			<ScrollableView id="scrollView2">
				<View class ="batman">
					BATMAN
				</View>

				<View class = "superman">
					SUPERMAN
				</View>

				<View class = "spiderman">
					SPIDERMAN
				</View>

				<View class = "ironman">
					IRONMAN
				</View>
			</ScrollableView>

		</View>

		<View id="buttons">
			<Button id="back" onClick="goback"></Button>
			<Button id = "next" onClick= "nextpage"></Button>
		</View>
	</Window>
</Alloy>


text:
using System;
using System.Xml.Serialization;

namespace Cielo4Net
{
    /// <summary>
    ///     Requisição base
    /// </summary>
    [Serializable]
    [XmlInclude(typeof (RequestTransaction))]
    [XmlInclude(typeof (AuthorizeTransaction))]
    [XmlInclude(typeof (CancellationTransaction))]
    [XmlInclude(typeof (CaptureTransaction))]
    [XmlType(Namespace = "http://ecommerce.cbmp.com.br")]
    public class Request : Message
    {
        /// <summary>
        ///     Inicializa uma nova instância da classe <see cref="Request" />. Na inicialização a propriedade Authentication é
        ///     automaticamente instânciada.
        /// </summary>
        public Request()
        {
            Authentication = new Authentication();
        }

        /// <summary>
        ///     Identificador da transação.
        /// </summary>
        [XmlElement("tid")]
        public string Tid { get; set; }

        /// <summary>
        ///     Recupera ou define <see cref="Authentication"/>.
        /// </summary>
        [XmlElement("dados-ec")]
        public Authentication Authentication { get; set; }
    }
}


text:
A direct [link](url) to a url.

A direct [link](url "title") to a url.


text:
<?xml version="1.0" encoding="UTF-8"?>
<article id="1121">
	<title>The Outlook of Cybernetic and Computer Applications in the National Systemof Scientific and Technical Information 	</title>
	<author>Mamontov, O. V.	</author>
	<text>
		   The paper outlines the prospects of applying cybernetic methods to the
		analysis and synthesis of information processes in a national systems of
		scientific-technical information and in information agencies which are
		considered as "big systems" of differing ranks..  The main stages of research
		along these lines are investigated..
	</text>
</article>


text:
//
// ScanChannelMonitor.java
// xal
//
// Created by Pelaia II, Tom on 1/10/13
// Copyright 2013 ORNL. All rights reserved.
//

package xal.extension.scan;

import xal.ca.*;

/** ScanChannelMonitor */
public class ScanChannelMonitor {
	/** synchronization lock */
	final private Object SYNC_LOCK;

	/** channel to monitor */
	final private Channel CHANNEL;

	/** handler of events */
	final private EventHandler EVENT_HANDLER;

	/** channel event monitor */
	private Monitor _monitor;

	/** indicates whether this wrapper is viable or disposed */
	volatile private boolean _viable;

	/** indicates whether the monitor is allowed */
	volatile private boolean _allowsMonitor;

	/** handler of the monitor events */
	volatile private ScanChannelMonitorDelegate _delegate;

	/** latest record captured */
	volatile private ChannelTimeRecord _latestRecord;

	/** Constructor with null delegate */
	public ScanChannelMonitor( final Channel channel ) {
		this( channel, null );
	}

	/** Constructor */
	public ScanChannelMonitor( final Channel channel, final ScanChannelMonitorDelegate delegate ) {
		this( channel, delegate, true );
	}

	/** Primary Constructor */
	public ScanChannelMonitor( final Channel channel, final ScanChannelMonitorDelegate delegate, final boolean requestEvents ) {
		SYNC_LOCK = new Object();
		EVENT_HANDLER = new EventHandler();

		_viable = true;

		_allowsMonitor = requestEvents;

		_latestRecord = null;
		_monitor = null;
		_delegate = delegate;

		if ( channel == null )	throw new IllegalArgumentException( "Channel Wrapper cannot be assigned a null channel" );

		CHANNEL = channel;

		if ( requestEvents ) {
			start();
		}
	}

	/** Get the channel */
	public Channel getChannel() {
		return CHANNEL;
	}

	/** set the delegate */
	public void setDelegate( final ScanChannelMonitorDelegate delegate ) {
		_delegate = delegate;
	}

	/** determine whether the channel is connected */
	public boolean isConnected() {
		return CHANNEL.isConnected();
	}

	/** determine whether the channel is valid (has a record and is connected) */
	public boolean isValid() {
		return _latestRecord != null && CHANNEL.isConnected();
	}

	/** Get the latest record */
	public ChannelTimeRecord getLatestRecord() {
		return _latestRecord;
	}

	/** stop the monitor */
	public void stop() {
		synchronized( SYNC_LOCK	) {
			CHANNEL.removeConnectionListener( EVENT_HANDLER );
			_allowsMonitor = false;

			final Monitor monitor = _monitor;
			_monitor = null;
			if ( monitor != null )  monitor.clear();
		}
	}

	/** start the monitor */
	public void start() {
		synchronized( SYNC_LOCK	) {
			_allowsMonitor = true;
			CHANNEL.addConnectionListener( EVENT_HANDLER );
			CHANNEL.requestConnection();
		}
	}

	/** start the monitor */
	public void createMonitor() {
		synchronized( SYNC_LOCK	) {
			if ( _allowsMonitor && _viable && _monitor == null ) {
				try {
					_monitor = CHANNEL.addMonitorValTime( EVENT_HANDLER, Monitor.VALUE );
					Channel.flushIO();
				}
				catch( Exception exception ) {
					System.err.println( "Exception creating monitor for channel: " + CHANNEL.getId() );
					exception.printStackTrace();
				}
			}
		}
	}

	/** Dispose of the channel */
	public void dispose() {
		synchronized( SYNC_LOCK ) {
			_viable = false;
			_delegate = null;

			stop();
		}
	}

	/** process events */
	private class EventHandler implements ConnectionListener, IEventSinkValTime {
		/**
		 * Indicates that a connection to the specified channel has been established.
		 * @param channel The channel which has been connected.
		 */
		public void connectionMade( final Channel channel ) {
			createMonitor();

			final ScanChannelMonitorDelegate delegate = _delegate;
			if ( delegate != null ) {
				delegate.channelStateChanged( ScanChannelMonitor.this, _latestRecord != null );
			}
		}

		/**
		 * Indicates that a connection to the specified channel has been dropped.
		 * @param channel The channel which has been disconnected.
		 */
		public void connectionDropped( final Channel channel ) {
			final ScanChannelMonitorDelegate delegate = _delegate;
			if ( delegate != null ) {
				delegate.channelStateChanged( ScanChannelMonitor.this, false );
			}
		}

		/** Handle monitor event */
		public void eventValue( final ChannelTimeRecord record, final Channel channel ) {
			_latestRecord = record;
			//System.out.println( "Captured record: " + record );

			final ScanChannelMonitorDelegate delegate = _delegate;
			if ( delegate != null ) {
				delegate.channelRecordUpdate( ScanChannelMonitor.this, record );		// forward the event to the delegate
			}
		}
	}
}


text:
include_recipe "apache2"
include_recipe "apache2::mod_proxy_http"
include_recipe "apache2::mod_python"

%w{ python-yaml python-cheetah python-netaddr python-urlgrabber syslinux git-core }.each do |pack|
  package pack
end

directory "/opt" do
  owner "root"
  group "root"
  mode "0755"
end

git "/opt/cobbler-source" do
  repository "git://github.com/proffalken/cobbler.git"
  action :sync
end

execute "build-cobbler" do
  command "make"
  cwd "/opt/cobbler-source"
  action :nothing
  not_if { File.exists?("/usr/local/bin/cobbler") }
end

execute "install-cobbler" do
  command "python setup.py install"
  cwd "/opt/cobbler-source"
  action :nothing
  not_if { File.exists?("/usr/local/bin/cobbler") }
  notifies :restart, resources(:service => "apache2")
end

runit_service "cobbler"

template "/etc/cobbler/settings" do
  source "settings.erb"
  owner "root"
  group "root"
  mode "0644"
  notifies :restart, resources(:service => "cobbler")
  variables(
    :server => node[:fqdn],
    :virt => "kvm",
    :bridge => "br0"
  )
end

template "/etc/apache2/conf.d/cobbler.conf" do
  source "apache.conf.erb"
  owner "root"
  group "root"
  mode "0644"
  notifies :reload, resources(:service => "apache2")
end

link "/tftpboot" do
  to "/var/lib/tftpboot"
end


text:
package com.j256.ormlite.stmt.mapped;

import com.j256.ormlite.field.FieldType;
import com.j256.ormlite.field.SqlType;
import com.j256.ormlite.logger.Log.Level;
import com.j256.ormlite.logger.Logger;
import com.j256.ormlite.stmt.ArgumentHolder;
import com.j256.ormlite.stmt.PreparedDelete;
import com.j256.ormlite.stmt.PreparedQuery;
import com.j256.ormlite.stmt.PreparedUpdate;
import com.j256.ormlite.stmt.StatementBuilder.StatementType;
import com.j256.ormlite.support.CompiledStatement;
import com.j256.ormlite.support.DatabaseConnection;
import com.j256.ormlite.table.TableInfo;
import java.sql.SQLException;

public class MappedPreparedStmt<T, ID> extends BaseMappedQuery<T, ID>
  implements PreparedDelete<T>, PreparedQuery<T>, PreparedUpdate<T>
{
  private final ArgumentHolder[] argHolders;
  private final Long limit;
  private final StatementBuilder.StatementType type;

  public MappedPreparedStmt(TableInfo<T, ID> paramTableInfo, String paramString, FieldType[] paramArrayOfFieldType1, FieldType[] paramArrayOfFieldType2, ArgumentHolder[] paramArrayOfArgumentHolder, Long paramLong, StatementBuilder.StatementType paramStatementType)
  {
    super(paramTableInfo, paramString, paramArrayOfFieldType1, paramArrayOfFieldType2);
    this.argHolders = paramArrayOfArgumentHolder;
    this.limit = paramLong;
    this.type = paramStatementType;
  }

  private CompiledStatement assignStatementArguments(CompiledStatement paramCompiledStatement)
  {
    while (true)
    {
      try
      {
        if (this.limit != null)
          paramCompiledStatement.setMaxRows(this.limit.intValue());
        boolean bool = logger.isLevelEnabled(Log.Level.TRACE);
        Object[] arrayOfObject = null;
        if (bool)
        {
          int i = this.argHolders.length;
          arrayOfObject = null;
          if (i > 0)
          {
            arrayOfObject = new Object[this.argHolders.length];
            break label204;
            if (j < this.argHolders.length)
            {
              Object localObject2 = this.argHolders[j].getSqlArgValue();
              FieldType localFieldType = this.argFieldTypes[j];
              SqlType localSqlType;
              if (localFieldType == null)
                localSqlType = this.argHolders[j].getSqlType();
              else
                localSqlType = localFieldType.getSqlType();
              paramCompiledStatement.setObject(j, localObject2, localSqlType);
              if (arrayOfObject == null)
                break label210;
              arrayOfObject[j] = localObject2;
              break label210;
            }
            logger.debug("prepared statement '{}' with {} args", this.statement, Integer.valueOf(this.argHolders.length));
            if (arrayOfObject != null)
              logger.trace("prepared statement arguments: {}", arrayOfObject);
            return paramCompiledStatement;
          }
        }
      }
      finally
      {
        if (0 == 0)
          paramCompiledStatement.close();
      }
      label204: int j = 0;
      continue;
      label210: j++;
    }
  }

  public CompiledStatement compile(DatabaseConnection paramDatabaseConnection, StatementBuilder.StatementType paramStatementType)
  {
    return compile(paramDatabaseConnection, paramStatementType, -1);
  }

  public CompiledStatement compile(DatabaseConnection paramDatabaseConnection, StatementBuilder.StatementType paramStatementType, int paramInt)
  {
    if (this.type != paramStatementType)
      throw new SQLException("Could not compile this " + this.type + " statement since the caller is expecting a " + paramStatementType + " statement.  Check your QueryBuilder methods.");
    return assignStatementArguments(paramDatabaseConnection.compileStatement(this.statement, paramStatementType, this.argFieldTypes, paramInt));
  }

  public String getStatement()
  {
    return this.statement;
  }

  public StatementBuilder.StatementType getType()
  {
    return this.type;
  }

  public void setArgumentHolderValue(int paramInt, Object paramObject)
  {
    if (paramInt < 0)
      throw new SQLException("argument holder index " + paramInt + " must be >= 0");
    if (this.argHolders.length <= paramInt)
      throw new SQLException("argument holder index " + paramInt + " not valid, only " + this.argHolders.length + " in statement");
    this.argHolders[paramInt].setValue(paramObject);
  }
}

/* Location:           /Users/vikas/Documents/Mhacks_Real_app/classes-dex2jar.jar
 * Qualified Name:     com.j256.ormlite.stmt.mapped.MappedPreparedStmt
 * JD-Core Version:    0.6.2
 */