text:
using System.ComponentModel;
using Castle.DynamicProxy;
using System.Diagnostics;
using System.Collections.Generic;
using System;

namespace Wpf.Mvc
{
    public abstract class ViewModel : INotifyPropertyChanged
    {
        internal class PropertySetterInterceptor : StandardInterceptor
        {
            public void Intercept(IInvocation invocation)
            {
                invocation.Proceed();
                var method = invocation.Method;
                if (method.Name.StartsWith("set_"))
                {
                    Debug.Assert(method.IsSpecialName);
                    var viewModel = invocation.InvocationTarget as ViewModel;
                    viewModel.OnPropertyChanged(propertyName: method.Name.Substring(4));
                }
            }
        }

        static readonly ProxyGenerator proxyFactory = new ProxyGenerator();

        public static T Create<T>() where T : ViewModel, new()
        {
            return proxyFactory.CreateClassProxy<T>(new PropertySetterInterceptor());
        }

        public event PropertyChangedEventHandler PropertyChanged;
        internal void OnPropertyChanged(string propertyName)
        {
            if (this.PropertyChanged != null)
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }

        //IDataErrorInfo
        readonly Dictionary<string, string> _erros = new Dictionary<string, string>();
        string IDataErrorInfo.Error { get { throw new NotImplementedException(); } }
        string IDataErrorInfo.this[string propertyName]
        {
            get
            {
                var result = "";
                this._erros.TryGetValue(propertyName, out result);
                return result;
            }
        }

        public void SetError(string propertyName, string message)
        {
            this._erros[propertyName] = message;
            this.OnPropertyChanged(propertyName);
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
..
   Super Simple Stocks
   https://github.com/tgorka/SuperSimpleStocks

   Copyright (C) 2016 Tomasz Gorka <http://tomasz.gorka.org.pl>

:mod:`supersimplestocks.spark` Package
--------------------------------------

.. automodule:: supersimplestocks.spark
    :members:
    :undoc-members:
    :show-inheritance:


text:
<?php

namespace Kodeine\Acl\Models\Eloquent;

use DateTimeInterface;
use Illuminate\Database\Eloquent\Model;
use Kodeine\Acl\Traits\HasPermission;

class Role extends Model
{
    use HasPermission;

    /**
     * The attributes that are fillable via mass assignment.
     *
     * @var array
     */
    protected $fillable = ['name', 'slug', 'description'];

    /**
     * The database table used by the model.
     *
     * @var string
     */
    protected $table;

    public function __construct(array $attributes = [])
    {
        $this->table = config('acl.db_prefix') . 'roles';

        parent::__construct($attributes);
    }

    /**
     * Prepare a date for array / JSON serialization.
     *
     * @param  DateTimeInterface  $date
     * @return string
     */
    protected function serializeDate(DateTimeInterface $date)
    {
        return $date->format('Y-m-d H:i:s');
    }

    /**
     * Use the slug of the Role
     * instead of the ID.
     *
     * @return string
     */
    public function getRouteKeyName() {
        return 'slug';
    }

    /**
     * Roles can belong to many users.
     *
     * @return Model
     */
    public function users()
    {
        return $this->belongsToMany(config('auth.providers.users.model', config('auth.model')))->withTimestamps();
    }

    /**
     * List all permissions
     *
     * @return mixed
     */
    public function getPermissions()
    {
        return \Cache::remember(
            'acl.getPermissionsInheritedById_'.$this->id,
            now()->addMinutes(config('acl.cacheMinutes', 1)),
            function () {
                return $this->getPermissionsInherited();
            }
        );
    }

    /**
     * Checks if the role has the given permission.
     *
     * @param string $permission
     * @param string $operator
     * @param array  $mergePermissions
     * @return bool
     */
    public function hasPermission($permission, $operator = null, $mergePermissions = [])
    {
        $operator = is_null($operator) ? $this->parseOperator($permission) : $operator;

        $permission = $this->hasDelimiterToArray($permission);
        $permissions = $this->getPermissions() + $mergePermissions;

        // make permissions to dot notation.
        // create.user, delete.admin etc.
        $permissions = $this->toDotPermissions($permissions);

        // validate permissions array
        if ( is_array($permission) ) {

            if ( ! in_array($operator, ['and', 'or']) ) {
                $e = 'Invalid operator, available operators are "and", "or".';
                throw new \InvalidArgumentException($e);
            }

            $call = 'canWith' . ucwords($operator);

            return $this->$call($permission, $permissions);
        }

        // validate single permission
        return isset($permissions[$permission]) && $permissions[$permission] == true;
    }

    /**
     * @param $permission
     * @param $permissions
     * @return bool
     */
    protected function canWithAnd($permission, $permissions)
    {
        foreach ($permission as $check) {
            if ( ! in_array($check, $permissions) || ! isset($permissions[$check]) || $permissions[$check] != true ) {
                return false;
            }
        }

        return true;
    }

    /**
     * @param $permission
     * @param $permissions
     * @return bool
     */
    protected function canWithOr($permission, $permissions)
    {
        foreach ($permission as $check) {
            if ( in_array($check, $permissions) && isset($permissions[$check]) && $permissions[$check] == true ) {
                return true;
            }
        }

        return false;
    }
}


text:
from __future__ import annotations

# Licensed to Cloudera, Inc. under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  Cloudera, Inc. licenses this file
# to you 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.
#
"""Various security-related utils."""
import re
import socket

from airflow.utils.net import get_hostname

def get_components(principal) -> list[str] | None:
    """
    Returns components retrieved from the kerberos principal.
    -> (short name, instance (FQDN), realm)

    ``principal`` .
    """
    if not principal:
        return None
    return re.split(r'[/@]', str(principal))

def replace_hostname_pattern(components, host=None):
    """Replaces hostname with the right pattern including lowercase of the name."""
    fqdn = host
    if not fqdn or fqdn == '0.0.0.0':
        fqdn = get_hostname()
    return f'{components[0]}/{fqdn.lower()}@{components[2]}'

def get_fqdn(hostname_or_ip=None):
    """Retrieves FQDN - hostname for the IP or hostname."""
    try:
        if hostname_or_ip:
            fqdn = socket.gethostbyaddr(hostname_or_ip)[0]
            if fqdn == 'localhost':
                fqdn = get_hostname()
        else:
            fqdn = get_hostname()
    except OSError:
        fqdn = hostname_or_ip

    return fqdn

def principal_from_username(username, realm):
    """Retrieves principal from the user name and realm."""
    if ('@' not in username) and realm:
        username = f"{username}@{realm}"

    return username


text:
package upnp.utils.worker;

public class JobStop extends Job {
}


text:
from __future__ import absolute_import

from django.forms.widgets import HiddenInput
from django.utils.translation import ugettext_lazy as _

from fobi.base import FormElementPlugin, get_theme

from . import UID
from .fields import HoneypotField
from .forms import HoneypotInputForm

__title__ = 'fobi.contrib.plugins.form_elements.security.honeypot.base'
__author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>'
__copyright__ = '2014-2017 Artur Barseghyan'
__license__ = 'GPL 2.0/LGPL 2.1'
__all__ = ('HoneypotInputPlugin',)

theme = get_theme(request=None, as_instance=True)

class HoneypotInputPlugin(FormElementPlugin):
    """Honeypot field plugin."""

    uid = UID
    name = _("Honeypot")
    group = _("Security")
    form = HoneypotInputForm
    is_hidden = True

    def get_form_field_instances(self, request=None, form_entry=None,
                                 form_element_entries=None, **kwargs):
        """Get form field instances."""

        field_kwargs = {
            'label': self.data.label,
            'initial': self.data.initial,
            # 'help_text': self.data.help_text,
            'required': self.data.required,
            'widget': HiddenInput(
                attrs={'class': theme.form_element_html_class}
            ),
        }

        if self.data.max_length:
            field_kwargs['max_length'] = self.data.max_length

        # return [(self.data.name, (HoneypotField, TextInput), kwargs)]
        return [(self.data.name, HoneypotField, field_kwargs)]


text:
from common.chrome_proxy_shared_page_state import ChromeProxySharedPageState
from telemetry.page import page as page_module
from telemetry import story

class PingbackPage(page_module.Page):

  def __init__(self, url, page_set):
    super(PingbackPage, self).__init__(url=url, page_set=page_set,
        shared_page_state_class=ChromeProxySharedPageState)

class PingbackStorySet(story.StorySet):

  """ Chrome proxy test page to verify the pingback """

  def __init__(self):
    super(PingbackStorySet, self).__init__()

    urls_list = [
      'http://check.googlezip.net/test.html',
    ]

    for url in urls_list:
      self.AddStory(PingbackPage(url, self))


text:
We welcome all contributions from bug fixes to documentation improvements. If
you want to help, feel free to open a pull request.

## Pull Requests

When you submit a pull request, it is likely that there will be some feedback
requesting changes. When that happens, please update your code accordingly (or
convince us that we are wrong) and upload new version.

It is OK to rebase and squash commits in a pull request. For some changes it
makes sense to be split into multiple separate commits, but generally we don't
want to have a commit *Add feature X* followed by *Fix review comments about
feature X*. In such case, it should be a single commit.

## Merging pull requests

We would like to maintain clean and readable history. Therefore, here are some
guidelines on how to merge proposed pull requests.

When you want to merge a pull request, make sure that the patches are against
`master` branch and not some commit in history:

    $ git checkout feature-branch
    $ git rebase master
    $ git checkout master

After rebasing, you may want to force push the same branch to GitHub.

If the pull request consists of a single commit, rebase it on top of `master`,
merge using fast-forward and push by hand. This will avoid creating a merge
commit (which makes very little sense for a one-commit pull request).

    $ git merge --ff-only feature-branch
    $ python manage.py test
    $ git push origin master

If you pushed the rebased branch, GitHub will automatically mark the pull
request as merged. If you did not push, you have to do it manually. A link to
the commit on `master` branch in a comment is nice, but not required.

If the pull request had multiple commits, merge commit makes sense as it shows
that these commits belong together. In this case again rebase the patches on
`master`, but merge with `--no-ff`. Another option is to push the **rebased**
branch to GitHub and use the merge button. Doing it by hand has the advantage
that you can check what you did.

    $ git merge --no-ff feature-branch
    $ python manage.py test
    $ git push origin master

With this workflow, the history will remain completely linear for requests with
single commit. For requests with multiple commits, there will be *merge
bubbles* showing which commits belong to the pull requests, but they will not
overlap.

    *   c539758 Merge branch 'another-feature'
    |\
    | * 172eadd Another feature patch 3/3
    | * f85a21a Another feature patch 2/3
    | * 880cf7b Another feature patch 1/3
    |/
    *   8e1b9df New feature in single patch
    *   e7e3975 Single patch bug fix
    *   7b24b27 Merge branch 'awesome-feature'
    |\
    | * 06a8491 Add new feature patch 2/2
    | * 6fc1af8 Add new feature patch 1/2
    |/
    * 5fe48e2 Initial import


text:
(function(){
  'use strict';
  angular.module('create', ['ngMaterial'])
  .config(function($mdThemingProvider, $stateProvider){

    $mdThemingProvider.theme('docs-dark', 'default')
      .primaryPalette('yellow');

    $stateProvider.state('create', {
      url: '/create-lunch',
      templateUrl: './src/create-lunch/view/create.html'
    })
  });

})();


text:
package com.iconasystems.christo.baalafinal;

import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.SignInButton;
import com.google.android.gms.plus.PlusClient;
import com.iconasystems.christo.utils.JSONParser;
import com.iconasystems.christo.utils.SessionManager;

import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONException;
import org.json.JSONObject;

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

public class LoginActivity extends Activity implements PlusClient.ConnectionCallbacks, PlusClient.OnConnectionFailedListener{
    private Button loginButton;
    private EditText usernameField;
    private EditText passwordField;

    private PlusClient mPlusClient;
    private ConnectionResult mConnectionResult;
    private SignInButton mSignInButton;
    private TextView mDisplayNameTextView;

    private static final int DIALOG_GET_GOOGLE_PLAY_SERVICES = 1;

    private static final int REQUEST_CODE_SIGN_IN = 1;
    private static final int REQUEST_CODE_GET_GOOGLE_PLAY_SERVICES = 2;

    private ProgressDialog progressDialog;

    private static String TAG_USERNAME  = "username";
    private static String TAG_PASSWORD = "password";
    private static String TAG_SUCCESS = "success";
    private static String TAG_MESSAGE = "message";
    private static String TAG_USER_ID = "user_id";

    private SessionManager session;

    private JSONParser jsonParser = new JSONParser();

    private static final String url_login = "http://api.baala-online.netii.net/login.php";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);

        session = new SessionManager(getApplicationContext());

        usernameField = (EditText) findViewById(R.id.username);
        passwordField = (EditText) findViewById(R.id.password);
        loginButton = (Button) findViewById(R.id.login_button);

        loginButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
                NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();

                if (networkInfo != null && networkInfo.isConnected()) {
                    new Login().execute();
                }else {
                    Toast.makeText(getApplicationContext(), "No Internet Connection", Toast.LENGTH_LONG).show();
                }
            }
        });
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_login, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_settings) {
            return true;
        }

        return super.onOptionsItemSelected(item);
    }

    @Override
    public void onConnected(Bundle bundle) {

    }

    @Override
    public void onDisconnected() {

    }

    @Override
    public void onConnectionFailed(ConnectionResult connectionResult) {

    }

    public class Login extends AsyncTask<String, String, String> {

        @Override
        public void onPreExecute(){
            super.onPreExecute();

            progressDialog = new ProgressDialog(LoginActivity.this);
            progressDialog.setMessage("Signing In Please...Wait");
            progressDialog.setIndeterminate(true);
            progressDialog.setCancelable(false);
            progressDialog.show();

        }
        @Override
        public String doInBackground(String... params) {
            String username = usernameField.getText().toString();
            String password = passwordField.getText().toString();

            List<NameValuePair> credentials = new ArrayList<NameValuePair>();
            credentials.add(new BasicNameValuePair("username", username));
            credentials.add(new BasicNameValuePair("password", password));

            JSONObject jsonObject = jsonParser.makeHttpRequest(url_login,"POST", credentials);

            Log.d("Baala Login", jsonObject.toString());

            try {
                int success = jsonObject.getInt(TAG_SUCCESS);

                if (success == 1) {

                    final String user_id = jsonObject.getString(TAG_USER_ID);

                    session.createLoginSession(username,password,user_id);

                    Intent i = new Intent(LoginActivity.this, HomeActivity.class);
                    i.putExtra(TAG_USER_ID, user_id);
                    startActivity(i);

                } else if (success == 0) {
                    final String message = jsonObject.getString(TAG_MESSAGE);

                    runOnUiThread(
                            new Runnable() {
                                @Override
                                public void run() {
                                    Toast.makeText(getApplicationContext(), message , Toast.LENGTH_LONG).show();
                                }
                            }
                    );

                } else if (success == 2) {
                    final String message = jsonObject.getString(TAG_MESSAGE);

                    runOnUiThread(
                            new Runnable() {
                                @Override
                                public void run() {
                                    Toast.makeText(getApplicationContext(), message , Toast.LENGTH_LONG).show();
                                }
                            }
                    );

                } else if (success == 3) {
                    final String message = jsonObject.getString(TAG_MESSAGE);

                    runOnUiThread(
                            new Runnable() {
                                @Override
                                public void run() {
                                    Toast.makeText(getApplicationContext(), message , Toast.LENGTH_LONG).show();
                                }
                            }
                    );

                }
            } catch (JSONException e) {
                e.printStackTrace();
            }

            return null;
        }
        @Override
        public void onPostExecute(String result) {
            progressDialog.dismiss();
        }
    }
}


text:
package com.google.javascript.jscomp;

import com.google.debugging.sourcemap.SourceMapConsumerV3;
import com.google.debugging.sourcemap.SourceMapParseException;
import java.io.IOException;
import java.io.Serializable;
import javax.annotation.Nullable;

/**
 * A lazy-loaded SourceMapConsumerV3 instance.
 */
public final class SourceMapInput implements Serializable {
  private final SourceFile sourceFile;
  // No need to serialize the consumer, it will be recreated because the serialized version will
  // have cached = false.
  private transient volatile SourceMapConsumerV3 parsedSourceMap = null;
  private transient volatile boolean cached = false;

  static final DiagnosticType SOURCEMAP_RESOLVE_FAILED =
      DiagnosticType.warning("SOURCEMAP_RESOLVE_FAILED", "Failed to resolve sourcemap: {0}");

  static final DiagnosticType SOURCEMAP_PARSE_FAILED =
      DiagnosticType.warning("SOURCEMAP_PARSE_FAILED", "Failed to parse malformed sourcemap: {0}");

  public SourceMapInput(SourceFile sourceFile) {
    this.sourceFile = sourceFile;
  }

  /**
   * Gets the source map, reading from disk and parsing if necessary. Returns null if the sourcemap
   * cannot be resolved or is malformed.
   */
  public synchronized @Nullable SourceMapConsumerV3 getSourceMap(ErrorManager errorManager) {
    if (!cached) {
      // Avoid re-reading or reparsing files.
      cached = true;
      String sourceMapPath = sourceFile.getOriginalPath();
      try {
        String sourceMapContents = sourceFile.getCode();
        SourceMapConsumerV3 consumer = new SourceMapConsumerV3();
        consumer.parse(sourceMapContents);
        parsedSourceMap = consumer;
      } catch (IOException e) {
        JSError error = JSError.make(SourceMapInput.SOURCEMAP_RESOLVE_FAILED, sourceMapPath);
        errorManager.report(error.getDefaultLevel(), error);
      } catch (SourceMapParseException e) {
        JSError error = JSError.make(SourceMapInput.SOURCEMAP_PARSE_FAILED, sourceMapPath);
        errorManager.report(error.getDefaultLevel(), error);
      }
    }
    return parsedSourceMap;
  }

  /**
   * Gets the original location of this sourcemap file on disk.
   */
  public String getOriginalPath() {
    return sourceFile.getOriginalPath();
  }
}


text:
/

#ifndef __IFXOBSERVER_H__
#define __IFXOBSERVER_H__

#include "IFXUnknown.h"
class IFXSubject;

// {0985328C-ED0E-473e-B911-234FD2AEC1A7}
IFXDEFINE_GUID(IID_IFXObserver,
0x985328c, 0xed0e, 0x473e, 0xb9, 0x11, 0x23, 0x4f, 0xd2, 0xae, 0xc1, 0xa7);

class IFXObserver : virtual public IFXUnknown
/**
       The IFXObserver interface supplies the services for callback
	   processing.
*/
{
public:
	virtual IFXRESULT IFXAPI  Update(IFXSubject* pInSubject, U32 uInChangeBits, IFXREFIID rIType=IID_IFXUnknown)=0;
	/**<
	        Notification that the provided subject has changed.

	@param  pInSubject
	         A pointer to the IFXSubject interface of the component that
			 changed.

	@param  uInChangeBits
             The aspects of interest that changed as defined by the supplied
			 IFXSubject's published interest bits.  if uInChangeBits are 0,
			 then the subject is shutting down, and should be released if
			 AddRef'ed, or local references should be cleared in the weak
			 reference case.

	@return One of the following IFXRESULT codes:                          \n\n
-            IFX_OK                                                          \n
              No error.                                                    \n\n
-            IFX_E_INVALID_POINTER                                           \n
              pInSubject was NULL.                                         \n\n
-            IFX_E_OUT_OF_MEMORY                                             \n
              Not enough memory is available to resolve the change.          \n

    @note   This method is typically called from @e IFXSubject::PostChanges().

    @note   This method with uInChangeBits = 0 allows for the circular
			reference between the Observer and the Subject to
			be broken.
	*/
};

struct SIFXObserverRequest
{
	IFXObserver * pObserver;
	U32	uObserverInterests;
	IFXREFIID rInterfaceType;
	U32 shift;
	U32 timeStamp; // to avoid duplicate posts
	SIFXObserverRequest( IFXObserver* pObs,
	                     U32           interests,
						 IFXREFIID rIType,
						 U32 shiftBits=0,
						 U32 ts = (U32)-1 ): pObserver(pObs),
	                                      uObserverInterests(interests),
										  rInterfaceType(rIType),shift(shiftBits),timeStamp(ts){};
};

#endif


text:
package org.wso2.siddhi.plugins.idea.runconfig;

import com.intellij.execution.actions.ConfigurationContext;
import com.intellij.execution.configurations.GeneralCommandLine;
import com.intellij.execution.process.ProcessHandler;
import com.intellij.execution.process.ProcessOutputTypes;
import com.intellij.ide.scratch.ScratchFileType;
import com.intellij.openapi.fileChooser.FileChooserDescriptor;
import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.FileIndexFacade;
import com.intellij.openapi.ui.ComponentWithBrowseButton;
import com.intellij.openapi.ui.TextBrowseFolderListener;
import com.intellij.openapi.ui.TextComponentAccessor;
import com.intellij.openapi.ui.TextFieldWithBrowseButton;
import com.intellij.openapi.util.Condition;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
import com.intellij.psi.PsiFileSystemItem;
import com.intellij.psi.PsiManager;
import com.intellij.psi.util.PsiTreeUtil;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.wso2.siddhi.plugins.idea.SiddhiConstants;
import org.wso2.siddhi.plugins.idea.SiddhiFileType;
import org.wso2.siddhi.plugins.idea.psi.ExecutionElementNode;

import java.util.Collection;
import java.util.Map;

public class SiddhiRunUtil {

    private SiddhiRunUtil() {

    }

    @Nullable
    static PsiElement getContextElement(@Nullable ConfigurationContext context) {
        if (context == null) {
            return null;
        }
        PsiElement psiElement = context.getPsiLocation();
        if (psiElement == null || !psiElement.isValid()) {
            return null;
        }

        FileIndexFacade indexFacade = FileIndexFacade.getInstance(psiElement.getProject());
        PsiFileSystemItem psiFile = psiElement instanceof PsiFileSystemItem ? (PsiFileSystemItem) psiElement :
                psiElement.getContainingFile();
        VirtualFile file = psiFile != null ? psiFile.getVirtualFile() : null;
        if (file != null && file.getFileType() != ScratchFileType.INSTANCE &&
                (!indexFacade.isInContent(file) || indexFacade.isExcludedFile(file))) {
            return null;
        }
        return psiElement;
    }

    public static void installSiddhiWithWorkingDirectoryChooser(Project project, @NotNull TextFieldWithBrowseButton
            fileField) {
        installWorkingDirectoryChooser(project, fileField);
    }

    private static void installWorkingDirectoryChooser(@NotNull Project project, @NotNull ComponentWithBrowseButton
            field) {
        FileChooserDescriptor chooseDirectoryDescriptor =
                FileChooserDescriptorFactory.createSingleFolderDescriptor();
        chooseDirectoryDescriptor.setShowFileSystemRoots(true);
        chooseDirectoryDescriptor.withShowHiddenFiles(false);
        if (field instanceof TextFieldWithBrowseButton) {
            ((TextFieldWithBrowseButton) field).addBrowseFolderListener(
                    new TextBrowseFolderListener(chooseDirectoryDescriptor, project));
        } else {
            //noinspection unchecked
            field.addBrowseFolderListener(project, new ComponentWithBrowseButton.BrowseFolderActionListener(null,
                    null, field, project, chooseDirectoryDescriptor,
                    TextComponentAccessor.TEXT_FIELD_WITH_HISTORY_WHOLE_TEXT));
        }
    }

    public static void installSiddhiWithSiddhiFileChooser(Project project,
                                                           @NotNull TextFieldWithBrowseButton fileField) {
        installFileChooser(project, fileField, file ->
                isRunnableSiddhiFile(PsiManager.getInstance(project).findFile(file)));
    }

    public static void installSiddhiWithFileChooser(Project project,
                                                        @NotNull TextFieldWithBrowseButton fileField) {
        installFileChooser(project, fileField,null);
    }

    @Contract("null -> false")
    private static boolean isRunnableSiddhiFile(@Nullable PsiFile psiFile) {
        return hasExecutionElements(psiFile);
    }

    @Contract("null -> false")
    private static boolean hasExecutionElements(PsiFile file) {
        Collection<ExecutionElementNode> executionElementNodes = PsiTreeUtil.findChildrenOfType(file,
                ExecutionElementNode.class);
        return executionElementNodes.toArray().length > 0;
    }

    private static void installFileChooser(@NotNull Project project, @NotNull ComponentWithBrowseButton field,
                                           @Nullable Condition<VirtualFile> fileFilter) {
        FileChooserDescriptor chooseDirectoryDescriptor =
                FileChooserDescriptorFactory.createSingleFileDescriptor(SiddhiFileType.INSTANCE);
        chooseDirectoryDescriptor.setShowFileSystemRoots(true);
        chooseDirectoryDescriptor.withShowHiddenFiles(false);
        chooseDirectoryDescriptor.withFileFilter(fileFilter);
        if (field instanceof TextFieldWithBrowseButton) {
            ((TextFieldWithBrowseButton) field).addBrowseFolderListener(
                    new TextBrowseFolderListener(chooseDirectoryDescriptor, project));
        } else {
            //noinspection unchecked
            field.addBrowseFolderListener(project, new ComponentWithBrowseButton.BrowseFolderActionListener(null,
                    null, field, project, chooseDirectoryDescriptor,
                    TextComponentAccessor.TEXT_FIELD_WITH_HISTORY_WHOLE_TEXT));
        }
    }

    public static void printSiddhiEnvVariables(@NotNull GeneralCommandLine commandLine,
                                                  @NotNull ProcessHandler handler) {
        Map<String, String> environment = commandLine.getEnvironment();
        // Todo - Add SIDDHI_REPOSITORY
                handler.notifyTextAvailable("SIDDHI_REPOSITORY=" + StringUtil.nullize(environment.get
                        (SiddhiConstants.SIDDHI_REPOSITORY)) + '\n', ProcessOutputTypes.SYSTEM);
    }

    @Nullable
    public static VirtualFile findByPath(@NotNull String path, @NotNull Project project) {
        String systemIndependentPath = FileUtil.toSystemIndependentName(path);
        VirtualFile projectBaseDir = project.getBaseDir();
        if (systemIndependentPath.isEmpty()) {
            return projectBaseDir;
        }
        return projectBaseDir.findFileByRelativePath(systemIndependentPath);
    }
}


text:
/* This file contains the procedures that look up path names in the directory
 * system and determine the inode number that goes with a given path name.
 */

#include "fs.h"
#include <assert.h>
#include <string.h>
#include "buf.h"
#include "inode.h"
#include "super.h"

/*===========================================================================*
 *                             fs_lookup				     *
 *===========================================================================*/
int fs_lookup(ino_t dir_nr, char *name, struct fsdriver_node *node,
	int *is_mountpt)
{
  struct inode *dirp, *rip;

  /* Find the starting inode. */
  if ((dirp = find_inode(fs_dev, dir_nr)) == NULL)
	return EINVAL;

  /* Look up the directory entry. */
  if ((rip = advance(dirp, name)) == NULL)
	return err_code;

  /* On success, leave the resulting inode open and return its details. */
  node->fn_ino_nr = rip->i_num;
  node->fn_mode = rip->i_mode;
  node->fn_size = rip->i_size;
  node->fn_uid = rip->i_uid;
  node->fn_gid = rip->i_gid;
  /* This is only valid for block and character specials. But it doesn't
   * cause any harm to always set the device field. */
  node->fn_dev = (dev_t) rip->i_zone[0];

  *is_mountpt = rip->i_mountpoint;

  return OK;
}

/*===========================================================================*
 *				advance					     *
 *===========================================================================*/
struct inode *advance(dirp, string)
struct inode *dirp;		/* inode for directory to be searched */
const char *string;		/* component name to look for */
{
/* Given a directory and a component of a path, look up the component in
 * the directory, find the inode, open it, and return a pointer to its inode
 * slot.
 */
  ino_t numb;
  struct inode *rip;

  assert(dirp != NULL);

  /* If 'string' is empty, return an error. */
  if (string[0] == '\0') {
  	err_code = ENOENT;
	return(NULL);
  }

  /* If dir has been removed return ENOENT. */
  if (dirp->i_nlinks == NO_LINK) {
	err_code = ENOENT;
	return(NULL);
  }

  /* If 'string' is not present in the directory, signal error. */
  if ( (err_code = search_dir(dirp, string, &numb, LOOK_UP)) != OK) {
	return(NULL);
  }

  /* The component has been found in the directory.  Get inode. */
  if ( (rip = get_inode(dirp->i_dev, (int) numb)) == NULL)  {
	assert(err_code != OK);
	return(NULL);
  }

  assert(err_code == OK);
  return(rip);
}

/*===========================================================================*
 *				search_dir				     *
 *===========================================================================*/
int search_dir(ldir_ptr, string, numb, flag)
register struct inode *ldir_ptr; /* ptr to inode for dir to search */
const char *string;		 /* component to search for */
ino_t *numb;			 /* pointer to inode number */
int flag;			 /* LOOK_UP, ENTER, DELETE or IS_EMPTY */
{
/* This function searches the directory whose inode is pointed to by 'ldip':
 * if (flag == ENTER)  enter 'string' in the directory with inode # '*numb';
 * if (flag == DELETE) delete 'string' from the directory;
 * if (flag == LOOK_UP) search for 'string' and return inode # in 'numb';
 * if (flag == IS_EMPTY) return OK if only . and .. in dir else ENOTEMPTY;
 *
 * This function, and this function alone, implements name truncation,
 * by simply considering only the first MFS_NAME_MAX bytes from 'string'.
 */
  register struct direct *dp = NULL;
  register struct buf *bp = NULL;
  int i, r, e_hit, t, match;
  off_t pos;
  unsigned new_slots, old_slots;
  struct super_block *sp;
  int extended = 0;

  /* If 'ldir_ptr' is not a pointer to a dir inode, error. */
  if ( (ldir_ptr->i_mode & I_TYPE) != I_DIRECTORY)  {
	return(ENOTDIR);
   }

  if((flag == DELETE || flag == ENTER) && ldir_ptr->i_sp->s_rd_only)
	return EROFS;

  /* Step through the directory one block at a time. */
  old_slots = (unsigned) (ldir_ptr->i_size/DIR_ENTRY_SIZE);
  new_slots = 0;
  e_hit = FALSE;
  match = 0;			/* set when a string match occurs */

  pos = 0;
  if (flag == ENTER && ldir_ptr->i_last_dpos < ldir_ptr->i_size) {
	pos = ldir_ptr->i_last_dpos;
	new_slots = (unsigned) (pos/DIR_ENTRY_SIZE);
  }

  for (; pos < ldir_ptr->i_size; pos += ldir_ptr->i_sp->s_block_size) {
	assert(ldir_ptr->i_dev != NO_DEV);

	/* Since directories don't have holes, 'b' cannot be NO_BLOCK. */
	bp = get_block_map(ldir_ptr, pos);

	assert(ldir_ptr->i_dev != NO_DEV);
	assert(bp != NULL);
	assert(lmfs_dev(bp) != NO_DEV);

	/* Search a directory block. */
	for (dp = &b_dir(bp)[0];
		dp < &b_dir(bp)[NR_DIR_ENTRIES(ldir_ptr->i_sp->s_block_size)];
		dp++) {
		if (++new_slots > old_slots) { /* not found, but room left */
			if (flag == ENTER) e_hit = TRUE;
			break;
		}

		/* Match occurs if string found. */
		if (flag != ENTER && dp->mfs_d_ino != NO_ENTRY) {
			if (flag == IS_EMPTY) {
				/* If this test succeeds, dir is not empty. */
				if (strcmp(dp->mfs_d_name, "." ) != 0 &&
				    strcmp(dp->mfs_d_name, "..") != 0)
					match = 1;
			} else {
				if (strncmp(dp->mfs_d_name, string,
					sizeof(dp->mfs_d_name)) == 0){
					match = 1;
				}
			}
		}

		if (match) {
			/* LOOK_UP or DELETE found what it wanted. */
			r = OK;
			if (flag == IS_EMPTY) r = ENOTEMPTY;
			else if (flag == DELETE) {
				/* Save d_ino for recovery. */
				t = MFS_NAME_MAX - sizeof(ino_t);
				*((ino_t *) &dp->mfs_d_name[t]) = dp->mfs_d_ino;
				dp->mfs_d_ino = NO_ENTRY; /* erase entry */
				MARKDIRTY(bp);
				ldir_ptr->i_update |= CTIME | MTIME;
				IN_MARKDIRTY(ldir_ptr);
				if (pos < ldir_ptr->i_last_dpos)
					ldir_ptr->i_last_dpos = pos;
			} else {
				sp = ldir_ptr->i_sp;	/* 'flag' is LOOK_UP */
				*numb = (ino_t) conv4(sp->s_native,
						      (int) dp->mfs_d_ino);
			}
			assert(lmfs_dev(bp) != NO_DEV);
			put_block(bp, DIRECTORY_BLOCK);
			return(r);
		}

		/* Check for free slot for the benefit of ENTER. */
		if (flag == ENTER && dp->mfs_d_ino == 0) {
			e_hit = TRUE;	/* we found a free slot */
			break;
		}
	}

	/* The whole block has been searched or ENTER has a free slot. */
	if (e_hit) break;	/* e_hit set if ENTER can be performed now */
	assert(lmfs_dev(bp) != NO_DEV);
	put_block(bp, DIRECTORY_BLOCK);	/* otherwise, continue searching dir */
  }

  /* The whole directory has now been searched. */
  if (flag != ENTER) {
  	return(flag == IS_EMPTY ? OK : ENOENT);
  }

  /* When ENTER next time, start searching for free slot from
   * i_last_dpos. It gives some performance improvement (3-5%).
   */
  ldir_ptr->i_last_dpos = pos;

  /* This call is for ENTER.  If no free slot has been found so far, try to
   * extend directory.
   */
  if (e_hit == FALSE) { /* directory is full and no room left in last block */
	new_slots++;		/* increase directory size by 1 entry */
	if (new_slots == 0) return(EFBIG); /* dir size limited by slot count */
	if ( (bp = new_block(ldir_ptr, ldir_ptr->i_size)) == NULL)
		return(err_code);
	dp = &b_dir(bp)[0];
	extended = 1;
  }

  /* 'bp' now points to a directory block with space. 'dp' points to slot. */
  (void) memset(dp->mfs_d_name, 0, (size_t) MFS_NAME_MAX); /* clear entry */
  for (i = 0; i < MFS_NAME_MAX && string[i]; i++) dp->mfs_d_name[i] = string[i];
  sp = ldir_ptr->i_sp;
  dp->mfs_d_ino = conv4(sp->s_native, (int) *numb);
  MARKDIRTY(bp);
  put_block(bp, DIRECTORY_BLOCK);
  ldir_ptr->i_update |= CTIME | MTIME;	/* mark mtime for update later */
  IN_MARKDIRTY(ldir_ptr);
  if (new_slots > old_slots) {
	ldir_ptr->i_size = (off_t) new_slots * DIR_ENTRY_SIZE;
	/* Send the change to disk if the directory is extended. */
	if (extended) rw_inode(ldir_ptr, WRITING);
  }
  return(OK);
}


text:
=head1 NAME

Frequently asked questions for mod_perl on Win32

=head1 Description

This document discusses some questions that arise often
with mod_perl 2.0 on Win32.

=head1 See Also

The L<FAQs for mod_perl on Win32|docs::general::os::win32::faq>,
the discussion of
L<frequent mod_perl problems|docs::1.0::guide::frequent>,
the L<troubleshooting index|docs::1.0::guide::troubleshooting>,
L<debugging mod_perl|docs::1.0::guide::debug>, and
a L<troubleshooting guide for mod_perl
2.0|docs::2.0::user::troubleshooting::troubleshooting>.
Help is also available through the archives of and subscribing to
the L<mod_perl mailing list|maillist::modperl>; you will
probably find the
L<guide to getting help|docs::1.0::guide::help>
useful reading beforehand.

=head1 Maintainers

Maintainer is the person(s) you should contact with updates,
corrections and patches.

=over

=item *

Randy Kobes E<lt>randy@theoryx5.uwinnipeg.caE<gt>

=back

=head1 Authors

=over

=item *

Randy Kobes E<lt>randy@theoryx5.uwinnipeg.caE<gt>

=back

Only the major authors are listed above. For contributors see the
Changes file.

=cut


text:
- management versions 4.2.0 and 5.0.0 are now recognized

## 1.4.0 [The D && !D Edition](https://en.wikipedia.org/wiki/Luminous_\(story_collection\)) (2016-07-15)

- added `Administration.shutdownGracefully`
- added `ReloadToOriginal`
- added `Logging.logger().define`
- added `Online/OfflineCommand.NOOP`
- improved the `Change*TransactionAttributes` offline commands
  to support older application server versions
- fixed handling of the `reconnect-timeout` attribute
  in `AddAuditLogSyslogHandler`
- fixed resource leak in `OnlineManagementClient` when the client connects
  to a server which is running in different operating mode than expected
- improved javadoc of [Domain]Administration.reload\*
- improved the `Values` class to avoid useless allocations

## 1.3.0 [The Kugelblitz Edition](https://en.wikipedia.org/wiki/Heechee) (2016-06-28)

- added support for HTTP/HTTPS transport (`ManagementProtocol.HTTP[S]`)
- added support for configuring SSL (`OnlineOptions.ssl`)
- added commands for audit logging
- added commands for security realm SSL configuration
- added `RemoveSocketBinding`
- fixed `AddHttpsSecurityRealm` for cases when truststore path is not required
- the `OnlineOptions.connectionTimeout` method now accepts values `<= 0`

## 1.2.0 [The Avernus Edition](https://en.wikipedia.org/wiki/Helliconia) (2016-05-18)

- improved waiting for server: `OnlineOptions.connectionTimeout`
  is now also used when connecting to the server fails
- changed default boot timeout: 20 seconds for standalone server
  and 2 minutes for managed domain
- added `CliScript`
- added `Address.extension`
- added `Administration.shutdown` and `DomainAdministration.shutdown*`

## 1.1.0 [The Wintermute Edition](https://en.wikipedia.org/wiki/Neuromancer) (2016-04-25)

- added `OnlineOptions.bootTimeout`
- added commands for authorization in security realms
- added commands for configuring JDBC in the `transactions` subsystem
- updated `GroovyXmlTransform` to understand new XML element `<host-excludes>`
- removed debugging code in the `Administration` class

## 1.0.0 [The Ez|Ra Edition](https://en.wikipedia.org/wiki/Embassytown) (2016-03-15)

- removed deprecated features
- made all the management client dependencies `<scope>provided</scope>`,
  so that the user always has to provide a correct version
- removed the uberjar
- upgraded Groovy to 2.4.6

### Migration from 0.x

1. upgrade to 0.9.6; it should be 100% backwards compatible (except of
   correcting some design issues), so that should be seamless
2. if you use the uberjar, move to a proper dependency management scheme
3. make sure you don't use any features that are deprecated
   (use your IDE or the Java compiler to help with that); all the deprecated
   elements have a javadoc with migration instructions
4. make sure you provide management client dependencies yourself,
   because you will no longer get them transitively (see `README.md`);
   once you do that, you can remove the dependency exclusions
   for `jboss-as-controller-client`, `jboss-as-cli` and `wildfly-patching`
5. upgrade to 1.0.0

## 0.9.6 [The Lindblad Ring Edition](https://en.wikipedia.org/wiki/Pushing_Ice) (2016-02-24)

- if `OnlineOptions.forHost` wasn't called and `OnlineOptions.defaultHost`
  is therefore `null`, operations against addresses `/core-service=...`
  are now performed as-is instead of throwing an exception
- `OfflineOptions.defaultHost` and `.forHost` make no sense because
  an offline client always works with a single file, so they are now
  deprecated and scheduled for removal
- updated `GroovyXmlTransform` to understand new XML elements added in WildFly
- offline commands for security now check the configuration file version
- fixes in commands for security realms

## 0.9.5 [The Heptapod B Edition](https://en.wikipedia.org/wiki/Story_of_Your_Life) (2016-02-17)

- `ManagementVersion` renamed to `ServerVersion`,
  `OnlineManagementClient.serverVersion()` renamed to `version()` and
  `OnlineCommandContext.serverVersion` renamed to `version`;
  the old names are still available, but deprecated and scheduled for removal
  (this is a fix of a critical design flaw that required constant updates
  to the `ManagementVersion` enum to be able to work with new server versions)
- added `OfflineManagementClient.version()` and `OfflineCommandContext.version`
  (server version discovery in offline finally implemented; this now requires
  that all XML files used with `OfflineManegementClient` are AS7/WildFly server
  configuration files, which is technically a breaking change, even though
  it was always the intent and the number of affected users should be low)
- added commands for the security subsystem
- added commands for security realms
- added commands for the transactions subsystem
- added commands for managing deployments
- added `Address.deployment`
- management version 1.8.0 is now recognized
- upgraded Guava to 19.0, see https://github.com/google/guava/wiki/Release19
- the test suite now uses the WildFly 10 final release

## 0.9.4 [The Rorschach Edition](https://en.wikipedia.org/wiki/Blindsight_\(Watts_novel\)) (2016-02-03)

- management version 4.1.0 is now recognized
- added more commands for messaging (both HornetQ and ActiveMQ Artemis)
- `OfflineOptions.default[Profile|Host]` are now `final`
  (should always have been, but it's a breaking change technically)
- added `RELEASE_PROCEDURE.md`

## 0.9.3 [The Dilemma Prison Edition](https://en.wikipedia.org/wiki/The_Quantum_Thief) (2016-01-15)

- added commands for the logging subsystem (see entrypoint class `Logging`)
- added `AddMariaDb[XA]DataSource`
- added `OnlineManagementClient.allowFailures` to avoid exceptions
  when operations are executed from commands and failures are expected
  (e.g. `Operations.exists` or `Operations.removeIfExists`)
- setting a truststore is no longer mandatory in `AddHttpsSecurityRealm`
- the `Add[XA]DataSource` commands now reload the server if required
  when `replaceExisting()` is used
- fixed `Administration.reload` when the server is in `restart-required`
- fixed a failure when `Operations.batch` was passed an empty `Batch`
- added a workaround for WFCORE-1082 to `AddModule`
- `ManagementProtocol.REMOTING` and `HTTP_REMOTE` renamed to `REMOTE`
  and `HTTP_REMOTING`; the old names are still available, but deprecated
  and scheduled for removal
- the test suite now uses latest WildFly 10 pre-release (was blocked
  by wrong patching test)

## 0.9.2 [The Sophotech Edition](https://en.wikipedia.org/wiki/The_Golden_Oecumene) (2015-12-04)

- added command `AddSocketBinding`
- added `ReadResourceOption.ATTRIBUTES_ONLY`
- added `Add[XA]DataSource.managedConnectionPool`

## 0.9.1 [The Great Ship Edition](https://en.wikipedia.org/wiki/Marrow_\(novel\)) (2015-11-23)

- added more commands for messaging (both HornetQ and ActiveMQ Artemis)
- added commands for adding and removing modules
- `OnlineMamagementClient.executeCli` now supports the `reload` operation
  (only without `--xxx` options)
- `ServerType` renamed to `ManagementProtocol` and `OnlineOptions.serverType`
  renamed to `protocol`; the old names are still available, but deprecated
  and scheduled for removal
- intermediate builder methods in the datasource commands now return
  the correct builder type
- improved deprecations (all deprecated elements now have both
  the `@Deprecated` annotation and the `@deprecated` javadoc tag)

## 0.9.0 [The Demosthenes Edition](https://en.wikipedia.org/wiki/Ender's_Game) (2015-10-26)

- first opensource release under the WildFly Extras umbrella
- no changes since 0.8.2

---

## 0.8.2 [The Webster Edition](https://en.wikipedia.org/wiki/City_\(novel\)) (2015-09-25)

- added commands for messaging (both HornetQ and ActiveMQ Artemis)
- fixed `DomainAdministration.start|stopServer`

## 0.8.1 [The Grokking Edition](https://en.wikipedia.org/wiki/Stranger_in_a_Strange_Land) (2015-08-05)

- `Online|OfflineCommand.apply` now declares `throws Exception`
  instead of the arbitrary set of exceptions declared previously
- moved AS7 dependencies from EAP 6.3 to EAP 6.4
- the test suite now runs against WildFly 10 by default (it's still
  possible to run it against all supported AS7 / WildFly versions)
- fixed links to documentation in datasources commands
- fixed `toString` in `ConfigurationFileBackup` commands
- minor stylistic improvements

## 0.8.0 [The Hiro Protagonist Edition](https://en.wikipedia.org/wiki/Snow_Crash) (2015-07-30)

- added commands for the Undertow subsystem
- fixed commands for datasources so that they work on WildFly too
- added `Headers`
- fixed `DomainAdministrationOperations.allRunningServers`
- silenced the CLI, so that it only prints messages through a logger
- heavily refactored the test suite to support running against AS7
  and all WildFly versions
    - using JUnit categories to accomodate for special needs of certain tests
      (manual tests, slow tests, AS7-only or WildFly-only tests)
    - using Maven profiles to allow running against different server versions

## 0.7.0 [The Gömeršaül Edition](http://mycelium.argenite.org/) (2015-05-29)

- added `Operations.headers()` and `SingleOperation.headers()`
- added `Command`
- the `connect` CLI operation must not be accepted

## 0.6.2 [The BuSab Edition](https://en.wikipedia.org/wiki/Bureau_of_Sabotage) (2015-05-19)

- WildFly 10.0.0 version is now recognized (though .Final was not released yet)
- added `OnlineOptions.serverType()`

## 0.6.1 [The Shabda-Oud Edition](http://en.wikipedia.org/wiki/Metabarons) (2015-05-06)

- fixed ordering of autocreated XML elements

## 0.6.0 [The Shrike Edition](https://en.wikipedia.org/wiki/Hyperion_Cantos) (2015-04-24)

- added a detailed Checkstyle ruleset (big change for contributors)
- added a detailed CodeNarc ruleset for checking Groovy code
- added support for WildFly:
    - `OnlineOptions.localDefault` now switches port to `9990` when
      the system property `creaper.wildfly` is defined
    - added workaround for WFCORE-623
- added and expanded commands for datasources, online and offline:
    - `AddDataSource`, `AddXADataSource`
    - `RemoveDataSource`, `RemoveXADataSource`
    - DB2: `AddDb2DataSource`, `AddDb2XADataSource`
    - MS SQL: `AddMssqlDataSource`, `AddMssqlXADataSource`
    - MySQL: `AddMysqlDataSource`, `AddMysqlXADataSource`
    - Oracle: `AddOracleDataSource`, `AddOracleXADataSource`
    - Postgres Plus: `AddPostgresPlusDataSource`, `AddPostgresPlusXADataSource`
    - PostgreSQL: `AddPostgreSqlDataSource`, `AddPostgreSqlXADataSource`
    - Sybase: `AddSybaseDataSource`, `AddSybaseXADataSource`
- added `AddJdbcDriver` and `RemoveJdbcDriver`
- added `EnableWebNatives` and `DisableWebNatives`
- added offline commands for adding a web connector and its ssl configuration
- added `RemoveConnector`
- added `OnlineManagementClient.serverVersion()`
- `[Online|Offline]CommandContext.currentVersion` renamed to `serverVersion`;
  the old names are still available, but deprecated and scheduled for removal
- added `Values.fromMap`

## 0.5.0 [The Prime Radiant Edition](http://en.wikipedia.org/wiki/Psychohistory_\(fictional\)) (2015-04-01)

- added the `Values` class as a replacement for the `Parameters` class,
  which is still available, but deprecated and scheduled for removal
- added `PropertiesFileAuth` for working with auth `.properties` files
- added online command for removing a basic datasource
- depends on Guava

## 0.4.0 [The Full of Stars Edition](https://en.wikipedia.org/wiki/2001:_A_Space_Odyssey_\(novel\)) (2015-02-23)

- WildFly 9.0.0 version is now recognized (though .Final was not released yet)
- added `GroovyXmlTransform` for Groovy-based unified standalone/domain
  XML transformations; the old `XmlTransform` class is still available,
  but deprecated and scheduled for removal
- added patching-related operations and commands
- added online commands for adding basic and XA datasources
- added `ServersRunningStateBackup` for backing up/restoring
  the state of servers in domain
- `BackupRestore` renamed to `ConfigurationFileBackup`; the old name
  is still available, but deprecated and scheduled for removal
- added `SingleOperation` to the `Operations` API
- added `isReloadRequired` and `isRestartRequired` to the `Administration` API
- added `waitUntilRunning` to the `Administration` API
  and `waitUntilServersRunning` to the `DomainAdministration` API
- added read-only methods `serverGroups`, `hosts`, `allRunningServers`
  and `allServers` to the `DomainAdministration` API
- added state-manipulating methods `startServer`, `stopServer`
  and `removeServer` to the `DomainAdministration` API
- added a workaround for WFCORE-526
- fixed auto-adjusting of standalone operations for domain in batch operations
- fixed `Operations.exists` and `Operations.removeIfExists` in managed domain
- `OfflineOptions.domain[Profile|Host]` renamed to `default[Profile|Host]`;
  the old names are still available, but deprecated and scheduled for removal

## 0.3.0 [The Sonic Screwdriver Edition](https://en.wikipedia.org/wiki/Sonic_screwdriver) (2014-12-19)

- building with Java 8 is now supported
- WildFly 8.2.0.Final version is now recognized
- really removed `ManagementClient.wrap()`; this should have been done
  in 0.2.0, but the removal there was only partial
- no more `can't find jboss-cli.xml` warnings
- added `ManagementClient.onlineLazy`
- `OnlineManagementClient` implements `Closeable`
- added `OnlineManagementClient.reconnect()`
- `OnlineManagementClient` now has an `execute` method that takes
  `org.jboss.as.controller.client.Operation`
- `OnlineManagementClient` now checks if it is really connected to a standalone
  server or a domain controller, as defined by the `OnlineOptions`
- the `OnlineManagementClient` now automatically adjusts operations for domain;
  this is done by prepending `/profile=...` to `/subsystem=...` addresses and
  `/host=...` to `/core-service=...` addresses, other addresses are kept intact
- `OnlineManegementClient` exposes the `OnlineOptions` it was created with;
  the `OnlineOptions` are also available from the `OnlineCommandContext`
- `OfflineManegementClient` exposes the `OfflineOptions` it was created with;
  the `OfflineOptions` are also available from the `OfflineCommandContext`
- `OnlineOptions.domain[Profile|Host]` renamed to `default[Profile|Host]`;
  the old names are still available, but deprecated and scheduled for removal
- the `Operations` API supports parameters for the `add` operation
- the `Operations` API supports writing list-valued attributes
- added `Operations.invoke`
- added `Operations.readChildrenNames`
- added `Operations.exists`
- added `Operations.removeIfExists`
- added `[NOT_]INCLUDE_RUNTIME` options to `ReadResourceOption`
- new `Administration` API added as a part of the `Operations` API;
  currently, it only handles server reload and restart
- `ModelNodeResult` has various `*value()` methods for accessing the result,
  optionally with a default value if the result is undefined
- `ModelNodeResult` can access headers and results of operations in domain
- `ModelNodeResult` can access results of batch steps
- added online commands for adding a web connector and its ssl configuration
- added domain-only online commands for adding a server group,
  a server config, and a JVM config
- constructors of the `*CommandContext` classes are no longer `public`;
  this is technically a breaking change, but shouldn't affect anyone

## 0.2.0 (2014-09-30)

- removed `ManagementClient.wrap()`, replaced
  by `OnlineOptions.standalone|domain().wrap()`
- removed `new Operations(ModelControllerClient)`, no replacement provided
- `OfflineOptions` now support custom directory layouts
- removed dependency on `groovy-all`, which contains `groovy-nio` compiled
  with Java 7; replaced by depending on `groovy` and `groovy-xml`

## 0.1.1 (2014-09-24)

- removed `localAS7` and `localWildFly` from `OnlineOptions`, replaced
  by `localDefault`

## 0.1.0 (2014-09-23)

- initial release


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Biovigyanam 7(2): 125 (1981)

#### Original name
Arthothelium albescens Patw. & Makhija

### Remarks
null


text:
// baseco v0.2.0
//
// **Github:** https://github.com/zensh/baseco
//
// **License:** MIT

/* global module, define */
;(function (root, factory) {
  'use strict';

  if (typeof module === 'object' && typeof module.exports === 'object') {
    module.exports = factory();
  } else if (typeof define === 'function' && define.amd) {
    define([], factory);
  } else {
    root.thunks = factory();
  }
}(this, function () {
  'use strict';

  var STRING = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',
    MSG = {
      alphabet1: '"alphabet" must be string, and alphabet.length >=2.',
      alphabet2: '"alphabet" err! It must be unique! : ',
      number1: 'Invalid "base" number! It must be an integer, and 2 <= base <= alphabet.length.',
      number2: 'Invalid "original" number! It must be an integer, and 0 <= number <= Number.MAX_VALUE.',
      original1: ' is invalid "original" string!',
      original2: '"original" must be a string!',
      original3: '"original" must be a number!'
    };

  function decToGeneric(o, b, c) {
    var re = '', q = 0;

    if (b <= 36 && c === STRING) return o.toString(b);
    while (o) {
      q = o % b;
      re = c[q] + re;
      o = (o - q) / b;
    }
    return re;
  }

  function genericToDec(o, b, c) {
    var cache = {}, s = '', re = 0, pow = 1;

    if (b <= 36 && c === STRING) return parseInt(o, b);
    for (var i = o.length - 1; i >= 0; i--) {
      s = o[i];
      if (cache[s] == null) cache[s] = c.indexOf(s);
      if (cache[s] < 0 || cache[s] >= b) throw new Error(s + MSG.original1);
      re += pow * cache[s];
      pow *= b;
    }
    return re;
  }

  function Baseco(base, alphabet) {
    var unique = {};

    if (!(this instanceof Baseco)) return new Baseco(alphabet, base);
    // check out alphabet
    alphabet = alphabet || STRING;

    if (typeof alphabet !== 'string' || alphabet.length < 2) throw new Error(MSG.alphabet1);

    //if subset of STRING, set default value STRING
    if (alphabet !== STRING && alphabet === STRING.slice(0, alphabet.length)) alphabet = STRING;

    if (alphabet !== STRING) {
      for (var i = alphabet.length - 1; i >= 0; i--) { //check out for uniquely
        if (unique['__' + alphabet[i]]) throw new Error(MSG.alphabet2 + alphabet[i]);
        unique['__' + alphabet[i]] = 1;
      }
    }

    // check out base
    base = Math.floor(base) || 10;
    if (!(base >= 2 && base <= alphabet.length)) throw new Error(MSG.number1);

    this._alphabet = alphabet;
    this._base = base;
  }

  Baseco.prototype.gToD = function (value) {
    if (typeof value !== 'string') throw new Error(MSG.original2);
    return genericToDec(value, this._base, this._alphabet);
  };

  Baseco.prototype.dToG = function (value) {
    if (typeof value !== 'number') throw new Error(MSG.original3);
    value = Math.floor(value);
    if (!(value >= 0 && value <= Number.MAX_VALUE)) throw new Error(MSG.number2);
    return decToGeneric(value, this._base, this._alphabet);
  };

  return Baseco;
}));


text:
package com.bazaarvoice.megabus.tableevents;

import com.bazaarvoice.emodb.common.uuid.TimeUUIDs;
import com.bazaarvoice.emodb.kafka.Topic;
import com.bazaarvoice.emodb.sor.api.Coordinate;
import com.bazaarvoice.emodb.table.db.eventregistry.TableEventTools;
import com.bazaarvoice.emodb.table.db.eventregistry.TableEvent;
import com.bazaarvoice.emodb.table.db.eventregistry.TableEventRegistry;
import com.bazaarvoice.megabus.MegabusRef;
import com.codahale.metrics.MetricRegistry;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.collect.Iterators;
import com.google.common.util.concurrent.AbstractScheduledService;
import com.google.common.util.concurrent.Futures;
import org.apache.kafka.clients.producer.Producer;
import org.apache.kafka.clients.producer.ProducerRecord;
import org.apache.kafka.clients.producer.RecordMetadata;
import org.apache.kafka.common.utils.Utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;

import static java.util.Objects.requireNonNull;

/**
 * this is the leader elected process to send the READY table events to Megabus Ref topic, and then updating the events
 * as complete in the system table.
 */
public class TableEventProcessor extends AbstractScheduledService {

    private static final int FUTURE_BATCH_SIZE = 10000;

    private static final Logger _log = LoggerFactory.getLogger(TableEventProcessor.class);

    private final TableEventRegistry _tableEventRegistry;
    private final MetricRegistry _metricRegistry;
    private final String _tableEventRegistrationId;
    private final TableEventTools _tableEventTools;
    private final Producer<String, JsonNode> _producer;
    private final Topic _topic;
    private final ObjectMapper _objectMapper;

    public TableEventProcessor(String tableEventRegistrationId,
                               TableEventRegistry tableEventRegistry,
                               MetricRegistry metricRegistry,
                               TableEventTools tableEventTools,
                               Producer<String, JsonNode> producer,
                               ObjectMapper objectMapper,
                               Topic topic) {
        _tableEventRegistry = requireNonNull(tableEventRegistry);
        _metricRegistry = requireNonNull(metricRegistry);
        _tableEventRegistrationId = requireNonNull(tableEventRegistrationId);
        _tableEventTools = requireNonNull(tableEventTools);
        _producer = requireNonNull(producer);
        _objectMapper = requireNonNull(objectMapper);
        _topic = requireNonNull(topic);
    }

    @Override
    protected void runOneIteration() throws Exception {
        Map.Entry<String, TableEvent> tableEventPair;

        while ((tableEventPair = _tableEventRegistry.getNextReadyTableEvent(_tableEventRegistrationId)) != null) {

            String table = tableEventPair.getKey();
            TableEvent tableEvent = tableEventPair.getValue();

            processTableEvent(table, tableEvent.getStorage(),
                    tableEvent.getAction() == TableEvent.Action.DROP ? MegabusRef.RefType.DELETED : MegabusRef.RefType.TOUCH);

            _tableEventRegistry.markTableEventAsComplete(_tableEventRegistrationId, table, tableEvent.getStorage());
        }
    }

    private void processTableEvent(String table, String uuid, MegabusRef.RefType refType) {

        Iterator<Future<RecordMetadata>> futures =  _tableEventTools.getIdsForStorage(table, uuid)
                .map(key -> new MegabusRef(table, key, TimeUUIDs.minimumUuid(), null, refType))
                .map(ref -> {
                    String key = Coordinate.of(ref.getTable(), ref.getKey()).toString();
                    return new ProducerRecord<String, JsonNode>(_topic.getName(),
                            Utils.toPositive(Utils.murmur2(key.getBytes())) % _topic.getPartitions(),
                            TimeUUIDs.newUUID().toString(),_objectMapper.valueToTree(Collections.singletonList(ref)));
                })
                .map(_producer::send)
                .iterator();

        Iterator<List<Future<RecordMetadata>>> partitionedFutures = Iterators.partition(futures, FUTURE_BATCH_SIZE);

        while (partitionedFutures.hasNext()) {
            partitionedFutures.next().forEach(Futures::getUnchecked);
        }
    }

    @Override
    protected Scheduler scheduler() {
        return Scheduler.newFixedDelaySchedule(0, 1, TimeUnit.HOURS);
    }
}


text:
These settings apply only when `--csharp` is specified on the command line.
Please also specify `--csharp-sdks-folder=<path to "SDKs" directory of your azure-sdk-for-net clone>`.

```yaml $(csharp)
csharp:
  azure-arm: false
  license-header: MICROSOFT_MIT_NO_VERSION
  clear-output-folder: true
  client-side-validation: false
  namespace: Microsoft.CommunicationServices
  output-folder: $(csharp-sdks-folder)/communicationservices/management/Microsoft.CommunicationServices/GeneratedProtocol
```


text:
UnicodeExtras
=============

Installation
------------

    julia> Pkg.clone("git://github.com/nolta/UnicodeExtras.git")

Usage
-----

### File encoding

```jlcon
julia> using UnicodeExtras

julia> b = encode("Ålborg", "iso-8859-1")
6-element Array{Uint8,1}:
 0xc5
 0x6c
 0x62
 0x6f
 0x72
 0x67

julia> decode(b, "iso-8859-1")
"Ålborg"
```

### Case handling

This package extends Julia's builtin `uppercase` and `lowercase` functions,
and adds `titlecase` and `foldcase`.

```jlcon
julia> uppercase("testingß")
"TESTINGß"

julia> using UnicodeExtras

julia> uppercase("testingß")
"TESTINGSS"

julia> set_locale("tr")  # set locale to Turkish
"tr"

julia> uppercase("testingß")
"TESTİNGSS"
```

Note that "ß" gets converted to "SS" after UnicodeExtras is loaded,
and "i" gets converted to "İ" (dotted capital I)
after the locale is set to Turkish.

### UnicodeText

In julia, a string is conceptually an array of unicode code points.
While well defined, this occasionally causes confusion because a single
code point doesn't necessarily correspond to what people perceive as a single
"character".

Take the following example:

```jlcon
julia> n1 = "noe\u0308l"
"noël"

julia> length(s)
5
```

Here, the `ë` "character" here consists of two code points: 'e' & '\u0308',
and so the length of the string is 5, not 4.

```jlcon
julia> noel1 = UnicodeText("noe\u0308l")
"noël"

julia> noel2 = UnicodeText("noël")
"noël"

julia> noel1.data
5-element Array{Uint16,1}:
 0x006e
 0x006f
 0x0065
 0x0308
 0x006c

julia> noel2.data
4-element Array{Uint16,1}:
 0x006e
 0x006f
 0x00eb
 0x006c

julia> noel1 == noel2
true

julia> length(noel1) == 4 == length(noel2)
true

julia> noel1[1:3]
"noë"
```

UnicodeText comparisons are locale sensitive:

```
julia> set_locale("de")  # german
"de"

julia> UnicodeText("Köpfe") < UnicodeText("Kypper")
true

julia> set_locale("sv")  # swedish
"sv"

julia> UnicodeText("Köpfe") < UnicodeText("Kypper")
false
```


text:
package org.apache.beam.runners.spark.io;

import java.io.Closeable;
import java.io.IOException;
import java.io.Serializable;
import java.util.Collections;
import org.apache.beam.runners.spark.SparkPipelineOptions;
import org.apache.beam.runners.spark.coders.CoderHelpers;
import org.apache.beam.runners.spark.metrics.MetricsAccumulator;
import org.apache.beam.runners.spark.metrics.SparkMetricsContainer;
import org.apache.beam.runners.spark.stateful.StateSpecFunctions;
import org.apache.beam.runners.spark.translation.SparkRuntimeContext;
import org.apache.beam.runners.spark.translation.streaming.UnboundedDataset;
import org.apache.beam.runners.spark.util.GlobalWatermarkHolder;
import org.apache.beam.runners.spark.util.GlobalWatermarkHolder.SparkWatermarks;
import org.apache.beam.sdk.io.Source;
import org.apache.beam.sdk.io.UnboundedSource;
import org.apache.beam.sdk.io.UnboundedSource.CheckpointMark;
import org.apache.beam.sdk.metrics.Gauge;
import org.apache.beam.sdk.metrics.Metrics;
import org.apache.beam.sdk.metrics.MetricsContainer;
import org.apache.beam.sdk.metrics.MetricsEnvironment;
import org.apache.beam.sdk.transforms.windowing.BoundedWindow;
import org.apache.beam.sdk.transforms.windowing.GlobalWindow;
import org.apache.beam.sdk.util.WindowedValue;
import org.apache.spark.Accumulator;
import org.apache.spark.api.java.JavaRDD;
import org.apache.spark.api.java.JavaSparkContext$;
import org.apache.spark.api.java.function.FlatMapFunction;
import org.apache.spark.api.java.function.Function;
import org.apache.spark.rdd.RDD;
import org.apache.spark.streaming.Duration;
import org.apache.spark.streaming.StateSpec;
import org.apache.spark.streaming.Time;
import org.apache.spark.streaming.api.java.JavaDStream;
import org.apache.spark.streaming.api.java.JavaMapWithStateDStream;
import org.apache.spark.streaming.api.java.JavaPairInputDStream;
import org.apache.spark.streaming.api.java.JavaPairInputDStream$;
import org.apache.spark.streaming.api.java.JavaStreamingContext;
import org.apache.spark.streaming.dstream.DStream;
import org.apache.spark.streaming.scheduler.StreamInputInfo;
import org.joda.time.Instant;

import scala.Tuple2;
import scala.runtime.BoxedUnit;

/**
 * A "composite" InputDStream implementation for {@link UnboundedSource}s.
 *
 *
This read is a composite of the following steps:
 *

 *
Create a single-element (per-partition) stream, that contains the (partitioned)
 * {@link Source} and an optional {@link CheckpointMark} to start from.

 *
Read from within a stateful operation {@link JavaPairInputDStream#mapWithState(StateSpec)}
 * using the {@link StateSpecFunctions#mapSourceFunction} mapping function,
 * which manages the state of the CheckpointMark per partition.

 *
Since the stateful operation is a map operation, the read iterator needs to be flattened,
 * while reporting the properties of the read (such as number of records) to the tracker.

 *

 */
public class SparkUnboundedSource {

  public static <T, CheckpointMarkT extends CheckpointMark> UnboundedDataset<T> read(
      JavaStreamingContext jssc,
      SparkRuntimeContext rc,
      UnboundedSource<T, CheckpointMarkT> source,
      String stepName) {

    SparkPipelineOptions options = rc.getPipelineOptions().as(SparkPipelineOptions.class);
    Long maxRecordsPerBatch = options.getMaxRecordsPerBatch();
    SourceDStream<T, CheckpointMarkT> sourceDStream =
        new SourceDStream<>(jssc.ssc(), source, rc, maxRecordsPerBatch);

    JavaPairInputDStream<Source<T>, CheckpointMarkT> inputDStream =
        JavaPairInputDStream$.MODULE$.fromInputDStream(sourceDStream,
            JavaSparkContext$.MODULE$.<Source<T>>fakeClassTag(),
                JavaSparkContext$.MODULE$.<CheckpointMarkT>fakeClassTag());

    // call mapWithState to read from a checkpointable sources.
    JavaMapWithStateDStream<Source<T>, CheckpointMarkT, Tuple2<byte[], Instant>,
        Tuple2<Iterable<byte[]>, Metadata>> mapWithStateDStream =
        inputDStream.mapWithState(
            StateSpec
                .function(StateSpecFunctions.<T, CheckpointMarkT>mapSourceFunction(rc, stepName))
                .numPartitions(sourceDStream.getNumPartitions()));

    // set checkpoint duration for read stream, if set.
    checkpointStream(mapWithStateDStream, options);

    // report the number of input elements for this InputDStream to the InputInfoTracker.
    int id = inputDStream.inputDStream().id();
    JavaDStream<Metadata> metadataDStream = mapWithStateDStream.map(new Tuple2MetadataFunction());

    // register ReadReportDStream to report information related to this read.
    new ReadReportDStream(metadataDStream.dstream(), id, getSourceName(source, id), stepName)
        .register();

    // output the actual (deserialized) stream.
    WindowedValue.FullWindowedValueCoder<T> coder =
        WindowedValue.FullWindowedValueCoder.of(
            source.getDefaultOutputCoder(),
            GlobalWindow.Coder.INSTANCE);
    JavaDStream<WindowedValue<T>> readUnboundedStream =
        mapWithStateDStream
            .flatMap(new Tuple2byteFlatMapFunction())
            .map(CoderHelpers.fromByteFunction(coder));
    return new UnboundedDataset<>(readUnboundedStream, Collections.singletonList(id));
  }

  private static <T> String getSourceName(Source<T> source, int id) {
    StringBuilder sb = new StringBuilder();
    for (String s: source.getClass().getSimpleName().replace("$", "").split("(?=[A-Z])")) {
      String trimmed = s.trim();
      if (!trimmed.isEmpty()) {
        sb.append(trimmed).append(" ");
      }
    }
    return sb.append("[").append(id).append("]").toString();
  }

  private static void checkpointStream(JavaDStream<?> dStream,
                                       SparkPipelineOptions options) {
    long checkpointDurationMillis = options.getCheckpointDurationMillis();
    if (checkpointDurationMillis > 0) {
      dStream.checkpoint(new Duration(checkpointDurationMillis));
    }
  }

  /**
   * A DStream function for reporting information related to the read process.
   *
   *
Reports properties of the read to
   * {@link org.apache.spark.streaming.scheduler.InputInfoTracker}
   * for RateControl purposes and visibility.

   *
Updates {@link GlobalWatermarkHolder}.

   *
Updates {@link MetricsAccumulator} with metrics reported in the read.

   */
  private static class ReadReportDStream extends DStream<BoxedUnit> {

    private static final String READ_DURATION_MILLIS = "readDurationMillis";
    private static final String NAMESPACE = "spark-runner.io";

    private final DStream<Metadata> parent;
    private final int inputDStreamId;
    private final String sourceName;
    private final String stepName;

    ReadReportDStream(
        DStream<Metadata> parent,
        int inputDStreamId,
        String sourceName,
        String stepName) {
      super(parent.ssc(), JavaSparkContext$.MODULE$.<BoxedUnit>fakeClassTag());
      this.parent = parent;
      this.inputDStreamId = inputDStreamId;
      this.sourceName = sourceName;
      this.stepName = stepName;
    }

    @Override
    public Duration slideDuration() {
      return parent.slideDuration();
    }

    @Override
    public scala.collection.immutable.List<DStream<?>> dependencies() {
      return scala.collection.JavaConversions.asScalaBuffer(
          Collections.<DStream<?>>singletonList(parent)).toList();
    }

    @Override
    public scala.Option<RDD<BoxedUnit>> compute(Time validTime) {
      // compute parent.
      scala.Option<RDD<Metadata>> parentRDDOpt = parent.getOrCompute(validTime);
      final Accumulator<SparkMetricsContainer> metricsAccum = MetricsAccumulator.getInstance();
      long count = 0;
      SparkWatermarks sparkWatermark = null;
      Instant globalLowWatermarkForBatch = BoundedWindow.TIMESTAMP_MIN_VALUE;
      Instant globalHighWatermarkForBatch = BoundedWindow.TIMESTAMP_MIN_VALUE;
      long maxReadDuration = 0;
      if (parentRDDOpt.isDefined()) {
        JavaRDD<Metadata> parentRDD = parentRDDOpt.get().toJavaRDD();
        for (Metadata metadata: parentRDD.collect()) {
          count += metadata.getNumRecords();
          // compute the global input watermark - advance to latest of all partitions.
          Instant partitionLowWatermark = metadata.getLowWatermark();
          globalLowWatermarkForBatch =
              globalLowWatermarkForBatch.isBefore(partitionLowWatermark)
                  ? partitionLowWatermark : globalLowWatermarkForBatch;
          Instant partitionHighWatermark = metadata.getHighWatermark();
          globalHighWatermarkForBatch =
              globalHighWatermarkForBatch.isBefore(partitionHighWatermark)
                  ? partitionHighWatermark : globalHighWatermarkForBatch;
          // Update metrics reported in the read
          final Gauge gauge = Metrics.gauge(NAMESPACE, READ_DURATION_MILLIS);
          final MetricsContainer container = metadata.getMetricsContainer().getContainer(stepName);
          try (Closeable ignored = MetricsEnvironment.scopedMetricsContainer(container)) {
            final long readDurationMillis = metadata.getReadDurationMillis();
            if (readDurationMillis > maxReadDuration) {
              gauge.set(readDurationMillis);
            }
          } catch (IOException e) {
            throw new RuntimeException(e);
          }
          metricsAccum.value().update(metadata.getMetricsContainer());
        }

        sparkWatermark =
            new SparkWatermarks(
                globalLowWatermarkForBatch,
                globalHighWatermarkForBatch,
                new Instant(validTime.milliseconds()));
        // add to watermark queue.
        GlobalWatermarkHolder.add(inputDStreamId, sparkWatermark);
      }
      // report - for RateEstimator and visibility.
      report(validTime, count, sparkWatermark);
      return scala.Option.empty();
    }

    private void report(Time batchTime, long count, SparkWatermarks sparkWatermark) {
      // metadata - #records read and a description.
      scala.collection.immutable.Map<String, Object> metadata =
          new scala.collection.immutable.Map.Map1<String, Object>(
              StreamInputInfo.METADATA_KEY_DESCRIPTION(),
              String.format(
                  "Read %d records with observed watermarks %s, from %s for batch time: %s",
                  count,
                  sparkWatermark == null ? "N/A" : sparkWatermark,
                  sourceName,
                  batchTime));
      StreamInputInfo streamInputInfo = new StreamInputInfo(inputDStreamId, count, metadata);
      ssc().scheduler().inputInfoTracker().reportInfo(batchTime, streamInputInfo);
    }
  }

  /**
   * A metadata holder for an input stream partition.
   */
  public static class Metadata implements Serializable {
    private final long numRecords;
    private final Instant lowWatermark;
    private final Instant highWatermark;
    private final long readDurationMillis;
    private final SparkMetricsContainer metricsContainer;

    public Metadata(
        long numRecords,
        Instant lowWatermark,
        Instant highWatermark,
        final long readDurationMillis,
        SparkMetricsContainer metricsContainer) {
      this.numRecords = numRecords;
      this.readDurationMillis = readDurationMillis;
      this.metricsContainer = metricsContainer;
      this.lowWatermark = lowWatermark;
      this.highWatermark = highWatermark;
      metricsContainer.materialize();
    }

    long getNumRecords() {
      return numRecords;
    }

    Instant getLowWatermark() {
      return lowWatermark;
    }

    Instant getHighWatermark() {
      return highWatermark;
    }

    public long getReadDurationMillis() {
      return readDurationMillis;
    }

    SparkMetricsContainer getMetricsContainer() {
      return metricsContainer;
    }
  }

  private static class Tuple2MetadataFunction
      implements Function<Tuple2<Iterable<byte[]>, Metadata>, Metadata> {

    @Override
    public Metadata call(Tuple2<Iterable<byte[]>, Metadata> t2) throws Exception {
      return t2._2();
    }
  }

  private static class Tuple2byteFlatMapFunction
      implements FlatMapFunction<Tuple2<Iterable<byte[]>, Metadata>, byte[]> {

    @Override
    public Iterable<byte[]> call(Tuple2<Iterable<byte[]>, Metadata> t2) throws Exception {
      return t2._1();
    }
  }
}


text:
<?php

/*
 *
 *  ____            _        _   __  __ _                  __  __ ____
 * |  _ \ ___   ___| | _____| |_|  \/  (_)_ __   ___      |  \/  |  _ \
 * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
 * |  __/ (_) | (__|   <  __/ |_| |  | | | | | |  __/_____| |  | |  __/
 * |_|   \___/ \___|_|\_\___|\__|_|  |_|_|_| |_|\___|     |_|  |_|_|
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * @author PocketMine Team
 * @link http://www.pocketmine.net/
 *
 *
*/

namespace pocketmine\command\defaults;

use pocketmine\command\CommandSender;
use pocketmine\event\TranslationContainer;
use pocketmine\Player;

class TransferServerCommand extends VanillaCommand{

	public function __construct($name){
		parent::__construct(
			$name,
			"%pocketmine.command.transferserver.description",
			"%pocketmine.command.transferserver.usage"
		);
		$this->setPermission("pocketmine.command.transferserver");
	}

	public function execute(CommandSender $sender, $commandLabel, array $args){
		if(count($args) < 1){
			$sender->sendMessage(new TranslationContainer("commands.generic.usage", [$this->usageMessage]));

			return false;
		}elseif(!($sender instanceof Player)){
			$sender->sendMessage("This command must be executed as a player");

			return false;
		}

		$sender->transfer($args[0], (int) ($args[1] ?? 19132));

		return true;
	}
}


text:
NOTE: If you want to maintain a custom Teleport project with your own templates so that you can compile your own custom phar or track your project in version control, you should start a new project using the [Teleport boilerplate project](https://github.com/modxcms/teleport-project). This will allow you to maintain your own custom code and update the core Teleport code and artifacts as dictated by your own project requirements.

## Defining a tpl

An Extract tpl is a JSON file that describes how to build a Teleport transport package. It consists of three main properties: a `name`, some package `attributes`, and a collection of one or more `vehicles`.

### Naming the tpl

An Extract tpl's `name` is used when producing the file name of an Extracted transport package. For this reason, you should avoid the `-` or other special characters in the tpl `name`. Use `_` for word separators if you need them.

### Attributes for the package

*available in teleport >=1.2.0*

The `attributes` property provides a way to set the attributes of the transport package that is produced by the Extract. For instance, this can be used to set package attributes used by package management when installing Extras, allowing you to use Teleport as an easy way to create installable transport packages for use within any MODX installation. NOTE however that when producing packages to be used as MODX Extras, you must avoid the use of Teleport-specific transport vehicle classes. Limit the vehicles you define for these packages to those available in xPDO itself (`xPDOObjectVehicle`, `xPDOFileVehicle`, `xPDOScriptVehicle`, or `xPDOTransportVehicle`).

Here is an example use of the `attributes` property that could be used to create an installable Extras package which. This theoretical `test` component located in the MODX `core/components/` directory specifies a dependency on the collections extra at version 3.x (for MODX 2.4 package dependency features) and includes the content of a changelog.txt file located within the component's directory as the `changelog` attribute:

    "attributes": {
        "changelog": {
            "sourceType": "fileContent",
            "source": "{+properties.modx.core_path}components/test/changelog.txt"
        },
        "requires": {
            "collections": "~3.0"
        }
    },

As you can see in this example, individual attributes can get their content from a file available to the Extract by setting the value of the attribute to an object with the properties `sourceType` and `source` where the `sourceType` value is set to `fileContent` and the `source` is the full path to the file to use the content from. Other `sourceType`'s may be supported in the future.

### Describing the Vehicles

The `vehicles` property describes a collection of xPDO transport vehicles that will be included in the package in the order they are described. The vehicles can be core xPDOVehicle derivatives, Teleport-specific derivatives, or even custom derivatives.

A simple example from the `settings.tpl.json` included with Teleport describes two xPDOObject vehicles that will package all System and Context Settings from a MODX installation:

    "vehicles": [
        {
            "vehicle_class": "xPDOObjectVehicle",
            "object": {
                "class": "modSystemSetting",
                "criteria": [
                    "1 = 1"
                ],
                "package": "modx"
            },
            "attributes": {
                "preserve_keys": true,
                "update_object": true
            }
        },
        {
            "vehicle_class": "xPDOObjectVehicle",
            "object": {
                "class": "modContextSetting",
                "criteria": [
                    "1 = 1"
                ],
                "package": "modx"
            },
            "attributes": {
                "preserve_keys": true,
                "update_object": true
            }
        }
    ]

When [Inject](../use/inject.md)ed, the packaged object vehicles will preserve their payload's primary keys and update existing objects in the injection target that match by primary key, as described in the attributes provided for each vehicle in the collection.

Each vehicle consists of an optional `vehicle_package`, a `vehicle_class`, an `object` defining the vehicle payload, and optional `attributes` of the vehicle. The `vehicle_package` should be omitted when using the core xPDOVehicle implementations. The `object` will be unique to each `vehicle_class` implementation.

#### xPDOFileVehicle

* `source`: the absolute path to a file or directory to be packaged
* `target`: a PHP expression that will be `eval()`'d during installation to determine where the file/directory is unpacked

#### xPDOObjectVehicle

* `class`: defines the xPDOObject class to be packaged by the vehicle
* `criteria`: an array or object describing the criteria that will be used to select instances of the specified `class`. The default value of `["1 = 1"]` is used to return true for all objects, but can be replaced with other statements like `["id:!=":2]`.
* `graph`: defines an object graph to use to package related xPDOObjects
* `graphCriteria`: defines the criteria for filtering related xPDOObjects selected by a `graph`
* `script`: an optional script to be used to create the vehicle or vehicles for this vehicle definition
* `package`: the xPDO package name for the specified `class`

#### xPDOScriptVehicle

* `source`: a script to be executed during installation of the vehicle


text:
<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>cn.momia</groupId>
    <artifactId>im</artifactId>
    <version>1.2.0</version>
    <packaging>pom</packaging>

    <name>Momia IM</name>
    <url>http://www.momia.cn</url>

    <modules>
        <module>api-im</module>
        <module>service-im</module>
    </modules>
</project>


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

namespace RevStack.Client.API.Store.Transaction
{
    public interface IValidation
    {
        void Validate(Object obj);
        bool IsValid { get; }
        Exception Exception { get; }
        ValidationType ValidationType { get; }
    }
}


text:
<?php

/**
 *  Front Page
 *  This is the front page of the website.
 *  Whatever is used in this page will be displayed on
 *  the front or first page of the website.
 *
 *  Template Name: Front Page
 */

get_header(); ?>

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

<?php echo rwmb_meta('100foldstudio_opening_statement_title'); ?>

        <?php echo rwmb_meta('100foldstudio_opening_statement'); ?>

<?php echo rwmb_meta( '100foldstudio_wn_section_title' ); ?>

            <?php

            // Get Page ID
            for ($wn_counter=1; $wn_counter<=3; $wn_counter++) {
            $page_id = rwmb_meta("100foldstudio_wn_section_{$wn_counter}_page");

                echo '
';

                //Section Header Image Check
                if (isset($page_id)) {
                    if (rwmb_meta("100foldstudio_wn_section_{$wn_counter}_header_img")) {

                        // Define Image ID
                        $img_id = rwmb_meta("100foldstudio_wn_section_{$wn_counter}_header_img");
                        echo wp_get_attachment_image($img_id, 'header-thumbnail');
                    } else {
                        echo get_the_post_thumbnail($page_id, 'header-thumbnail');
                    }
                } else {
                    // Define Image ID
                    $img_id = rwmb_meta("100foldstudio_wn_section_{$wn_counter}_header_img");
                    echo wp_get_attachment_image($img_id, 'header-thumbnail');
                }

                //Section Title Check
                if (isset($page_id)) {
                    if (rwmb_meta("100foldstudio_wn_section_{$wn_counter}_title")) {
                        echo '
' . rwmb_meta("100foldstudio_wn_section_{$wn_counter}_title") . '
';
                    } else {
                        echo '
' . get_the_title($page_id) . '
';
                    }
                } else {
                    echo '
' . rwmb_meta("100foldstudio_wn_section_{$wn_counter}_title") . '
';
                }

                //Section Description Check
                if (isset($page_id)) {
                    if (rwmb_meta("100foldstudio_wn_section_{$wn_counter}_description")) {
                        echo rwmb_meta("100foldstudio_wn_section_{$wn_counter}_description");
                    } else {
                        echo get_excerpt_by_id($page_id);
                    }
                } else {
                    echo rwmb_meta("100foldstudio_wn_section_{$wn_counter}_description");
                }

                //Section Link Check
                if (isset($page_id)) {
                    if (rwmb_meta("100foldstudio_wn_section_{$wn_counter}_link_text")) {
                        $link_text = rwmb_meta("100foldstudio_wn_section_{$wn_counter}_link_text");
                        $link_url = get_permalink($page_id);
                        echo '' . $link_text . '';
                    } else {
                        $link_url = get_permalink($page_id);
                        echo 'Learn More';
                    }
                } else {
                    $link_text = rwmb_meta("100foldstudio_wn_section_{$wn_counter}_link_text");
                    $link_url = rwmb_meta("100foldstudio_wn_section_{$wn_counter}_link_text");
                    echo '' . $link_text . '';
                }

                echo '
';
            }
            ?>

        <?php the_content(); ?>

<?php // Get Parallax Background Image
    $background_image_url = wp_get_attachment_url(rwmb_meta('100foldstudio_parallax_background_image'));
?>

<div class="full-width-parralax" data-parallax="scroll" data-image-src="<?php echo $background_image_url; ?>">

<?php echo rwmb_meta( '100foldstudio_parralax_phrase' ); ?>

<?php echo rwmb_meta( '100foldstudio_op_section_title' ); ?>

<?php echo rwmb_meta( '100foldstudio_op_section_description' ); ?>

        <a href="<?php echo rwmb_meta( '100foldstudio_op_section_tl_url' ); ?>" class="button full-width-button"><?php echo rwmb_meta( '100foldstudio_op_section_tl_text' ); ?>
        <a href="<?php echo rwmb_meta( '100foldstudio_op_section_bl_url' ); ?>" class="button inverted full-width-button"><?php echo rwmb_meta( '100foldstudio_op_section_bl_text' ); ?>

"And those are the ones on whom seed was sown on the good soil; and they hear the
word and accept it and bear fruit, thirty, sixty, and a hundredfold." Mark 4:20

<?php endwhile; else : ?>

<?php _e( 'Sorry, no posts matched your criteria.' ); ?>

<?php endif; ?>

<?php get_footer(); ?>


text:
package com.intellij.openapi.vcs.changes.ui;

import com.intellij.openapi.project.Project;
import com.intellij.openapi.vcs.changes.ChangeListOwner;
import com.intellij.openapi.vcs.changes.UnversionedViewDialog;
import com.intellij.ui.SimpleTextAttributes;

public class ChangesBrowserManyUnversionedFilesNode extends ChangesBrowserNode {
  private final Project myProject;
  private final int myUnversionedSize;
  private final int myDirsSize;
  private final MyUnversionedShower myShower;

  public ChangesBrowserManyUnversionedFilesNode(Project project, int unversionedSize, int dirsSize) {
    super(UNVERSIONED_FILES_TAG);
    myProject = project;
    myUnversionedSize = unversionedSize;
    myDirsSize = dirsSize;
    myShower = new MyUnversionedShower(myProject);
  }

  public boolean canAcceptDrop(final ChangeListDragBean dragBean) {
    return false;
  }

  public void acceptDrop(final ChangeListOwner dragOwner, final ChangeListDragBean dragBean) {
  }

  @Override
  public void render(ChangesBrowserNodeRenderer renderer, boolean selected, boolean expanded, boolean hasFocus) {
    renderer.append(userObject.toString(), SimpleTextAttributes.REGULAR_ATTRIBUTES);
    final String s = " " + (myDirsSize > 0 ? myDirsSize + " directories and " : "") + (myUnversionedSize - myDirsSize) + " files ";
    renderer.append(s, SimpleTextAttributes.GRAYED_ATTRIBUTES);
    renderer.append("browse", SimpleTextAttributes.LINK_ATTRIBUTES, myShower);
  }

  private static class MyUnversionedShower implements Runnable {
    private final Project myProject;

    public MyUnversionedShower(Project project) {
      myProject = project;
    }

    public void run() {
      final UnversionedViewDialog dialog = new UnversionedViewDialog(myProject);
      dialog.show();
    }
  }
}


text:
set -e

echo "#############################################################################################"
echo "############################ Test Ansible Galaxy Actions ... ################################"
echo "+-------------------------------------------------------------------------------------------+"
echo "|                    Download 'composer' role from Ansible Galaxy                           |"
echo "+-------------------------------------------------------------------------------------------+"
echo "| ansible-galaxy install kosssi.composer                                                    |"
echo "|  -->                                                                                |"
echo "| st2 run ansible.galaxy.install roles=kosssi.composer                                      |"
echo "+-------------------------------------------------------------------------------------------+"
st2 run ansible.galaxy.install roles=kosssi.composer

echo "+-------------------------------------------------------------------------------------------+"
echo "|                    List installed roles from Ansible Galaxy                               |"
echo "+-------------------------------------------------------------------------------------------+"
echo "| ansible-galaxy list                                                                       |"
echo "|  -->                                                                                |"
echo "| st2 run ansible.galaxy.list                                                               |"
echo "+-------------------------------------------------------------------------------------------+"
# TODO: Update after release: https://github.com/ansible/ansible/issues/16024
#st2 run ansible.galaxy.list
echo "ansible.galaxy.list command commented out until this fix gets released"
echo "https://github.com/ansible/ansible/issues/16024"

echo "+-------------------------------------------------------------------------------------------+"
echo "|              Remove previously installed 'composer' role from Ansible Galaxy              |"
echo "+-------------------------------------------------------------------------------------------+"
echo "| ansible-galaxy remove kosssi.composer                                                     |"
echo "|  -->                                                                                |"
echo "| st2 run ansible.galaxy.remove roles=kosssi.composer                                       |"
echo "+-------------------------------------------------------------------------------------------+"
# TODO: Update after release: https://github.com/ansible/ansible/issues/16024
#st2 run ansible.galaxy.remove roles=kosssi.composer
echo "ansible.galaxy.remove command commented out until this fix gets released"
echo "https://github.com/ansible/ansible/issues/16024"

echo "Done!"
exit 0


text:
using System.Web.Mvc;
using FilmWishlist.Models;
using FilmWishlist.Service;

namespace FilmWishlist.Controllers
{
    [RoutePrefix("Films")]
    public class FilmsController : Controller
    {
        private readonly IAddFilmService _addFilmService;
        private readonly IFilmDescriptionService _descriptionService;

        public FilmsController(IAddFilmService addFilmService, IFilmDescriptionService descriptionService)
        {
            _addFilmService = addFilmService;
            _descriptionService = descriptionService;
        }

        [HttpPost]
        [Route("Add")]
        public ActionResult Add(string title, int year) => Redirect(_addFilmService.AddFilm(title, year) == AddFilmResult.Successful ? "/" : "/?status=failedtoadd");

        [Route("{name}-{year}/Details")]
        public ActionResult Details(string name, string year) => View("Details", new FilmDetailsViewModel
        {
            FilmName = $"{name} ({year})",
            FilmDescription = _descriptionService.Get(name, year)
        });
    }
}


text:
namespace dgmpp {
	class Type;
	class Attribute;
	class Effect;

	class WarfareBuff {
	public:
		WarfareBuff (const MetaInfo::WarfareBuff& metaInfo, Type& owner, AttributeID modifyingAttributeID, Effect& effect);
		WarfareBuff (const WarfareBuff& other) = delete;
		WarfareBuff (WarfareBuff&& other) = delete;
		WarfareBuff& operator= (const WarfareBuff& other) = delete;
		WarfareBuff& operator= (WarfareBuff&& other) = delete;
		virtual ~WarfareBuff() = default;

		const MetaInfo::WarfareBuff& metaInfo() const noexcept { return metaInfo_; }

		const std::list<Modifier>& modifiers() const noexcept { return modifiers_; };
		Float value() const;
	private:
		friend class Type;
		Type& owner_;

		const MetaInfo::WarfareBuff& metaInfo_;
        AttributeID modifyingAttributeID_;
		std::list<Modifier>	modifiers_;
        std::list<MetaInfo::Modifier> modifiersMetaInfo_;

	};
}