text:
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Jasmine Spec Runner</title>

    <!-- generate script tags for tests -->

    <!-- for each test, generate CSS/LESS link tags -->

      <!-- the tags to be generated -->
      <link id="original-less:test-less-no-js-errors" title="test-less-no-js-errors" rel="stylesheet/less" type="text/css" href="../../test/less/no-js-errors/no-js-errors.less">
      <link id="expected-less:test-less-no-js-errors" rel="stylesheet" type="text/css" href="../../test/css/no-js-errors/no-js-errors.css">

    <!-- generate grunt-contrib-jasmine link tags -->

      <link rel="stylesheet" type="text/css" href="../../.grunt/grunt-contrib-jasmine/jasmine.css">

    <!-- inital grunt-contrib-jasmine scripts -->

        <script src="../../.grunt/grunt-contrib-jasmine/phantom-polyfill.js"></script>

        <script src="../../.grunt/grunt-contrib-jasmine/jasmine.js"></script>

        <script src="../../.grunt/grunt-contrib-jasmine/jasmine-html.js"></script>

    <!-- Helpers - The less options -->

        <script src="../../test/browser/runner-no-js-errors-options.js"></script>

    <!-- Vendor - less.js and common code -->

        <script src="../../test/browser/common.js"></script>

        <script src="../../test/browser/less.js"></script>

    <!-- Spec -->

        <script src="../../test/browser/runner-no-js-errors-spec.js"></script>

    <!-- final grunt-contrib-jasmine scripts -->

        <script src="../../.grunt/grunt-contrib-jasmine/reporter.js"></script>

        <script src="../../.grunt/grunt-contrib-jasmine/jasmine-helper.js"></script>

  </head>

  <body>
  <!-- content -->
  </body>
</html>


text:
<rrd_def>
     <path>${database}</path>
     <!-- not mandatory
     <start>1000123456</start> -->
     <!-- not mandatory -->
     <step>60</step>
     <!-- at least one datasource must be supplied -->
<datasource><!-- type=Memory:HeapMemoryUsage:committed --><name>HeapMemoryUsagefd71</name><type>GAUGE</type><heartbeat>400</heartbeat><min>U</min><max>U</max></datasource>
<datasource><!-- type=Memory:HeapMemoryUsage:init --><name>HeapMemoryUsage25f7</name><type>GAUGE</type><heartbeat>400</heartbeat><min>U</min><max>U</max></datasource>
<datasource><!-- type=Memory:HeapMemoryUsage:max --><name>HeapMemoryUsageffe4</name><type>GAUGE</type><heartbeat>400</heartbeat><min>U</min><max>U</max></datasource>
<datasource><!-- type=Memory:HeapMemoryUsage:used --><name>HeapMemoryUsaged3bb</name><type>GAUGE</type><heartbeat>400</heartbeat><min>U</min><max>U</max></datasource>
<datasource><!-- type=Memory:NonHeapMemoryUsage:committed --><name>NHMUb93cabbe11008a2</name><type>GAUGE</type><heartbeat>400</heartbeat><min>U</min><max>U</max></datasource>
<datasource><!-- type=Memory:NonHeapMemoryUsage:init --><name>NHMU0a2a437bb561de8</name><type>GAUGE</type><heartbeat>400</heartbeat><min>U</min><max>U</max></datasource>
<datasource><!-- type=Memory:NonHeapMemoryUsage:max --><name>NHMU925cc6ce551095e</name><type>GAUGE</type><heartbeat>400</heartbeat><min>U</min><max>U</max></datasource>
<datasource><!-- type=Memory:NonHeapMemoryUsage:used --><name>NHMU42f37e7c3e62970</name><type>GAUGE</type><heartbeat>400</heartbeat><min>U</min><max>U</max></datasource>
     <!-- at least one archive must be supplied -->
     <archive>
         <cf>AVERAGE</cf>
         <xff>0.5</xff>
         <steps>1</steps>
         <rows>7000</rows>
     </archive>
     <archive>
         <cf>MIN</cf>
         <xff>0.5</xff>
         <steps>1</steps>
         <rows>7000</rows>
     </archive>
     <archive>
         <cf>MAX</cf>
         <xff>0.5</xff>
         <steps>1</steps>
         <rows>7000</rows>
     </archive>
 </rrd_def>

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace AppBundle\Entity;

use FOS\UserBundle\Model\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\IpTraceable\Traits\IpTraceableEntity;
use Gedmo\Timestampable\Traits\TimestampableEntity;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use JMS\Serializer\Annotation as Serializer;

/**
 * User
 *
 * @ORM\Entity
 * @ORM\Table(name="fos_user")
 * @UniqueEntity("username")
 * @Serializer\ExclusionPolicy("all")
 */
class User extends BaseUser implements UserInterface
{
    use TimestampableEntity;
    use IpTraceableEntity;

    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     * @Serializer\Expose
     */
    protected $id;

    /**
     * @var string $firstName
     *
     * @Assert\NotBlank(message="Merci de préciser votre prénom.", groups={"Registration"})
     * @ORM\Column(name="first_name", type="string", length=255)
     * @Serializer\Expose
     */
    protected $firstName;

    /**
     * @var string $lastName
     *
     * @Assert\NotBlank(message="Merci de préciser votre nom.", groups={"Registration"})
     * @ORM\Column(name="last_name", type="string", length=255)
     * @Serializer\Expose
     */
    protected $lastName;

    /**
     * @var string $ctiUid
     *
     * @ORM\Column(name="cti_uid", type="string", length=255, nullable=true)
     * @Serializer\Expose
     */
    protected $ctiUid;

    /**
     * @var string
     *
     * String corresponding to the photo of the user encoded in base64
     *
     * @ORM\Column(name="photo", type="text", nullable=true)
     * @Serializer\Expose
     */
    protected $photo;

    /**
     * @var House
     *
     * @ORM\ManyToOne(targetEntity="AppBundle\Entity\House", cascade={"persist", "remove"}, inversedBy="members")
     * @ORM\JoinColumn(name="house_id", referencedColumnName="id", nullable=true, onDelete="CASCADE")
     */
    protected $house;

    /**
     * @return string
     */
    public function __toString()
    {
        return sprintf('%s %s (%s)', $this->firstName, $this->lastName, $this->ctiUid);
    }

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set firstName
     *
     * @param string $firstName
     *
     * @return User
     */
    public function setFirstName($firstName)
    {
        $this->firstName = $firstName;

        return $this;
    }

    /**
     * Get firstName
     *
     * @return string
     */
    public function getFirstName()
    {
        return $this->firstName;
    }

    /**
     * Set lastName
     *
     * @param string $lastName
     *
     * @return User
     */
    public function setLastName($lastName)
    {
        $this->lastName = $lastName;

        return $this;
    }

    /**
     * Get lastName
     *
     * @return string
     */
    public function getLastName()
    {
        return $this->lastName;
    }

    /**
     * Set photo
     *
     * @param string $photo
     *
     * @return User
     */
    public function setPhoto($photo)
    {
        $this->photo = $photo;

        return $this;
    }

    /**
     * Get photo
     *
     * @return string
     */
    public function getPhoto()
    {
        return $this->photo;
    }

    /**
     * Set house
     *
     * @param \AppBundle\Entity\House $house
     * @return User
     */
    public function setHouse(\AppBundle\Entity\House $house = null)
    {
        $this->house = $house;

        return $this;
    }

    /**
     * Get house
     *
     * @return \AppBundle\Entity\House
     */
    public function getHouse()
    {
        return $this->house;
    }

    /**
     * Set ctiUid
     *
     * @param string $ctiUid
     * @return User
     */
    public function setCtiUid($ctiUid)
    {
        $this->ctiUid = $ctiUid;

        return $this;
    }

    /**
     * Get ctiUid
     *
     * @return string
     */
    public function getCtiUid()
    {
        return $this->ctiUid;
    }
}


text:
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
import-module $here\..\boxstarter.Chocolatey\boxstarter.Chocolatey.psd1 -Force

Describe "Invoke-ChocolateyBoxstarter via bootstrapper.bat (end to end)" {
    $testRoot = (Get-PSDrive TestDrive).Root
    mkdir "$testRoot\Repo" -ErrorAction SilentlyContinue | Out-Null
    Copy-Item $here\..\BuildPackages\test-package.*.nupkg "$testRoot\Repo"

    Context "When installing a local package" {
        remove-Item "$env:ChocolateyInstall\lib\test-package.*" -force -recurse
        Add-Content "$env:ChocolateyInstall\ChocolateyInstall\ChocolateyInstall.log" -Value "______ test-package v1.0.0 ______" -force

        ."$here\..\boxstarter.bat" test-package -LocalRepo "$testRoot\Repo" -DisableReboots

        it "should save boxstarter package to chocolatey lib folder" {
            Test-Path "$env:ChocolateyInstall\lib\test-package.*" | Should Be $true
        }
        it "should have cleared previous logs" {
            $installLines = get-content "$env:ChocolateyInstall\ChocolateyInstall\Install.log" | ? { $_ -like "Successfully installed 'test-package*" }
            $installLines.Count | Should Be 1
        }
    }
}

Describe "Chocolatey Package throws an Exception" {
    $testRoot = (Get-PSDrive TestDrive).Root

    Context "When exception is thrown from main package with no handling" {
        remove-Item $boxstarter.Log -Force
        $errorMsg="I am an error"
        Set-Content "$testRoot\test.txt" -Value "throw '$errorMsg'" -Force

        get-content "$testRoot\test.txt"
        $result = Invoke-ChocolateyBoxstarter "$testRoot\test.txt" -LocalRepo "$testRoot\Repo" -DisableReboots 2>&1

        it "should log error" {
            Get-Content "$testRoot\test.txt" | Should Match $errorMsg
        }
        it "should write error to error stream" {
            $result.Exception.Message | should be $errorMsg
        }
    }

    Context "When exception is thrown from chocolatey" {
        remove-Item $boxstarter.Log -Force
        $errorMsg="I am another error"
        Set-Content "$testRoot\test.txt" -Value "try {throw '$errorMsg'}catch{Write-ChocolateyFailure 'testing' `$(`$_.Exception.Message);throw}" -Force

        $result = Invoke-ChocolateyBoxstarter "$testRoot\test.txt" -LocalRepo "$testRoot\Repo" -DisableReboots 2>&1

        it "should log error" {
            Get-Content "$testRoot\test.txt" | Should Match $errorMsg
        }
        it "should write error once" {
            $result.Count | should be 2
        }
        it "should write correct error to error stream" {
            $result[0].Exception.Message.Contains($errorMsg) | should be $true
        }
    }
}


text:
package Venn::CLI::Role::Attribute;

=head1 NAME

Venn::CLI::Role::Attribute

=head1 DESCRIPTION

Attribute role

=head1 AUTHOR

Venn Engineering

Josh Arenberg, Norbert Csongradi, Ryan Kupfer, Hai-Long Nguyen

=head1 LICENSE

Copyright 2013,2014,2015 Morgan Stanley

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

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

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

=cut

use strict;
use warnings;
use v5.14;

use Mouse::Role;
use Venn::CLI::Types qw( NoEmptyStr );
use Mouse::Util::TypeConstraints;
requires '_build_verb_path';

=head1 OPTIONS

Options for all verbs that are required for Venn attribute operations

=cut

has 'attribute_type' => (
    is            => 'rw',
    isa           => 'Str',
    required      => 1,
    metaclass     => 'NoGetopt',
    documentation => 'Type of attribute',
);

# Set the URI path for this specific verb's role (attribute definition in VerbAttributes.pm)
sub _build_verb_path { return 'attribute' }

sub attribute_path {
    my ($self, $key) = @_;

    return sprintf "%s/%s/%s", $self->verb_rest_uri, $self->attribute_type, $key;
}

1;


text:
package com.wizzardo.tools.collections.flow.flows;

import java.util.Collections;
import java.util.List;

/**
 * Created by wizzardo on 16.04.16.
 */
public class FlowCollectAndSort<A, C extends List<A>> extends FlowCollect<A, C> {

    public FlowCollectAndSort(C collection) {
        super(collection);
    }

    @Override
    protected void onEnd() {
        Collections.sort((List<Comparable>) result);
        super.onEnd();
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/MillFragment">
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:paddingBottom="@dimen/activity_vertical_margin"
        android:paddingLeft="@dimen/activity_horizontal_margin"
        android:paddingRight="@dimen/activity_horizontal_margin"
        android:paddingTop="@dimen/activity_vertical_margin"
        tools:context="mzou.cc.studroid.MainActivity">
        <GridView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_alignParentTop="true"
            android:layout_alignParentStart="true"
            android:numColumns="auto_fit"
            android:id="@+id/MillGridView"
            android:gravity="center"
            android:columnWidth="150dp"
            android:verticalSpacing="10dp"
            android:horizontalSpacing="10dp"
            android:stretchMode="columnWidth" />
    </RelativeLayout>
</FrameLayout>


text:
package it.eng.liferay.user.importer.filter;

import it.eng.liferay.user.importer.LiferayUserImporter;
import it.eng.liferay.user.importer.LiferayUserImporterImpl;
import it.eng.sso.filters.principal.http.SSOHttpServletRequestWrapper;

import java.io.IOException;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

public class LiferayUserImporterFilter implements Filter{

	@Override
	public void destroy() {
		// TODO Auto-generated method stub

	}

	@Override
	public void doFilter(ServletRequest request, ServletResponse response,
			FilterChain chain) throws IOException, ServletException {
		SSOHttpServletRequestWrapper req = (SSOHttpServletRequestWrapper) request;
		LiferayUserImporter importer= new LiferayUserImporterImpl();
		importer.manageLiferayUser(req.getUserPrincipal());
	}

	@Override
	public void init(FilterConfig arg0) throws ServletException {
		// TODO Auto-generated method stub

	}

}


text:
/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.content.model;

/**
 * Model definition for PostalCodeGroup.
 *
 *
 This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Content API for Shopping. For a detailed explanation
 * see:
 * https://developers.google.com/api-client-library/java/google-http-java-client/json
 *

 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class PostalCodeGroup extends com.google.api.client.json.GenericJson {

  /**
   * The CLDR territory code of the country the postal code group applies to. Required.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String country;

  /**
   * The name of the postal code group, referred to in headers. Required.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String name;

  /**
   * A range of postal codes. Required.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<PostalCodeRange> postalCodeRanges;

  /**
   * The CLDR territory code of the country the postal code group applies to. Required.
   * @return value or {@code null} for none
   */
  public java.lang.String getCountry() {
    return country;
  }

  /**
   * The CLDR territory code of the country the postal code group applies to. Required.
   * @param country country or {@code null} for none
   */
  public PostalCodeGroup setCountry(java.lang.String country) {
    this.country = country;
    return this;
  }

  /**
   * The name of the postal code group, referred to in headers. Required.
   * @return value or {@code null} for none
   */
  public java.lang.String getName() {
    return name;
  }

  /**
   * The name of the postal code group, referred to in headers. Required.
   * @param name name or {@code null} for none
   */
  public PostalCodeGroup setName(java.lang.String name) {
    this.name = name;
    return this;
  }

  /**
   * A range of postal codes. Required.
   * @return value or {@code null} for none
   */
  public java.util.List<PostalCodeRange> getPostalCodeRanges() {
    return postalCodeRanges;
  }

  /**
   * A range of postal codes. Required.
   * @param postalCodeRanges postalCodeRanges or {@code null} for none
   */
  public PostalCodeGroup setPostalCodeRanges(java.util.List<PostalCodeRange> postalCodeRanges) {
    this.postalCodeRanges = postalCodeRanges;
    return this;
  }

  @Override
  public PostalCodeGroup set(String fieldName, Object value) {
    return (PostalCodeGroup) super.set(fieldName, value);
  }

  @Override
  public PostalCodeGroup clone() {
    return (PostalCodeGroup) super.clone();
  }

}


text:
#ifndef _DEVPROPDEF_H_
#define _DEVPROPDEF_H_

typedef ULONG DEVPROPTYPE, *PDEVPROPTYPE;

#define DEVPROP_TYPEMOD_ARRAY 0x1000
#define DEVPROP_TYPEMOD_LIST 0x2000
#define MAX_DEVPROP_TYPEMOD DEVPROP_TYPEMOD_LIST

#define DEVPROP_TYPE_EMPTY 0x00
#define DEVPROP_TYPE_NULL 0x01
#define DEVPROP_TYPE_SBYTE 0x02
#define DEVPROP_TYPE_BYTE 0x03
#define DEVPROP_TYPE_INT16 0x04
#define DEVPROP_TYPE_UINT16 0x05
#define DEVPROP_TYPE_INT32 0x06
#define DEVPROP_TYPE_UINT32 0x07
#define DEVPROP_TYPE_INT64 0x08
#define DEVPROP_TYPE_UINT64 0x09
#define DEVPROP_TYPE_FLOAT 0x0a
#define DEVPROP_TYPE_DOUBLE 0x0b
#define DEVPROP_TYPE_DECIMAL 0x0c
#define DEVPROP_TYPE_GUID 0x0d
#define DEVPROP_TYPE_CURRENCY 0x0e
#define DEVPROP_TYPE_DATE 0x0f
#define DEVPROP_TYPE_FILETIME 0x10
#define DEVPROP_TYPE_BOOLEAN 0x11
#define DEVPROP_TYPE_STRING 0x12
#define DEVPROP_TYPE_STRING_LIST (DEVPROP_TYPE_STRING|DEVPROP_TYPEMOD_LIST)
#define DEVPROP_TYPE_SECURITY_DESCRIPTOR 0x13
#define DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING 0x14
#define DEVPROP_TYPE_DEVPROPKEY 0x15
#define DEVPROP_TYPE_DEVPROPTYPE 0x16
#define DEVPROP_TYPE_BINARY (DEVPROP_TYPE_BYTE|DEVPROP_TYPEMOD_ARRAY)
#define DEVPROP_TYPE_ERROR 0x17
#define DEVPROP_TYPE_NTSTATUS 0x18
#define DEVPROP_TYPE_STRING_INDIRECT 0x19
#define MAX_DEVPROP_TYPE DEVPROP_TYPE_STRING_INDIRECT

#define DEVPROP_MASK_TYPE 0x0fff
#define DEVPROP_MASK_TYPEMOD 0xf000

typedef CHAR DEVPROP_BOOLEAN, *PDEVPROP_BOOLEAN;
#define DEVPROP_TRUE ((DEVPROP_BOOLEAN)-1)
#define DEVPROP_FALSE ((DEVPROP_BOOLEAN)0)

#ifndef DEVPROPKEY_DEFINED
#define DEVPROPKEY_DEFINED
typedef GUID DEVPROPGUID, *PDEVPROPGUID;
typedef ULONG DEVPROPID, *PDEVPROPID;

typedef struct _DEVPROPKEY {
    DEVPROPGUID fmtid;
    DEVPROPID pid;
} DEVPROPKEY, *PDEVPROPKEY;

#define DEVPROPID_FIRST_USABLE 2

#endif /*DEVPROPKEY_DEFINED*/

#endif /*_DEVPROPDEF_H_*/

#undef DEFINE_DEVPROPKEY
#ifdef INITGUID
#ifdef __cplusplus
#define DEFINE_DEVPROPKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) \
        EXTERN_C const DEVPROPKEY name DECLSPEC_HIDDEN DECLSPEC_SELECTANY; \
        EXTERN_C const DEVPROPKEY name = \
        { { l, w1, w2, { b1, b2,  b3,  b4,  b5,  b6,  b7,  b8 } }, pid }
#else
#define DEFINE_DEVPROPKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) \
        const DEVPROPKEY name DECLSPEC_HIDDEN DECLSPEC_SELECTANY; \
        const DEVPROPKEY name = \
        { { l, w1, w2, { b1, b2,  b3,  b4,  b5,  b6,  b7,  b8 } }, pid }
#endif
#else
#define DEFINE_DEVPROPKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) \
    EXTERN_C const DEVPROPKEY name DECLSPEC_HIDDEN DECLSPEC_SELECTANY
#endif

#ifndef IsEqualDevPropKey
#ifdef __cplusplus
#define IsEqualDevPropKey(a,b) (((a).pid == (b).pid) && IsEqualIID((a).fmtid,(b).fmtid))
#else
#define IsEqualDevPropKey(a,b) (((a).pid == (b).pid) && IsEqualIID(&(a).fmtid,&(b).fmtid))
#endif
#endif


text:
package com.wwj.sb.utils;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.List;

import android.content.ContentResolver;
import android.database.Cursor;
import android.os.Environment;

import com.wwj.sb.domain.Mp3Info;

/**
 * 2013/5/7
 * @author wwj
 *
 */
public class FileUtils {
	private String SDCardRoot;

	public FileUtils() {
		// »ñµÃÍⲿ´æ´¢É豸µÄĿ¼
		SDCardRoot = Environment.getExternalStorageDirectory()
				.getAbsolutePath() + File.separator;
	}

	/**
	 * ÔÚSD¿¨ÉÏ´´½¨Îļþ
	 *
	 * @param filename
	 * @param dir
	 * @return
	 */
	public File createFileInSDCard(String filename, String dir)
			throws IOException {
		File file = new File(SDCardRoot + dir + File.separator + filename);
		file.createNewFile();
		return file;
	}

	/**
	 * ÔÚSD¿¨ÉÏ´´½¨Ä¿Â¼
	 *
	 * @param dir
	 * @return
	 */
	public File createDirInSDCard(String dir) {
		File dirFile = new File(SDCardRoot + dir + File.separator);
		dirFile.mkdir();
		return dirFile;
	}

	/**
	 * ÅжÏÎļþÔÚSD¿¨ÉÏÊÇ·ñ´æÔÚ
	 *
	 * @param filename
	 * @param path
	 * @return
	 */
	public boolean isFileExist(String filename, String path) {
		File file = new File(SDCardRoot + path + File.separator + filename);
		return file.exists();
	}

	/**
	 * ½«Ò»¸öInputStreamÀïÃæµÄÊý¾ÝдÈëµ½SD¿¨ÖÐ
	 * @param path
	 * @param filename
	 * @param inStream
	 * @return
	 */
	public File writeToSDCardInput(String path, String filename,
			InputStream inStream) {
		File file = null;
		OutputStream outStrem = null;
		try {
			createDirInSDCard(path); // ´´½¨Ä¿Â¼
			file = createFileInSDCard(filename, path); // ´´½¨Îļþ
			outStrem = new FileOutputStream(file); // µÃµ½ÎļþÊä³öÁ÷
			byte[] buffer = new byte[4 * 1024]; // ¶¨ÒåÒ»¸ö»º³åÇø
			int len;
			while ((len = inStream.read(buffer)) != -1) {
				outStrem.write(buffer, 0, len);
			}
			outStrem.flush(); // È·±£Êý¾ÝдÈëµ½´ÅÅ̵±ÖÐ
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			try {
				outStrem.close(); // ¹Ø±ÕÊä³öÁ÷
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
		return file;
	}

	public List<Mp3Info> getMp3Infos(String path) {
		List<Mp3Info> mp3Infos = new ArrayList<Mp3Info>();
		File file = new File(SDCardRoot +  File.separator + path);
		File[] files = file.listFiles();
		FileUtils fileUtils = new FileUtils();
		for(int i = 0; i < files.length; i++) {
			if(files[i].getName().endsWith("mp3")) {
				Mp3Info mp3Info = new Mp3Info();
				mp3Info.setTitle(files[i].getName());
				mp3Info.setSize(files[i].length());
				String temp[] = mp3Info.getTitle().split("\\.");
				String lrcName = temp[0] + ".lrc";
				if(fileUtils.isFileExist(lrcName, "/mp3")){
					mp3Info.setLrcTitle(lrcName);
				}
				mp3Infos.add(mp3Info);
			}
		}
		return mp3Infos;
	}

}


text:
<?php

namespace ZendTest\Feed\Reader\Integration;

use Zend\Feed\Reader;

/**
* @category Zend
* @package Zend_Feed
* @subpackage UnitTests
* @group Zend_Feed
* @group Zend_Feed_Reader
*/
class HOnlineComAtom10Test extends \PHPUnit_Framework_TestCase
{

    protected $_feedSamplePath = null;

    public function setup()
    {
        Reader\Reader::reset();
        $this->_feedSamplePath = dirname(__FILE__) . '/_files/h-online.com-atom10.xml';
    }

    public function testGetsTitle()
    {
        $feed = Reader\Reader::importString(
            file_get_contents($this->_feedSamplePath)
        );
        $this->assertEquals('The H - news feed', $feed->getTitle());
    }

    public function testGetsAuthors()
    {
        $feed = Reader\Reader::importString(
            file_get_contents($this->_feedSamplePath)
        );
        $this->assertEquals(array(array('name'=>'The H')), (array) $feed->getAuthors());
    }

    public function testGetsSingleAuthor()
    {
        $feed = Reader\Reader::importString(
            file_get_contents($this->_feedSamplePath)
        );
        $this->assertEquals(array('name'=>'The H'), $feed->getAuthor());
    }

    public function testGetsCopyright()
    {
        $feed = Reader\Reader::importString(
            file_get_contents($this->_feedSamplePath)
        );
        $this->assertEquals(null, $feed->getCopyright());
    }

    public function testGetsDescription()
    {
        $feed = Reader\Reader::importString(
            file_get_contents($this->_feedSamplePath)
        );
        $this->assertEquals('Technology news', $feed->getDescription());
    }

    public function testGetsLanguage()
    {
        $feed = Reader\Reader::importString(
            file_get_contents($this->_feedSamplePath)
        );
        $this->assertEquals(null, $feed->getLanguage());
    }

    public function testGetsLink()
    {
        $feed = Reader\Reader::importString(
            file_get_contents($this->_feedSamplePath)
        );
        $this->assertEquals('http://www.h-online.com', $feed->getLink());
    }

    public function testGetsEncoding()
    {
        $feed = Reader\Reader::importString(
            file_get_contents($this->_feedSamplePath)
        );
        $this->assertEquals('UTF-8', $feed->getEncoding());
    }

    public function testGetsEntryCount()
    {
        $feed = Reader\Reader::importString(
            file_get_contents($this->_feedSamplePath)
        );
        $this->assertEquals(60, $feed->count());
    }

    /**
     * Entry level testing
     */

    public function testGetsEntryId()
    {
        $feed = Reader\Reader::importString(
            file_get_contents($this->_feedSamplePath)
        );
        $entry = $feed->current();
        $this->assertEquals('http://www.h-online.com/security/McAfee-update-brings-systems-down-again--/news/113689/from/rss', $entry->getId());
    }

    public function testGetsEntryTitle()
    {
        $feed = Reader\Reader::importString(
            file_get_contents($this->_feedSamplePath)
        );
        $entry = $feed->current();
        $this->assertEquals('McAfee update brings systems down again', $entry->getTitle());
    }

    public function testGetsEntryAuthors()
    {
        $feed = Reader\Reader::importString(
            file_get_contents($this->_feedSamplePath)
        );
        $entry = $feed->current();
        $this->assertEquals(array(array('name'=>'The H')), (array) $entry->getAuthors());
    }

    public function testGetsEntrySingleAuthor()
    {
        $feed = Reader\Reader::importString(
            file_get_contents($this->_feedSamplePath)
        );
        $entry = $feed->current();
        $this->assertEquals(array('name'=>'The H'), $entry->getAuthor());
    }

    public function testGetsEntryDescription()
    {
        $feed = Reader\Reader::importString(
            file_get_contents($this->_feedSamplePath)
        );
        $entry = $feed->current();
        /**
         * Note: "'" is not the same as "'" - don't replace in error
         */
        $this->assertEquals('A McAfee signature update is currently causing system failures and a lot of overtime for administrators', $entry->getDescription());
    }

    public function testGetsEntryContent()
    {
        $feed = Reader\Reader::importString(
            file_get_contents($this->_feedSamplePath)
        );
        $entry = $feed->current();
        $this->assertEquals('A McAfee signature update is currently causing system failures and a lot of overtime for administrators', $entry->getContent());
    }

    public function testGetsEntryLinks()
    {
        $feed = Reader\Reader::importString(
            file_get_contents($this->_feedSamplePath)
        );
        $entry = $feed->current();
        $this->assertEquals(array('http://www.h-online.com/security/McAfee-update-brings-systems-down-again--/news/113689/from/rss'), $entry->getLinks());
    }

    public function testGetsEntryLink()
    {
        $feed = Reader\Reader::importString(
            file_get_contents($this->_feedSamplePath)
        );
        $entry = $feed->current();
        $this->assertEquals('http://www.h-online.com/security/McAfee-update-brings-systems-down-again--/news/113689/from/rss', $entry->getLink());
    }

    public function testGetsEntryPermaLink()
    {
        $feed = Reader\Reader::importString(
            file_get_contents($this->_feedSamplePath)
        );
        $entry = $feed->current();
        $this->assertEquals('http://www.h-online.com/security/McAfee-update-brings-systems-down-again--/news/113689/from/rss',
            $entry->getPermaLink());
    }

    public function testGetsEntryEncoding()
    {
        $feed = Reader\Reader::importString(
            file_get_contents($this->_feedSamplePath)
        );
        $entry = $feed->current();
        $this->assertEquals('UTF-8', $entry->getEncoding());
    }

}


text:
class Admin::LineItemsController < Admin::BaseController
  resource_controller
  belongs_to :order
  ssl_required
  actions :all, :except => :index

  create.flash nil
  update.flash nil
  destroy.flash nil

  #override r_c create action as we want to use order#add_variant instead of creating line_item
  def create
    load_object
    variant = Variant.find(params[:line_item][:variant_id])

    before :create

    @order.add_variant(variant, params[:line_item][:quantity].to_i)

    if @order.save
      after :create
      set_flash :create
      response_for :create
    else
      after :create_fails
      set_flash :create_fails
      response_for :create_fails
    end

  end

  destroy.success.wants.html { render :partial => "admin/orders/form", :locals => {:order => @order}, :layout => false }
  destroy.failure.wants.html { render :partial => "admin/orders/form", :locals => {:order => @order}, :layout => false }

  new_action.response do |wants|
    wants.html {render :action => :new, :layout => false}
  end

  create.response do |wants|
    wants.html { render :partial => "admin/orders/form", :locals => {:order => @order}, :layout => false}
  end

  update.success.wants.html { render :partial => "admin/orders/form", :locals => {:order => @order}, :layout => false}
  update.failure.wants.html { render :partial => "admin/orders/form", :locals => {:order => @order}, :layout => false}

  destroy.after :recalulate_totals
  update.after :recalulate_totals
  create.after :recalulate_totals

  private
  def recalulate_totals
    unless @order.shipping_method.nil?
      @order.shipping_charges.each do |shipping_charge|
        shipping_charge.update_attributes(:amount => @order.shipping_method.calculate_cost(@order.shipment))
      end
    end

    @order.tax_charges.each do |tax_charge|
      tax_charge.update_attributes(:amount => tax_charge.calculate_tax_charge)
    end

    @order.update_totals!

    unless @order.in_progress?
      InventoryUnit.adjust_units(@order)
    end
  end
end


text:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" >

	<rotate
		android:interpolator="@android:anim/linear_interpolator"
		android:pivotX="50%"
		android:pivotY="50%"
		android:fromDegrees="0"
		android:toDegrees="+360"
		android:duration="1500"
		android:startOffset="-1"
		android:repeatMode="restart"
		android:repeatCount="-1"/>
</set>


text:
import asInt from '../chrome/calcs/asInt';
import { defCharacterVirtualLevel, defStatLevel } from '../support/constants';
import getValue from '../system/getValue';

let lvlToTest = 0;

function getModifier(tests, levelToTest) {
  return tests.find(([test]) => test(levelToTest))?.[1](levelToTest);
}

function calcLvlToTest() {
  if (!lvlToTest) {
    lvlToTest = getValue(defCharacterVirtualLevel) || asInt(defStatLevel);
  }
  return lvlToTest;
}

const lowerPvpCalcs = [
  [(levelToTest) => levelToTest > 3999 + 50, () => 50],
  [(levelToTest) => levelToTest > 3999 + 40, (levelToTest) => levelToTest - 4000],
  [(levelToTest) => levelToTest > 2999 + 40, () => 40],
  [(levelToTest) => levelToTest > 2999 + 30, (levelToTest) => levelToTest - 3000],
  [(levelToTest) => levelToTest > 1999 + 30, () => 30],
  [(levelToTest) => levelToTest > 1999 + 20, (levelToTest) => levelToTest - 2000],
  [(levelToTest) => levelToTest > 999 + 20, () => 20],
  [(levelToTest) => levelToTest > 999 + 10, (levelToTest) => levelToTest - 1000],
  [(levelToTest) => levelToTest > 199 + 10, () => 10],
  [(levelToTest) => levelToTest > 199 + 5, (levelToTest) => levelToTest - 200],
  [(levelToTest) => levelToTest > 5, () => 5],
  [(levelToTest) => levelToTest > 0, (levelToTest) => levelToTest - 1],
];

function calcLowerPvpLevel(levelToTest) {
  return levelToTest - getModifier(lowerPvpCalcs, levelToTest);
}

export function getLowerPvpLevel() {
  return calcLowerPvpLevel(calcLvlToTest());
}

const upperPvPCalcs = [
  [(levelToTest) => levelToTest > 3999, () => 50],
  [(levelToTest) => levelToTest > 2999, () => 40],
  [(levelToTest) => levelToTest > 1999, () => 30],
  [(levelToTest) => levelToTest > 999, () => 20],
  [(levelToTest) => levelToTest > 199, () => 10],
  [() => true, () => 5],
];

function calcUpperPvpLevel(levelToTest) {
  return levelToTest + getModifier(upperPvPCalcs, levelToTest);
}

export function getUpperPvpLevel() {
  return calcUpperPvpLevel(calcLvlToTest());
}

const lowerGvgCalcs = [
  [(levelToTest) => levelToTest > 700 + 100, () => 100],
  [(levelToTest) => levelToTest > 700 + 50, (levelToTest) => levelToTest - 701],
  [(levelToTest) => levelToTest > 300 + 50, () => 50],
  [(levelToTest) => levelToTest > 300 + 25, (levelToTest) => levelToTest - 301],
  [(levelToTest) => levelToTest > 49 + 25, () => 25],
  [(levelToTest) => levelToTest > 49, (levelToTest) => levelToTest - 50],
];

function calcLowerGvgLevel(levelToTest) {
  return levelToTest - getModifier(lowerGvgCalcs, levelToTest);
}

export function getLowerGvGLevel() {
  return calcLowerGvgLevel(calcLvlToTest());
}

const upperGvgCalcs = [
  [(levelToTest) => levelToTest > 700, () => 100],
  [(levelToTest) => levelToTest > 300, () => 50],
  [(levelToTest) => levelToTest > 49, () => 25],
];

function calcUpperGvgLevel(levelToTest) {
  return levelToTest + getModifier(upperGvgCalcs, levelToTest);
}

export function getUpperGvgLevel() {
  return calcUpperGvgLevel(calcLvlToTest());
}


text:
<?php
namespace Aws\Test;

use Aws\Api\ErrorParser\JsonRpcErrorParser;
use Aws\AwsClient;
use Aws\CommandInterface;
use Aws\Credentials\Credentials;
use Aws\Ec2\Ec2Client;
use Aws\Ses\SesClient;
use Aws\MockHandler;
use Aws\Result;
use Aws\S3\S3Client;
use Aws\Signature\SignatureV4;
use Aws\Sts\StsClient;
use Aws\WrappedHttpHandler;
use GuzzleHttp\Promise\RejectedPromise;
use Psr\Http\Message\RequestInterface;

/**
 * @covers Aws\AwsClient
 */
class AwsClientTest extends \PHPUnit_Framework_TestCase
{
    use UsesServiceTrait;

    private function getApiProvider()
    {
        return function () {
            return [
                'metadata' => [
                    'protocol'       => 'query',
                    'endpointPrefix' => 'foo'
                ],
                'shapes' => []
            ];
        };
    }

    public function testHasGetters()
    {
        $config = [
            'handler'      => function () {},
            'credentials'  => new Credentials('foo', 'bar'),
            'region'       => 'foo',
            'endpoint'     => 'http://us-east-1.foo.amazonaws.com',
            'serializer'   => function () {},
            'api_provider' => $this->getApiProvider(),
            'service'      => 'foo',
            'error_parser' => function () {},
            'version'      => 'latest'
        ];

        $client = new AwsClient($config);
        $this->assertSame($config['handler'], $this->readAttribute($client->getHandlerList(), 'handler'));
        $this->assertSame($config['credentials'], $client->getCredentials()->wait());
        $this->assertSame($config['region'], $client->getRegion());
        $this->assertEquals('foo', $client->getApi()->getEndpointPrefix());
    }

    /**
     * @expectedException \InvalidArgumentException
     * @expectedExceptionMessage Operation not found: Foo
     */
    public function testEnsuresOperationIsFoundWhenCreatingCommands()
    {
        $this->createClient()->getCommand('foo');
    }

    public function testReturnsCommandForOperation()
    {
        $client = $this->createClient([
            'operations' => [
                'foo' => [
                    'http' => ['method' => 'POST']
                ]
            ]
        ]);

        $this->assertInstanceOf(
            'Aws\CommandInterface',
            $client->getCommand('foo')
        );
    }

    /**
     * @expectedException \Aws\S3\Exception\S3Exception
     * @expectedExceptionMessage Error executing "foo" on "http://us-east-1.foo.amazonaws.com"; AWS HTTP error: Baz Bar!
     */
    public function testWrapsExceptions()
    {
        $parser = function () {};
        $errorParser = new JsonRpcErrorParser();
        $h = new WrappedHttpHandler(
            function () {
                return new RejectedPromise([
                    'exception'        => new \Exception('Baz Bar!'),
                    'connection_error' => true,
                    'response'         => null
                ]);
            },
            $parser,
            $errorParser,
            'Aws\S3\Exception\S3Exception'
        );

        $client = $this->createClient(
            ['operations' => ['foo' => ['http' => ['method' => 'POST']]]],
            ['handler' => $h]
        );

        $command = $client->getCommand('foo');
        $client->execute($command);
    }

    public function testChecksBothLowercaseAndUppercaseOperationNames()
    {
        $client = $this->createClient(['operations' => ['Foo' => [
            'http' => ['method' => 'POST']
        ]]]);

        $this->assertInstanceOf(
            'Aws\CommandInterface',
            $client->getCommand('foo')
        );
    }

    public function testReturnsAsyncResultsUsingMagicCall()
    {
        $client = $this->createClient(['operations' => ['Foo' => [
            'http' => ['method' => 'POST']
        ]]]);
        $client->getHandlerList()->setHandler(new MockHandler([new Result()]));
        $result = $client->fooAsync();
        $this->assertInstanceOf('GuzzleHttp\Promise\PromiseInterface', $result);
    }

    public function testCanGetIterator()
    {
        $client = $this->getTestClient('s3');
        $this->assertInstanceOf(
            'Generator',
            $client->getIterator('ListObjects', ['Bucket' => 'foobar'])
        );
    }

    public function testCanGetIteratorWithoutDefinedPaginator()
    {
        $client = $this->getTestClient('ec2');
        $data = ['foo', 'bar', 'baz'];
        $this->addMockResults($client, [new Result([
            'Subnets' => [$data],
        ])]);
        $iterator = $client->getIterator('DescribeSubnets');
        $this->assertInstanceOf('Traversable', $iterator);
        foreach ($iterator as $iterated) {
            $this->assertSame($data, $iterated);
        }
    }

    /**
     * @expectedException \UnexpectedValueException
     */
    public function testGetIteratorFailsForMissingConfig()
    {
        $client = $this->createClient();
        $client->getIterator('ListObjects');
    }

    public function testCanGetPaginator()
    {
        $client = $this->createClient(['pagination' => [
            'ListObjects' => [
                'input_token' => 'foo',
                'output_token' => 'foo',
            ]
        ]]);

        $this->assertInstanceOf(
            'Aws\ResultPaginator',
            $client->getPaginator('ListObjects', ['Bucket' => 'foobar'])
        );
    }

    /**
     * @expectedException \UnexpectedValueException
     */
    public function testGetPaginatorFailsForMissingConfig()
    {
        $client = $this->createClient();
        $client->getPaginator('ListObjects');
    }

    /**
     * @expectedException \InvalidArgumentException
     * @expectedExceptionMessage Operation not found
     */
    public function testCanWaitSynchronously()
    {
        $client = $this->createClient(['waiters' => ['PigsFly' => [
            'acceptors'   => [],
            'delay'       => 1,
            'maxAttempts' => 1,
            'operation'   => 'DescribePigs',
        ]]]);

        $client->waitUntil('PigsFly');
    }

    /**
     * @expectedException \UnexpectedValueException
     */
    public function testGetWaiterFailsForMissingConfig()
    {
        $client = $this->createClient();
        $client->waitUntil('PigsFly');
    }

    public function testGetWaiterPromisor()
    {
        $s3 = new S3Client(['region' => 'us-east-1', 'version' => 'latest']);
        $s3->getHandlerList()->setHandler(new MockHandler([
            new Result(['@metadata' => ['statusCode' => '200']])
        ]));
        $waiter = $s3->getWaiter('BucketExists', ['Bucket' => 'foo']);
        $this->assertInstanceOf('Aws\Waiter', $waiter);
        $promise = $waiter->promise();
        $promise->wait();
    }

    public function testCreatesClientsFromConstructor()
    {
        $client = new StsClient([
            'region'  => 'us-west-2',
            'version' => 'latest'
        ]);
        $this->assertInstanceOf('Aws\Sts\StsClient', $client);
        $this->assertEquals('us-west-2', $client->getRegion());
    }

    public function testCanGetEndpoint()
    {
        $client = $this->createClient();
        $this->assertEquals(
            'http://us-east-1.foo.amazonaws.com',
            $client->getEndpoint()
        );
    }

    public function testSignsRequestsUsingSigner()
    {
        $mock = new MockHandler([new Result([])]);
        $conf = [
            'region'  => 'us-east-1',
            'version' => 'latest',
            'credentials' => [
                'key'    => 'foo',
                'secret' => 'bar'
            ],
            'handler' => $mock
        ];

        $client = new Ec2Client($conf);
        $client->describeInstances();
        $request = $mock->getLastRequest();
        $str = \GuzzleHttp\Psr7\str($request);
        $this->assertContains('AWS4-HMAC-SHA256', $str);
    }

    public function testAllowsFactoryMethodForBc()
    {
        Ec2Client::factory([
            'region'  => 'us-west-2',
            'version' => 'latest'
        ]);
    }

    public function testCanInstantiateAliasedClients()
    {
        new SesClient([
            'region'  => 'us-west-2',
            'version' => 'latest'
        ]);
    }

    public function testCanGetSignatureProvider()
    {
        $client = $this->createClient([]);
        $ref = new \ReflectionMethod($client, 'getSignatureProvider');
        $ref->setAccessible(true);
        $provider = $ref->invoke($client);
        $this->assertTrue(is_callable($provider));
    }

    /**
     * @expectedException \RuntimeException
     * @expectedExceptionMessage Instances of Aws\AwsClient cannot be serialized
     */
    public function testDoesNotPermitSerialization()
    {
        $client = $this->createClient();
        \serialize($client);
    }

    public function testDoesNotSignOperationsWithAnAuthTypeOfNone()
    {
        $client = $this->createClient(
            [
                'metadata' => [
                    'signatureVersion' => 'v4',
                ],
                'operations' => [
                    'Foo' => [
                        'http' => ['method' => 'POST'],
                    ],
                    'Bar' => [
                        'http' => ['method' => 'POST'],
                        'authtype' => 'none',
                    ],
                ],
            ],
            [
                'handler' => function (
                    CommandInterface $command,
                    RequestInterface $request
                ) {
                    foreach (['Authorization', 'X-Amz-Date'] as $signatureHeader) {
                        if ('Bar' === $command->getName()) {
                            $this->assertFalse($request->hasHeader($signatureHeader));
                        } else {
                            $this->assertTrue($request->hasHeader($signatureHeader));
                        }
                    }

                    return new Result;
                }
            ]
        );

        $client->foo();
        $client->bar();
    }

    public function testSignOperationsWithAnAuthType()
    {
        $client = $this->createHttpsEndpointClient(
            [
                'metadata' => [
                    'signatureVersion' => 'v4',
                ],
                'operations' => [
                    'Bar' => [
                        'http' => ['method' => 'POST'],
                        'authtype' => 'v4-unsigned-body',
                    ],
                ],
            ],
            [
                'handler' => function (
                    CommandInterface $command,
                    RequestInterface $request
                ) {
                    foreach (['Authorization','X-Amz-Content-Sha256', 'X-Amz-Date'] as $signatureHeader) {
                        $this->assertTrue($request->hasHeader($signatureHeader));
                    }
                    $this->assertEquals('UNSIGNED-PAYLOAD', $request->getHeader('X-Amz-Content-Sha256')[0]);
                    return new Result;
                }
            ]
        );
        $client->bar();
    }

    private function createHttpsEndpointClient(array $service = [], array $config = [])
    {
        $apiProvider = function () use ($service) {
            $service['metadata']['protocol'] = 'query';
            return $service;
        };

        return new AwsClient($config + [
            'handler'      => new MockHandler(),
            'credentials'  => new Credentials('foo', 'bar'),
            'signature'    => new SignatureV4('foo', 'bar'),
            'endpoint'     => 'https://us-east-1.foo.amazonaws.com',
            'region'       => 'foo',
            'service'      => 'foo',
            'api_provider' => $apiProvider,
            'error_parser' => function () {},
            'version'      => 'latest'
        ]);
    }

    private function createClient(array $service = [], array $config = [])
    {
        $apiProvider = function ($type) use ($service, $config) {
            if ($type == 'paginator') {
                return isset($service['pagination'])
                    ? ['pagination' => $service['pagination']]
                    : ['pagination' => []];
            } elseif ($type == 'waiter') {
                return isset($service['waiters'])
                    ? ['waiters' => $service['waiters'], 'version' => 2]
                    : ['waiters' => [], 'version' => 2];
            } else {
                if (!isset($service['metadata'])) {
                    $service['metadata'] = [];
                }
                $service['metadata']['protocol'] = 'query';
                return $service;
            }
        };

        return new AwsClient($config + [
            'handler'      => new MockHandler(),
            'credentials'  => new Credentials('foo', 'bar'),
            'signature'    => new SignatureV4('foo', 'bar'),
            'endpoint'     => 'http://us-east-1.foo.amazonaws.com',
            'region'       => 'foo',
            'service'      => 'foo',
            'api_provider' => $apiProvider,
            'error_parser' => function () {},
            'version'      => 'latest'
        ]);
    }
}


text:
package com.huawei.streaming.cql.executor;

import java.io.File;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;

import org.junit.Test;

import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.huawei.streaming.api.Application;
import com.huawei.streaming.api.PhysicalPlan;
import com.huawei.streaming.api.UserFunction;
import com.huawei.streaming.api.opereators.AggregateOperator;
import com.huawei.streaming.api.opereators.FilterOperator;
import com.huawei.streaming.api.opereators.FunctorOperator;
import com.huawei.streaming.api.opereators.JoinFunctionOperator;
import com.huawei.streaming.api.opereators.JoinType;
import com.huawei.streaming.api.opereators.KafkaInputOperator;
import com.huawei.streaming.api.opereators.KafkaOutputOperator;
import com.huawei.streaming.api.opereators.Operator;
import com.huawei.streaming.api.opereators.OperatorTransition;
import com.huawei.streaming.api.opereators.RandomGenInputOperator;
import com.huawei.streaming.api.opereators.UnionOperator;
import com.huawei.streaming.api.opereators.Window;
import com.huawei.streaming.api.opereators.serdes.SimpleSerDeAPI;
import com.huawei.streaming.api.streams.Column;
import com.huawei.streaming.api.streams.Schema;
import com.huawei.streaming.application.DistributeType;
import com.huawei.streaming.cql.ConstInTestCase;

/**
 * 完成的各种算子序列化
 *
 */
public class FullXMLWriterTest
{

    private static final String LEFT_INPUT_TOPIC = "innerjoin6_left_in";

    private static final String RIGHT_INPUT_TOPIC = "innerjoin6_right_in";

    private static final String BASICPATH = File.separator + "executor" + File.separator + "planserde" + File.separator;

    private static String serDir = null;

    private static String serFileName = "fullser.xml";

    /**
     * 写入测试
     *
     */
    @Test
    public void writerTest()
        throws Exception
    {
        setDir();

        Application app = new Application("fullapptest");

        app.setSchemas(createSchemas());
        app.setOperators(createOperators());
        app.setOpTransition(createTransitions(app.getOperators(), app.getSchemas()));
        createUserDefineds(app);

        PhysicalPlan phyplan = new PhysicalPlan();
        phyplan.setApploication(app);

        PhysicalPlanWriter.write(phyplan, serDir + serFileName);
    }

    private static List<Schema> createSchemas()
    {
        List<Column> cols1 = new ArrayList<Column>();
        cols1.add(new Column("a", Integer.class));
        cols1.add(new Column("b", Integer.class));
        cols1.add(new Column("c", String.class));

        List<Column> cols2 = new ArrayList<Column>();
        cols2.add(new Column("a", Integer.class));
        cols2.add(new Column("b", Integer.class));
        cols2.add(new Column("c", String.class));

        Schema schema1 = new Schema("testSchema1");
        schema1.setCols(cols1);

        Schema schema2 = new Schema("testSchema2");
        schema2.setCols(cols2);

        List<Schema> results = Lists.newArrayList();
        results.add(schema1);
        results.add(schema2);

        return results;
    }

    private static List<Operator> createOperators()
    {
        List<Operator> operators = Lists.newArrayList();
        operators.add(createKafkaReaderOperator1());
        operators.add(createKafkaReaderOperator2());
        operators.add(createKafkaReaderOperator3());
        operators.add(createJoinOperator());
        operators.add(createUnionOperator());
        operators.add(createFilterOperator());
        operators.add(createAggregateOperator());
        operators.add(createFunctorOperator());
        operators.add(createKafkaWriterOperator());
        operators.add(createRandomGenSourceOperator());
        return operators;
    }

    private static Operator createRandomGenSourceOperator()
    {
        return RandomGenInputOperator.sendEverySeconds("randomgen",
            ConstInTestCase.I_2,
            ConstInTestCase.I_1000,
            Long.valueOf(ConstInTestCase.I_10));
    }

    private static Operator createKafkaReaderOperator3()
    {
        SimpleSerDeAPI deser = new SimpleSerDeAPI();
        deser.setSeparator(",");

        KafkaInputOperator op = new KafkaInputOperator("kafkaReader_union", 1);
        op.setGroupId("groupid");
        op.setTopic(RIGHT_INPUT_TOPIC);
        op.setZookeepers("158.1.130.21:2181");
        op.setDeserializer(deser);
        return op;

    }

    private static Operator createUnionOperator()
    {
        return new UnionOperator("union", ConstInTestCase.I_1);
    }

    private static Operator createKafkaReaderOperator1()
    {
        SimpleSerDeAPI deser = new SimpleSerDeAPI();
        deser.setSeparator(",");

        KafkaInputOperator op = new KafkaInputOperator("kafkaReader_left", 1);
        op.setGroupId("groupid");
        op.setTopic(LEFT_INPUT_TOPIC);
        op.setZookeepers("158.1.130.21:2181");
        op.setDeserializer(deser);
        return op;
    }

    private static Operator createKafkaReaderOperator2()
    {
        SimpleSerDeAPI deser = new SimpleSerDeAPI();
        deser.setSeparator(",");

        KafkaInputOperator op = new KafkaInputOperator("kafkaReader_right", 1);
        op.setGroupId("groupid");
        op.setTopic(RIGHT_INPUT_TOPIC);
        op.setZookeepers("158.1.130.21:2181");
        op.setDeserializer(deser);
        return op;
    }

    private static Operator createJoinOperator()
    {
        Window timeslide = Window.createTimeSlideWindow(ConstInTestCase.I_100);
        Window lengthslide = Window.createLengthSlideWindow(ConstInTestCase.I_100);

        JoinFunctionOperator op = new JoinFunctionOperator("join", 1);
        op.setLeftWindow(timeslide);
        op.setRightWindow(lengthslide);
        op.setFilterAfterJoinExpression("a> 0 and a<100");
        op.setJoinExpression("s1.a=s2.a");
        op.setLeftStreamName("s1");
        op.setRightStreamName("s2");
        op.setJoinType(JoinType.INNER_JOIN);
        op.setOutputExpression("s1.a,s2.b,s2.c");
        return op;
    }

    private static Operator createFilterOperator()
    {
        FilterOperator op = new FilterOperator("filter", 1);
        op.setOutputExpression("a,b,c");
        op.setFilterExpression("a> 0 and a<100");
        return op;
    }

    private static Operator createAggregateOperator()
    {
        Window timebatchwin = Window.createTimeBatchWindow(ConstInTestCase.I_100);
        AggregateOperator op = new AggregateOperator("agg", 1);
        op.setWindow(timebatchwin);
        op.setFilterAfterAggregate("b>10");
        op.setFilterBeforeAggregate("a>1");
        op.setOutputExpression("a,sum(b),count(b)");
        op.setGroupbyExpression("c");
        op.setOrderBy("c,a desc");
        op.setLimit(ConstInTestCase.I_10);
        return op;
    }

    private static Operator createFunctorOperator()
    {
        FunctorOperator op = new FunctorOperator("functor", 1);
        op.setFilterExpression("a>1 and b<100");
        op.setOutputExpression("a,tostring(b)");
        return op;
    }

    private static Operator createKafkaWriterOperator()
    {
        SimpleSerDeAPI ser = new SimpleSerDeAPI();
        ser.setSeparator(",");

        KafkaOutputOperator op = new KafkaOutputOperator("kafkaWriter", 1);
        op.setTopic("innerjoin_out");
        op.setSerializer(ser);
        return op;
    }

    private static void createUserDefineds(Application app)
    {
        /**
         * 自定义函数
         * 自定义窗口
         * 自定义参数
         */
        TreeMap<String, String> udsargs = Maps.newTreeMap();
        udsargs.put("app.args.1", "true");

        String[] files = {"d:\\conf.xml,e:\\abc.jar"};

        /**
         * 窗口定义好之后,直接用名称就可以识别出来
         * 系统自动进行窗口的注册
         */

        Map<String, String> testcomonArgs6 = new HashMap<String, String>();
        testcomonArgs6.put("udw.length", "5");

        List<UserFunction> udfs = Lists.newArrayList();
        UserFunction userFunction = new UserFunction();
        userFunction.setName("udf1");
        userFunction.setClazz("com.huawei.streaming.udf.ToChar");
        udfs.add(userFunction);

        app.setConfs(udsargs);
        app.setUserFiles(files);
        app.setUserFunctions(udfs);

    }

    private static List<OperatorTransition> createTransitions(List<Operator> ops, List<Schema> schemas)
    {
        List<OperatorTransition> results = Lists.newArrayList();
        results.add(new OperatorTransition("s1", ops.get(ConstInTestCase.I_0), ops.get(ConstInTestCase.I_3),
            DistributeType.FIELDS, "a", schemas.get(ConstInTestCase.I_0)));
        results.add(new OperatorTransition("s2", ops.get(ConstInTestCase.I_1), ops.get(ConstInTestCase.I_3),
            DistributeType.FIELDS, "a", schemas.get(ConstInTestCase.I_0)));
        results.add(new OperatorTransition("s3", ops.get(ConstInTestCase.I_2), ops.get(ConstInTestCase.I_4),
            DistributeType.FIELDS, "a", schemas.get(ConstInTestCase.I_1)));
        results.add(new OperatorTransition("s4", ops.get(ConstInTestCase.I_3), ops.get(ConstInTestCase.I_4),
            DistributeType.FIELDS, "a", schemas.get(ConstInTestCase.I_1)));
        results.add(new OperatorTransition("s5", ops.get(ConstInTestCase.I_4), ops.get(ConstInTestCase.I_5),
            DistributeType.SHUFFLE, null, schemas.get(ConstInTestCase.I_1)));
        results.add(new OperatorTransition("s6", ops.get(ConstInTestCase.I_5), ops.get(ConstInTestCase.I_6),
            DistributeType.FIELDS, "a", schemas.get(ConstInTestCase.I_1)));
        results.add(new OperatorTransition("s7", ops.get(ConstInTestCase.I_6), ops.get(ConstInTestCase.I_7),
            DistributeType.SHUFFLE, null, schemas.get(ConstInTestCase.I_1)));
        results.add(new OperatorTransition("s8", ops.get(ConstInTestCase.I_7), ops.get(ConstInTestCase.I_8),
            DistributeType.SHUFFLE, null, schemas.get(ConstInTestCase.I_1)));
        return results;
    }

    /**
     * 设置待序列化的文件路径
     *
     */
    private static void setDir()
    {
        String classPath = PhysicalPlanWriterTest.class.getResource("/").getPath();

        try
        {
            classPath = URLDecoder.decode(classPath, "UTF-8");
        }
        catch (UnsupportedEncodingException e)
        {
            e.printStackTrace();
        }

        serDir = classPath + BASICPATH + File.separator;
    }

}


text:
@interface WYWebController : UIViewController

@property (nonatomic, copy) NSString *url;

@end


text:
/**
 * create material
 */

export default {
    name: 'material',
    icon: 'fa fa-file-image-o',
    i18n: 'material',
    handler(editor) {
      editor.$emit('showmaterial', true)
    }
}


text:
const imageUrl = "https://en.wikipedia.org/static/images/project-logos/enwiki.png";
// const imageUrl = "local2.png";

document.addEventListener("DOMContentLoaded", loadAndDrawImages);

async function loadAndDrawImages() {
  var sourceImage = await loadImage(imageUrl);

  var registration = await navigator.serviceWorker.register("service_worker.js");
  await serviceWorkerActive();

  var localImage = await loadImage(imageUrl);

  var canvas = document.getElementById("canvas");
  var ctx = canvas.getContext("2d");

  canvas.width = sourceImage.width;
  canvas.height = sourceImage.height;

  ctx.drawImage(localImage, 0, 0);
  ctx.drawImage(sourceImage, 0, 0);

  var outputImage = new Image();
  outputImage.src = canvas.toDataURL();

  var outputSection = document.getElementById("output_section");
  outputSection.appendChild(outputImage);

  registration.unregister();
}

function loadImage(path) {
  return new Promise(function (resolve, reject) {
    var img = new Image();
    img.onload = function () {resolve(img);};
    img.src = path;
  });
}

function serviceWorkerActive() {
  return navigator.serviceWorker.ready.then(function (registration) {
    var serviceWorker = registration.active;

    return new Promise(function (resolve, reject) {
      if (serviceWorker.state === "activated") {
        return resolve(registration);
      } else {
        serviceWorker.addEventListener("statechange", function () {
          if (serviceWorker.state === "activated") {
            return resolve(registration);
          }
        });
      }
    });
  });
}


text:
import {Component} from 'angular2/core';
import {Pelicula} from './model/pelicula';

// Decorador component, indicamos en que etiqueta se va a cargar la plantilla
@Component({
    selector: 'my-app',
    templateUrl: 'app/templates/peliculas.html'
})

// Clase del componente donde iran los datos y funcionalidades
export class AppComponent {
  titulo = 'Peliculas Angular 2';
  peliculas = [
    new Pelicula(1, 'Batman v. Superman', "Zack Snider", 2016),
    new Pelicula(2, 'La verdad duele', 'Will Smith', 2015),
    new Pelicula(3, 'Una historia real', 'Desconocido', 2014),
  ];

  constructor(){

  }
}


text:
use std::path::PathBuf;
use std::sync::Arc;
use toml;
use ::consts::*;
use ::flota::Cypherable;
use ::util::errors::*;
use ::util::url::Url;
use super::setting::Setting;

#[allow(dead_code)]
enum UnattendedInstallation {
    Kickstart(String),
    KickstartFile(PathBuf),
}

#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum Ingredient {
    /// distro + arch (+ unattended)
    OffTheShelf {
        /// Distro to use.
        /// All available distros can be seen with the command:
        /// "./PROGNAME templates show"
        distro: String,
    },
    /// iso (+ md5sum) + vmlinuz + initrd + arch (+ unattended)
    Custom {
        /// ISO uri.
        iso: Url,
        /// md5 checksum file uri to be checked against about iso.
        /// Note that if it contains several irrelevant target
        /// files' md5 and therefore in two columns style, try and
        /// parse it automatically. If the parsing fails, md5 checking
        /// will skipped with some warn message.
        /// DEFAULT: None
        iso_md5sum: Option<Url>,
        /// For the time being templates are supposed to be
        /// created with direction boot installation.
        vmlinuz: Url,
        /// For the time being templates are supposed to be
        /// created with direction boot installation.
        /// _no default value_
        initrd: Url,
    },
}

impl Ingredient {
    pub fn distinguish(tml: &toml::Value) -> Result<Self> {
        let distro = unfold!(tml, "distro", String, optional);
        let iso = unfold!(tml, "iso", Url, optional);
        let iso_md5sum = unfold!(tml, "iso_md5sum", Url, optional);
        let vmlinuz = unfold!(tml, "vmlinuz", Url, optional);
        let initrd = unfold!(tml, "initrd", Url, optional);
        match (distro, iso, iso_md5sum, vmlinuz, initrd) {
            (Some(_), Some(_), _, Some(_), Some(_)) => {
                Err("cannot tell which ingredient type you intend".into())
            }
            (Some(distro_), _, _, _, _) => {
                Ok(Ingredient::OffTheShelf { distro: distro_.to_owned() })
            }
            (None, Some(iso_), iso_md5sum_, Some(vmlinuz_), Some(initrd_)) => {
                Ok(Ingredient::Custom {
                    iso: iso_,
                    iso_md5sum: iso_md5sum_,
                    vmlinuz: vmlinuz_,
                    initrd: initrd_,
                })
            }
            _ => Err("insufficient configuration".into()),
        }
    }
}

#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct Template {
    /// Template name.
    pub name: String,
    /// Template architecture.
    pub arch: String,
    /// This is the enum which is defined beforehand.
    pub ingredient: Ingredient,
    pub ks: Option<String>,
    /// SSH Login user name for management use.
    pub mgmt_user: String,
    /// SSH private key path
    pub mgmt_user_ssh_private_key: PathBuf,
    /// SSH public key path
    pub mgmt_user_ssh_public_key: PathBuf,
    /// Arc for global setting
    pub setting: Arc<Setting>,
}

impl Cypherable for Template {
    fn cypher_ident(&self) -> String {
        format!("Template {{ name: '{name}',
                             arch: '{arch}',
                             ingredient: '{ingredient:?}',
                             ks: '{ks:?}',
                             mgmt_user: '{mgmt_user}',
                             mgmt_user_ssh_private_key: '{ssh_priv_key}',
                             mgmt_user_ssh_public_key: '{ssh_pub_key}' }}",
               name = self.name,
               arch = self.arch,
               ingredient = self.ingredient,
               ks = self.ks,
               mgmt_user = self.mgmt_user,
               ssh_priv_key = self.mgmt_user_ssh_private_key.to_str().unwrap(),
               ssh_pub_key = self.mgmt_user_ssh_public_key.to_str().unwrap())
    }
}

impl Template {
    pub fn from_toml(val: &toml::Value, setting: &Arc<Setting>) -> Result<Self> {
        let name = unfold!(val, "name", String);
        let arch = unfold!(val, "arch", String);
        let ingredient = match Ingredient::distinguish(val) {
            Ok(ing) => ing,
            Err(_) => panic!("would not panic!"),
        };
        let ks = unfold!(val, "ks", String, optional);
        let mgmt_user = unfold!(val, "mgmt_user", String, optional,
                                format!("admin_{}", *PROGNAME));
        let mgmt_user_ssh_private_key = unfold!(
            val, "mgmt_user_ssh_private_key", PathBuf, optional,
            PathBuf::from(format!("/home/{}/.ssh/id_rsa", mgmt_user)));
        let mgmt_user_ssh_public_key = unfold!(
            val, "mgmt_user_ssh_public_key", PathBuf, optional,
            PathBuf::from(format!("/home/{}/.ssh/id_rsa.pub", mgmt_user)));
        Ok(Template {
            name: name,
            arch: arch,
            ingredient: ingredient,
            ks: ks,
            mgmt_user: mgmt_user,
            mgmt_user_ssh_private_key: mgmt_user_ssh_private_key,
            mgmt_user_ssh_public_key: mgmt_user_ssh_public_key,
            setting: setting.clone(),
        })
    }
}


text:
<!DOCTYPE html>

{% include head.html %}

{% include nav.html %}

Print

{% include footer.html %}
{% include scripts.html %}


text:
REPORTER=dot

serve: node_modules
	@node_modules/serve/bin/serve -Slojp 0

test: node_modules
	@node_modules/mocha/bin/_mocha test/*.test.js \
		--reporter $(REPORTER) \
		--timeout 500 \
		--check-leaks \
		--bail

node_modules: package.json
	@packin install --meta $< --folder $@

.PHONY: serve test


text:
#include "HGObjectManager.h"
#include "HGParamParser.h"
#include "HGData.h"

#include "HGPhysicalObject.h"
#include "HGSceneNode.h"
#include "HGQuadEntity.h"

#include "HGHash.h"

namespace HG
{

ObjectManager::ObjectManager()
{
}

ObjectManager::~ObjectManager()
{
}

void ObjectManager::initialize()
{
    memset(mComponentInfo, 0, sizeof(component_info_t) * COMP_COUNT);
	registerBuiltinComponents();
}

void ObjectManager::deInitialize()
{
    deleteObjects();
}

bool ObjectManager::loadObjectsFromFile(const char *filename)
{
    bool ret = false;

    Data *data = Data::CreateFromFileContent(filename);

    BREAK_START;

        if (data == NULL)
            break;

        ret = loadObjects(data);

    BREAK_END;

    delete data;

    return ret;
}

bool ObjectManager::loadObjects(Data *data)
{
    bool ret = false;

    BREAK_START;

        if (data == NULL)
            break;

        ParamParser parser(data->getData());

        for (param_node_t *curNode = parser.getCurrentNode(); curNode != NULL; curNode = parser.moveToNextNode())
        {
            if (parser.getParameterType() != TypeHashObject)
            {
                ret = false;
                break;
            }

            uint32_t objectID = createObject(parser);
            //PostMessage(oId, MT_OBJECT_CREATED);
        }

    BREAK_END;

    return ret;
}

bool ObjectManager::isObjectExists(uint32_t name)
{
    bool ret = false;

    BREAK_START;

        if (mObjects.empty())
            break;

        ObjectMap::iterator iter = mObjects.find(name);
        if (iter == mObjects.end())
            break;
        else
            ret = true;

    BREAK_END;

    return ret;
}

// notice here, we don't pass reference, cause the parser will be moveToNext()
// so we need a copy of it
uint32_t ObjectManager::createObject(ParamParser node)
{
    return createObject(node, node.getName());
}

uint32_t ObjectManager::createObject(ParamParser node, uint32_t name)
{
    uint32_t ret = 0;

    BREAK_START;

        if(node.getParameterType() != TypeHashObject)
            break;

        if (isObjectExists(name))
        {
            ret = name;
            break;
        }

        // Create all the components, and add them to the db
        for (param_node_t *child = node.moveToFirstChild(); child != NULL; child = node.moveToNextNode())
        {
            IComponent *comp = createComponent(name, node);
			addComponentToObject(comp, name);
        }

        ret = name;

    BREAK_END;

    return ret;
}

bool ObjectManager::deleteObject(uint32_t name)
{
    bool ret = false;

    BREAK_START;

        if (!isObjectExists(name))
            break;

		ObjectMap::iterator objectIter = mObjects.find(name);
		if (objectIter == mObjects.end())
			break;

		ComponentsMap *compMap = objectIter->second;
		if (compMap == NULL)
			break;

		ComponentsMap::iterator compMapIter = compMap->begin();
		for (; compMapIter != compMap->end(); ++compMapIter)
		{
			IComponent *component = compMapIter->second;
			if (component == NULL)
				continue;

            ComponentDeleteMethod delFunc = mComponentInfo[compMapIter->first].deleteMethod;
            if (delFunc)
            {
                component->deInit();
                delFunc(component);
            }
		}

		compMap->clear();
		delete compMap;
		mObjects.erase(objectIter);
		ret = true;

    BREAK_END;

    return ret;
}

void ObjectManager::deleteObjects()
{
	ObjectMap::iterator objectIter = mObjects.begin();
	for (; objectIter != mObjects.end(); ++objectIter)
	{
		ComponentsMap *compMap = objectIter->second;
		if (compMap == NULL)
			continue;

		ComponentsMap::iterator compMapIter = compMap->begin();
		for (; compMapIter != compMap->end(); ++compMapIter)
		{
            IComponent *component = compMapIter->second;
            if (component == NULL)
                continue;

            ComponentDeleteMethod delFunc = mComponentInfo[compMapIter->first].deleteMethod;
            if (delFunc)
            {
                component->deInit();
                delFunc(component);
            }
		} // ComponentsMap
		compMap->clear();
		delete compMap;
	} // ObjectMap
	mObjects.clear();
}

ComponentsMap* ObjectManager::getObjectComponents(uint32_t name)
{
    ComponentsMap *ret = NULL;

    BREAK_START;

        if (mObjects.empty())
            break;

        ObjectMap::iterator iter = mObjects.find(name);
        if (iter == mObjects.end())
            break;

        ret = iter->second;

    BREAK_END;

    return ret;
}

IComponent* ObjectManager::queryComponent(uint32_t name, ComponentTypeID ctid)
{
    IComponent *ret = NULL;

    BREAK_START;

        if (!isObjectExists(name))
            break;

        ObjectMap::iterator objIter = mObjects.find(name);
        if (objIter == mObjects.end())
            break;

        ComponentsMap *compMap = objIter->second;
        ComponentsMap::iterator compIter = compMap->find(ctid);
        if (compIter == compMap->end())
            break;

        ret = compIter->second;

    BREAK_END;

    return ret;
}

// Component Methods
IComponent* ObjectManager::createComponent(uint32_t ownerName, ParamParser node)
{
    IComponent *ret = NULL;

	BREAK_START;

		ComponentTypeID ctid = node.getComponentType();
		if (ctid == COMP_NONE)
			break;

		ComponentCreateMethod newFunc = mComponentInfo[ctid].createMethod;
		if (newFunc == NULL)
			break;

		IComponent *newComp = newFunc();
		if (newComp != NULL)
		{
			newComp->mObjectName = ownerName;
			newComp->init(&node);
		}

		ret = newComp;

    BREAK_END;

    return ret;
}

void ObjectManager::registerBuiltinComponents()
{
    PhysicalObject::RegisterComponentType();
    SceneNode::RegisterComponentType();
    QuadEntity::RegisterComponentType();
}

void ObjectManager::registerComponent(ComponentTypeID ctid, uint32_t compName, ComponentCreateMethod createMethod, ComponentDeleteMethod deleteMethod)
{
	mComponentInfo[ctid].createMethod = createMethod;
	mComponentInfo[ctid].deleteMethod = deleteMethod;
	mComponentInfo[ctid].hashName = compName;
}

ComponentTypeID ObjectManager::getComponentTypeByName(uint32_t name)
{
    ComponentTypeID ret = COMP_NONE;

    BREAK_START;

		for (int ctid = (int)COMP_NONE; ctid < (int)COMP_COUNT; ctid++)
		{
			if (mComponentInfo[ctid].hashName == name)
			{
				ret = (ComponentTypeID)ctid;
				break;
			}
		}

    BREAK_END;

    return ret;
}

bool ObjectManager::addComponentToObject(IComponent* comp, uint32_t objectName)
{
    bool ret = false;

    BREAK_START;

		if (comp == NULL)
			break;

        // object not exists
        if (!isObjectExists(objectName))
        {
			ComponentsMap *compMap = new ComponentsMap;
			compMap->insert(ComponentsMap::value_type(comp->getComponentTypeID(), comp));
			mObjects.insert(ObjectMap::value_type(objectName, compMap));
        }

		ObjectMap::iterator objectIter = mObjects.find(objectName);
		if (objectIter == mObjects.end())
			break;

		ComponentsMap *compsMap = objectIter->second;
        if (compsMap == NULL)
            break;

        compsMap->insert(ComponentsMap::value_type(comp->getComponentTypeID(), comp));
        ret = true;

    BREAK_END;

    return ret;
}

// event
void ObjectManager::subscribeToEvent(ComponentTypeID ctid, EventID etid)
{
    mEventComponentSet[etid].insert(ctid);
}

void ObjectManager::postEvent(uint32_t objName, const Event& event)
{
    if (!isObjectExists(objName))
        return;

    ComponentsMap *compMap = getObjectComponents(objName);

    if (compMap != NULL)
    {

        EventComponentSet &eventCompSet = mEventComponentSet[event.getEventID()];
        EventComponentSet::iterator setIter = eventCompSet.begin();
        for (; setIter != eventCompSet.end(); ++setIter)
        {
            ComponentsMap::iterator compMapIter = compMap->find((*setIter));
            if (compMapIter != compMap->end())
                (compMapIter->second)->handleEvent(event);
        }
    }
}

void ObjectManager::broadcastEvent(const Event& event)
{
    ObjectMap::iterator objmapIter = mObjects.begin();
    for (; objmapIter != mObjects.end(); ++objmapIter)
    {
        ComponentsMap *compMap = objmapIter->second;
        if (compMap == NULL)
            continue;

        EventComponentSet &eventCompSet = mEventComponentSet[event.getEventID()];
        EventComponentSet::iterator eventSetIter = eventCompSet.begin();
        for (; eventSetIter != eventCompSet.end(); ++eventSetIter)
        {
            ComponentsMap::iterator compMapIter = compMap->find(*(eventSetIter));
            if (compMapIter != compMap->end())
                (compMapIter->second)->handleEvent(event);

        }
    }
}

}


text:
/*
  Used to get the backup quotes from the back-end API
  This backup quotes will be used by the client to show the quotes when offline
  When the API call fails, quotes are recieved from a static file
*/
import fetch from 'isomorphic-fetch';

import API from 'utils/api';
import tempQuote from 'utils/backup-quotes';
import { getRandomItemFromArray } from 'utils/utils';

// Type of Action- When the backup has been received after an API call
export const BACKUP_RECEIVED = 'backup_received';

// Async Action to get the backup quotes from the API
export function get_backup_quote() {
  return function(dispatch) {
    return fetch(API.root + API.path.popularQuote)
      .then(response => response.json())
      .then((json) => {
        dispatch(backup_received(json));
      })
      .catch(() => {
        // On API failure, use backup quotes from static files
        dispatch(backup_received(tempQuote));
      });
  }
}

// Action creator - Used when the backup is received from back end API
export function backup_received(data) {
  return {
    type: BACKUP_RECEIVED,
    data
  }
}

// Actual reducer for the backup.
export default function backup(state = {}, action) {
  switch(action.type) {
    case BACKUP_RECEIVED:
      if (action.data.length) {
        const item = getRandomItemFromArray(action.data);
        return Object.assign({}, state, {content: item.content.rendered, title: item.title.rendered});
      }
      return state;
    default:
      return state;
  }
}


text:
package com.ms.square.android.com.saadahmad.smarthome;

import android.annotation.TargetApi;
import android.app.Fragment;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.drawable.BitmapDrawable;
import android.os.Build;
import android.os.Bundle;
import android.renderscript.Allocation;
import android.renderscript.RenderScript;
import android.renderscript.ScriptIntrinsicBlur;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.widget.ImageView;
import android.widget.TextView;
import com.ms.square.android.R;

/**
 * Created by shark89fish on 11/2/15.
 */
public class RSBlurFragment extends android.support.v4.app.Fragment{
    private ImageView image;
    private TextView text;
    private TextView statusText;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.activity_main, container, false);
        image = (ImageView) view.findViewById(R.id.bg_img);
        text = (TextView) view.findViewById(R.id.text_Nest);
        statusText = addStatusText((ViewGroup) view.findViewById(R.id.controls));
        applyBlur();
        return view;
    }

    private void applyBlur() {
        image.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
            @Override
            public boolean onPreDraw() {
                image.getViewTreeObserver().removeOnPreDrawListener(this);
                image.buildDrawingCache();

                Bitmap bmp = image.getDrawingCache();
                blur(bmp, text);
                return true;
            }
        });
    }

    @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
    private void blur(Bitmap bkg, View view) {
        long startMs = System.currentTimeMillis();

        float radius = 20;

        Bitmap overlay = Bitmap.createBitmap((int) (view.getMeasuredWidth()),
                (int) (view.getMeasuredHeight()), Bitmap.Config.ARGB_8888);

        Canvas canvas = new Canvas(overlay);

        canvas.translate(-view.getLeft(), -view.getTop());
        canvas.drawBitmap(bkg, 0, 0, null);

        RenderScript rs = RenderScript.create(getActivity());

        Allocation overlayAlloc = Allocation.createFromBitmap(
                rs, overlay);

        ScriptIntrinsicBlur blur = ScriptIntrinsicBlur.create(
                rs, overlayAlloc.getElement());

        blur.setInput(overlayAlloc);

        blur.setRadius(radius);

        blur.forEach(overlayAlloc);

        overlayAlloc.copyTo(overlay);

        view.setBackground(new BitmapDrawable(
                getResources(), overlay));

        rs.destroy();
        statusText.setText(System.currentTimeMillis() - startMs + "ms");
    }

    @Override
    public String toString() {
        return "RenderScript";
    }

    private TextView addStatusText(ViewGroup container) {
        TextView result = new TextView(getActivity());
        result.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
        result.setTextColor(0xFFFFFFFF);
        container.addView(result);
        return result;
    }
}


text:
layout: page
title: Kramer Research Executive Retreat
date: 2016-05-24
author: Jason Mcclure
tags: weekly links, java
status: published
summary: Aliquam suscipit turpis ac dui viverra, in viverra nisi.
banner: images/banner/leisure-05.jpg
booking:
  startDate: 10/19/2016
  endDate: 10/22/2016
  ctyhocn: RDUDWHX
  groupCode: KRER
published: true
---
Ut fringilla mauris nisl, ut dictum tellus luctus nec. Nulla at malesuada odio. Cras convallis vitae tortor dictum pretium. Nulla convallis accumsan ultrices. Vestibulum at elementum dolor. Sed efficitur nisi vel porta ultrices. Aliquam varius, dolor et posuere maximus, diam ante iaculis erat, sit amet sollicitudin libero diam ultrices mi. Etiam vitae auctor augue. Donec consequat ante ac tortor iaculis pharetra. Nullam tristique dictum augue vel consectetur. Donec molestie tellus vel mi porta placerat.

* Sed vulputate lorem in condimentum fermentum
* Cras vitae libero vel nisi pretium elementum sed at magna
* Curabitur a elit dictum, rutrum metus non, congue turpis.

Pellentesque vulputate tempor quam nec vulputate. Pellentesque non leo ornare, ultrices odio at, aliquet arcu. Nulla ullamcorper imperdiet tellus, eu rhoncus tortor convallis sit amet. Nullam gravida porta magna cursus vulputate. Nulla fermentum, leo efficitur mollis tincidunt, felis lectus tempus arcu, volutpat blandit turpis arcu quis nibh. Vestibulum placerat ex vitae erat porttitor bibendum. Donec sagittis consequat vehicula. Ut nec bibendum quam. Nulla nisi dui, laoreet at urna eget, pretium tristique eros. Nulla felis ante, dictum auctor diam quis, scelerisque porttitor dolor. In a est aliquam, egestas nisi nec, consectetur erat.
Donec risus leo, semper ut pellentesque sit amet, maximus tristique augue. Phasellus mattis lorem sed orci dapibus dignissim. Phasellus commodo fringilla nisi ut commodo. Morbi ac urna quis sem pulvinar fringilla. Vestibulum rutrum nisi vitae lorem interdum finibus. Phasellus tempor enim nec sapien porta rutrum. In sit amet cursus magna. Aenean viverra ornare venenatis. Vestibulum vulputate, leo at maximus feugiat, sapien ex cursus ligula, sed ultrices odio purus id justo. Nunc a fringilla velit. Donec ipsum tortor, placerat vitae enim in, convallis sodales urna. Aliquam suscipit commodo ipsum et rhoncus.


text:
/*
 * Copyright 2018-2019 Autoware Foundation. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * @file anchor_mask_cuda.h
 * @brief Make anchor mask for filtering output
 * @author Kosuke Murakami
 * @date 2019/02/26
 */

#pragma once

namespace apollo {
namespace perception {
namespace lidar {

class AnchorMaskCuda {
 private:
  const int num_threads_;
  const int num_inds_for_scan_;
  const int num_anchor_;
  const float min_x_range_;
  const float min_y_range_;
  const float pillar_x_size_;
  const float pillar_y_size_;
  const int grid_x_size_;
  const int grid_y_size_;

 public:
  /**
   * @brief Constructor
   * @param[in] num_threads Number of threads per block
   * @param[in] num_inds_for_scan Number of indexes for scan(cumsum)
   * @param[in] num_anchor Number of anchors in total
   * @param[in] min_x_range Minimum x value for point cloud
   * @param[in] min_y_range Minimum y value for point cloud
   * @param[in] pillar_x_size Size of x-dimension for a pillar
   * @param[in] pillar_y_size Size of y-dimension for a pillar
   * @param[in] grid_x_size Number of pillars in x-coordinate
   * @param[in] grid_y_size Number of pillars in y-coordinate
   * @details Captital variables never change after the compile
   */
  AnchorMaskCuda(const int num_threads, const int num_inds_for_scan,
                 const int num_anchor, const float min_x_range,
                 const float min_y_range, const float pillar_x_size,
                 const float pillar_y_size, const int grid_x_size,
                 const int grid_y_size);

  /**
   * @brief call cuda code for making anchor mask
   * @param[in] dev_sparse_pillar_map
   *   Grid map representation for pillar occupancy
   * @param[in] dev_cumsum_along_x
   *   Array for storing cumsum-ed dev_sparse_pillar_map values
   * @param[in] dev_cumsum_along_y
   *   Array for storing cumsum-ed dev_cumsum_along_y values
   * @param[in] dev_box_anchors_min_x
   *   Array for storing min x value for each anchor
   * @param[in] dev_box_anchors_min_y
   *   Array for storing min y value for each anchor
   * @param[in] dev_box_anchors_max_x
   *   Array for storing max x value for each anchor
   * @param[in] dev_box_anchors_max_y
   *   Array for storing max y value for each anchor
   * @param[in] dev_box_anchors_max_y
   *   Array for storing max y value for each anchor
   * @param[out] dev_anchor_mask Anchor mask for filtering the network output
   * @details dev_* means device memory. Make a mask for filtering pillar
   * occupancy area
   */
  void DoAnchorMaskCuda(int* dev_sparse_pillar_map, int* dev_cumsum_along_x,
                        int* dev_cumsum_along_y,
                        const float* dev_box_anchors_min_x,
                        const float* dev_box_anchors_min_y,
                        const float* dev_box_anchors_max_x,
                        const float* dev_box_anchors_max_y,
                        int* dev_anchor_mask);
};

}  // namespace lidar
}  // namespace perception
}  // namespace apollo


text:
using System;

namespace Google.Maps.TimeZone
{
	/// <summary>
	/// Provides a request for the Google Maps Time Zone web service.
	/// </summary>
	public class TimeZoneRequest : BaseRequest
	{
		/// <summary>
		/// The latitude and longitude co-ordinates of the location you want the time zone of.
		/// </summary>
		/// <see href="https://developers.google.com/maps/documentation/timezone/intro?hl=en#Usage"/>
		/// <remarks>Required.</remarks>
		public LatLng Location { get; set; }

		/// <summary>
		/// Timestamp specifies the desired date and time.
		/// The Time Zone API uses the timestamp to determine whether or not Daylight Savings should be applied.
		/// </summary>
		/// <see href="https://developers.google.com/maps/documentation/timezone/intro?hl=en#Usage"/>
		/// <remarks>Required.</remarks>
		public DateTime Timestamp { get; set; }

		/// <summary>
		/// The language in which to return results.
		/// If language is not set, the language will default to en.
		/// </summary>
		/// <remarks>Optional.</remarks>
		/// <see href="https://developers.google.com/maps/documentation/timezone/intro?hl=en#Usage"/>
		public string Language { get; set; }

		public override Uri ToUri()
		{
			if(Location == null) throw new InvalidOperationException("Location property is not set.");

			var qsb = new Internal.QueryStringBuilder();
			DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, 0);

			qsb.Append("location", Location.GetAsUrlParameter())
				.Append("timestamp", (Timestamp.ToUniversalTime() - epoch).TotalSeconds.ToString())
				.Append("language", Language);

			var url = "json?" + qsb.ToString();

			return new Uri(url, UriKind.Relative);
		}
	}
}


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.faetec.model.dto;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *NamedQueries referentes a tabela resultado.
@author Antonio Cassiano
 **/
@Entity
@Table(name = "resultado", catalog = "cmv3", schema = "")
@NamedQueries({
    @NamedQuery(name = "ResultadoDTO.findAll", query = "SELECT r FROM ResultadoDTO r"),
    @NamedQuery(name = "ResultadoDTO.findByIdResultado", query = "SELECT r FROM ResultadoDTO r WHERE r.idResultado = :idResultado"),
    @NamedQuery(name = "ResultadoDTO.findByTipo", query = "SELECT r FROM ResultadoDTO r WHERE r.tipo = :tipo"),
    @NamedQuery(name = "ResultadoDTO.findBySubtipo", query = "SELECT r FROM ResultadoDTO r WHERE r.subtipo = :subtipo"),
    @NamedQuery(name = "ResultadoDTO.findByTiporesposta", query = "SELECT r FROM ResultadoDTO r WHERE r.tiporesposta = :tiporesposta"),
    @NamedQuery(name = "ResultadoDTO.findByDescricao", query = "SELECT r FROM ResultadoDTO r WHERE r.descricao = :descricao")})
public class ResultadoDTO extends Resultado implements Serializable {

}


text:
package org.netbeans.lib.cvsclient.util;

import org.netbeans.lib.cvsclient.file.AbstractFileObject;
import org.netbeans.lib.cvsclient.file.ICvsFileSystem;

/**
 * @author Thomas Singer
 */
public final class AllIgnoreFileFilter
        implements IIgnoreFileFilter {

	// Setup ==================================================================

	public AllIgnoreFileFilter() {
	}

	// Implemented ============================================================

	public boolean shouldBeIgnored(AbstractFileObject abstractFileObject, ICvsFileSystem cvsFileSystem) {
		return true;
	}
}


text:
> With a quote

## Heading 2

* With a list
* of really great
  * nested
  * Items

### Heading 3

A **paragraph** here

It makes *appearances* or takes lead roles in front end user interfaces, server side code, as a database - both the management server and data structure, in mobile apps, etc.

### A Table

Data Type     | What it's used for
--------------|-------------------------------------
Number        | Numbers! (integers or decimals)
String        | Text (use 'single' or "double" quotes)
Boolean       | `true` or `false`
Array         | A list of values
Object        | `Key: Value` pairs
undefined     | No value (different from `false` or `0`)
NaN           | Not a Number ( like the result of 1/0 )

#### Heading 4

This is a basement level, but looks like an h1

A code block

```javascript
var static = require('node-static');

if(process.env.LOCAL == "true"){
  var file = new static.Server('./public', {
    "Cache-Control": "no-cache, must-revalidate",
    gzip: true
  });
} else {
  var file = new static.Server('./public', {
    cache: 7200,
    gzip: true
  });
}

```

##### Heading 5

This is a basement level, but looks like an h2

###### Heading 6

This is also a basement Level, but looks liek an h3

---

This stays in the basement until we bust out with an h3 or higher


text:
//
// File:          NWChem_IntegralEvaluator4_Impl.cc
// Symbol:        NWChem.IntegralEvaluator4-v0.4
// Symbol Type:   class
// Babel Version: 0.10.12
// Description:   Server-side implementation for NWChem.IntegralEvaluator4
//
// WARNING: Automatically generated; only changes within splicers preserved
//
// babel-version = 0.10.12
// xml-url       = /home/windus/CCA/mcmd-paper/nwchem/src/cca/repo/NWChem.IntegralEvaluator4-v0.4.xml
//
#include "NWChem_IntegralEvaluator4_Impl.hh"

// DO-NOT-DELETE splicer.begin(NWChem.IntegralEvaluator4._includes)
// Insert-Code-Here {NWChem.IntegralEvaluator4._includes} (additional includes or code)
// DO-NOT-DELETE splicer.end(NWChem.IntegralEvaluator4._includes)

// user-defined constructor.
void NWChem::IntegralEvaluator4_impl::_ctor() {
  // DO-NOT-DELETE splicer.begin(NWChem.IntegralEvaluator4._ctor)
  // Insert-Code-Here {NWChem.IntegralEvaluator4._ctor} (constructor)
  // DO-NOT-DELETE splicer.end(NWChem.IntegralEvaluator4._ctor)
}

// user-defined destructor.
void NWChem::IntegralEvaluator4_impl::_dtor() {
  // DO-NOT-DELETE splicer.begin(NWChem.IntegralEvaluator4._dtor)
  // Insert-Code-Here {NWChem.IntegralEvaluator4._dtor} (destructor)
  // DO-NOT-DELETE splicer.end(NWChem.IntegralEvaluator4._dtor)
}

// static class initializer.
void NWChem::IntegralEvaluator4_impl::_load() {
  // DO-NOT-DELETE splicer.begin(NWChem.IntegralEvaluator4._load)
  // Insert-Code-Here {NWChem.IntegralEvaluator4._load} (class initialization)
  // DO-NOT-DELETE splicer.end(NWChem.IntegralEvaluator4._load)
}

// user-defined static methods: (none)

// user-defined non-static methods:
/**
 * Get buffer pointer for given type.
 * @return Buffer pointer.
 */
void*
NWChem::IntegralEvaluator4_impl::get_buffer (
  /* in */ ::Chemistry::QC::GaussianBasis::IntegralDescr desc )
throw (
  ::sidl::BaseException
){
  // DO-NOT-DELETE splicer.begin(NWChem.IntegralEvaluator4.get_buffer)
  // Insert-Code-Here {NWChem.IntegralEvaluator4.get_buffer} (get_buffer method)
  // DO-NOT-DELETE splicer.end(NWChem.IntegralEvaluator4.get_buffer)
}

/**
 * Method:  get_descriptor[]
 */
::Chemistry::QC::GaussianBasis::CompositeIntegralDescr
NWChem::IntegralEvaluator4_impl::get_descriptor ()
throw (
  ::sidl::BaseException
)
{
  // DO-NOT-DELETE splicer.begin(NWChem.IntegralEvaluator4.get_descriptor)
  // Insert-Code-Here {NWChem.IntegralEvaluator4.get_descriptor} (get_descriptor method)
  // DO-NOT-DELETE splicer.end(NWChem.IntegralEvaluator4.get_descriptor)
}

/**
 * Compute a shell quartet of integrals.
 * @param shellnum1 Gaussian shell number 1.
 * @param shellnum2 Gaussian shell number 2.
 * @param shellnum3 Gaussian shell number 3.
 * @param shellnum4 Gaussian shell number 4.
 * @param deriv_level Derivative level.
 */
void
NWChem::IntegralEvaluator4_impl::compute (
  /* in */ int64_t shellnum1,
  /* in */ int64_t shellnum2,
  /* in */ int64_t shellnum3,
  /* in */ int64_t shellnum4 )
throw (
  ::sidl::BaseException
){
  // DO-NOT-DELETE splicer.begin(NWChem.IntegralEvaluator4.compute)
  // Insert-Code-Here {NWChem.IntegralEvaluator4.compute} (compute method)
  // DO-NOT-DELETE splicer.end(NWChem.IntegralEvaluator4.compute)
}

/**
 * Compute a shell quartet of integrals and return as a borrowed
 * sidl array.
 * @param shellnum1 Gaussian shell number 1.
 * @param shellnum2 Gaussian shell number 2.
 * @param shellnum3 Gaussian shell number 3.
 * @param shellnum4 Gaussian shell number 4.
 * @return Borrowed sidl array buffer.
 */
::sidl::array<double>
NWChem::IntegralEvaluator4_impl::compute_array (
  /* in */ int64_t shellnum1,
  /* in */ int64_t shellnum2,
  /* in */ int64_t shellnum3,
  /* in */ int64_t shellnum4 )
throw (
  ::sidl::BaseException
){
  // DO-NOT-DELETE splicer.begin(NWChem.IntegralEvaluator4.compute_array)
  // Insert-Code-Here {NWChem.IntegralEvaluator4.compute_array} (compute_array method)
  // DO-NOT-DELETE splicer.end(NWChem.IntegralEvaluator4.compute_array)
}

/**
 * Compute integral bounds.
 * @param shellnum1 Gaussian shell number 1.
 * @param shellnum2 Gaussian shell number 2.
 * @param shellnum3 Gaussian shell number 3.
 * @param shellnum4 Gaussian shell number 4.
 */
double
NWChem::IntegralEvaluator4_impl::compute_bounds (
  /* in */ int64_t shellnum1,
  /* in */ int64_t shellnum2,
  /* in */ int64_t shellnum3,
  /* in */ int64_t shellnum4 )
throw (
  ::sidl::BaseException
){
  // DO-NOT-DELETE splicer.begin(NWChem.IntegralEvaluator4.compute_bounds)
  // Insert-Code-Here {NWChem.IntegralEvaluator4.compute_bounds} (compute_bounds method)
  // DO-NOT-DELETE splicer.end(NWChem.IntegralEvaluator4.compute_bounds)
}

/**
 * Compute array of integral bounds.
 * @param shellnum1 Gaussian shell number 1.
 * @param shellnum2 Gaussian shell number 2.
 * @param shellnum3 Gaussian shell number 3.
 * @param shellnum4 Gaussian shell number 4.
 */
::sidl::array<double>
NWChem::IntegralEvaluator4_impl::compute_bounds_array (
  /* in */ int64_t shellnum1,
  /* in */ int64_t shellnum2,
  /* in */ int64_t shellnum3,
  /* in */ int64_t shellnum4 )
throw (
  ::sidl::BaseException
){
  // DO-NOT-DELETE splicer.begin(NWChem.IntegralEvaluator4.compute_bounds_array)
  // Insert-Code-Here {NWChem.IntegralEvaluator4.compute_bounds_array} (compute_bounds_array method)
  // DO-NOT-DELETE splicer.end(NWChem.IntegralEvaluator4.compute_bounds_array)
}

// DO-NOT-DELETE splicer.begin(NWChem.IntegralEvaluator4._misc)
// Insert-Code-Here {NWChem.IntegralEvaluator4._misc} (miscellaneous code)
// DO-NOT-DELETE splicer.end(NWChem.IntegralEvaluator4._misc)