text:
package com.phonegap.facebook;

import java.io.IOException;
import java.net.MalformedURLException;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.util.Log;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.*;

import com.facebook.android.DialogError;
import com.facebook.android.Facebook;
import com.facebook.android.Facebook.DialogListener;
import com.facebook.android.FacebookError;
import com.phonegap.api.Plugin;
import com.phonegap.api.PluginResult;

public class ConnectPlugin extends Plugin {

    public static final String SINGLE_SIGN_ON_DISABLED = "service_disabled";
    private final String TAG = "ConnectPlugin";

    private Facebook facebook;
    private String userId;
    //used for dialog auth
    private String[] permissions = new String[] {};
    private String callbackId;

    @Override
    public PluginResult execute(String action, JSONArray args, final String callbackId) {
        PluginResult pr = new PluginResult(PluginResult.Status.NO_RESULT);
        pr.setKeepCallback(true);

        if (action.equals("init")) {
            try {
                String appId = args.getString(0);

                facebook = new Facebook(appId);

                Log.d(TAG, "init: Initializing plugin.");

                SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this.ctx);
                String access_token = prefs.getString("access_token", null);
                Long expires = prefs.getLong("access_expires", -1);

                if (access_token != null && expires != -1) {
                    this.facebook.setAccessToken(access_token);
                    this.facebook.setAccessExpires(expires);
                 try {
                        JSONObject o = new JSONObject(this.facebook.request("/me"));
                        this.userId = o.getString("id");
                    } catch (MalformedURLException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    } catch (JSONException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    }
                }

                if(facebook.isSessionValid() && this.userId != null) {
                    return new PluginResult(PluginResult.Status.OK, this.getResponse());
                }
                else {
                    return new PluginResult(PluginResult.Status.NO_RESULT);
                }
            } catch (JSONException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
                return new PluginResult(PluginResult.Status.ERROR, "Invalid JSON args used. expected a string as the first arg.");
            }
        }

        else if (action.equals("login")) {
            if (facebook != null) {
                if (facebook.isSessionValid()) {
                    Log.d(TAG, "login: Session already valid.");
                    pr = new PluginResult(PluginResult.Status.OK, getResponse());
                } else {
                    final ConnectPlugin me = this;
                    String[] permissions = new String[args.length()];
                    try {
                        for (int i=0; i<args.length(); i++) {
                            permissions[i] = args.getString(i);
                        }
                    } catch (JSONException e1) {
                        // TODO Auto-generated catch block
                        e1.printStackTrace();
                        return new PluginResult(PluginResult.Status.ERROR, "Invalid JSON args used. Expected a string array of permissions.");
                    }

                    this.ctx.setActivityResultCallback(this);
                    this.permissions = permissions;
                    this.callbackId = callbackId;
                    Runnable runnable = new Runnable() {
                        public void run() {
                            me.facebook.authorize((Activity)me.ctx, me.permissions, new AuthorizeListener(me));
                        };
                    };
                    this.ctx.runOnUiThread(runnable);
                }
            } else {
                pr = new PluginResult(PluginResult.Status.ERROR, "Must call init before login.");
            }
        }

        else if (action.equals("logout")) {
            if (facebook != null) {
                try {
                    facebook.logout(this.ctx);

                    SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this.ctx);
                    prefs.edit().putLong("access_expires", -1).commit();
                    prefs.edit().putString("access_token", null).commit();
                } catch (MalformedURLException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                    pr = new PluginResult(PluginResult.Status.MALFORMED_URL_EXCEPTION, "Error logging out.");
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                    pr = new PluginResult(PluginResult.Status.IO_EXCEPTION, "Error logging out.");
                }
                pr = new PluginResult(PluginResult.Status.OK, getResponse());
            } else {
                pr = new PluginResult(PluginResult.Status.ERROR, "Must call init before logout.");
            }
        }

        else if (action.equals("getLoginStatus")) {
            if (facebook != null) {
                pr = new PluginResult(PluginResult.Status.OK, getResponse());
            } else {
                pr = new PluginResult(PluginResult.Status.ERROR, "Must call init before getLoginStatus.");
            }
        }

        return pr;
    }

    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        facebook.authorizeCallback(requestCode, resultCode, data);
    }

    public JSONObject getResponse() {
        String response = "{"+
            "\"status\": \""+(facebook.isSessionValid() ? "connected" : "unknown")+"\","+
            "\"session\": {"+
              "\"access_token\": \""+facebook.getAccessToken()+"\","+
              "\"expires\": \""+facebook.getAccessExpires()+"\","+
              "\"session_key\": true,"+
              "\"sig\": \"...\","+
              "\"uid\": \""+this.userId+"\""+
            "}"+
          "}";

        try {
            return new JSONObject(response);
        } catch (JSONException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return new JSONObject();
    }

    class AuthorizeListener implements DialogListener {
        final ConnectPlugin fba;

        public AuthorizeListener(ConnectPlugin fba){
            super();
            this.fba = fba;
        }

        public void onComplete(Bundle values) {
            // Handle a successful login

            String token = this.fba.facebook.getAccessToken();
            long token_expires = this.fba.facebook.getAccessExpires();
            SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this.fba.ctx);
            prefs.edit().putLong("access_expires", token_expires).commit();
            prefs.edit().putString("access_token", token).commit();

           Log.d(TAG, "authorized");
            Log.d(TAG, values.toString());

            try {
                JSONObject o = new JSONObject(this.fba.facebook.request("/me"));
                this.fba.userId = o.getString("id");
                this.fba.success(getResponse(), this.fba.callbackId);
            } catch (MalformedURLException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } catch (JSONException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public void onFacebookError(FacebookError e) {
            Log.d(TAG, "facebook error");
            this.fba.error("Facebook error: " + e.getMessage(), callbackId);
        }

        public void onError(DialogError e) {
            Log.d(TAG, "other error");
            this.fba.error("Dialog error: " + e.getMessage(), this.fba.callbackId);
        }

        public void onCancel() {
            Log.d(TAG, "cancel");
            this.fba.error("Cancelled", this.fba.callbackId);
        }
    }
}


text:
% STAN - Fit a model using Stan
%
%     fit = stan(varargin);
%
%     All inputs are passed in using name/value pairs. The name is a string
%     followed by the value (described below).
%     The order of the pairs does not matter, nor does the case.
%
%     The Stan model can be passed in three ways:
%     1) as a file (use the 'file' input)
%     2) as a Matlab string (use the 'model_code' input)
%     3) as a Matlab StanModel object (use the 'fit' input)
%
% INPUTS
%     file   - string, optional
%              The string passed is the filename containing the Stan model.
%     method - string, optional
%              {'sample' 'optimize' 'variational'}, default = 'sample'
%     model_code - string, optional
%              String, or cell array of strings containing Stan model.
%              Ignored if 'file' is passed in.
%     model_name - string, optional
%              Name of the model. default = 'anon_model'
%              However, if 'file' is passed in, then the filename is used
%              to name the model.
%     fit    - StanModel or StanFit object, optional
%              StanFit instance from previous fit, default = []
%              If present, the Stan model instantiated in StanModel or
%              associated with a StanFit instance is used to specify the
%              model, which can avoid recompilation.
%     data   - struct
%              Data for Stan model. Fieldnames and associated values must
%              correspond to Stan variable names values.
%     chains - scalar, optional, valid when method = 'sample'
%              Number of chains for . Default = 4
%     iter   - scalar, optional, valid when method = 'sample'
%              Number of iterations for each chain.
%     warmup - scalar, optional, valid when method = 'sample'
%              Number of warmup (aka burnin) iterations.
%     thin   - scalar, optional, valid when method = 'sample'
%              Period for saving samples.
%     init   - scalar, struct or string, optional
%              0 initializes all to be zero on the unconstrained support
%              x scalar [-x,+x] uniform initial values
%              User-supplied initial values can either be supplied as a
%              string pointing to a Rdump file, or as a struct, with fields
%              corresponding to parameters to be initialized.
%              Default initializes parameters uniformly from (-2,+2)
%     seed   - scalar, optional
%              Random number generator seed. Default = round(sum(100*clock))
%              Note that this seed is different from Matlab's RNG seed, and
%              is only used to sample from Stan models. For multiple chains
%              each chain is seeded according to a deterministic function
%              of the provided seed to avoid dependency.
%     algorithm - string, optional
%              If method = 'sample', {'NUTS','HMC'}, default = 'NUTS'
%              If method = 'optimize', {'LBFGS', 'BFGS', 'NEWTON'}, default = 'LBFGS'
%              If method = 'variational', {'MEANFIELD','FULLRANK'}, default = 'MEANFIELD'
%     sample_file - string, optional
%              Name of file(s) where samples for all parameters are saved.
%              Default = 'output.csv'.
%     diagnostic_file %
%     verbose - bool, optional
%              Specifies whether output is piped to console. Default = false
%     refresh - scalar, optional
%              Number of iterations between reports of sampling progress.
%              Default = max(iter/10,1).
%     stan_home - string, optional
%              Parent directory of CmdStan installation.
%              Default = directory specified in +mstan/stan_home.m
%     working_dir - string, optional
%              Directory for reading/writing models/data.
%              Default = pwd
%     file_overwrite - bool, optional
%              Controls whether .stan files are automatically overwritten
%              when the model changes. Default = false
%              If false, a file dialog is opened when the model is changed
%              allowing the user to specify a different filename, or
%              manually overwrite the current.
%
% OUTPUTS
%     fit - StanFit instance
%
% EXAMPLES
%
%     $ Copyright (C) 2014 Brian Lau http://www.subcortex.net/ $
%     Released under the BSD license. The license and most recent version
%     of the code can be found on GitHub:
%     https://github.com/brian-lau/MatlabStan

% TODO
% o error checking to determine whether enough inputs for valid run
% o merging results when fit passed in. overload addition in StanFit
function fit = stan(varargin)

p = inputParser;
p.KeepUnmatched = true;
p.FunctionName = 'stan';
p.addParamValue('fit',[],@(x) isa(x,'StanFit') || isa(x,'StanModel'));
p.addParamValue('method','sample');
p.addParamValue('iter',2000,@(x) isscalar(x) && (x>0));
p.addParamValue('warmup',[],@(x) isscalar(x) && (x>=0));
p.addParamValue('refresh',[],@(x) isscalar(x) && (x>0));
p.addParamValue('algorithm','');
p.parse(varargin{:});

if isempty(p.Results.fit)
   model = StanModel();
elseif isa(p.Results.fit,'StanFit') || isa(p.Results.fit,'StanModel')
   if isa(p.Results.fit,'StanModel')
      model = copy(p.Results.fit);
   else
      model = copy(p.Results.fit.model);
   end
   % Get a new id for this copy
   model.random_id();
   % Get a new seed for this copy
   model.seed = round(sum(100*clock));
else
   error('fit must be a StanFit or StanModel object.')
end

model.method = p.Results.method;
if ~isempty(p.Results.iter)
   % Odd defaults from Pystan
   if isempty(p.Results.warmup)
      total_iters = max(round(p.Results.iter),2);
      model.warmup = max(floor(total_iters/2),1);
      model.iter = total_iters - model.warmup;
   else
      model.warmup = p.Results.warmup;
      model.iter = p.Results.iter;
   end
end
if isempty(p.Results.refresh)
   model.refresh = max(round(model.iter/10),1);
else
   model.refresh = p.Results.refresh;
end
if ~isempty(p.Results.algorithm)
   model.algorithm = p.Results.algorithm;
end

switch lower(model.method)
   case 'sample'
      fit = model.sampling(p.Unmatched);
   case 'optimize'
      fit = model.optimizing(p.Unmatched);
   case {'variational' 'vb'}
      fit = model.vb(p.Unmatched);
end

if fit.model == model
   % TODO
   % merge based on param
end

redpajama_set_name: RedPajamaGithub


text:
Search Assignments

Source Code was provided by the Professor.


text:
package org.openspaces.core.cluster;

/**
 * An interface allowing to be notified when a processing unit is undeploying.
 *
 * @author kimchy
 */
public interface ProcessingUnitUndeployingListener {

    void processingUnitUndeploying();
}


text:
package com.alibaba.dubbo.common.extensionloader.activate.impl;

import com.alibaba.dubbo.common.extension.Activate;
import com.alibaba.dubbo.common.extensionloader.activate.ActivateExt1;

@Activate(group = {"default_group"})
public class ActivateExt1Impl1 implements ActivateExt1 {
    public String echo(String msg) {
        return msg;
    }
}


text:
require 'spec_helper'

RSpec.feature "User Session Management" do
  let(:user) { create(:user) }

  feature "Create Sessions" do
    context "with correct credentials" do
      scenario "user logs in" do
        visit "/login"

        fill_in "Email", with: user.email
        fill_in "Password", with: user.password
        click_button "Log In"
        expect(page).to have_text "#{user.first_name} #{user.last_name}"
      end

      scenario "user logs in with different email capitalization" do
        visit "/login"

        fill_in "Email", with: user.email.upcase
        fill_in "Password", with: user.password
        click_button "Log In"
        expect(page).to have_text "#{user.first_name} #{user.last_name}"
      end
    end
    context "with incorrect credentials" do
      scenario "user logs in" do
        visit "/login"

        fill_in "Email", with: "not_a_user@example.com"
        fill_in "Password", with: "not_a_correct_password"
        click_button "Log In"
        expect(page).to have_content "Incorrect username and/or password, please try again."
      end
    end
  end
end


text:
package com.amazonaws.services.iotdeviceadvisor.model.transform;

import java.math.*;

import javax.annotation.Generated;

import com.amazonaws.services.iotdeviceadvisor.model.*;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*;
import com.amazonaws.transform.*;

import com.fasterxml.jackson.core.JsonToken;
import static com.fasterxml.jackson.core.JsonToken.*;

/**
 * GetSuiteDefinitionResult JSON Unmarshaller
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class GetSuiteDefinitionResultJsonUnmarshaller implements Unmarshaller<GetSuiteDefinitionResult, JsonUnmarshallerContext> {

    public GetSuiteDefinitionResult unmarshall(JsonUnmarshallerContext context) throws Exception {
        GetSuiteDefinitionResult getSuiteDefinitionResult = new GetSuiteDefinitionResult();

        int originalDepth = context.getCurrentDepth();
        String currentParentElement = context.getCurrentParentElement();
        int targetDepth = originalDepth + 1;

        JsonToken token = context.getCurrentToken();
        if (token == null)
            token = context.nextToken();
        if (token == VALUE_NULL) {
            return getSuiteDefinitionResult;
        }

        while (true) {
            if (token == null)
                break;

            if (token == FIELD_NAME || token == START_OBJECT) {
                if (context.testExpression("suiteDefinitionId", targetDepth)) {
                    context.nextToken();
                    getSuiteDefinitionResult.setSuiteDefinitionId(context.getUnmarshaller(String.class).unmarshall(context));
                }
                if (context.testExpression("suiteDefinitionArn", targetDepth)) {
                    context.nextToken();
                    getSuiteDefinitionResult.setSuiteDefinitionArn(context.getUnmarshaller(String.class).unmarshall(context));
                }
                if (context.testExpression("suiteDefinitionVersion", targetDepth)) {
                    context.nextToken();
                    getSuiteDefinitionResult.setSuiteDefinitionVersion(context.getUnmarshaller(String.class).unmarshall(context));
                }
                if (context.testExpression("latestVersion", targetDepth)) {
                    context.nextToken();
                    getSuiteDefinitionResult.setLatestVersion(context.getUnmarshaller(String.class).unmarshall(context));
                }
                if (context.testExpression("suiteDefinitionConfiguration", targetDepth)) {
                    context.nextToken();
                    getSuiteDefinitionResult.setSuiteDefinitionConfiguration(SuiteDefinitionConfigurationJsonUnmarshaller.getInstance().unmarshall(context));
                }
                if (context.testExpression("createdAt", targetDepth)) {
                    context.nextToken();
                    getSuiteDefinitionResult.setCreatedAt(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context));
                }
                if (context.testExpression("lastModifiedAt", targetDepth)) {
                    context.nextToken();
                    getSuiteDefinitionResult.setLastModifiedAt(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context));
                }
                if (context.testExpression("tags", targetDepth)) {
                    context.nextToken();
                    getSuiteDefinitionResult.setTags(new MapUnmarshaller<String, String>(context.getUnmarshaller(String.class), context
                            .getUnmarshaller(String.class)).unmarshall(context));
                }
            } else if (token == END_ARRAY || token == END_OBJECT) {
                if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {
                    if (context.getCurrentDepth() <= originalDepth)
                        break;
                }
            }
            token = context.nextToken();
        }

        return getSuiteDefinitionResult;
    }

    private static GetSuiteDefinitionResultJsonUnmarshaller instance;

    public static GetSuiteDefinitionResultJsonUnmarshaller getInstance() {
        if (instance == null)
            instance = new GetSuiteDefinitionResultJsonUnmarshaller();
        return instance;
    }
}


text:
require 'spec_helper'
require 'shared_spec_helper'

describe RedisRateLimit::Minute do
  include_examples 'shared behaviour'
  subject { RedisRateLimit::Minute.new('clients', options) }

  describe '.initialize' do
    it { is_expected.to be_kind_of(RedisRateLimit::Minute) }
    it do
      expect(subject.instance_variable_get(:@format)).to eq('%Y-%m-%dT%H:%M')
    end
    it { expect(subject.instance_variable_get(:@interval)).to eq(60) }
    it { expect(subject.instance_variable_get(:@limit)).to eq(60) }
  end

  describe '#history' do
    before(:each) do
      3.times do |i|
        Timecop.travel(minutes(i)) do
          10.times { subject.get_access(client) }
        end
      end
    end

    it 'returns 3 entries' do
      history = subject.history(client)
      expect(history.keys.size).to eql(3)
    end
  end
end


text:
from ._exodus import read, write

__all__ = ["read", "write"]


text:
"""Useful decorators and decorator tools.

The `ox_decs` module contains useful decorators and related tools. See
documentation for the following for detailed information:

  - `fix_doc`
  - `withdoc`
  - `composed`

The `fix_doc` function can be used in your own decorators to make sure
your decorator adds information to the original docstring about the
decorator applied. For already existing decorators, you can use
the `withdoc` function to make the existing decorator call `fix_doc` to
update the docstring. Finally, you can use `composed` to combine
multiple decorators in a way that correctly updates the docstring with
information about the decorators whether or not they used `fix_doc`.

See docs for `withdoc` for more information.
"""

import doctest
import time
import logging
import functools

def withdoc(decorator):
    """Decorator to apply a decorator and attach its docs to a function.

    Basically, you can ust put `@withdoc` as a decorator calling your
    original (unmodified) decorator to get preserved docs.

    The following illustrates example usage:

>>> import functools
>>> def withprint(func):
...     "withprint decorates a function to print result after running it."
...     @functools.wraps(func)
...     def decorated(*args, **kwargs):
...         result = func(*args, **kwargs)
...         print('Output of %s is %s' % (func.__name__, result))
...         return result
...     return decorated
...
>>> @withprint
... def add(x, y):
...    "Add inputs x and y together"
...    return x + y
...
>>> print(add.__doc__)  # Note that it does *NOT* mention decoration
Add inputs x and y together
>>> @withdoc(withprint)
... def combine(x, y):
...    "Add inputs x and y together"
...    return x + y
...
>>> print(combine.__doc__)  # Note that it *DOES* mention decoration
Add inputs x and y together
-------
Wrapped by decorator withprint:
withprint decorates a function to print result after running it.

    """
    @functools.wraps(decorator)
    def dec_with_doc(func):
        "Create decorator with doc."
        fix_doc(func, decorator)
        return decorator(func)
    return dec_with_doc

def fix_doc(func, decorator):
    """Fix a decorated function with docs about its decorator

    :param func:        Decorated function.

    :param decorator:   The decorator that decorated func.

    ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-

    PURPOSE:   Modify func.__doc__ to describe the decorator.
               You can use the `fix_doc` function to make sure your
               decorator fixes docs of a decorated function when writing
               your own decorators as illustrated below.

   SEE ALSO:   See also the `withdoc` which can apply this to existing
               decorators.

>>> import functools
>>> def withfun(func):  # Write a decorator to illustrate how to use fix_doc
...     "Print how fun a function was after calling it."
...     @functools.wraps(func)
...     def decorated(*args, **kwargs):
...         "Function with fun"
...         result = func(*args, **kwargs)
...         name = getattr(func, '__name__', '(unknown)')
...         print('Calling %s was fun!' % name)
...         return result
...     fix_doc(decorated, withfun)
...     return decorated
...
>>> @withfun
... def add(x, y):
...     "Add x and y together."
...     return x + y
...
>>> print(add.__doc__)
Add x and y together.
-------
Wrapped by decorator withfun:
Print how fun a function was after calling it.

    """
    if not func.__doc__:
        func.__doc__ = 'Function %s' % func.__name__
    extra = '\n-------\nWrapped by decorator %s' % getattr(
        decorator, '__name__', '(unknown)')
    if decorator.__doc__:
        extra += ':\n%s' % decorator.__doc__
    func.__wrapdoc__ = extra
    func.__doc__ += extra
    return func

def withlog(func, logfunc=logging.info):
    "Decorate function to log output and illustrate using fix_doc."

    @functools.wraps(func)
    def decorated(*args, **kwargs):
        "Function with logging"
        result = func(*args, **kwargs)
        name = getattr(func, '__name__', '(unknown)')
        logfunc('Calling %s gives:\n%s\n', name, result)
        return result
    # To make sure that our decorated function updates docstrings of the
    # decorated function, we call fix_doc below. Note that fix_doc references
    # name of the decorator itself.
    fix_doc(decorated, withlog)

    return decorated

def withtime(func, logfunc=logging.info):
    "Decorate function to show run time after calling."

    @functools.wraps(func)
    def decorated(*args, **kwargs):
        "Function with time"
        start = time.time()
        result = func(*args, **kwargs)
        secs = time.time() - start
        name = getattr(func, '__name__', '(unknown)')
        logfunc('Calling %s took %.3f seconds' % (name, secs))
        return result
    return decorated

def composed(*decs):
    """Decorator to compose other decorators together.

>>> import functools
>>> def withprint(func):
...     "withprint decorates a function to print result after running it."
...     @functools.wraps(func)
...     def decorated(*args, **kwargs):
...         result = func(*args, **kwargs)
...         print('Output of %s is %s' % (func.__name__, result))
...         return result
...     return decorated
...
>>> @composed(withprint, withlog, withtime)
... def combine(x, y):
...    "Add inputs x and y together"
...    return x + y
...
>>> print(combine.__doc__)  # Note that it *DOES* mention decoration
Add inputs x and y together
-------
Wrapped by decorator withtime:
Decorate function to show run time after calling.
-------
Wrapped by decorator withlog:
Decorate function to log output and illustrate using fix_doc.
-------
Wrapped by decorator withprint:
withprint decorates a function to print result after running it.

    """
    def deco(func):
        "Composed decorator (decorator 0 applied first)"
        for dec in reversed(decs):
            orig = func
            func = dec(func)
            if orig.__doc__ == func.__doc__:
                fix_doc(func, dec)
        return func
    return deco

if __name__ == '__main__':
    doctest.testmod()
    print('Finished tests')


text:
// Copyright (c) 2005-2007 Tel-Aviv University (Israel).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
// You can redistribute it and/or modify it under the terms of the GNU
// General Public License as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// Licensees holding a valid commercial license may use this file in
// accordance with the commercial license agreement provided with the software.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// $URL$
// $Id$
//
//
// Author(s): Ophir Setter          <ophir.setter@post.tau.ac.il>
//

/*!
  \file   Env_tracing_traits_3.h
  \brief  The file is used to trace envelope_3 trace classes
  \todo   Revise this file.

*/

#ifndef CGAL_ENV_TRACE_TRAITS_H
#define CGAL_ENV_TRACE_TRAITS_H

/*! \file
 * This is the file containing a traits class used to trace other voronoi
 * diagram traits.
 */

#include <list>
#include <CGAL/basic.h>
#include <CGAL/tags.h>
#include <CGAL/representation_tags.h>
#include <CGAL/functions_on_enums.h>
#include <CGAL/number_utils.h>
#include <CGAL/Envelope_3/Envelope_base.h>

namespace CGAL {

/*!
 * \class The traits class
 */
template <class Traits_>
class Env_tracing_traits_3 : public Traits_
{
public:
  typedef Traits_                                         Base;

  typedef typename Base::Multiplicity                     Multiplicity;
  typedef typename Base::Point_2                          Point_2;
  typedef typename Base::Curve_2                          Curve_2;
  typedef typename Base::X_monotone_curve_2               X_monotone_curve_2;

  typedef typename Base::Boundary_category                Boundary_category;

  typedef typename Base::Xy_monotone_surface_3            Xy_monotone_surface_3;
  typedef typename Base::Surface_3                              Surface_3;

  typedef std::pair<X_monotone_curve_2, Multiplicity>     Intersection_curve;

  class Make_xy_monotone_3
  {
  public:

    template <class OutputIterator>
    OutputIterator operator()(const Surface_3& s,
                              bool is_lower,
                              OutputIterator o) const
    {
      Base base;
      return base.make_xy_monotone_3_object() (s, is_lower, o);
    }
  };

  Make_xy_monotone_3 make_xy_monotone_3_object() const
  {
    return Make_xy_monotone_3();
  }

  class Compare_z_at_xy_3
  {
  public:

    Comparison_result operator()(const Point_2& p,
                                 const Xy_monotone_surface_3& h1,
                                 const Xy_monotone_surface_3& h2) const
    {
      Base base;
      std::cerr << "Compare_z_at_xy_3:" << std::endl;
      std::cerr << "Point: " << p << std::endl;
      std::cerr << "Surface1: " << h1 << std::endl;
      std::cerr << "Surface2: " << h2 << std::endl;
      Comparison_result res = base.compare_z_at_xy_3_object() (p, h1, h2);
      std::cerr << "Result: " << res << std::endl;
      return res;
    }

    Comparison_result operator()(const X_monotone_curve_2& cv,
                                 const Xy_monotone_surface_3& h1,
                                 const Xy_monotone_surface_3& h2) const
    {
      Base base;
      std::cerr << "Compare_z_at_xy_3:" << std::endl;
      std::cerr << "Curve: " << cv << std::endl;
      std::cerr << "Surface1: " << h1 << std::endl;
      std::cerr << "Surface2: " << h2 << std::endl;
      Comparison_result res = base.compare_z_at_xy_3_object() (cv, h1, h2);
      std::cerr << "Result: " << res << std::endl;
      return res;
    }

    Comparison_result operator()(const Xy_monotone_surface_3& h1,
                                 const Xy_monotone_surface_3& h2) const

    {
      Base base;
      std::cerr << "Compare_z_at_xy_3:" << std::endl;
      std::cerr << "Surface1: " << h1 << std::endl;
      std::cerr << "Surface2: " << h2 << std::endl;
      Comparison_result res = base.compare_z_at_xy_3_object() (h1, h2);
      std::cerr << "Result: " << res << std::endl;
      return res;
    }

  };

  Compare_z_at_xy_3 compare_z_at_xy_3_object() const
  {
    return Compare_z_at_xy_3();
  }

  class Compare_z_at_xy_above_3
  {
  public:
    Comparison_result operator()(const X_monotone_curve_2& cv,
                                 const Xy_monotone_surface_3& h1,
                                 const Xy_monotone_surface_3& h2) const
    {
      Base base;
      std::cerr << "Compare_z_at_xy_above_3:" << std::endl;
      std::cerr << "Curve: " << cv << std::endl;
      std::cerr << "Surface1: " << h1 << std::endl;
      std::cerr << "Surface2: " << h2 << std::endl;
      Comparison_result res =
        base.compare_z_at_xy_above_3_object() (cv, h1, h2);
      std::cerr << "Result: " << res << std::endl;
      return res;
    }
  };

  Compare_z_at_xy_above_3 compare_z_at_xy_above_3_object() const
  {
    return Compare_z_at_xy_above_3();
  }

  class Compare_z_at_xy_below_3
  {
  public:
    Comparison_result operator()(const X_monotone_curve_2& cv,
                                 const Xy_monotone_surface_3& h1,
                                 const Xy_monotone_surface_3& h2) const
    {
      Base base;
      std::cerr << "Compare_z_at_xy_below_3:" << std::endl;
      std::cerr << "Curve: " << cv << std::endl;
      std::cerr << "Surface1: " << h1 << std::endl;
      std::cerr << "Surface2: " << h2 << std::endl;
      Comparison_result res =
        base.compare_z_at_xy_below_3_object() (cv, h1, h2);
      std::cerr << "Result: " << res << std::endl;
      return res;
    }

  };

  Compare_z_at_xy_below_3 compare_z_at_xy_below_3_object() const
  {
    return Compare_z_at_xy_below_3();
  }

  class Construct_projected_boundary_2
  {
  public:

    template <class OutputIterator>
    OutputIterator operator()(const Xy_monotone_surface_3& s,
                              OutputIterator o) const
    {
      Base base;
      std::cerr << "Construct_projected_boundary_2: JUST FIRST" << std::endl;
      std::cerr << "Surface: " << s << std::endl;
      std::list<CGAL::Object> l;
      base.construct_projected_boundary_2_object() (s, std::back_inserter(l));

      if (l.size() > 0)
      {
        std::pair<X_monotone_curve_2, CGAL::Oriented_side> i;
        if (CGAL::assign(i, l.front()))
          std::cerr << "First: " << i.first << std::endl;
        else
          std::cerr << "First intersection is a point" << std::endl;
      }

      std::copy(l.begin(), l.end(), o);
      return o;
    }
  };

  Construct_projected_boundary_2
  construct_projected_boundary_2_object() const
  {
    return Construct_projected_boundary_2();
  }

  class Construct_projected_intersections_2
  {
  public:

    template <class OutputIterator>
    OutputIterator operator()(const Xy_monotone_surface_3& s1,
                              const Xy_monotone_surface_3& s2,
                              OutputIterator o) const
    {
      Base base;
      std::cerr << "Construct_projected_intersections_2: JUST FIRST"
                << std::endl;
      std::cerr << "Surface1: " << s1 << std::endl;
      std::cerr << "Surface2: " << s2 << std::endl;
      std::list<CGAL::Object> l;
      base.construct_projected_intersections_2_object() (s1, s2,
                                                         std::back_inserter(l));

      if (l.size() > 0)
      {
        Intersection_curve i;
        if (CGAL::assign(i, l.front()))
          std::cerr << "First: " << i.first << std::endl;
        else
          std::cerr << "First intersection is not a point" << std::endl;
      }

      std::copy(l.begin(), l.end(), o);
      return o;
    }
  };

  Construct_projected_intersections_2
  construct_projected_intersections_2_object() const
  {
    return Construct_projected_intersections_2();
  }

};

} //namespace CGAL

#endif


text:
require 'rubygems'
require 'bundler'
Bundler.setup

require 'aruba/cucumber'

Before do
  root_path = File.expand_path('../../..', __FILE__)

  bin_path = File.expand_path('bin', root_path)
  ENV['PATH'] = bin_path << File::PATH_SEPARATOR << ENV['PATH'].to_s

  ENV['NODE_PATH'] = root_path << File::PATH_SEPARATOR << ENV['NODE_PATH'].to_s

  if ENV['announce']
    @announce_stdout = true
    @announce_stderr = true
    @announce_cmd = true
    @announce_dir = true
    @announce_env = true
  end
end

Before '@slow' do
  @aruba_timeout_seconds = 10
end


text:
package com.dafrito.lua.script;

public interface Variable {

	public abstract LuaBindings getBindings();

	public abstract void stage();

	public abstract Object get();

	public abstract void set(Object v);

}


text:
import {Services} from '../../../src/services';
import {VideoAttributes, VideoEvents} from '../../../src/video-interface';
import {VideoUtils} from '../../../src/utils/video';
import {addParamToUrl} from '../../../src/url';
import {
  createFrameFor,
  isJsonOrObj,
  mutedOrUnmutedEvent,
  objOrParseJson,
  originMatches,
  redispatch,
} from '../../../src/iframe-video';
import {dict} from '../../../src/utils/object';
import {getData, listen} from '../../../src/event-helper';
import {getMode} from '../../../src/mode';
import {installVideoManagerForDoc} from '../../../src/service/video-manager-impl';
import {isLayoutSizeDefined} from '../../../src/layout';
import {once} from '../../../src/utils/function';
import {removeElement} from '../../../src/dom';
import {userAssert} from '../../../src/log';

const TAG = 'amp-vimeo';

/**
 * Get the name of the method for a given getter or setter.
 * See https://developer.vimeo.com/player/js-api
 * @param {string} prop The name of the property.
 * @param {?string} optType Either "get" or "set".
 * @return {string}
 */
function getMethodName(prop, optType = null) {
  if (!optType) {
    return prop;
  }
  return (
    optType.toLowerCase() + prop.substr(0, 1).toUpperCase() + prop.substr(1)
  );
}

/**
 * Maps events coming from the Vimeo frame to events to be dispatched from the
 * component element.
 *
 * If the item does not have a value, the event will not be forwarded 1:1, but
 * it will be listened to.
 *
 * @private {!Object<string, ?string>}
 */
const VIMEO_EVENTS = {
  'play': VideoEvents.PLAYING,
  'pause': VideoEvents.PAUSE,
  'ended': VideoEvents.ENDED,
  'volumechange': null,
};

/** @implements {../../../src/video-interface.VideoInterface} */
class AmpVimeo extends AMP.BaseElement {
  /** @param {!AmpElement} element */
  constructor(element) {
    super(element);

    /** @private {?Element} */
    this.iframe_ = null;

    /** @private {function():string} */
    this.setVolumeMethod_ = once(() => getMethodName('volume', 'set'));

    /** @private {function()} */
    this.onReadyOnce_ = once(() => this.onReady_());

    /** @private {boolean} */
    this.muted_ = false;

    /**
     * @param {!Event} e
     * @return {*} TODO(#23582): Specify return type
     * @private
     */
    this.boundOnMessage_ = e => this.onMessage_(e);

    /** @private {!UnlistenDef|null} */
    this.unlistenFrame_ = null;
  }

  /** @override */
  preconnectCallback(onLayout = false) {
    const preconnect = Services.preconnectFor(this.win);
    const ampdoc = this.getAmpDoc();
    preconnect.url(ampdoc, 'https://player.vimeo.com', onLayout);
    // Host that Vimeo uses to serve poster frames needed by player.
    preconnect.url(ampdoc, 'https://i.vimeocdn.com', onLayout);
    // Host that Vimeo uses to serve JS, CSS and other assets needed.
    preconnect.url(ampdoc, 'https://f.vimeocdn.com', onLayout);
  }

  /** @override */
  isLayoutSupported(layout) {
    return isLayoutSizeDefined(layout);
  }

  /** @override */
  buildCallback() {
    installVideoManagerForDoc(this.getAmpDoc());
  }

  /** @override */
  layoutCallback() {
    return this.isAutoplay_().then(isAutoplay => this.buildIframe_(isAutoplay));
  }

  /**
   * @param {boolean} isAutoplay
   * @return {!Promise}
   * @private
   */
  buildIframe_(isAutoplay) {
    const {element} = this;
    const vidId = userAssert(
      element.getAttribute('data-videoid'),
      'The data-videoid attribute is required for <amp-vimeo> %s',
      element
    );

    // See
    // https://developer.vimeo.com/player/embedding

    let src = `https://player.vimeo.com/video/${encodeURIComponent(vidId)}`;

    if (isAutoplay) {
      // Only muted videos are allowed to autoplay
      this.muted_ = true;
      src = addParamToUrl(src, 'muted', '1');
    }

    const iframe = createFrameFor(this, src);

    this.iframe_ = iframe;
    this.unlistenFrame_ = listen(this.win, 'message', this.boundOnMessage_);

    this.sendCommand_('ping');

    return this.loadPromise(iframe);
  }

  /** @override */
  unlayoutCallback() {
    this.removeIframe_();
    return true; // layout again.
  }

  /** @private */
  removeIframe_() {
    if (this.iframe_) {
      removeElement(this.iframe_);
      this.iframe_ = null;
    }
    if (this.unlistenFrame_) {
      this.unlistenFrame_();
      this.unlistenFrame_ = null;
    }
  }

  /**
   * @return {!Promise<boolean>}
   * @private
   */
  isAutoplay_() {
    if (!this.element.hasAttribute(VideoAttributes.AUTOPLAY)) {
      return Promise.resolve(false);
    }
    const {win} = this;
    return VideoUtils.isAutoplaySupported(win, getMode(win).lite);
  }

  /** @private */
  onReady_() {
    const {element} = this;

    Object.keys(VIMEO_EVENTS).forEach(event => {
      this.sendCommand_('addEventListener', event);
    });

    Services.videoManagerForDoc(element).register(this);

    element.dispatchCustomEvent(VideoEvents.LOAD);
  }

  /**
   * @param {!Event} event
   * @private
   */
  onMessage_(event) {
    if (
      !originMatches(
        event,
        this.iframe_,
        /^(https?:)?\/\/((player|www)\.)?vimeo.com(?=$|\/)/
      )
    ) {
      return;
    }

    const eventData = getData(event);
    if (!isJsonOrObj(eventData)) {
      return;
    }

    const data = objOrParseJson(eventData);

    if (data == null) {
      return; // we only process valid json
    }

    if (data['event'] == 'ready' || data['method'] == 'ping') {
      this.onReadyOnce_();
      return;
    }

    const {element} = this;

    if (redispatch(element, data['event'], VIMEO_EVENTS)) {
      return;
    }

    if (data['event'] == 'volumechange') {
      const volume = data['data'] && data['data']['volume'];
      if (!volume) {
        return;
      }
      const muted = volume <= 0;
      if (muted == this.muted_) {
        return;
      }
      this.muted_ = muted;
      element.dispatchCustomEvent(mutedOrUnmutedEvent(muted));
      return;
    }
  }

  /** @override */
  pauseCallback() {
    this.pause();
  }

  /** @override */
  pause() {
    this.sendCommand_('pause');
  }

  /** @override */
  play() {
    this.sendCommand_('play');
  }

  /** @override */
  mute() {
    if (this.muted_) {
      // We need to check if already muted to prevent an initial mute() call
      // that would disable autoplay on iOS.
      return;
    }
    this.sendCommand_(this.setVolumeMethod_(), '0');
  }

  /** @override */
  unmute() {
    // TODO(alanorozco): Set based on volume before unmuting.
    this.sendCommand_(this.setVolumeMethod_(), '1');
  }

  /** @override */
  isInteractive() {
    return true;
  }

  /** @override */
  supportsPlatform() {
    return true;
  }

  /** @override */
  preimplementsMediaSessionAPI() {
    // The Vimeo player embedded in the frame hooks into the API directly.
    return true;
  }

  /** @override */
  preimplementsAutoFullscreen() {
    return false;
  }

  /** @override */
  fullscreenEnter() {
    // NOOP. Not implemented by Vimeo.
  }

  /** @override */
  fullscreenExit() {
    // NOOP. Not implemented by Vimeo.
  }

  /** @override */
  isFullscreen() {
    return false;
  }

  /** @override */
  showControls() {
    // NOOP. Not implemented by Vimeo.
  }

  /** @override */
  hideControls() {
    // NOOP. Not implemented by Vimeo.
  }

  /** @override */
  getMetadata() {
    // TODO(alanorozco)
  }

  /** @override */
  getDuration() {
    // TODO(alanorozco)
    return 0;
  }

  /** @override */
  getCurrentTime() {
    // TODO(alanorozco)
    return 0;
  }

  /** @override */
  getPlayedRanges() {
    // TODO(alanorozco)
    return [];
  }

  /**
   * @param {string} method
   * @param {?Object|string=} optParams
   * @private
   */
  sendCommand_(method, optParams = null) {
    // See
    // https://developer.vimeo.com/player/js-api
    if (!this.iframe_) {
      return;
    }
    const {contentWindow} = this.iframe_;
    if (!contentWindow) {
      return;
    }
    contentWindow./*OK*/ postMessage(
      JSON.stringify(
        dict({
          'method': method,
          'value': optParams || '',
        })
      ),
      '*'
    );
  }

  /** @override */
  seekTo(unusedTimeSeconds) {
    this.user().error(TAG, '`seekTo` not supported.');
  }
}

AMP.extension(TAG, '0.1', AMP => {
  AMP.registerElement(TAG, AmpVimeo);
});


text:
package HelloWorld;

/** \file HelloWorld.java
    \author Brooks MacLachlan
    \brief Tests various GOOL functions. It should run without errors.
*/
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class HelloWorld {

    public static void main(String[] args) {
        // Initializing variables
        int a;
        int b = 5;
        ArrayList<Double> myOtherList = new ArrayList<Double>(Arrays.asList(1.0, 1.5));
        int oneIndex = myOtherList.indexOf(1.0);
        System.out.println(oneIndex);
        a = myOtherList.size();
        myOtherList.add(2, 2.0);
        myOtherList.add(2.5);
        double e;
        e = myOtherList.get(1);
        myOtherList.set(1, 17.4);
        ArrayList<String> myName = new ArrayList<String>(7);
        myName = new ArrayList<String>(Arrays.asList("Brooks Mac".split(" ")));
        System.out.println(myName);
        ArrayList<Boolean> boringList = new ArrayList<Boolean>(Arrays.asList(false, false, false, false, false));
        System.out.println(boringList);
        ArrayList<Double> mySlicedList = new ArrayList<Double>(2);

        ArrayList<Double> temp = new ArrayList<Double>(0);
        for (int i_temp = 1; i_temp < 3; i_temp++) {
            temp.add(myOtherList.get(i_temp));
        }
        mySlicedList = temp;

        if (b >= 6) {
            String dummy = "dummy";
        }
        else if (b == 5) {
            // If body ----------------------------------------------------------------
            int c;
            int d;
            a = 5;
            b = a + 2;
            c = b + 3;
            d = b;
            d -= a;
            c -= d;
            b += 17;
            c += 17;
            a++;
            d++;
            c--;
            b--;
            ArrayList<Integer> myList = new ArrayList<Integer>(5);
            char myObj = 'o';
            final String myConst = "Imconstant";
            System.out.println(a);
            System.out.println(b);
            System.out.println(c);
            System.out.println(d);
            System.out.println(myOtherList);
            System.out.println(mySlicedList);
            System.out.println("Type an int");
            d = Integer.parseInt((new Scanner(System.in)).nextLine());
            System.out.println("Type another");
            (new Scanner(System.in)).next();

            System.out.println(" too");
            System.out.print("boo");
            System.out.print(true);
            System.out.print(0);
            System.out.print('c');
            System.out.println(!(true));
            System.out.println(-1);
            System.out.println(Math.sqrt(4.0));
            System.out.println(Math.abs(-4));
            System.out.println(Math.log10(2.0));
            System.out.println(Math.log(2.0));
            System.out.println(Math.exp(-2.0));
            System.out.println(Math.sin(2.0));
            System.out.println(Math.cos(2.0));
            System.out.println(Math.tan(2.0));
            System.out.println(Math.tan(2.0));
            System.out.println(true && false);
            System.out.println(true || false);
            System.out.println(true && !(false));
            System.out.println(!(true && true));
            System.out.println(6 + 2);
            System.out.println(6 - 2);
            System.out.println(6 * 2);
            System.out.println(6 / 2);
            System.out.println(6 % 4);
            System.out.println(Math.pow(6, 2));
            System.out.println(6 + 2 * 3);
            System.out.println(1.0 / Math.sin(1.0));
            System.out.println(1.0 / Math.cos(1.0));
            System.out.println(a);
            System.out.println(true ? 5 : 0);
            System.out.println(1.0 / Math.tan(1.0));
            // End If body ------------------------------------------------------------
        }
        else {
            System.out.println(args[5]);
        }
        if (boringList != null) {
            System.out.println("Ew, boring list!");
        }
        else {
            System.out.println("Great, no bores!");
        }
        switch(a) {
            case 5:
                b = 10;
                break;
            case 0:
                b = 5;
                break;
            default:
                b = 0;
                break;
        };
        for (int i = 0; i < 9; i += 1) {
            System.out.println(i);
        }
        while (a < 13) {
            System.out.println("Hello");
            a++;
        }
        for (double num : myOtherList) {
            System.out.println(Helper.doubleAndAdd(num, 1.0));
        }
        try {
            throw new Exception("Good-bye!");
        } catch (Exception exc) {
            System.out.println("Caught intentional error");
        }
    }
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>Statistics of ADP in UD_Mbya_Guarani-Thomas</title>
    <link rel="root" href=""/>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="../../css/jquery-ui-redmond.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style-vis.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/hint.css"/>

          home

          edit page
          issue tracker

          <gcse:search></gcse:search>

        This page pertains to UD version 2.

            It appears that you have Javascript disabled.
            Please consider enabling Javascript for this page to see the visualizations.

Treebank Statistics: UD_Mbya_Guarani-Thomas: POS Tags: ADP

There are 12 ADP lemmas (4%), 13 ADP types (3%) and 78 ADP tokens (6%).
Out of 15 observed tags, the rank of ADP is: 7 in number of lemmas, 7 in number of types and 7 in number of tokens.

The 10 most frequent ADP lemmas: pe, upi, py, rami, e, me, eve, gui, jave, orevy

The 10 most frequent ADP types:  pe, rupi, py, rami, re, me, gui, jave, orevy, peve

The 10 most frequent ambiguous lemmas: pe (<tt>ADP</tt> 18, <tt>DET</tt> 2), eve (<tt>ADP</tt> 2, <tt>SCONJ</tt> 2), gui (<tt>ADP</tt> 2, <tt>PART</tt> 1), jave (<tt>ADP</tt> 2, <tt>SCONJ</tt> 1), peve (<tt>ADP</tt> 2, <tt>SCONJ</tt> 1)

The 10 most frequent ambiguous types:  pe (<tt>ADP</tt> 18, <tt>DET</tt> 2), gui (<tt>ADP</tt> 2, <tt>PART</tt> 1), jave (<tt>ADP</tt> 2, <tt>SCONJ</tt> 1), reve (<tt>SCONJ</tt> 2, <tt>ADP</tt> 1)

pe

<tt>ADP</tt> 18: Ha'e cheremiarirõ'i kuery oja ramo'i va'e pe guarã .

<tt>DET</tt> 2: Aroike mi opy rupi pono pe chereko omokañy .

gui

<tt>ADP</tt> 2: Ndoroikuaavei ma mamo pa roo ta , ka'aguy gui rogueru ro'u va'erã .

<tt>PART</tt> 1: Aipota gui omoinge iñakã me tembiapo porã , ikatu aguãicha omombyta ikorachõ me pensamiento porã , ha'e opyta aguã ichupe kuera iñakã me mba'e pa ha'e ichupe kuera , oguerokakuaa aguã , okakuaa porã aguã , hechaĩ aguã , oñevanga porã aguã , oñevanga ijyvate peve-peve ogueroñevanga aguã , pe guete rekoachy mi .

jave

<tt>ADP</tt> 2: Peicha roiko , upei jave py , upe ronguare ou kuri peteĩ jurua kuery , jurua kuery ou peteĩ ara py ovaẽ kuri ko'ape .

<tt>SCONJ</tt> 1: Ha'e che upecha vy ka'ay ha'u jave , cheayvu katu ichupe kuera .

reve

<tt>SCONJ</tt> 2: Ha'e rami ma vy che chememby kue'iry pe kyri'ĩ reve aroayvu .

<tt>ADP</tt> 1: Ha'e chee ave amba'apo upecha , pende reve ko'agã ndee reju upearã ju .

Morphology

The form / lemma ratio of ADP is 1.083333 (the average of all parts of speech is 1.311688).

The 1st highest number of forms (2) was observed with the lemma "eve": reve, reve'i.

The 2nd highest number of forms (1) was observed with the lemma "e": re.

The 3rd highest number of forms (1) was observed with the lemma "gui": gui.

ADP does not occur with any features.

Relations

ADP nodes are attached to their parents using 2 different relations: <tt>case</tt> (76; 97% instances), <tt>obl</tt> (2; 3% instances)

Parents of ADP nodes belong to 6 different parts of speech: <tt>NOUN</tt> (39; 50% instances), <tt>PRON</tt> (19; 24% instances), <tt>VERB</tt> (15; 19% instances), <tt>ADV</tt> (3; 4% instances), <tt>PART</tt> (1; 1% instances), <tt>PROPN</tt> (1; 1% instances)

78 (100%) ADP nodes are leaves.

The highest child degree of a ADP node is 0.

© 2014–2021
            Universal Dependencies contributors.
            Site powered by Annodoc and brat
.


text:
package com.bhrobotics.morlib;

import junit.framework.*;
import org.mockito.*;
import java.util.Hashtable;

public class EventTest extends TestCase {
    public void testCtor() {
        Event event = new Event(null, null);
        assertNotNull(event);
    }

    public void testName() {
        Event event = new Event("foo", null);
        assertEquals("foo", event.getName());
    }

    public void testData() {
        Hashtable h = new Hashtable();
        Event event = new Event(null, h);
        assertEquals(h, event.getData());
    }
}


text:
typedef enum {
  ITEM_ANIM_COIN = 0,
  ITEM_ANIM_JETPACK,
  ITEM_ANIM_LIGHTNING, // Ability to kill enemies
  ITEM_ANIM_HEART, // Extra life
  ITEM_ANIM_HEADSMASH, // Smash non smashable platforms
} item_anim_t;

void
item_init(void);
void
item_saveBackground(frame_buffer_t fb);
void
item_restoreBackground(void);
void
item_render(frame_buffer_t fb);
void
item_update(void);
void
item_add(int16_t x, int16_t y, int16_t anim, uint16_t* tilePtr);
#ifdef DEBUG
int16_t
item_getCount(void);
#endif
#endif


text:
#ifndef __eigenpy_numpy_type_hpp__
#define __eigenpy_numpy_type_hpp__

#include "eigenpy/fwd.hpp"
#include "eigenpy/scalar-conversion.hpp"

#include <patchlevel.h> // For PY_MAJOR_VERSION

namespace eigenpy
{
  namespace bp = boost::python;

  template <typename SCALAR>  struct NumpyEquivalentType {};

  template <> struct NumpyEquivalentType<float>   { enum { type_code = NPY_FLOAT  };};
  template <> struct NumpyEquivalentType< std::complex<float> >   { enum { type_code = NPY_CFLOAT  };};
  template <> struct NumpyEquivalentType<double>  { enum { type_code = NPY_DOUBLE };};
  template <> struct NumpyEquivalentType< std::complex<double> >  { enum { type_code = NPY_CDOUBLE };};
  template <> struct NumpyEquivalentType<long double>  { enum { type_code = NPY_LONGDOUBLE };};
  template <> struct NumpyEquivalentType< std::complex<long double> >  { enum { type_code = NPY_CLONGDOUBLE };};
  template <> struct NumpyEquivalentType<int>     { enum { type_code = NPY_INT    };};
  template <> struct NumpyEquivalentType<long>    { enum { type_code = NPY_LONG    };};

  template<typename Scalar>
  bool np_type_is_convertible_into_scalar(const int np_type)
  {
    if(NumpyEquivalentType<Scalar>::type_code == np_type)
      return true;

    switch(np_type)
    {
      case NPY_INT:
        return FromTypeToType<int,Scalar>::value;
      case NPY_LONG:
        return FromTypeToType<long,Scalar>::value;
      case NPY_FLOAT:
        return FromTypeToType<float,Scalar>::value;
      case NPY_CFLOAT:
        return FromTypeToType<std::complex<float>,Scalar>::value;
      case NPY_DOUBLE:
        return FromTypeToType<double,Scalar>::value;
      case NPY_CDOUBLE:
        return FromTypeToType<std::complex<double>,Scalar>::value;
      case NPY_LONGDOUBLE:
        return FromTypeToType<long double,Scalar>::value;
      case NPY_CLONGDOUBLE:
        return FromTypeToType<std::complex<long double>,Scalar>::value;
      default:
        return false;
    }
  }

  enum NP_TYPE
  {
    MATRIX_TYPE,
    ARRAY_TYPE
  };

  struct NumpyType
  {

    static NumpyType & getInstance()
    {
      static NumpyType instance;
      return instance;
    }

    operator bp::object () { return getInstance().CurrentNumpyType; }

    static bp::object make(PyArrayObject* pyArray, bool copy = false)
    { return make((PyObject*)pyArray,copy); }

    static bp::object make(PyObject* pyObj, bool copy = false)
    {
      bp::object m;
      if(isMatrix())
        m = getInstance().NumpyMatrixObject(bp::object(bp::handle<>(pyObj)), bp::object(), copy);
//        m = NumpyAsMatrixObject(bp::object(bp::handle<>(pyObj)));
      else if(isArray())
        m = bp::object(bp::handle<>(pyObj)); // nothing to do here

      Py_INCREF(m.ptr());
      return m;
    }

    static void setNumpyType(bp::object & obj)
    {
      PyTypeObject * obj_type = PyType_Check(obj.ptr()) ? reinterpret_cast<PyTypeObject*>(obj.ptr()) : obj.ptr()->ob_type;
      if(PyType_IsSubtype(obj_type,getInstance().NumpyMatrixType))
        switchToNumpyMatrix();
      else if(PyType_IsSubtype(obj_type,getInstance().NumpyArrayType))
        switchToNumpyArray();
    }

    static void sharedMemory(const bool value)
    {
      getInstance().shared_memory = value;
    }

    static bool sharedMemory()
    {
      return getInstance().shared_memory;
    }

    static void switchToNumpyArray()
    {
      getInstance().CurrentNumpyType = getInstance().NumpyArrayObject;
      getInstance().getType() = ARRAY_TYPE;
    }

    static void switchToNumpyMatrix()
    {
      getInstance().CurrentNumpyType = getInstance().NumpyMatrixObject;
      getInstance().getType() = MATRIX_TYPE;
    }

    static NP_TYPE & getType()
    {
      return getInstance().np_type;
    }

    static bp::object getNumpyType()
    {
      return getInstance().CurrentNumpyType;
    }

    static const PyTypeObject * getNumpyMatrixType()
    {
      return getInstance().NumpyMatrixType;
    }

    static const PyTypeObject * getNumpyArrayType()
    {
      return getInstance().NumpyArrayType;
    }

    static bool isMatrix()
    {
      return PyType_IsSubtype(reinterpret_cast<PyTypeObject*>(getInstance().CurrentNumpyType.ptr()),
                              getInstance().NumpyMatrixType);
    }

    static bool isArray()
    {
      if(getInstance().isMatrix()) return false;
      return PyType_IsSubtype(reinterpret_cast<PyTypeObject*>(getInstance().CurrentNumpyType.ptr()),
                              getInstance().NumpyArrayType);
    }

  protected:

    NumpyType()
    {
      pyModule = bp::import("numpy");

#if PY_MAJOR_VERSION >= 3
      // TODO I don't know why this Py_INCREF is necessary.
      // Without it, the destructor of NumpyType SEGV sometimes.
      Py_INCREF(pyModule.ptr());
#endif

      NumpyMatrixObject = pyModule.attr("matrix");
      NumpyMatrixType = reinterpret_cast<PyTypeObject*>(NumpyMatrixObject.ptr());
      NumpyArrayObject = pyModule.attr("ndarray");
      NumpyArrayType = reinterpret_cast<PyTypeObject*>(NumpyArrayObject.ptr());
      //NumpyAsMatrixObject = pyModule.attr("asmatrix");
      //NumpyAsMatrixType = reinterpret_cast<PyTypeObject*>(NumpyAsMatrixObject.ptr());

      CurrentNumpyType = NumpyArrayObject; // default conversion
      np_type = ARRAY_TYPE;

      shared_memory = true;
    }

    bp::object CurrentNumpyType;
    bp::object pyModule;

    // Numpy types
    bp::object NumpyMatrixObject; PyTypeObject * NumpyMatrixType;
    //bp::object NumpyAsMatrixObject; PyTypeObject * NumpyAsMatrixType;
    bp::object NumpyArrayObject; PyTypeObject * NumpyArrayType;

    NP_TYPE np_type;

    bool shared_memory;
  };
}

#endif // ifndef __eigenpy_numpy_type_hpp__


text:
require "helper"

describe Google::Cloud::Datastore::Query, :mock_datastore do
  let(:query) { Google::Cloud::Datastore::Query.new }
  it "can query on kind" do
    query.kind "Task"

    grpc = query.to_grpc
    _(grpc.kind.map(&:name)).must_include "Task"
    _(grpc.kind.map(&:name)).wont_include "User"

    # Add a second kind to the query
    query.kind "User"

    grpc = query.to_grpc
    _(grpc.kind.map(&:name)).must_include "Task"
    _(grpc.kind.map(&:name)).must_include "User"
  end

  it "can filter properties" do
    query.kind "Task"
    query.where "completed", "=", true

    grpc = query.to_grpc
    _(grpc.filter).wont_be :nil?
    _(grpc.filter.filter_type).must_equal :composite_filter
    _(grpc.filter.property_filter).must_be :nil?
    _(grpc.filter.composite_filter).wont_be :nil?
    _(grpc.filter.composite_filter.op).must_equal :AND
    _(grpc.filter.composite_filter.filters.count).must_equal 1

    new_filter = grpc.filter.composite_filter.filters.first
    _(new_filter.property_filter.property.name).must_equal "completed"
    _(new_filter.property_filter.op).must_equal :EQUAL
    _(Google::Cloud::Datastore::Convert.from_value(new_filter.property_filter.value)).must_equal true

    # Add a second filter and generate new grpcbuf
    # Use the filter alias to add the second filter
    query.filter "due", :>, Time.new(2014, 1, 1, 0, 0, 0, 0)
    grpc = query.to_grpc
    _(grpc.filter.composite_filter.filters.count).must_equal 2

    first_filter = grpc.filter.composite_filter.filters.first
    _(first_filter.property_filter).wont_be :nil?
    _(first_filter.composite_filter).must_be :nil?
    _(first_filter.property_filter.property.name).must_equal "completed"
    _(first_filter.property_filter.op).must_equal :EQUAL
    _(Google::Cloud::Datastore::Convert.from_value(first_filter.property_filter.value)).must_equal true

    second_filter = grpc.filter.composite_filter.filters.last
    _(second_filter.property_filter).wont_be :nil?
    _(second_filter.composite_filter).must_be :nil?
    _(second_filter.property_filter.property.name).must_equal "due"
    _(second_filter.property_filter.op).must_equal :GREATER_THAN
    _(Google::Cloud::Datastore::Convert.from_value(second_filter.property_filter.value)).must_equal Time.new(2014, 1, 1, 0, 0, 0, 0)
  end

  it "can order results" do
    query.kind "Task"
    query.order "due"

    grpc = query.to_grpc
    order = order_as_arrays grpc
    _(order).must_include [ "due",       :ASCENDING ]
    _(order).wont_include [ "completed", :DESCENDING ]

    # Add a second kind to the query
    query.order "completed", :desc

    grpc = query.to_grpc
    order = order_as_arrays grpc
    _(order).must_include [ "due",       :ASCENDING ]
    _(order).must_include [ "completed", :DESCENDING ]
  end

  it "accepts any string that starts with 'd' for DESCENDING" do
    query.kind "Task"
    query.order "completed", "DOWN"

    grpc = query.to_grpc
    order = order_as_arrays grpc

    _(order).must_include [ "completed", :DESCENDING ]
  end

  it "can limit and offset" do
    query.kind "Task"

    grpc = query.to_grpc
    _(grpc.limit).must_be :nil?

    query.limit 10

    grpc = query.to_grpc
    _(grpc.limit).must_equal Google::Protobuf::Int32Value.new(value: 10)

    _(grpc.offset).must_equal 0

    query.offset 20

    grpc = query.to_grpc
    _(grpc.offset).must_equal 20
  end

  it "can specify a cursor" do
    raw_cursor = "\x13\xE0\x01\x00\xEB".force_encoding Encoding::ASCII_8BIT
    encoded_cursor = "E+ABAOs="

    query.kind "Task"

    grpc = query.to_grpc
    _(grpc.start_cursor).must_be :empty?

    query.cursor encoded_cursor

    grpc = query.to_grpc
    _(grpc.start_cursor).must_equal raw_cursor
  end

  it "can select the properties to return" do
    query.kind "Task"

    grpc = query.to_grpc
    _(grpc.projection).must_be :empty?

    query.select "completed"

    grpc = query.to_grpc
    _(grpc.projection).wont_be :empty?
    _(grpc.projection.count).must_equal 1
    _(grpc.projection.first.property.name).must_equal "completed"
  end

  it "can select the properties using projection alias" do
    query.kind "Task"

    grpc = query.to_grpc
    _(grpc.projection).must_be :empty?

    # Use projection instead of select
    query.projection "completed"

    grpc = query.to_grpc
    _(grpc.projection).wont_be :empty?
    _(grpc.projection.count).must_equal 1
    _(grpc.projection.first.property.name).must_equal "completed"
  end

  it "can group on properties" do
    query.kind "Task"

    grpc = query.to_grpc
    _(grpc.distinct_on).must_be :empty?

    query.group_by "completed"

    grpc = query.to_grpc
    _(grpc.distinct_on).wont_be :empty?
    _(grpc.distinct_on.count).must_equal 1
    _(grpc.distinct_on.first.name).must_equal "completed"
  end

  it "can group on properties using distinct_on" do
    query.kind "Task"

    grpc = query.to_grpc
    _(grpc.distinct_on).must_be :empty?

    query.distinct_on "completed"

    grpc = query.to_grpc
    _(grpc.distinct_on).wont_be :empty?
    _(grpc.distinct_on.count).must_equal 1
    _(grpc.distinct_on.first.name).must_equal "completed"
  end

  it "can query ancestor" do
    ancestor_key = Google::Cloud::Datastore::Key.new("User", "username")
    query.kind "Task"
    query.ancestor ancestor_key

    grpc = query.to_grpc

    _(grpc.filter.composite_filter.filters.count).must_equal 1

    ancestor_filter = grpc.filter.composite_filter.filters.first
    _(ancestor_filter.property_filter.property.name).must_equal "__key__"
    _(ancestor_filter.property_filter.op).must_equal :HAS_ANCESTOR
    key = Google::Cloud::Datastore::Convert.from_value(ancestor_filter.property_filter.value)
    _(key.kind).must_equal ancestor_key.kind
    _(key.id).must_be :nil?
    _(key.name).must_equal ancestor_key.name
  end

  it "can manually filter on ancestor" do
    ancestor_key = Google::Cloud::Datastore::Key.new("User", "username")
    query.kind "Task"
    query.filter "__key__", "~", ancestor_key

    grpc = query.to_grpc

    _(grpc.filter.composite_filter.filters.count).must_equal 1

    ancestor_filter = grpc.filter.composite_filter.filters.first
    _(ancestor_filter.property_filter.property.name).must_equal "__key__"
    _(ancestor_filter.property_filter.op).must_equal :HAS_ANCESTOR
    key = Google::Cloud::Datastore::Convert.from_value(ancestor_filter.property_filter.value)
    _(key.kind).must_equal ancestor_key.kind
    _(key.id).must_be :nil?
    _(key.name).must_equal ancestor_key.name
  end

  it "can chain query methods" do
    q2 = query.kind("Task").select("due", "completed").
      where("completed", "=", true).group_by("completed").
      order("due", :desc).limit(10).offset(20)

    _(q2).must_equal query
    _(q2.to_grpc).must_equal query.to_grpc

    grpc = query.to_grpc

    _(grpc.kind.map(&:name)).must_include "Task"

    _(grpc.projection).wont_be :nil?
    _(grpc.projection.count).must_equal 2
    _(grpc.projection.first.property.name).must_equal "due"
    _(grpc.projection.last.property.name).must_equal "completed"

    filter = grpc.filter.composite_filter.filters.first
    _(filter.property_filter.property.name).must_equal "completed"
    _(filter.property_filter.op).must_equal :EQUAL
    _(Google::Cloud::Datastore::Convert.from_value(filter.property_filter.value)).must_equal true

    _(grpc.distinct_on).wont_be :empty?
    _(grpc.distinct_on.count).must_equal 1
    _(grpc.distinct_on.first.name).must_equal "completed"

    order = order_as_arrays grpc
    _(order).must_include [ "due", :DESCENDING ]

    _(grpc.limit).must_equal Google::Protobuf::Int32Value.new(value: 10)

    _(grpc.offset).must_equal 20
  end

  def order_as_arrays grpc
    grpc.order.map do |o|
      [o.property.name, o.direction]
    end
  end
end


text:
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="HtmlPreformatted.cs" company="">
//
// </copyright>
//
//   The html div.
//
// --------------------------------------------------------------------------------------------------------------------
namespace UX.Testing.Core.Controls
{
	using System;

	/// The html div.
	public class HtmlPreformatted : HtmlControl
	{
		#region Public Properties

		/// Gets the html tag.
		public override HtmlTag HtmlTag
		{
			get
			{
				return HtmlTag.pre;
			}
		}

		/// Gets or sets Width.
		[Obsolete("Not supported in HTML5. Deprecated in HTML 4.01.")]
		public string Width
		{
			get
			{
				return this.GetAttribute("width");
			}

			set
			{
				this.AddAttribute("width", value);
			}
		}

		#endregion
	}
}


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

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

/**
 * A secret payload resource in the Secret Manager API. This contains the sensitive secret payload
 * that is associated with a SecretVersion.
 *
 *
 This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Secret Manager API. For a detailed explanation see:
 * https://developers.google.com/api-client-library/java/google-http-java-client/json
 *

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

  /**
   * The secret data. Must be no larger than 64KiB.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String data;

  /**
   * The secret data. Must be no larger than 64KiB.
   * @see #decodeData()
   * @return value or {@code null} for none
   */
  public java.lang.String getData() {
    return data;
  }

  /**
   * The secret data. Must be no larger than 64KiB.
   * @see #getData()
   * @return Base64 decoded value or {@code null} for none
   *
   * @since 1.14
   */
  public byte[] decodeData() {
    return com.google.api.client.util.Base64.decodeBase64(data);
  }

  /**
   * The secret data. Must be no larger than 64KiB.
   * @see #encodeData()
   * @param data data or {@code null} for none
   */
  public SecretPayload setData(java.lang.String data) {
    this.data = data;
    return this;
  }

  /**
   * The secret data. Must be no larger than 64KiB.
   * @see #setData()
   *
   *

   * The value is encoded Base64 or {@code null} for none.
   *

   *
   * @since 1.14
   */
  public SecretPayload encodeData(byte[] data) {
    this.data = com.google.api.client.util.Base64.encodeBase64URLSafeString(data);
    return this;
  }

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

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

}


text:
namespace ppapi {
namespace thunk {

class PPB_URLResponseInfo_API {
 public:
  virtual ~PPB_URLResponseInfo_API() {}

  virtual PP_Var GetProperty(PP_URLResponseProperty property) = 0;
  virtual PP_Resource GetBodyAsFileRef() = 0;

  // Internal function to get the internal data. This passes one plugin
  // reference to the caller for the file ref resource if body_as_file_ref is
  // non-null (meaning we're downloading to a file).
  virtual URLResponseInfoData GetData() = 0;
};

}  // namespace thunk
}  // namespace ppapi

#endif  // PPAPI_THUNK_URL_LOADER_API_H_


text:
import {Command} from 'umbraco-cypress-testhelpers';
import {Chainable} from './chainable';
new Chainable();
new Command().registerCypressCommands();


text:
#ifndef INCLUDE_PRIV_CPCIDSKFILE_H
#define INCLUDE_PRIV_CPCIDSKFILE_H

#include "pcidsk_config.h"
#include "pcidsk_types.h"
#include "pcidsk_buffer.h"
#include "pcidsk_file.h"
#include "pcidsk_mutex.h"
#include "pcidsk_interfaces.h"
#include "core/metadataset.h"
#include "core/protectedfile.h"

#include <string>
#include <vector>

namespace PCIDSK
{
    class PCIDSKChannel;
    class PCIDSKSegment;
    class PCIDSKInterfaces;
/************************************************************************/
/*                             CPCIDSKFile                              */
/************************************************************************/
    class CPCIDSKFile : public PCIDSKFile
    {
        friend PCIDSKFile PCIDSK_DLL *Open( std::string filename,
            std::string access, const PCIDSKInterfaces *interfaces );
    public:

        CPCIDSKFile( std::string filename );
        virtual ~CPCIDSKFile();

        virtual PCIDSKInterfaces *GetInterfaces() override { return &interfaces; }

        PCIDSKChannel  *GetChannel( int band ) override;
        PCIDSKSegment  *GetSegment( int segment ) override;
        std::vector<PCIDSKSegment *> GetSegments() override;

        PCIDSKSegment  *GetSegment( int type, std::string name,
            int previous = 0 ) override;
        int  CreateSegment( std::string name, std::string description,
            eSegType seg_type, int data_blocks ) override;
        void DeleteSegment( int segment ) override;
        void CreateOverviews( int chan_count, int *chan_list,
            int factor, std::string resampling ) override;

        int       GetWidth() const override { return width; }
        int       GetHeight() const override { return height; }
        int       GetChannels() const override { return channel_count; }
        std::string GetInterleaving() const override { return interleaving; }
        bool      GetUpdatable() const override { return updatable; }
        uint64    GetFileSize() const override { return file_size; }

        // the following are only for pixel interleaved IO
        int       GetPixelGroupSize() const override { return pixel_group_size; }
        void     *ReadAndLockBlock( int block_index, int xoff=-1, int xsize=-1 ) override;
        void      UnlockBlock( bool mark_dirty = false ) override;
        void      WriteBlock( int block_index, void *buffer );
        void      FlushBlock();

        void      WriteToFile( const void *buffer, uint64 offset, uint64 size ) override;
        void      ReadFromFile( void *buffer, uint64 offset, uint64 size ) override;
        void      CheckFileBigEnough( uint64 bytes_to_read ) override;

        std::string GetFilename() const { return base_filename; }

        void      GetIODetails( void ***io_handle_pp, Mutex ***io_mutex_pp,
                                std::string filename="", bool writable=false ) override;

        bool      GetEDBFileDetails( EDBFile** file_p, Mutex **io_mutex_p,
                                     std::string filename );

        std::string GetMetadataValue( const std::string& key ) override
            { return metadata.GetMetadataValue(key); }
        void        SetMetadataValue( const std::string& key, const std::string& value ) override
            { metadata.SetMetadataValue(key,value); }
        std::vector<std::string> GetMetadataKeys() override
            { return metadata.GetMetadataKeys(); }

        void      Synchronize() override;

    // not exposed to applications.
        void      ExtendFile( uint64 blocks_requested, bool prezero = false );
        void      ExtendSegment( int segment, uint64 blocks_to_add,
            bool prezero = false );
        void      MoveSegmentToEOF( int segment );

    private:
        PCIDSKInterfaces interfaces;

        void         InitializeFromHeader();

        std::string  base_filename;

        int          width;
        int          height;
        int          channel_count;
        std::string  interleaving;

        std::vector<PCIDSKChannel*> channels;

        int          segment_count;
        uint64       segment_pointers_offset;
        PCIDSKBuffer segment_pointers;

        std::vector<PCIDSKSegment*> segments;

    // pixel interleaved info.
        uint64       block_size; // pixel interleaved scanline size.
        int          pixel_group_size; // pixel interleaved pixel_offset value.
        uint64       first_line_offset;

        int          last_block_index;
        bool         last_block_dirty;
        int          last_block_xoff;
        int          last_block_xsize;
        void        *last_block_data;
        Mutex       *last_block_mutex;

        void        *io_handle;
        Mutex       *io_mutex;
        bool         updatable;

        uint64       file_size; // in blocks.

    // register of open external raw files.
        std::vector<ProtectedFile>  file_list;

    // register of open external databasefiles
        std::vector<ProtectedEDBFile> edb_file_list;

        MetadataSet  metadata;
    };
} // end namespace PCIDSK

#endif // INCLUDE_PRIV_CPCIDSKFILE_H


text:
<TITLE>vs_5_0</TITLE>

<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
</object>

NAME

vs_5_0 - Translation profile to DirectX 11's High Level Shader Language for vertex shaders.

SYNOPSIS

  vs_5_0

DESCRIPTION

This Direct3D profile translates Cg into DirectX 11's High Level Shader
Language (HLSL11) for vertex shaders.

The compiler output for this profile conforms to the textual high-level
language defined by DirectX 11's High Level Shading Language.

The limitations of the vs_5_0 profile depend on what HLSL profile to
which the translated HLSL code is compiled.

3D API DEPENDENCIES

Requires Direct3D 11 support.

  msdn.microsoft.com/en-us/library/ff471356.aspx

PROFILE OPTIONS

-po pad16
  This will add padding variables to the cbuffer declarations to match
  the 16 byte padding the GP4 OpenGL profiles use. This makes sure
  each variable in the cbuffer uses an entire float4 constant instead
  of the tight packing HLSL11 normally uses.

DATA TYPES

In general, the Cg data types translate to the HLSL11 data types with the
same name.

float, half, fixed

These numeric data types all correspond to standard IEEE 754 single-precision
floating-point encoding with a sign bit, 23 mantissa bits, and 8 exponent
bits (biased by 128), sometimes called s10e5.

int

This integral data type operates like an integer over the -2^24 to 2^24 range.
The result of int by int division is an integer (rounding down) to match C.

SEMANTICS

INPUT SEMANTICS

  Binding Semantics Name           Corresponding Data

  POSITION                         Object-space position (SV_Position)

  NORMAL                           Object-space normal

  COLOR                            Primary color (float4) (SV_Target)
  COLOR0
  DIFFUSE

  COLOR1                           Secondary color (float4)
  SPECULAR

  FOGCOORD                         Fog coordinate

  TEXCOORD#                        Texture coordinate set #

UNIFORM INPUT SEMANTICS

Sixteen texture units are supported:

  Binding Semantic Name            Corresponding Data

  TEXUNIT0                         Texture unit 0
  TEXUNIT1                         Texture unit 1
  ...
  TEXUNIT15                        Texture unit 15

OUTPUT SEMANTICS

  Binding Semantics Name        Corresponding Data

  POSITION, HPOS                Output position

  PSIZE, PSIZ                   Output point size

  FOG, FOGC                     Output fog coordinate

  COLOR0, COL0                  Output primary color

  COLOR1, COL1                  Output secondary color

  BCOL0                         Output backface primary color

  BCOL1                         Output backface secondary color

  TEXCOORD0-TEXCOORD7,          Output texture coordinates
  TEX0-TEX7

  CLP0-CL5                      Output Clip distances

STANDARD LIBRARY ISSUES

This profile is limited to standard library support available in HLSL11 for vertex shaders.
In general, the Cg and HLSL11 standard libraries are very similar.

SEE ALSO

ps_5_0,
hs_5_0,
gs_5_0,
ds_5_0