text:
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright 2013 Chris Banes
  ~
  ~ 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.
  -->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <FrameLayout
        android:id="@id/ptr_content"
        android:layout_width="match_parent"
        android:layout_height="48dp">

        <View
            android:id="@id/ptr_text_opaque_bg"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="?android:attr/colorBackground"
            android:visibility="gone" />

        <TextView
            android:id="@id/ptr_text"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:gravity="center" />

    </FrameLayout>

    <ProgressBar
        android:id="@id/ptr_progress"
        android:layout_height="wrap_content"
        android:layout_width="match_parent"
        style="@style/Widget.Holo.ProgressBar.Horizontal.Center"
        android:layout_marginTop="-6dp"/>

</LinearLayout>


text:
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:ns1="urn:oasis:names:tc:xliff:document:1.2">
    <plurals name="daily">
        <item quantity="one">Diari</item>
        <item quantity="other">Cada <ns1:g id="number">%d</ns1:g> dies</item>
    </plurals>
    <plurals name="endByCount">
        <item quantity="one">; una vegada</item>
        <item quantity="other">; <ns1:g id="number">%d</ns1:g> vegades</item>
    </plurals>
    <plurals name="recurrence_end_count">
        <item quantity="one">Per <ns1:g id="event_count">%d</ns1:g> vegades</item>
        <item quantity="other">Per <ns1:g id="event_count">%d</ns1:g> vegades</item>
    </plurals>
    <plurals name="recurrence_interval_daily">
        <!-- Singular form [CHAR LIMIT=30] -->
        <item quantity="one">Cada <ns1:g id="count">%d</ns1:g> dia</item>
        <!-- Plural form [CHAR LIMIT=30] -->
        <item quantity="other">Cada <ns1:g id="count">%d</ns1:g> dies</item>
    </plurals>
    <plurals name="recurrence_interval_monthly">
        <!-- Singular form [CHAR LIMIT=30] -->
        <item quantity="one">Cada <ns1:g id="count">%d</ns1:g> mes</item>
        <!-- Plural form [CHAR LIMIT=30] -->
        <item quantity="other">Cada <ns1:g id="count">%d</ns1:g> mesos</item>
    </plurals>
    <plurals name="recurrence_interval_weekly">
        <!-- Singular form [CHAR LIMIT=30] -->
        <item quantity="one">Cada <ns1:g id="count">%d</ns1:g> setmana</item>
        <!-- Plural form [CHAR LIMIT=30] -->
        <item quantity="other">Cada <ns1:g id="count">%d</ns1:g> setmanes</item>
    </plurals>
    <plurals name="recurrence_interval_yearly">
        <!-- Singular form [CHAR LIMIT=30] -->
        <item quantity="one">Cada <ns1:g id="count">%d</ns1:g> any</item>
        <!-- Plural form [CHAR LIMIT=30] -->
        <item quantity="other">Cada <ns1:g id="count">%d</ns1:g> anys</item>
    </plurals>
    <plurals name="weekly">
        <item quantity="one">Setmenal els <ns1:g id="days_of_week">%2$s</ns1:g></item>
        <item quantity="other">Cada <ns1:g id="number">%1$d</ns1:g> setmanes els <ns1:g id="days_of_week">%2$s</ns1:g></item>
    </plurals>
    <string msgid="4600421777120114993" name="abc_action_bar_home_description">"Navega a la pàgina d\'inici"</string>
    <string msgid="1397052879051804371" name="abc_action_bar_home_description_format">"%1$s, %2$s"</string>
    <string msgid="6623331958280229229" name="abc_action_bar_home_subtitle_description_format">"%1$s, %2$s, %3$s"</string>
    <string msgid="1594238315039666878" name="abc_action_bar_up_description">"Navega cap a dalt"</string>
    <string msgid="3588849162933574182" name="abc_action_menu_overflow_description">"Més opcions"</string>
    <string msgid="4076576682505996667" name="abc_action_mode_done">"Fet"</string>
    <string msgid="7468859129482906941" name="abc_activity_chooser_view_see_all">"Mostra\'ls tots"</string>
    <string msgid="2031811694353399454" name="abc_activitychooserview_choose_application">"Selecciona una aplicació"</string>
    <string msgid="121134116657445385" name="abc_capital_off">"DESACTIVAT"</string>
    <string msgid="3405795526292276155" name="abc_capital_on">"ACTIVAT"</string>
    <string msgid="7723749260725869598" name="abc_search_hint">"Cerca..."</string>
    <string msgid="3691816814315814921" name="abc_searchview_description_clear">"Esborra la consulta"</string>
    <string msgid="2550479030709304392" name="abc_searchview_description_query">"Consulta de cerca"</string>
    <string msgid="8264924765203268293" name="abc_searchview_description_search">"Cerca"</string>
    <string msgid="8928215447528550784" name="abc_searchview_description_submit">"Envia la consulta"</string>
    <string msgid="893419373245838918" name="abc_searchview_description_voice">"Cerca per veu"</string>
    <string msgid="3421042268587513524" name="abc_shareactionprovider_share_with">"Comparteix amb"</string>
    <string msgid="7165123711973476752" name="abc_shareactionprovider_share_with_application">"Comparteix amb %s"</string>
    <string msgid="1603543279005712093" name="abc_toolbar_collapse_description">"Replega"</string>
    <string name="acessibility_recurrence_choose_end_date_description">cambiar la data final</string>
    <string name="day_c">DIA</string>
    <string name="day_picker_description">Graella mensual</string>
    <string name="deleted_key">%1$s esborrat</string>
    <string name="done_label">Fet</string>
    <string name="endByDate">; fins <ns1:g id="date">%s</ns1:g></string>
    <string name="every_weekday">"Tots els dies de la setmana (Dl\u2013Dv)"</string>
    <string name="expiration_picker_seperator">/</string>
    <string name="hint_time_zone_search">Nom del país</string>
    <string name="hms_picker_hours_label">H</string>
    <string name="hms_picker_minutes_label">M</string>
    <string name="hms_picker_seconds_label">S</string>
    <string name="hour_picker_description">Slider d\'hores circular</string>
    <string name="hours_label">h</string>
    <string name="hours_label_description">hores</string>
    <string name="item_is_selected">%1$s seleccionat</string>
    <string name="max_error">Si us plau introdueixi un número més petit o igual a %1$s</string>
    <string name="min_error">Si us plau introdueixi un número més gran o igual a %1$s</string>
    <string name="min_max_error">Si us plau introdueixi un número entre %1$s i %2$s</string>
    <string name="minute_picker_description">Slider de minuts circular</string>
    <string name="minutes_label">m</string>
    <string name="minutes_label_description">minuts</string>
    <string name="month_c">MES</string>
    <string name="monthly">Mensual</string>
    <string name="no_results_found">Cap resultat trobat</string>
    <string name="number_delete">Esborrar</string>
    <string name="number_picker_minus_label">—</string>
    <string name="number_picker_plus_minus">+/-</string>
    <string name="number_picker_seperator">.</string>
    <string name="palestine_display_name">Palestina</string>
    <string name="picker_cancel">Cancel·lar</string>
    <string name="picker_set">Acceptar</string>
    <string name="recurrence_end_continously">Per sempre</string>
    <string name="recurrence_end_count_label">Un número de vegades</string>
    <string name="recurrence_end_date">Fins <ns1:g id="date">%s</ns1:g></string>
    <string name="recurrence_end_date_label">Fins una data</string>
    <string name="recurrence_month_pattern_by_day">el mateix dia de cada mes</string>
    <string name="save_label">Fet</string>
    <string msgid="146198913615257606" name="search_menu_title">"Cerca"</string>
    <string name="searchview_description_clear">Esborrar</string>
    <string name="seconds_label">s</string>
    <string name="seconds_label_description">segons</string>
    <string name="select_day">Seleccioni mes i any</string>
    <string name="select_hours">Seleccionar les hores</string>
    <string name="select_minutes">Seleccionar els minuts</string>
    <string name="select_year">Seleccioni any</string>
    <string msgid="2869576371154716097" name="status_bar_notification_info_overflow">"+999"</string>
    <string name="time_picker_00_label">:00</string>
    <string name="time_picker_30_label">:30</string>
    <string name="time_picker_ampm_label">--</string>
    <string name="time_picker_time_seperator">:</string>
    <string name="timer_delete">Esborrar</string>
    <string name="year_c">ANY</string>
    <string name="year_picker_description">Llista d\'anys</string>
    <string name="yearly_plain">Anual</string>
</resources>

redpajama_set_name: RedPajamaGithub


text:
//
//  geometry.h
//  ARToolKit5
//
//  This file is part of ARToolKit.
//
//  ARToolKit is free software: you can redistribute it and/or modify
//  it under the terms of the GNU Lesser General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
//
//  ARToolKit is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU Lesser General Public License for more details.
//
//  You should have received a copy of the GNU Lesser General Public License
//  along with ARToolKit.  If not, see <http://www.gnu.org/licenses/>.
//
//  As a special exception, the copyright holders of this library give you
//  permission to link this library with independent modules to produce an
//  executable, regardless of the license terms of these independent modules, and to
//  copy and distribute the resulting executable under terms of your choice,
//  provided that you also meet, for each linked independent module, the terms and
//  conditions of the license of that module. An independent module is a module
//  which is neither derived from nor based on this library. If you modify this
//  library, you may extend this exception to your version of the library, but you
//  are not obligated to do so. If you do not wish to do so, delete this exception
//  statement from your version.
//
//  Copyright 2013-2015 Daqri, LLC.
//
//  Author(s): Chris Broaddus
//

#pragma once

#include "linear_algebra.h"
#include "indexing.h"

namespace vision {

    /**
	 * Find which side of a line a point is on (+,-).
	 *
	 * @param[in] A First point on line
	 * @param[in] B Second point on line
	 * @param[in] C Arbitrary third point
	 */
	template<typename T>
	inline T LinePointSide(const T A[2], const T B[], const T C[2]) {
		return ((B[0]-A[0])*(C[1]-A[1])-(B[1]-A[1])*(C[0]-A[0]));
	}

    /**
     * Check the geometric consistency between three correspondences.
     */
    template<typename T>
    inline bool Homography3PointsGeometricallyConsistent(const T x1[2], const T x2[2], const T x3[2],
                                                         const T x1p[2], const T x2p[2], const T x3p[2]) {
        if(((LinePointSide(x1, x2, x3) > 0) ^ (LinePointSide(x1p, x2p, x3p) > 0)) == true) {
            return false;
        }
        return true;
    }

    /**
     * Check the geometric consistency between four correspondences.
     */
    template<typename T>
    inline bool Homography4PointsGeometricallyConsistent(const T x1[2], const T x2[2], const T x3[2], const T x4[2],
                                                         const T x1p[2], const T x2p[2], const T x3p[2], const T x4p[2]) {
        if(((LinePointSide(x1, x2, x3) > 0) ^ (LinePointSide(x1p, x2p, x3p) > 0)) == true)
            return false;
        if(((LinePointSide(x2, x3, x4) > 0) ^ (LinePointSide(x2p, x3p, x4p) > 0)) == true)
            return false;
        if(((LinePointSide(x3, x4, x1) > 0) ^ (LinePointSide(x3p, x4p, x1p) > 0)) == true)
            return false;
        if(((LinePointSide(x4, x1, x2) > 0) ^ (LinePointSide(x4p, x1p, x2p) > 0)) == true)
            return false;
        return true;
    }

    /**
     * Check if four points form a convex quadrilaternal.
     */
    template<typename T>
    bool QuadrilateralConvex(const T x1[2], const T x2[2], const T x3[2], const T x4[2]) {
        int s;

        s  = LinePointSide(x1, x2, x3) > 0 ? 1 : -1;
        s += LinePointSide(x2, x3, x4) > 0 ? 1 : -1;
        s += LinePointSide(x3, x4, x1) > 0 ? 1 : -1;
        s += LinePointSide(x4, x1, x2) > 0 ? 1 : -1;

        return (std::abs(s) == 4);
    }

    /**
     * Compute the area of a triangle.
     */
    template<typename T>
	inline T AreaOfTriangle(const T u[2], const T v[2]) {
		T a = u[0]*v[1] - u[1]*v[0];
		return std::abs(a)*0.5;
	}

    /**
     * Find the smallest area for each triangle formed by 4 points.
     */
    template<typename T>
    T SmallestTriangleArea(const T x1[2], const T x2[2], const T x3[2], const T x4[2]) {
		T v12[2];
		T v13[2];
		T v14[2];
		T v32[2];
		T v34[2];

		SubVector2(v12, x2, x1);
		SubVector2(v13, x3, x1);
		SubVector2(v14, x4, x1);
		SubVector2(v32, x2, x3);
		SubVector2(v34, x4, x3);

        T a1 = AreaOfTriangle(v12, v13);
		T a2 = AreaOfTriangle(v13, v14);
		T a3 = AreaOfTriangle(v12, v14);
		T a4 = AreaOfTriangle(v32, v34);

		return min4(a1, a2, a3, a4);
	}

} // vision


text:
import Component from "@ember/component";
import { gte } from "@ember/object/computed";
import layout from "./template.hbs";

export default Component.extend({
	layout,

	tagName: "div",
	classNames: [ "total" ],

	total: null,

	isVisible: gte( "total", 0 )

}).reopenClass({
	positionalParams: [ "total" ]
});


text:
A HTTP server that responds with the content of the input file, irrespective of what path / method is requested. Can be used for quickly mocking a API response for dev / testing purposes.

## Install

### Mac - homebrew

    brew tap wiztools/repo
    brew install anyurlhttpserver

### Other platforms

    npm install anyurlhttpserver -g

## Run

    anyurlhttpserver -p 3000 -f a.json

When the above command is executed, any URL that is hit at http://localhost:3000/* will serve the contents of `a.json` for all HTTP methods. To see help:

```
  $ anyurlhttpserver -h

  anyurlhttpserver: Serve one file for any url path / method.

  Usage: anyurlhttpserver [options]

  Options:

    -p, --port           [Mandatory] Port to listen.
    -f, --file           File to serve. When not given, serves content '{"hello": "world"}'.
    -c, --content-type   Response content type. Default is 'application/json'.
    -C, --cors           Add CORS headers to response. Optional Allow-Origin URL as param. Default is '*'.
    -H, --header         * Response header in the format 'header:value'.
    -s, --status-code    Response status code. Default is '200'.
    -n, --ngrok          Provides an ngrok tunnel url for the running server.
    -v, --version        Display anyurlhttpserver version.
    -h, --help           Output usage information.

  Parameters with * can be used more than once.

```


text:
FactoryGirl.define do
  factory :subregion do

  end

end


text:
package routers

import (
	"github.com/astaxie/beego"
)

func init() {

	beego.GlobalControllerRouter["github.com/grengojbo/beego-skeleton/controllers:ObjectController"] = append(beego.GlobalControllerRouter["github.com/grengojbo/beego-skeleton/controllers:ObjectController"],
		beego.ControllerComments{
			"Post",
			`/`,
			[]string{"post"},
			nil})

	beego.GlobalControllerRouter["github.com/grengojbo/beego-skeleton/controllers:ObjectController"] = append(beego.GlobalControllerRouter["github.com/grengojbo/beego-skeleton/controllers:ObjectController"],
		beego.ControllerComments{
			"Get",
			`/:objectId`,
			[]string{"get"},
			nil})

	beego.GlobalControllerRouter["github.com/grengojbo/beego-skeleton/controllers:ObjectController"] = append(beego.GlobalControllerRouter["github.com/grengojbo/beego-skeleton/controllers:ObjectController"],
		beego.ControllerComments{
			"GetAll",
			`/`,
			[]string{"get"},
			nil})

	beego.GlobalControllerRouter["github.com/grengojbo/beego-skeleton/controllers:ObjectController"] = append(beego.GlobalControllerRouter["github.com/grengojbo/beego-skeleton/controllers:ObjectController"],
		beego.ControllerComments{
			"Put",
			`/:objectId`,
			[]string{"put"},
			nil})

	beego.GlobalControllerRouter["github.com/grengojbo/beego-skeleton/controllers:ObjectController"] = append(beego.GlobalControllerRouter["github.com/grengojbo/beego-skeleton/controllers:ObjectController"],
		beego.ControllerComments{
			"Delete",
			`/:objectId`,
			[]string{"delete"},
			nil})

	beego.GlobalControllerRouter["github.com/grengojbo/beego-skeleton/controllers:UserController"] = append(beego.GlobalControllerRouter["github.com/grengojbo/beego-skeleton/controllers:UserController"],
		beego.ControllerComments{
			"Post",
			`/`,
			[]string{"post"},
			nil})

	beego.GlobalControllerRouter["github.com/grengojbo/beego-skeleton/controllers:UserController"] = append(beego.GlobalControllerRouter["github.com/grengojbo/beego-skeleton/controllers:UserController"],
		beego.ControllerComments{
			"GetAll",
			`/`,
			[]string{"get"},
			nil})

	beego.GlobalControllerRouter["github.com/grengojbo/beego-skeleton/controllers:UserController"] = append(beego.GlobalControllerRouter["github.com/grengojbo/beego-skeleton/controllers:UserController"],
		beego.ControllerComments{
			"Get",
			`/:uid`,
			[]string{"get"},
			nil})

	beego.GlobalControllerRouter["github.com/grengojbo/beego-skeleton/controllers:UserController"] = append(beego.GlobalControllerRouter["github.com/grengojbo/beego-skeleton/controllers:UserController"],
		beego.ControllerComments{
			"Put",
			`/:uid`,
			[]string{"put"},
			nil})

	beego.GlobalControllerRouter["github.com/grengojbo/beego-skeleton/controllers:UserController"] = append(beego.GlobalControllerRouter["github.com/grengojbo/beego-skeleton/controllers:UserController"],
		beego.ControllerComments{
			"Delete",
			`/:uid`,
			[]string{"delete"},
			nil})

	beego.GlobalControllerRouter["github.com/grengojbo/beego-skeleton/controllers:UserController"] = append(beego.GlobalControllerRouter["github.com/grengojbo/beego-skeleton/controllers:UserController"],
		beego.ControllerComments{
			"Login",
			`/login`,
			[]string{"get"},
			nil})

	beego.GlobalControllerRouter["github.com/grengojbo/beego-skeleton/controllers:UserController"] = append(beego.GlobalControllerRouter["github.com/grengojbo/beego-skeleton/controllers:UserController"],
		beego.ControllerComments{
			"Logout",
			`/logout`,
			[]string{"get"},
			nil})

}


text:
require File.dirname(__FILE__) + '/helper'

context "AmbitiousSphinx Adapter :: Sort" do
  setup do
    @klass = User
    @block = @klass.select { |m| m.name =~ 'jon' }
  end

  specify "order" do
    should.raise do
      @block.sort_by {|m| m.name}
    end
  end

  specify "reverse order with -" do
    should.raise do
       @block.sort_by { |m| -m.age }
     end
  end

  specify "random order" do
    should.raise do
      @block.sort_by { rand }
    end
  end
end


text:
ES5Harness.registerTest({
    id: "15.2.3.6-4-257",

    path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-257.js",

    description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is accessor property and 'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is not thrown if the [[Get]] field of 'desc' is present, and the [[Get]] field of 'desc' and the [[Get]] attribute value of 'name' are undefined (15.4.5.1 step 4.c)",

    test: function testcase() {
        var arrObj = [];
        function setFunc(value) {
            arrObj.setVerifyHelpProp = value;
        }

        Object.defineProperty(arrObj, "1", {
            get: undefined,
            set: setFunc,
            configurable: false
        });

        try {
            Object.defineProperty(arrObj, "1", {
                get: undefined
            });

            return accessorPropertyAttributesAreCorrect(arrObj, "1", undefined, setFunc, "setVerifyHelpProp", false, false);
        } catch (e) {
            return false;
        }
    },

    precondition: function prereq() {
        return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
    }
});


text:
#pragma once
#include <aws/s3/S3_EXPORTS.h>

namespace Aws
{
namespace Utils
{
namespace Xml
{
  class XmlNode;
} // namespace Xml
} // namespace Utils
namespace S3
{
namespace Model
{
  /*
    Specifies when noncurrent object versions expire. Upon expiration, Amazon S3 permanently deletes the noncurrent object versions. You set this lifecycle configuration action on a bucket that has versioning enabled (or suspended) to request that Amazon S3 delete noncurrent object versions at a specific period in the object's lifetime.
  */
  class AWS_S3_API NoncurrentVersionExpiration
  {
  public:
    NoncurrentVersionExpiration();
    NoncurrentVersionExpiration(const Aws::Utils::Xml::XmlNode& xmlNode);
    NoncurrentVersionExpiration& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);

    void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;

    /*
     Specifies the number of days an object is noncurrent before Amazon S3 can perform the associated action. For information about the noncurrent days calculations, see How Amazon S3 Calculates When an Object Became Noncurrent in the Amazon Simple Storage Service Developer Guide.
    */
    inline long GetNoncurrentDays() const{ return m_noncurrentDays; }

    /*
     Specifies the number of days an object is noncurrent before Amazon S3 can perform the associated action. For information about the noncurrent days calculations, see How Amazon S3 Calculates When an Object Became Noncurrent in the Amazon Simple Storage Service Developer Guide.
    */
    inline void SetNoncurrentDays(long value) { m_noncurrentDaysHasBeenSet = true; m_noncurrentDays = value; }

    /*
     Specifies the number of days an object is noncurrent before Amazon S3 can perform the associated action. For information about the noncurrent days calculations, see How Amazon S3 Calculates When an Object Became Noncurrent in the Amazon Simple Storage Service Developer Guide.
    */
    inline NoncurrentVersionExpiration& WithNoncurrentDays(long value) { SetNoncurrentDays(value); return *this;}

  private:
    long m_noncurrentDays;
    bool m_noncurrentDaysHasBeenSet;
  };

} // namespace Model
} // namespace S3
} // namespace Aws


text: export { default } from 'ember-sortable-table/templates/sortable-header-cell';


text:
[View Javadoc](../../../../../apidocs/org/apache/struts/action/ActionErrors.html.md)

    1
    21  package org.apache.struts.action;
    22
    23  import java.io.Serializable;
    24
    25  /**
    26   *
A class that encapsulates the error messages being reported by the
    27   * validate() method of an ActionForm. Validation
    28   * errors are either global to the entire ActionForm bean they
    29   * are associated with, or they are specific to a particular bean property
    30   * (and, therefore, a particular input field on the corresponding form).

    31   *
    32   *
Each individual error is described by an ActionMessage
    33   * object, which contains a message key (to be looked up in an appropriate
    34   * message resources database), and up to four placeholder arguments used for
    35   * parametric substitution in the resulting message.

    36   *
    37   *
IMPLEMENTATION NOTE - It is assumed that these objects
    38   * are created and manipulated only within the context of a single thread.
    39   * Therefore, no synchronization is required for access to internal
    40   * collections.

    41   *
    42   * @version $Rev: 471754 $ $Date: 2005-08-06 18:03:30 -0400 (Sat, 06 Aug 2005)
    43   *          $
    44   */
    45  public class ActionErrors extends ActionMessages implements Serializable {
    46      // --------------------------------------------------------- Public Methods
    47
    48      /**
    49       *
Create an empty ActionErrors object.

    50       */
    51      public ActionErrors() {
    52          super();
    53      }
    54
    55      /**
    56       *
Create an ActionErrors object initialized with the
    57       * given messages.

    58       *
    59       * @param messages The messages to be initially added to this object. This
    60       *                 parameter can be null.
    61       * @since Struts 1.1
    62       */
    63      public ActionErrors(ActionErrors messages) {
    64          super(messages);
    65      }
    66  }

------------------------------------------------------------------------

This page was automatically generated by [Maven](http://maven.apache.org/)


text:
import find from 'lodash/find';
import map from 'lodash/map';
import filter from 'lodash/filter';
import { UserKinds } from 'kolibri.coreVue.vuex.constants';
import { RoleResource } from 'kolibri.resources';

const FACILITY_ROLES = [UserKinds.ADMIN, UserKinds.ASSIGNABLE_COACH, UserKinds.COACH];

/**
 * Implements business logic for changing a FacilityUser's Role
 *
 * If Learner/New User -> ASSIGNABLE_COACH/COACH/ADMIN, then create that Role
 * If ASSIGNABLE_COACH/COACH/ADMIN -> LEARNER, then delete all Classroom-Level Coach Roles
 * IF ASSIGNABLE_COACH/COACH/ADMIN -> ASSIGNABLE_COACH/COACH/ADMIN, then replace only that Role
 *
 */
export function updateFacilityLevelRoles(facilityUser, newRoleKind) {
  const { roles, facility, id } = facilityUser;
  // Currently, we assume only ONE Facility-Level Role per user
  const currentFacilityRole = find(roles, { collection: facility });
  const createFacilityRole = () =>
    RoleResource.createModel({
      user: id,
      collection: facility,
      kind: newRoleKind,
    }).save();

  // When FacilityUser is only a Learner or New User (i.e. no current Role)
  if (!currentFacilityRole) {
    if (newRoleKind === UserKinds.LEARNER) {
      return Promise.resolve();
    }
    return createFacilityRole();
  }

  // Downgrading Role to LEARNER
  if (newRoleKind === UserKinds.LEARNER) {
    const roleDeletionPromises = [
      RoleResource.getModel(currentFacilityRole.id).delete(),
      // Manually have to delete all Roles downstream in Classrooms
      map(filter(roles, { collection_parent: facility, kind: UserKinds.COACH }), role =>
        RoleResource.getModel(role.id).delete()
      ),
    ];
    return Promise.all(roleDeletionPromises);
  }

  // Changing from one Facility-Level Role to another. Any Classroom-Level Roles
  // are left untouched
  if (FACILITY_ROLES.includes(newRoleKind)) {
    return RoleResource.getModel(currentFacilityRole.id)
      .delete()
      ._promise.then(createFacilityRole);
  }
}


text:
var express = require('express'),
    ghost = require('ghost'),
    path = require('path'),
    hbs = require('ghost/node_modules/express-hbs'),

    htmlencode = require('htmlencode'),
    widget = new htmlencode.Encoder('numerical'),

    spamProtection = require('./spam-protection'),

    app = express();

ghost({
    config: path.join(__dirname, 'config.js')
}).then(function (ghostServer) {
    hbs.registerHelper('showBio', function showBio(bio) {
        var safeBio = widget.htmlEncode(bio),
            newBio = safeBio
                .replace(/https?:\/\/github.com\/([a-z0-9]+)/gi, function (match, username) {
                    return ' Github';
                })
                .replace(/https?:\/\/stackoverflow.com\/users\/([0-9]+)\/([a-z0-9]+)/gi, function (match, id, username) {
                    return ' Stack Overflow';
                })
            ;

        return new hbs.SafeString(newBio);
    });

    app.use(spamProtection);
    app.use(ghostServer.rootApp);
    ghostServer.start(app);
});


text:
class ContentAuthorizer < ApplicationAuthorizer
  def readable_by? user
    return true if user && user.site_administrator?
    return true if ::PermissionService.user_owns_any_containing_universe?(user: user, content: resource)
    return true if ::PermissionService.user_owns_content?(user: user, content: resource)
    return true if ::PermissionService.content_is_public?(content: resource)
    return true if ::PermissionService.content_is_in_a_public_universe?(content: resource)
    return true if ::PermissionService.user_can_contribute_to_containing_universe?(user: user, content: resource)

    return false
  end

  def updatable_by? user
    return true if PermissionService.user_owns_any_containing_universe?(user: user, content: resource)
    return true if PermissionService.user_can_contribute_to_containing_universe?(user: user, content: resource)
    return true if [
      PermissionService.content_has_no_containing_universe?(content: resource),
      PermissionService.user_owns_content?(user: user, content: resource)
    ].all?

    return false
  end

  def deletable_by? user
    return true if PermissionService.user_owns_any_containing_universe?(user: user, content: resource)
    return true if [
      PermissionService.content_has_no_containing_universe?(content: resource),
      PermissionService.user_owns_content?(user: user, content: resource)
    ].all?
    return true if [
      PermissionService.user_can_contribute_to_containing_universe?(user: user, content: resource),
      PermissionService.user_owns_content?(user: user, content: resource)
    ].all?

    return false
  end
end


text:
#import <Cocoa/Cocoa.h>
#import <IOBluetooth/IOBluetooth.h>

#define kKeyPressServiceUUIDString					@"FFE0"
#define kKeyPressCharacteristicUUIDString			@"FFE1"

#define kAccelerometerPeriod                        500
#define kAccelerometerServiceUUIDString					@"f000aa10-0451-4000-b000-000000000000"
#define kAccelerometerCharacteristicUUIDString			@"f000aa11-0451-4000-b000-000000000000"
#define kAccelerometerConfigUUIDString			@"f000aa12-0451-4000-b000-000000000000"
#define kAccelerometerPeriodUUIDString			@"f000aa13-0451-4000-b000-000000000000"
#define KXTJ9_RANGE 4.0

#define SIMPLE_KEYS_SERV_UUID @"0000FFE0-0000-1000-8000-00805F9B34FB";
#define SIMPLE_KEYS_DATA_UUID @"0000FFE1-0000-1000-8000-00805F9B34FB";
#define SIMPLE_KEYS_KEYPRESSED_UUID @"0000FFE1-0000-1000-8000-00805F9B34FB";

@interface HeartRateMonitorAppDelegate : NSObject <NSApplicationDelegate, CBCentralManagerDelegate, CBPeripheralDelegate>
{
    NSWindow *window;
    NSWindow *scanSheet;
    NSView *heartView;
    NSTimer *pulseTimer;
    NSArrayController *arrayController;

    CBCentralManager *manager;
    CBPeripheral *peripheral;

    NSMutableArray *heartRateMonitors;

    NSString *manufacturer;

    uint16_t heartRate;

    IBOutlet NSButton* connectButton;
    BOOL autoConnect;

    // Progress Indicator
    IBOutlet NSButton * indicatorButton;
    IBOutlet NSProgressIndicator *progressIndicator;
}

@property (assign) IBOutlet NSWindow *window;
@property (assign) IBOutlet NSWindow *scanSheet;
@property (assign) IBOutlet NSView *heartView;
@property (assign) IBOutlet NSArrayController *arrayController;
@property (assign) uint16_t heartRate;
@property (retain) NSTimer *pulseTimer;
@property (retain) NSMutableArray *heartRateMonitors;
@property (copy) NSString *manufacturer;
@property (copy) NSString *connected;

- (IBAction) openScanSheet:(id) sender;
- (IBAction) closeScanSheet:(id)sender;
- (IBAction) cancelScanSheet:(id)sender;
- (IBAction) connectButtonPressed:(id)sender;

- (void) startScan;
- (void) stopScan;
- (BOOL) isLECapableHardware;

- (void) pulse;
- (void) updateWithHRMData:(NSData *)data;

@end


text:
from core.requesthandler import RequestHandler

def application(variables, start_response):
    request_handler = RequestHandler(variables)
    status, headers, body = request_handler.get_response()
    start_response(status, headers)
    return body


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

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

#### Original name
Lentinus javanicus Lév., 1846

### Remarks
null


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AstralTest.Models;
using Microsoft.EntityFrameworkCore;

namespace AstralTest.Managers
{
    public class VisitorManager
    {
            private readonly ApplicationContext _dbContext;

            public VisitorManager(ApplicationContext context)
            {
                _dbContext = context;
            }

            public async Task Create(Visitor visitor)
            {
                if (_dbContext.Visitors.FirstOrDefault(v => v.RoomGuid == visitor.RoomGuid) == null)
                {
                    _dbContext.Visitors.Add(visitor);
                    await _dbContext.SaveChangesAsync();
                }
            }

            public async Task Update(Visitor visitor)
            {
                _dbContext.Visitors.Update(visitor);
                await _dbContext.SaveChangesAsync();
            }

            public async Task Delete(Guid visitorGuid)
            {
                var visitor = await _dbContext.Visitors.FirstOrDefaultAsync(u => u.Guid == visitorGuid);
                if (visitor != null)
                {
                    _dbContext.Visitors.Remove(visitor);
                    await _dbContext.SaveChangesAsync();
                }
            }

            public List<Visitor> GetVisitors() => _dbContext.Visitors.ToList();

            public Task<Visitor> GetVisitor(Guid visitorGuid)
            {
                var visitor = _dbContext.Visitors.FirstOrDefaultAsync(u => u.Guid == visitorGuid);
                return visitor;
            }
    }
}


text:
/* tslint:disable:no-unused-variable */
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { DebugElement } from '@angular/core';

import { PropertyGroupViewComponent } from './property-group-view.component';

describe('PropertyGroupViewComponent', () => {
  let component: PropertyGroupViewComponent;
  let fixture: ComponentFixture<PropertyGroupViewComponent>;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      declarations: [ PropertyGroupViewComponent ]
    })
    .compileComponents();
  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(PropertyGroupViewComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});


text:
require "rd_api/version"
require "rd_api/account"
require "rd_api/lead"
require "rd_api/contact"

module RdApi

end


text:
package rent.interfaces;

import java.io.Serializable;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * DAO interface.
 *
 * @param <T>
 * @param <PK>
 */
public interface IDao<T extends IEntity, PK extends Serializable> {
    void delete(final PK pId);

    void delete(final T pEntity);

    int executeQuery(final String pHql, final Map<String, Object> pParameters);

    List<T> getAll();

    T getById(final PK pId);

    List<T> getListByQuery(String pHql);

    Set<PK> getPkSetByQuery(String pHql);

    PK save(final T pEntity);

    void update(final T pEntity);
}


text:
package host.exp.exponent.gcm;

public class PushNotificationConstants {
  public static final int MAX_COLLAPSED_NOTIFICATIONS = 5;
  public static final String NOTIFICATION_MESSAGE_KEY = "message"; // deprecated
  public static final String NOTIFICATION_EXPERIENCE_ID_KEY = "experienceId";
  public static final String NOTIFICATION_DATA_KEY = "data";
  public static final String NOTIFICATION_ORIGIN_KEY = "origin";
  public static final String NOTIFICATION_ID_KEY = "notificationId";
  public static final String NOTIFICATION_IS_MULTIPLE_KEY = "isMultiple";
  public static final String NOTIFICATION_COLLAPSE_MODE = "collapse";
  public static final String NOTIFICATION_UNREAD_COUNT_KEY = "#{unread_notifications}";
}


text:
namespace gfx {

// static
scoped_refptr<GLContext> GLContext::CreateGLContext(
    GLShareGroup* share_group,
    GLSurface* compatible_surface,
    GpuPreference gpu_preference) {
  if (GetGLImplementation() == kGLImplementationMockGL)
    return scoped_refptr<GLContext>(new GLContextStub());

  scoped_refptr<GLContextEGL> context(new GLContextEGL(share_group));
  if (!context->Initialize(compatible_surface, gpu_preference))
    return NULL;
  return context;
}

bool GLContext::SupportsDualGpus() {
  return false;
}

}


text:
//
//  LJLPostWordViewController.m
//  项目
//
//  Created by LiJiale on 15/8/8.
//
//

#import "LJLPostWordViewController.h"
#import "LJLPlaceholderTextView.h"
#import "LJLAddTagToolbar.h"

@interface LJLPostWordViewController () <UITextViewDelegate>

/** 文本输入控件 */
@property (nonatomic, weak) LJLPlaceholderTextView *textView;

/** toolbar */
@property (nonatomic,weak) LJLAddTagToolbar *toolbar;

@end

@implementation LJLPostWordViewController

+ (void)initialize
{
    // 设置item
    UIBarButtonItem *item = [UIBarButtonItem appearance];
    // UIControlStateNormal
    NSMutableDictionary *itemAttrs = [NSMutableDictionary dictionary];
    itemAttrs[NSForegroundColorAttributeName] = [UIColor blackColor];
    itemAttrs[NSFontAttributeName] = [UIFont systemFontOfSize:17];
    [item setTitleTextAttributes:itemAttrs forState:UIControlStateNormal];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self setupNav];

    [self setupTextView];

    [self setupToolbar];

}
/**
 * 监听键盘的弹出和隐藏
 */
- (void)keyboardWillChangeFrame:(NSNotification *)note
{
    // 键盘最终的frame
    CGRect keyboardF = [note.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];

    // 动画时间
    CGFloat duration = [note.userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue];

    NSLog(@"%f",duration);
    [UIView animateWithDuration:duration animations:^{
        self.toolbar.transform = CGAffineTransformMakeTranslation(0, keyboardF.origin.y - LJLScreenH);
    }];
}

- (void)setupToolbar
{
    LJLAddTagToolbar *toolbar = [LJLAddTagToolbar viewFromXib];
    toolbar.width = self.view.width;
    toolbar.y = self.view.height - toolbar.height;
    [self.view addSubview:toolbar];
    self.toolbar = toolbar;

    //添加键盘弹出通知
    [LJLNoteCenter addObserver:self selector:@selector(keyboardWillChangeFrame:) name:UIKeyboardWillChangeFrameNotification object:nil];

}

- (void)setupTextView
{
    LJLPlaceholderTextView *textView = [[LJLPlaceholderTextView alloc] init];
    textView.frame = self.view.bounds;
    textView.placeholder = @"把好玩的图片,好笑的段子或糗事发到这里,接受千万网友膜拜吧!发布违反国家法律内容的,我们将依法提交给有关部门处理。";
    textView.delegate =self;
    [self.view addSubview:textView];
    self.textView = textView;
}

//设置导航栏
- (void)setupNav
{

    self.title = @"文字发布";
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"取消" style:UIBarButtonItemStyleDone target:self action:@selector(cancel)];
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"发表" style:UIBarButtonItemStyleDone target:self action:@selector(post)];
    self.navigationItem.rightBarButtonItem.enabled = NO; // 默认不能点击
    //强制刷新
    [self.navigationController.navigationBar layoutIfNeeded];
}

- (void)cancel
{
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)post
{
    LJLLog(@"post");
}

//textView变为第一响应者,弹出键盘
- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];

//    // 先退出之前的键盘
//    [self.view endEditing:YES];
    // 再叫出键盘
    [self.textView becomeFirstResponder];
}

#pragma mark - textView代理
- (void)textViewDidChange:(UITextView *)textView
{
    self.navigationItem.rightBarButtonItem.enabled = textView.hasText;
}

//滚动退出键盘
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
{
    [self.view endEditing:YES];
}
/*
 UITextField *textField默认的情况
 1.只能显示一行文字
 2.有占位文字

 UITextView *textView默认的情况
 2.能显示任意行文字
 2.没有占位文字

 文本输入控件,最终希望拥有的功能
 1.能显示任意行文字
 2.有占位文字

 最终的方案:
 1.继承自UITextView
 2.在UITextView能显示任意行文字的基础上,增加"有占位文字"的功能
 */
@end


text:
/**
 *
 */
package com.work.one.service;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.work.one.domain.ExperimentVO;
import com.work.one.repository.ExperimentRepository;
import com.work.one.to.Experiment;
import com.work.one.to.ExperimentResult;
import com.work.one.to.Result;

/**
 * Responsible for managing experiment lifecycle.
 *
 * @author Test
 *
 */
@Service
@Transactional
public class ExpServiceImpl implements ExpService {

	@Autowired
	ExperimentRepository expRepository;

	/**
	 *
	 */
	public ExpServiceImpl() {
		// TODO Auto-generated constructor stub
	}

	/*
	 * (non-Javadoc)
	 *
	 * @see
	 * com.work.one.service.ExpService#addExperiment(com.work.one.to.Experiment)
	 */
	@Override
	public ExperimentResult addExperiment(Experiment exp) {

		ExperimentVO evo = new ExperimentVO();
		evo.setName(exp.getName());
		evo.setSummary(exp.getSummary());
		evo.setDuration(exp.getDuration());

		expRepository.save(evo);

		ExperimentResult result = new ExperimentResult();
		Result theResult = new Result();
		theResult.setStatus(true);
		result.setResult(theResult);
		exp.setId(evo.getId());
		result.setExperiment(exp);

		return result;
	}

	/*
	 * (non-Javadoc)
	 *
	 * @see com.work.one.service.ExpService#updateExperiment(com.work.one.to.
	 * Experiment)
	 */
	@Override
	public ExperimentResult updateExperiment(Experiment exp) {
		// TODO Auto-generated method stub
		return null;
	}

	/*
	 * (non-Javadoc)
	 *
	 * @see com.work.one.service.ExpService#viewExperiment(java.lang.Long)
	 */
	@Override
	public ExperimentResult viewExperiment(Long experimentId) {

		ExperimentVO expVO = expRepository.findOne(experimentId);
		Result result = new Result();
		ExperimentResult expResult = new ExperimentResult();

		if (expVO == null) {

			result.setStatus(false);
			result.addMessage("No experiment found with id " + experimentId);

		} else {
			result.setStatus(true);

			/// TODO Bean copy is the way to go
			Experiment exp = new Experiment();
			exp.setDuration(expVO.getDuration());
			exp.setName(expVO.getName());
			exp.setSummary(expVO.getSummary());
			exp.setId(expVO.getId());

			expResult.setExperiment(exp);

		}

		return expResult;
	}

	/*
	 * (non-Javadoc)
	 *
	 * @see com.work.one.service.ExpService#viewExperiment(java.lang.String)
	 */
	@Override
	public ExperimentResult viewExperiment(String name) {
		ExperimentVO expVO = expRepository.findByName(name);
		Result result = new Result();
		ExperimentResult expResult = new ExperimentResult();

		if (expVO == null) {

			result.setStatus(false);
			result.addMessage("No experiment found with name provided :  " + name);

		} else {
			result.setStatus(true);

			/// TODO Bean copy is the way to go
			Experiment exp = new Experiment();
			exp.setDuration(expVO.getDuration());
			exp.setName(expVO.getName());
			exp.setSummary(expVO.getSummary());
			exp.setId(expVO.getId());

			expResult.setExperiment(exp);

		}

		return expResult;
	}

	/*
	 * (non-Javadoc)
	 *
	 * @see com.work.one.service.ExpService#removeExperiment(long)
	 */
	@Override
	public ExperimentResult removeExperiment(long expId) {

		Result result = new Result();
		ExperimentResult expResult = new ExperimentResult();
		expResult.setResult(result);

		ExperimentVO evo = expRepository.findOne(expId);

		if ( evo != null ) {
			expRepository.delete(evo);
			result.setStatus(true);
		} else {
			result.setStatus(false);
			result.addMessage("Experiment with id " + expId + " does not exists.");
		}

		return expResult;

	}

	/*
	 * (non-Javadoc)
	 *
	 * @see com.work.one.service.ExpService#getExperiments()
	 */
	@Override
	public List<Experiment> getExperiments() {

		List<Experiment> expList = new ArrayList<Experiment>();

		List<ExperimentVO> evoList = expRepository.findAll();

		for (ExperimentVO expVO : evoList) {
			Experiment exp = new Experiment();
			exp.setDuration(expVO.getDuration());
			exp.setName(expVO.getName());
			exp.setSummary(expVO.getSummary());
			exp.setId(expVO.getId());
			expList.add(exp);
		}

		return expList;
	}

	/*
	 * (non-Javadoc)
	 *
	 * @see
	 * com.work.one.service.ExpService#getExperiments(org.springframework.data.
	 * domain.Pageable)
	 */
	@Override
	public Page<Experiment> getExperiments(Pageable pageable) {
		// TODO Auto-generated method stub
		return null;
	}

}


text:
package com.francetelecom.clara.cloud.presentation.designer.services.rabbitmq;

import org.apache.wicket.AttributeModifier;
import org.apache.wicket.Page;
import org.apache.wicket.bean.validation.PropertyValidator;
import org.apache.wicket.markup.html.form.RequiredTextField;
import org.apache.wicket.markup.html.link.ExternalLink;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.ResourceModel;
import org.apache.wicket.model.StringResourceModel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.francetelecom.clara.cloud.logicalmodel.LogicalRabbitService;
import com.francetelecom.clara.cloud.presentation.designer.services.LogicalServiceBasePanel;
import com.francetelecom.clara.cloud.presentation.resource.CacheActivatedImage;

/**
 *
 * @author amcu6536
 */
public class LogicalRabbitMQServicePanel extends LogicalServiceBasePanel<LogicalRabbitService> {

	private static final long serialVersionUID = 8968010530409127526L;
	private static final Logger logger = LoggerFactory.getLogger(LogicalRabbitMQServicePanel.class);

	public LogicalRabbitMQServicePanel(String id, IModel<LogicalRabbitService> model, Page parentPage,
            boolean isNew, boolean readOnly, boolean configOverride) {
        super(id, model, parentPage, isNew, readOnly, configOverride);
        initComponents();
    }

    private void initComponents() {

    	getServiceForm().add(new CacheActivatedImage("logicalRabbitMQPanelIcon",new ResourceModel("rabbitmq.icon").getObject()));
    	// Online help link
    	String completeHelpUrl = "";
    	try {
    		completeHelpUrl = new StringResourceModel("portal.designer.logical.service.online_manual.baseUrl", null).getString()
        			+ new StringResourceModel("portal.designer.logical.service.online_manual." + getLogicalModelType(), null).getString();
    	} catch (Exception e) {
    		//do nothing
    	}
    	ExternalLink onlineHelpLink = new ExternalLink("onlineHelpLink", completeHelpUrl);
    	getServiceForm().add(onlineHelpLink);
    	if (completeHelpUrl.isEmpty()) {
    		onlineHelpLink.setVisible(false);
    	}

        // FUNCTIONNAL PARAMETERS
    	RequiredTextField<String> serviceLabel = new RequiredTextField<String>("label");
        serviceLabel.setLabel(new StringResourceModel("portal.designer.service.rabbitmq.service.label",null));
        serviceLabel.add(new PropertyValidator<>());
        getServiceForm().add(serviceLabel);

        // Cloudfoundry rabbitMQ service name
        RequiredTextField<String> serviceName = new RequiredTextField<String>("serviceName");
         //add help tooltip
        serviceName.add(new AttributeModifier("title", new StringResourceModel("portal.designer.service.rabbitmq.service.name.help",null)));
        serviceName.setLabel(new StringResourceModel("portal.designer.service.rabbitmq.service.name",null));
        serviceName.add(new PropertyValidator<>());
        getServiceForm().add(serviceName);

    }

}


text:
CREATE TABLE DISK_FILE(
    ID BIGINT NOT NULL,
    NAME VARCHAR(200),
    FILE_SIZE BIGINT,
    VALUE VARCHAR(200),
    TYPE VARCHAR(10),
    PART_INDEX INT,
    FILE_CODE BIGINT,
    REF_COUNT INT,
    HASH_CODE VARCHAR(64),
    CREATOR VARCHAR(64),
    CREATE_TIME DATETIME,
    UPDATER VARCHAR(64),
    UPDATE_TIME DATETIME,
    STATUS VARCHAR(50),
    USER_ID VARCHAR(64),
    FOLDER_PATH VARCHAR(200),

    CONSTRAINT PK_DISK_FILE PRIMARY KEY(ID)
) ENGINE=INNODB CHARSET=UTF8;

CREATE INDEX IDX_DISK_FILE_HASHCODE ON DISK_FILE(HASH_CODE);


text:
'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

require('./chunk-92621ff7.js');
require('./helpers.js');
require('./chunk-9103eeda.js');
require('./chunk-9e4cf4c5.js');
require('./chunk-d120e215.js');
var __chunk_5 = require('./chunk-13e039f5.js');
require('./chunk-f5106717.js');
require('./chunk-3cc5d9a6.js');
require('./chunk-a11294f9.js');
require('./chunk-ae7e641a.js');
require('./chunk-c6fbc7b4.js');
require('./chunk-7da0c017.js');
require('./chunk-114191ae.js');
var __chunk_19 = require('./chunk-d0f8ea39.js');

var Plugin = {
  install: function install(Vue) {
    __chunk_5.registerComponent(Vue, __chunk_19.Timepicker);
  }
};
__chunk_5.use(Plugin);

exports.BTimepicker = __chunk_19.Timepicker;
exports.default = Plugin;


text:
import os
import sys
import pydas.drivers
import pydas.exceptions
import pydas.core as core

# Load configuration file
def loadConfig(filename):
   try:
     configfile = open(filename, "r")
     ret = dict()
     for x in configfile:
       x = x.strip()
       if not x: continue
       cols = x.split()
       ret[cols[0]] = cols[1]
     return ret
   except Exception, e: raise

def openLog(logpath):
  log = open(os.path.join(outputDir,'postscript'+jobidNum+'.log'),'w')
  log.write('Condor Post Script log\n\nsys.argv:\n\n')
  log.write('\t'.join(sys.argv))
  return log

def logConfig(log, cfgParams):
  log.write('\n\nConfig Params:\n\n')
  log.write('\n'.join(['\t'.join((k,v)) for (k,v) in cfgParams.iteritems()]))

if __name__ == "__main__":
  (scriptName, outputDir, taskId, dagName, jobId, jobName, returnCode) = sys.argv

  jobidNum = jobName[3:]
  # get config params
  cfgParams = loadConfig('config.cfg')

  log = openLog(os.path.join(outputDir,'postscript'+jobidNum+'.log'))
  logConfig(log, cfgParams)

  # open connection to midas
  interfaceMidas = core.Communicator (cfgParams['url'])
  token = interfaceMidas.login_with_api_key(cfgParams['email'], cfgParams['apikey'])

  log.write("\n\nLogged into midas, got token: "+token+"\n\n")

  dagfilename = dagName + ".dagjob"
  dagmanoutfilename = dagfilename + ".dagman.out"
  log.write("\n\nCalling add condor dag with params:"+token+" "+taskId+" "+dagfilename+" "+ dagmanoutfilename+"\n\n")
  # add the condor_dag
  dagResponse = interfaceMidas.add_condor_dag(token, taskId, dagfilename, dagmanoutfilename)
  log.write("\n\nAdded a Condor Dag with response:"+str(dagResponse)+"\n\n")

  log.close()


text:
__author__ = 'api.jscudder (Jeff Scudder)'

import unittest
import getpass
try:
  from xml.etree import ElementTree
except ImportError:
  from elementtree import ElementTree
import gdata.base.service
import gdata.service
import atom.service
import gdata.base
import atom
from gdata import test_data

username = ''
password = ''

class GBaseServiceUnitTest(unittest.TestCase):

  def setUp(self):
    self.gd_client = gdata.base.service.GBaseService()
    self.gd_client.email = username
    self.gd_client.password = password
    self.gd_client.source = 'BaseClient "Unit" Tests'
    self.gd_client.api_key = 'ABQIAAAAoLioN3buSs9KqIIq9VmkFxT2yXp_ZAY8_ufC' +\
                             '3CFXhHIE1NvwkxRK8C1Q8OWhsWA2AIKv-cVKlVrNhQ'

  def tearDown(self):
    # No teardown needed
    pass

  def testProperties(self):
    email_string = 'Test Email'
    password_string = 'Passwd'
    api_key_string = 'my API key'

    self.gd_client.email = email_string
    self.assertEquals(self.gd_client.email, email_string)
    self.gd_client.password = password_string
    self.assertEquals(self.gd_client.password, password_string)
    self.gd_client.api_key = api_key_string
    self.assertEquals(self.gd_client.api_key, api_key_string)
    self.gd_client.api_key = None
    self.assert_(self.gd_client.api_key is None)

  def testQuery(self):
    my_query = gdata.base.service.BaseQuery(feed='/base/feeds/snippets')
    my_query['max-results'] = '25'
    my_query.bq = 'digital camera [item type: products]'
    result = self.gd_client.Query(my_query.ToUri())
    self.assert_(isinstance(result, atom.Feed))

    service = gdata.base.service.GBaseService(username, password)
    query = gdata.base.service.BaseQuery()
    query.feed = '/base/feeds/snippets'
    query.bq = 'digital camera'
    feed = service.Query(query.ToUri())

  def testQueryWithConverter(self):
    my_query = gdata.base.service.BaseQuery(feed='/base/feeds/snippets')
    my_query['max-results'] = '1'
    my_query.bq = 'digital camera [item type: products]'
    result = self.gd_client.Query(my_query.ToUri(),
        converter=gdata.base.GBaseSnippetFeedFromString)
    self.assert_(isinstance(result, gdata.base.GBaseSnippetFeed))

  def testCorrectReturnTypes(self):
    q = gdata.base.service.BaseQuery()
    q.feed = '/base/feeds/snippets'
    q.bq = 'digital camera'
    result = self.gd_client.QuerySnippetsFeed(q.ToUri())
    self.assert_(isinstance(result, gdata.base.GBaseSnippetFeed))

    q.feed = '/base/feeds/attributes'
    result = self.gd_client.QueryAttributesFeed(q.ToUri())
    self.assert_(isinstance(result, gdata.base.GBaseAttributesFeed))

    q = gdata.base.service.BaseQuery()
    q.feed = '/base/feeds/itemtypes/en_US'
    result = self.gd_client.QueryItemTypesFeed(q.ToUri())
    self.assert_(isinstance(result, gdata.base.GBaseItemTypesFeed))

    q = gdata.base.service.BaseQuery()
    q.feed = '/base/feeds/locales'
    result = self.gd_client.QueryLocalesFeed(q.ToUri())
    self.assert_(isinstance(result, gdata.base.GBaseLocalesFeed))

  def testInsertItemUpdateItemAndDeleteItem(self):
    try:
      self.gd_client.ProgrammaticLogin()
      self.assert_(self.gd_client.GetClientLoginToken() is not None)
      self.assert_(self.gd_client.captcha_token is None)
      self.assert_(self.gd_client.captcha_url is None)
    except gdata.service.CaptchaRequired:
      self.fail('Required Captcha')

    proposed_item = gdata.base.GBaseItemFromString(test_data.TEST_BASE_ENTRY)
    result = self.gd_client.InsertItem(proposed_item)

    item_id = result.id.text
    self.assertEquals(result.id.text != None, True)

    updated_item = gdata.base.GBaseItemFromString(test_data.TEST_BASE_ENTRY)
    updated_item.label[0].text = 'Test Item'
    result = self.gd_client.UpdateItem(item_id, updated_item)

    # Try to update an incorrect item_id.
    try:
      result = self.gd_client.UpdateItem(item_id + '2', updated_item)
      self.fail()
    except gdata.service.RequestError:
      pass

    result = self.gd_client.DeleteItem(item_id)
    self.assert_(result)

    # Delete and already deleted item.
    try:
      result = self.gd_client.DeleteItem(item_id)
      self.fail()
    except gdata.service.RequestError:
      pass

  def testInsertItemUpdateItemAndDeleteItemWithConverter(self):
    try:
      self.gd_client.ProgrammaticLogin()
      self.assert_(self.gd_client.GetClientLoginToken() is not None)
      self.assert_(self.gd_client.captcha_token is None)
      self.assert_(self.gd_client.captcha_url is None)
    except gdata.service.CaptchaRequired:
      self.fail('Required Captcha')

    proposed_item = gdata.base.GBaseItemFromString(test_data.TEST_BASE_ENTRY)
    result = self.gd_client.InsertItem(proposed_item,
        converter=atom.EntryFromString)
    self.assertEquals(isinstance(result, atom.Entry), True)
    self.assertEquals(isinstance(result, gdata.base.GBaseItem), False)

    item_id = result.id.text
    self.assertEquals(result.id.text != None, True)

    updated_item = gdata.base.GBaseItemFromString(test_data.TEST_BASE_ENTRY)
    updated_item.label[0].text = 'Test Item'
    result = self.gd_client.UpdateItem(item_id, updated_item,
        converter=atom.EntryFromString)
    self.assertEquals(isinstance(result, atom.Entry), True)
    self.assertEquals(isinstance(result, gdata.base.GBaseItem), False)

    result = self.gd_client.DeleteItem(item_id)
    self.assertEquals(result, True)

  def testMakeBatchRequests(self):
    try:
      self.gd_client.ProgrammaticLogin()
      self.assert_(self.gd_client.GetClientLoginToken() is not None)
      self.assert_(self.gd_client.captcha_token is None)
      self.assert_(self.gd_client.captcha_url is None)
    except gdata.service.CaptchaRequired:
      self.fail('Required Captcha')

    request_feed = gdata.base.GBaseItemFeed(atom_id=atom.Id(
        text='test batch'))
    entry1 = gdata.base.GBaseItemFromString(test_data.TEST_BASE_ENTRY)
    entry1.title.text = 'first batch request item'
    entry2 = gdata.base.GBaseItemFromString(test_data.TEST_BASE_ENTRY)
    entry2.title.text = 'second batch request item'
    request_feed.AddInsert(entry1)
    request_feed.AddInsert(entry2)

    result_feed = self.gd_client.ExecuteBatch(request_feed)
    self.assertEquals(result_feed.entry[0].batch_status.code, '201')
    self.assertEquals(result_feed.entry[0].batch_status.reason, 'Created')
    self.assertEquals(result_feed.entry[0].title.text, 'first batch request item')
    self.assertEquals(result_feed.entry[0].item_type.text, 'products')
    self.assertEquals(result_feed.entry[1].batch_status.code, '201')
    self.assertEquals(result_feed.entry[1].batch_status.reason, 'Created')
    self.assertEquals(result_feed.entry[1].title.text, 'second batch request item')

    # Now delete the newly created items.
    request_feed = gdata.base.GBaseItemFeed(atom_id=atom.Id(
        text='test deletions'))
    request_feed.AddDelete(entry=result_feed.entry[0])
    request_feed.AddDelete(entry=result_feed.entry[1])
    self.assertEquals(request_feed.entry[0].batch_operation.type,
                      gdata.BATCH_DELETE)
    self.assertEquals(request_feed.entry[1].batch_operation.type,
                      gdata.BATCH_DELETE)

    result_feed = self.gd_client.ExecuteBatch(request_feed)
    self.assertEquals(result_feed.entry[0].batch_status.code, '200')
    self.assertEquals(result_feed.entry[0].batch_status.reason, 'Success')
    self.assertEquals(result_feed.entry[0].title.text, 'first batch request item')
    self.assertEquals(result_feed.entry[1].batch_status.code, '200')
    self.assertEquals(result_feed.entry[1].batch_status.reason, 'Success')
    self.assertEquals(result_feed.entry[1].title.text, 'second batch request item')

if __name__ == '__main__':
  print ('Google Base Tests\nNOTE: Please run these tests only with a test '
         'account. The tests may delete or update your data.')
  username = raw_input('Please enter your username: ')
  password = getpass.getpass()
  unittest.main()