text:
import argparse
import logging

import torch

import pyro
from pyro.contrib.epidemiology.models import RegionalSIRModel

logging.basicConfig(format="%(message)s", level=logging.INFO)

def Model(args, data):
    assert 0 <= args.coupling <= 1, args.coupling
    population = torch.full((args.num_regions,), float(args.population))
    coupling = torch.eye(args.num_regions).clamp(min=args.coupling)
    return RegionalSIRModel(population, coupling, args.recovery_time, data)

def generate_data(args):
    extended_data = [None] * (args.duration + args.forecast)
    model = Model(args, extended_data)
    logging.info("Simulating from a {}".format(type(model).__name__))
    for attempt in range(100):
        samples = model.generate(
            {
                "R0": args.basic_reproduction_number,
                "rho_c1": 10 * args.response_rate,
                "rho_c0": 10 * (1 - args.response_rate),
            }
        )
        obs = samples["obs"][: args.duration]
        S2I = samples["S2I"]

        obs_sum = int(obs.sum())
        S2I_sum = int(S2I[: args.duration].sum())
        if obs_sum >= args.min_observations:
            logging.info(
                "Observed {:d}/{:d} infections:\n{}".format(
                    obs_sum, S2I_sum, " ".join(str(int(x)) for x in obs[:, 0])
                )
            )
            return {"S2I": S2I, "obs": obs}

    raise ValueError(
        "Failed to generate {} observations. Try increasing "
        "--population or decreasing --min-observations".format(args.min_observations)
    )

def infer_mcmc(args, model):
    energies = []

    def hook_fn(kernel, *unused):
        e = float(kernel._potential_energy_last)
        energies.append(e)
        if args.verbose:
            logging.info("potential = {:0.6g}".format(e))

    mcmc = model.fit_mcmc(
        heuristic_num_particles=args.smc_particles,
        heuristic_ess_threshold=args.ess_threshold,
        warmup_steps=args.warmup_steps,
        num_samples=args.num_samples,
        max_tree_depth=args.max_tree_depth,
        num_quant_bins=args.num_bins,
        haar=args.haar,
        haar_full_mass=args.haar_full_mass,
        jit_compile=args.jit,
        hook_fn=hook_fn,
    )

    mcmc.summary()
    if args.plot:
        import matplotlib.pyplot as plt

        plt.figure(figsize=(6, 3))
        plt.plot(energies)
        plt.xlabel("MCMC step")
        plt.ylabel("potential energy")
        plt.title("MCMC energy trace")
        plt.tight_layout()

def infer_svi(args, model):
    losses = model.fit_svi(
        heuristic_num_particles=args.smc_particles,
        heuristic_ess_threshold=args.ess_threshold,
        num_samples=args.num_samples,
        num_steps=args.svi_steps,
        num_particles=args.svi_particles,
        haar=args.haar,
        jit=args.jit,
    )

    if args.plot:
        import matplotlib.pyplot as plt

        plt.figure(figsize=(6, 3))
        plt.plot(losses)
        plt.xlabel("SVI step")
        plt.ylabel("loss")
        plt.title("SVI Convergence")
        plt.tight_layout()

def predict(args, model, truth):
    samples = model.predict(forecast=args.forecast)
    S2I = samples["S2I"]
    median = S2I.median(dim=0).values
    lines = ["Median prediction of new infections (starting on day 0):"]
    for r in range(args.num_regions):
        lines.append(
            "Region {}: {}".format(r, " ".join(map(str, map(int, median[:, r]))))
        )
    logging.info("\n".join(lines))

    # Optionally plot the latent and forecasted series of new infections.
    if args.plot:
        import matplotlib.pyplot as plt

        fig, axes = plt.subplots(
            args.num_regions, sharex=True, figsize=(6, 1 + args.num_regions)
        )
        time = torch.arange(args.duration + args.forecast)
        p05 = S2I.kthvalue(int(round(0.5 + 0.05 * args.num_samples)), dim=0).values
        p95 = S2I.kthvalue(int(round(0.5 + 0.95 * args.num_samples)), dim=0).values
        for r, ax in enumerate(axes):
            ax.fill_between(
                time, p05[:, r], p95[:, r], color="red", alpha=0.3, label="90% CI"
            )
            ax.plot(time, median[:, r], "r-", label="median")
            ax.plot(time[: args.duration], model.data[:, r], "k.", label="observed")
            ax.plot(time, truth[:, r], "k--", label="truth")
            ax.axvline(args.duration - 0.5, color="gray", lw=1)
            ax.set_xlim(0, len(time) - 1)
            ax.set_ylim(0, None)
        axes[0].set_title(
            "New infections among {} regions each of size {}".format(
                args.num_regions, args.population
            )
        )
        axes[args.num_regions // 2].set_ylabel("inf./day")
        axes[-1].set_xlabel("day after first infection")
        axes[-1].legend(loc="upper left")
        plt.tight_layout()
        plt.subplots_adjust(hspace=0)

def main(args):
    pyro.set_rng_seed(args.rng_seed)

    # Generate data.
    dataset = generate_data(args)
    obs = dataset["obs"]

    # Run inference.
    model = Model(args, obs)
    infer = {"mcmc": infer_mcmc, "svi": infer_svi}[args.infer]
    infer(args, model)

    # Predict latent time series.
    predict(args, model, truth=dataset["S2I"])

if __name__ == "__main__":
    assert pyro.__version__.startswith("1.7.0")
    parser = argparse.ArgumentParser(
        description="Regional compartmental epidemiology modeling using HMC"
    )
    parser.add_argument("-p", "--population", default=1000, type=int)
    parser.add_argument("-r", "--num-regions", default=2, type=int)
    parser.add_argument("-c", "--coupling", default=0.1, type=float)
    parser.add_argument("-m", "--min-observations", default=3, type=int)
    parser.add_argument("-d", "--duration", default=20, type=int)
    parser.add_argument("-f", "--forecast", default=10, type=int)
    parser.add_argument("-R0", "--basic-reproduction-number", default=1.5, type=float)
    parser.add_argument("-tau", "--recovery-time", default=7.0, type=float)
    parser.add_argument("-rho", "--response-rate", default=0.5, type=float)
    parser.add_argument("--infer", default="mcmc")
    parser.add_argument("--mcmc", action="store_const", const="mcmc", dest="infer")
    parser.add_argument("--svi", action="store_const", const="svi", dest="infer")
    parser.add_argument("--haar", action="store_true")
    parser.add_argument("-hfm", "--haar-full-mass", default=0, type=int)
    parser.add_argument("-n", "--num-samples", default=200, type=int)
    parser.add_argument("-np", "--smc-particles", default=1024, type=int)
    parser.add_argument("-ss", "--svi-steps", default=5000, type=int)
    parser.add_argument("-sp", "--svi-particles", default=32, type=int)
    parser.add_argument("-ess", "--ess-threshold", default=0.5, type=float)
    parser.add_argument("-w", "--warmup-steps", type=int)
    parser.add_argument("-t", "--max-tree-depth", default=5, type=int)
    parser.add_argument("-nb", "--num-bins", default=1, type=int)
    parser.add_argument("--double", action="store_true", default=True)
    parser.add_argument("--single", action="store_false", dest="double")
    parser.add_argument("--rng-seed", default=0, type=int)
    parser.add_argument("--cuda", action="store_true")
    parser.add_argument("--jit", action="store_true", default=True)
    parser.add_argument("--nojit", action="store_false", dest="jit")
    parser.add_argument("--verbose", action="store_true")
    parser.add_argument("--plot", action="store_true")
    args = parser.parse_args()

    if args.warmup_steps is None:
        args.warmup_steps = args.num_samples
    if args.double:
        if args.cuda:
            torch.set_default_tensor_type(torch.cuda.DoubleTensor)
        else:
            torch.set_default_dtype(torch.float64)
    elif args.cuda:
        torch.set_default_tensor_type(torch.cuda.FloatTensor)

    main(args)

    if args.plot:
        import matplotlib.pyplot as plt

        plt.show()


text:
package aws

import (
	"net/http"
)

// Metadata wraps immutable data from the Client structure.
type Metadata struct {
	ServiceName string
	ServiceID   string
	EndpointsID string
	APIVersion  string

	SigningName   string
	SigningRegion string

	JSONVersion  string
	TargetPrefix string
}

// A Client implements the base client request and response handling
// used by all service clients.
type Client struct {
	Metadata         Metadata
	Config           Config
	Credentials      CredentialsProvider
	EndpointResolver EndpointResolver
	Handlers         Handlers
	Retryer          Retryer
	LogLevel         LogLevel
	Logger           Logger
	HTTPClient       HTTPClient
}

// NewClient will return a pointer to a new initialized service client.
func NewClient(cfg Config, metadata Metadata) *Client {
	svc := &Client{
		Metadata: metadata,

		// TODO remove config when request refactored
		Config: cfg,

		Credentials:      cfg.Credentials,
		EndpointResolver: cfg.EndpointResolver,
		Handlers:         cfg.Handlers.Copy(),
		Retryer:          cfg.Retryer,

		LogLevel: cfg.LogLevel,
		Logger:   cfg.Logger,
	}

	if c, ok := svc.Config.HTTPClient.(*http.Client); ok {
		svc.Config.HTTPClient = wrapWithoutRedirect(c)
	}

	svc.AddDebugHandlers()
	return svc
}

// NewRequest returns a new Request pointer for the service API
// operation and parameters.
func (c *Client) NewRequest(operation *Operation, params interface{}, data interface{}) *Request {
	return New(c.Config, c.Metadata, c.Handlers, c.Retryer, operation, params, data)
}

// AddDebugHandlers injects debug logging handlers into the service to log request
// debug information.
func (c *Client) AddDebugHandlers() {
	if !c.Config.LogLevel.AtLeast(LogDebug) {
		return
	}

	c.Handlers.Send.PushFrontNamed(NamedHandler{Name: "awssdk.client.LogRequest", Fn: logRequest})
	c.Handlers.Send.PushBackNamed(NamedHandler{Name: "awssdk.client.LogResponse", Fn: logResponse})
}

func wrapWithoutRedirect(c *http.Client) *http.Client {
	tr := c.Transport
	if tr == nil {
		tr = http.DefaultTransport
	}

	cc := *c
	cc.CheckRedirect = limitedRedirect
	cc.Transport = stubBadHTTPRedirectTransport{
		tr: tr,
	}

	return &cc
}

func limitedRedirect(r *http.Request, via []*http.Request) error {
	// Request.Response, in CheckRedirect is the response that is triggering
	// the redirect.
	resp := r.Response
	if r.URL.String() == stubBadHTTPRedirectLocation {
		resp.Header.Del(stubBadHTTPRedirectLocation)
		return http.ErrUseLastResponse
	}

	switch resp.StatusCode {
	case 307, 308:
		// Only allow 307 and 308 redirects as they preserve the method.
		return nil
	}

	return http.ErrUseLastResponse
}

type stubBadHTTPRedirectTransport struct {
	tr http.RoundTripper
}

const stubBadHTTPRedirectLocation = `https://amazonaws.com/badhttpredirectlocation`

func (t stubBadHTTPRedirectTransport) RoundTrip(r *http.Request) (*http.Response, error) {
	resp, err := t.tr.RoundTrip(r)
	if err != nil {
		return resp, err
	}

	// TODO S3 is the only known service to return 301 without location header.
	// consider moving this to a S3 customization.
	switch resp.StatusCode {
	case 301, 302:
		if v := resp.Header.Get("Location"); len(v) == 0 {
			resp.Header.Set("Location", stubBadHTTPRedirectLocation)
		}
	}

	return resp, err
}

redpajama_set_name: RedPajamaGithub


text:
package pl.consdata.ico.sqcompanion.cache;

import lombok.experimental.UtilityClass;

import java.util.Arrays;
import java.util.List;

@UtilityClass
public class Caches {

    public static final String GROUP_OVERVIEW_CACHE = "cache_group_overview";
    public static final String GROUP_DETAILS_CACHE = "cache_group_details";
    public static final String PROJECT_SUMMARY_CACHE = "cache_project_summary";
    public static final String GROUP_VIOLATIONS_HISTORY_CACHE = "cache_group_violations_history";
    public static final String ALL_PROJECTS_VIOLATIONS_HISTORY_DIFF_CACHE = "cache_all_projects_violations_history_diff";
    public static final String ALL_PROJECTS_DETAILS_CACHE = "cache_all_projects_details";
    public static final String PROJECT_VIOLATIONS_HISTORY_CACHE = "cache_project_violations_history";
    public static final String PROJECT_VIOLATIONS_HISTORY_DIFF_CACHE = "cache_project_violations_history_diff";
    public static final String GROUP_USER_VIOLATIONS_HISTORY_DIFF_CACHE = "cache_group_user_violations_history_diff";
    public static final String GROUP_USERS_VIOLATIONS_HISTORY_DIFF_CACHE = "cache_group_users_violations_history_diff";
    public static final String GROUP_PROJECT_VIOLATIONS_HISTORY_CACHE = "cache_group_project_violations_history";
    public static final String GROUP_PROJECT_VIOLATIONS_HISTORY_DIFF_CACHE = "cache_group_project_violations_history_diff";
    public static final String GROUP_PROJECT_SUMMARY_CACHE = "cache_group_project_summary";

    public static final List<String> LIST = Arrays.asList(
            GROUP_OVERVIEW_CACHE,
            GROUP_DETAILS_CACHE,
            GROUP_VIOLATIONS_HISTORY_CACHE,
            ALL_PROJECTS_VIOLATIONS_HISTORY_DIFF_CACHE,
            ALL_PROJECTS_DETAILS_CACHE,
            PROJECT_SUMMARY_CACHE,
            PROJECT_VIOLATIONS_HISTORY_CACHE,
            PROJECT_VIOLATIONS_HISTORY_DIFF_CACHE,
            GROUP_USER_VIOLATIONS_HISTORY_DIFF_CACHE,
            GROUP_USERS_VIOLATIONS_HISTORY_DIFF_CACHE,
            GROUP_PROJECT_VIOLATIONS_HISTORY_CACHE,
            GROUP_PROJECT_VIOLATIONS_HISTORY_DIFF_CACHE,
            GROUP_PROJECT_SUMMARY_CACHE
    );

}


text:
package org.openrdf.query.algebra;

import org.openrdf.model.Value;

/**
 * A ValueExpr with a constant value.
 */
public class ValueConstant extends QueryModelNodeBase implements ValueExpr {

	/*-----------*
	 * Variables *
	 *-----------*/

	private Value value;

	/*--------------*
	 * Constructors *
	 *--------------*/

	public ValueConstant() {
	}

	public ValueConstant(Value value) {
		setValue(value);
	}

	/*---------*
	 * Methods *
	 *---------*/

	public Value getValue() {
		return value;
	}

	public void setValue(Value value) {
		assert value != null : "value must not be null";
		this.value = value;
	}

	public <X extends Exception> void visit(QueryModelVisitor<X> visitor)
		throws X
	{
		visitor.meet(this);
	}

	@Override
	public String getSignature() {
		StringBuilder sb = new StringBuilder(64);

		sb.append(super.getSignature());
		sb.append(" (value=");
		sb.append(value.toString());
		sb.append(")");

		return sb.toString();
	}

	@Override
	public boolean equals(Object other) {
		if (other instanceof ValueConstant) {
			ValueConstant o = (ValueConstant)other;
			return value.equals(o.getValue());
		}
		return false;
	}

	@Override
	public int hashCode() {
		return value.hashCode();
	}

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


text:
namespace Identifiers{
    struct to{
        to(unsigned interval) : interval(interval) {}

        unsigned interval;
    };
    struct from{
        from(unsigned interval) : interval(interval) {}

        unsigned interval;

        unsigned* operator > (to b){
            unsigned* ret = new unsigned[2];
            ret[0] = this->interval;
            ret[1] = b.interval;
            return ret;
        }

        unsigned* operator > (unsigned b){
            unsigned* ret = new unsigned[2];
            ret[0] = this->interval;
            ret[1] = b;
            return ret;
        }

        unsigned operator- (unsigned b){
            return this->interval - b;
        }

        unsigned operator+ (unsigned b){
            return this->interval + b;
        }

        void operator = (unsigned b){
            this->interval = b;
        }

        from operator --(int){
            return *this;
        }
    };
}
#endif // IDENTIFIERS_H


text:
var _ = require('lodash')
    $ = require('gulp-load-plugins')({});

var options = {};

module.exports = options;

module.exports.updateOptions = function(newOptions) {
  var bundleDefaults,
      baseBundleDefaults = {
        taskPrefix: '',
        src: 'app',
        dist: 'dist',
        clean: {}, // see defaults in ./tasks/clean.js - only included here for the skips below.
        browserify: {}, // see defaults in ./tasks/build-app.js - only included here for the skips below.
        styles: {}, // see defaults in ./tasks/build-styles.js - only included here for the skips below.
        copy: {} // see defaults in ./tasks/copy-resources.js - only included here for the skips below.
      };

  // Properties used in the defaults below.  2nd merge is to perserve the options object reference.
  _.merge(options, _.merge(baseBundleDefaults, options, newOptions));

  bundleDefaults = {
    clean: {
      skip: false,
      dist: options.dist
    },
    browserify: {
      skip: false,
      root: './' + options.src + '/app',
      transforms: [],
      out: 'app.js',
      failOnError: false,
      debug: $.util.env.type !== 'production',
      dist: options.dist
    },
    styles: {
      skip: false,
      includes: [],
      root: options.src + '/app.scss',
      dist: options.dist
    },
    copy: {
      skip: false,
      src: options.src,
      excludes: 'scss',
      dist: options.dist
    }
  };

  // 2nd merge is to perserve the options object reference.
  _.merge(options, _.merge(bundleDefaults, options));

  return options;
};


text:
package distribution

import (
	"net/url"
	"strings"
	"syscall"

	"github.com/Sirupsen/logrus"
	"github.com/docker/distribution"
	"github.com/docker/distribution/reference"
	"github.com/docker/distribution/registry/api/errcode"
	"github.com/docker/distribution/registry/api/v2"
	"github.com/docker/distribution/registry/client"
	"github.com/docker/distribution/registry/client/auth"
	"github.com/docker/docker/distribution/xfer"
	"github.com/pkg/errors"
)

// ErrNoSupport is an error type used for errors indicating that an operation
// is not supported. It encapsulates a more specific error.
type ErrNoSupport struct{ Err error }

func (e ErrNoSupport) Error() string {
	if e.Err == nil {
		return "not supported"
	}
	return e.Err.Error()
}

// fallbackError wraps an error that can possibly allow fallback to a different
// endpoint.
type fallbackError struct {
	// err is the error being wrapped.
	err error
	// confirmedV2 is set to true if it was confirmed that the registry
	// supports the v2 protocol. This is used to limit fallbacks to the v1
	// protocol.
	confirmedV2 bool
	// transportOK is set to true if we managed to speak HTTP with the
	// registry. This confirms that we're using appropriate TLS settings
	// (or lack of TLS).
	transportOK bool
}

// Error renders the FallbackError as a string.
func (f fallbackError) Error() string {
	return f.Cause().Error()
}

func (f fallbackError) Cause() error {
	return f.err
}

// shouldV2Fallback returns true if this error is a reason to fall back to v1.
func shouldV2Fallback(err errcode.Error) bool {
	switch err.Code {
	case errcode.ErrorCodeUnauthorized, v2.ErrorCodeManifestUnknown, v2.ErrorCodeNameUnknown:
		return true
	}
	return false
}

// TranslatePullError is used to convert an error from a registry pull
// operation to an error representing the entire pull operation. Any error
// information which is not used by the returned error gets output to
// log at info level.
func TranslatePullError(err error, ref reference.Named) error {
	switch v := err.(type) {
	case errcode.Errors:
		if len(v) != 0 {
			for _, extra := range v[1:] {
				logrus.Infof("Ignoring extra error returned from registry: %v", extra)
			}
			return TranslatePullError(v[0], ref)
		}
	case errcode.Error:
		var newErr error
		switch v.Code {
		case errcode.ErrorCodeDenied:
			// ErrorCodeDenied is used when access to the repository was denied
			newErr = errors.Errorf("pull access denied for %s, repository does not exist or may require 'docker login'", reference.FamiliarName(ref))
		case v2.ErrorCodeManifestUnknown:
			newErr = errors.Errorf("manifest for %s not found", reference.FamiliarString(ref))
		case v2.ErrorCodeNameUnknown:
			newErr = errors.Errorf("repository %s not found", reference.FamiliarName(ref))
		}
		if newErr != nil {
			logrus.Infof("Translating %q to %q", err, newErr)
			return newErr
		}
	case xfer.DoNotRetry:
		return TranslatePullError(v.Err, ref)
	}

	return err
}

// continueOnError returns true if we should fallback to the next endpoint
// as a result of this error.
func continueOnError(err error) bool {
	switch v := err.(type) {
	case errcode.Errors:
		if len(v) == 0 {
			return true
		}
		return continueOnError(v[0])
	case ErrNoSupport:
		return continueOnError(v.Err)
	case errcode.Error:
		return shouldV2Fallback(v)
	case *client.UnexpectedHTTPResponseError:
		return true
	case ImageConfigPullError:
		return false
	case error:
		return !strings.Contains(err.Error(), strings.ToLower(syscall.ESRCH.Error()))
	}
	// let's be nice and fallback if the error is a completely
	// unexpected one.
	// If new errors have to be handled in some way, please
	// add them to the switch above.
	return true
}

// retryOnError wraps the error in xfer.DoNotRetry if we should not retry the
// operation after this error.
func retryOnError(err error) error {
	switch v := err.(type) {
	case errcode.Errors:
		if len(v) != 0 {
			return retryOnError(v[0])
		}
	case errcode.Error:
		switch v.Code {
		case errcode.ErrorCodeUnauthorized, errcode.ErrorCodeUnsupported, errcode.ErrorCodeDenied, errcode.ErrorCodeTooManyRequests, v2.ErrorCodeNameUnknown:
			return xfer.DoNotRetry{Err: err}
		}
	case *url.Error:
		switch v.Err {
		case auth.ErrNoBasicAuthCredentials, auth.ErrNoToken:
			return xfer.DoNotRetry{Err: v.Err}
		}
		return retryOnError(v.Err)
	case *client.UnexpectedHTTPResponseError:
		return xfer.DoNotRetry{Err: err}
	case error:
		if err == distribution.ErrBlobUnknown {
			return xfer.DoNotRetry{Err: err}
		}
		if strings.Contains(err.Error(), strings.ToLower(syscall.ENOSPC.Error())) {
			return xfer.DoNotRetry{Err: err}
		}
	}
	// let's be nice and fallback if the error is a completely
	// unexpected one.
	// If new errors have to be handled in some way, please
	// add them to the switch above.
	return err
}


text:
class NineGridSpriteLayer :public BaseCaseLayer
{
	MEDUSA_NODE(NineGridSpriteLayer, BaseCaseLayer);
public:
	NineGridSpriteLayer(StringRef name=StringRef::Empty,const IEventArg& e=IEventArg::Empty);
	virtual ~NineGridSpriteLayer(void);
	virtual bool Initialize()override;
};

MEDUSA_ENABLE_STATIC_CONSTRUCTOR(NineGridSpriteLayer);


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

/*============================================================
**
** Source: test.c
**
** Purpose: Test for lstrlenW() function
**
**
**=========================================================*/

#define UNICODE

#include <palsuite.h>

int __cdecl main(int argc, char *argv[]) {

    WCHAR FirstString[] = {'T','E','S','T','\0'}; /* 4 characters */

    /*
     * Initialize the PAL and return FAILURE if this fails
     */

    if(0 != (PAL_Initialize(argc, argv)))
    {
        return FAIL;
    }

    /* The string size should be 4, as noted just above */
    if(lstrlen(FirstString) != 4)
    {
        Fail("ERROR:  The return value was %d when it should have shown the "
             "size to be 4 characters.\n",lstrlen(FirstString));
    }

    /* A NULL pointer should return 0 length */
    if(lstrlen(NULL) != 0)
    {
        Fail("ERROR: The return value was %d when it should have been 0, the "
             "length of a NULL pointer.\n",lstrlen(NULL));
    }

    PAL_Terminate();
    return PASS;
}


text:
// Generated on Mon Mar 17 18:02:09 MSK 2008
// DTD/Schema  :    http://maven.apache.org/POM/4.0.0

package org.jetbrains.idea.maven.dom.model;

import javax.annotation.Nonnull;

import com.intellij.openapi.paths.PathReference;
import com.intellij.util.xml.Convert;
import com.intellij.util.xml.GenericDomValue;
import org.jetbrains.idea.maven.dom.MavenDomElement;
import org.jetbrains.idea.maven.dom.references.MavenDirectoryPathReferenceConverter;

/**
 * http://maven.apache.org/POM/4.0.0:Reporting interface.
 *

 *
Type http://maven.apache.org/POM/4.0.0:Reporting documentation

 * 4.0.0
 *

 */
public interface MavenDomReporting extends MavenDomElement {

  /**
   * Returns the value of the excludeDefaults child.
   *

   *
Element http://maven.apache.org/POM/4.0.0:excludeDefaults documentation

   * 4.0.0
   *

   *
   * @return the value of the excludeDefaults child.
   */
  @Nonnull
  GenericDomValue<Boolean> getExcludeDefaults();

  /**
   * Returns the value of the outputDirectory child.
   *

   *
Element http://maven.apache.org/POM/4.0.0:outputDirectory documentation

   * 4.0.0
   *

   *
   * @return the value of the outputDirectory child.
   */
  @Nonnull
  @Convert(value = MavenDirectoryPathReferenceConverter.class, soft = true)
  GenericDomValue<PathReference> getOutputDirectory();

  /**
   * Returns the value of the plugins child.
   *

   *
Element http://maven.apache.org/POM/4.0.0:plugins documentation

   * 4.0.0
   *

   *
   * @return the value of the plugins child.
   */
  @Nonnull
  MavenDomPlugins getPlugins();
}


text:
package db

import (
	"database/sql"

	"github.com/jmoiron/sqlx"
)

// Writer represents an open connection to the database
var Writer Queryable

// Queryable represent a global interface for transactions, prepared statement,
// etc.
type Queryable interface {
	sqlx.Execer
	sqlx.Queryer
	sqlx.Preparer
	BindNamed(query string, arg interface{}) (string, []interface{}, error)
	DriverName() string
	Get(dest interface{}, query string, args ...interface{}) error
	MustExec(query string, args ...interface{}) sql.Result
	NamedExec(query string, arg interface{}) (sql.Result, error)
	NamedQuery(query string, arg interface{}) (*sqlx.Rows, error)
	PrepareNamed(query string) (*sqlx.NamedStmt, error)
	Preparex(query string) (*sqlx.Stmt, error)
	Rebind(query string) string
	Select(dest interface{}, query string, args ...interface{}) error
}


text:
package com.salesforce.storm.spout.dynamic;

/**
 * Facade in front of MessageBus reducing available scope down to only the methods
 * that should be available to virtual spouts.
 */
public interface VirtualSpoutMessageBus {

    /**
     * Registers a new VirtualSpout with the bus.
     * @param virtualSpoutIdentifier identifier to register
     */
    void registerVirtualSpout(final VirtualSpoutIdentifier virtualSpoutIdentifier);

    /**
     * Publish a new message onto the bus.
     * Depending on the implementation, this *may* be blocking.
     * @param message message to publish
     * @throws InterruptedException if the operation is interrupted
     */
    void publishMessage(final Message message) throws InterruptedException;

    /**
     * Get the number of message on the bus.
     * @return number of message on the bus
     */
    int messageSize();

    /**
     * Publish an error to the bus.
     * @param throwable error to publish
     */
    void publishError(final Throwable throwable);

    /**
     * Get next acked messageId for the given VirtualSpout.
     * This method should never block, but instead return NULL if none exists.
     *
     * @param virtualSpoutIdentifier Identifier to retrieve the next messageId for.
     * @return next available MessageId, or NULL
     */
    MessageId getAckedMessage(final VirtualSpoutIdentifier virtualSpoutIdentifier);

    /**
     * Get next failed messageId for the given VirtualSpout.
     * This method should never block, but instead return a NULL if none exists.
     *
     * @param virtualSpoutIdentifier Identifier to retrieve the next messageId for.
     * @return next available MessageId, or NULL
     */
    MessageId getFailedMessage(final VirtualSpoutIdentifier virtualSpoutIdentifier);

    /**
     * Called to unregister a VirtualSpout.
     * @param virtualSpoutIdentifier identifier to unregister.
     */
    void unregisterVirtualSpout(final VirtualSpoutIdentifier virtualSpoutIdentifier);
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="copy49.xsl"?>
<doc id="1" class="mobile" xml:lang="en" >
<text>Sample text</text>
</doc>


text:
<!DOCTYPE html>

    <title>Getting Started</title>
    <link rel="stylesheet" type="text/css" href="../../Content/ResidencyBundle.css">

    <meta name="viewport" content="width=device-width, initial-scale=1" />

                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> Toggle navigation Menu </button> FAU

 Home

 Application

                        <button type="button" class="btn btn-lg btn-default dropdown-toggle glyphicon glyphicon-user" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> </button>

                                <?php
                                echo $_SESSION["login_user_email"];
                                ?>

 Logout

                    <button id="studentNewBtn" type="button" class="btn btn-md btn-success center-block">Start an Application</button>

 Please be sure to read the Getting Started guide below before starting an application

FAU Residency Affidavit

 Welcome to the FAUs online residency application. We make it easier and more convenient for you as a student to fill out your residency affidavit. Simply check out the Getting Started guide below to begin the process!

Let's Get Started

 Step 1. Review what's required

 Take a look at the Florida Residency Guidelines  prior to beginning the form itself. Most questions will be answered by the guidelines above so be sure to review the basic requirements to qualify as a Florida Resident.

 Step 2. Obtain necessary documents

If you plan to apply for in-state tuition you must provide valid documents which prove your residency claim.

Claimant must provide one of the following

 Florida Voter's registration card

Florida Driver's license

Florida State identification card

Florida Vehicle registration

Proof of permanent residence for 12 consecutive months prior to students enrollment

Proof of homestead exemption in Florida

Official transcripts from a Florida high school for 2 or more years

Proof of permanent full-time employment (30+ hrs. a week) for a 12 month period

 Claimant may provide one or more document to demonstrate residency in Florida

Declaration of domicile in Florida in accordance with s. 222.17, Florida Statutes

Florida professional or occupation license

Florida incorporation

Document evidencing family ties in Florida

Proof of membership based in a Florida-based charitable or professional organization

Any other documentation that supports your request for resident status (utility bills, lease agreement, etc...)

Once you've obtained the required documentation you are able to send them electronically via scanning them into your computer then uploading in the form itself. If you don't have a scanner any local UPS, FedEx Kinkos, Office Depot, library and many other places have scanners available if not for free then for a very reasonable price.

 Step 3. Fill out the form

By now you've done the most tedious process of making sure you know what you need and getting what you need. Now it's time to finally fill out the form. Click [here] to get started or go to the top of the page and click on the Start new Application button. Fill in the necessary fields and ensure that the required documents you select to use are the same ones you are uploading to the form.


text:
namespace libj {
namespace bridge {

template<typename I>
class AbstractStatus : public I {
 public:
    AbstractStatus(Status::CPtr status) : status_(status) {}

    virtual Int code() const {
        return status_->code();
    }

    virtual String::CPtr message() const {
        return status_->message();
    }

    virtual String::CPtr toString() const {
        return status_->toString();
    }

 private:
    Status::CPtr status_;
};

}  // namespace bridge
}  // namespace libj

#endif  // LIBJ_BRIDGE_ABSTRACT_STATUS_H_


text:
using OLEDB.Test.ModuleCore;

namespace System.Xml.Tests
{
    internal class XmlDigitCharConvertTests3 : XmlDigitCharConvertTests
    {
        #region Constructors and Destructors

        public XmlDigitCharConvertTests3()
        {
            for (int i = 0; i < _byte_Digit.Length; i = i + 2)
            {
                AddVariation(new CVariation(this, "EncodeName-DecodeName : " + _Expbyte_Digit[i / 2], XmlEncodeName3));
            }
        }

        #endregion

        #region Public Methods and Operators

        public int XmlEncodeName3()
        {
            int i = ((CurVariation.id) - 1) * 2;
            string strDeVal = string.Empty;
            string strEnVal = string.Empty;
            string strVal = string.Empty;

            strVal = (BitConverter.ToChar(_byte_Digit, i)).ToString();
            strEnVal = XmlConvert.EncodeName(strVal);
            CError.Compare(strEnVal, _Expbyte_Digit[i / 2], "Encode Comparison failed at " + i);

            strDeVal = XmlConvert.DecodeName(strEnVal);
            CError.Compare(strDeVal, strVal, "Decode Comparison failed at " + i);
            return TEST_PASS;
        }
        #endregion
    }
}


text:
namespace openmc {

//==============================================================================
// XSDATA contains the temperature-independent cross section data for an MGXS
//==============================================================================

class XsData {

  private:
    //! \brief Reads scattering data from the HDF5 file
    void
    scatter_from_hdf5(hid_t xsdata_grp, size_t n_ang,
     int scatter_format, int final_scatter_format, int order_data);

    //! \brief Reads fission data from the HDF5 file
    void
    fission_from_hdf5(hid_t xsdata_grp, size_t n_ang, bool is_isotropic);

    //! \brief Reads fission data formatted as chi and nu-fission vectors from
    //  the HDF5 file when beta is provided.
    void
    fission_vector_beta_from_hdf5(hid_t xsdata_grp, size_t n_ang, bool is_isotropic);

    //! \brief Reads fission data formatted as chi and nu-fission vectors from
    //  the HDF5 file when beta is not provided.
    void
    fission_vector_no_beta_from_hdf5(hid_t xsdata_grp, size_t n_ang);

    //! \brief Reads fission data formatted as chi and nu-fission vectors from
    //  the HDF5 file when no delayed data is provided.
    void
    fission_vector_no_delayed_from_hdf5(hid_t xsdata_grp, size_t n_ang);

    //! \brief Reads fission data formatted as a nu-fission matrix from
    //  the HDF5 file when beta is provided.
    void
    fission_matrix_beta_from_hdf5(hid_t xsdata_grp, size_t n_ang, bool is_isotropic);

    //! \brief Reads fission data formatted as a nu-fission matrix from
    //  the HDF5 file when beta is not provided.
    void
    fission_matrix_no_beta_from_hdf5(hid_t xsdata_grp, size_t n_ang);

    //! \brief Reads fission data formatted as a nu-fission matrix from
    //  the HDF5 file when no delayed data is provided.
    void
    fission_matrix_no_delayed_from_hdf5(hid_t xsdata_grp, size_t n_ang);

  public:

    // The following quantities have the following dimensions:
    // [angle][incoming group]
    xt::xtensor<double, 2> total;
    xt::xtensor<double, 2> absorption;
    xt::xtensor<double, 2> nu_fission;
    xt::xtensor<double, 2> prompt_nu_fission;
    xt::xtensor<double, 2> kappa_fission;
    xt::xtensor<double, 2> fission;
    xt::xtensor<double, 2> inverse_velocity;

    // decay_rate has the following dimensions:
    // [angle][delayed group]
    xt::xtensor<double, 2> decay_rate;
    // delayed_nu_fission has the following dimensions:
    // [angle][delayed group][incoming group]
    xt::xtensor<double, 3> delayed_nu_fission;
    // chi_prompt has the following dimensions:
    // [angle][incoming group][outgoing group]
    xt::xtensor<double, 3> chi_prompt;
    // chi_delayed has the following dimensions:
    // [angle][incoming group][outgoing group][delayed group]
    xt::xtensor<double, 4> chi_delayed;
    // scatter has the following dimensions: [angle]
    std::vector<std::shared_ptr<ScattData>> scatter;

    XsData() = default;

    //! \brief Constructs the XsData object metadata.
    //!
    //! @param num_groups Number of energy groups.
    //! @param num_delayed_groups Number of delayed groups.
    //! @param fissionable Is this a fissionable data set or not.
    //! @param scatter_format The scattering representation of the file.
    //! @param n_pol Number of polar angles.
    //! @param n_azi Number of azimuthal angles.
    XsData(bool fissionable, int scatter_format, int n_pol, int n_azi);

    //! \brief Loads the XsData object from the HDF5 file
    //!
    //! @param xs_id HDF5 group id for the cross section data.
    //! @param fissionable Is this a fissionable data set or not.
    //! @param scatter_format The scattering representation of the file.
    //! @param final_scatter_format The scattering representation after reading;
    //!   this is different from scatter_format if converting a Legendre to
    //!   a tabular representation.
    //! @param order_data The dimensionality of the scattering data in the file.
    //! @param is_isotropic Is this an isotropic or angular with respect to
    //!   the incoming particle.
    //! @param n_pol Number of polar angles.
    //! @param n_azi Number of azimuthal angles.
    void
    from_hdf5(hid_t xsdata_grp, bool fissionable, int scatter_format,
         int final_scatter_format, int order_data, bool is_isotropic, int n_pol,
         int n_azi);

    //! \brief Combines the microscopic data to a macroscopic object.
    //!
    //! @param micros Microscopic objects to combine.
    //! @param scalars Scalars to multiply the microscopic data by.
    void
    combine(const std::vector<XsData*>& those_xs, const std::vector<double>& scalars);

    //! \brief Checks to see if this and that are able to be combined
    //!
    //! This comparison is used when building macroscopic cross sections
    //! from microscopic cross sections.
    //! @param that The other XsData to compare to this one.
    //! @return True if they can be combined.
    bool
    equiv(const XsData& that);
};

} //namespace openmc
#endif // OPENMC_XSDATA_H


text:
(function() {
  (function(factory) {
    "use strict";    if (typeof define === "function" && define.amd) {
      return define(["jquery", "load-image", "canvas-to-blob", "./jquery.fileupload"], factory);
    } else {
      return factory(window.jQuery, window.loadImage);
    }
  })(function($, loadImage) {
    "use strict";    return $.widget("blueimp.fileupload", $.blueimp.fileupload, {
      options: {
        process: [],
        add: function(e, data) {
          return $(this).fileupload("process", data).done(function() {
            return data.submit();
          });
        }
      },
      processActions: {
        load: function(data, options) {
          var dfd, file, that;

          that = this;
          file = data.files[data.index];
          dfd = $.Deferred();
          if (window.HTMLCanvasElement && window.HTMLCanvasElement.prototype.toBlob && ($.type(options.maxFileSize) !== "number" || file.size < options.maxFileSize) && (!options.fileTypes || options.fileTypes.test(file.type))) {
            loadImage(file, function(img) {
              if (!img.src) {
                return dfd.rejectWith(that, [data]);
              }
              data.img = img;
              return dfd.resolveWith(that, [data]);
            });
          } else {
            dfd.rejectWith(that, [data]);
          }
          return dfd.promise();
        },
        resize: function(data, options) {
          var canvas, img;

          img = data.img;
          canvas = void 0;
          options = $.extend({
            canvas: true
          }, options);
          if (img) {
            canvas = loadImage.scale(img, options);
            if (canvas.width !== img.width || canvas.height !== img.height) {
              data.canvas = canvas;
            }
          }
          return data;
        },
        save: function(data, options) {
          var callback, dfd, file, name, that;

          if (!data.canvas) {
            return data;
          }
          that = this;
          file = data.files[data.index];
          name = file.name;
          dfd = $.Deferred();
          callback = function(blob) {
            if (!blob.name) {
              if (file.type === blob.type) {
                blob.name = file.name;
              } else {
                if (file.name) {
                  blob.name = file.name.replace(/\..+$/, "." + blob.type.substr(6));
                }
              }
            }
            data.files[data.index] = blob;
            return dfd.resolveWith(that, [data]);
          };
          if (data.canvas.mozGetAsFile) {
            callback(data.canvas.mozGetAsFile((/^image\/(jpeg|png)$/.test(file.type) && name) || ((name && name.replace(/\..+$/, "")) || "blob") + ".png", file.type));
          } else {
            data.canvas.toBlob(callback, file.type);
          }
          return dfd.promise();
        }
      },
      _processFile: function(files, index, options) {
        var chain, dfd, that;

        that = this;
        dfd = $.Deferred().resolveWith(that, [
          {
            files: files,
            index: index
          }
        ]);
        chain = dfd.promise();
        that._processing += 1;
        $.each(options.process, function(i, settings) {
          return chain = chain.pipe(function(data) {
            return that.processActions[settings.action].call(this, data, settings);
          });
        });
        chain.always(function() {
          that._processing -= 1;
          if (that._processing === 0) {
            return that.element.removeClass("fileupload-processing");
          }
        });
        if (that._processing === 1) {
          that.element.addClass("fileupload-processing");
        }
        return chain;
      },
      process: function(data) {
        var options, that;

        that = this;
        options = $.extend({}, this.options, data);
        if (options.process && options.process.length && this._isXHRUpload(options)) {
          $.each(data.files, function(index, file) {
            return that._processingQueue = that._processingQueue.pipe(function() {
              var dfd;

              dfd = $.Deferred();
              that._processFile(data.files, index, options).always(function() {
                return dfd.resolveWith(that);
              });
              return dfd.promise();
            });
          });
        }
        return this._processingQueue;
      },
      _create: function() {
        this._super();
        this._processing = 0;
        return this._processingQueue = $.Deferred().resolveWith(this).promise();
      }
    });
  });

}).call(this);


text:
import base64
import re
import urllib
import zlib
from typing import Optional

from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.utils.http import is_safe_url
from saml2.config import SPConfig
from saml2.s_utils import UnknownSystemEntity

def get_custom_setting(name: str, default=None):
    return getattr(settings, name, default)

def available_idps(config: SPConfig, langpref=None) -> dict:
    if langpref is None:
        langpref = "en"

    idps = set()

    for metadata_name, metadata in config.metadata.metadata.items():
        result = metadata.any('idpsso_descriptor', 'single_sign_on_service')
        if result:
            idps.update(result.keys())

    return {
        idp: config.metadata.name(idp, langpref)
        for idp in idps
    }

def get_idp_sso_supported_bindings(idp_entity_id: Optional[str] = None, config: Optional[SPConfig] = None) -> list:
    """Returns the list of bindings supported by an IDP
    This is not clear in the pysaml2 code, so wrapping it in a util"""
    if config is None:
        # avoid circular import
        from .conf import get_config
        config = get_config()
    # load metadata store from config
    meta = getattr(config, 'metadata', {})
    # if idp is None, assume only one exists so just use that
    if idp_entity_id is None:
        try:
            idp_entity_id = list(available_idps(config).keys())[0]
        except IndexError:
            raise ImproperlyConfigured("No IdP configured!")
    try:
        return list(meta.service(idp_entity_id, 'idpsso_descriptor', 'single_sign_on_service').keys())
    except UnknownSystemEntity:
        return []

def get_location(http_info):
    """Extract the redirect URL from a pysaml2 http_info object"""
    try:
        headers = dict(http_info['headers'])
        return headers['Location']
    except KeyError:
        return http_info['url']

def validate_referral_url(request, url):
    # Ensure the user-originating redirection url is safe.
    # By setting SAML_ALLOWED_HOSTS in settings.py the user may provide a list of "allowed"
    # hostnames for post-login redirects, much like one would specify ALLOWED_HOSTS .
    # If this setting is absent, the default is to use the hostname that was used for the current
    # request.
    saml_allowed_hosts = set(
        getattr(settings, 'SAML_ALLOWED_HOSTS', [request.get_host()]))

    if not is_safe_url(url=url, allowed_hosts=saml_allowed_hosts):
        return settings.LOGIN_REDIRECT_URL
    return url

def saml2_from_httpredirect_request(url):
    urlquery = urllib.parse.urlparse(url).query
    b64_inflated_saml2req = urllib.parse.parse_qs(urlquery)['SAMLRequest'][0]

    inflated_saml2req = base64.b64decode(b64_inflated_saml2req)
    deflated_saml2req = zlib.decompress(inflated_saml2req, -15)
    return deflated_saml2req

def get_session_id_from_saml2(saml2_xml):
    saml2_xml = saml2_xml.encode() if isinstance(saml2_xml, str) else saml2_xml
    return re.findall(b'ID="([a-z0-9\-]*)"', saml2_xml, re.I)[0].decode()

def get_subject_id_from_saml2(saml2_xml):
    saml2_xml = saml2_xml if isinstance(saml2_xml, str) else saml2_xml.decode()
    re.findall('">([a-z0-9]+)</saml:NameID>', saml2_xml)[0]


text:
<?php

namespace League\FactoryMuffin\Exceptions;

/**
 * This is the definition not found exception class.
 *
 * This is thrown when you try to create a model without registering its
 * definition first. This class extends DefinitionException, so you may want to
 * try to catch that exception instead, if you want to be more general.
 *
 * @author Graham Campbell <graham@alt-three.com>
 */
class DefinitionNotFoundException extends DefinitionException
{
    /**
     * Create a new definition not found exception instance.
     *
     * @param string      $name    The model definition name.
     * @param string|null $message The exception message.
     *
     * @return void
     */
    public function __construct($name, $message = null)
    {
        if (!$message) {
            $message = "The model definition '$name' is undefined.";
        }

        parent::__construct($name, $message);
    }
}


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

<title>Uses of Class asj.data.JSONObject</title>
<meta name="date" content="2021-01-31">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Class
asj.data.JSONObject

Packages that use JSONObject

Package
Description

asj

asj.data

IK.doubleIK

IK.floatIK

math.doubleV

math.floatV

Uses of JSONObject in asj

Fields in asj with type parameters of type JSONObject

Modifier and Type
Field and Description

java.util.HashMap<java.lang.Class,java.util.HashMap<java.lang.String,JSONObject>>
LoadManager.jsonObjects

Methods in asj that return JSONObject

Modifier and Type
Method and Description

JSONObject
Saveable.getSaveJSON(SaveManager saveManager)

JSONObject
SaveManager.hashMapToJSON(java.util.HashMap<?,?> hm)

JSONObject
CanLoad.toJSONObject()

Methods in asj with parameters of type JSONObject

Modifier and Type
Method and Description

<T extends Saveable>
T
LoadManager.getObjectFor(java.lang.Class objectClass,
            JSONObject j,
            java.lang.String hashKey)

void
Saveable.loadFromJSONObject(JSONObject j,
                  LoadManager l)

CanLoad
CanLoad.populateSelfFromJSON(JSONObject j)

Method parameters in asj with type arguments of type JSONObject

Modifier and Type
Method and Description

<T> void
LoadManager.createEmptyLoadMaps(java.util.Map<java.lang.String,JSONObject> jMap,
                   java.util.Map<java.lang.String,? super T> oMap,
                   JSONArray jArr,
                   java.lang.Class<T> c)

void
LoadManager.loadGenerally(java.util.HashMap<java.lang.String,JSONObject> jsonForm,
             java.util.HashMap<java.lang.String,? extends Saveable> saveableForm)

general loader for when nothing fancy is required (I should make pretty much everything use this eventually)

Uses of JSONObject in asj.data

Methods in asj.data that return JSONObject

Modifier and Type
Method and Description

JSONObject
JSONArray.getJSONObject(int index)

Get the JSONObject associated with an index.

JSONObject
JSONArray.getJSONObject(int index,
             JSONObject defaultValue)

JSONObject
JSONObject.getJSONObject(java.lang.String key)

Get the JSONObject value associated with a key.

static JSONObject
StringFuncs.loadJSONObject(java.io.File file)

JSONObject
StringFuncs.loadJSONObject(java.lang.String filename)

static JSONObject
JSONObject.parse(java.lang.String source)

Construct a JSONObject from a source JSON text string.

JSONObject
StringFuncs.parseJSONObject(java.lang.String input)

JSONObject
JSONObject.put(java.lang.String key,
   java.lang.Object value)

Put a key/value pair in the JSONObject.

JSONObject
JSONObject.setBoolean(java.lang.String key,
          boolean value)

Put a key/boolean pair in the JSONObject.

JSONObject
JSONObject.setDouble(java.lang.String key,
         double value)

Put a key/double pair in the JSONObject.

JSONObject
JSONObject.setFloat(java.lang.String key,
        float value)

JSONObject
JSONObject.setInt(java.lang.String key,
      int value)

Put a key/int pair in the JSONObject.

JSONObject
JSONObject.setJSONArray(java.lang.String key,
            JSONArray value)

JSONObject
JSONObject.setJSONObject(java.lang.String key,
             JSONObject value)

JSONObject
JSONObject.setLong(java.lang.String key,
       long value)

Put a key/long pair in the JSONObject.

JSONObject
JSONObject.setString(java.lang.String key,
         java.lang.String value)

Methods in asj.data with parameters of type JSONObject

Modifier and Type
Method and Description

JSONArray
JSONArray.append(JSONObject value)

JSONObject
JSONArray.getJSONObject(int index,
             JSONObject defaultValue)

static boolean
StringFuncs.saveJSONObject(JSONObject json,
              java.lang.String filename)

static boolean
StringFuncs.saveJSONObject(JSONObject json,
              java.lang.String filename,
              java.lang.String options)

JSONArray
JSONArray.setJSONObject(int index,
             JSONObject value)

JSONObject
JSONObject.setJSONObject(java.lang.String key,
             JSONObject value)

Uses of JSONObject in IK.doubleIK

Methods in IK.doubleIK that return JSONObject

Modifier and Type
Method and Description

JSONObject
AbstractBone.getSaveJSON(SaveManager saveManager)

JSONObject
AbstractIKPin.getSaveJSON(SaveManager saveManager)

JSONObject
AbstractKusudama.getSaveJSON(SaveManager saveManager)

JSONObject
AbstractArmature.getSaveJSON(SaveManager saveManager)

JSONObject
AbstractLimitCone.getSaveJSON(SaveManager saveManager)

Methods in IK.doubleIK with parameters of type JSONObject

Modifier and Type
Method and Description

void
AbstractBone.loadFromJSONObject(JSONObject j,
                  LoadManager l)

void
AbstractIKPin.loadFromJSONObject(JSONObject j,
                  LoadManager l)

void
AbstractKusudama.loadFromJSONObject(JSONObject j,
                  LoadManager l)

void
AbstractArmature.loadFromJSONObject(JSONObject j,
                  LoadManager l)

void
AbstractLimitCone.loadFromJSONObject(JSONObject j,
                  LoadManager l)

Uses of JSONObject in IK.floatIK

Methods in IK.floatIK that return JSONObject

Modifier and Type
Method and Description

JSONObject
AbstractBone.getSaveJSON(SaveManager saveManager)

JSONObject
AbstractIKPin.getSaveJSON(SaveManager saveManager)

JSONObject
AbstractKusudama.getSaveJSON(SaveManager saveManager)

JSONObject
AbstractArmature.getSaveJSON(SaveManager saveManager)

JSONObject
AbstractLimitCone.getSaveJSON(SaveManager saveManager)

Methods in IK.floatIK with parameters of type JSONObject

Modifier and Type
Method and Description

void
AbstractBone.loadFromJSONObject(JSONObject j,
                  LoadManager l)

void
AbstractIKPin.loadFromJSONObject(JSONObject j,
                  LoadManager l)

void
AbstractKusudama.loadFromJSONObject(JSONObject j,
                  LoadManager l)

void
AbstractArmature.loadFromJSONObject(JSONObject j,
                  LoadManager l)

void
AbstractLimitCone.loadFromJSONObject(JSONObject j,
                  LoadManager l)

Uses of JSONObject in math.doubleV

Methods in math.doubleV that return JSONObject

Modifier and Type
Method and Description

JSONObject
AbstractAxes.getSaveJSON(SaveManager saveManager)

JSONObject
SGVec_3d.toJSONObject()

JSONObject
sgRayd.toJSONObject()

Methods in math.doubleV with parameters of type JSONObject

Modifier and Type
Method and Description

void
AbstractAxes.loadFromJSONObject(JSONObject j,
                  LoadManager l)

void
CartesianAxes.loadFromJSONObject(JSONObject j,
                  LoadManager l)

CanLoad
SGVec_3d.populateSelfFromJSON(JSONObject j)

CanLoad
sgRayd.populateSelfFromJSON(JSONObject j)

Constructors in math.doubleV with parameters of type JSONObject

Constructor and Description

SGVec_3d(JSONObject j)

Uses of JSONObject in math.floatV

Methods in math.floatV that return JSONObject

Modifier and Type
Method and Description

JSONObject
AbstractAxes.getSaveJSON(SaveManager saveManager)

JSONObject
SGVec_3f.toJSONObject()

JSONObject
sgRayf.toJSONObject()

Methods in math.floatV with parameters of type JSONObject

Modifier and Type
Method and Description

void
AbstractAxes.loadFromJSONObject(JSONObject j,
                  LoadManager l)

void
CartesianAxes.loadFromJSONObject(JSONObject j,
                  LoadManager l)

CanLoad
SGVec_3f.populateSelfFromJSON(JSONObject j)

CanLoad
sgRayf.populateSelfFromJSON(JSONObject j)

Constructors in math.floatV with parameters of type JSONObject

Constructor and Description

SGVec_3f(JSONObject j)

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes


text:
package com.clubobsidian.obsidianengine.listener;

import com.clubobsidian.obsidianengine.ObsidianEngine;
import com.clubobsidian.obsidianengine.event.EventHandler;
import com.clubobsidian.obsidianengine.event.EventPriority;
import com.clubobsidian.obsidianengine.event.TestEvent;

public class TestListener implements Listener {

	private Long start = -1L;
	private int fired = 0;

	@EventHandler(priority = EventPriority.LOWEST)
	public void test(TestEvent e)
	{
		this.fired += 1;
		if(this.fired == 1)
		{
			this.start = System.currentTimeMillis();
		}
		else
		{
			if(this.fired == 1000000)
			{
				ObsidianEngine.getLogger().info("Time for 1mil events: " + (System.currentTimeMillis() - this.start) + "ms");
			}
		}
	}
}


text:
package org.elasticsearch.river.kafka;

import junit.framework.TestCase;

public class JsonMessageHandlerFactoryTest extends TestCase {

	public void testCreateJsonMessageHandler() throws Exception
	{
		JsonMessageHandlerFactory jmhf = new JsonMessageHandlerFactory();
		MessageHandler jmh = null;

		try {
			jmh = jmhf.createMessageHandler(null);

		} catch (Exception e) {
			fail("This should not fail");
		}

		assertEquals(jmh instanceof JsonMessageHandler, true);
	}

}


text:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">

  <title>Qt 4.3: QFocusEvent Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />

  	Home · All Classes · Main Classes · Grouped Classes · Modules · Functions

QFocusEvent Class Reference
[QtGui module]

The QFocusEvent class contains event parameters for widget focus events. More...

 #include <QFocusEvent>

Inherits QEvent.

List of all members, including inherited members

Qt 3 support members

Public Functions

QFocusEvent ( Type type, Qt::FocusReason reason = Qt::OtherFocusReason )

bool gotFocus () const

bool lostFocus () const

Qt::FocusReason reason () const

6 public functions inherited from QEvent

Additional Inherited Members

1 property inherited from QEvent

Detailed Description

The QFocusEvent class contains event parameters for widget focus events.

Focus events are sent to widgets when the keyboard input focus changes. Focus events occur due to mouse actions, key presses (such as Tab or Backtab), the window system, popup menus, keyboard shortcuts, or other application-specific reasons. The reason for a particular focus event is returned by reason() in the appropriate event handler.

The event handlers QWidget::focusInEvent() and QWidget::focusOutEvent() receive focus events.

See also QWidget::setFocus(), QWidget::setFocusPolicy(), and Keyboard Focus.

Member Function Documentation

QFocusEvent::QFocusEvent ( Type type, Qt::FocusReason reason = Qt::OtherFocusReason )

Constructs a focus event object.

The type parameter must be either QEvent::FocusIn or QEvent::FocusOut. The reason describes the cause of the change in focus.

bool QFocusEvent::gotFocus () const

Returns true if type() is QEvent::FocusIn; otherwise returns false.

bool QFocusEvent::lostFocus () const

Returns true if type() is QEvent::FocusOut; otherwise returns false.

Qt::FocusReason QFocusEvent::reason () const

Returns the reason for this focus event.

<address>

Copyright © 2008 Trolltech
Trademarks

Qt 4.3.5

</address>


text:
[jvm]
Content
open override fun [specifiedName](specified-name.md)(value: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)): [InterfaceDeclaration.Builder](index.md)
More info

See [TypeDeclaration.specifiedName](../../-type-declaration/specified-name.md)

[jvm]
Content
lateinit var [specifiedName](specified-name.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)


text:
<!--@tdm-example:part1-->
# Render Container
The library prepares the controls for rendering, each control is then
used to create an instance of the renderer, a single component that the
library add to the view.

The renderer implementation we are currently using does not apply style
on it's host an so the host's layout flow is inline, i.e. each control
is rendered inline.

We can control the flow using CSS  or we can wrap the renderer with
our own renderer and control the styles there.

We will go with the 2nd option, wrapping the original form will give us
more control over the layout.

## MaterialFormControlRenderer
The renderer we currently use does not apply layout to the components
it renders, this allows flexibility between inline and blocking controls.

`MaterialFormControlRenderer` expose properties using `@Input()` so we
can use it in templates.

The renderer also implements labels as placeholders, where available and
allow to switch of labels using the `@Input()` property **showLabels**

We will use this feature to render labels inline, left to the control
instead of placeholders.

## DynamicFormRowComponent
We call the new renderer `DynamicFormRowComponent`, before we jump into
the implementation let's describe what we are going to implement:

  1. The renderer will use a flex layout creating 2 columns, left column
   for the label and the right column for the control.

  2. `MaterialFormControlRenderer` is used inside the right column with
  the `showLabels` set to false

  3. `DynamicFormRowComponent` will also expose it's interface as
   `@Input()` so it can be used by other templates.

  4. The property **custom** is exposed (also as `@Input()`) which when
  set to true will not use `MaterialFormControlRenderer` to render
  the control, instead it will show the content project into it.

Bullet 3 & 4 are important they will allow us to use local overrides to
render custom controls without breaking the layout, we will re-use this
renderer as provide the implementation as projected content.

Let's jump into the implementation followed by an example:
<!--@tdm-example:part1-->

<!--@tdm-example:part2-->
## Registering a new renderer
We are still running in the same angular application, the default
renderer registered did not change and if we leave the configuration
as is `MaterialFormControlRenderer` will be used.

To set `DynamicFormRowComponent` as the default renderer we need to
create a new provider configuration and set it in the `providers` of
the current component we use to show this page

```ts
providers: [
  { provide: FORM_CONTROL_COMPONENT, useValue: DynamicFormRowComponent }
]
```

You can also see it in the source code view.
<!--@tdm-example:part2-->


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

	<groupId>won</groupId>
	<artifactId>won</artifactId>
	<version>1.0</version>
	<packaging>war</packaging>

	<name>Java EE 6 webapp project</name>
	<description>A starter Java EE 6 webapp project for use on JBoss AS 7, generated from the jboss-javaee6-webapp archetype</description>

	<properties>
		<!-- Explicitly declaring the source encoding eliminates the following
			message: -->
		<!-- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered
			resources, i.e. build is platform dependent! -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<!-- Timestamp format for the maven.build.timestamp property -->
		<!-- You can reference property in pom.xml or filtered resources (must
			enable third-party plugin if using Maven < 2.1) -->
		<maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
		<!-- Specify the JBoss AS directory to be the JBOSS_HOME environment variable -->
		<jboss.home>${env.JBOSS_HOME}</jboss.home>
	</properties>

	<dependencyManagement>
		<dependencies>
			<!-- Define the version of JBoss' Java EE 6 APIs we want to import. Any
				dependencies from org.jboss.spec will have their version defined by this
				BOM -->
			<!-- JBoss distributes a complete set of Java EE 6 APIs including a Bill
				of Materials (BOM). A BOM specifies the versions of a "stack" (or a collection)
				of artifacts. We use this here so that we always get the correct versions
				of artifacts. Here we use the jboss-javaee-web-6.0 stack (you can read this
				as the JBoss stack of the Java EE Web Profile 6 APIs), and we use version
				2.0.0.Beta1 which is the latest release of the stack. You can actually use
				this stack with any version of JBoss AS that implements Java EE 6, not just
				JBoss AS 7! -->
			<dependency>
				<groupId>org.jboss.spec</groupId>
				<artifactId>jboss-javaee-web-6.0</artifactId>
				<version>2.0.0.Final</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>

		<!-- First declare the APIs we depend on and need for compilation. All
			of them are provided by JBoss AS 7 -->

		<!-- Import the CDI API, we use provided scope as the API is included in
			JBoss AS 7 -->
		<dependency>
			<groupId>javax.enterprise</groupId>
			<artifactId>cdi-api</artifactId>
			<scope>provided</scope>
		</dependency>

		<!-- Import the Common Annotations API (JSR-250), we use provided scope
			as the API is included in JBoss AS 7 -->
		<dependency>
			<groupId>org.jboss.spec.javax.annotation</groupId>
			<artifactId>jboss-annotations-api_1.1_spec</artifactId>
			<scope>provided</scope>
		</dependency>

		<!-- Import the JAX-RS API, we use provided scope as the API is included
			in JBoss AS 7 -->
		<dependency>
			<groupId>org.jboss.spec.javax.ws.rs</groupId>
			<artifactId>jboss-jaxrs-api_1.1_spec</artifactId>
			<scope>provided</scope>
		</dependency>

		<!-- Import the JPA API, we use provided scope as the API is included in
			JBoss AS 7 -->
		<dependency>
			<groupId>org.hibernate.javax.persistence</groupId>
			<artifactId>hibernate-jpa-2.0-api</artifactId>
			<scope>provided</scope>
		</dependency>

		<!-- Import the EJB API, we use provided scope as the API is included in
			JBoss AS 7 -->
		<dependency>
			<groupId>org.jboss.spec.javax.ejb</groupId>
			<artifactId>jboss-ejb-api_3.1_spec</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.jboss.spec.javax.servlet</groupId>
			<artifactId>jboss-servlet-api_3.0_spec</artifactId>
			<scope>provided</scope>
		</dependency>

		<!-- JSR-303 (Bean Validation) Implementation -->
		<!-- Provides portable constraints such as @Email -->
		<!-- Hibernate Validator is shipped in JBoss AS 7 -->
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-validator</artifactId>
			<version>4.2.0.Final</version>
			<scope>provided</scope>
			<exclusions>
				<exclusion>
					<groupId>org.slf4j</groupId>
					<artifactId>slf4j-api</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<!-- Annotation processor to generate the JPA 2.0 metamodel classes for
			typesafe criteria queries -->
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-jpamodelgen</artifactId>
			<version>1.1.1.Final</version>
			<scope>provided</scope>
		</dependency>

		<!-- Needed for running tests (you may also use TestNG) -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.10</version>
			<scope>test</scope>
		</dependency>

		<!-- Optional, but highly recommended -->
		<!-- Arquillian allows you to test enterprise code such as EJBs and Transactional(JTA)
			JPA from JUnit/TestNG -->
		<dependency>
			<groupId>org.jboss.arquillian.junit</groupId>
			<artifactId>arquillian-junit-container</artifactId>
			<version>1.0.0.CR4</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpclient</artifactId>
			<version>4.2.1</version>
		</dependency>
		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpcore</artifactId>
			<version>4.2.1</version>
		</dependency>

		<dependency>
			<groupId>org.codehaus.jackson</groupId>
			<artifactId>jackson-core-asl</artifactId>
			<version>1.9.9</version>
		</dependency>

		<dependency>
			<groupId>org.json</groupId>
			<artifactId>json</artifactId>
			<version>20140107</version>
		</dependency>

	</dependencies>

	<build>
		<!-- Maven will append the version to the finalName (which is the name
			given to the generated war, and hence the context root) -->
		<finalName>${project.artifactId}</finalName>
		<plugins>
			<!-- Compiler plugin enforces Java 1.6 compatibility and activates annotation
				processors -->
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.1</version>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.1.1</version>
				<configuration>
					<!-- Java EE 6 doesn't require web.xml, Maven needs to catch up! -->
					<failOnMissingWebXml>false</failOnMissingWebXml>
				</configuration>
			</plugin>
			<!-- The JBoss AS plugin deploys your war to a local JBoss AS container -->
			<!-- To use, set the JBOSS_HOME environment variable and run: mvn package
				jboss-as:deploy -->
			<plugin>
				<groupId>org.jboss.as.plugins</groupId>
				<artifactId>jboss-as-maven-plugin</artifactId>
				<version>7.0.2.Final</version>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<!-- The default profile skips all tests, though you can tune it to run
				just unit tests based on a custom pattern -->
			<!-- Seperate profiles are provided for running all tests, including Arquillian
				tests that execute in the specified container -->
			<id>default</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-surefire-plugin</artifactId>
						<version>2.4.3</version>
						<configuration>
							<skip>true</skip>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<!-- We add the JBoss repository as we need the JBoss AS connectors for
				Arquillian -->
			<repositories>
				<!-- The JBoss Community public repository is a composite repository
					of several major repositories -->
				<!-- see http://community.jboss.org/wiki/MavenGettingStarted-Users -->
				<repository>
					<id>jboss-public-repository</id>
					<name>JBoss Repository</name>
					<url>http://repository.jboss.org/nexus/content/groups/public</url>
					<!-- These optional flags are designed to speed up your builds by reducing
						remote server calls -->
					<releases>
					</releases>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
				</repository>
			</repositories>

			<pluginRepositories>
				<pluginRepository>
					<id>jboss-public-repository</id>
					<name>JBoss Repository</name>
					<url>http://repository.jboss.org/nexus/content/groups/public</url>
					<releases>
					</releases>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
				</pluginRepository>
			</pluginRepositories>

			<!-- An optional Arquillian testing profile that executes tests in your
				JBoss AS instance -->
			<!-- This profile will start a new JBoss AS instance, and execute the
				test, shutting it down when done -->
			<!-- Run with: mvn clean test -Parq-jbossas-managed -->
			<id>arq-jbossas-managed</id>
			<dependencies>
				<dependency>
					<groupId>org.jboss.as</groupId>
					<artifactId>jboss-as-arquillian-container-managed</artifactId>
					<version>7.0.2.Final</version>
					<scope>test</scope>
				</dependency>
			</dependencies>
		</profile>

		<profile>
			<!-- We add the JBoss repository as we need the JBoss AS connectors for
				Arquillian -->
			<repositories>
				<!-- The JBoss Community public repository is a composite repository
					of several major repositories -->
				<!-- see http://community.jboss.org/wiki/MavenGettingStarted-Users -->
				<repository>
					<id>jboss-public-repository</id>
					<name>JBoss Repository</name>
					<url>http://repository.jboss.org/nexus/content/groups/public</url>
					<!-- These optional flags are designed to speed up your builds by reducing
						remote server calls -->
					<releases>
					</releases>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
				</repository>
			</repositories>

			<pluginRepositories>
				<pluginRepository>
					<id>jboss-public-repository</id>
					<name>JBoss Repository</name>
					<url>http://repository.jboss.org/nexus/content/groups/public</url>
					<releases>
					</releases>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
				</pluginRepository>
			</pluginRepositories>

			<!-- An optional Arquillian testing profile that executes tests in a remote
				JBoss AS instance -->
			<!-- Run with: mvn clean test -Parq-jbossas-remote -->
			<id>arq-jbossas-remote</id>
			<dependencies>
				<dependency>
					<groupId>org.jboss.as</groupId>
					<artifactId>jboss-as-arquillian-container-remote</artifactId>
					<version>7.0.2.Final</version>
					<scope>test</scope>
				</dependency>
			</dependencies>
		</profile>

	</profiles>
</project>


text:
package webdav

import (
	"bytes"
	"encoding/xml"
	"io"
	"io/ioutil"
	"log"
	"strings"

	"github.com/wothing/caldav-go/http"
	"github.com/wothing/caldav-go/utils"
)

var _ = log.Print

// an WebDAV request object
type Request http.Request

// downcasts the request to the local HTTP interface
func (r *Request) Http() *http.Request {
	return (*http.Request)(r)
}

// creates a new WebDAV request object
func NewRequest(method string, urlstr string, xmldata ...interface{}) (*Request, error) {
	if buffer, length, err := xmlToReadCloser(xmldata); err != nil {
		return nil, utils.NewError(NewRequest, "unable to encode xml data", xmldata, err)
	} else if r, err := http.NewRequest(method, urlstr, buffer); err != nil {
		return nil, utils.NewError(NewRequest, "unable to create request", urlstr, err)
	} else {
		if buffer != nil {
			// set the content type to XML if we have a body
			r.Native().Header.Set("Content-Type", "text/xml; charset=UTF-8")
			r.ContentLength = int64(length)
		}
		return (*Request)(r), nil
	}
}

func xmlToReadCloser(xmldata ...interface{}) (io.ReadCloser, int, error) {
	var buffer []string
	for _, xmldatum := range xmldata {
		if encoded, err := xml.Marshal(xmldatum); err != nil {
			return nil, 0, utils.NewError(xmlToReadCloser, "unable to encode as xml", xmldatum, err)
		} else {
			buffer = append(buffer, string(encoded))
		}
	}
	if len(buffer) > 0 {
		var encoded = strings.Join(buffer, "\n")
		//		log.Printf("[WebDAV Request]\n%+v\n", encoded)
		return ioutil.NopCloser(bytes.NewBuffer([]byte(encoded))), len(encoded), nil
	} else {
		return nil, 0, nil
	}
}


text:
<!DOCTYPE html>

  <meta charset=utf-8>
  <meta name="viewport" content="width=device-width,initial-scale=1">
  <link rel="apple-touch-icon" sizes="57x57" href="/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/assets/favicons/favicon-194x194.png" sizes="194x194">
<link rel="icon" type="image/png" href="/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="/assets/favicons/manifest.json">
<link rel="mask-icon" href="/assets/favicons/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#3498db">
<meta name="msapplication-TileImage" content="/assets/favicons/mstile-144x144.png">
<meta name="theme-color" content="#3498db">

  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <meta name="description" content="Sponsorship is an effective way to promote your brand and attract top talent—we have over 600 undergraduates, 250 postgraduates, and a large network of alumni in our 2600+ member Facebook group to advertise your internships, grad-schemes and jobs.">

  <meta property="og:type" content="website">
<meta property="og:title" content="Sponsor us - CSS Bristol">
<meta property="og:description" content="Sponsorship is an effective way to promote your brand and attract top talent—we have over 600 undergraduates, 250 postgraduates, and a large network of alumni in our 2600+ member Facebook group to advertise your internships, grad-schemes and jobs.">
<meta property="og:image" content="https://cssbristol.co.uk/assets/images/core/og-image.png" />
<meta property="og:url" content="https://cssbristol.co.uk/sponsors">

<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Sponsor us - CSS Bristol">
<meta name="twitter:description" content="Sponsorship is an effective way to promote your brand and attract top talent—we have over 600 undergraduates, 250 postgraduates, and a large network of alumni in our 2600+ member Facebook group to advertise your internships, grad-schemes and jobs.">
<meta name="twitter:image" content="https://cssbristol.co.uk/assets/images/core/og-image.png">
<meta name="twitter:site" content="@cssbristol">

  <title>Sponsor us - CSS Bristol</title>

  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,700;0,800;1,400&display=swap" />

  <link rel="stylesheet" href="/assets/css/site.css" />
  <link rel="canonical" href="https://www.cssbristol.co.uk/sponsors" />

  <link rel="prefetch" href="/assets/images/core/header-bg-01_70000.jpg">
  <link rel="prefetch" href="/assets/images/core/header-bg-02_70000.jpg">
  <link rel="prefetch" href="/assets/images/core/header-bg-03_70000.jpg">
  <link rel="prefetch" href="/assets/images/core/header-bg-04_70000.jpg">
  <link rel="prefetch" href="/assets/images/core/header-bg-05.jpg">

      University of Bristol Computer Science Society

About

Contact

Events

Freshers

Jobs

Sponsor us

Tutorials

Wellbeing

We connect top students with innovative brands.

                    Students can be a difficult demographic to advertise to, and that's where CSS comes in. As a student-run
                    society, we are uniquely poised to advertise your company's internships and graduate schemes to our membership of
                    nearly a thousand students from one of the world's top 50 universities
                    (QS World University Rankings 2020).

                    Get involved

                    Download brochure

We've worked with

                    <button aria-hidden="true" class="back fas fa-chevron-left"></button>
                    <button aria-hidden="true" class="next fas fa-chevron-right"></button>

                            <dib class="brand" data-tooltip="Bloomberg">

                            </dib>

                            <dib class="brand" data-tooltip="Optiver">

                            </dib>

                            <dib class="brand" data-tooltip="Visa">

                            </dib>

                            <dib class="brand" data-tooltip="TPP">

                            </dib>

                            <dib class="brand" data-tooltip="Microsoft">

                            </dib>

                            <dib class="brand" data-tooltip="Dyson">

                            </dib>

                            <dib class="brand" data-tooltip="BAE Systems">

                            </dib>

                            <dib class="brand" data-tooltip="Boeing">

                            </dib>

                            <dib class="brand" data-tooltip="Just Eat">

                            </dib>

                            <dib class="brand" data-tooltip="Morgan Stanley">

                            </dib>

                            <dib class="brand" data-tooltip="ARM">

                            </dib>

                            <dib class="brand" data-tooltip="Graphcore">

                            </dib>

                            <dib class="brand" data-tooltip="NVIDIA">

                            </dib>

                            <dib class="brand" data-tooltip="PWC">

                            </dib>

                            <dib class="brand" data-tooltip="Amazon">

                            </dib>

                            <dib class="brand" data-tooltip="Deloitte">

                            </dib>

                            <dib class="brand" data-tooltip="Oracle">

                            </dib>

                            <dib class="brand" data-tooltip="Lloyds Banking Group">

                            </dib>

Why CSS?

                        All computer science students at the University of Bristol are members of CSS. This gives us
                        over 600 undergraduates, 250 postgraduates, and a large network of
                        alumni in our 2600+ member Facebook group.

                        Sponsorship is an effective way to promote your brand and attract top talent—we ensure you are
                        visible to students throughout the year. Many of our students go on to intern and work at
                        companies that sponsor us.

Ways to get involved

Year-long sponsorship

Standard Package

Logo on our website

Logo on our merchandise

Run a tech-talk

Run an event

Advertising for your events

Sponsored job postings

Regular dialogue with committee

Premium Package

Logo on our website

Logo on our merchandise

Run a tech-talk

Run an event

Advertising for your events

Sponsored job postings

Regular dialogue with committee

    Contact us for pricing

Give a tech-talk

You send the presenter, we organise venue, tech setup, and advertising. We usually expect an audience of around
                            30 to 50 people (variable depending on the availability and interest of students). Past talks have covered topics
                            such as high-performance computing, JVM internals, formal hardware verification and banking security.

Run an event

Custom Event

                            Running a custom event is the perfect opportunity to show students interesting technical
                            problems you work on, what it's like to work at your company, and what you're looking for in
                            new engineers.

                            We help our partners run social events and programming contests, such as game jams, data science
                            challenges, capture the flags, and more. These are popular and attract 50 to 100 students.

Existing Events

                            We run a number of recurring events which are popular with students. Sponsors of these events
                            will be involved in planning, prominently featured in all advertising, and have access to
                            students for the duration of the event:

Autumn Event (November 2021):

The key event of our first term - e.g, a hack-night, game-jam or competition.

24 Hour Hackathon (February 2022):

The biggest event of of our calendar, a large-scale hackathon.

Outreach

                            We are committed to making computer science at university more accessible and work in
                            collaboration with the University to host outreach events such as insight days, summer camps,
                            tutorials for sixth formers and school visits.

                            We are eager to hold more outreach events over the next year and would love your support.
                            If you're interested in working with us on our outreach programme, please get in touch with us
                            by emailing outreach@cssbristol.co.uk.

Get in touch with us

If you'd like to work with us, please get in touch with us by emailing
                    president@cssbristol.co.uk or
                    vice-president@cssbristol.co.uk.

Proudly sponsored by

      Learn more about working with us.

  © University of Bristol Computer Science Society

        About

        Contact

        Events

        Freshers

        Jobs

        Sponsor us

        Tutorials

        Wellbeing


text:
<?php

namespace Daric\Cleaner;

interface CleanerInterface
{
    /**
     * Clean $value.
     *
     * @param $value
     */
    public function clean($value);
}


text:
package com.jwetherell.quick_response_code.result;

import com.jwetherell.quick_response_code.R;

import com.google.zxing.client.result.AddressBookParsedResult;
import com.google.zxing.client.result.ParsedResult;

import android.app.Activity;
import android.telephony.PhoneNumberUtils;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.style.StyleSpan;

import java.text.DateFormat;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

/**
 * Handles address book entries.
 *
 * @author dswitkin@google.com (Daniel Switkin)
 */
public final class AddressBookResultHandler extends ResultHandler {

    private static final DateFormat[] DATE_FORMATS = { new SimpleDateFormat("yyyyMMdd", Locale.ENGLISH),
            new SimpleDateFormat("yyyyMMdd'T'HHmmss", Locale.ENGLISH), new SimpleDateFormat("yyyy-MM-dd", Locale.ENGLISH),
            new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss", Locale.ENGLISH), };

    private final boolean[] fields;

    public AddressBookResultHandler(Activity activity, ParsedResult result) {
        super(activity, result);
        AddressBookParsedResult addressResult = (AddressBookParsedResult) result;
        String[] addresses = addressResult.getAddresses();
        boolean hasAddress = addresses != null && addresses.length > 0 && addresses[0].length() > 0;
        String[] phoneNumbers = addressResult.getPhoneNumbers();
        boolean hasPhoneNumber = phoneNumbers != null && phoneNumbers.length > 0;
        String[] emails = addressResult.getEmails();
        boolean hasEmailAddress = emails != null && emails.length > 0;

        fields = new boolean[4];
        fields[0] = true; // Add contact is always available
        fields[1] = hasAddress;
        fields[2] = hasPhoneNumber;
        fields[3] = hasEmailAddress;
    }

    // Overriden so we can hyphenate phone numbers, format birthdays, and bold
    // the name.
    @Override
    public CharSequence getDisplayContents() {
        AddressBookParsedResult result = (AddressBookParsedResult) getResult();
        StringBuilder contents = new StringBuilder(100);
        ParsedResult.maybeAppend(result.getNames(), contents);
        int namesLength = contents.length();

        String pronunciation = result.getPronunciation();
        if (pronunciation != null && pronunciation.length() > 0) {
            contents.append("\n(");
            contents.append(pronunciation);
            contents.append(')');
        }

        ParsedResult.maybeAppend(result.getTitle(), contents);
        ParsedResult.maybeAppend(result.getOrg(), contents);
        ParsedResult.maybeAppend(result.getAddresses(), contents);
        String[] numbers = result.getPhoneNumbers();
        if (numbers != null) {
            for (String number : numbers) {
                ParsedResult.maybeAppend(PhoneNumberUtils.formatNumber(number), contents);
            }
        }
        ParsedResult.maybeAppend(result.getEmails(), contents);
        ParsedResult.maybeAppend(result.getURL(), contents);

        String birthday = result.getBirthday();
        if (birthday != null && birthday.length() > 0) {
            Date date = parseDate(birthday);
            if (date != null) {
                ParsedResult.maybeAppend(DateFormat.getDateInstance().format(date.getTime()), contents);
            }
        }
        ParsedResult.maybeAppend(result.getNote(), contents);

        if (namesLength > 0) {
            // Bold the full name to make it stand out a bit.
            Spannable styled = new SpannableString(contents.toString());
            styled.setSpan(new StyleSpan(android.graphics.Typeface.BOLD), 0, namesLength, 0);
            return styled;
        }
        return contents.toString();
    }

    private static Date parseDate(String s) {
        for (DateFormat currentFomat : DATE_FORMATS) {
            synchronized (currentFomat) {
                currentFomat.setLenient(false);
                Date result = currentFomat.parse(s, new ParsePosition(0));
                if (result != null) {
                    return result;
                }
            }
        }
        return null;
    }

    @Override
    public int getDisplayTitle() {
        return R.string.result_address_book;
    }
}


text:
Shopping Cart

                    Category
                    Product
                    Price
                    Quantity
                    Subtotal

                        <select class="form-control" data-bind='options: $root.sampleProductCategories, optionsText: "name", optionsCaption: "Select...", value: category'> </select>

                        <select class="form-control" data-bind='options: products, optionsText: "name", optionsCaption: "Select...", value: $parent.product'> </select>

                        <input type="text" class="form-control" data-bind='visible: product, value: quantity, valueUpdate: "afterkeydown"' />

                        <button class="btn btn-danger" data-bind='click: $root.cart.removeLine'>

                        </button>

            Total value:

            <button class="btn btn-default" data-bind='click: cart.addLine'>Add Product</button>
            <button class="btn btn-success" data-bind='click: cart.save'>Submit Order</button>


text:
package org.apache.jmeter.report.processor.graph;

import org.apache.jmeter.report.core.SampleSelector;

/**
 * The interface GraphSeriesSelector provides a projection from a sample to the
 * series it belongs in a graph.
 *
 * @since 3.0
 */
public interface GraphSeriesSelector extends SampleSelector<Iterable<String>> {

    /**
     * Indicates whether this selector allows controllers discrimination,
     * which allows on graphs to only show transaction controllers
     *
     * @return true, if this selector allows controllers discrimination; false otherwise
     */
    boolean allowsControllersDiscrimination();

}


text:
<zimlet name="com_zimbra_html" version="1.1" label="${msg.label}" description="${msg.description}">
    <!-- source -->
    <include>html.js</include>
    <!-- handler -->
    <handlerObject>Com_Zimbra_Html</handlerObject>
    <!-- portlet -->
    <portlet>
        <!--<canvas title="${msg.title}" width="100%" height="100%" />-->
        <!--<actionUrl target="${prop.url}" refresh="${prop.refresh}" />-->
        <portletProperties>
          <property type="string" name="url" label="URL" value="about:blank"/>
          <property type="number" name="refresh" label="Refresh (ms)" />
        </portletProperties>
    </portlet>
</zimlet>