text:
package com.facebook.flipper.plugins.databases;

import android.content.Context;
import androidx.annotation.StringDef;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.List;

/**
 * Abstract class allowing to implement different drivers interfacing with Databases.
 *
 * @param <DESCRIPTOR> A DatabaseDescriptor object that is called for each databases provider by the
 *     driver
 */
public abstract class DatabaseDriver<DESCRIPTOR extends DatabaseDescriptor> {

  private final Context mContext;

  public DatabaseDriver(final Context context) {
    mContext = context;
  }

  public Context getContext() {
    return mContext;
  }

  public abstract List<DESCRIPTOR> getDatabases();

  public abstract List<String> getTableNames(DESCRIPTOR databaseDescriptor);

  public abstract DatabaseGetTableDataResponse getTableData(
      DESCRIPTOR databaseDescriptor,
      String table,
      String order,
      boolean reverse,
      int start,
      int count);

  public abstract DatabaseGetTableStructureResponse getTableStructure(
      DESCRIPTOR databaseDescriptor, String table);

  public abstract DatabaseGetTableInfoResponse getTableInfo(
      DESCRIPTOR databaseDescriptor, String table);

  public abstract DatabaseExecuteSqlResponse executeSQL(
      DESCRIPTOR databaseDescriptor, String query);

  public static class DatabaseGetTableDataResponse {

    public final List<String> columns;
    public final List<List<Object>> values;
    public final Integer start;
    public final Integer count;
    public final Long total;

    public DatabaseGetTableDataResponse(
        final List<String> columns,
        final List<List<Object>> values,
        int start,
        int count,
        long total) {
      this.columns = columns;
      this.values = values;
      this.start = start;
      this.count = count;
      this.total = total;
    }
  }

  public static class DatabaseGetTableStructureResponse {

    public final List<String> structureColumns;
    public final List<List<Object>> structureValues;
    public final List<String> indexesColumns;
    public final List<List<Object>> indexesValues;

    public DatabaseGetTableStructureResponse(
        final List<String> structureColumns,
        final List<List<Object>> structureValues,
        final List<String> indexesColumns,
        final List<List<Object>> indexesValues) {
      this.structureColumns = structureColumns;
      this.structureValues = structureValues;
      this.indexesColumns = indexesColumns;
      this.indexesValues = indexesValues;
    }
  }

  public static class DatabaseGetTableInfoResponse {

    public final String definition;

    public DatabaseGetTableInfoResponse(String definition) {
      this.definition = definition;
    }
  }

  public static class DatabaseExecuteSqlResponse {

    @Retention(RetentionPolicy.SOURCE)
    @StringDef({TYPE_SELECT, TYPE_INSERT, TYPE_UPDATE_DELETE, TYPE_RAW})
    public @interface Type {}

    public static final String TYPE_SELECT = "select";
    public static final String TYPE_INSERT = "insert";
    public static final String TYPE_UPDATE_DELETE = "update_delete";
    public static final String TYPE_RAW = "raw";

    public final @Type String type;

    // Select
    public final List<String> columns;
    public final List<List<Object>> values;

    // insert
    public final Long insertedId;

    // update/delete
    public final Integer affectedCount;

    private DatabaseExecuteSqlResponse(
        final @Type String type,
        final List<String> columns,
        final List<List<Object>> values,
        Long insertedId,
        Integer affectedCount) {
      this.type = type;
      this.columns = columns;
      this.values = values;
      this.insertedId = insertedId;
      this.affectedCount = affectedCount;
    }

    public static DatabaseExecuteSqlResponse successfulSelect(
        List<String> columns, List<List<Object>> values) {
      return new DatabaseExecuteSqlResponse(TYPE_SELECT, columns, values, null, null);
    }

    public static DatabaseExecuteSqlResponse successfulInsert(long insertedId) {
      return new DatabaseExecuteSqlResponse(TYPE_INSERT, null, null, insertedId, null);
    }

    public static DatabaseExecuteSqlResponse successfulUpdateDelete(int affectedRows) {
      return new DatabaseExecuteSqlResponse(TYPE_UPDATE_DELETE, null, null, null, affectedRows);
    }

    public static DatabaseExecuteSqlResponse successfulRawQuery() {
      return new DatabaseExecuteSqlResponse(TYPE_RAW, null, null, null, null);
    }
  }
}


text:
'use commascript';

('define(function,foo)', {
  returnType: 'string'
});

function foo() {
  return 'hi';
}

redpajama_set_name: RedPajamaGithub


text:
package com.amazonaws.services.identitymanagement.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;

/**
 *
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class UntagSAMLProviderRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     *

     * The ARN of the SAML identity provider in IAM from which you want to remove tags.
     *

     *

     * This parameter allows (through its regex pattern) a string of
     * characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of
     * the following characters: _+=,.@-
     *

     */
    private String sAMLProviderArn;
    /**
     *

     * A list of key names as a simple array of strings. The tags with matching keys are removed from the specified SAML
     * identity provider.
     *

     */
    private com.amazonaws.internal.SdkInternalList<String> tagKeys;

    /**
     *

     * The ARN of the SAML identity provider in IAM from which you want to remove tags.
     *

     *

     * This parameter allows (through its regex pattern) a string of
     * characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of
     * the following characters: _+=,.@-
     *

     *
     * @param sAMLProviderArn
     *        The ARN of the SAML identity provider in IAM from which you want to remove tags.

     *

     *        This parameter allows (through its regex pattern) a string
     *        of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also
     *        include any of the following characters: _+=,.@-
     */

    public void setSAMLProviderArn(String sAMLProviderArn) {
        this.sAMLProviderArn = sAMLProviderArn;
    }

    /**
     *

     * The ARN of the SAML identity provider in IAM from which you want to remove tags.
     *

     *

     * This parameter allows (through its regex pattern) a string of
     * characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of
     * the following characters: _+=,.@-
     *

     *
     * @return The ARN of the SAML identity provider in IAM from which you want to remove tags.

     *

     *         This parameter allows (through its regex pattern) a string
     *         of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also
     *         include any of the following characters: _+=,.@-
     */

    public String getSAMLProviderArn() {
        return this.sAMLProviderArn;
    }

    /**
     *

     * The ARN of the SAML identity provider in IAM from which you want to remove tags.
     *

     *

     * This parameter allows (through its regex pattern) a string of
     * characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of
     * the following characters: _+=,.@-
     *

     *
     * @param sAMLProviderArn
     *        The ARN of the SAML identity provider in IAM from which you want to remove tags.

     *

     *        This parameter allows (through its regex pattern) a string
     *        of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also
     *        include any of the following characters: _+=,.@-
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public UntagSAMLProviderRequest withSAMLProviderArn(String sAMLProviderArn) {
        setSAMLProviderArn(sAMLProviderArn);
        return this;
    }

    /**
     *

     * A list of key names as a simple array of strings. The tags with matching keys are removed from the specified SAML
     * identity provider.
     *

     *
     * @return A list of key names as a simple array of strings. The tags with matching keys are removed from the
     *         specified SAML identity provider.
     */

    public java.util.List<String> getTagKeys() {
        if (tagKeys == null) {
            tagKeys = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return tagKeys;
    }

    /**
     *

     * A list of key names as a simple array of strings. The tags with matching keys are removed from the specified SAML
     * identity provider.
     *

     *
     * @param tagKeys
     *        A list of key names as a simple array of strings. The tags with matching keys are removed from the
     *        specified SAML identity provider.
     */

    public void setTagKeys(java.util.Collection<String> tagKeys) {
        if (tagKeys == null) {
            this.tagKeys = null;
            return;
        }

        this.tagKeys = new com.amazonaws.internal.SdkInternalList<String>(tagKeys);
    }

    /**
     *

     * A list of key names as a simple array of strings. The tags with matching keys are removed from the specified SAML
     * identity provider.
     *

     *

     * NOTE: This method appends the values to the existing list (if any). Use
     * {@link #setTagKeys(java.util.Collection)} or {@link #withTagKeys(java.util.Collection)} if you want to override
     * the existing values.
     *

     *
     * @param tagKeys
     *        A list of key names as a simple array of strings. The tags with matching keys are removed from the
     *        specified SAML identity provider.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public UntagSAMLProviderRequest withTagKeys(String... tagKeys) {
        if (this.tagKeys == null) {
            setTagKeys(new com.amazonaws.internal.SdkInternalList<String>(tagKeys.length));
        }
        for (String ele : tagKeys) {
            this.tagKeys.add(ele);
        }
        return this;
    }

    /**
     *

     * A list of key names as a simple array of strings. The tags with matching keys are removed from the specified SAML
     * identity provider.
     *

     *
     * @param tagKeys
     *        A list of key names as a simple array of strings. The tags with matching keys are removed from the
     *        specified SAML identity provider.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public UntagSAMLProviderRequest withTagKeys(java.util.Collection<String> tagKeys) {
        setTagKeys(tagKeys);
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getSAMLProviderArn() != null)
            sb.append("SAMLProviderArn: ").append(getSAMLProviderArn()).append(",");
        if (getTagKeys() != null)
            sb.append("TagKeys: ").append(getTagKeys());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof UntagSAMLProviderRequest == false)
            return false;
        UntagSAMLProviderRequest other = (UntagSAMLProviderRequest) obj;
        if (other.getSAMLProviderArn() == null ^ this.getSAMLProviderArn() == null)
            return false;
        if (other.getSAMLProviderArn() != null && other.getSAMLProviderArn().equals(this.getSAMLProviderArn()) == false)
            return false;
        if (other.getTagKeys() == null ^ this.getTagKeys() == null)
            return false;
        if (other.getTagKeys() != null && other.getTagKeys().equals(this.getTagKeys()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getSAMLProviderArn() == null) ? 0 : getSAMLProviderArn().hashCode());
        hashCode = prime * hashCode + ((getTagKeys() == null) ? 0 : getTagKeys().hashCode());
        return hashCode;
    }

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

}


text:
@echo off
goto check_Permissions

:check_Permissions
    echo Administrative permissions required. Detecting permissions...

    net session >nul 2>&1
    if %errorLevel% == 0 (
        echo Success: Administrative permissions confirmed.
    ) else (
        echo Failure: Current permissions inadequate.
    )

    pause >nul


text:
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>CLOSED: Jun 23: Upgrade Voting</title>
		<link>http://bvs.wikidot.com/forum/t-69467/closed:jun-23:upgrade-voting</link>
		<description>Posts in the discussion thread "CLOSED: Jun 23: Upgrade Voting" - Fortified Walls</description>
				<copyright></copyright>
		<lastBuildDate>Sun, 10 Jul 2022 04:44:33 +0000</lastBuildDate>

					<item>
				<guid>http://bvs.wikidot.com/forum/t-69467#post-206471</guid>
				<title>Re: Jun 23: Upgrade Voting</title>
				<link>http://bvs.wikidot.com/forum/t-69467/closed:jun-23:upgrade-voting#post-206471</link>
				<description></description>
				<pubDate>Tue, 24 Jun 2008 13:55:58 +0000</pubDate>
				<wikidot:authorName>BvS-Uzuki</wikidot:authorName>				<wikidot:authorUserId>78144</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

(Repairing is only useful if there are other villages destroying your upgrades. Sabotage Facility was put in the game back when Andromeda and Random were really pissing each other off. It's a way to do actual damage to existing upgrades in other villages in an attempt to force them to behave. Most of the other Epic Villages tend to wish they never bought the thing.)

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-69467#post-206350</guid>
				<title>Re: Jun 23: Upgrade Voting</title>
				<link>http://bvs.wikidot.com/forum/t-69467/closed:jun-23:upgrade-voting#post-206350</link>
				<description></description>
				<pubDate>Tue, 24 Jun 2008 08:21:13 +0000</pubDate>
				<wikidot:authorName>Arkantos</wikidot:authorName>				<wikidot:authorUserId>98147</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

(I see Uzuki… kinda awkward… anyhow, does repairing do anything useful? to individuals?)

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-69467#post-206275</guid>
				<title>Re: Jun 23: Upgrade Voting</title>
				<link>http://bvs.wikidot.com/forum/t-69467/closed:jun-23:upgrade-voting#post-206275</link>
				<description></description>
				<pubDate>Tue, 24 Jun 2008 04:28:18 +0000</pubDate>
				<wikidot:authorName>Swan21</wikidot:authorName>				<wikidot:authorUserId>93166</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

Vote: Swann - Overseers

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-69467#post-206254</guid>
				<title>Re: Jun 23: Upgrade Voting</title>
				<link>http://bvs.wikidot.com/forum/t-69467/closed:jun-23:upgrade-voting#post-206254</link>
				<description></description>
				<pubDate>Tue, 24 Jun 2008 03:18:58 +0000</pubDate>
				<wikidot:authorName>deelle</wikidot:authorName>				<wikidot:authorUserId>103382</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

Vote: DareDevil - Fortified Walls

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-69467#post-206051</guid>
				<title>Re: Jun 23: Upgrade Voting</title>
				<link>http://bvs.wikidot.com/forum/t-69467/closed:jun-23:upgrade-voting#post-206051</link>
				<description></description>
				<pubDate>Mon, 23 Jun 2008 20:20:34 +0000</pubDate>
				<wikidot:authorName>BvS-Uzuki</wikidot:authorName>				<wikidot:authorUserId>78144</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

(Sabotage facility is an upgrade that makes it easier for other villages to destroy our upgrades)

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-69467#post-205982</guid>
				<title>Re: Jun 23: Upgrade Voting</title>
				<link>http://bvs.wikidot.com/forum/t-69467/closed:jun-23:upgrade-voting#post-205982</link>
				<description></description>
				<pubDate>Mon, 23 Jun 2008 18:51:28 +0000</pubDate>
				<wikidot:authorName>Chidon</wikidot:authorName>				<wikidot:authorUserId>86059</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

Vote: Chidon - Saboteur School

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-69467#post-205953</guid>
				<title>Re: Jun 23: Upgrade Voting</title>
				<link>http://bvs.wikidot.com/forum/t-69467/closed:jun-23:upgrade-voting#post-205953</link>
				<description></description>
				<pubDate>Mon, 23 Jun 2008 18:04:40 +0000</pubDate>
				<wikidot:authorName>Lear</wikidot:authorName>				<wikidot:authorUserId>91991</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

Vote: Lear- Fortified Walls

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-69467#post-205920</guid>
				<title>Re: Jun 23: Upgrade Voting</title>
				<link>http://bvs.wikidot.com/forum/t-69467/closed:jun-23:upgrade-voting#post-205920</link>
				<description></description>
				<pubDate>Mon, 23 Jun 2008 17:14:11 +0000</pubDate>
				<wikidot:authorName>Arkantos</wikidot:authorName>				<wikidot:authorUserId>98147</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

Vote: Arkantos - Saboteur School

*facility is nice?*

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-69467#post-205860</guid>
				<title>Re: Jun 23: Upgrade Voting</title>
				<link>http://bvs.wikidot.com/forum/t-69467/closed:jun-23:upgrade-voting#post-205860</link>
				<description></description>
				<pubDate>Mon, 23 Jun 2008 16:19:31 +0000</pubDate>
				<wikidot:authorName>Fax</wikidot:authorName>				<wikidot:authorUserId>90931</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

Vote: Bayard - Overseers.

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-69467#post-205780</guid>
				<title>Re: Jun 23: Upgrade Voting</title>
				<link>http://bvs.wikidot.com/forum/t-69467/closed:jun-23:upgrade-voting#post-205780</link>
				<description></description>
				<pubDate>Mon, 23 Jun 2008 14:21:13 +0000</pubDate>
				<wikidot:authorName>BrightMorn</wikidot:authorName>				<wikidot:authorUserId>89749</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

Vote: Darkshard - Fortified Walls

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-69467#post-205763</guid>
				<title>Jun 23: Upgrade Voting</title>
				<link>http://bvs.wikidot.com/forum/t-69467/closed:jun-23:upgrade-voting#post-205763</link>
				<description></description>
				<pubDate>Mon, 23 Jun 2008 14:01:19 +0000</pubDate>
				<wikidot:authorName>BvS-Uzuki</wikidot:authorName>				<wikidot:authorUserId>78144</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

Voting is now consolidated for upgrades. There's no separation between advanced upgrades and regular upgrades.

Fortified Walls - 4 - DareDevil, Darkshard, Lear, Uzuki

Ninja Attack Squad

Saboteur School - 2 - Arkantos, Chidon

Solidarity

Siege Engines

Invasion Defense

Overseers - 2 - Bayard, Swann

Scattered Outposts

Sabotage Facility

				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>


text:
class KeepAliveStateObserver {
 public:
  virtual void OnKeepAliveStateChanged(bool is_keeping_alive) = 0;
  virtual void OnKeepAliveRestartStateChanged(bool can_restart) = 0;

 protected:
  virtual ~KeepAliveStateObserver() {}
};

#endif  // COMPONENTS_KEEP_ALIVE_REGISTRY_KEEP_ALIVE_STATE_OBSERVER_H_


text:
    {{ formField.title }}

    <input ng-model="formField.value"
           ng-value="radioModel.key"
           type="radio"
           id="{{ formField.name + radioModel.key }}"
           name="{{ formField.name }}"
           ng-disabled="radioModel.disabled"
           piwik-attributes="{{formField.uiControlAttributes}}"
    >
    {{ radioModel.value }}
        {{ radioModel.description }}


text:
angular.module('voteit.services', [])
.service('locationService', function($rootScope, $interval) {

      return {
        start: function(){
          activateLocationService();
          $rootScope.stopTime = $interval(activateLocationService, 10000);
          //console.log("test !!!!!!!!!!!!!!!!!" + $rootScope.stopTime);
        }
      };
        function activateLocationService() {

            if (navigator.geolocation) {
                navigator.geolocation.getCurrentPosition(sendPosition, showError, {
                    maximumAge: 75000
                });
            } else {
                $rootScope.errorMsg = "Geolocation is not supported by this browser.";
            }

            function sendPosition(position) {

                $rootScope.currentLocation = position.coords;

                $rootScope.serverMsg = "Latitude=" + position.coords.latitude +
                    "Longitude=" + position.coords.longitude;
                //send http post with the parmaters
                //    $http.post('/someUrl', $rootScope.serverMsg).success(successCallback);
            }

            function successCallback() {

            }

            function showError(error) {
                switch (error.code) {
                    case error.PERMISSION_DENIED:
                        $rootScope.errorMsg = "User denied the request for Geolocation."
                        break;
                    case error.POSITION_UNAVAILABLE:
                        $rootScope.errorMsg = "Location information is unavailable."
                        break;
                    case error.TIMEOUT:
                        $rootScope.errorMsg = "The request to get user location timed out."
                        break;
                    case error.UNKNOWN_ERROR:
                        $rootScope.errorMsg = "An unknown error occurred."
                        break;
                }
            }

        }

    })
//----------------------------------------------------------------------------
//  Mock Service
//----------------------------------------------------------------------------
.service('MockService', function() {
  // Might use a resource here that returns a JSON array

  var getGroupsDistinct = function () {
        var lookup = {};
      // var items = oPolls;
      var oGropus = [];

     for (var i = 0; i < oPolls.length; i++) {
        var poll = oPolls[i];

        if (!(poll.group in lookup)) {
          lookup[poll.group] = 1;
          oGropus.push({
            name: poll.group,
            pollsCount: 1,
            category: poll.category,
          });
        }
        else {
          lookup[poll.group]++;
        }
      }

      for (var i = 0; i < oGropus.length; i++) {
        oGropus[i].pollsCount = lookup[oGropus[i].name];
      }
      return oGropus;
  }

  return {
    newPoll: function(oPollData) {
      return 'ok';
    },
    getGroups: function(center) {
      //return oGrougps;
      return getGroupsDistinct(center);
    },
    getPolls: function(groupName, userId) {

      var polls = [];
      for (var i = 0; i < oPolls.length; i++) {
        if (oPolls[i].group===groupName) {
            polls.push(oPolls[i]);
        };
      };

      return polls;
    },
    getPoll: function(sPollId) {

      for (var i = 0; i < oPolls.length; i++) {
        if (oPolls[i]._id===sPollId) {
            return oPolls[i];
        }
      }
    },
    postUserName: function(userName) {
      // Simple index lookup

    }

  }
})
.service('usersService', function($q, $http, MockService){
    return {
      register: function(user){
        var deffered = $q.defer();

        $http.post(BASE_HTTP_API_URL + 'users', user)
        .success(function(response){
            deffered.resolve(response);
        })
        .error(function(err){
            deffered.reject(err);
        });

        return deffered.promise;
      }
    }
})
.service('pollService', function($q, $http, MockService){

    var isServerMode = function () {
      var server = localStorage.getItem("server") ;
      if (server) {
        return (server === 'true' ? true : false);
      }
      return false;
    }

    return {
      newPoll: function(newPoll){
        var deffered = $q.defer();

        $http.post(BASE_HTTP_API_URL + 'createpoll', newPoll)
        .success(function(response){
            deffered.resolve(response);
        })
        .error(function(err){
            deffered.reject(err);
        });

        return deffered.promise;
      },
      getGroupsByGeoLocation: function(center){
        var deffered = $q.defer();

        if (!isServerMode() && MOCK_MODE) {
          deffered.resolve(MockService.getGroups(center));
          return deffered.promise;
        }

        $http.get(BASE_HTTP_API_URL + 'groups/' + center.lat + ',' + center.lng)
        .success(function(response){
            deffered.resolve(response);
        })
        .error(function(err){
            deffered.reject(err);
        });

        return deffered.promise;
      },
      getPolls: function(groupName, userId) {

        var deffered = $q.defer();

        if (!isServerMode() && MOCK_MODE) {
            deffered.resolve(MockService.getPolls(groupName, userId));
            return deffered.promise;
        }

        $http.get(BASE_HTTP_API_URL + 'polls?groupName=' + groupName)
        .success(function(response){
            deffered.resolve(response);
        })
        .error(function(err){
            deffered.reject(err);
        });

        return deffered.promise;
      },
      getPoll: function(sPollId) {

        var deffered = $q.defer();

        if (MOCK_MODE) {
            deffered.resolve(MockService.getPoll(sPollId));
            return deffered.promise;
        }

        $http.get(BASE_HTTP_API_URL + 'poll?pollId=' + sPollId)
        .success(function(response){
            deffered.resolve(response);
        })
        .error(function(err){
            deffered.reject(err);
        });

        return deffered.promise;
      }

    }
});


text:
require 'rspec_wiki/wrapper/rspec_example_wrapper'
require 'rspec_wiki/wrapper/new_rspec_example_wrapper'
require 'rspec_wiki/wrapper/old_rspec_example_wrapper'
require 'rspec_wiki/wrapper/rspec_example_wrapper_builder'


text:
from rest_framework_nested import routers
from panel.api import views

router = routers.DefaultRouter()
router.register(r'events', views.EventViewSet)
router.register(r'links', views.LinkViewSet)
router.register(r'messages', views.MessageViewSet)
router.register(r'notifications', views.NotificationViewSet)

message_router = routers.NestedSimpleRouter(
    router, r'messages', lookup='parent'
)
message_router.register(r'links', views.LinkViewSet, 'message_link')

link_router = routers.NestedSimpleRouter(
    router, r'links', lookup='parent'
)
link_router.register(r'visits', views.VisitViewSet, 'link_visit')

nested_routers = (message_router.urls + link_router.urls)


text:
class TranslationUnitSemanticTestFixture : public SemanticTestFixture {
public:
	TranslationUnitSemanticTestFixture()
		: SemanticTestFixture("src/compilertest/language/semantic/translation_unit") {
		return;
	}
};

BeginSuiteFixture(TranslationUnitSemanticTest, TranslationUnitSemanticTestFixture);

Case(ImportModuleDoesNotExist) {
	ParseFile("import_module_does_not_exist.deg");
	AssertResult(1, 0);
}

Case(ImportSymbolDoesNotExist) {
	ParseFiles({"import_symbol_does_not_exist_1.deg", "import_symbol_does_not_exist_2.deg"});
	AssertResult(1, 0);
}

Case(ImportSymbolRedefinition) {
	ParseFiles({"import_symbol_redefinition_1.deg", "import_symbol_redefinition_2.deg"});
	AssertResult(1, 0);
}

Case(SplitModule) {
	ParseFiles({"split_module_1.deg", "split_module_2.deg"});
	AssertResult(0, 0);
}

Case(ValidImport) {
	ParseFiles({"valid_import_1.deg", "valid_import_2.deg"});
	AssertResult(0, 0);
}

EndSuite(TranslationUnitSemanticTest);


text:
"""Utility for working with accelerator systems."""

from typing import List, Optional

from absl import logging

from tensorflow.core.protobuf import cluster_pb2
from tensorflow.core.protobuf import tensorflow_server_pb2
from tensorflow.dtensor.python import config
from tensorflow.dtensor.python import tpu_util
from tensorflow.python.eager import context
from tensorflow.python.framework import config as tf_config
from tensorflow.python.platform import remote_utils
from tensorflow.python.util.tf_export import tf_export

_INITIALIZED_ACCELERATOR_SYSTEM_TYPE = None

def is_initialized() -> bool:
  """Returns whether accelerator system has been initialized."""
  return bool(_INITIALIZED_ACCELERATOR_SYSTEM_TYPE)

def set_initialized(value):
  """Sets if accelerator system has been initialized."""
  global _INITIALIZED_ACCELERATOR_SYSTEM_TYPE
  _INITIALIZED_ACCELERATOR_SYSTEM_TYPE = value

def initialize_multi_client_cluster(job_name: str,
                                    dtensor_jobs: List[str],
                                    client_id: int,
                                    collective_leader: str,
                                    port: Optional[int] = None,
                                    gpu_use_nccl_communication: bool = False,
                                    enable_coordination_service: bool = True):
  """Initialize GRPC servers and collectives for multi-client DTensor setup.

  This function can be used to initialize a multi-client cluster and enable
  collective ops. GRPC servers are necessary in the multi-client mode, even
  when the number of clientis is 1.

  NOTE: this function must be called in an eager context.

  Args:
    job_name: The job name used by all clients in the DTensor cluster.
    dtensor_jobs: A list of the DTensor client jobs participating in the
      cluster. Must be strings of the form "hostname:port".
    client_id: The ID of the DTensor client this function is being called in.
    collective_leader: The job/task that will be used to run collectives.
    port: The port this client's GRPC server will run on. If omitted, use the
      port from dtensor_jobs for this client.
    gpu_use_nccl_communication: if True, configure TensorFlow to use NCCL by
      default.
    enable_coordination_service: If true, enable distributed coordination
      service to make sure that workers know the devices on each other, a
      prerequisite for data transfer through cross-worker rendezvous.

  Raises:
    RuntimeError: If running inside a tf.function.
  """
  assert context.executing_eagerly()

  if not collective_leader.startswith("/job:"):
    collective_leader = "/job:" + collective_leader

  context.context().configure_collective_ops(
      use_nccl_communication=gpu_use_nccl_communication,
      collective_leader=collective_leader)
  if enable_coordination_service:
    context.context().configure_coordination_service(
        service_type="standalone", service_leader=collective_leader)

  config_proto = context.get_config()

  # Construct server def from the host directly instead of relying on
  # TF_CONFIG.
  cluster_def = cluster_pb2.ClusterDef()
  # Note that for bns addresses, we will currently rely on the sorted string
  # of job name as the order of assigning task ids. This might be brittle once
  # we have jobs across multiple cells.
  cluster_def.job.add(name=job_name, tasks=dict(enumerate(dtensor_jobs)))
  server_def = tensorflow_server_pb2.ServerDef(
      cluster=cluster_def,
      default_session_config=config_proto,
      job_name=job_name,
      task_index=client_id,
      protocol=remote_utils.get_default_communication_protocol(),
      port=port)
  server_def.default_session_config.rpc_options.num_channels_per_target = 4
  server_def.default_session_config.experimental.recv_buf_max_chunk = -1

  logging.info("Enabling collectives with server_def: %s", server_def)

  context.context().enable_collective_ops(server_def)

  context.ensure_initialized()

@tf_export(
    "experimental.dtensor.initialize_accelerator_system",
    "experimental.dtensor.initialize_tpu_system",
    "experimental.dtensor.initialize_multi_client",
    v1=[])
def initialize_accelerator_system(
    device_type: Optional[str] = None,
    enable_coordination_service: Optional[bool] = True) -> str:
  """Initializes accelerators and communication fabrics for DTensor.

  DTensor configures TensorFlow to run in the local mode or multi-client mode.
  - In local mode, a mesh can only use devices attached to the current process.
  - In multi-client mode, a mesh can span across devices from multiple clients.

  If `DTENSOR_JOBS` is non-empty, DTensor configures TensorFlow to run in the
  multi-client mode using the distributed runtime. In multi-client mode devices
  on different clients can communicate with each other.

  The following environment variables controls the behavior of this function.

  - `DTENSOR_JOBS`: string, a comma separated list. Each item in the list is
      of format `{hostname}:{port}`. If empty, DTensor runs in the local mode.
      Examples of valid `DTENSOR_JOBS` values:
      - 4 clients on localhost:
        `localhost:10000,localhost:10001,localhost:10002,localhost:10003`
      - 2 clients on host1, 2 clients on host2
        `host1:10000,host1:10001,host2:10000,host2:10003`
      If the hostnames are BNS addresses, the items must be sorted in
      alphabetical order.
  - `DTENSOR_CLIENT_ID`: integer, between `0` to `num_clients - 1`, to identify
      the client id of the current process. The default value is `0`.
  - `DTENSOR_JOB_NAME`: string, a string for the name of the TensorFlow job.
      The job name controls the job name section of the TensorFlow DeviceSpecs,
      e.g., `job:worker` in `/job:worker/replica:0/task:0/device:TPU:0` when
      the job name is `worker`.
      The default value is `localhost` in local mode, and
      `worker` when in the multi-client mode. All DTensor clients within the
      same multi-client cluster share the same job name.

  Args:
    device_type: Type of accelerator to use, can be CPU, GPU, or TPU. If None,
      uses `tf.experimental.dtensor.preferred_device_type()`.
    enable_coordination_service: If true, enable distributed coordination
      service to make sure that workers know the devices on each other, when
      there is more than 1 client.

  Returns:
    device_type: the type of accelerator that was initialized.
  """
  global _INITIALIZED_ACCELERATOR_SYSTEM_TYPE
  assert context.executing_eagerly()

  if is_initialized():
    raise ValueError(
        "Accelerator system has already been initialized. "
        "Call tf.experimental.dtensor.shutdown_accelerator_system() first.")

  if context.context()._initialized:  # pylint: disable=protected-access
    raise ValueError(
        "TensorFlow has already been initialized. "
        "tf.experimental.dtensor.initialize_accelerator_system() must be "
        "called before TensorFlow is initialized.")

  context.context()._clear_caches()  # pylint: disable=protected-access

  if device_type is None:
    device_type = config.preferred_device_type()

  device_type = device_type.upper()
  if device_type not in {"CPU", "GPU", "TPU"}:
    raise ValueError(f"Unknown device_type {device_type}. "
                     "Allowed values are CPU, GPU, or TPU")

  if config.gpu_use_nccl_communication():
    logical_gpu_count = config.num_local_devices("GPU")
    physical_gpu_count = len(tf_config.list_physical_devices("GPU"))
    if logical_gpu_count != physical_gpu_count:
      raise ValueError(
          f"DTENSOR_GPU_USE_NCCL_COMMUNICATION is set for using NCCL. "
          f"NCCL Collectives require same number of logical and physical GPUs. "
          f"The number of logical GPU ({logical_gpu_count}) "
          f"differs from the number of physical GPU ({physical_gpu_count}).")

  # Configure logical host CPU devices for accelerators.
  if device_type in ("GPU", "TPU"):
    num_local_devices = config.num_local_devices(device_type)
    if config.num_local_devices("CPU") < num_local_devices:
      tf_config.set_logical_device_configuration(
          tf_config.list_physical_devices("CPU")[0],
          [context.LogicalDeviceConfiguration()] * num_local_devices)

  if not config.is_local_mode():
    initialize_multi_client_cluster(
        job_name=config.job_name(),
        dtensor_jobs=config.jobs(),
        client_id=config.client_id(),
        collective_leader=config.full_job_name(task_id=0),
        gpu_use_nccl_communication=config.gpu_use_nccl_communication(),
        enable_coordination_service=enable_coordination_service)
  else:
    if device_type == "GPU":
      # Enables Nccl on local mode.
      context.context(  # pylint: disable=protected-access
      )._collective_use_nccl_communication = config.gpu_use_nccl_communication(
      )

  if device_type == "TPU":
    tpu_util.initialize_tpu_system()

  _INITIALIZED_ACCELERATOR_SYSTEM_TYPE = device_type

  return device_type

@tf_export(
    "experimental.dtensor.shutdown_accelerator_system",
    "experimental.dtensor.shutdown_tpu_system",
    v1=[])
def shutdown_accelerator_system() -> None:
  """Shuts down the accelerator system."""
  global _INITIALIZED_ACCELERATOR_SYSTEM_TYPE
  context.async_wait()

  if not is_initialized():
    raise ValueError(
        "Accelerator system is not initialized. Call "
        "tf.experimental.dtensor.initialize_accelerator_system first.")

  device_type = _INITIALIZED_ACCELERATOR_SYSTEM_TYPE

  if not config.is_local_mode():
    raise ValueError(
        "Shutting down accelerator system under multi-client mode is "
        "not supported.")

  if device_type == "TPU":
    tpu_util.shutdown_tpu_system()

  # reset TF context to stop gRPC servers.
  context._reset_context()  # pylint: disable=protected-access
  context.context()._clear_caches()  # pylint: disable=protected-access
  _INITIALIZED_ACCELERATOR_SYSTEM_TYPE = None


text:
Change Log
==========

## Version 1.1.0

_2014-09-16_

 * Added FieldType REAL - Fixes [#12](https://github.com/Triple-T/simpleprovider/issues/12)
 * Fixed pluralization of table names that end on _vowel + y_ - Fixes [#10](https://github.com/Triple-T/simpleprovider/issues/10)

> Note: This change might be incompatible if you previously relied on the wrong pluralization. E.g. if you have defined a schema class called `Journey`, SimpleProvider has created a table called `journeies` for you. As of 1.1.0 the new pluralization will be `journeys`. This could possibly break a schema upgrade in the future, when SimpleProvider looks for a table called `journeys` which doesn't exist. If this affects your code, you have to make sure to manually set that name again via the `value`-property in the `@Table`-Annotation

## Version 1.0.1

_2014-07-10_

 * More ways to extend the default behaviour of `AbstractProvider` in derived classes:
  * Added `onUpgrade()` for custom schema updates.
  * Removed `final` modifier from `onCreate()`.

## Version 1.0.0

_2014-05-16_

Initial release.


text:
package com.zatarox.chess.openchess.models.materials;

import com.zatarox.chess.openchess.models.materials.*;

public interface HashStrategy {

    void add(Stone stone, Square square);

    void remove(Stone stone, Square square);

    long hashCode64();

}


text:
<?php session_start();?>
<!DOCTYPE html>
          <?php require('header.php');?>
    <?php require('sidebar.php');?>

		<form method = POST>
<legend > Business Maintenance </legend>

                        <input name="search" id="search" placeholder = "Input Business Name"/>
    <button class="btn btn-info" name = "s1">Search</button></form>

<?php if(isset($_POST['s1'])){
$_SESSION['s'] = $_POST['search'];
	echo "";}?>
	              <button  class="btn btn-info" onclick = "window.location.href='BusinessAdd.php'">Add New Business</button>

                               <form method = POST>

					Business ID
					Business Name
					Business Description
					Business Category
					Contact Person
					Contact Number
					Location
					Status
					Edit
					Enable/Disable

					<?php
					require('connection.php');
					$s  = $_SESSION['s'];
				$sql = "select * from tblbusiness where `strBusinessName` LIKE '$s%'";
				$query = mysqli_query($con, $sql);
				if(mysqli_num_rows($query) > 0){
					$i = 1;
					while($row = mysqli_fetch_object($query)){?>

 <?php echo $row->strBusinessID?>
					<?php echo $row->strBusinessName?>
					<?php echo $row->strBusinessDescription?>
					<?php echo $row->strCategory?>
					<?php echo $row->strContactPerson?>
					<?php echo $row->strContactNo?>
					<?php echo $row->strLocation?>
					<?php echo $row->strStatus?>
					 <button type = submit name = "btnEdit1" value = <?php echo $row->strBusinessID?>>EDIT</button>
					 <?php if($row->strStatus == 'active'){echo "<button type = submit name = 'disable' value = ".$row->strBusinessID.">Disable</button>";}
								else  if($row->strStatus == 'inactive'){echo "<button type = submit name = 'able' value = ".$row->strBusinessID.">Enable</button>";}					?>

				<?php }} ?>

					<?php
					if(isset($_POST['btnEdit1'])){
						$search  = $_POST['btnEdit1'];
						$query = mysqli_query($con,"Select * from tblbusiness where strBusinessID = '$search'");
						if(mysqli_num_rows($query)>0){
							$row = mysqli_fetch_object($query);
							$_SESSION['bid'] = 	$search;
							$_SESSION['bn'] = 	$row->strBusinessName;
							$_SESSION['bd'] = 	$row->strBusinessDescription;
							$_SESSION['bc'] = 	$row->strCategory;
							$_SESSION['bcp'] = 	$row->strContactPerson;
							$_SESSION['bcn'] = 	$row->strContactNo;
							$_SESSION['bl'] = 	$row->strLocation;
							$_SESSION['bst'] = 	$row->strStatus;

							echo "";
					}}

						if(isset($_POST['disable'])){
						$search  = $_POST['disable'];
						mysqli_query($con,"Update tblbusiness set strStatus = 'inactive' where strBusinessID = '$search'");
						echo "";
					}

						if(isset($_POST['able'])){
						$search  = $_POST['able'];
						mysqli_query($con,"Update tblbusiness set strStatus = 'active' where strBusinessID = '$search'");
						echo "";
					}?>

</form>

<! --/wrapper -->


text:
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Input;

namespace Plainion.Windows.Controls
{
    [TemplatePart( Name = "PART_TextBlock", Type = typeof( EditableTextBlock ) )]
    [TemplatePart( Name = "PART_TextBox", Type = typeof( EditableTextBlock ) )]
    public class EditableTextBlock : Control
    {
        private string myTextBeforeEdit;
        private TextBlock myTextBlock;
        private TextBox myTextBox;

        static EditableTextBlock()
        {
            DefaultStyleKeyProperty.OverrideMetadata( typeof( EditableTextBlock ), new FrameworkPropertyMetadata( typeof( EditableTextBlock ) ) );
        }

        public EditableTextBlock()
        {
            // don't set it - it will break keyboard navigation of ListView and TreeView
            //Focusable = true;
            FocusVisualStyle = null;

            Loaded += OnLoaded;
        }

        private void OnLoaded( object sender, RoutedEventArgs e )
        {
            Loaded -= OnLoaded;

            if( BindingOperations.GetBindingExpression( this, FormattedTextProperty ) == null
                && BindingOperations.GetMultiBindingExpression( this, FormattedTextProperty ) == null )
            {
                SetBinding( FormattedTextProperty, new Binding() { Path = new PropertyPath( "Text" ), Source = this } );
            }
        }

        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            myTextBlock = ( TextBlock )Template.FindName( "PART_TextBlock", this );

            if( myTextBox != null )
            {
                myTextBox.LostFocus -= OnTextBoxFocusLost;
                myTextBox.KeyDown -= OnTextBoxKeyDown;
            }

            myTextBox = ( TextBox )Template.FindName( "PART_TextBox", this );
            myTextBox.LostFocus += OnTextBoxFocusLost;
            myTextBox.KeyDown += OnTextBoxKeyDown;

            OnIsInEditModeChanged();
        }

        public static readonly DependencyProperty TextProperty = DependencyProperty.Register( "Text", typeof( string ),
            typeof( EditableTextBlock ), new FrameworkPropertyMetadata( null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault ) );

        public string Text
        {
            get { return ( string )GetValue( TextProperty ); }
            set { SetValue( TextProperty, value ); }
        }

        public static readonly DependencyProperty FormattedTextProperty = DependencyProperty.Register( "FormattedText", typeof( string ),
            typeof( EditableTextBlock ), new FrameworkPropertyMetadata( null ) );

        public string FormattedText
        {
            get { return ( string )GetValue( FormattedTextProperty ); }
            set { SetValue( FormattedTextProperty, value ); }
        }

        public static readonly DependencyProperty IsEditableProperty = DependencyProperty.Register( "IsEditable", typeof( bool ),
            typeof( EditableTextBlock ), new PropertyMetadata( true ) );

        public bool IsEditable
        {
            get { return ( bool )GetValue( IsEditableProperty ); }
            set { SetValue( IsEditableProperty, value ); }
        }

        public static readonly DependencyProperty IsInEditModeProperty = DependencyProperty.Register( "IsInEditMode", typeof( bool ),
            typeof( EditableTextBlock ), new FrameworkPropertyMetadata( false, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnIsInEditModeChanged, CoerceIsInEditModeChanged ) );

        private static void OnIsInEditModeChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
        {
            ( ( EditableTextBlock )d ).OnIsInEditModeChanged();
        }

        private void OnIsInEditModeChanged()
        {
            if( myTextBlock == null )
            {
                // if we are initially Visiblity.Collapsed then OnApplyTemplate() is not yet called.
                // we consider current IsInEditMode during OnApplyTemplate()
                return;
            }

            if( Visibility != Visibility.Visible )
            {
                myTextBlock.Visibility = Visibility.Collapsed;
                myTextBox.Visibility = Visibility.Collapsed;
                return;
            }

            if( IsInEditMode )
            {
                myTextBeforeEdit = Text;

                myTextBlock.Visibility = Visibility.Collapsed;
                myTextBox.Visibility = Visibility.Visible;

                myTextBox.Focus();
                myTextBox.SelectAll();
            }
            else
            {
                myTextBlock.Visibility = Visibility.Visible;
                myTextBox.Visibility = Visibility.Collapsed;
            }
        }

        private static object CoerceIsInEditModeChanged( DependencyObject d, object baseValue )
        {
            var self = ( EditableTextBlock )d;

            return self.IsEditable ? baseValue : false;
        }

        public bool IsInEditMode
        {
            get { return ( bool )GetValue( IsInEditModeProperty ); }
            set { SetValue( IsInEditModeProperty, value ); }
        }

        private void OnTextBoxFocusLost( object sender, RoutedEventArgs e )
        {
            IsInEditMode = false;
        }

        private void OnTextBoxKeyDown( object sender, KeyEventArgs e )
        {
            // Attention: always first sync text back to view model - only then adjust IsInEditMode
            // usecase: there might be some temp text added by user - e.g. "enter text here" or s.th.

            if( e.Key == Key.Enter )
            {
                var binding = myTextBox.GetBindingExpression( TextBox.TextProperty );
                binding.UpdateSource();

                IsInEditMode = false;
                e.Handled = true;
            }
            else if( e.Key == Key.Escape )
            {
                myTextBox.Text = myTextBeforeEdit;

                IsInEditMode = false;
                e.Handled = true;
            }
        }
    }
}


text:
"""LogicalPartition interface."""

from paxes_cinder.k2aclient import _
from paxes_cinder.k2aclient import base
from paxes_cinder.k2aclient.v1 import k2uom
from paxes_cinder.k2aclient.v1 import k2web

from paxes_cinder.k2aclient.exceptions import K2JobFailure

from eventlet import greenthread

class LogicalPartitionManager(base.ManagerWithFind):
    """Manage :class:`LogicalPartition` resources."""
    resource_class = k2uom.LogicalPartition

    def new(self):
        return self.resource_class(self, None)

    def list(self, managedsystem, xa=None):
        """Get a list of all LogicalPartitions for a particular
        ManagedSystem accessed through a particular hmc.

        :rtype: list of :class:`LogicalPartition`.
        """
        return self._list("/rest/api/uom/ManagedSystem/%s/LogicalPartition"
                          % managedsystem,
                          xa=xa)

    def listasroot(self, xa=None):
        """Get a list of all LogicalPartitions
        accessed through a particular hmc.

        :rtype: list of :class:`LogicalPartition`.
        """
        return self._list("/rest/api/uom/LogicalPartition", xa=xa)

    def get(self, managedsystem, logicalpartition, xa=None):
        """Given managedsytem, get a specific LogicalPartition.

        :param logicalpartition: The ID of the :class:`LogicalPartition`.
        :rtype: :class:`LogicalPartition`
        """
        return self._get("/rest/api/uom/ManagedSystem/%s/LogicalPartition/%s"
                         % (managedsystem, logicalpartition,),
                         xa=xa)

    def getasroot(self, logicalpartition, xa=None):
        """Get a specific LogicalPartition.

        :param logicalpartition: The ID of the :class:`LogicalPartition`.
        :rtype: :class:`LogicalPartition`
        """
        return self._get("/rest/api/uom/LogicalPartition/%s" %
                         logicalpartition,
                         xa=xa)

    def create(self, logicalpartition, child=None, xa=None):
        """Create the specified instance
        """
        return self._create("uom", logicalpartition,
                            child=child,
                            xa=xa)

    def delete(self, logicalpartition, child=None, xa=None):
        """Delete the specified instance
        """
        return self._delete("uom", logicalpartition,
                            child=child,
                            xa=xa)

    def deletebyid(self, logicalpartition_id,
                   child_type=None, child_id=None, xa=None):
        """Delete the specified instance
        """
        return self._deletebyid("uom", "LogicalPartition", logicalpartition_id,
                                child_type=child_type,
                                child_id=child_id,
                                xa=xa)

########

    def power_on(self, logicalpartition, xa=None):
        """For specified logicalpartition, power it on

        :param logicalpartition_id: Instance of the :class:`LogicalPartition`

        """

        if self.api.client.k2operator is None:
            self.api.client.authenticate()

        jpc = k2web.JobParameter_Collection()

        jrequest = self.api.web_job.getjob(logicalpartition, 'PowerOn',
                                           xa=xa)
        jrequest.job_parameters = jpc

        jresponse = self.api.web_job.runjob(logicalpartition, jrequest,
                                            xa=xa)
        k2respi = jresponse._k2resp

        while jresponse.status == 'NOT_STARTED' or \
                jresponse.status == 'RUNNING':

            greenthread.sleep(1)
            jresponse = self.api.web_job.readjob(jresponse.job_id,
                                                 xa=xa)

        if not jresponse.status.startswith("COMPLETED"):
            diagfspeci = self.api.exclogger.emit("JOB", "power_on",
                                                 k2respi)
            diagfspec = self.api.exclogger.emit("JOB", "power_on",
                                                jresponse._k2resp)
            msg = _("k2aclient:"
                    " during power_on,"
                    " for LogicalPartition: >%(logicalpartition.id)s<,"
                    " failed to power on due to"
                    " job failure,"
                    " job_id: >%(jresponse.job_id)s<,"
                    " status: >%(jresponse.status)s<,"
                    " input K2 job diagnostics have been"
                    " written to: >%(diagfspeci)s<,"
                    " response k2 job diagnostics have been"
                    " written to: >%(diagfspec)s<")
            raise K2JobFailure(msg %
                               {"logicalpartition.id": logicalpartition.id,
                                "jresponse.job_id": jresponse.job_id,
                                "jresponse.status": jresponse.status,
                                "diagfspeci": diagfspeci,
                                "diagfspec": diagfspec, },
                               jresponse._k2resp,
                               diagfspeci=diagfspeci,
                               diagfspec=diagfspec)

        return jresponse.status, jresponse.job_id

    def power_off(self, logicalpartition, xa=None):
        """For specified logicalpartition, power it on

        :param logicalpartition_id: Instance of the :class:`LogicalPartition`

        """

        if self.api.client.k2operator is None:
            self.api.client.authenticate()

        jpc = k2web.JobParameter_Collection()

        jp = k2web.JobParameter()
        jp.parameter_name = "operation"
        jp.parameter_value = "shutdown"
        jpc.job_parameter.append(jp)

        jp = k2web.JobParameter()
        jp.parameter_name = "immediate"
        jp.parameter_value = "true"
        jpc.job_parameter.append(jp)

        jrequest = self.api.web_job.getjob(logicalpartition, 'PowerOff',
                                           xa=xa)
        jrequest.job_parameters = jpc

        jresponse = self.api.web_job.runjob(logicalpartition, jrequest,
                                            xa=xa)
        k2respi = jresponse._k2resp

        while jresponse.status == 'NOT_STARTED' or \
                jresponse.status == 'RUNNING':

            greenthread.sleep(1)
            jresponse = self.api.web_job.readjob(jresponse.job_id,
                                                 xa=xa)

        if not jresponse.status.startswith("COMPLETED"):
            diagfspeci = self.api.exclogger.emit("JOB", "power_off",
                                                 k2respi)
            diagfspec = self.api.exclogger.emit("JOB", "power_off",
                                                jresponse._k2resp)
            msg = _("k2aclient:"
                    " during power_on,"
                    " for LogicalPartition: >%(logicalpartition.id)s<,"
                    " failed to power on due to"
                    " job failure,"
                    " job_id: >%(jresponse.job_id)s<,"
                    " status: >%(jresponse.status)s<,"
                    " input K2 job diagnostics have been"
                    " written to: >%(diagfspeci)s<,"
                    " response k2 job diagnostics have been"
                    " written to: >%(diagfspec)s<")
            raise K2JobFailure(msg %
                               {"logicalpartition.id": logicalpartition.id,
                                "jresponse.job_id": jresponse.job_id,
                                "jresponse.status": jresponse.status,
                                "diagfspeci": diagfspeci,
                                "diagfspec": diagfspec, },
                               jresponse._k2resp,
                               diagfspeci=diagfspeci,
                               diagfspec=diagfspec)

        return jresponse.status, jresponse.job_id


text:
require "nabaztag_hack_kit/server"

require 'nabaztag_hack_kit/mods/callback'
# require 'nabaztag_hack_kit/mods/logger'
require 'nabaztag_hack_kit/mods/playground'

module Basic
  class Server < NabaztagHackKit::Server
      register NabaztagHackKit::Mods::Callback
      # register Mods::Logger
      register NabaztagHackKit::Mods::Playground

  end
end


text:
#if !defined(FUSION_EQUAL_TO_IMPL_09172005_1120)
#define FUSION_EQUAL_TO_IMPL_09172005_1120

#include <boost/type_traits/is_same.hpp>
#include <boost/mpl/equal_to.hpp>
#include <boost/mpl/and.hpp>

namespace boost { namespace fusion
{
    struct cons_iterator_tag;

    namespace extension
    {
        template <typename Tag>
        struct equal_to_impl;

        template <>
        struct equal_to_impl<cons_iterator_tag>
        {
            template <typename I1, typename I2>
            struct apply
                : is_same<
                    typename I1::identity
                  , typename I2::identity
                >
            {
            };
        };
    }
}}

#endif


text:
var searchData=
[
  ['line_5fnumber',['line_number',['../classinfact_1_1_stream_tokenizer.html#afaed5415a9cd640bfda043014bed5fa6',1,'infact::StreamTokenizer']]]
];


text:
<!DOCTYPE html>

<link rel="shortcut icon" type="image/png" href="/assets/favicon.ico">
<link rel="stylesheet" href="css/instructions.css" />
<link rel="stylesheet" href="libs/pure-release-0.6.0/pure-min.css">

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">


text:
/**
 * Install plugin.
 */

function plugin(Vue) {

    if (plugin.installed) {
        return;
    }

    var _ = require('./util');

    _.config = Vue.config;
    _.warning = Vue.util.warn;
    _.nextTick = Vue.util.nextTick;

    Vue.url = require('./url');
    Vue.http = require('./http');
    Vue.resource = require('./resource');
    Vue.Promise = require('./promise');

    Object.defineProperties(Vue.prototype, {

        $url: {
            get() {
                return _.options(Vue.url, this, this.$options.url);
            }
        },

        $http: {
            get() {
                return _.options(Vue.http, this, this.$options.http);
            }
        },

        $resource: {
            get() {
                return Vue.resource.bind(this);
            }
        },

        $promise: {
            get() {
                return (executor) => new Vue.Promise(executor, this);
            }
        }

    });
}

if (typeof window !== 'undefined' && window.Vue) {
    window.Vue.use(plugin);
}

module.exports = plugin;


text:
description(
"Tests that the DFG checks that the toString method didn't become bad even if the StringObject already had a CheckStructure."
);

function foo() {
    return String(this);
}

for (var i = 0; i < 100; ++i) {
    if (i == 99)
        String.prototype.toString = function() { return 42; }
    shouldBe("foo.call(new String(\"foo\"))", i >= 99 ? "\"42\"" : "\"foo\"");
}


text:
package org.ebayopensource.turmeric.monitoring.aggregation.writer;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import me.prettyprint.cassandra.serializers.SerializerTypeInferer;
import me.prettyprint.cassandra.serializers.StringSerializer;
import me.prettyprint.hector.api.beans.HColumn;
import me.prettyprint.hector.api.beans.HSuperColumn;
import me.prettyprint.hector.api.beans.SuperSlice;
import me.prettyprint.hector.api.factory.HFactory;
import me.prettyprint.hector.api.query.QueryResult;
import me.prettyprint.hector.api.query.SuperSliceQuery;

import org.apache.cassandra.config.ConfigurationException;
import org.apache.thrift.transport.TTransportException;
import org.ebayopensource.turmeric.monitoring.aggregation.BaseTest;
import org.ebayopensource.turmeric.monitoring.aggregation.data.AggregationData;
import org.ebayopensource.turmeric.monitoring.aggregation.metric.writer.IpPerDayAndServiceNameWriter;
import org.ebayopensource.turmeric.runtime.common.exceptions.ServiceException;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class IpPerDayAndServiceNameWriterTest extends BaseTest {

   private IpPerDayAndServiceNameWriter ipPerDayAndServiceNameWriter;

   @Override
   @Before
   public void setUp() throws TTransportException, ServiceException, IOException, InterruptedException,
            ConfigurationException {
      super.setUp();
      ipPerDayAndServiceNameWriter = new IpPerDayAndServiceNameWriter(startTime, endTime, offlineConnectionInfo);
   }

   @Override
   @After
   public void tearDown() {
      super.tearDown();
      ipPerDayAndServiceNameWriter = null;
   }

   @Test
   public void testWriteData() {
      Map<String, AggregationData<String>> data = new HashMap<String, AggregationData<String>>();
      String key = new SimpleDateFormat("ddMMyyyy").format(new Date());
      AggregationData<String> dataRow = new AggregationData<String>(key);
      Set ipAdresses = new HashSet();
      ipAdresses.addAll(Arrays.asList("ip1", "ip2", "ip3"));
      dataRow.addColumn(srvcAdminName, ipAdresses);

      data.put(key, dataRow);
      ipPerDayAndServiceNameWriter.writeData(data);
      assertColumnFamilyEntry(key, srvcAdminName, new String[] { "ip1", "ip2", "ip3" });
   }

   private void assertColumnFamilyEntry(String key, String superColumnName, String[] columnValues) {
      SuperSliceQuery<Object, String, String, String> q = HFactory.createSuperSliceQuery(
               offlineConnectionInfo.getKeyspace(), SerializerTypeInferer.getSerializer(key), StringSerializer.get(),
               StringSerializer.get(), StringSerializer.get());
      q.setColumnFamily("IpPerDayAndServiceName");
      q.setKey(key);
      q.setRange(null, null, false, 100);
      QueryResult<SuperSlice<String, String, String>> r = q.execute();
      SuperSlice<String, String, String> columnSlice = r.get();
      for (HSuperColumn<String, String, String> hSuperColumn : columnSlice.getSuperColumns()) {
         if (superColumnName.equals(hSuperColumn.getName())) {
            assertEquals("The super column must contain " + columnValues.length + " columns", columnValues.length,
                     hSuperColumn.getColumns().size());
            for (int i = 0; i < columnValues.length; i++) {
               boolean columnFound = false;
               for (HColumn<String, String> column : hSuperColumn.getColumns()) {
                  if (columnValues[i].equals(column.getName())) {
                     columnFound = true;
                     break;
                  }
               }
               assertTrue("the column name " + columnValues[i] + " wasn't found", columnFound);
            }
            return;
         }
      }
      fail("No super column with name " + superColumnName + " was found for the key " + key);

   }
}


text:
package es.deusto.weblab.client.lab.ui.themes.es.deusto.weblab.defaultmobile;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;

import es.deusto.weblab.client.configuration.IConfigurationManager;
import es.deusto.weblab.client.dto.users.User;
import es.deusto.weblab.client.lab.ui.themes.es.deusto.weblab.defaultweb.DefaultTheme;
import es.deusto.weblab.client.ui.widgets.WlUtil;

class LoggedPanel extends Composite {

    interface ILoggedPanelCallback {
    	public void onLogoutButtonClicked();
    }

	interface LoggedPanelUiBinder extends UiBinder<Widget, LoggedPanel> {
	}

	private static LoggedPanelUiBinder uiBinder = GWT.create(LoggedPanelUiBinder.class);

	// Widgets
    @UiField VerticalPanel contentPanel;
    @UiField Label userLabel;
	@UiField Anchor logoutLink;
	@UiField Image logoImage;

	// DTOs
	private final User user;
    private final ILoggedPanelCallback callback;

    LoggedPanel(User user, ILoggedPanelCallback callback, IConfigurationManager configurationManager) {
		this.user = user;
		this.callback = callback;

	    final Widget wid = LoggedPanel.uiBinder.createAndBindUi(this);
	    this.initWidget(wid);

	    this.logoImage.setUrl(GWT.getModuleBaseURL() + configurationManager.getProperty(DefaultTheme.Configuration.HOST_ENTITY_MOBILE_IMAGE, ""));
	    if(this.user != null)
	    	this.userLabel.setText(WlUtil.escapeNotQuote(this.user.getFullName()));
	    else
	    	this.userLabel.setText("");
	}

	@UiHandler("logoutLink")
	void onLogoutClicked(@SuppressWarnings("unused") ClickEvent ev) {
		this.callback.onLogoutButtonClicked();
	}

}


text:
var db = require('../redis-db');
var Model = require('./model');

class AuthModel extends Model {

  constructor(members, id, userID) {
    super(members, id);

    if (userID) {
      this.setUserID(userID);
    }
  }

  setUserID(userID) {
    this.setMember('userID', userID);

    return this;
  }

  getUserID() {
    return this.getMember('userID');
  }

  static getAllForUser(userID) {
    return db.smembers('user:' + userID + ':' + this.getStorageName() + 's')
      .then((modelIDs) => {
        var promises = [];

        modelIDs.forEach((modelID) => {
          promises.push(this.find(modelID));
        });

        return Promise.all(promises);
      })
      .then((models) => {
        return models.filter((model) => {
          return model !==false;
        });
      });
  }

  save(userID) {
    userID = userID || this.getUserID();

    if (!userID) {
      return Promise.reject(new Error('Missing user info in save'));
    }

    this.setUserID(userID);

    return this.constructor.find(this.getID()).then(model => {
      if (model) {
        return db.sismember(
          'user:' + userID + ':' + this.constructor.getStorageName() + 's',
          this.getID()
        ).then(isOwned => {
          if (!isOwned) {
            return Promise.reject(new Error('User save mismatch'));
          }
          return true;
        });
      }
      return true;
    }).then(() => {
      return super.save()
        .then(saved => {
          return db.sadd(
            'user:' + userID + ':' + this.constructor.getStorageName() + 's',
            saved.getID()
          ).then(() => {
            return saved;
          });
        });
    });
  }

  remove() {
    return super.remove().then(() => {
      return db.srem(
        'user:' + this.getUserID() + ':' + this.constructor.getStorageName() + 's',
        this.getID()
      );
    });
  }
}

module.exports = AuthModel;


text:
//
//  WJComment.h
//  百思不得姐
//
//  Created by wangju on 16/4/5.
//  Copyright © 2016年 wangju. All rights reserved.
//

#import <Foundation/Foundation.h>

@class WJUser;
@interface WJComment : NSObject

/** 评论的id */
@property (nonatomic,strong) NSString *id;
/** 评论的内容 */
@property (nonatomic,strong) NSString *content;

/** 评论的时间 */
@property (nonatomic,copy) NSString *ctime;

/** 点赞数 */
@property (nonatomic,assign) NSInteger like_count;

/** 评论的用户 */
@property (nonatomic,strong) WJUser *user;

/** 音频回复的时常 */
@property (nonatomic,assign) NSInteger voicetime;

/** 音频回复的路径 */
@property (nonatomic,strong) NSString *voiceuri;

/** 帖子的id */
@property (nonatomic,strong) NSString *data_id;

@end


text:
<?php

namespace app\models;

use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use app\models\Users;

/**
 * usersSearch represents the model behind the search form about `app\models\Users`.
 */
class usersSearch extends Users
{
    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'username', 'password', 'authKey', 'accessToken', 'te_aca', 'te_id', 'te_name'], 'safe'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function scenarios()
    {
        // bypass scenarios() implementation in the parent class
        return Model::scenarios();
    }

    /**
     * Creates data provider instance with search query applied
     *
     * @param array $params
     *
     * @return ActiveDataProvider
     */
    public function search($params)
    {
        //排除系统管理员
        $query = Users::find()->where(['<>','te_id','系统管理员']);

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
            'pagination' => ['pageSize' => 10],
            'sort' =>[
                'defaultOrder'=>[
                    'te_aca'=> SORT_DESC,
                ]

            ]
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        $query->andFilterWhere(['like', 'id', $this->id])
            // ->andFilterWhere(['like', 'id', $this->id])
            ->andFilterWhere(['like', 'username', $this->username])
            ->andFilterWhere(['like', 'password', $this->password])
            ->andFilterWhere(['like', 'authKey', $this->authKey])
            ->andFilterWhere(['like', 'accessToken', $this->accessToken])
            ->andFilterWhere(['like', 'te_aca', $this->te_aca])
            ->andFilterWhere(['like', 'te_id', $this->te_id])
            ->andFilterWhere(['like', 'te_name', $this->te_name]);

        return $dataProvider;
    }
}


text:
var xhr = require('../utils/xhr');

module.exports = {
    loadContacts: function(callback) {
        xhr.simpleCall({
            func: 'contacts'
        }, function (res) {
            callback(res.data);
        });
    }
};


text:
package org.apache.sling.caconfig.resource.impl.util;

import static org.junit.Assert.assertEquals;

import java.util.List;

import org.junit.Test;

import com.google.common.collect.ImmutableList;

public class PathParentExpandIteratorTest {

    @Test
    public void testIterator() {
        List<String> list = ImmutableList.of(
                "/conf/a/b/c",
                "/conf/a/b",
                "/conf/x/y/z");

        List<String> result = ImmutableList.copyOf(new PathParentExpandIterator("/conf", list.iterator()));
        assertEquals(ImmutableList.of(
                "/conf/a/b/c",
                "/conf/a/b",
                "/conf/a",
                "/conf/a/b",
                "/conf/a",
                "/conf/x/y/z",
                "/conf/x/y",
                "/conf/x"), result);
    }

}


text:
Front end - The code

                        Add the plugin to a container (HTML tag, class or id).

Simple Calendar example

                        To display the booking calendar please use the following example:

$('#frontend').DOPFrontendBookingCalendarPRO();

Custom Calendar example

                        To display the booking calendar with custom settings please read the JSON section and use the following example:

$('#frontend').DOPFrontendBookingCalendarPRO({
    'ID': 1,
    'loadURL': 'dopbcp/php-database/load.php'
});

JSON

                        You can add the following options to the front end version of the plugin:

loadURL

Default value: 'dopbcp/php-file/load.php'.
URL from were JSON data is loaded.

sendURL

Default value: 'dopbcp/php-file/send.php'.
URL from were JSON reservation data is saved.

reinitialize

Default value: false.
reinitialize the calendar if already loaded.

calendar

calendar contains 2 attributes: data and text

data

data is used to change calendar configuration

bookingStop

Default value: 0.
 Set the number of minutes before the booking is stopped in advance. For 1 hour you have 60 minutes, for 1 day you have 1440 minutes.

dateType

Default value: 0.
 Select date format: 0 for American (mm dd, yyyy) or 1 for European (dd mm yyyy).

language

Default value: en.
 Set your calendar language.

languages

Default value: [].
 Set your calendar languages.

view

Default value: false.
 Set true to display only booking information in calendar.

text

text is used to change calendar texts

addMonth

Default value: 'Add month view'.
 Add Month View button title (plus icon).

available

Default value: 'available'.
 available text

availableMultiple

Default value: 'available'.
 available multiple text

booked

Default value: 'booked'.
 Booked Day text.

nextMonth

Default value: 'Next month'.
 Next Month button title.

previousMonth

Default value: 'Previous month'.
 Previous Month button title.

removeMonth

Default value: 'Remove month view'.
 Remove Month View button title (minus icon).

unavailable

Default value: 'unavailable'.
 Unavailable Day text.

currency

currency contains 2 attributes: data and text.

data

data is used to change currency configuration

code

Default value: 'USD'.
 Set calendar currency.

position

Default value: 'before'.
 Set your currency position.

sign

Default value: '$'.
 Set your currency sign.

days

days contains 2 attributes: data and text.

data

data is used to change days configuration

available

Default value: [true, true, true, true, true, true, true].
 Set available/unavailable days starting with Monday.

first

Default value: 1.
 Set the first day of the week (1 = Monday, 2 = Tuesday, 3 = Wednesday, 4 = Thursday, 5 = Friday, 6 = Saturday, 7 = Sunday)

morningCheckOut

Default value: false.
 This option enables "Check in" in the afternoon of first day and "Check out" in the morning of the day after last day.

multipleSelect

Default value: true.
 Use Check in/Check out or select only one day.

text

text is used to change days texts

names

Default value: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'].
 Weekdays long names.

shortNames

Default value: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'].
 Weekdays short names.

deposit

deposit contains 2 attributes: data and text.

data

data is used to change deposit configuration

deposit

Default value: 0.
 Deposit amount.

type

Default value: 'percent'.
 Deposit type can be percent or fixed.

text

text is used to change deposit texts

discounts

discounts contains 2 attributes: data and text.

data

data is used to change discounts configuration

discount

A discount item contains the data for a booked time lapse.

position

Default value: '1'.
 Discount position

start_time_lapse

Default value: '1'.
 Enter the number of days for the begining of the time lapse.

end_time_lapse

Default value: '1'.
 Enter the number of days for the ending of the time lapse.

operation

Default value: '-'.
 Set item price operation. You can add or subtract a value.

price

Default value: '0'.
 Enter item price.

price_type

Default value: 'percent'.
 Set item price type. It can be a fixed value or a percent from price.

price_by

Default value: 'once'.
 Set item price by. The price can be calculated once or by day

translation

Default value: 'New item'.
 Item label.

rules

A discount item rule set the discounts for a specific time period.

position

Default value: '1'.
 Rule position

start_date

Default value: ''.
 Enter rule start date, when the discount item rule will start being used. Leave it blank to start today.

end_date

Default value: ''.
 Enter rule end date, when the discount item rule will stop being used. Leave it blank for the rule to never finish.

operation

Default value: '-'.
 Set rule price operation. You can add or subtract a value.

price

Default value: '0'.
 Set rule price.

price_type

Default value: 'percent'.
 Set rule price type. It can be a fixed value or a percent from price.

price_by

Default value: 'once'.
 Sett rule price by. The price can be calculated once or by day.

text

text is used to change discount texts

byDay

Default value: 'day'.
 By day text

title

Default value: 'Discount'.
 Discount title text

extras

extras contains 2 attributes: data and text.

data

data is used to change extras configuration

extra

Add extra group

id

Default value: '1'.
 Extras group id

position

Default value: '1'.
 Extras group position

multiple_select

Default value: false.
 Set true if you want to select multiple options from the Extras group.

required

Default value: true.
 Set true if you want to be mandatory a selection from this Extras group.

translation

Default value: ''.
Change extras & services name.

group_items

Add an item to your Extras group

id

Default value: '1'.
Item id.

group_id

Default value: '1'.
Item group id.

position

Default value: '1'.
Item position id.

operation

Default value: '-'.
Set the type of operation you apply.

price

Default value: '0'.
Set the price for the Item.

price_type

Default value: 'fixed'.
Set the type of price 'fixed' or 'percent'.

price_by

Default value: 'once'.
Set how to apply the price: Once or Per day.

translation

Default value: ''.
Set the label.

text

text is used to change extras texts

byDay

Default value: 'day'.
By day text.

invalid

Default value: 'Select an option from'.
Error text.

title

Default value: 'Extras'.
Extras title text.

fees

Taxes & Fees

data

data is used to change fees configuration

fees

Add taxes & fees

id

Default value: '1'.
 Fee id.

name

Default value: 'New Fee'.
 Fee name.

operation

Default value: '+'.
 Set the type of the Tax/fee operation.

price

Default value: '10'.
 Set the price.

price_type

Default value: 'fixed'.
 Set the type of price, fixed or percent.

price_by

Default value: 'once'.
 Set how the price is applied, Once or Per day.

included

Default value: 'false'.
 Set true if the Tax/fee price is Included in the price.

extras

Default value: 'true'.
 Set true if the Extra's prices be added in the calculations.

cart

Default value: 'false'.
 Set true if the Fees be displayed in the cart's total.

translation

Default value: 'New tax / fee label'.
 Fee label

text

text is used to change fees texts

byDay

Default value: 'day'.
 By day text.

included

Default value: 'Included in price'.
 'Included in price' text.

title

Default value: 'Taxes & fees'.
 'Taxes & fees' title text.

form

Form

data

data is used to change form configuration

form

Form fields

id

Default value: '1'.
 Field id

form_id

Default value: '1'.
 Form id

type

Default value: 'text'.
 Field type

position

Default value: '1'.
 Field position

multiple_select

Default value: 'false'.
 Set true if you want to select multiple options from this field.

allowed_characters

Default value: ''.
 Enter the caracters allowed in this field. Leave it blank if all characters are allowed.

size

Default value: '0'.
 Enter the maximum number of characters allowed. Leave it blank for unlimited.

is_email

Default value: 'false'.
 Set true if you want this field to be verified if an email has been added or not.

required

Default value: 'true'.
 Set true if you want the field to be mandatory.

translation

Default value: 'New Field'.
 Field label

text

text is used to change form texts

checked

Default value: 'Checked'.
 Checked text

invalidEmail

Default value: 'is invalid. Please enter a valid email.'.
 Invalid email text

required

Default value: 'is required.'.
 Is required text

title

Default value: 'Contact information'.
 form title text

unchecked

Default value: 'Unchecked'.
 unchecked text

ID

Default value: 0.
 Calendar ID. Change it if you have more then one calendar.

months

Calendar months.

data

data is used to change months configuration

no

Default value: 1.
 Set the number of months initialy displayed.

text

text is used to change months texts

names

Default value: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'].
 Months long names.

shortNames

Default value: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'].
 Months short names.

order

Order.

data

data is used to change order configuration

redirect

Default value: ''.
 Set the link where want to be redirected after booking is done. Leave it empty if you don't redirect.

terms

Default value: false.
 Set true if you want to enable terms and conditions.

termsLink

Default value: ''.
 Set the terms and condition link. Leave it empty if you don't want terms and condition.

text

text is used to change order texts

book

Default value: 'Book now'.
 book button

success

Default value: 'Reservation has been added!'.
 Reservation success message

terms

Default value: 'I accept to agree to the Terms & Conditions.'.
 Terms and conditions label

termsInvalid

Default value: 'You must agree with our Terms & Conditions to continue.'.
 Terms & condtions - error message

title

Default value: 'Order'.
 Order title

unavailable

Default value: 'The period you selected is not available anymore. The calendar will refresh to update the schedule.'.
 Error message for unavailable selected period

reservation

Reservation.

text

text is used to change reservation texts

price

Default value: 'Price'.
 Reservation price text

priceChange

Default value: 'Price change'.
 Reservation Price change text

priceTotal

Default value: 'Total'.
 Reservation Total text

selectDays

Default value: 'Please select the days from calendar.'.
 Reservation select days text

title

Default value: 'Reservation'.
 Reservation title

titleDetails

Default value: 'Details'.
 Reservation Details title

search

Search.

text

text is used to change search texts

noItems

Default value: 'No. book items'.
 No. book items text

noServices

Default value: 'There are no services available for the period you selected.'.
 No services available text

noServicesSplitGroup

Default value: 'You cannot add divided groups to a reservation.'.
 No split group text

title

Default value: 'Search.'.
 Search title.

sidebar

Sidebar.

data

data is used to change sidebar configuration

noItems

Default value: true.
 Set true to display number of items you want to book in front end.

positions

positions is used to display position for : search, extras, reservation, cart, form, order

search

Search position in sidebar

column

Default value: '1'.
 Set Column position.Can be: 1 or 2

row

Default value: '1'.
 Set Row position.Can be: 1,2,3,4,5,6,7

extras

Extras position in sidebar

column

Default value: '1'.
 Set Column position.Can be: 1 or 2

row

Default value: '2'.
 Set Row position.Can be: 1,2,3,4,5,6,7

reservation

Reservation position in sidebar

column

Default value: '1'.
 Set Column position.Can be: 1 or 2

row

Default value: '4'.
 Set Row position.Can be: 1,2,3,4,5,6,7

cart

Cart position in sidebar

column

Default value: '1'.
 Set Column position.Can be: 1 or 2

row

Default value: '5'.
 Set Row position.Can be: 1,2,3,4,5,6,7

form

Form position in sidebar

column

Default value: '1'.
 Set Column position.Can be: 1 or 2

row

Default value: '5'.
 Set Row position.Can be: 1,2,3,4,5,6,7

form

Form position in sidebar

column

Default value: '1'.
 Set Column position.Can be: 1 or 2

row

Default value: '6'.
 Set Row position.Can be: 1,2,3,4,5,6,7

order

Order position in sidebar

column

Default value: '1'.
 Set Column position.Can be: 1 or 2

row

Default value: '7'.
 Set Row position.Can be: 1,2,3,4,5,6,7


text:
<link rel="import" href="../../bower_components/polymer/polymer-element.html">

<dom-module id="other-element">
  <template>
    <h1>[[localize('goodbye')]]</h1>
  </template>
  <script>
    (function otherElementDefinition(customElements) {
      'use strict';

      class OtherElement
        extends Polymer.mixinBehaviors([Polymer.AppLocalizeBehavior], Polymer.Element) {

        static get is() { return 'other-element'; }

        static get properties() {
          return {
            language: {
              type: String,
              value: 'en'
            }
          };
        }

        connectedCallback() {
          this.addEventListener('app-localize-resources-loaded', (e) => {
            console.log(this.localize('hello', 'name', 'tomm'));
            console.log(this.resources)
          });

          this.loadResources(this.resolveUrl(`/locales/${this.language}.json`));
        }
      }

      customElements.define(OtherElement.is, OtherElement);
    })(window.customElements)
  </script>
</dom-module>


text:
<?php
$installer = $this;
$installer->startSetup();

$installer->run( "
CREATE TABLE {$this->getTable( 'reminder' )} (
  `entry_id` int(10) unsigned NOT NULL auto_increment,
  `increment_id` varchar(250) NOT NULL default '',
  `reminders` int(10) NOT NULL default '0',
  `status` enum('enabled','disabled') NOT NULL default 'enabled',
  PRIMARY KEY  (`entry_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  " );

$installer->endSetup();
?>


text:
from unittest import TestCase, main as ut_main

from wallp.service.reddit import Reddit, RedditError

class TestReddit(TestCase):

	def test_get_imgur_image_id(self):
		valid_id_urls = ['http://imgur.com/1234567',
				'http://imgur.com/1abcdef',
				'http://imgur.com/e3er43d/',
				'http://imgur.com/1234567/?']

		invalid_id_urls = ['http://imgur.com/123456',
				'http://imgur.com/123456',
				'http://imgur.com/12345678']

		reddit = Reddit()

		for url in valid_id_urls:
			self.assertEquals(len(reddit.get_imgur_image_id(url)), 7)

		for url in invalid_id_urls:
			self.assertRaises(RedditError, reddit.get_imgur_image_id, url)

if __name__ == '__main__':
	ut_main()


text:
ES5Harness.registerTest({
    id: "15.2.3.6-3-216",

    path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-216.js",

    description: "Object.defineProperty - 'get' property in 'Attributes' is own accessor property(without a get function) that overrides an inherited accessor property (8.10.5 step 7.a)",

    test: function testcase() {
        var obj = {};
        var proto = {};
        Object.defineProperty(proto, "get", {
            get: function () {
                return function () {
                    return "inheritedAccessorProperty";
                };
            }
        });

        var ConstructFun = function () { };
        ConstructFun.prototype = proto;

        var child = new ConstructFun();
        Object.defineProperty(child, "get", {
            set: function () { }
        });

        Object.defineProperty(obj, "property", child);

        return obj.hasOwnProperty("property") && typeof obj.property === "undefined";
    },

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


text:
package org.apache.river.test.spec.txnmanager;
import net.jini.core.transaction.*;
import java.rmi.RemoteException;

class CommitThread extends Thread {
    final long timeOut;
    final Transaction tr;

    public CommitThread(Transaction tr) {
        this.tr = tr;
        timeOut = 0;
    }

    public CommitThread(Transaction tr, long timeOut) {
        this.tr = tr;

        if (timeOut < 0) {
            throw new IllegalArgumentException("timeout must be non-negative");
        }
        this.timeOut = timeOut;
    }

    public void run() {
        try {
            if (timeOut > 0) {
                tr.commit(timeOut);
            } else {
                tr.commit();
            }
        } catch (TransactionException bte) {
        } catch (RemoteException re) {}
    }
}


text:
ACCEPTED

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

#### Published in
Flora 25(2, Beibl. ):49. 1842

#### Original name
Hedysarum gyroides Roxb.

### Remarks
null


text:
import React, { Component, PropTypes } from 'react';
import DomRenderer from 'jss/lib/backends/DomRenderer';
import { createStyleSheet } from 'src';

const styleSheet = createStyleSheet('button', (theme) => ({
  root: {
    color: theme.palette.primary,
    fontSize: theme.typography.fontSize,
    fontFamily: theme.typography.fontFamily,
  },
}), { Renderer: DomRenderer });

export default class Button extends Component {
  static propTypes = {
    children: PropTypes.node,
  };

  static contextTypes = {
    styleManager: PropTypes.object.isRequired,
  };

  render() {
    const { children, ...other } = this.props;
    const classes = this.context.styleManager.render(styleSheet);

    return (
      <button className={classes.root} {...other}>{children}</button>
    );
  }
}