text:
<?php

namespace Axstrad\Component\WorkForce\Tests\Unit\Worker;

use Axstrad\Component\Test\TraitTestCase;

/**
 * @group unit
 */
class WorksAnythingTraitTest extends TraitTestCase
{
    protected $trait = 'Axstrad\Component\WorkForce\Worker\WorksAnythingTrait';

    /**
     * @covers Axstrad\Component\WorkForce\Worker\WorksAnythingTrait::canWork
     */
    public function testCanWorkReturnsTrue()
    {
        $this->assertTrue($this->fixture->canWork(null));
    }
}


text:
package de.nl.moo.data.loader.research;

import de.nl.moo.data.beans.research.ResearchBean;
import de.nl.moo.data.beans.research.ResearchCategoryBean;
import de.nl.moo.data.beans.research.ResearchTypeBean;
import de.nl.moo.data.dao.GameBeanDAO;
import de.nl.moo.data.loader.AbstractBeanLoader;
import org.springframework.beans.factory.annotation.Autowired;

import javax.inject.Provider;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;

public class ResearchBeanLoader extends AbstractBeanLoader<ResearchBean> {

    @Autowired
    private ResearchBean researchBean = null;

    @Autowired
    private Provider<ResearchTypeBeanLoader> researchTypeLoaderFactory = null;
    @Autowired
    private Provider<ResearchCategoryBeanLoader> researchCategoryLoaderFactory = null;

    public ResearchBeanLoader() {
        super();
    }

    @Override
    protected ResearchBean load(GameBeanDAO dao) {
        List<ResearchTypeBean> types = this.loadTypes(dao);
        this.researchBean.setTypes(types);

        List<ResearchCategoryBean> categories = this.loadCategories(dao);
        this.researchBean.setCategories(categories);

        return this.researchBean;
    }

    // ########################################################

    private List<ResearchCategoryBean> loadCategories(GameBeanDAO dao) {
        Path file = dao.getFile();
        Path parent = file.getParent();

        List<String> paths = dao.getList("categories");
        List<ResearchCategoryBean> categories = new ArrayList<>();
        paths.stream()
                .map(parent::resolve)
                .map(this::loadCategory)
                .forEach(categories::add);

        return categories;
    }

    private ResearchCategoryBean loadCategory(Path path) {
        ResearchCategoryBeanLoader categoryBeanLoader = this.researchCategoryLoaderFactory.get();
        ResearchCategoryBean categoryBean = categoryBeanLoader.load(path);
        return categoryBean;
    }

    // ########################################################

    private List<ResearchTypeBean> loadTypes(GameBeanDAO dao) {
        Path file = dao.getFile();
        Path parent = file.getParent();

        List<String> paths = dao.getList("types");

        List<ResearchTypeBean> types = new ArrayList<>();
        paths.stream()
                .map(parent::resolve)
                .map(this::loadType)
                .forEach(types::add);

        return types;
    }

    private ResearchTypeBean loadType(Path path) {
        ResearchTypeBeanLoader typeBeanLoader = this.researchTypeLoaderFactory.get();
        ResearchTypeBean typeBean = typeBeanLoader.load(path);
        return typeBean;
    }
}

redpajama_set_name: RedPajamaGithub


text:
namespace HarryPotterUnity.Cards.CareOfMagicalCreatures.Creatures
{
    public class CobraLily : BaseCreature
    {
        public override void OnInPlayAfterTurnAction()
        {
            this.Heal(this.MaxHealth);
        }
    }
}


text:
{{ "" | safeHTML }}

{{ with .Site.Params.contact.headline }}{{ . }}{{ end }}

{{ with .Site.Params.contact.description }}{{ . | markdownify }}{{ end }}

                <form  action="//formspree.io/{{ with .Site.Params.contact.email }}{{.}}{{ end }}" method="POST" name="sentMessage" id="contactForm" novalidate>

                                <input type="text" class="form-control" placeholder="{{ with .Site.Params.contact.form.name.text }}{{ .  | markdownify }}{{ end }}" name="name" required data-validation-required-message="{{ with .Site.Params.contact.form.name.warning }}{{ . | markdownify}}{{ end }}">

                                <input type="email" class="form-control" placeholder="{{ with .Site.Params.contact.form.email.text }}{{ . | markdownify }}{{ end }}" name="email" required data-validation-required-message="{{ with .Site.Params.contact.form.email.warning }}{{ . | markdownify }}{{ end }}">

                                <textarea class="form-control" style="height:120px" placeholder="{{ with .Site.Params.contact.form.message.text }}{{ . | markdownify }}{{ end }}" name="message" required data-validation-required-message="{{ with .Site.Params.contact.form.message.warning }}{{ . | markdownify }}{{ end }}"></textarea>

{{ with .Site.Params.contact.address }}

{{ .text  | markdownify }}

                        {{ end }}

{{ with .Site.Params.contact.email }}{{ . }}{{ end }}

{{ range .Site.Params.contact.social }}

                            {{ end }}

 {{ range .Site.Params.contact.quicklinks }}

{{ .text  | markdownify }}

                           {{ end }}

                            <button type="submit" class="btn btn-xl">{{ with .Site.Params.contact.buttonText }}{{ . | markdownify }}{{ end }}</button>

{{ with .Site.Params.contact.declaration }}{{ . | markdownify }}{{ end }}

                            <input type="hidden" name="_next" value="http://cloudkata.com/thanks/" />

                </form>


text:
package org.apache.myfaces.taglib.core;

import javax.el.ELContext;
import javax.el.ValueExpression;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import javax.faces.webapp.ConverterELTag;
import javax.servlet.jsp.JspException;

/**
 * Implementation of ConverterELTag
 *
 * @author Bruno Aranda (latest modification by $Author: jakobk $)
 * @version $Revision: 922543 $ $Date: 2010-03-13 06:55:01 -0500 (Sat, 13 Mar 2010) $
 */
public class ConverterTag extends ConverterELTag
{

    private static final long serialVersionUID = -4506829108081L;
    private ValueExpression _converterId;
    private ValueExpression _binding;
    private String _converterIdString = null;

    public ConverterTag()
    {
        super();
    }

    public void setConverterId(ValueExpression converterId)
    {
        _converterId = converterId;
    }

    public void setBinding(ValueExpression binding)
    {
        _binding = binding;
    }

    /**
     * Use this method to specify the converterId programmatically.
     *
     * @param converterIdString
     */
    public void setConverterIdString(String converterIdString)
    {
        _converterIdString = converterIdString;
    }

    @Override
    public void release()
    {
        super.release();
        _converterId = null;
        _binding = null;
        _converterIdString = null;
    }

    @Override
    protected Converter createConverter() throws JspException
    {
        Converter converter = null;

        FacesContext facesContext = FacesContext.getCurrentInstance();
        ELContext elContext = facesContext.getELContext();

        // try to create the converter from the binding expression first, and then from
        // the converterId
        if (_binding != null)
        {
            try
            {
                converter = (Converter)_binding.getValue(elContext);

                if (converter != null)
                {
                    return converter;
                }
            }
            catch (Exception e)
            {
                throw new JspException("Exception creating converter using binding", e);
            }
        }

        if ((_converterId != null) || (_converterIdString != null))
        {
            try
            {
                if (null != _converterIdString)
                {
                    converter = facesContext.getApplication().createConverter(_converterIdString);
                }
                else
                {
                    String converterId = (String)_converterId.getValue(elContext);
                    converter = facesContext.getApplication().createConverter(converterId);
                }

                // with binding no converter was created, set its value with the converter
                // created using the converterId
                if (converter != null && _binding != null)
                {
                    _binding.setValue(elContext, converter);
                }
            }
            catch (Exception e)
            {
                throw new JspException("Exception creating converter with converterId: " + _converterId, e);
            }
        }

        if (converter == null)
        {
            throw new JspException("Could not create converter. Please specify a valid converterId" +
                    " or a non-null binding.");
        }

        return converter;
    }

}


text:
<?php

namespace Symfony\Component\Security\Core\Authentication\RememberMe;

/**
 * Interface to be implemented by persistent token classes (such as
 * Doctrine entities representing a remember-me token)
 *
 * @author Johannes M. Schmitt <schmittjoh@gmail.com>
 */
interface PersistentTokenInterface {
	/**
	 * Returns the class of the user
	 * @return string
	 */
	function getClass();

	/**
	 * Returns the username
	 * @return string
	 */
	function getUsername();

	/**
	 * Returns the series
	 * @return string
	 */
	function getSeries();

	/**
	 * Returns the token value
	 * @return string
	 */
	function getTokenValue();

	/**
	 * Returns the last time the cookie was used
	 * @return \DateTime
	 */
	function getLastUsed();
}


text:
/**
* @class Controller
*/
zrt.Controller = function() {
	var urlPrefix = zrt.config.API_URL + "/";

	//Loader bar to show when waiting for response from server
	var $loader = $("#loader-bar");
	$loader.dialog({
		modal:true,
		resizable:false,
		autoOpen:false,
		closeOnEscape:false,
		open: function() { $(".ui-dialog-titlebar-close").hide(); },
		title:"Waiting for response..."
	});

	function getRevision(rev, cb) {
		console.log("getRevision(rev, cb)....");
                var url = urlPrefix + rev;
                $.get(url, function(result) {
                        //do something
                        cb(result);
                });
        }

	function getCurrentRevision(cb) {
		console.log("getCurrentRevision(cb)....");
		var url = urlPrefix + "current";
		$.get(url, function(result) {
			//do something
			cb(result);
		});
	}

	function getChangelog(o, cb) {
		console.log("getChangelog(o, cb)....");
		var jsonObj = JSON.stringify(o);
		var url = urlPrefix + "changelog";
		$.get(url, {filter:jsonObj}, function(result) {
                        //do something
                        cb(result);
                });
	}

	function getCurrentChangelog(cb) {
		console.log("getCurrentChangelog(cb)....");
		var url = urlPrefix + "changelog";
		$.get(url, function(result) {
			//do something
			cb(result);
		});
	}

	function getSettings(cb) {
		console.log("getSettings(cb)....");
		var url = urlPrefix + "settings";
		$.get(url, function(result) {
			//do something
			cb(result);
		});
	}

	/* Update Account Settings */
	function updateClientSettings(o, cb) {
		var jsonObj = JSON.stringify(o);
		var url = urlPrefix + "updatesettings";
		$.post(url, jsonObj, function(result){
			$loader.dialog('close');
			cb(result);
		});
		$loader.dialog('open');
	}

	/* Create a new account */
        function initializeAccount(o, cb) {
                var jsonObj = JSON.stringify(o);
                var url = urlPrefix + "initialize";
                $.post(url, jsonObj, function(result){
                        $loader.dialog('close');
                        cb(result);
                });
                $loader.dialog('open');
        }

        /* Delete an account */
        function deleteAccount(cb) {
                var url = urlPrefix + "delete";
                $.post(url, function(result){
                        $loader.dialog('close');
                        cb(result);
                });
                $loader.dialog('open');
        }

	function pingServerList(ips, cb) {
		var url = urlPrefix + "ping/" + String(ips);
                $.get(url, function(result) {
			$loader.dialog('close');
                        //do something
                        cb(result);
                });
		$loader.dialog('open');
	}

	function compareRevisions(revOne, revTwo, cb) {
		var url = urlPrefix + "comparerev/" + String(revOne) + ":" + String(revTwo);
		$.get(url, function(result) {
			$loader.dialog('close');
			//do something
			cb(result);
		});
		$loader.dialog('open');
	}

        function post(o, cb) {
                console.log("post(o, cb)....");
                var jsonObj = JSON.stringify(o);
                var url = urlPrefix + zrt.config.REV;
                $.post(url, jsonObj, function(result) {
                        $loader.dialog('close');
                        //do something
                        cb(result);
                });
                $loader.dialog('open');
        }

	return {
		add:function(data, cb) {
			var o = {};
			o.add = data;
			post(o, cb);
		},

		update:function(data, cb) {
			var o = {};
			o.update = data;
			post(o, cb);
		},

		delete:function(key, cb) {
			var o = {};
			var del = {};
			del[key] = null;
			o.delete = del;
			post(o, cb);
		},

		changerev:function(rev, cb) {
			var o = {};
			o.changerev = rev;
			post(o, cb);
		},

		getRevision: getRevision,

		getCurrentRevision: getCurrentRevision,

		getChangelog: getChangelog,

		getCurrentChangelog: getCurrentChangelog,

		pingServerList: pingServerList,

		compareRevisions: compareRevisions,

		getSettings: getSettings,

		updateClientSettings:updateClientSettings,

		initializeAccount:initializeAccount,

		deleteAccount:deleteAccount
	};
};


text:
<form id="formExtractFile">

	<fieldset>
		{{i18n.extract_filename}} {{filename}}:

			<input type="radio" name="extractTargetLocation" value="./" checked="checked">
			./

			<input type="radio" name="extractTargetLocation" value="./{{destination}}">
			./{{destination}}

			<input type="radio" name="extractTargetLocation" value="custom">
			<input id="extractCustomLocation" type="text" class="form-control" placeholder="custom location" value="">

	</fieldset>

	<button type="button" class="btn btn-default" id="buttonExtract">{{i18n.extract}}</button>
	<button type="button" class="btn btn-default" id="buttonCancel">{{i18n.cancel}}</button>

</form>


text:
// timber -- Copyright 2012-2021 -- Justin Patterson
//
// 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.

package org.scalawag.timber.api

/** Tells the BaseLogger to evaluate the [[org.scalawag.timber.api.Message message]] immediately.  This may be
  * useful if you're referring to `var`s whose values could change between the time that the message is created and
  * the time that it is ultimately evaluated.  This could be once it asynchronously reaches its final destination.
  *
  * If you want your BaseLogger to always evaluate its messages immediately, you can add this tag to the logger when
  * it is constructed.
  */
object ImmediateMessage extends Tag


text: require 'parallel_enumerable'


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Talisia mollis var. marleneana Guarim

### Remarks
null


text:
namespace google {
namespace protobuf {
namespace compiler {
namespace javanano {

namespace {

// Recursively searches the given message to see if it contains any extensions.
bool UsesExtensions(const Message& message) {
  const Reflection* reflection = message.GetReflection();

  // We conservatively assume that unknown fields are extensions.
  if (reflection->GetUnknownFields(message).field_count() > 0) return true;

  vector<const FieldDescriptor*> fields;
  reflection->ListFields(message, &fields);

  for (int i = 0; i < fields.size(); i++) {
    if (fields[i]->is_extension()) return true;

    if (fields[i]->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
      if (fields[i]->is_repeated()) {
        int size = reflection->FieldSize(message, fields[i]);
        for (int j = 0; j < size; j++) {
          const Message& sub_message =
            reflection->GetRepeatedMessage(message, fields[i], j);
          if (UsesExtensions(sub_message)) return true;
        }
      } else {
        const Message& sub_message = reflection->GetMessage(message, fields[i]);
        if (UsesExtensions(sub_message)) return true;
      }
    }
  }

  return false;
}

}  // namespace

FileGenerator::FileGenerator(const FileDescriptor* file, const Params& params)
  : file_(file),
    params_(params),
    java_package_(FileJavaPackage(params, file)),
    classname_(FileClassName(params, file)) {}

FileGenerator::~FileGenerator() {}

bool FileGenerator::Validate(string* error) {
  // Check for extensions
  FileDescriptorProto file_proto;
  file_->CopyTo(&file_proto);
  if (UsesExtensions(file_proto) && !params_.store_unknown_fields()) {
    error->assign(file_->name());
    error->append(
        ": Java NANO_RUNTIME only supports extensions when the "
        "'store_unknown_fields' generator option is 'true'.");
    return false;
  }

  if (file_->service_count() != 0 && !params_.ignore_services()) {
    error->assign(file_->name());
    error->append(
      ": Java NANO_RUNTIME does not support services\"");
    return false;
  }

  if (!IsOuterClassNeeded(params_, file_)) {
    return true;
  }

  // Check whether legacy javanano generator would omit the outer class.
  if (!params_.has_java_outer_classname(file_->name())
      && file_->message_type_count() == 1
      && file_->enum_type_count() == 0 && file_->extension_count() == 0) {
    cout << "INFO: " << file_->name() << ":" << endl;
    cout << "Javanano generator has changed to align with java generator. "
        "An outer class will be created for this file and the single message "
        "in the file will become a nested class. Use java_multiple_files to "
        "skip generating the outer class, or set an explicit "
        "java_outer_classname to suppress this message." << endl;
  }

  // Check that no class name matches the file's class name.  This is a common
  // problem that leads to Java compile errors that can be hard to understand.
  // It's especially bad when using the java_multiple_files, since we would
  // end up overwriting the outer class with one of the inner ones.
  bool found_conflict = false;
  for (int i = 0; !found_conflict && i < file_->message_type_count(); i++) {
    if (file_->message_type(i)->name() == classname_) {
      found_conflict = true;
    }
  }
  if (params_.java_enum_style()) {
    for (int i = 0; !found_conflict && i < file_->enum_type_count(); i++) {
      if (file_->enum_type(i)->name() == classname_) {
        found_conflict = true;
      }
    }
  }
  if (found_conflict) {
    error->assign(file_->name());
    error->append(
      ": Cannot generate Java output because the file's outer class name, \"");
    error->append(classname_);
    error->append(
      "\", matches the name of one of the types declared inside it.  "
      "Please either rename the type or use the java_outer_classname "
      "option to specify a different outer class name for the .proto file.");
    return false;
  }
  return true;
}

void FileGenerator::Generate(io::Printer* printer) {
  // We don't import anything because we refer to all classes by their
  // fully-qualified names in the generated source.
  printer->Print(
    "// Generated by the protocol buffer compiler.  DO NOT EDIT!\n");
  if (!java_package_.empty()) {
    printer->Print(
      "\n"
      "package $package$;\n",
      "package", java_package_);
  }

  // Note: constants (from enums, emitted in the loop below) may have the same names as constants
  // in the nested classes. This causes Java warnings, but is not fatal, so we suppress those
  // warnings here in the top-most class declaration.
  printer->Print(
    "\n"
    "@SuppressWarnings(\"hiding\")\n"
    "public interface $classname$ {\n",
    "classname", classname_);
  printer->Indent();

  // -----------------------------------------------------------------

  // Extensions.
  for (int i = 0; i < file_->extension_count(); i++) {
    ExtensionGenerator(file_->extension(i), params_).Generate(printer);
  }

  // Enums.
  for (int i = 0; i < file_->enum_type_count(); i++) {
    EnumGenerator(file_->enum_type(i), params_).Generate(printer);
  }

  // Messages.
  if (!params_.java_multiple_files(file_->name())) {
    for (int i = 0; i < file_->message_type_count(); i++) {
      MessageGenerator(file_->message_type(i), params_).Generate(printer);
    }
  }

  // Static variables.
  for (int i = 0; i < file_->message_type_count(); i++) {
    // TODO(kenton):  Reuse MessageGenerator objects?
    MessageGenerator(file_->message_type(i), params_).GenerateStaticVariables(printer);
  }

  printer->Outdent();
  printer->Print(
    "}\n");
}

template<typename GeneratorClass, typename DescriptorClass>
static void GenerateSibling(const string& package_dir,
                            const string& java_package,
                            const DescriptorClass* descriptor,
                            OutputDirectory* output_directory,
                            vector<string>* file_list,
                            const Params& params) {
  string filename = package_dir + descriptor->name() + ".java";
  file_list->push_back(filename);

  scoped_ptr<io::ZeroCopyOutputStream> output(
    output_directory->Open(filename));
  io::Printer printer(output.get(), '$');

  printer.Print(
    "// Generated by the protocol buffer compiler.  DO NOT EDIT!\n");
  if (!java_package.empty()) {
    printer.Print(
      "\n"
      "package $package$;\n",
      "package", java_package);
  }

  GeneratorClass(descriptor, params).Generate(&printer);
}

void FileGenerator::GenerateSiblings(const string& package_dir,
                                     OutputDirectory* output_directory,
                                     vector<string>* file_list) {
  if (params_.java_multiple_files(file_->name())) {
    for (int i = 0; i < file_->message_type_count(); i++) {
      GenerateSibling<MessageGenerator>(package_dir, java_package_,
                                        file_->message_type(i),
                                        output_directory, file_list, params_);
    }

    if (params_.java_enum_style()) {
      for (int i = 0; i < file_->enum_type_count(); i++) {
        GenerateSibling<EnumGenerator>(package_dir, java_package_,
                                       file_->enum_type(i),
                                       output_directory, file_list, params_);
      }
    }
  }
}

}  // namespace javanano
}  // namespace compiler
}  // namespace protobuf
}  // namespace google


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

<title>Uses of Interface org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolver (Spring Framework 5.1.18.RELEASE API)</title>
<meta name="date" content="2020-09-15">
<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

Spring Framework

Prev

Next

Frames

No Frames

All Classes

Uses of Interface
org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolver

Packages that use HandlerMethodArgumentResolver

Package
Description

org.springframework.messaging.handler.annotation.support

Support classes for working with annotated message-handling methods.

org.springframework.messaging.handler.invocation

Common infrastructure for invoking message handler methods.

org.springframework.messaging.simp.annotation.support

Support classes for handling messages from simple messaging protocols
 (like STOMP).

org.springframework.messaging.simp.config

Configuration support for WebSocket messaging using higher level messaging protocols.

org.springframework.web.socket.config.annotation

Support for annotation-based WebSocket setup in configuration classes.

Uses of HandlerMethodArgumentResolver in org.springframework.messaging.handler.annotation.support

Classes in org.springframework.messaging.handler.annotation.support that implement HandlerMethodArgumentResolver

Modifier and Type
Class and Description

class
AbstractNamedValueMethodArgumentResolver

Abstract base class for resolving method arguments from a named value.

class
DestinationVariableMethodArgumentResolver

Resolves method parameters annotated with
 @DestinationVariable.

class
HeaderMethodArgumentResolver

Resolves method parameters annotated with @Header.

class
HeadersMethodArgumentResolver

HandlerMethodArgumentResolver for header method parameters.

class
MessageMethodArgumentResolver

HandlerMethodArgumentResolver for Message method arguments.

class
PayloadArgumentResolver

A resolver to extract and convert the payload of a message using a
 MessageConverter.

Methods in org.springframework.messaging.handler.annotation.support that return types with arguments of type HandlerMethodArgumentResolver

Modifier and Type
Method and Description

protected List<HandlerMethodArgumentResolver>
DefaultMessageHandlerMethodFactory.initArgumentResolvers()

Method parameters in org.springframework.messaging.handler.annotation.support with type arguments of type HandlerMethodArgumentResolver

Modifier and Type
Method and Description

void
DefaultMessageHandlerMethodFactory.setArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers)

Configure the complete list of supported argument types effectively overriding
 the ones configured by default.

void
DefaultMessageHandlerMethodFactory.setCustomArgumentResolvers(List<HandlerMethodArgumentResolver> customArgumentResolvers)

Set the list of custom HandlerMethodArgumentResolvers that will be used
 after resolvers for supported argument type.

Uses of HandlerMethodArgumentResolver in org.springframework.messaging.handler.invocation

Classes in org.springframework.messaging.handler.invocation that implement HandlerMethodArgumentResolver

Modifier and Type
Class and Description

class
HandlerMethodArgumentResolverComposite

Resolves method parameters by delegating to a list of registered
 HandlerMethodArgumentResolvers.

Methods in org.springframework.messaging.handler.invocation that return types with arguments of type HandlerMethodArgumentResolver

Modifier and Type
Method and Description

List<HandlerMethodArgumentResolver>
AbstractMethodMessageHandler.getArgumentResolvers()

Return the complete list of argument resolvers.

List<HandlerMethodArgumentResolver>
AbstractMethodMessageHandler.getCustomArgumentResolvers()

Return the configured custom argument resolvers, if any.

List<HandlerMethodArgumentResolver>
HandlerMethodArgumentResolverComposite.getResolvers()

Return a read-only list with the contained resolvers, or an empty list.

protected abstract List<? extends HandlerMethodArgumentResolver>
AbstractMethodMessageHandler.initArgumentResolvers()

Return the list of argument resolvers to use.

Methods in org.springframework.messaging.handler.invocation with parameters of type HandlerMethodArgumentResolver

Modifier and Type
Method and Description

HandlerMethodArgumentResolverComposite
HandlerMethodArgumentResolverComposite.addResolver(HandlerMethodArgumentResolver resolver)

Add the given HandlerMethodArgumentResolver.

HandlerMethodArgumentResolverComposite
HandlerMethodArgumentResolverComposite.addResolvers(HandlerMethodArgumentResolver... resolvers)

Add the given HandlerMethodArgumentResolvers.

Method parameters in org.springframework.messaging.handler.invocation with type arguments of type HandlerMethodArgumentResolver

Modifier and Type
Method and Description

HandlerMethodArgumentResolverComposite
HandlerMethodArgumentResolverComposite.addResolvers(List<? extends HandlerMethodArgumentResolver> resolvers)

Add the given HandlerMethodArgumentResolvers.

void
AbstractMethodMessageHandler.setArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers)

Configure the complete list of supported argument types, effectively overriding
 the ones configured by default.

void
AbstractMethodMessageHandler.setCustomArgumentResolvers(List<HandlerMethodArgumentResolver> customArgumentResolvers)

Sets the list of custom HandlerMethodArgumentResolvers that will be used
 after resolvers for supported argument type.

Uses of HandlerMethodArgumentResolver in org.springframework.messaging.simp.annotation.support

Classes in org.springframework.messaging.simp.annotation.support that implement HandlerMethodArgumentResolver

Modifier and Type
Class and Description

class
PrincipalMethodArgumentResolver

HandlerMethodArgumentResolver to a Principal.

Methods in org.springframework.messaging.simp.annotation.support that return types with arguments of type HandlerMethodArgumentResolver

Modifier and Type
Method and Description

protected List<HandlerMethodArgumentResolver>
SimpAnnotationMethodMessageHandler.initArgumentResolvers()

Uses of HandlerMethodArgumentResolver in org.springframework.messaging.simp.config

Method parameters in org.springframework.messaging.simp.config with type arguments of type HandlerMethodArgumentResolver

Modifier and Type
Method and Description

protected void
AbstractMessageBrokerConfiguration.addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers)

Uses of HandlerMethodArgumentResolver in org.springframework.web.socket.config.annotation

Method parameters in org.springframework.web.socket.config.annotation with type arguments of type HandlerMethodArgumentResolver

Modifier and Type
Method and Description

protected void
DelegatingWebSocketMessageBrokerConfiguration.addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers)

void
AbstractWebSocketMessageBrokerConfigurer.addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers)

Deprecated.

default void
WebSocketMessageBrokerConfigurer.addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers)

Add resolvers to support custom controller method argument types.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Spring Framework

Prev

Next

Frames

No Frames

All Classes


text:
package socks

//go:generate go run $GOPATH/src/v2ray.com/core/common/errors/errorgen/main.go -pkg socks -path Proxy,Socks


text:
require 'spec_helper'

describe FeeDiscount do
end


text:
package cern.accsoft.steering.aloha.plugin.rotkick;

import cern.accsoft.steering.aloha.meas.BuiltinMeasurementType;
import cern.accsoft.steering.aloha.meas.GenericMeasurementImpl;
import cern.accsoft.steering.aloha.meas.MeasurementType;
import cern.accsoft.steering.aloha.model.ModelDelegate;

public class RotatingKickMeasurement extends
		GenericMeasurementImpl<RotatingKickData> {

	public RotatingKickMeasurement(String name, ModelDelegate modelDelegate,
			RotatingKickData data, CombinedRotatingKickData combinedData,
			ModelRotatingKickData modelData) {
		super(name, modelDelegate, data);
	}

	@Override
	public MeasurementType getType() {
		return BuiltinMeasurementType.ROTATING_KICK;
	}

}


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <RelativeLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:layout_marginBottom="12dp"
        android:layout_marginTop="12dp">

        <RadioButton
            android:id="@+id/buttonNW"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_alignParentStart="true"
            android:checked="false"
            style="@android:style/Widget.Material.CompoundButton.RadioButton"
            android:padding="8dp"
            android:paddingStart="0dp"
            android:paddingEnd="0dp"
            android:contentDescription="@string/content_position_northwest"
            />

        <RadioButton
            android:id="@+id/buttonN"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignTop="@+id/buttonNW"
            android:layout_toEndOf="@+id/buttonNW"
            android:checked="false"
            android:padding="8dp"
            android:paddingStart="0dp"
            android:paddingEnd="0dp"
            android:contentDescription="@string/content_position_north"
            />

        <RadioButton
            android:id="@+id/buttonNE"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignTop="@+id/buttonN"
            android:layout_toEndOf="@+id/buttonN"
            android:checked="false"
            android:padding="8dp"
            android:paddingStart="0dp"
            android:paddingEnd="0dp"
            android:contentDescription="@string/content_position_northeast"
            />

        <RadioButton
            android:id="@+id/buttonW"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"

            android:layout_below="@+id/buttonNW"
            android:layout_toStartOf="@+id/buttonN"
            android:checked="false"
            android:padding="8dp"
            android:layout_marginTop="8dp"
            android:paddingStart="0dp"
            android:paddingEnd="0dp"
            android:contentDescription="@string/content_position_west"
            />

        <RadioButton
            android:id="@+id/buttonCENTER"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignTop="@+id/buttonW"
            android:layout_toStartOf="@+id/buttonNE"
            android:checked="false"
            android:padding="8dp"
            android:paddingStart="0dp"
            android:paddingEnd="0dp"
            android:contentDescription="@string/content_position_center"
            />

        <RadioButton
            android:id="@+id/buttonE"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignTop="@+id/buttonCENTER"
            android:layout_toEndOf="@+id/buttonCENTER"
            android:checked="false"
            android:padding="8dp"
            android:paddingStart="0dp"
            android:paddingEnd="0dp"
            android:contentDescription="@string/content_position_east"
            />

        <RadioButton
            android:id="@+id/buttonS"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/buttonCENTER"
            android:layout_toStartOf="@+id/buttonE"
            android:checked="false"
            android:padding="8dp"
            android:paddingStart="0dp"
            android:paddingEnd="0dp"
            android:layout_marginTop="8dp"
            android:contentDescription="@string/content_position_south"
            />

        <RadioButton
            android:id="@+id/buttonSE"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/buttonE"
            android:layout_alignStart="@+id/buttonE"
            android:checked="false"
            android:padding="8dp"
            android:paddingStart="0dp"
            android:paddingEnd="0dp"
            android:layout_marginTop="8dp"
            android:contentDescription="@string/content_position_southeast"
            />

        <RadioButton
            android:id="@+id/buttonSW"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:checked="false"
            android:contentDescription="@string/content_position_southwest"
            android:layout_alignTop="@+id/buttonS"
            android:layout_alignParentStart="true" />

    </RelativeLayout>
    <include layout="@layout/dialog_toolbar" />
</LinearLayout>


text:
<?php

namespace DevelSuite\eventbus;

/**
 * Interface for subscribing, unsubscribing EventListeners and notifying
 * them on fired events.
 *
 * @package DevelSuite\eventbus
 * @author  Georg Henkel <info@develman.de>
 * @version 1.0
 */
interface dsIEventBus {
	/**
	 * Register an EventListener for at least one event
	 *
	 * @param dsIEventSubscriber $subscriber
	 * 		The EventSubscriber to register
	 * @param mixed $eventNames
	 * 		Register the subscriber to all the events
	 */
	public function subscribe(dsIEventSubscriber $subscriber, $eventNames);

	/**
	 * Unregsiter an EventSubscriber from events (if $events is empty, it will be
	 * removed from all events)
	 *
	 * @param dsIEventSubscriber $subscriber
	 * 		The EventSubscriber to remove
	 * @param array $eventNames
	 * 		Remove the subscriber from all the events (if NULL remove complete)
	 */
	public function unsubscribe(dsIEventSubscriber $subscriber, $eventNames = NULL);

	/**
	 * Publish an event.
	 *
	 * @param string $eventName
	 * 		Name of the event
	 * @param dsEvent $event
	 * 		The event to publish
	 */
	public function publish($eventName, dsEvent $event = NULL);
}


text: from .stop import print_stop


text:
package org.randomito.core;

import org.randomito.core.creator.TypeCreatorHolder;
import org.randomito.core.postprocessor.PostProcessor;
import org.randomito.core.scanner.AnnotationGenerationInfoScanner;
import org.randomito.core.scanner.AnnotationPostProcessorScanner;
import org.randomito.core.scanner.AnnotationScanner;
import org.randomito.core.scanner.AnnotationTypeCreatorScanner;

/**
 * Scans test for @Random annotations on available fields.
 * <p>
 * See more:
 * {@link org.randomito.core.scanner.AnnotationGenerationInfoScanner}
 * {@link org.randomito.core.scanner.AnnotationPostProcessorScanner}
 * {@link org.randomito.core.scanner.AnnotationTypeCreatorScanner}
 *
 * @author Miron Balcerzak, 2017
 */
public final class AnnotationConfigScanner implements AnnotationScanner<AnnotationConfigScanner.Result> {

    private final AnnotationGenerationInfoScanner generationInfoScanner = new AnnotationGenerationInfoScanner();
    private final AnnotationPostProcessorScanner postProcessorScanner = new AnnotationPostProcessorScanner();
    private final AnnotationTypeCreatorScanner typeCreatorScanner = new AnnotationTypeCreatorScanner();

    @Override
    public Result scan(Object instance) {
        return new Result(generationInfoScanner.scan(instance),
                postProcessorScanner.scan(instance),
                typeCreatorScanner.scan(instance));
    }

    public class Result {
        private final GenerationInfo[] generationInfo;
        private final PostProcessor[] postProcessors;
        private final TypeCreatorHolder[] typeCreators;

        Result(GenerationInfo[] generationInfo, PostProcessor[] postProcessors, TypeCreatorHolder[] typeCreators) {
            this.generationInfo = generationInfo;
            this.postProcessors = postProcessors;
            this.typeCreators = typeCreators;
        }

        public GenerationInfo[] getGenerationInfo() {
            return generationInfo;
        }

        public PostProcessor[] getPostProcessors() {
            return postProcessors;
        }

        public TypeCreatorHolder[] getTypeCreators() {
            return typeCreators;
        }
    }

}


text:
import React from 'react';
import { shallow } from 'enzyme';
import ControlBar from '../components/control-bar/ControlBar';

describe('ControlBar', () => {
  it('should render with "div" tag', () => {
    const wrapper = shallow(
      <ControlBar
        actions={{}}
        player={{
          hasStarted: false
        }}
      />
    );

    expect(wrapper.type()).toBe('div');
  });

  it('should render with "video-react-control-bar" class', () => {
    const wrapper = shallow(
      <ControlBar
        actions={{}}
        player={{
          hasStarted: false
        }}
      />
    );
    expect(wrapper.hasClass('video-react-control-bar')).toBe(true);
  });

  it('should has more than 1 children', () => {
    const wrapper = shallow(
      <ControlBar
        actions={{}}
        player={{
          hasStarted: false
        }}
      />
    );
    expect(wrapper.children().length).toBeGreaterThan(0);
  });
});


text:
import React, { Component } from 'react';
import './ChipImage.scss';

class ChipImage extends Component {

	render() {

		return (

${this.props.chip.value}

		)

	}

}

export default ChipImage


text:
This is a [BOSH](http://bosh.io/) release for [Azure Service Broker](https://github.com/Azure/meta-azure-service-broker).

## Disclaimer

This is NOT presently a production ready Azure Service Broker BOSH release. This is a work in progress. It is suitable for experimentation and may not become supported in the future.

## Usage

### Azure credentials and permissions

This BOSH release requires an Azure service principal with some roles.

### Using BOSH

#### Upload the BOSH release

To use this BOSH release, first upload it to your BOSH:

```
bosh target BOSH_HOST
git clone https://github.com/bingosummer/azure-broker-boshrelease.git
cd azure-broker-boshrelease
bosh upload release releases/azure-broker/azure-broker-1.yml
```

#### Create a BOSH deployment manifest

Now create a deployment file (using the files at the [examples](https://github.com/bingosummer/azure-broker-boshrelease/blob/master/examples/) directory as a starting point).

#### Deploy using the BOSH deployment manifest

Using the previous created deployment manifest, now we can deploy it:

```
bosh deployment path/to/deployment.yml
bosh -n deploy
```

Refer to the broker's documentation for more details about the required properties:
* [Azure Service Broker Documentation](https://github.com/Azure/meta-azure-service-broker/blob/master/CONFIGURATION.md)

### Using [Pivotal Ops Manager](https://network.pivotal.io/products/ops-manager)

#### Pivotal tile

You can deploy the Azure Service Broker using [Pivotal Ops Manager](https://network.pivotal.io/products/ops-manager). If you want modify the configuration (services, plans, ...) you will need to build your custom Pivotal tile, otherwise, just download the already existing Pivotal tile.

##### Build the Pivotal tile

Update the [handcraft.yml](https://github.com/bingosummer/azure-broker-boshrelease/blob/master/metadata_parts/handcraft.yml) file with your modifications. Then, build the Pivotal tile:

```
git clone https://github.com/bingosummer/azure-broker-boshrelease.git
cd azure-broker-boshrelease
bundle install
bundle exec vara build-pivotal .
```

##### Download the Pivotal tile

Download the [p-azure-broker-0.1.1.0.pivotal](https://storage.googleapis.com/pivotal/p-azure-broker-0.1.1.0.pivotal) file to your workstation.

#### Upload the Pivotal tile

Upload the Pivotal tile `p-azure-broker-0.1.1.0.pivotal` to your Pivotal Ops Manager, configure it, and deploy.

## Contributing

In the spirit of [free software](http://www.fsf.org/licensing/essays/free-sw.html), **everyone** is encouraged to help improve this project.

Here are some ways *you* can contribute:

* by using alpha, beta, and prerelease versions
* by reporting bugs
* by suggesting new features
* by writing or editing documentation
* by writing specifications
* by writing code (**no patch is too small**: fix typos, add comments, clean up inconsistent whitespace)
* by refactoring code
* by closing [issues](https://github.com/bingosummer/azure-broker-boshrelease/issues)
* by reviewing patches

### Submitting an Issue
We use the [GitHub issue tracker](https://github.com/bingosummer/azure-broker-boshrelease/issues) to track bugs and features. Before submitting a bug report or feature request, check to make sure it hasn't already been submitted. You can indicate support for an existing issue by voting it up. When submitting a bug report, please include a
[Gist](http://gist.github.com/) that includes a stack trace and any details that may be necessary to reproduce the bug,. Ideally, a bug report should include a pull request with failing specs.

### Submitting a Pull Request

1. Fork the project.
2. Create a topic branch.
3. Implement your feature or bug fix.
4. Commit and push your changes.
5. Submit a pull request.


text:
@echo off
set/p param=Enter the file name of the Lance Holy you want(Default: holy_lance):
if "%param%" equ "" set "param=holy_lance"
set/p pw=Enter the password of the Lance Holy you want(No password is required by default):
php build -n %param% -p %pw%
pause


text:
require_relative 'driver/base'
require_relative 'driver/meta'


text:
<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

    <services>
        <service id="data_collector.security" class="Symfony\Bundle\SecurityBundle\DataCollector\SecurityDataCollector" public="false">
            <tag name="data_collector" template="@Security/Collector/security.html.twig" id="security" priority="270" />
            <argument type="service" id="security.token_storage" on-invalid="ignore" />
            <argument type="service" id="security.role_hierarchy" />
            <argument type="service" id="security.logout_url_generator" />
            <argument type="service" id="security.access.decision_manager" />
            <argument type="service" id="security.firewall.map" />
        </service>
    </services>
</container>


text:
class PaymentsTrackerController < ApplicationController
  require 'open-uri'
  include TeamsnapHelper
  include PaymentsTrackerHelper

  def index
  end

  #
  # Renders view that shows all buttons to go to individual divisions
  #
  def divisions
    @divisions = teamsnap_divs_by_id
  end

  #
  # Renders the view that shows the entire team roster and valid players for a given division
  #
  def division
    division_id = params[:divisionId].to_i
    # we know the division Id but I also want to grab the name
    division = teamsnap_divs_by_id.select{|key, value| value == division_id }
    @division_name = division.first.first
    @division_id = division_id
    @div_data = get_division_team_data(@division_id)
    # get the rosters of all teams in this division

  end

  #
  # Triggers sending the email to the given Rep
  #
  def emailDivisionRep
    division_id = params[:divisionId].to_i
    division = teamsnap_divs_by_id.select{|key, value| value == division_id }
    send_division_rep_roster_email(params[:divisionId].to_i,division.first.first, nil)
    render 'email_confirmation'
  end

  def emailWebteam
    division_id = params[:divisionId].to_i
    division = teamsnap_divs_by_id.select{|key, value| value == division_id }
    send_web_team_roster_email(division_id, division.first.first, nil)
    render 'email_confirmation'
  end

  def new_account
    @teamsnap_sync_account = TeamsnapScanAccount.new
    render 'payments_tracker/account/new'
  end

  def send_all_emails
    run_payments_scan_send_emails(true)
  end

  def create_account
    @account = TeamsnapScanAccount.new(teamsnap_scan_account_params)

    respond_to do |format|
      if @account.save
        format.html { redirect_to '/payments/tracker', notice: 'Scans Account was successfully created.' }
      else
        format.html { redirect_to 'payments_tracker#new_account', notice: 'Error Saving Account.' }
      end
    end

  end

  # home page for the page tracker
  def home
    mechanize = Mechanize.new
    @players = log_in_get_player_info(mechanize)
  end

  def admin
    @scans = TeamsnapPaymentsSync.order('created_at DESC').all
    @latest_sync = TeamsnapPaymentsSync.order('created_at DESC').first
  end

  #
  # Gets a list of paid players on unassigned teams
  #
  def unassigned
    mechanize = Mechanize.new
    players = log_in_get_player_info(mechanize)
    ids_by_div_name = teamsnap_divs_by_id
    @unassigned_player = Array.new
    @league_id = ids_by_div_name["Big Apple Softball League"]
    players_by_payments = sort_players(players)
    players_by_payments[:paid].each do |player|
      if player['division_id'].blank? && player['team'].blank? && !player['name'].include?('Sponsor Payment') # tournament player
        @unassigned_player.push(player)
      elsif player['division_id'] == @league_id # season player
        @unassigned_player.push(player)
      end
    end
  end

  def sync
    sync_payment_data
  end

  def add_new_payment
    @payment = TeamsnapPayment.new
  end

  def list
    @payments = TeamsnapPayment.all
  end

  private

  private
    def teamsnap_scan_account_params
      params.require(:teamsnap_scan_account).permit(:username, :password, :is_active)
    end

end


text:
//-----------------------------------------------------------------------------
// name: mo_gfx.h
// desc: MoPhO API for graphics routines
//
// authors: Ge Wang (ge@ccrma.stanford.edu)
//          Nick Bryan
//          Jieun Oh
//          Jorge Hererra
//
//    date: Fall 2009
//    version: 1.0.0
//
// Mobile Music research @ CCRMA, Stanford University:
//     http://momu.stanford.edu/
//-----------------------------------------------------------------------------
#ifndef __MO_GFX_H__
#define __MO_GFX_H__

#include "mo_def.h"
#include <math.h>
#include <sys/time.h>
#include <OpenGLES/ES1/gl.h>

//-----------------------------------------------------------------------------
// name: class Vector3D
// desc: 3d vector
//-----------------------------------------------------------------------------
class Vector3D
{
public:
    Vector3D( ) : x(0), y(0), z(0) { }
    Vector3D( GLfloat _x, GLfloat _y, GLfloat _z ) { set( _x, _y, _z ); }
    Vector3D( const Vector3D & other ) { *this = other; }
    ~Vector3D() { }

public:
    void set( GLfloat _x, GLfloat _y, GLfloat _z ) { x = _x; y = _y; z = _z; }
    void setAll( GLfloat val ) { x = y = z = val; }

public:
    GLfloat & operator []( int index )
    { if( index == 0 ) return x; if( index == 1 ) return y;
      if( index == 2 ) return z; return nowhere; }
    const GLfloat & operator []( int index ) const
    { if( index == 0 ) return x; if( index == 1 ) return y;
      if( index == 2 ) return z; return zero; }
    const Vector3D & operator =( const Vector3D & rhs )
    { x = rhs.x; y = rhs.y; z = rhs.z; return *this; }

    Vector3D operator +( const Vector3D & rhs ) const
    { Vector3D result = *this; result += rhs; return result; }
    Vector3D operator -( const Vector3D & rhs ) const
    { Vector3D result = *this; result -= rhs; return result; }
    Vector3D operator *( GLfloat scalar ) const
    { Vector3D result = *this; result *= scalar; return result; }

    inline void operator +=( const Vector3D & rhs )
    { x += rhs.x; y += rhs.y; z += rhs.z; }
    inline void operator -=( const Vector3D & rhs )
    { x -= rhs.x; y -= rhs.y; z -= rhs.z; }
    inline void operator *=( GLfloat scalar )
    { x *= scalar; y *= scalar; z *= scalar; }

    // dot product
    inline GLfloat operator *( const Vector3D & rhs ) const
    { GLfloat result = x*rhs.x + y*rhs.y + z*rhs.z; return result; }
    // magnitude
    inline GLfloat magnitude() const
    { return ::sqrt( x*x + y*y + z*z ); }
    // normalize
    inline void normalize()
    { GLfloat mag = magnitude(); if( mag == 0 ) return; *this *= 1/mag; }
    // 2d angles
    inline GLfloat angleXY() const
    { return ::atan2( y, x ); }
    inline GLfloat angleYZ() const
    { return ::atan2( z, y ); }
    inline GLfloat angleXZ() const
    { return ::atan2( z, x ); }

public: // using the 3-tuple for interpolation
    inline void interp()
    { value = (goal-value)*slew + value; }
    inline void update( GLfloat _goal )
    { goal = _goal; }
    inline void update( GLfloat _goal, GLfloat _slew )
    { goal = _goal; slew = _slew; }

public:
    // either use as .x, .y, .z OR .value, .goal, .slew
    union { GLfloat x; GLfloat value; };
    union { GLfloat y; GLfloat goal; };
    union { GLfloat z; GLfloat slew; };

public:
    static GLfloat nowhere;
    static GLfloat zero;
};

//-----------------------------------------------------------------------------
// name: class MoGfx
// desc: MoPhO graphics functions
//-----------------------------------------------------------------------------
class MoGfx
{
public: // GLU-like stuff
    // perspective projection
    static void perspective( double fovy, double aspectRatio, double zNear, double zFar );
    // orthographic projection
    static void ortho( GLint width = 480, GLint height = 320, GLint landscape = 0 );
    // look at
    static void lookAt( double eye_x, double eye_y, double eye_z,
                       double at_x, double at_y, double at_z,
                       double up_x, double up_y, double up_z );

    // load texture (call this with a texture bound)
    static bool loadTexture( NSString * name, NSString * ext );
    // load texture from a UIImage
    static bool loadTexture( UIImage * image );

    // point in triangle test (2D)
    static bool isPointInTriangle2D( const Vector3D & pt, const Vector3D & a,
                                     const Vector3D & b, const Vector3D & c );

    // get current time
    static double getCurrentTime( bool fresh );
    // reset current time tracking
    static void resetCurrentTime();
    // get delta
    static GLfloat delta();
    // set delta factor
    static void setDeltaFactor( GLfloat factor );

public:
    static struct timeval ourPrevTime;
    static struct timeval ourCurrTime;
    static GLfloat ourDeltaFactor;
};

#endif


text:
<!doctype html>

        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title></title>

        <base href="/">

        Home


text:
<?php
/**
 * LatestMessages widget renders the last messages available on the website.
 *
 * @author Pierre M <devleaks.be@gmail.com>
 */

namespace backend\widgets;

use backend\assets\WireAsset;
use kartik\daterange\MomentAsset;

use common\models\search\Wire as WireSearch;

use Yii;
use yii\data\ActiveDataProvider;
use yii\bootstrap\Widget;

class Wire extends Giplet {
	/** number of recent message to display */
	public $wire_count = 10;

	/** text excerpt length */
	public $words = 50;

	/** retricted to show only wires with this status */
	public $statuses = null;

	/** top element identifier */
	public $id = null;

	/** whether to start listening on websocket */
	public $live = false;

	/** */
	public $repeat = 120; // minutes

	/** */
	public $last;

	public function init() {
		parent::init();
		if($this->live) {
			$this->registerAssets();
		}
	}

	public function run() {
        $searchModel = new WireSearch;
        $dataProvider = $searchModel->search(Yii::$app->request->getQueryParams());
		if($this->statuses) {
			$dataProvider->query->andWhere(['status' => $this->statuses]);
		}
		if(intval($this->wire_count) > 0) {
			$dataProvider->query->limit(intval($this->wire_count));
		}

        return $this->render('wire', [
            'dataProvider' => $dataProvider,
            'searchModel' => $searchModel,
			'id' => $this->id ? $this->id : 'the-wire',
			'widget' => $this
        ]);
	}

    /**
     * Register client assets
     */
    protected function registerAssets()
    {
        $view = $this->getView();
		MomentAsset::register($view);
        WireAsset::register($view);
    }

}


text:
r"""
Display status of a service on your system.

Configuration parameters:
    cache_timeout: refresh interval for this module (default 5)
    format: display format for this module (default '\?if=!hide {unit}: {status}')
    hide_extension: suppress extension of the systemd unit (default False)
    hide_if_default: suppress the output if the systemd unit is in default state
        'off' the output is never suppressed
        'on' the output is suppressed if the unit is (enabled and active)
                                                  or (disabled and inactive)
        'active' the output is suppressed if the unit is active
        'inactive' the output is suppressed if the unit is inactive
        (default 'off')
    unit: specify the systemd unit to use (default 'dbus.service')
    user: specify if this is a user service (default False)

Format placeholders:
    {unit} unit name, eg sshd.service
    {status} unit status, eg active, inactive, not-found

Color options:
    color_good: unit active
    color_bad: unit inactive
    color_degraded: unit not-found

Requires:
    pydbus: pythonic dbus library

Examples:
```
# show the status of vpn service
# left click to start, right click to stop
systemd vpn {
    unit = 'vpn.service'
    on_click 1 = 'exec sudo systemctl start vpn'
    on_click 3 = 'exec sudo systemctl stop vpn'
}
```

@author Adrian Lopez <adrianlzt@gmail.com>
@license BSD

SAMPLE OUTPUT
{'color': '#00FF00', 'full_text': 'sshd.service: active'}

inactive
{'color': '#FF0000', 'full_text': 'sshd.service: inactive'}

not-found
{'color': '#FFFF00', 'full_text': 'sshd.service: not-found'}
"""

from pydbus import SessionBus, SystemBus

class Py3status:
    """ """

    # available configuration parameters
    cache_timeout = 5
    format = r"\?if=!hide {unit}: {status}"
    hide_extension = False
    hide_if_default = "off"
    unit = "dbus.service"
    user = False

    def post_config_hook(self):
        if self.user:
            bus = SessionBus()
        else:
            bus = SystemBus()
        systemd = bus.get("org.freedesktop.systemd1")
        self.systemd_unit = bus.get(".systemd1", systemd.LoadUnit(self.unit))

    def systemd(self):
        status = self.systemd_unit.Get("org.freedesktop.systemd1.Unit", "ActiveState")
        exists = self.systemd_unit.Get("org.freedesktop.systemd1.Unit", "LoadState")
        state = self.systemd_unit.Get("org.freedesktop.systemd1.Unit", "UnitFileState")

        if exists == "not-found":
            color = self.py3.COLOR_DEGRADED
            status = exists
        elif status == "active":
            color = self.py3.COLOR_GOOD
        elif status == "inactive":
            color = self.py3.COLOR_BAD
        else:
            color = self.py3.COLOR_DEGRADED

        if self.hide_if_default == "on":
            hide = (status == "active" and state == "enabled") or (
                status == "inactive" and state == "disabled"
            )
        else:
            hide = status == self.hide_if_default

        if self.hide_extension and self.unit.endswith(".service"):
            unitPrintName = self.unit[:-8]
        else:
            unitPrintName = self.unit

        return {
            "cached_until": self.py3.time_in(self.cache_timeout),
            "color": color,
            "full_text": self.py3.safe_format(
                self.format, {"hide": hide, "unit": unitPrintName, "status": status}
            ),
        }

if __name__ == "__main__":
    """
    Run module in test mode.
    """
    from py3status.module_test import module_test

    module_test(Py3status)


text:
salt.modules.drac
=================

.. automodule:: salt.modules.drac
    :members:


text:
package com.brg.dao.connection;

import com.brg.common.Config;
import com.brg.domain.DatabaseType;

import java.sql.*;
import java.util.Properties;

public class RepositoryConnection implements DatabaseConnection {

    private static RepositoryConnection instance;

    private final String host;
    private final String service;
    private final int port;
    private final String schema;
    private final String username;
    private final String password;

    private final DatabaseType type;

    private Connection connection;

    /**
     * Get Repository Connection Instance
     * @return RepositoryConnection
     * @throws Exception
     */
    public static RepositoryConnection getInstance() throws Exception {
        if(instance == null) {
            instance = new RepositoryConnection();
        }

        return instance;
    }

    /**
     * Clear connection instances
     */
    public static void clearConnection() {
        instance = null;
    }

    private RepositoryConnection() throws Exception {
        // Load database config from Config class.
        Properties properties = Config.getInstance().getConfig();

        // Verify and insert into repository connection class.
        host = properties.getProperty("repository_host");
        schema = properties.getProperty("repository_schema");
        username = properties.getProperty("repository_username");
        password = properties.getProperty("repository_password");
        service = properties.getProperty("repository_service");
        port = Integer.parseInt(properties.getProperty("repository_port"));

        type = DatabaseType.ORACLE;
    }

    /**
     * Get connection
     * @return Connection
     * @throws Exception
     */
    public Connection getConnection() throws Exception {
        if (connection == null) {
            // Prepare
            Class.forName("oracle.jdbc.driver.OracleDriver");
            String connectString = "jdbc:oracle:thin:@//" + host + ":" + port + "/" + service;

            // Make connection
            connection = DriverManager.getConnection(connectString, username, password);
        }
        return connection;
    }

    @Override
    public ResultSet select(PreparedStatement preparedStatement) throws SQLException {
        return null;
    }

    @Override
    public ResultSet select(Statement statement) throws SQLException {
        return null;
    }
}


text:
development environment today

there is a manual somewhere

download lots of software & install it at the correct location

modify some files (Tomcat configuraton, users, etc.)

... other annoying stuff

... develop, after you have tried it several times because you had some typo somewhere


text:
module.exports = {
  I: 'Eu',
  actions: {
    amOutsideAngularApp: 'naoEstouEmAplicacaoAngular',
    amInsideAngularApp: 'estouNaAplicacaoAngular',
    waitForElement: 'aguardoPeloElemento',
    waitForClickable: 'aguardoPorClicavel',
    waitForVisible: 'aguardoPorVisivel',
    waitForText: 'aguardoPorTexto',
    moveTo: 'movoPara',
    refresh: 'atualizoAPagina',
    haveModule: 'temModulo',
    resetModule: 'resetoModulo',
    amOnPage: 'estouNaPagina',
    click: 'clico',
    doubleClick: 'clicoDuplamente',
    see: 'vejo',
    dontSee: 'naoVejo',
    selectOption: 'selecionoAOpcao',
    fillField: 'preenchoOCampo',
    pressKey: 'pressioneATecla',
    triggerMouseEvent: 'lançarEventoDoMouse',
    attachFile: 'anexaOArquivo',
    seeInField: 'vejoNoCampo',
    dontSeeInField: 'naoVejoNoCampo',
    appendField: 'adicionaCampo',
    checkOption: 'marcoOpcao',
    uncheckOption: 'desmarcoOpcao',
    seeCheckboxIsChecked: 'vejoCheckboxMarcado',
    dontSeeCheckboxIsChecked: 'naoVejoCheckboxMarcado',
    grabTextFrom: 'pegoTextoDe',
    grabValueFrom: 'pegoValorDe',
    grabAttributeFrom: 'pegoAtributoDe',
    seeInTitle: 'VejoNoTitulo',
    dontSeeInTitle: 'naoVejoNoTitulo',
    grabTitle: 'pegoOTitulo',
    seeElement: 'vejoElemento',
    dontSeeElement: 'naoVejoElemento',
    seeInSource: 'vejoNoCodigo',
    dontSeeInSource: 'naoVejoNoCodigo',
    executeScript: 'executoScript',
    executeAsyncScript: 'executoScriptAssincrono',
    seeInCurrentUrl: 'vejoNaUrl',
    dontSeeInCurrentUrl: 'naoVejoNaUrl',
    seeCurrentUrlEquals: 'vejoUrlIgualA',
    dontSeeCurrentUrlEquals: 'naoVejoUrlIgualA',
    saveScreenshot: 'salvoCapturaDeTela',
    setCookie: 'definoCookie',
    clearCookie: 'limpoCookies',
    seeCookie: 'vejoCookie',
    dontSeeCookie: 'naoVejoCookie',
    grabCookie: 'pegoCookie',
    resizeWindow: 'redimensionaJanela',
    wait: 'aguardo',
  },
};


text:
#ifndef itkStochasticFractalDimensionImageFilter_h
#define itkStochasticFractalDimensionImageFilter_h

#include "itkImageToImageFilter.h"

#include "itkConstNeighborhoodIterator.h"

namespace itk
{
/** \class StochasticFractalDimensionImageFilter
 *  \brief This filter computes the stochastic fractal dimension of the input image.
 *
 * The methodology is based on Madelbrot's fractal theory and the concept of
 * fractional Brownian motion and yields images which have been used for
 * classification and edge enhancement.
 *
 * This class which is templated over the input and output images as well as a
 * mask image type. The input is a scalar image, an optional neighborhood
 * radius (default = 2), and an optional mask. The mask can be specified to
 * decrease computation time since, as the authors point out, calculation is
 * time-consuming.
 *
 * This filter was contributed by Nick Tustison and James Gee
 * from the PICSL lab, at the University of Pennsylvania
 * as an paper to the Insight Journal:
 *
 *  "Stochastic Fractal Dimension Image"
 *  https://hdl.handle.net/1926/1525
 *  http://www.insight-journal.org/browse/publication/318
 *
 * \author Nick Tustison
 *
 * \ingroup ITKReview
 */
template <typename TInputImage,
          typename TMaskImage = Image<unsigned char, TInputImage::ImageDimension>,
          class TOutputImage = TInputImage>
class ITK_TEMPLATE_EXPORT StochasticFractalDimensionImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
{
public:
  ITK_DISALLOW_COPY_AND_MOVE(StochasticFractalDimensionImageFilter);

  /** Standard class type aliases. */
  using Self = StochasticFractalDimensionImageFilter;
  using Superclass = ImageToImageFilter<TInputImage, TOutputImage>;
  using Pointer = SmartPointer<Self>;
  using ConstPointer = SmartPointer<const Self>;

  /** Standard New method. */
  itkNewMacro(Self);

  /** ImageDimension constants */
  static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;

  /** Some convenient type alias. */
  using RealType = float;
  using InputImageType = TInputImage;
  using MaskImageType = TMaskImage;
  using OutputImageType = TOutputImage;

  /** Runtime information support. */
  itkTypeMacro(StochasticFractalDimensionImageFilter, ImageToImageFilter);

  /** Set/Get the input mask image that will constraint the computation of the
   * fractal dimension to pixels that are on in the mask. This is intended to
   * reduce the computation time. */
  void
  SetMaskImage(const MaskImageType * mask);

  const MaskImageType *
  GetMaskImage() const;

  /** Type of the neighborhood iterator used to evaluate similarity between the
   * image pixels. */
  using ConstNeighborhoodIteratorType = ConstNeighborhoodIterator<InputImageType>;
  using RadiusType = typename ConstNeighborhoodIteratorType::RadiusType;

  /** Manhattan radius used for evaluating the fractal dimension. */
  itkSetMacro(NeighborhoodRadius, RadiusType);
  itkGetConstMacro(NeighborhoodRadius, RadiusType);

protected:
  StochasticFractalDimensionImageFilter();
  ~StochasticFractalDimensionImageFilter() override;

  void
  PrintSelf(std::ostream & os, Indent indent) const override;

  void
  GenerateData() override;

private:
  RadiusType m_NeighborhoodRadius;

  typename MaskImageType::Pointer m_MaskImage;
}; // end of class
} // end namespace itk

#ifndef ITK_MANUAL_INSTANTIATION
#  include "itkStochasticFractalDimensionImageFilter.hxx"
#endif

#endif