text:
"use strict";
var fs = require("fs");
var os = require("os");
var path = require("path");
var isLib = require("./isLib");
var setupenv = require("./setupenv");
var parseURL = require("../basic/parseURL");
var userAgent = "Efront/1.0";
var memery = require("./memery");
var resolve_config = { paths: memery.COMS_PATH.split(',') };
var mainLoaderPromise = new Promise(function (ok, oh) {
    fs.readFile(path.join(__dirname, "../basic/#loader.js"), function (error, data) {
        if (error) oh(error);
        ok(data.toString());
    });
});
function fromComponent(base) {
    var packer = require("./finalpacker").bind(this);
    var requestInternet = fromInternet("");
    var request = function (url, onsuccess, onerror) {
        var isdestroied = false;
        if (/^https?\:\/\//i.test(url)) {
            return requestInternet(url, onsuccess, onerror);
        }
        if (/^\/?comm\b/i.test(url)) {
            try {

                var temppath = require.resolve(url.replace(/^\/?comm\b/i, '.').replace(/[\\\$]/g, '/'), resolve_config)
                if (isLib(temppath)) {
                    var mode = function () {
                        return require(temppath);
                    };
                    mode.file = temppath;
                    onsuccess(mode);
                    return;
                }
            } catch (e) {

            }
        }
        var abort = function () {
            isdestroied = true;
        };
        requestHandles.push(abort);
        var url1 = base.replace(/[^\\\/]*$/, url);
        url1 = url1.replace(/^\/?/, "/");
        packer(url1, function (result) {
            var index = requestHandles.indexOf(abort);
            if (index >= 0) {
                requestHandles.splice(index, 1);
            }
            if (isdestroied) return;
            if (result instanceof Error) {
                onerror(result);
            }
            if (!result) {
                if (!/^comm\//i.test(url)) {
                    console.fail(url);
                    onerror(url);
                } else {
                    url1 = url.replace(/^comm\//i, '');
                    if (global[url1]) {
                        result = function () { return this }.bind(global[url1]);
                    } else {
                        try {
                            url1 = url1.replace(/\$/g, '/');
                            if (/^\.*\//.test(url1)) {
                                var parth = path.relative(url1, '.');
                                if (/^\./.test(parth)) {
                                    url1 = "./" + path.relative('.', url1).replace('\\', '/');
                                }

                                var resolved = require.resolve(url1, resolve_config);
                            } else {
                                var resolved = require.resolve(url1);
                            }
                            if (resolved) {

                                result = function () {
                                    return require(resolved);
                                };
                                result.file = resolved;
                                result.args = [];
                            }
                        } catch (e) {
                            console.fail(e);
                            onerror(url1);
                        }
                    }
                }
            } else {
                result = result.toString();
            }
            onsuccess(result || '');
            require("./watch").close();
        });
    };
    require("./watch").close();
    return request;
}
function fromInternet(mainfilepath) {
    var http = require('http');
    var https = require('https');
    var reg = /^(https?)\:\/\//i;
    function request(url, onsuccess, onerror) {
        if (!reg.test(url)) {
            url = mainfilepath.replace(/\/[^\/]*$/, url.replace(/^\/?/, "/"));
        }
        var _url = parseURL(url);
        var req = /^https?/i.test(_url.protocol) ? https : http;
        var onend = function () {
            var index = requestHandles.indexOf(abort);
            if (index >= 0) {
                requestHandles.splice(index, 1);
            }
        };
        var request = req.request(Object.assign({ method: "get" }, _url), function (res) {
            var result = [];
            var size = 0;
            res.on("data", function (buffer) {
                size += buffer.length;
                result.push(buffer);
            });
            res.once("end", function (event) {
                onend();
                onsuccess(Buffer.concat(result).toString());
            });
            res.once("abort", onend);
            res.once('timeout', function (event) {
                onend();
                onerror(event);
            });
            res.once("error", function (event) {
                onend();
                onerror(event);
            });
        });
        request.end();
        var abort = request.abort.bind(request);
        requestHandles.push(abort);
    }
    return request;
}
var timeoutHandles = {};
var intervalHandles = {};
var requestHandles = [];
function efront() {
    function Storage() { }
    Storage.prototype = {
        getItem() { },
        setItem() { }
    };

    var Window = function () {
    };
    Window.prototype = global;
    var window = new Window;
    Object.assign(window, {
        require,
        setTimeout(f, timerout) {
            var args = [].slice.call(arguments, 2);
            var handle = setTimeout(function () {
                delete timeoutHandles[handle];
                return f.apply(this, args);
            }, timerout);
            timeoutHandles[handle] = true;
            return handle;
        },
        setInterval(f, timerout) {
            var args = [].slice.call(arguments, 2);
            var handle = setInterval(function () {
                delete intervalHandles[handle];
                return f.apply(this, args);
            }, timerout);
            intervalHandles[handle] = true;
            return handle;
        },
        navigator: {
            userAgent,
            platform: os.platform()
        },
        clearTimeout(handle) {
            delete timeoutHandles[handle];
            return clearTimeout(handle);
        },
        clearInterval(handle) {
            delete intervalHandles[handle];
            return clearInterval(handle);
        }
    });
    window.top = window.window = window;
    return window;
}
module.exports = function (mainpath, args) {
    mainpath = mainpath.replace(/\.[cm]?[jt]sx?$/i, '');
    var unload = function () {
        Object.keys(intervalHandles).forEach(clearInterval);
        Object.keys(timeoutHandles).forEach(clearTimeout);
        requestHandles.splice(0, requestHandles.length).forEach(r => r());
    };
    var _mainpath = "./" + mainpath.replace(/\\/g, '/').replace(/^\.\//, '');
    var fullpath = require.resolve(_mainpath, resolve_config);
    var pathname = path.relative(mainpath.replace(/[^\\\/]+$/, ''), '.');
    pathname = path.join(fullpath, pathname);
    pathname = pathname.replace(/\\/g, '/').replace(/[^\/]+$/, '');
    var env = setupenv(pathname);
    var location = Object.freeze({
        pathname,
        reload() {
            unload();
            var window = efront();
            var getLoader;
            if (/^https?\:\/\//i.test(mainpath)) {
                getLoader = fromInternet.bind(env, mainpath);
            } else {
                getLoader = fromComponent.bind(env, '/');
            }
            window.request = getLoader();
            window.location = location;
            window.startPath = _mainpath.replace(/^\.[\/\\]/, '');
            window.process = Object.create(process);
            Object.assign(window.process, {
                argv: args
            });
            mainLoaderPromise.then(function (loader) {
                new Function(loader).call(window);
            }).catch(function (e) {
                console.log(e);
                console.error("启动失败");
            });
        }
    });
    location.reload();
};


text:
/**
 * Created with IntelliJ IDEA.
 * User: shanephelan
 * Date: 01/02/2014
 * Time: 15:35
 * To change this template use File | Settings | File Templates.
 */
(function(demo) {
    'use strict'

    var TimerModel = function() {
        this.callbacks = [];
        this.time = {};

        var i, l;

        setInterval(function() {
            this.update();
            i = 0;
            l = this.callbacks.length;
            for (; i < l;  i++) {
                this.callbacks[i](this.time);
            }
        }.bind(this), 1000 / TimerModel.FRAME_RATE);

        this.update();
    };

    TimerModel.FRAME_RATE = 25;

    TimerModel.prototype.update = function() {
        this.time.now = new Date();
        this.time.hours = this.time.now.getHours();
        this.time.minutes = this.time.now.getMinutes();
        this.time.seconds = this.time.now.getSeconds();
        this.time.milliseconds = this.time.now.getMilliseconds();
        this.time.day = this.time.now.getDay() + 1;
        this.time.date = this.time.now.getDate();
        this.time.month = this.time.now.getMonth() + 1;
    };

    TimerModel.prototype.add = function(callback) {
        this.callbacks.push(callback);
    };

    TimerModel.prototype.remove = function(callback) {
        this.callbacks.splice(this.callbacks.indexOf(callback), 1);
    };

    demo.TimerModel = TimerModel;
})(window.demo = window.demo || {});

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <group android:checkableBehavior="single">
        <item
            android:id="@+id/nav_menu_list_previous_data"
            android:title="过往数据"/>
        <item
            android:id="@+id/nav_menu_chart_real_time_data"
            android:title="实时监控" />
    </group>
</menu>


text: google-site-verification: googlead331ca6de5d0b50.html


text:
@interface HCHomeController : UIViewController

@end


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

	<modelVersion>4.0.0</modelVersion>
	<groupId>edu.utexas.ece</groupId>
	<artifactId>seal.haku.eclipsePlugin</artifactId>
	<version>0.0.1-SNAPSHOT</version>

	<dependencies>
		<dependency>
			<groupId>edu.utexas.ece</groupId>
			<artifactId>seal.haku.core</artifactId>
			<version>0.0.1-SNAPSHOT</version>
		</dependency>
		</dependencies>
</project>


text:
<!doctype html>

		<title>Zabuun - Learn Egyptian Arabic for English speakers</title>
		<meta name="description" content="">
		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/head.php';?>

		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/ie8.php';?>
		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/header.php';?>

			<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/side.php';?>

Essays > Putting Bunny to Sleep

						Expand All | Collapse All

Putting Bunny to Sleep

 Jim and Alicia both arrived at the same conclusion without very much discussion. When they took Bunny to the vet so that she could be put to sleep, Bugs went, too.

		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/footer.php';?>
		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/scripts.php';?>


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

package com.google.api.services.androidmanagement.v1.model;

/**
 * Policy for an individual app.
 *
 *
 This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Android Management API. For a detailed explanation
 * see:
 * https://developers.google.com/api-client-library/java/google-http-java-client/json
 *

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

  /**
   * List of the app's track IDs that a device belonging to the enterprise can access. If the list
   * contains multiple track IDs, devices receive the latest version among all accessible tracks. If
   * the list contains no track IDs, devices only have access to the app's production track. More
   * details about each track are available in AppTrackInfo.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> accessibleTrackIds;

  /**
   * Specifies whether the app is allowed networking when the VPN is not connected and
   * alwaysOnVpnPackage.lockdownEnabled is enabled. If set to VPN_LOCKDOWN_ENFORCED, the app is not
   * allowed networking, and if set to VPN_LOCKDOWN_EXEMPTION, the app is allowed networking. Only
   * supported on devices running Android 10 and above. If this is not supported by the device, the
   * device will contain a NonComplianceDetail with non_compliance_reason set to API_LEVEL and a
   * fieldPath. If this is not applicable to the app, the device will contain a NonComplianceDetail
   * with non_compliance_reason set to UNSUPPORTED and a fieldPath. The fieldPath is set to
   * applications[i].alwaysOnVpnLockdownExemption, where i is the index of the package in the
   * applications policy.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String alwaysOnVpnLockdownExemption;

  /**
   * Controls the auto-update mode for the app.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String autoUpdateMode;

  /**
   * Controls whether the app can communicate with itself across a device's work and personal
   * profiles, subject to user consent.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String connectedWorkAndPersonalApp;

  /**
   * The default policy for all permissions requested by the app. If specified, this overrides the
   * policy-level default_permission_policy which applies to all apps. It does not override the
   * permission_grants which applies to all apps.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String defaultPermissionPolicy;

  /**
   * The scopes delegated to the app from Android Device Policy.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> delegatedScopes;

  /**
   * Whether the app is disabled. When disabled, the app data is still preserved.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean disabled;

  /**
   * Configuration to enable this app as an extension app, with the capability of interacting with
   * Android Device Policy offline.This field can be set for at most one app.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private ExtensionConfig extensionConfig;

  /**
   * The type of installation to perform.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String installType;

  /**
   * Whether the app is allowed to lock itself in full-screen mode. DEPRECATED. Use InstallType
   * KIOSK or kioskCustomLauncherEnabled to to configure a dedicated device.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean lockTaskAllowed;

  /**
   * Managed configuration applied to the app. The format for the configuration is dictated by the
   * ManagedProperty values supported by the app. Each field name in the managed configuration must
   * match the key field of the ManagedProperty. The field value must be compatible with the type of
   * the ManagedProperty: *type* *JSON value* BOOL true or false STRING string INTEGER number CHOICE
   * string MULTISELECT array of strings HIDDEN string BUNDLE_ARRAY array of objects
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.Map<String, java.lang.Object> managedConfiguration;

  /**
   * The managed configurations template for the app, saved from the managed configurations iframe.
   * This field is ignored if managed_configuration is set.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private ManagedConfigurationTemplate managedConfigurationTemplate;

  /**
   * The minimum version of the app that runs on the device. If set, the device attempts to update
   * the app to at least this version code. If the app is not up-to-date, the device will contain a
   * NonComplianceDetail with non_compliance_reason set to APP_NOT_UPDATED. The app must already be
   * published to Google Play with a version code greater than or equal to this value. At most 20
   * apps may specify a minimum version code per policy.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer minimumVersionCode;

  /**
   * The package name of the app. For example, com.google.android.youtube for the YouTube app.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String packageName;

  /**
   * Explicit permission grants or denials for the app. These values override the
   * default_permission_policy and permission_grants which apply to all apps.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<PermissionGrant> permissionGrants;

  /**
   * List of the app's track IDs that a device belonging to the enterprise can access. If the list
   * contains multiple track IDs, devices receive the latest version among all accessible tracks. If
   * the list contains no track IDs, devices only have access to the app's production track. More
   * details about each track are available in AppTrackInfo.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getAccessibleTrackIds() {
    return accessibleTrackIds;
  }

  /**
   * List of the app's track IDs that a device belonging to the enterprise can access. If the list
   * contains multiple track IDs, devices receive the latest version among all accessible tracks. If
   * the list contains no track IDs, devices only have access to the app's production track. More
   * details about each track are available in AppTrackInfo.
   * @param accessibleTrackIds accessibleTrackIds or {@code null} for none
   */
  public ApplicationPolicy setAccessibleTrackIds(java.util.List<java.lang.String> accessibleTrackIds) {
    this.accessibleTrackIds = accessibleTrackIds;
    return this;
  }

  /**
   * Specifies whether the app is allowed networking when the VPN is not connected and
   * alwaysOnVpnPackage.lockdownEnabled is enabled. If set to VPN_LOCKDOWN_ENFORCED, the app is not
   * allowed networking, and if set to VPN_LOCKDOWN_EXEMPTION, the app is allowed networking. Only
   * supported on devices running Android 10 and above. If this is not supported by the device, the
   * device will contain a NonComplianceDetail with non_compliance_reason set to API_LEVEL and a
   * fieldPath. If this is not applicable to the app, the device will contain a NonComplianceDetail
   * with non_compliance_reason set to UNSUPPORTED and a fieldPath. The fieldPath is set to
   * applications[i].alwaysOnVpnLockdownExemption, where i is the index of the package in the
   * applications policy.
   * @return value or {@code null} for none
   */
  public java.lang.String getAlwaysOnVpnLockdownExemption() {
    return alwaysOnVpnLockdownExemption;
  }

  /**
   * Specifies whether the app is allowed networking when the VPN is not connected and
   * alwaysOnVpnPackage.lockdownEnabled is enabled. If set to VPN_LOCKDOWN_ENFORCED, the app is not
   * allowed networking, and if set to VPN_LOCKDOWN_EXEMPTION, the app is allowed networking. Only
   * supported on devices running Android 10 and above. If this is not supported by the device, the
   * device will contain a NonComplianceDetail with non_compliance_reason set to API_LEVEL and a
   * fieldPath. If this is not applicable to the app, the device will contain a NonComplianceDetail
   * with non_compliance_reason set to UNSUPPORTED and a fieldPath. The fieldPath is set to
   * applications[i].alwaysOnVpnLockdownExemption, where i is the index of the package in the
   * applications policy.
   * @param alwaysOnVpnLockdownExemption alwaysOnVpnLockdownExemption or {@code null} for none
   */
  public ApplicationPolicy setAlwaysOnVpnLockdownExemption(java.lang.String alwaysOnVpnLockdownExemption) {
    this.alwaysOnVpnLockdownExemption = alwaysOnVpnLockdownExemption;
    return this;
  }

  /**
   * Controls the auto-update mode for the app.
   * @return value or {@code null} for none
   */
  public java.lang.String getAutoUpdateMode() {
    return autoUpdateMode;
  }

  /**
   * Controls the auto-update mode for the app.
   * @param autoUpdateMode autoUpdateMode or {@code null} for none
   */
  public ApplicationPolicy setAutoUpdateMode(java.lang.String autoUpdateMode) {
    this.autoUpdateMode = autoUpdateMode;
    return this;
  }

  /**
   * Controls whether the app can communicate with itself across a device's work and personal
   * profiles, subject to user consent.
   * @return value or {@code null} for none
   */
  public java.lang.String getConnectedWorkAndPersonalApp() {
    return connectedWorkAndPersonalApp;
  }

  /**
   * Controls whether the app can communicate with itself across a device's work and personal
   * profiles, subject to user consent.
   * @param connectedWorkAndPersonalApp connectedWorkAndPersonalApp or {@code null} for none
   */
  public ApplicationPolicy setConnectedWorkAndPersonalApp(java.lang.String connectedWorkAndPersonalApp) {
    this.connectedWorkAndPersonalApp = connectedWorkAndPersonalApp;
    return this;
  }

  /**
   * The default policy for all permissions requested by the app. If specified, this overrides the
   * policy-level default_permission_policy which applies to all apps. It does not override the
   * permission_grants which applies to all apps.
   * @return value or {@code null} for none
   */
  public java.lang.String getDefaultPermissionPolicy() {
    return defaultPermissionPolicy;
  }

  /**
   * The default policy for all permissions requested by the app. If specified, this overrides the
   * policy-level default_permission_policy which applies to all apps. It does not override the
   * permission_grants which applies to all apps.
   * @param defaultPermissionPolicy defaultPermissionPolicy or {@code null} for none
   */
  public ApplicationPolicy setDefaultPermissionPolicy(java.lang.String defaultPermissionPolicy) {
    this.defaultPermissionPolicy = defaultPermissionPolicy;
    return this;
  }

  /**
   * The scopes delegated to the app from Android Device Policy.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getDelegatedScopes() {
    return delegatedScopes;
  }

  /**
   * The scopes delegated to the app from Android Device Policy.
   * @param delegatedScopes delegatedScopes or {@code null} for none
   */
  public ApplicationPolicy setDelegatedScopes(java.util.List<java.lang.String> delegatedScopes) {
    this.delegatedScopes = delegatedScopes;
    return this;
  }

  /**
   * Whether the app is disabled. When disabled, the app data is still preserved.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getDisabled() {
    return disabled;
  }

  /**
   * Whether the app is disabled. When disabled, the app data is still preserved.
   * @param disabled disabled or {@code null} for none
   */
  public ApplicationPolicy setDisabled(java.lang.Boolean disabled) {
    this.disabled = disabled;
    return this;
  }

  /**
   * Configuration to enable this app as an extension app, with the capability of interacting with
   * Android Device Policy offline.This field can be set for at most one app.
   * @return value or {@code null} for none
   */
  public ExtensionConfig getExtensionConfig() {
    return extensionConfig;
  }

  /**
   * Configuration to enable this app as an extension app, with the capability of interacting with
   * Android Device Policy offline.This field can be set for at most one app.
   * @param extensionConfig extensionConfig or {@code null} for none
   */
  public ApplicationPolicy setExtensionConfig(ExtensionConfig extensionConfig) {
    this.extensionConfig = extensionConfig;
    return this;
  }

  /**
   * The type of installation to perform.
   * @return value or {@code null} for none
   */
  public java.lang.String getInstallType() {
    return installType;
  }

  /**
   * The type of installation to perform.
   * @param installType installType or {@code null} for none
   */
  public ApplicationPolicy setInstallType(java.lang.String installType) {
    this.installType = installType;
    return this;
  }

  /**
   * Whether the app is allowed to lock itself in full-screen mode. DEPRECATED. Use InstallType
   * KIOSK or kioskCustomLauncherEnabled to to configure a dedicated device.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getLockTaskAllowed() {
    return lockTaskAllowed;
  }

  /**
   * Whether the app is allowed to lock itself in full-screen mode. DEPRECATED. Use InstallType
   * KIOSK or kioskCustomLauncherEnabled to to configure a dedicated device.
   * @param lockTaskAllowed lockTaskAllowed or {@code null} for none
   */
  public ApplicationPolicy setLockTaskAllowed(java.lang.Boolean lockTaskAllowed) {
    this.lockTaskAllowed = lockTaskAllowed;
    return this;
  }

  /**
   * Managed configuration applied to the app. The format for the configuration is dictated by the
   * ManagedProperty values supported by the app. Each field name in the managed configuration must
   * match the key field of the ManagedProperty. The field value must be compatible with the type of
   * the ManagedProperty: *type* *JSON value* BOOL true or false STRING string INTEGER number CHOICE
   * string MULTISELECT array of strings HIDDEN string BUNDLE_ARRAY array of objects
   * @return value or {@code null} for none
   */
  public java.util.Map<String, java.lang.Object> getManagedConfiguration() {
    return managedConfiguration;
  }

  /**
   * Managed configuration applied to the app. The format for the configuration is dictated by the
   * ManagedProperty values supported by the app. Each field name in the managed configuration must
   * match the key field of the ManagedProperty. The field value must be compatible with the type of
   * the ManagedProperty: *type* *JSON value* BOOL true or false STRING string INTEGER number CHOICE
   * string MULTISELECT array of strings HIDDEN string BUNDLE_ARRAY array of objects
   * @param managedConfiguration managedConfiguration or {@code null} for none
   */
  public ApplicationPolicy setManagedConfiguration(java.util.Map<String, java.lang.Object> managedConfiguration) {
    this.managedConfiguration = managedConfiguration;
    return this;
  }

  /**
   * The managed configurations template for the app, saved from the managed configurations iframe.
   * This field is ignored if managed_configuration is set.
   * @return value or {@code null} for none
   */
  public ManagedConfigurationTemplate getManagedConfigurationTemplate() {
    return managedConfigurationTemplate;
  }

  /**
   * The managed configurations template for the app, saved from the managed configurations iframe.
   * This field is ignored if managed_configuration is set.
   * @param managedConfigurationTemplate managedConfigurationTemplate or {@code null} for none
   */
  public ApplicationPolicy setManagedConfigurationTemplate(ManagedConfigurationTemplate managedConfigurationTemplate) {
    this.managedConfigurationTemplate = managedConfigurationTemplate;
    return this;
  }

  /**
   * The minimum version of the app that runs on the device. If set, the device attempts to update
   * the app to at least this version code. If the app is not up-to-date, the device will contain a
   * NonComplianceDetail with non_compliance_reason set to APP_NOT_UPDATED. The app must already be
   * published to Google Play with a version code greater than or equal to this value. At most 20
   * apps may specify a minimum version code per policy.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getMinimumVersionCode() {
    return minimumVersionCode;
  }

  /**
   * The minimum version of the app that runs on the device. If set, the device attempts to update
   * the app to at least this version code. If the app is not up-to-date, the device will contain a
   * NonComplianceDetail with non_compliance_reason set to APP_NOT_UPDATED. The app must already be
   * published to Google Play with a version code greater than or equal to this value. At most 20
   * apps may specify a minimum version code per policy.
   * @param minimumVersionCode minimumVersionCode or {@code null} for none
   */
  public ApplicationPolicy setMinimumVersionCode(java.lang.Integer minimumVersionCode) {
    this.minimumVersionCode = minimumVersionCode;
    return this;
  }

  /**
   * The package name of the app. For example, com.google.android.youtube for the YouTube app.
   * @return value or {@code null} for none
   */
  public java.lang.String getPackageName() {
    return packageName;
  }

  /**
   * The package name of the app. For example, com.google.android.youtube for the YouTube app.
   * @param packageName packageName or {@code null} for none
   */
  public ApplicationPolicy setPackageName(java.lang.String packageName) {
    this.packageName = packageName;
    return this;
  }

  /**
   * Explicit permission grants or denials for the app. These values override the
   * default_permission_policy and permission_grants which apply to all apps.
   * @return value or {@code null} for none
   */
  public java.util.List<PermissionGrant> getPermissionGrants() {
    return permissionGrants;
  }

  /**
   * Explicit permission grants or denials for the app. These values override the
   * default_permission_policy and permission_grants which apply to all apps.
   * @param permissionGrants permissionGrants or {@code null} for none
   */
  public ApplicationPolicy setPermissionGrants(java.util.List<PermissionGrant> permissionGrants) {
    this.permissionGrants = permissionGrants;
    return this;
  }

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

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

}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace XnaFlash.Actions.Objects
{
    public class Array : ActionObject
    {
        public Array(params ActionVar[] vars) { }

        protected override string AsString()
        {
            return "[array]";
        }
    }
}


text:
import ATV from 'atvjs';
import template from './template.hbs';
import API from 'lib/api';

var MovieDetailsPage = ATV.Page.create({
	name: 'movie-details',
	template: template,
	ready(options, resolve, reject) {
		let movieId = options.id;

		ATV.Ajax
			.get(API.movieDetails(movieId))
			.then((xhr) => {
				resolve(xhr.response);
			}, (xhr) => {
				// error
				reject();
			})
	}
});

export default MovieDetailsPage;


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>org.apache.guacamole.net.auth.permission (guacamole-ext 0.9.13-incubating API)</title>
<meta name="date" content="2017-07-02">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Package

Next Package

Frames

No Frames

All Classes

Package org.apache.guacamole.net.auth.permission

Provides classes which describe the various permissions a Guacamole user
 can be granted.

See: Description

Interface Summary

Interface
Description

ObjectPermissionSet

A set of permissions which affect arbitrary objects, where each object has
 an associated unique identifier.

Permission<Type extends Enum>

A permission which affects a specific type of operation, where all available
 operation types are defined by an enumeration.

PermissionSet<PermissionType extends Permission>

An arbitrary set of permissions.

SystemPermissionSet

A set of permissions which affects the system as a whole.

Class Summary

Class
Description

ObjectPermission

A permission which affects a specific object, rather than the system as a
 whole.

SystemPermission

A permission which affects the system as a whole, rather than an individual
 object.

Enum Summary

Enum
Description

ObjectPermission.Type

Specific types of object-level permissions.

SystemPermission.Type

Specific types of system-level permissions.

Package org.apache.guacamole.net.auth.permission Description

Provides classes which describe the various permissions a Guacamole user
 can be granted.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Package

Next Package

Frames

No Frames

All Classes

Copyright © 2017. All rights reserved.


text:
FactoryGirl.define do
  factory :contributor do
    sequence(:name) { |n| "Contributor #{n}" }

    factory :deleted_contributor do
      status "Deleted"
    end
  end
end


text:
package com.googlecode.totallylazy.template.ast;

import com.googlecode.totallylazy.Value;

public class Name extends Value.Type<String> implements Expression {
    private Name(String value) { super(value); }

    public static Name name(String value) {return new Name(value);}
}


text:
 // The camera overlay I want displayed over the camera
    var camera_overlay = Ti.UI.createView({
        top : 0,
        left : 0,
        height : Ti.UI.FILL,
        width : Ti.UI.FILL
    });

    var take_picture = Ti.UI.createButton({
        height : Ti.UI.SIZE,
        width : Ti.UI.SIZE,
        bottom : 50,
        title : 'Take Picture'
    });

    take_picture.addEventListener('click', function() {
        Ti.Media.takePicture();
    });

if (Ti.Geolocation.locationServicesEnabled) {
    Ti.Geolocation.purpose = 'Get Current Heading';

    // make a single request for the current heading
    Ti.Geolocation.getCurrentHeading(function(e) {
        Ti.API.info(e.heading);
    });

    // Set 'heading' event for continual monitoring
    Ti.Geolocation.addEventListener('heading', function(e) {
        if (e.error) {
            alert('Error: ' + e.error);
        } else {
            //Ti.API.info("heading="+e.heading);
           // Ti.API.info("trueheading="+e.heading.trueHeading);
           //  $.magheading.setText(e.heading.magneticHeading);
            // $.heading.setText(e.heading.trueHeading);
             var magheading=e.heading.magneticHeading;
             var direction;

            if(magheading>337 || magheading < 22)
           		direction="N";
           	else if(magheading > 292)
           		direction="NW";
           	else if(magheading > 247)
           		direction="W";
           	else if(magheading > 202)
           		direction="SW";
           	else if(magheading > 157)
           		direction="S";
           	else if(magheading > 112)
           		direction="SE";
           	else if(magheading > 67)
           		direction="E";
           	else
           		direction="NE";
           		//$.direction.setText(direction);

           	 take_picture.setTitle(direction);
        }
    });
} else {
    alert('Please enable location services');
}
   // take_picture.setTitle("TEST");

    camera_overlay.add(take_picture);

    // The actual show camera part
    Ti.Media.showCamera({
        success : function(e) {
            alert('success');
            // I want this!
        },
        cancel : function(e) {
        },
        error : function(error) {
        },
        autohide : false,
        showControls : false,
        mediaTypes : [Ti.Media.MEDIA_TYPE_PHOTO],
        overlay : camera_overlay // The camera overlay being added to camera view
    });
//$.showwin.open();


text: xtianjohns.github.io


text:
'use strict';

const mongoose = require('../mongo');

var userSchema = new mongoose.Schema({
    name: {
        type: String,
        required: true,
        trim: true,
        notEmpty: true
    },
    avatar: {
        type: String,
        required: true,
        trim: true,
        notEmpty: true
    }
});

module.exports = mongoose.model('User', userSchema);


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

  <meta http-equiv="content-type" content=""/>
  <title>Axis2 Configuration Documents</title>

Axis2 Configuration Guide

In Axis2, there are three kinds of configuration files to configure the
system. The first one is to configure the whole system (global
configuration), the second one is to configure a service (service
configuration), and the third one is to configure a module (module
configuration). This document explains the above configurations in detail.

Content

Global Configuration
  (axis2.xml)

Service Configuration
    (services.xml)

Module Configuration
  (module.xml)

Global Configuration

Writing axis2.xml

All the configurations that require starting Axis2 are obtained from
axis2.xml. The way to specify them is extremely simple and easy. The document
is all about the proper way of specifying the configurations in axis2.xml.
There are six top level elements that can be seen in the configuration file
and can be listed as follows:

Parameter

Transport Receiver

Transport Sender

Phase Order

Module References

Listeners (Observers)

Parameter

In Axis2, a parameter is nothing but a name-value pair. Each and every top
level parameter available in the axis2.xml (direct sub elements of the root
element) will be transformed into properties in AxisConfiguration. Therefore,
the top level parameters in the configuration document can be accessed via
AxisConfiguration in the running system. The correct way of defining a
parameter is shown below:

<parameter name="name of the parameter" >parameter value </parameter>

Transport Receiver

Depending on the underlying transport on which Axis2 is going to run, you
need to have different transport receivers. The way you add them to the
system is as follows:

<transportReceiver name="http" class="org.apache.axis2.transport.http.SimpleHTTPServer">
    <parameter name="port" >6060</parameter>
</transportReceiver>

The above elements show how to define transport receivers in
axis2.xml. Here the "name" attribute of the <transportReceiver/> element identifies the
type of the transport receiver. It can be HTTP, TCP, SMTP, CommonsHTTP, etc.
When the system starts up or when you set the transport at the client side,
you can use these transport names to load the appropriate transport. The "class"
attribute is for specifying the actual java class that will implement the required
interfaces for the transport. Any transport can have zero or more parameters,
and any parameters given can be accessed via the corresponding
transport receiver.

Transport Sender

Just like the transport receivers, you can register transport senders in the
system, and later at run time, the senders can be used to send the messages.
For example, consider Axis2 running under Apache Tomcat. Then Axis2 can use
TCP transport senders to send messages rather than HTTP. The method of
specifying transport senders is as follows:

<transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
        <parameter name="PROTOCOL" locked="xsd:false">HTTP/1.0</parameter>
 </transportSender>

name: Name of the transport (you can have HTTP and HTTP1 as
the transport name)

class: Implementation class of the corresponding
transport.

Just like the transport receivers, transport senders can have zero
or more parameters, and if there are any, they can be accessed via the
corresponding transport sender.

Phase Order

Specifying the order of phases in the execution chain has to be done using
the phase order element. It will look as follows:

<phaseOrder type="InFlow">
         <phase name="TransportIn"/>
         .
         .
</phaseOrder>

The most interesting thing is that you can add handlers here as well. If
you want to add a handler that should go into that phase, you can directly do
that by adding a handler element into it. In addition to that, there is no
hard coding work for the handler chain anywhere in Axis2 (at any Axis*). So
all those configurations are also done in the phase order element. The
complete configurations will look as follows:

<phaseOrder type="InFlow">
        <!--   Global phases    -->
         <phase name="Transport">
            <handler name="RequestURIBasedDispatcher"
                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
                <order phase="Transport"/>
            </handler>

            <handler name="SOAPActionBasedDispatcher"
                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
                <order phase="Transport"/>
            </handler>
        </phase>
        <phase name="Security"/>
        <phase name="PreDispatch"/>
        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
            <handler name="AddressingBasedDispatcher"
                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
                <order phase="Dispatch"/>
            </handler>

            <handler name="SOAPMessageBodyBasedDispatcher"
                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher">
                <order phase="Dispatch"/>
            </handler>

            <handler name="InstanceDispatcher"
                     class="org.apache.axis2.engine.InstanceDispatcher">
                <order phase="Dispatch"/>
            </handler>
        </phase>
        <!--   Global phases   -->
        <!--   After the Dispatch phase module author or service author can add any phase he wants    -->
        <phase name="OperationInPhase"/>
    </phaseOrder>
    <phaseOrder type="OutFlow">
        <!--   user can add his own phases to this area  -->
        <phase name="OperationOutPhase"/>
        <!--  Global phases  -->
        <!--  these phases will run irrespective of the service  -->
        <phase name="MessageOut"/>
        <phase name="PolicyDetermination"/>
    </phaseOrder>
    <phaseOrder type="InFaultFlow">
        <phase name="PreDispatch"/>
        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
            <handler name="RequestURIBasedDispatcher"
                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
                <order phase="Dispatch"/>
            </handler>

            <handler name="SOAPActionBasedDispatcher"
                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
                <order phase="Dispatch"/>
            </handler>

            <handler name="AddressingBasedDispatcher"
                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
                <order phase="Dispatch"/>
            </handler>

            <handler name="SOAPMessageBodyBasedDispatcher"
                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher">
                <order phase="Dispatch"/>
            </handler>
            <handler name="InstanceDispatcher"
                     class="org.apache.axis2.engine.InstanceDispatcher">
                <order phase="Dispatch"/>
            </handler>
        </phase>
        <!--      user can add his own phases to this area  -->
        <phase name="OperationInFaultPhase"/>
    </phaseOrder>
    <phaseOrder type="OutFaultFlow">
        <!--      user can add his own phases to this area  -->
        <phase name="OperationOutFaultPhase"/>
        <phase name="PolicyDetermination"/>
        <phase name="MessageOut"/>
    </phaseOrder>

type: the attribute represents the type of the flow. It
can only be one of the following:

InFlow

OutFlow

InFaultFlow

OutFaultFlow

In addition to that, the only child element that is allowed inside
"phaseOrder" is the "phase" element which represents the available phases in
the execution chain. The method of specifying phases inside "phaseOrder" is
as follows:

<phase name="Transport"/>

name: Name of the phase.

There are a number of things that one has to keep in mind when changing a
phaseOrder:

For the phaseOrder types "InFlow" and
"InFaultFlow"

All the phases that are above the "Dispatch" phase, including the
    "Dispatch" phase, are known as "Global phases" . You can add any number
    of new phases here and they will be considered global.

In these two phaseOrder types, the phases added after the "Dispatch"
    phase are known as "Operation phases".

For the phaseOrder types "OutFlow" and
"OutFaultFlow"

All the phases that are below the "MessageOut" phase, including the
    "MessageOut" phase, are known as "Global phases". You can add new phases
    according to your requirement.

The phases added before the "MessageOut" phase are known as "Operation
    phases".

Note : If you look closely at the default axis2.xml,
  you will be able to clearly identify it.

Module References

If you want to engage a module, system wide, you can do it by adding a top
level module element in axis2.xml. It should look as follows:

<module ref="addressing"/>

ref: the module name which is going to be engaged, system
wide.

Listeners (Observers)

In Axis2, AxisConfiguration is observable so that you can register
observers into that. They will be automatically informed whenever a change
occurs in AxisConfiguration. In the current implementation, the observers are
informed of the following events:

Deploying a Service

Removing a service

Activate/Inactivate Service

Module deploy

Module remove

Registering Observers is very useful for additional features such as RSS
feed generation, which will provide service information to subscribers. The
correct way of registering observers should as follows:

<listener class="org.apache.axis2.ObserverIMPL">
    <parameter name="RSS_URL" >http://127.0.0.1/rss</parameter>
</listener>

class: Represents an Implementation class of observer,
and it should be noted that the Implementation class should implement
AxisObserver interface, and the class has to be available in the classpath.

Service Configuration

Writing services.xml

The description of services are specified using services.xml. Each
service archive file needs to have a services.xml in order to be a valid
service and it should be available in the META-INF directory of the archive
file. A very simple services.xml is shown below:

<service name="name of the service" scope="name of the scope" class="full qualifide name the service lifecycle class"   targetNamespace="target namespase for the service">
    <Description> The description of the service  </Description>

    <transports>
        <transport>HTTP</transport>
    </transports>

    <schema schemaNamespace="schema namespace"/>

    <messageReceivers>
            <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
                             class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
    </messageReceivers>

    <parameter name="ServiceClass" locked="xsd:false">org.apache.axis2.sample.echo.EchoImpl</parameter>

    <operation name="echoString" mep="operation MEP">
        <actionMapping>Mapping to action</actionMapping>
        <module ref=" a module name "/>
        <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
    </operation>
</service>

name: The service name will be the name of the archive
file if the .aar file contains only one service, or else the name of the
service will be the name given by the name attribute.

scope: (Optional Attribute) The time period during which
runtime information of the deployed services will be available. Scope is of
several types- "application", "soapsession", "transportsession", "request".
The default value (if you don't enter any value) will be "request"

class: (Optional attribute) The full qualified name of
the service lifecycle implementation class. ServiceLifeCycle class is useful
when you want to do some tasks when the system starts and when it
shuts down.

targetNamespace: (Optional Attribute) Target name space
of the service. This value will be used when generating the WSDL. If you do
not specify this value, the value will be calculated from the package name of
the service impl class.

Description: (Optional) If you want to display any
description about the service via Axis2 web-admin module, then the
description can be specified here.

transports : (Optional) The transports to which the
service is going to be exposed. If the transport element is not present, then
the service will be exposed in all the transports available in the system.
The transport child element specifies the transport prefix (the name of the
transport specified in axis2.xml).

parameters: A services.xml can have any number of top level
parameters and all the specified parameters will be transformed into service
properties in the corresponding AxisService. There is a compulsory parameter
in services.xml called ServiceClass that specifies the Java class, which
performs the above transformation. This class is loaded by the
MessageReceiver.

operations : If the service impl class is Java, then all the public
methods in that service will be exposed. If the user wants to override it, he
has to add the "operation" tag and override it. In a non-Java scenario or if
you do not have a service class, then all the operations the user wants to
expose by the service has to be indicated in the services.xml. It is
specified as follows:

    <operation name="echoString">
        <module ref=" a module name "/>
        <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
    </operation>

The only compulsory attribute here is "name", which represents the
operation name that is going to be exposed. Any operation can contain module
references as well as any number of parameters. The most interesting thing is
that you can register custom message receivers per operation. Then the
registered message receiver will be the message receiver for the
corresponding operation. If you do not specify the message receiver, then the
default message receiver will perform the operation.

Module Configuration

Writing module.xml

The description of the module is specified using the module.xml. Each
module archive file needs to have a module.xml in order to be a valid module,
and it should be available in the META-INF directory of the archive file.

A very simple module.xml is shown below:

<module class="org.apache.module.Module1Impl">
    <InFlow>
        .
        .
    </InFlow>
    <OutFlow>
        .
        .
    </OutFlow>

    <OutFaultFlow>
        .
        .
    </OutFaultFlow>

    <InFaultFlow>
        .
        .
    </InFaultFlow>

    <operation name="creatSeq" mep="MEP_URI_IN_OUT">
        <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
        <parameter name="para1" locked="xsd:true">10</parameter>
    </operation>
</module>

class: (Optional attribute) Indicates the module
implementation class. A module may or may not contain a module implementation
class since the module can also be a collection of handlers. If a module
contains an implementation class that implements the
org.apache.axis2.modules.Module interface at deployment, its
init(); method will be called.

parameter: A module can contain any number of parameters and all
the listed parameters in the module.xml will be transformed into the
corresponding AxisModule of the module.

flow: Defining of handlers in a module has to be done inside flows.
There are four types of flows as listed below.

You can add any number of handlers into a flow, and those handlers will be
available in the corresponding chains at runtime, when they are engaged.

InFlow

OutFlow

InFaultFlow

OutFaultFlow

operations:  If a module wants to add an operation when it is
engaged into a service, it can be done by adding an operation tag in
module.xml. The method of specifying the operation is the same as operation
in services.xml.

handler: The Handler element consists of compulsory and optional
attributes. The method of defining a handler will look as follows:

<handler name="handler1" class="handlerClass ">
            <order phase="userphase1" />
</handler>

Compulsory Attributes

name: Name of the handler.

class: Handler implementation class.

phase: Name of the phase that the handler should remain, in the
execution chain.

Optional Attributes :

phaseLast: Indicates that the handler is the last handler of the
phase.

phaseFirst: Indicate that the handler is the first handler of the
phase.

before : Indicates that the current handler should be invoked before
the handler specified by the before handler

after: Indicates that the current handler should be invoked after the
handler specified by the after handler


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Source code</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

001
025package org.slf4j.cal10n;
026
027import org.slf4j.Logger;
028import org.slf4j.Marker;
029import org.slf4j.MarkerFactory;
030import org.slf4j.ext.LoggerWrapper;
031import org.slf4j.spi.LocationAwareLogger;
032
033import ch.qos.cal10n.IMessageConveyor;
034import ch.qos.cal10n.MessageParameterObj;
035
036/**
037 * A logger specialized in localized logging. Localization is based in the <a
038 * href="http://cal10n.qos.ch">CAL10N project</p>.
039 *
040 * @author Ceki G&uuml;lc&uuml;
041 */
042public class LocLogger extends LoggerWrapper implements Logger {
043
044    private static final String FQCN = LocLogger.class.getName();
045
046    /**
047     * Every localized message logged by a LocLogger will bear this marker. It
048     * allows marker-aware implementations to perform additional processing on
049     * localized messages.
050     */
051    static Marker LOCALIZED = MarkerFactory.getMarker("LOCALIZED");
052
053    final IMessageConveyor imc;
054
055    public LocLogger(Logger logger, IMessageConveyor imc) {
056        super(logger, LoggerWrapper.class.getName());
057        if (imc == null) {
058            throw new IllegalArgumentException("IMessageConveyor cannot be null");
059        }
060        this.imc = imc;
061    }
062
063    /**
064     * Log a localized message at the TRACE level.
065     *
066     * @param key
067     *          the key used for localization
068     * @param args
069     *          optional arguments
070     */
071    public void trace(Enum<?> key, Object... args) {
072        if (!logger.isTraceEnabled()) {
073            return;
074        }
075        String translatedMsg = imc.getMessage(key, args);
076        MessageParameterObj mpo = new MessageParameterObj(key, args);
077
078        if (instanceofLAL) {
079            ((LocationAwareLogger) logger).log(LOCALIZED, FQCN, LocationAwareLogger.TRACE_INT, translatedMsg, args, null);
080        } else {
081            logger.trace(LOCALIZED, translatedMsg, mpo);
082        }
083    }
084
085    /**
086     * Log a localized message at the DEBUG level.
087     *
088     * @param key
089     *          the key used for localization
090     * @param args
091     *          optional arguments
092     */
093    public void debug(Enum<?> key, Object... args) {
094        if (!logger.isDebugEnabled()) {
095            return;
096        }
097        String translatedMsg = imc.getMessage(key, args);
098        MessageParameterObj mpo = new MessageParameterObj(key, args);
099
100        if (instanceofLAL) {
101            ((LocationAwareLogger) logger).log(LOCALIZED, FQCN, LocationAwareLogger.DEBUG_INT, translatedMsg, args, null);
102        } else {
103            logger.debug(LOCALIZED, translatedMsg, mpo);
104        }
105    }
106
107    /**
108     * Log a localized message at the INFO level.
109     *
110     * @param key
111     *          the key used for localization
112     * @param args
113     *          optional arguments
114     */
115    public void info(Enum<?> key, Object... args) {
116        if (!logger.isInfoEnabled()) {
117            return;
118        }
119        String translatedMsg = imc.getMessage(key, args);
120        MessageParameterObj mpo = new MessageParameterObj(key, args);
121
122        if (instanceofLAL) {
123            ((LocationAwareLogger) logger).log(LOCALIZED, FQCN, LocationAwareLogger.INFO_INT, translatedMsg, args, null);
124        } else {
125            logger.info(LOCALIZED, translatedMsg, mpo);
126        }
127    }
128
129    /**
130     * Log a localized message at the WARN level.
131     *
132     * @param key
133     *          the key used for localization
134     * @param args
135     *          optional arguments
136     */
137    public void warn(Enum<?> key, Object... args) {
138        if (!logger.isWarnEnabled()) {
139            return;
140        }
141        String translatedMsg = imc.getMessage(key, args);
142        MessageParameterObj mpo = new MessageParameterObj(key, args);
143
144        if (instanceofLAL) {
145            ((LocationAwareLogger) logger).log(LOCALIZED, FQCN, LocationAwareLogger.WARN_INT, translatedMsg, args, null);
146        } else {
147            logger.warn(LOCALIZED, translatedMsg, mpo);
148        }
149    }
150
151    /**
152     * Log a localized message at the ERROR level.
153     *
154     * @param key
155     *          the key used for localization
156     * @param args
157     *          optional arguments
158     */
159    public void error(Enum<?> key, Object... args) {
160        if (!logger.isErrorEnabled()) {
161            return;
162        }
163        String translatedMsg = imc.getMessage(key, args);
164        MessageParameterObj mpo = new MessageParameterObj(key, args);
165
166        if (instanceofLAL) {
167            ((LocationAwareLogger) logger).log(LOCALIZED, FQCN, LocationAwareLogger.ERROR_INT, translatedMsg, args, null);
168        } else {
169            logger.error(LOCALIZED, translatedMsg, mpo);
170        }
171    }
172
173}


text:
import Ember from 'ember';
import layout from '../templates/components/ember-form-master-2000/fm-submit';

export default Ember.Component.extend({
  layout: layout,
  classNameBindings: ['wrapperClass'],
  fmConfig: Ember.inject.service('fm-config'),
  init: function() {
    this._super(this);
  },
  submitButtonClass: Ember.computed.reads('fmConfig.submitButtonClass'),
  wrapperClass: Ember.computed.reads('fmConfig.wrapperClass'),
  tagName: 'div'
});


text:
package sync

import (
	"sync/atomic"
	"unsafe"
)

// A Mutex is a mutual exclusion lock.
// Mutexes can be created as part of other structures;
// the zero value for a Mutex is an unlocked mutex.
type Mutex struct {
	state int32
	sema  uint32
}

// A Locker represents an object that can be locked and unlocked.
type Locker interface {
	Lock()
	Unlock()
}

const (
	mutexLocked = 1 << iota // mutex is locked
	mutexWoken
	mutexWaiterShift = iota
)

// Lock locks m.
// If the lock is already in use, the calling goroutine
// blocks until the mutex is available.
func (m *Mutex) Lock() {
	// Fast path: grab unlocked mutex.
	if atomic.CompareAndSwapInt32(&m.state, 0, mutexLocked) {
		if raceenabled {
			raceAcquire(unsafe.Pointer(m))
		}
		return
	}

	awoke := false
	iter := 0
	for {
		old := m.state
		new := old | mutexLocked
		if old&mutexLocked != 0 {
			if runtime_canSpin(iter) {
				// Active spinning makes sense.
				// Try to set mutexWoken flag to inform Unlock
				// to not wake other blocked goroutines.
				if !awoke && old&mutexWoken == 0 && old>>mutexWaiterShift != 0 &&
					atomic.CompareAndSwapInt32(&m.state, old, old|mutexWoken) {
					awoke = true
				}
				runtime_doSpin()
				iter++
				continue
			}
			new = old + 1<<mutexWaiterShift
		}
		if awoke {
			// The goroutine has been woken from sleep,
			// so we need to reset the flag in either case.
			if new&mutexWoken == 0 {
				panic("sync: inconsistent mutex state")
			}
			new &^= mutexWoken
		}
		if atomic.CompareAndSwapInt32(&m.state, old, new) {
			if old&mutexLocked == 0 {
				break
			}
			runtime_Semacquire(&m.sema)
			awoke = true
			iter = 0
		}
	}

	if raceenabled {
		raceAcquire(unsafe.Pointer(m))
	}
}

// Unlock unlocks m.
// It is a run-time error if m is not locked on entry to Unlock.
//
// A locked Mutex is not associated with a particular goroutine.
// It is allowed for one goroutine to lock a Mutex and then
// arrange for another goroutine to unlock it.
func (m *Mutex) Unlock() {
	if raceenabled {
		_ = m.state
		raceRelease(unsafe.Pointer(m))
	}

	// Fast path: drop lock bit.
	new := atomic.AddInt32(&m.state, -mutexLocked)
	if (new+mutexLocked)&mutexLocked == 0 {
		panic("sync: unlock of unlocked mutex")
	}

	old := new
	for {
		// If there are no waiters or a goroutine has already
		// been woken or grabbed the lock, no need to wake anyone.
		if old>>mutexWaiterShift == 0 || old&(mutexLocked|mutexWoken) != 0 {
			return
		}
		// Grab the right to wake someone.
		new = (old - 1<<mutexWaiterShift) | mutexWoken
		if atomic.CompareAndSwapInt32(&m.state, old, new) {
			runtime_Semrelease(&m.sema)
			return
		}
		old = m.state
	}
}


text:
namespace node_mdns {

using namespace v8;

inline
const char *
errorString(DNSServiceErrorType error) {
    switch (error) {
        case kDNSServiceErr_NoError:
            return "NoError";
        case kDNSServiceErr_Unknown:
            return "Unknown";
        case kDNSServiceErr_NoSuchName:
            return "NoSuchName";
        case kDNSServiceErr_NoMemory:
            return "NoMemory";
        case kDNSServiceErr_BadParam:
            return "BadParam";
        case kDNSServiceErr_BadReference:
            return "BadReference";
        case kDNSServiceErr_BadState:
            return "BadState";
        case kDNSServiceErr_BadFlags:
            return "BadFlags";
        case kDNSServiceErr_Unsupported:
            return "Unsupported";
        case kDNSServiceErr_NotInitialized:
            return "NotInitialized";
        case kDNSServiceErr_AlreadyRegistered:
            return "AlreadyRegistered";
        case kDNSServiceErr_NameConflict:
            return "NameConflict";
        case kDNSServiceErr_Invalid:
            return "Invalid";
        case kDNSServiceErr_Firewall:
            return "Firewall";
        case kDNSServiceErr_Incompatible:
            return "Incompatible";
        case kDNSServiceErr_BadInterfaceIndex:
            return "BadInterfaceIndex";
        case kDNSServiceErr_Refused:
            return "Refused";
        case kDNSServiceErr_NoSuchRecord:
            return "NoSuchRecord";
        case kDNSServiceErr_NoAuth:
            return "NoAuth";
        case kDNSServiceErr_NoSuchKey:
            return "NoSuchKey";
        case kDNSServiceErr_NATTraversal:
            return "NATTraversal";
        case kDNSServiceErr_DoubleNAT:
            return "DoubleNAT";
        case kDNSServiceErr_BadTime:
            return "BadTime";
#if 0 // missing on linux ...
        case kDNSServiceErr_BadSig:
            return "BadSig";
        case kDNSServiceErr_BadKey:
            return "BadKey";
        case kDNSServiceErr_Transient:
            return "Transient";
        case kDNSServiceErr_ServiceNotRunning:
            return "ServiceNotRunning";
        case kDNSServiceErr_NATPortMappingUnsupported:
            return "NATPortMappingUnsupported";
        case kDNSServiceErr_NATPortMappingDisabled:
            return "NATPortMappingDisabled";
#if 0 // missing on leopard
        case kDNSServiceErr_NoRouter:
            return "NoRouter";
        case kDNSServiceErr_PollingMode:
            return "PollingMode";
#endif
#endif
    };
    return "Unknown DNSServiceError";
}

Local<Value>
buildException(DNSServiceErrorType error_code) {
    HandleScope scope;

    std::string error_str("DNSServiceError: ");
    error_str += errorString(error_code);
    Local<String> error_msg = String::New(error_str.c_str());
    Local<Value> error_v = Exception::Error(error_msg);
    Local<Object> error = Local<Object>::Cast(error_v);
    return scope.Close(error);
}

}


text:
export const UPDATE_FILTER = Symbol('update filter')

export function updateFilter(key, value) {
  return {
    type: UPDATE_FILTER,
    key,
    value
  }
}


text:
import './module.js';

import { get as getProj } from 'ol/proj';
import MousePosition from 'ol/control/MousePosition';

angular.module('anol.mouseposition')

/**
 * @ngdoc directive
 * @name anol.mouseposition.directive:anolMousePosition
 *
 * @requires $compile
 * @requires anol.map.MapService
 * @requires anol.map.ControlsService
 *
 * @param {number@} precision Number of decimal digets coordinates are round to
 * @param {projectionCode=} Variable containing projection coordinates are displayed in
 *
 * @description
 * Shows current mouse position in map units in container or
 * in map if directive devined in `anolMapDirective`
 *
 * *anolMousePosition* have to contain a format string for displaying coordinates.
 * Therefor *anolMousePosition* prepate 3 variables to be placed in format string.
 * - *x* for x-position
 * - *y* for y-position
 * - *mapUnits* for current map units
 *
 *  @example
 * ```html
    <div anol-mouse-position >{{x}} {{ mapUnits }} {{y}} {{ mapUnits }}</div>
    ```
 */
    .directive('anolMousePosition', ['$compile', 'MapService', 'ControlsService', function($compile, MapService, ControlsService) {
        return {
            restrict: 'A',
            require: '?^anolMap',
            scope: {
                precision: '@',
                projectionCode: '='
            },
            link: {
                pre: function(scope, element) {
                    $compile(element.contents())(scope);
                    scope.map = MapService.getMap();
                    if(angular.isDefined(scope.projectionCode)) {
                        scope.projection = getProj(scope.projectionCode);
                    } else {
                        scope.projection = scope.map.getView().getProjection();
                        scope.projectionCode = scope.projection.getCode();
                    }
                    scope.mapUnits = scope.projection.getUnits();

                    scope.precision = parseInt(scope.precision || 0);
                },
                post: function(scope, element, attrs, AnolMapController) {
                    var inMap = angular.isObject(AnolMapController);
                    var olControl = new MousePosition({
                        coordinateFormat: function(coordinate) {
                            scope.x = coordinate[0].toFixed(scope.precision);
                            scope.y = coordinate[1].toFixed(scope.precision);
                            scope.$digest();
                            return inMap ? element.html() : '';
                        }
                    });

                    var control = new anol.control.Control({
                        olControl: olControl
                    });

                    if(!inMap) {
                        element.css('display', 'inherit');
                    }
                    scope.$watch('projectionCode', function(newVal) {
                        if(angular.isDefined(newVal)) {
                            scope.projection = getProj(newVal);
                            scope.mapUnits = scope.projection.getUnits();
                            olControl.setProjection(scope.projection);
                        }
                    });

                    ControlsService.addControl(control);
                }
            }
        };
    }]);


text:
public class X extends Y {}
public class Y {

	private static int x = 0;

	public static int getX() {
		return x;
	}

	public static void setX(int x) {
		X.<error descr="'x' has private access in 'Y'">x</error> = x;
	}
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
¸ÅÊöÁбí (µ÷²éͳ¼ÆÈí¼þ·þÎñƽ̨ API)
</TITLE>

<META NAME="date" CONTENT="2009-06-12">

<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">

ËùÓÐÀà

Èí¼þ°ü

org.xsaas.xstat.business

org.xsaas.xstat.business.service

org.xsaas.xstat.conf

org.xsaas.xstat.dao

org.xsaas.xstat.dao.hibernate

org.xsaas.xstat.po

org.xsaas.xstat.util

org.xsaas.xstat.utils.page


text:
include_recipe 'nodejs::default'

nodejs_npm 'influxdb-cli' do
  action :install
end


text:
<!DOCTYPE html>
<html>

  {% include head.html %}

  <body>

    {% include header.html %}

    <div class="post-list-wrapper">
      {{ content }}
    </div> <!-- /.page-wrapper -->

    {% include footer.html %}
    {% include ga.html %}
  </body>

</html>


text:
package io.crnk.core.engine.information.repository;

import io.crnk.core.repository.RelationshipMatcher;

/**
 * Holds information about the type of a relationship repository.
 */
public interface RelationshipRepositoryInformation extends RepositoryInformation {

	RelationshipMatcher getMatcher();

}


text: Il tuo voto per {{ campaign.name }} su {{ campaign.url }} è stato registrato.


text:
//
//   SubSonic - http://subsonicproject.com
//
//   The contents of this file are subject to the New BSD
//   License (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.opensource.org/licenses/bsd-license.php
//
//   Software distributed under the License is distributed on an
//   "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
//   implied. See the License for the specific language governing
//   rights and limitations under the License.
//
using System;
using System.Linq;
using System.Data;
using SubSonic.Schema;
using System.Reflection;
using System.Collections.Generic;

namespace SubSonic.SqlGeneration.Schema
{
    public interface IRelationMappingAttribute
    {
        bool Accept(IRelation column, PropertyInfo property);
        void Apply(IRelation column, PropertyInfo property);
    }

    public abstract class AbstractSubSonicRelationAttribute : Attribute, IRelationMappingAttribute
    {
        public string JoinKeyName { get; set; }

        private Qualifier _qualifier;

        protected AbstractSubSonicRelationAttribute(Qualifier qualifier)
        {
            _qualifier = qualifier;
        }

        public virtual bool Accept(IRelation relation, PropertyInfo prop)
        {
            return true;
        }

        public virtual void Apply(IRelation relation, PropertyInfo prop)
        {
            DiscoverTargetTable(relation, prop);
            DiscoverJoinKeys(relation, prop);

            relation.Qualifier = _qualifier;
        }

        protected virtual void DiscoverJoinKeys(IRelation relation, PropertyInfo prop)
        {
            var keyNames = BuildKeyNames(relation.Table);

            relation.JoinKey = relation.Table.PrimaryKey;
            relation.TargetJoinKey = FindColumnByNames(relation.TargetTable, keyNames);
        }

        protected string[] BuildKeyNames(ITable table)
        {
            if (String.IsNullOrEmpty(JoinKeyName))
            {
                return new[] { "ID" + table.ClassName, table.ClassName + "ID" };
            }

            return new[] { JoinKeyName };
        }

        protected virtual IColumn FindColumnByNames(ITable table, params string[] foreignKeyNames)
        {
            var foreignKey = table.Columns.FirstOrDefault(c =>
                    foreignKeyNames.Any(f => c.Name.Equals(f, StringComparison.InvariantCultureIgnoreCase)));

            if (foreignKey == null)
            {
                throw new InvalidOperationException(
                    String.Format("Could not locate foreign key in type {0} using foreign key names '{1}'",
                    table.ClassName, String.Join(", ", foreignKeyNames)));
            }

            return foreignKey;
        }

        protected virtual void DiscoverTargetTable(IRelation relation, PropertyInfo prop)
        {
            relation.TargetType = GetRelationType(relation, prop);
            relation.TargetTable = relation.Table.Provider.FindOrCreateTable(relation.TargetType);
        }

        protected abstract Type GetRelationType(IRelation relation, PropertyInfo prop);
    }

    [AttributeUsage(AttributeTargets.Property)]
    public class SubSonicToManyRelationAttribute : AbstractSubSonicRelationAttribute, IRelationMappingAttribute
    {
        public SubSonicToManyRelationAttribute()
            : base(Qualifier.Many)
        { }

        protected override Type GetRelationType(IRelation relation, PropertyInfo prop)
        {
            if (!prop.PropertyType.IsGenericType)
            {
                throw new InvalidOperationException("Expecting a generic collection to use this property as one to many collection");
            }

            var relationType = prop.PropertyType.GetGenericArguments()[0];
            var listGeneric = typeof(List<>).MakeGenericType(relationType);

            if (!prop.PropertyType.IsAssignableFrom(listGeneric))
            {
                throw new InvalidOperationException("Expecting a collection type that is assignable from List<T> to use this propery as one to many collection");
            }

            return relationType;
        }
    }

    [AttributeUsage(AttributeTargets.Property)]
    public class SubSonicToOneRelationAttribute : AbstractSubSonicRelationAttribute, IRelationMappingAttribute
    {
        public bool ThisClassContainsJoinKey { get; set; }

        public SubSonicToOneRelationAttribute()
            : base(Qualifier.One)
        {
            ThisClassContainsJoinKey = false;
        }

        protected override Type GetRelationType(IRelation relation, PropertyInfo prop)
        {
            return prop.PropertyType;
        }

        protected override void DiscoverJoinKeys(IRelation relation, PropertyInfo prop)
        {
            if (ThisClassContainsJoinKey)
            {
                relation.TargetJoinKey = relation.TargetTable.PrimaryKey;

                var keyNames = BuildKeyNames(relation.TargetTable);
                relation.JoinKey = FindColumnByNames(relation.Table, keyNames);
            }
            else
            {
                var keyNames = BuildKeyNames(relation.Table);
                relation.TargetJoinKey = FindColumnByNames(relation.TargetTable, keyNames);

                relation.JoinKey = relation.Table.PrimaryKey;
            }
        }
    }
}


text:
<?php

use yii\db\Migration;

class m150922_072040_update_tables31 extends Migration
{
    public function safeUp()
    {
        $this->addColumn('poll', 'main', 'boolean');
    }

    public function safeDown()
    {
	    $this->dropColumn('poll', 'main');
    }
}


text:
using System;
using SystemsRx.Pools;
using EcsRx.Components.Database;
using EcsRx.Components.Lookups;

namespace EcsRx.Entities
{
    public class DefaultEntityFactory : IEntityFactory
    {
        public IIdPool IdPool { get; }
        public IComponentDatabase ComponentDatabase { get; }
        public IComponentTypeLookup ComponentTypeLookup { get; }

        public DefaultEntityFactory(IIdPool idPool, IComponentDatabase componentDatabase, IComponentTypeLookup componentTypeLookup)
        {
            IdPool = idPool;
            ComponentDatabase = componentDatabase;
            ComponentTypeLookup = componentTypeLookup;
        }

        public int GetId(int? id = null)
        {
            if(!id.HasValue)
            { return IdPool.AllocateInstance(); }

            IdPool.AllocateSpecificId(id.Value);
            return id.Value;
        }

        public IEntity Create(int? id = null)
        {
            if(id.HasValue && id.Value == 0)
            { throw new ArgumentException("id must be null or > 0"); }

            var usedId = GetId(id);
            return new Entity(usedId, ComponentDatabase, ComponentTypeLookup);
        }

        public void Destroy(int entityId)
        { IdPool.ReleaseInstance(entityId); }
    }
}