text:
package org.jetbrains.plugins.groovy.refactoring.introduce.variable;

import com.intellij.codeInsight.template.TemplateBuilderImpl;
import com.intellij.openapi.actionSystem.Shortcut;
import com.intellij.openapi.application.Result;
import com.intellij.openapi.command.WriteCommandAction;
import com.intellij.openapi.keymap.Keymap;
import com.intellij.openapi.keymap.KeymapManager;
import com.intellij.openapi.keymap.KeymapUtil;
import com.intellij.psi.PsiDocumentManager;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiType;
import com.intellij.refactoring.introduce.inplace.OccurrencesChooser;
import com.intellij.refactoring.util.CanonicalTypes;
import com.intellij.ui.NonFocusableCheckBox;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.plugins.groovy.lang.psi.api.auxiliary.modifiers.GrModifier;
import org.jetbrains.plugins.groovy.lang.psi.api.auxiliary.modifiers.GrModifierList;
import org.jetbrains.plugins.groovy.lang.psi.api.statements.GrVariable;
import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrExpression;
import org.jetbrains.plugins.groovy.lang.psi.api.types.GrTypeElement;
import org.jetbrains.plugins.groovy.lang.psi.expectedTypes.SupertypeConstraint;
import org.jetbrains.plugins.groovy.lang.psi.expectedTypes.TypeConstraint;
import org.jetbrains.plugins.groovy.refactoring.GroovyNameSuggestionUtil;
import org.jetbrains.plugins.groovy.refactoring.introduce.GrAbstractInplaceIntroducer;
import org.jetbrains.plugins.groovy.refactoring.introduce.GrFinalListener;
import org.jetbrains.plugins.groovy.refactoring.introduce.GrIntroduceContext;
import org.jetbrains.plugins.groovy.refactoring.introduce.StringPartInfo;
import org.jetbrains.plugins.groovy.settings.GroovyApplicationSettings;
import org.jetbrains.plugins.groovy.template.expressions.ChooseTypeExpression;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public abstract class GrInplaceVariableIntroducer extends GrAbstractInplaceIntroducer<GroovyIntroduceVariableSettings> {
  private JCheckBox myCanBeFinalCb;

  public GrInplaceVariableIntroducer(String title,
                                     OccurrencesChooser.ReplaceChoice replaceChoice,
                                     GrIntroduceContext context) {
    super(title, replaceChoice, context);
    setAdvertisementText(getAdvertisementText());
  }

  @Nullable
  private static String getAdvertisementText() {
    final Keymap keymap = KeymapManager.getInstance().getActiveKeymap();
    final Shortcut[] shortcuts = keymap.getShortcuts("PreviousTemplateVariable");
    if  (shortcuts.length > 0) {
      return "Press " + KeymapUtil.getShortcutText(shortcuts[0]) + " to change type";
    }
    return null;
  }

  @Override
  protected String getActionName() {
    return GrIntroduceVariableHandler.REFACTORING_NAME;
  }

  @NotNull
  @Override
  protected String[] suggestNames(boolean replaceAll, @Nullable GrVariable variable) {
    return GroovyNameSuggestionUtil.suggestVariableNames(getContext().getExpression(), new GroovyVariableValidator(getContext()));
  }

  @Override
  protected JComponent getComponent() {
    myCanBeFinalCb = new NonFocusableCheckBox("Declare final");
    myCanBeFinalCb.setSelected(false);
    myCanBeFinalCb.setMnemonic('f');
    final GrFinalListener finalListener = new GrFinalListener(myEditor);
    myCanBeFinalCb.addActionListener(new ActionListener() {
      @Override
      public void actionPerformed(ActionEvent e) {
        new WriteCommandAction(myProject, getCommandName(), getCommandName()) {
          @Override
          protected void run(@NotNull Result result) throws Throwable {
            PsiDocumentManager.getInstance(myProject).commitDocument(myEditor.getDocument());
            final GrVariable variable = getVariable();
            if (variable != null) {
              finalListener.perform(myCanBeFinalCb.isSelected(), variable);
            }
          }
        }.execute();
      }
    });
    final JPanel panel = new JPanel(new GridBagLayout());
    panel.setBorder(null);

    if (myCanBeFinalCb != null) {
      panel.add(myCanBeFinalCb, new GridBagConstraints(0, 1, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL,
                                                       new Insets(5, 5, 5, 5), 0, 0));
    }

    panel.add(Box.createVerticalBox(),
              new GridBagConstraints(0, 2, 1, 1, 1, 1, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));

    return panel;
  }

  @Nullable
  @Override
  protected GroovyIntroduceVariableSettings getInitialSettingsForInplace(@NotNull final GrIntroduceContext context,
                                                                         @NotNull final OccurrencesChooser.ReplaceChoice choice,
                                                                         final String[] names) {
    return new GroovyIntroduceVariableSettings() {
      private final CanonicalTypes.Type myType;

      {
        GrExpression expression = context.getExpression();
        StringPartInfo stringPart = context.getStringPart();
        GrVariable var = context.getVar();
        PsiType type = expression != null ? expression.getType() :
                       var != null ? var.getType() :
                       stringPart != null ? stringPart.getLiteral().getType() :
                       null;
        myType = type != null && !PsiType.NULL.equals(type)? CanonicalTypes.createTypeWrapper(type) : null;
      }

      @Override
      public boolean isDeclareFinal() {
        return myCanBeFinalCb != null ? myCanBeFinalCb.isSelected() : false;
      }

      @Nullable
      @Override
      public String getName() {
        return names[0];
      }

      @Override
      public boolean replaceAllOccurrences() {
        return choice == OccurrencesChooser.ReplaceChoice.ALL;
      }

      @Nullable
      @Override
      public PsiType getSelectedType() {
        return myType != null ? myType.getType(context.getPlace()) : null;
      }
    };
  }

  @Override
  protected void addAdditionalVariables(TemplateBuilderImpl builder) {
    GrVariable variable = getVariable();
    assert variable != null && variable.getInitializerGroovy() != null;
    final PsiType initializerType = variable.getInitializerGroovy().getType();
    TypeConstraint[] constraints = initializerType != null && !initializerType.equals(PsiType.NULL) ? new SupertypeConstraint[]{SupertypeConstraint.create(initializerType)}
                                                                                : TypeConstraint.EMPTY_ARRAY;
    ChooseTypeExpression typeExpression = new ChooseTypeExpression(constraints, variable.getManager(), variable.getResolveScope(), true, GroovyApplicationSettings.getInstance().INTRODUCE_LOCAL_SELECT_DEF);
    PsiElement element = getTypeELementOrDef(variable);
    if (element == null) return;
    builder.replaceElement(element, "Variable_type", typeExpression, true, true);
  }

  @Nullable
  private static PsiElement getTypeELementOrDef(@NotNull GrVariable variable) {
    GrTypeElement typeElement = variable.getTypeElementGroovy();
    if (typeElement != null) return typeElement;

    GrModifierList modifierList = variable.getModifierList();
    if (modifierList != null) return modifierList.getModifier(GrModifier.DEF);
    return null;
  }

  @Override
  protected GroovyIntroduceVariableSettings getSettings() {
    return new GroovyIntroduceVariableSettings() {
      @Override
      public boolean isDeclareFinal() {
        return myCanBeFinalCb.isSelected();
      }

      @Nullable
      @Override
      public String getName() {
        return GrInplaceVariableIntroducer.this.getInputName();
      }

      @Override
      public boolean replaceAllOccurrences() {
        return isReplaceAllOccurrences();
      }

      @Nullable
      @Override
      public PsiType getSelectedType() {
        return GrInplaceVariableIntroducer.this.getSelectedType();
      }
    };
  }

  @Override
  protected void saveSettings(@NotNull GrVariable variable) {
    GroovyApplicationSettings.getInstance().INTRODUCE_LOCAL_SELECT_DEF = variable.getDeclaredType() == null;
  }

  @Override
  protected int getCaretOffset() {
    return getVariable().getNameIdentifierGroovy().getTextRange().getEndOffset();
  }
}


text:
<!DOCTYPE html>
<html>
<head>

<script src="/bower_components/platform/platform.js"></script>
<link rel="import" href="/elements/img-flip.html">
</head>

<body>
	<img src="images/detail-oruganaranja.png" />
	<img-flip src="images/detail-oruganaranja.png" flip="horizontal"></img-flip>
	<img-flip src="images/detail-oruganaranja.png" flip="vertical"></img-flip>
</body>
<html>

redpajama_set_name: RedPajamaGithub


text:
package java.lang;

import java.io.IOException;
import java.lang.Process;

/**
 * This class is for the exclusive use of ProcessBuilder.start() to
 * create new processes.
 *
 * @author Martin Buchholz
 * @since   1.5
 */
final class ProcessImpl {
    private ProcessImpl() {}    // Not instantiable

    private static byte[] toCString(String s) {
        if (s == null)
            return null;
        byte[] bytes = s.getBytes();
        byte[] result = new byte[bytes.length + 1];
        System.arraycopy(bytes, 0,
                         result, 0,
                         bytes.length);
        result[result.length-1] = (byte)0;
        return result;
    }

    // Only for use by ProcessBuilder.start()
    static Process start(String[] cmdarray,
                         java.util.Map<String,String> environment,
                         String dir,
                         boolean redirectErrorStream)
        throws IOException
    {
        assert cmdarray != null && cmdarray.length > 0;

        // Convert arguments to a contiguous block; it's easier to do
        // memory management in Java than in C.
        byte[][] args = new byte[cmdarray.length-1][];
        int size = args.length; // For added NUL bytes
        for (int i = 0; i < args.length; i++) {
            args[i] = cmdarray[i+1].getBytes();
            size += args[i].length;
        }
        byte[] argBlock = new byte[size];
        int i = 0;
        for (byte[] arg : args) {
            System.arraycopy(arg, 0, argBlock, i, arg.length);
            i += arg.length + 1;
            // No need to write NUL bytes explicitly
        }

        int[] envc = new int[1];
        byte[] envBlock = ProcessEnvironment.toEnvironmentBlock(environment, envc);

        return new UNIXProcess
            (toCString(cmdarray[0]),
             argBlock, args.length,
             envBlock, envc[0],
             toCString(dir),
             redirectErrorStream);
    }
}


text:
<?php

namespace Tidal\PhpSpec\ConsoleExtension\Command;

use Symfony\Component\Console\Command\Command;

use Tidal\PhpSpec\ConsoleExtension\Contract\Command\{
    ConfiguratorInterface
};
use Tidal\PhpSpec\ConsoleExtension\Contract\WriterInterface;
use Tidal\PhpSpec\ConsoleExtension\Behavior\{
    HasWriterTrait,
    HasContainerTrait
};
use Tidal\PhpSpec\ConsoleExtension\Behavior\Command\{
    ConfigurableTrait,
    HasInputTrait,
    HasOutputTrait
};
use Tidal\PhpSpec\ConsoleExtension\Contract\Command\ConfigInterface as Config;
use Tidal\PhpSpec\ConsoleExtension\Contract\Command\InlineConfigCommandInterface;

/**
 * class Tidal\PhpSpec\ConsoleExtension\Command\GenericInlineConfigCommand
 */
class GenericInlineConfigCommand extends Command implements InlineConfigCommandInterface
{
    use ConfigurableTrait,
        HasInputTrait,
        HasOutputTrait,
        HasWriterTrait,
        HasContainerTrait;

    /**
     * CONFIG
     */
    public const NAME = 'inline-config-command';
    public const DESCRIPTION = 'generic inline config command';
    public const HIDDEN = false;
    public const USAGES = [];
    public const HELP = '';
    public const ARGUMENTS = [];
    public const OPTIONS = [];

    /**
     * GenericInlineConfigCommand constructor.
     * @param WriterInterface $writer
     * @param ConfiguratorInterface $configurator
     * @param array|null $config
     */
    public function __construct(WriterInterface $writer, ConfiguratorInterface $configurator, ?array $config = [])
    {
        if ($config !== null) {
            $configurator->setConfig($config);
            if (isset($config[Config::NAME_KEY])) {
                $this->setName($config[Config::NAME_KEY]);
            }
        }
        $this->setWriter($writer);
        $this->setConfigurator($configurator);
        parent::__construct();
    }

    protected function configure()
    {
        $this
            ->getConfigurator()
            ->configure($this);
    }

    /**
     * @param string[] $usages
     */
    public function setUsages(array $usages = [])
    {
        foreach ($usages as $usage) {
            $this->addUsage($usage);
        }
    }

    /**
     * @return array
     */
    public function getConfig(): array
    {
        return [
            Config::NAME_KEY => static::NAME,
            Config::DESCRIPTION_KEY => static::DESCRIPTION,
            Config::HELP_KEY => static::HELP,
            Config::HIDDEN_KEY => static::HIDDEN,
            Config::ARGUMENTS_KEY => static::ARGUMENTS,
            Config::OPTIONS_KEY => static::OPTIONS,
        ];
    }
}


text:
#include "abstract_factory/reggiano_cheese.h"

namespace abstract_factory {
string ReggianoCheese::toString() {
  return "Reggiano Cheese";
}
}  // namespace abstract_factory


text:
#import <QuartzCore/QuartzCore.h>

#import "EAGLView.h"

@interface EAGLView (PrivateMethods)
- (void)createFramebuffer;
- (void)deleteFramebuffer;
@end

@implementation EAGLView

@synthesize context, framebufferWidth, framebufferHeight;

// You must implement this method
+ (Class)layerClass
{
    return [CAEAGLLayer class];
}

//The EAGL view is stored in the nib file. When it's unarchived it's sent -initWithCoder:.
- (id)initWithCoder:(NSCoder*)coder
{
    self = [super initWithCoder:coder];
	if (self) {
        CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer;

        eaglLayer.opaque = TRUE;
        eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:
                                        [NSNumber numberWithBool:FALSE], kEAGLDrawablePropertyRetainedBacking,
                                        kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat,
                                        nil];

        [self initContext];
    }

    return self;
}

- (void)dealloc
{
    [self deleteFramebuffer];

    if ([EAGLContext currentContext] == context)
        [EAGLContext setCurrentContext:nil];

}

- (void)setContext:(EAGLContext *)newContext
{
    if (context != newContext)
    {
        [self deleteFramebuffer];

        context = newContext;

        [EAGLContext setCurrentContext:nil];
    }
}

- (void)createFramebuffer
{
    if (context && !defaultFramebuffer)
    {
        [EAGLContext setCurrentContext:context];

        // Create default framebuffer object.
        glGenFramebuffers(1, &defaultFramebuffer);
        glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer);

        // Create color render buffer and allocate backing store.
        glGenRenderbuffers(1, &colorRenderbuffer);
        glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer);
        [context renderbufferStorage:GL_RENDERBUFFER fromDrawable:(CAEAGLLayer *)self.layer];
        glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &framebufferWidth);
        glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &framebufferHeight);

        glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, colorRenderbuffer);

        // Create depth render buffer and allocate backing store.
        glGenRenderbuffers(1, &depthRenderbuffer);
        glBindRenderbuffer(GL_RENDERBUFFER, depthRenderbuffer);

        glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, framebufferWidth, framebufferHeight);

        glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, depthRenderbuffer);

        if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE)
            NSLog(@"Failed to make complete framebuffer object %x", glCheckFramebufferStatus(GL_FRAMEBUFFER));
    }
}

- (void)deleteFramebuffer
{
    if (context)
    {
        [EAGLContext setCurrentContext:context];

        if (defaultFramebuffer) {
            glDeleteFramebuffers(1, &defaultFramebuffer);
            defaultFramebuffer = 0;
        }

        if (colorRenderbuffer) {
            glDeleteRenderbuffers(1, &colorRenderbuffer);
            colorRenderbuffer = 0;
        }

        if (depthRenderbuffer) {
            glDeleteRenderbuffers(1, &depthRenderbuffer);
            depthRenderbuffer = 0;
        }
        NSLog(@"Framebuffer deleted");

    }
}

- (void)setFramebuffer
{
    if (context) {
        [EAGLContext setCurrentContext:context];

        if (!defaultFramebuffer)
            [self createFramebuffer];

        glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer);
        glViewport(0, 0, framebufferWidth, framebufferHeight);

        glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);

    }
}

- (BOOL)presentFramebuffer
{
    BOOL success = FALSE;

    if (context) {
        [EAGLContext setCurrentContext:context];

        glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer);

        success = [context presentRenderbuffer:GL_RENDERBUFFER];
    }

    return success;
}

- (void)layoutSubviews
{
    // The framebuffer will be re-created at the beginning of the next setFramebuffer method call.
    [self deleteFramebuffer];
}

- (void)initContext
{
    EAGLContext *aContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES1];

    if (!aContext)
        NSLog(@"Failed to create ES context");
    else if (![EAGLContext setCurrentContext:aContext])
        NSLog(@"Failed to set ES context current");

    [self setContext:aContext];
    [self setFramebuffer];
}

@end


text:
/*
 * 2012-3 Red Hat Inc. and/or its affiliates and other contributors.
 *
 * 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.jboss.example.homeloan.interceptors;

import java.util.Arrays;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.inject.Named;

import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.SerializationConfig;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.overlord.rtgov.active.collection.ActiveMap;
import org.overlord.rtgov.client.CollectionManager;
import org.overlord.rtgov.client.DefaultCollectionManager;
import org.switchyard.Exchange;
import org.switchyard.ExchangeInterceptor;
import org.switchyard.ExchangePhase;
import org.switchyard.HandlerException;
import org.switchyard.Message;
import org.switchyard.Property;

import org.jboss.example.homeloan.data.LoanApplication;
import org.jboss.example.homeloan.data.Applicant;

@Named("PolicyEnforcer")
public class PolicyEnforcer implements ExchangeInterceptor {

    private static final String PRINCIPALS = "Principals";

    private static final Logger LOG=Logger.getLogger(PolicyEnforcer.class.getName());

    private CollectionManager _collectionManager=new DefaultCollectionManager();

    private ActiveMap _principals=null;

    private boolean _initialized=false;

    private static final ObjectMapper MAPPER=new ObjectMapper();

    static {
        SerializationConfig config=MAPPER.getSerializationConfig()
                .withSerializationInclusion(JsonSerialize.Inclusion.NON_NULL)
                .withSerializationInclusion(JsonSerialize.Inclusion.NON_DEFAULT);

        MAPPER.setSerializationConfig(config);
    }

    protected void init() {

        if (_collectionManager != null) {
            _principals = _collectionManager.getMap(PRINCIPALS);
        }

        if (LOG.isLoggable(Level.FINE)) {
            LOG.fine("*********** Policy Enforcer Initialized with acm="
                        +_collectionManager+", principals map="+_principals);
        }

        _initialized = true;

    }

    /**
     * {@inheritDoc}
     */
    public void after(String call, Exchange exch) throws HandlerException {
    }

    /**
     * {@inheritDoc}
     */
    public void before(String call, Exchange exch) throws HandlerException {

        ExchangePhase phase=exch.getPhase();

        if (phase != ExchangePhase.IN) {
            return;
        }

        if (!_initialized) {
            init();
        }

        if (LOG.isLoggable(Level.FINE)) {
            LOG.fine("********* Exchange="+exch);
        }

        if (_principals != null) {
            org.switchyard.Message mesg=exch.getMessage();

            if (mesg == null) {
                LOG.severe("Could not obtain message for phase ("+phase+") and exchange: "+exch);
                return;
            }

            org.switchyard.Context context=exch.getContext();

            java.util.Set<Property> contextProps=context.getProperties(
                    org.switchyard.Scope.MESSAGE);

            Property p=null;

            for (Property prop : contextProps) {
                if (prop.getName().equals("org.switchyard.contentType")) {
                    p = prop;
                    break;
                }
            }

            if (LOG.isLoggable(Level.FINER)) {
                LOG.finer("Content type="+(p==null?null:p.getValue()));
            }
            if (p != null && p.getValue().toString().equals(
                            "java:org.jboss.example.homeloan.data.LoanApplication")) {

                String customer=getCustomer(mesg);

                if (customer != null) {
                    if (_principals.containsKey(customer)) {

                        @SuppressWarnings("unchecked")
                        java.util.Map<String,java.io.Serializable> props=
                                (java.util.Map<String,java.io.Serializable>)
                                        _principals.get(customer);

                        // Check if customer is suspended
                        if (props.containsKey("suspended")
                                && props.get("suspended").equals(Boolean.TRUE)) {
                            throw new HandlerException("Customer '"+customer
                                            +"' has been suspended");
                        }
                    }

                    if (LOG.isLoggable(Level.FINE)) {
                        LOG.fine("*********** Policy Enforcer: customer '"
                                +customer+"' has not been suspended");
                        LOG.fine("*********** Principal: "+_principals.get(customer));
                    }
                } else {
                    LOG.warning("Unable to find customer name");
                }
            }
        }
    }

    /**
     * This method returns the customer associated with the
     * exchange.
     *
     * @param msg The message
     * @return The customer
     */
    protected String getCustomer(Message msg) {
        String customer=null;

        Object content=msg.getContent();

        if (content instanceof LoanApplication) {
            customer = ((LoanApplication)content).getApplicant().getSsn();
        }

        if (LOG.isLoggable(Level.FINER)) {
            LOG.finer("Customer="+customer);
        }

        return (customer);
    }

    @Override
    public List<String> getTargets() {
        return Arrays.asList(PROVIDER);
    }

}


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

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Class com.exacttarget.fuelsdk.ETFilter (Salesforce Marketing Cloud Java SDK 1.2.1 API)</title>
<meta name="date" content="2017-11-13">
<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
com.exacttarget.fuelsdk.ETFilter

Packages that use ETFilter

Package
Description

com.exacttarget.fuelsdk

Fuel Java SDK Core

Uses of ETFilter in com.exacttarget.fuelsdk

Methods in com.exacttarget.fuelsdk that return ETFilter

Modifier and Type
Method and Description

static ETFilter
ETFilter.parse(String... s)

parse the String to create ETFilter object.

Methods in com.exacttarget.fuelsdk that return types with arguments of type ETFilter

Modifier and Type
Method and Description

List<ETFilter>
ETFilter.getFilters()

Deprecated.

Use ETExpression.getSubexpressions.

Methods in com.exacttarget.fuelsdk with parameters of type ETFilter

Modifier and Type
Method and Description

void
ETFilter.addFilter(ETFilter filter)

Deprecated.

Use ETExpression.addSubexpression.

<T extends ETApiObject>
ETResponse<T>
ETClient.delete(Class<T> type,
      ETFilter filter)

<T extends ETApiObject>
ETResponse<T>
ETClient.retrieve(Class<T> type,
        ETFilter filter)

<T extends ETApiObject>
ETResponse<T>
ETClient.retrieve(Class<T> type,
        ETFilter filter,
        Integer page,
        Integer pageSize,
        String... properties)

Deprecated.

Pass properties in filter argument.

<T extends ETApiObject>
ETResponse<T>
ETClient.retrieve(Class<T> type,
        ETFilter filter,
        String... properties)

Deprecated.

Pass properties in filter argument.

<T extends ETApiObject>
ETResponse<T>
ETClient.retrieve(Class<T> type,
        Integer page,
        Integer pageSize,
        ETFilter filter)

static <T extends ETRestObject>
ETResponse<T>
ETRestObject.retrieve(ETClient client,
        Class<T> type,
        Integer page,
        Integer pageSize,
        ETFilter filter)

static <T extends ETSoapObject>
ETResponse<T>
ETSoapObject.retrieve(ETClient client,
        Class<T> type,
        Integer page,
        Integer pageSize,
        ETFilter filter)

protected static <T extends ETSoapObject>
ETResponse<T>
ETSoapObject.retrieve(ETClient client,
        String soapObjectName,
        ETFilter filter,
        Class<T> type)

ETSoapObject has additional retrieve methods that take the
 SOAP object name and request ID for continuing requests.

protected static <T extends ETSoapObject>
ETResponse<T>
ETSoapObject.retrieve(ETClient client,
        String soapObjectName,
        ETFilter filter,
        String continueRequest,
        Class<T> type)

<T extends ETApiObject>
T
ETClient.retrieveObject(Class<T> type,
              ETFilter filter)

<T extends ETApiObject>
T
ETClient.retrieveObject(Class<T> type,
              ETFilter filter,
              String... properties)

Deprecated.

Pass properties in filter argument.

<T extends ETApiObject>
List<T>
ETClient.retrieveObjects(Class<T> type,
               ETFilter filter)

<T extends ETApiObject>
List<T>
ETClient.retrieveObjects(Class<T> type,
               ETFilter filter,
               Integer page,
               Integer pageSize,
               String... properties)

Deprecated.

Pass properties in filter argument.

<T extends ETApiObject>
List<T>
ETClient.retrieveObjects(Class<T> type,
               ETFilter filter,
               String... properties)

Deprecated.

Pass properties in filter argument.

<T extends ETApiObject>
List<T>
ETClient.retrieveObjects(Class<T> type,
               Integer page,
               Integer pageSize,
               ETFilter filter)

static ETResponse<ETDataExtensionRow>
ETDataExtension.select(ETClient client,
      String dataExtension,
      ETFilter filter)

static ETResponse<ETDataExtensionRow>
ETDataExtension.select(ETClient client,
      String dataExtension,
      ETFilter filter,
      Integer page,
      Integer pageSize,
      String... columns)

Deprecated.

Pass columns in filter argument.

static ETResponse<ETDataExtensionRow>
ETDataExtension.select(ETClient client,
      String dataExtension,
      ETFilter filter,
      String... columns)

Deprecated.

Pass columns in filter argument.

static ETResponse<ETDataExtensionRow>
ETDataExtension.select(ETClient client,
      String dataExtension,
      Integer page,
      Integer pageSize,
      ETFilter filter)

ETResponse<ETDataExtensionRow>
ETDataExtension.select(ETFilter filter)

ETResponse<ETDataExtensionRow>
ETDataExtension.select(ETFilter filter,
      Integer page,
      Integer pageSize,
      String... columns)

Deprecated.

Pass columns in filter argument.

ETResponse<ETDataExtensionRow>
ETDataExtension.select(ETFilter filter,
      String... columns)

Deprecated.

Pass columns in filter argument.

ETResponse<ETDataExtensionRow>
ETDataExtension.select(Integer page,
      Integer pageSize,
      ETFilter filter)

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Copyright © 2017. All rights reserved.


text:
platform_family = node["platform_family"]
platform_version = node["platform_version"].to_i

data_bag_name = node["sensu"]["data_bag"]["name"]
enterprise_item = node["sensu"]["data_bag"]["enterprise_item"]

begin
  unless get_sensu_state(node, "enterprise")
    enterprise = Sensu::Helpers.data_bag_item(enterprise_item, true, data_bag_name)
    set_sensu_state(node, "enterprise", enterprise)
   end
rescue => e
  Chef::Log.warn("Failed to populate Sensu state with Enterprise repository credentials from data bag: " + e.inspect)
end

credentials = get_sensu_state(node, "enterprise", "repository", "credentials")
repository_url = "http://#{credentials['user']}:#{credentials['password']}@enterprise.sensuapp.com"

case platform_family
when "debian"
  include_recipe "apt"

  apt_repository "sensu-enterprise" do
    uri File.join(repository_url, "apt")
    key File.join(repository_url, "apt", "pubkey.gpg")
    distribution "sensu-enterprise"
    components node["sensu"]["enterprise"]["use_unstable_repo"] ? ["unstable"] : ["main"]
    action :add
  end
else
  repo = yum_repository "sensu-enterprise-dashboard" do
    description "sensu enterprise dashboard"
    repo = node["sensu"]["enterprise"]["use_unstable_repo"] ? "yum-unstable" : "yum"
    url "#{repository_url}/#{repo}/$basearch/"
    action :add
  end
  repo.gpgcheck(false) if repo.respond_to?(:gpgcheck)
end

package "sensu-enterprise-dashboard" do
  version node["sensu"]["enterprise-dashboard"]["version"]
end

sensu_dashboard_config node.name


text: High level library for building Mac and iOS applications in Haskell


text:
package io.quarkus.arc.deployment;

import org.jboss.jandex.AnnotationInstance;
import org.jboss.jandex.ClassInfo;
import org.jboss.jandex.DotName;
import org.jboss.jandex.Type;

import io.quarkus.arc.processor.BeanInfo;
import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.runtime.annotations.RegisterForReflection;

public class ReflectiveBeanClassesProcessor {

    @BuildStep
    void implicitReflectiveBeanClasses(BuildProducer<ReflectiveBeanClassBuildItem> reflectiveBeanClasses,
            BeanDiscoveryFinishedBuildItem beanDiscoveryFinished) {
        DotName registerForReflection = DotName.createSimple(RegisterForReflection.class.getName());

        for (BeanInfo classBean : beanDiscoveryFinished.beanStream().classBeans()) {
            ClassInfo beanClass = classBean.getTarget().get().asClass();
            AnnotationInstance annotation = beanClass.classAnnotation(registerForReflection);
            if (annotation != null) {
                Type[] targets = annotation.value("targets") != null ? annotation.value("targets").asClassArray()
                        : new Type[] {};
                String[] classNames = annotation.value("classNames") != null ? annotation.value("classNames").asStringArray()
                        : new String[] {};
                if (targets.length == 0 && classNames.length == 0) {
                    reflectiveBeanClasses.produce(new ReflectiveBeanClassBuildItem(beanClass));
                }
            }
        }
    }

}


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.monitor.generated;

import com.azure.core.util.Context;
import java.time.Duration;

/** Samples for Metrics List. */
public final class MetricsListSamples {
    /*
     * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetric.json
     */
    /**
     * Sample code: Get Metric for data.
     *
     * @param azure The entry point for accessing resource management APIs in Azure.
     */
    public static void getMetricForData(com.azure.resourcemanager.AzureResourceManager azure) {
        azure
            .diagnosticSettings()
            .manager()
            .serviceClient()
            .getMetrics()
            .listWithResponse(
                "subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default",
                "2017-04-14T02:20:00Z/2017-04-14T04:20:00Z",
                Duration.parse("PT1M"),
                null,
                "Average,count",
                3,
                "Average asc",
                "BlobType eq '*'",
                null,
                "Microsoft.Storage/storageAccounts/blobServices",
                Context.NONE);
    }

    /*
     * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricMetadata.json
     */
    /**
     * Sample code: Get Metric for metadata.
     *
     * @param azure The entry point for accessing resource management APIs in Azure.
     */
    public static void getMetricForMetadata(com.azure.resourcemanager.AzureResourceManager azure) {
        azure
            .diagnosticSettings()
            .manager()
            .serviceClient()
            .getMetrics()
            .listWithResponse(
                "subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default",
                "2017-04-14T02:20:00Z/2017-04-14T04:20:00Z",
                Duration.parse("PT1M"),
                null,
                "Average,count",
                3,
                "Average asc",
                "BlobType eq '*'",
                null,
                "Microsoft.Storage/storageAccounts/blobServices",
                Context.NONE);
    }

    /*
     * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricError.json
     */
    /**
     * Sample code: Get Metric with error.
     *
     * @param azure The entry point for accessing resource management APIs in Azure.
     */
    public static void getMetricWithError(com.azure.resourcemanager.AzureResourceManager azure) {
        azure
            .diagnosticSettings()
            .manager()
            .serviceClient()
            .getMetrics()
            .listWithResponse(
                "subscriptions/ac41e21f-afd6-4a79-8070-f01eba278f97/resourceGroups/todking/providers/Microsoft.DocumentDb/databaseAccounts/tk-cosmos-mongo",
                "2021-06-07T21:51:00Z/2021-06-08T01:51:00Z",
                Duration.parse("FULL"),
                "MongoRequestsCount,MongoRequests",
                "average",
                null,
                null,
                null,
                null,
                "microsoft.documentdb/databaseaccounts",
                Context.NONE);
    }
}


text:
package io.restassured.itest.java.support;

import org.apache.commons.lang3.StringUtils;

import java.io.StringWriter;

public class RequestPathFromLogExtractor {

    public static String loggedRequestPathIn(StringWriter writer) {
        return StringUtils.substringBetween(writer.toString(), "Request URI:", "\n").trim();
    }
}


text:
DScript
=======

Open sourced, object oriented, Javascript based, extendable scripting language implemented in C#.

***Example***

    var MyClass = {
        doSomethingComplicated: function (x, y) {
            return x * y / 10.0;
        }
    };

    var inst = new MyClass();
    var x = inst.doSomethingComplicated(1.0, 2.0);

    console.log(x);

***Supports***
- Variables
- Classes/Objects
- Class methods
- Global methods
- Class scope
- Global scope
- Method scope
- Arithmetic
- Eval/Exec
- Basic exception handling (try/catch/finally/throw)
- ...more

***Arithmetic operators***
++, --, +, -, *, /, %

***Comparison operators***
<, >, <=, >=, ==, !=

***Boolean operators***
!, &, |, ^, &&, ||

***Provides***
- Console I/O
  - log
  - error
  - clear
- Math library
  - abs
  - acos
  - asin
  - atan
  - atan2
  - ceil
  - cos
  - cosh
  - exp
  - floor
  - log
  - min
  - max
  - pow
  - random
  - round
  - sin
  - sinh
  - sqrt
  - tan
  - tanh
- Random number library
- JSON
  - parse
  - stringify


text:
<?php

namespace TDN\RedactionBundle\Entity;

use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\Query\ResultSetMapping;

use TDN\DocumentBundle\Entity\DocumentRepository;

/**
 * ArticleRepository
 *
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.
 */
class ArticleRepository extends DocumentRepository
{

	public function findMostRead ($limite, $panel = NULL) {
		$qb = $this->createQueryBuilder('u');
		$qexpr = $qb->expr();
		$query = $qb->select('u');
		if ($panel != NULL) {
			$query = $query->innerjoin('u.rubriques', 'r')
						   ->where($qexpr->andX(
						   		$qexpr->like('u.statut', $qb->expr()->literal('ARTICLE_PUBLIE')),
						   		$qexpr->in('r.slug', ':listeRubriques')
						   	))
						   ->setParameter('listeRubriques', $panel);
		} else {
			$query = $query->where($qexpr->like('u.statut', $qb->expr()->literal('ARTICLE_PUBLIE')));
		}
		$query = $query->orderBy('u.commentThread', 'DESC')
	        		   ->setMaxResults($limite)
	        		   ->getQuery()
	        		   ->useResultCache(true);

	     $last = $query->getResult();
	     return $last;
	}

	public function findMostLiked ($limite, $panel = NULL) {
		return parent::findMostLikedDocument($limite, 'ARTICLE_PUBLIE', $panel);
	}

	public function findMostRecent ($limite, $panel = NULL) {
		return parent::findMostRecentDocument($limite, 'ARTICLE_PUBLIE', $panel);
	}

	public function findPage ($page, $size = 50, $all = true) {
		$offset = ($page - 1) * $size;
		$qb = $this->createQueryBuilder('u');
		$query = $qb->select('u');
		if ($all !== true && is_numeric($all)) {
			$query = $query->where($qb->expr()->eq('u.lnAuteur', ':id'))
						   ->setParameter('id', $all);
		}
	    $query = $query->orderBy('u.datePublication', 'DESC')
	        		   ->setFirstResult($offset);
	    if ($size !== 0) {
	    	$query = $query->setMaxResults($size);
	    }
	    $query = $query->getQuery();
	    // ->where($qb->expr()->like('u.statut', $qb->expr()->literal('ARTICLE_PUBLIE')))

	     $last = $query->getResult();
	     return $last;
	}

	public function findRedactionRecent($limite, $panel = NULL)
	{
        $rsm = new ResultSetMapping;
        $rsm->addEntityResult('TDN\DocumentBundle\Entity\Document', 'a');
        $rsm->addFieldResult('a', 'id', 'idDocument');
        $rsm->addFieldResult('a', 'titre', 'titre');
        $rsm->addFieldResult('a', 'slug', 'slug');
        // $rsm->addFieldResult('n', 'popularite', 'popularite');
        // $rsm->addFieldResult('n', 'ip_adresse', 'adresseIP');
        // $rsm->addFieldResult('n', 'date_inscription', 'dateInscription');
        // $rsm->addFieldResult('n', 'avatar_id', 'lnAvatar');
        // $rsm->addJoinedEntityResult('TDN\DocumentRubiqueBundle\Entity\DocumentRubrique' , 'r', 'n', 'roles');
        // $rsm->addFieldResult('a', 'address_id', 'id');
        // $rsm->addFieldResult('a', 'street', 'street');
        // $rsm->addFieldResult('a', 'city', 'city');

        if (!is_null($panel)) {
        	$withPanel = "AND r.slug IN ('".implode(",'", $panel).")";
        } else {
        	$withPanel = '';
        }

        $sql =
            "SELECT a.id, a.titre, a.slug
             FROM Document a
             INNER JOIN DocumentThemes t ON t.for_document = a.id
             INNER JOIN DocumentRubrique r ON t.for_rubrique = r.id
             WHERE a.statut IN ('ARTICLE_PUBLIE', 'SELECTION_PUBLIEE') $withPanel
             ORDER BY a.date_publication DESC
             LIMIT ".$limite;
print_r($sql);
        $query = $this->getEntityManager()->createNativeQuery($sql, $rsm);
        // $query->setParameter(1, $semaine-1);
        $articles = $query->getResult();
        return $articles;
      }

 }


text:
package java.beans;

/**
 * PropertyEditorSupport helps with PropertyEditors,
 * implementing base functionality that they usually must
 * have but which is a pain to implement.  You may extend
 * from this class or use it as a standalone.

 *
 * This class does not do any painting or actual editing.
 * For that, you must use or extend it.  See the
 * PropertyEditor class for better descriptions of what
 * the various methods do.
 *
 * @author John Keiser
 * @author Robert Schuster
 * @since 1.1
 * @status updated to 1.5
 */
public class PropertyEditorSupport implements PropertyEditor
{
  Object eventSource;
  Object value;
  PropertyChangeSupport pSupport;

  /** Call this constructor when you are deriving from
   * PropertyEditorSupport.
   *
   * Using this constructor the event source is this PropertyEditorSupport
   * instance itself.
   *
   * @since 1.5
   * @specnote this was protected prior to 1.5
   */
  public PropertyEditorSupport()
  {
    eventSource = this;
    pSupport = new PropertyChangeSupport(this);
  }

  /** Call this constructor when you are using
   * PropertyEditorSupport as a helper object.
   *
   * This constructor throws a NullPointerException when source is null,
   * for compatibility reasons with J2SDK 1.5.0 .
   *
   * @param source The source to use when firing
   * property change events.
   * @since 1.5
   * @specnote this was protected prior to 1.5
   */
  public PropertyEditorSupport(Object source)
  {
    // note: constructor rejects source being null for the sake of compatibility
    // with official 1.5.0 implementation
    if (source == null)
      throw new NullPointerException("Event source must not be null.");

    eventSource = source;
    pSupport = new PropertyChangeSupport(eventSource);
  }

  /** Sets the current value of the property and a property change
   * event is fired to all registered PropertyChangeListener instances.
   *
   * @param newValue The new value for the property.
   */
  public void setValue(Object newValue)
  {
    value = newValue;

    // specification in java.beans.PropertyChangeEvent says
    // that without a property name (first argument) the
    // new and the old value should always be null
    pSupport.firePropertyChange(null, null, null);
  }

  /** Gets the current value of the property.
   *
   * @return the current value of the property.
   */
  public Object getValue()
  {
    return value;
  }

  /** Gets whether this object is paintable or not.
   *
   * @return false
   */
  public boolean isPaintable()
  {
    return false;
  }

  /** Paints this object.  This class does nothing in
   * this method.
   */
  public void paintValue(java.awt.Graphics g, java.awt.Rectangle r)
  {
  }

  /** Gets the Java initialization String for the current
   * value of the Object.  This class returns gibberish or
   * null (though the spec does not say which).

   * Implementation Note: This class
   * returns the string "@$#^" to make sure the code will
   * be broken, so that you will know to override it when
   * you create your own property editor.
   *
   * @return the Java initialization string.
   */
  public String getJavaInitializationString()
  {
    return "@$#^";
  }

  /** Gets the value as text.
   * In this class, you cannot count on getAsText() doing
   * anything useful, although in this implementation I
   * do toString().
   *
   * @return the value as text.
   */
  public String getAsText()
  {
    return value != null ? value.toString() : "null";
  }

  /** Sets the value as text.
   * In this class, you cannot count on setAsText() doing
   * anything useful across implementations.
   * Implementation Note: In this
   * implementation it checks if the String is "null", and
   * if it is, sets the value to null, otherwise it throws
   * an IllegalArgumentException.
   *
   * @param s the text to convert to a new value.
   * @exception IllegalArgumentException if the text is
   * malformed.
   */
  public void setAsText(String s) throws IllegalArgumentException
  {
    if (s.equals("null"))
      setValue(null);
    else
      throw new IllegalArgumentException();
  }

  /** Returns a list of possible choices for the value.
   *
   * @return null
   */
  public String[] getTags()
  {
    return null;
  }

  /** Returns a custom component to edit the value.
   *
   * @return null in this class.
   */
  public java.awt.Component getCustomEditor()
  {
    return null;
  }

  /** Finds out whether this property editor supports a
   * custom component to edit its value.
   *
   * @return false in this class.
   */
  public boolean supportsCustomEditor()
  {
    return false;
  }

  /** Adds a property change listener to this property editor.
   *
   * @param l the listener to add.
   */
  public void addPropertyChangeListener(PropertyChangeListener l)
  {
    pSupport.addPropertyChangeListener(l);
  }

  /** Removes a property change listener from this property editor.
   *
   * @param l the listener to remove.
   */
  public void removePropertyChangeListener(PropertyChangeListener l)
  {
    pSupport.removePropertyChangeListener(l);
  }

  /** Notifies people that we've changed, although we don't
   * tell them just how.
   */
  public void firePropertyChange()
  {
    pSupport.firePropertyChange(null, null, null);
  }

  /** Returns the bean that is used as the source of events.
   *
   * @return The event source object
   * @since 1.5
   */
  public Object getSource()
  {
    return eventSource;
  }

  /** Sets the bean that is used as the source of events
   * when property changes occur.
   *
   * The event source bean is for informational purposes only
   * and should not be changed by the PropertyEditor.
   *
   * @param source
   * @since 1.5
   */
  public void setSource(Object source)
  {
    eventSource = source;
  }
}


text:
<!doctype html>
<script type="module" src="hashed-entry.js"></script>


text:
# General Utility Functions

function Invoke-NullCoalescing {
    $result = $null
    foreach($arg in $args) {
        if ($arg -is [ScriptBlock]) {
            $result = & $arg
        } else {
            $result = $arg
        }
        if ($result) { break }
    }
    $result
}

Set-Alias ?? Invoke-NullCoalescing -Force

function Get-LocalOrParentPath($path) {
    $checkIn = Get-Item -Force .
    if ($checkIn.PSProvider.Name -ne 'FileSystem') {
        return $null
    }
    while ($checkIn -ne $NULL) {
        $pathToTest = [System.IO.Path]::Combine($checkIn.fullname, $path)
        if (Test-Path -LiteralPath $pathToTest) {
            return $pathToTest
        } else {
            $checkIn = $checkIn.parent
        }
    }
    return $null
}

function dbg ($Message, [Diagnostics.Stopwatch]$Stopwatch) {
    if($Stopwatch) {
        Write-Verbose ('{0:00000}:{1}' -f $Stopwatch.ElapsedMilliseconds,$Message) -Verbose # -ForegroundColor Yellow
    }
}


text:
using JetBrains.Annotations;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Metadata.Internal;

namespace Pomelo.EntityFrameworkCore.MySql.Metadata.Internal
{
    /// <summary>
    ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
    ///     directly from your code. This API may change or be removed in future releases.
    /// </summary>
    public class MySqlIndexBuilderAnnotations : MySqlIndexAnnotations
    {
        /// <summary>
        ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
        ///     directly from your code. This API may change or be removed in future releases.
        /// </summary>
        public MySqlIndexBuilderAnnotations(
            [NotNull] InternalIndexBuilder internalBuilder,
            ConfigurationSource configurationSource)
            : base(new RelationalAnnotationsBuilder(internalBuilder, configurationSource))
        {
        }

#pragma warning disable 109
        /// <summary>
        ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
        ///     directly from your code. This API may change or be removed in future releases.
        /// </summary>
        public new virtual bool Name([CanBeNull] string value) => SetName(value);

        /// <summary>
        ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
        ///     directly from your code. This API may change or be removed in future releases.
        /// </summary>
        public new virtual bool HasFilter([CanBeNull] string value) => SetFilter(value);

#pragma warning restore 109
    }
}


text:
<?php

namespace Yansongda\Pay\Tests\Plugin\Wechat\Marketing\Coupon;

use GuzzleHttp\Psr7\Uri;
use Yansongda\Pay\Pay;
use Yansongda\Pay\Plugin\Wechat\Marketing\Coupon\QueryCouponDetailPlugin;
use Yansongda\Pay\Provider\Wechat;
use Yansongda\Pay\Rocket;
use Yansongda\Pay\Tests\TestCase;
use Yansongda\Supports\Collection;

class QueryCouponDetailPluginTest extends TestCase
{
    /**
     * @var \Yansongda\Pay\Plugin\Wechat\Marketing\Coupon\QueryCouponDetailPlugin
     */
    protected $plugin;

    protected function setUp(): void
    {
        parent::setUp();

        $this->plugin = new QueryCouponDetailPlugin();
    }

    public function testNormal()
    {
        $rocket = new Rocket();
        $rocket->setParams([])->setPayload(new Collection([
            'coupon_id' => '123456',
            'openid' => '7890',
        ]));

        $result = $this->plugin->assembly($rocket, function ($rocket) {return $rocket; });

        $radar = $result->getRadar();

        self::assertEquals('GET', $radar->getMethod());
        self::assertNull($result->getPayload());
        self::assertEquals(new Uri(Wechat::URL[Pay::MODE_NORMAL].'v3/marketing/favor/users/7890/coupons/123456?appid=wx55955316af4ef13'), $radar->getUri());
    }
}


text:
<?php

namespace Oro\Bundle\EmailBundle\Form\Type;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

use Oro\Bundle\EmailBundle\Entity\Email;
use Oro\Bundle\EmailBundle\Entity\Repository\EmailTemplateRepository;
use Oro\Bundle\SecurityBundle\SecurityFacade;

class AutoResponseTemplateChoiceType extends AbstractType
{
    const NAME = 'oro_email_autoresponse_template_choice';

    /** @var SecurityFacade */
    protected $securityFacade;

    /**
     * @param SecurityFacade $securityFacade
     */
    public function __construct(SecurityFacade $securityFacade)
    {
        $this->securityFacade = $securityFacade;
    }

    /**
     * {@inheritdoc}
     */
    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults([
            'selectedEntity' => Email::ENTITY_CLASS,
            'query_builder' => function (EmailTemplateRepository $repository) {
                return $repository->getEntityTemplatesQueryBuilder(
                    Email::ENTITY_CLASS,
                    $this->securityFacade->getOrganization()
                );
            },
            'configs' => [
                'allowClear'  => true,
                'placeholder' => 'oro.form.custom_value',
            ]
        ]);
    }

    /**
     * {@inheritdoc}
     */
    public function getParent()
    {
        return 'oro_email_template_list';
    }

    /**
     * {@inheritdoc}
     */
    public function getName()
    {
        return static::NAME;
    }
}


text:
.form-default, .form-horizontal {: 10px;
    padding: 20px 15px;
}

.form-label-left .form-row > label {
    text-align: left;
}

.form-label-right .form-row > label {
    text-align: right;
}

.form-default .form-row {
    margin-bottom: 15px;
}

.form-default .form-row > label {
    display: inline-block;
    width: 30%;
    text-align: right;
    margin-bottom: 5px;
    margin-right: 5px;
}

.form-default .form-row input:not([type=button]):not([type=submit]):not([type=reset]) {
    width: 65%;
}

@media(max-width: 768px){
    .form-default {
        width: 100%;
    }

    .form-default .form-row label {
        display: block;
        width: 100%;
        text-align: left;
        margin-left: 10px;
    }

    .form-default .form-row input:not([type=button]):not([type=submit]):not([type=reset]) {
        width: 100%;
    }
}

.form-horizontal .form-row {
    margin: 0 -15px 10px -15px;
}

.form-horizontal .form-row:after {
    content: '';
    display: block;
    width: 100%;
    height: 0;
    clear: both;
}

.form-horizontal .form-row > label {
    padding-top: 8px;
    font-size: 14px;
}

.form-horizontal label.check-item,
.form-default label.check-item {
    display: block;
    font-size: 12px;
    padding-top: 10px;
}


text:
package org.apache.druid.query.aggregation.first;

import org.apache.druid.collections.SerializablePair;
import org.apache.druid.segment.BaseFloatColumnValueSelector;
import org.apache.druid.segment.BaseLongColumnValueSelector;

public class FloatFirstAggregator extends NumericFirstAggregator<BaseFloatColumnValueSelector>
{
  float firstValue;

  public FloatFirstAggregator(
      BaseLongColumnValueSelector timeSelector,
      BaseFloatColumnValueSelector valueSelector
  )
  {
    super(timeSelector, valueSelector);
    firstValue = 0;
  }

  @Override
  void setCurrentValue()
  {
    firstValue = valueSelector.getFloat();
  }

  @Override
  public Object get()
  {
    return new SerializablePair<>(firstTime, rhsNull ? null : firstValue);
  }

  @Override
  public float getFloat()
  {
    return firstValue;
  }

  @Override
  public double getDouble()
  {
    return firstValue;
  }

  @Override
  public long getLong()
  {
    return (long) firstValue;
  }
}


text:
import React from 'react';
import renderer from 'react-test-renderer';
import 'jest-styled-components';

import Description from '../Description';

describe('<AppWrapper />', () => {
  it('should render correctly', () => {
    // component init
    const component = renderer.create(<Description />);

    expect(component.toJSON()).toMatchSnapshot();
  });
});


text:
<!--

    Copyright (C) 2011-2020 Red Hat, Inc. (https://github.com/Commonjava/indy)

    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.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.commonjava.indy</groupId>
    <artifactId>indy-hosted-by-archive</artifactId>
    <version>2.7.7-SNAPSHOT</version>
  </parent>

  <artifactId>indy-ftests-hosted-by-archive</artifactId>
  <name>Indy :: Hosted By Archive :: Functional Tests</name>

  <dependencies>
    <dependency>
      <groupId>org.commonjava.indy</groupId>
      <artifactId>indy-hosted-by-archive-jaxrs</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.commonjava.indy</groupId>
      <artifactId>indy-hosted-by-archive-common</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.commonjava.indy</groupId>
      <artifactId>indy-hosted-by-archive-client-java</artifactId>
    </dependency>
    <dependency>
      <groupId>org.commonjava.indy</groupId>
      <artifactId>indy-client-core-java</artifactId>
    </dependency>
    <dependency>
      <groupId>org.commonjava.indy</groupId>
      <artifactId>indy-ftests-common</artifactId>
    </dependency>
    <dependency>
      <groupId>org.commonjava.indy</groupId>
      <artifactId>indy-test-fixtures-core</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-core</artifactId>
      <scope>compile</scope>
    </dependency>
  </dependencies>
</project>


text:
<?php

/**
 * A custom select statement class that has additional methods to return an SQL fragment
 * that provides convenience methods for building a query to return a count of results.
 *
 * @author Marcus Nyeholt <nyeholt@gmail.com>
 */
class CountableSelect extends Zend_Db_Select
{
	/**
	 * Indicates whether this query is limited or not.
	 *
	 * If it is, then it's likely that the user wants to get a 'count' query.
	 *
	 */
	public function isLimited()
	{
		return isset($this->_parts[Zend_Db_Select::LIMIT_COUNT]);
	}

	/**
	 * Create the query that could be used for counting instead of
	 * raw data returns.
	 */
    public function getCountQuery()
	{
        $sql = self::SQL_SELECT;

        foreach (array_keys(parent::$_partsInit) as $part) {
			if ($part == Zend_Db_Select::ORDER ||  $part == Zend_Db_Select::LIMIT_COUNT || $part == Zend_Db_Select::LIMIT_OFFSET) {
				continue;
			}

			if ($part == Zend_Db_Select::COLUMNS) {
				$part = 'CountColumn';
			}

			$method = '_render' . ucfirst($part);
			if (method_exists($this, $method)) {
				$sql = $this->$method($sql);
			}
		}

		return $sql;
	}

	/**
	 * Renders the 'count' of objects for the column
	 *
	 * @param String $sql
	 */
	protected function _renderCountColumn($sql)
	{
//		foreach ($this->_parts[self::FROM] as $correlationName => $table) {
//			return $sql .= ' count('.$correlationName.'.id) ';
//		}
		return $sql .= ' count(*)';
	}
}
?>


text:
package io.github.joaomlneto.travis_ci_tutorial_java;

import java.util.*;

import static org.junit.Assert.*;
import org.junit.*;

public class SimpleCalculatorTest {
	@Test
	public void testAdd() {
		SimpleCalculator calc = new SimpleCalculator();
		assertEquals(calc.add(1, 1), 2);
	}
	@Test
	public void testSub() {
		SimpleCalculator calc = new SimpleCalculator();
		assertEquals(calc.sub(1, 1), 0);
	}
	@Test
	public void testMul() {
		SimpleCalculator calc = new SimpleCalculator();
		assertEquals(calc.mul(3, 5), 15);
	}
	@Test
	public void testDiv() {
		SimpleCalculator calc = new SimpleCalculator();
		assertEquals(calc.div(8, 2), 4);
	}
}


text:
package com.publicuhc.ultrahardcore.core;

import com.publicuhc.pluginframework.shaded.inject.multibindings.Multibinder;
import com.publicuhc.ultrahardcore.api.Command;
import com.publicuhc.ultrahardcore.api.UHCAddonConfiguration;
import com.publicuhc.ultrahardcore.api.UHCFeature;
import com.publicuhc.ultrahardcore.core.commands.*;
import com.publicuhc.ultrahardcore.core.features.*;
import org.bukkit.Bukkit;

@SuppressWarnings({"OverlyCoupledMethod", "OverlyCoupledClass"})
public class UHCCoreAddonConfiguration implements UHCAddonConfiguration
{
    @Override
    public void configureFeatures(Multibinder<UHCFeature> features)
    {
        features.addBinding().to(EnderpearlsFeature.class);
        features.addBinding().to(GhastDropsFeature.class);
        features.addBinding().to(NetherFeature.class);
        features.addBinding().to(PlayerFreezeFeature.class);
        features.addBinding().to(PlayerListFeature.class);
        features.addBinding().to(PortalsFeature.class);
        features.addBinding().to(RecipeFeature.class);
        features.addBinding().to(RegenFeature.class);
        features.addBinding().to(UberApplesFeature.class);
        features.addBinding().to(WitchSpawnsFeature.class);

        if(Bukkit.getPluginManager().getPlugin("ProtocolLib") != null) {
            features.addBinding().to(HardcoreHeartsFeature.class);
        }
    }

    @Override
    public void configureCommands(Multibinder<Command> commands)
    {
        commands.addBinding().to(ClearInventoryCommand.class);
        commands.addBinding().to(FeatureCommand.class);
        commands.addBinding().to(FeedCommand.class);
        commands.addBinding().to(FreezeCommand.class);
        commands.addBinding().to(HealCommand.class);
        commands.addBinding().to(TPCommand.class);
        commands.addBinding().to(WhitelistCommands.class);
        commands.addBinding().to(DebugCommands.class);
        commands.addBinding().to(ClearXPCommand.class);
    }
}


text:
// <copyright file="MissingProperties.cs" company="Matt Lacey">
// Copyright (c) Matt Lacey. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the solution root for license information.
// </copyright>

using System.Linq;
using ApiAnalysis.UnitTests.Helpers;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace ApiAnalysis.UnitTests
{
    [TestClass]
    public class MissingProperties
    {
        public class MissingPropertiesClass
        {
            public string Name { get; set; }

            public int Id { get; set; }

            public string Label { get; set; }
        }

        [TestMethod]
        public void MissingProperties_DetectedOk()
        {
            var json = "{\"Label\":\"Test value\"}";

            var analyzer = new SimpleJsonAnalyzer();

            var resp = analyzer.AnalyzeJsonAsync(json, typeof(MissingPropertiesClass)).Result;

            Assert.AreEqual(2, resp.Count);
            Assert.AreEqual(MessageBuilder.Get.MissingPropertyValueMessage(PropertyInfoHelper.Get(typeof(MissingPropertiesClass), nameof(MissingPropertiesClass.Name))), resp.First());
            Assert.AreEqual(MessageBuilder.Get.MissingPropertyValueMessage(PropertyInfoHelper.Get(typeof(MissingPropertiesClass), nameof(MissingPropertiesClass.Id))), resp.Last());
        }
    }
}


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.

using System.Threading;
using Microsoft.CodeAnalysis.CodeStyle;
using Microsoft.CodeAnalysis.CSharp.CodeStyle;
using Microsoft.CodeAnalysis.CSharp.Diagnostics;
using Microsoft.CodeAnalysis.CSharp.Extensions;
using Microsoft.CodeAnalysis.CSharp.Shared.Extensions;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.UseThrowExpression;

namespace Microsoft.CodeAnalysis.CSharp.UseThrowExpression
{
    [DiagnosticAnalyzer(LanguageNames.CSharp)]
    internal class CSharpUseThrowExpressionDiagnosticAnalyzer : AbstractUseThrowExpressionDiagnosticAnalyzer
    {
        public CSharpUseThrowExpressionDiagnosticAnalyzer()
            : base(CSharpCodeStyleOptions.PreferThrowExpression)
        {
        }

        protected override CodeStyleOption2<bool> PreferThrowExpressionStyle(OperationAnalysisContext context)
            => context.GetCSharpAnalyzerOptions().PreferThrowExpression;

        protected override bool IsSupported(Compilation compilation)
            => compilation.LanguageVersion() >= LanguageVersion.CSharp7;

        protected override bool IsInExpressionTree(SemanticModel semanticModel, SyntaxNode node, INamedTypeSymbol? expressionTypeOpt, CancellationToken cancellationToken)
            => node.IsInExpressionTree(semanticModel, expressionTypeOpt, cancellationToken);
    }
}


text:
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>Example for OData V2 Sales Orders (UI5 GWSAMPLE_BASIC)</title>

	<!-- ensure that MockServer can load mock data in the explored app and standalone -->
	<base href="../../../../../../../../../">

	<script id="sap-ui-bootstrap" src="resources/sap-ui-core.js"
		data-sap-ui-async="true"
		data-sap-ui-compatVersion="edge"
		data-sap-ui-libs="sap.m"
		data-sap-ui-onInit="module:sap/ui/core/ComponentSupport"
		data-sap-ui-resourceroots='{
			"sap.ui.core.internal.samples.odata.v2.SalesOrders" :
				"test-resources/sap/ui/core/internal/samples/odata/v2/SalesOrders"
		}'
		data-sap-ui-theme="sap_fiori_3">
	</script>
</head>
<body class="sapUiBody">
	<div data-sap-ui-component data-name="sap.ui.core.internal.samples.odata.v2.SalesOrders"
		data-id="container" data-settings='{"id" : "SalesOrders"}'></div>
</body>
</html>


text:
require 'spec_helper'

describe 'Your application' do

  def app
    Sinatra::Application
  end

  it "works!" do
    get '/'
    last_response.should be_ok
  end

end


text:
"""Aimsun dummy server.

This script creates a dummy server mimicking the functionality in the Aimsun
runner script. Used for testing purposes.
"""
from thread import start_new_thread
import socket
import struct
import sys
import os

sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
import flow.utils.aimsun.constants as ac  # noqa

PORT = 9999
entered_vehicles = [1, 2, 3, 4, 5]
exited_vehicles = [6, 7, 8, 9, 10]
tl_ids = [1, 2, 3, 4, 5]

def send_message(conn, in_format, values):
    """Send a message to the client.

    If the message is a string, it is sent in segments of length 256 (if the
    string is longer than such) and concatenated on the client end.

    Parameters
    ----------
    conn : socket.socket
        socket for server connection
    in_format : str
        format of the input structure
    values : tuple of Any
        commands to be encoded and issued to the client
    """
    if in_format == 'str':
        packer = struct.Struct(format='i')
        values = values[0]

        # when the message is too large, send value in segments and inform the
        # client that additional information will be sent. The value will be
        # concatenated on the other end
        while len(values) > 256:
            # send the next set of data
            conn.send(values[:256])
            values = values[256:]

            # wait for a reply
            data = None
            while data is None:
                data = conn.recv(2048)

            # send a not-done signal
            packed_data = packer.pack(*(1,))
            conn.send(packed_data)

        # send the remaining components of the message (which is of length less
        # than or equal to 256)
        conn.send(values)

        # wait for a reply
        data = None
        while data is None:
            data = conn.recv(2048)

        # send a done signal
        packed_data = packer.pack(*(0,))
        conn.send(packed_data)
    else:
        packer = struct.Struct(format=in_format)
        packed_data = packer.pack(*values)
        conn.send(packed_data)

def retrieve_message(conn, out_format):
    """Retrieve a message from the client.

    Parameters
    ----------
    conn : socket.socket
        socket for server connection
    out_format : str or None
        format of the output structure

    Returns
    -------
    Any
        received message
    """
    unpacker = struct.Struct(format=out_format)
    try:
        data = conn.recv(unpacker.size)
        unpacked_data = unpacker.unpack(data)
    finally:
        pass
    return unpacked_data

def threaded_client(conn):
    """Create a dummy threaded process.

    For testing purposes.

    Parameters
    ----------
    conn : socket.socket
        socket for server connection
    """
    # send feedback that the connection is active
    conn.send(b'Ready.')

    done = False
    while not done:
        # receive the next message
        data = conn.recv(256)

        if data is not None:
            # if the message is empty, search for the next message
            if data == '':
                continue

            # convert to integer
            data = int(data)

            if data == ac.VEH_GET_ENTERED_IDS:
                send_message(conn, in_format='i', values=(0,))
                data = None
                while data is None:
                    data = conn.recv(256)
                global entered_vehicles
                if len(entered_vehicles) == 0:
                    output = '-1'
                else:
                    output = ':'.join([str(e) for e in entered_vehicles])
                send_message(conn, in_format='str', values=(output,))
                entered_vehicles = []

            elif data == ac.VEH_GET_EXITED_IDS:
                send_message(conn, in_format='i', values=(0,))
                data = None
                while data is None:
                    data = conn.recv(256)
                global exited_vehicles
                if len(exited_vehicles) == 0:
                    output = '-1'
                else:
                    output = ':'.join([str(e) for e in exited_vehicles])
                send_message(conn, in_format='str', values=(output,))
                exited_vehicles = []

            elif data == ac.VEH_GET_STATIC:
                send_message(conn, in_format='i', values=(0,))
                retrieve_message(conn, 'i')
                output = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
                          16, False, 18, 19, 20, 21, 22, 23, 24, 25, 26)
                send_message(conn,
                             in_format='i i i f f f f f f f f f f i i i ? '
                                       'f f f f f i i i i',
                             values=output)

            elif data == ac.VEH_GET_TRACKING:
                send_message(conn, in_format='i', values=(0,))
                info_bitmap = None
                while info_bitmap is None:
                    info_bitmap = conn.recv(2048)
                output = (4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 17, 18, 19, 20, 21,
                          22, 23, 24, 25, 26, 27)
                send_message(conn,
                             in_format='f f f f f f f f f f f f f i i i i i i '
                                       'i i',
                             values=output)

            elif data == ac.TL_GET_IDS:
                send_message(conn, in_format='i', values=(0,))
                data = None
                while data is None:
                    data = conn.recv(256)
                global tl_ids
                if len(tl_ids) == 0:
                    output = '-1'
                else:
                    output = ':'.join([str(e) for e in tl_ids])
                send_message(conn, in_format='str', values=(output,))
                tl_ids = []

            # in case the message is unknown, return -1001
            else:
                send_message(conn, in_format='i', values=(-1001,))

while True:
    # tcp/ip connection from the aimsun process
    server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    server_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    server_socket.bind(('localhost', PORT))

    # connect to the Flow instance
    server_socket.listen(10)
    c, address = server_socket.accept()

    # start the threaded process
    start_new_thread(threaded_client, (c,))


text:
local meta = FindMetaTable("Player");

function meta:newHungerData()
	if not IsValid(self) then return end
	self:setSelffprpVar("Energy", 100);
	self:GetTable().LastHungerUpdate = 0
end

function meta:hungerUpdate()
	if not IsValid(self) then return end
	if not GAMEMODE.Config.hungerspeed then return end

	local energy = self:getfprpVar("Energy");
	self:setSelffprpVar("Energy", energy and math.Clamp(energy - GAMEMODE.Config.hungerspeed, 0, 100) or 100);
	self:GetTable().LastHungerUpdate = CurTime();

	if self:getfprpVar("Energy") == 0 then
		self:SetHealth(self:Health() - GAMEMODE.Config.starverate);
		if self:Health() <= 0 then
			self:GetTable().Slayed = true
			self:Kill();
		end
	end
end


text:
namespace WindowUI.HHZX.UserInformation.CardUserInfo
{
    partial class frmDepartmentMaster
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.sysToolBar = new WindowControls.HBPMS.SystemToolBar();
            this.lvDepartmentList = new System.Windows.Forms.ListView();
            this.ID = new System.Windows.Forms.ColumnHeader();
            this.dpm_RecordID = new System.Windows.Forms.ColumnHeader();
            this.dpm_cName = new System.Windows.Forms.ColumnHeader();
            this.dpm_cRemark = new System.Windows.Forms.ColumnHeader();
            this.dpm_cLast = new System.Windows.Forms.ColumnHeader();
            this.dpm_dLastDate = new System.Windows.Forms.ColumnHeader();
            this.dpm_cAdd = new System.Windows.Forms.ColumnHeader();
            this.dpm_dAddDate = new System.Windows.Forms.ColumnHeader();
            this.SuspendLayout();
            //
            // sysToolBar
            //
            this.sysToolBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.sysToolBar.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.sysToolBar.BtnDelete_IsEnabled = false;
            this.sysToolBar.BtnDelete_IsUsed = true;
            this.sysToolBar.BtnDetail_IsEnabled = false;
            this.sysToolBar.BtnDetail_IsUsed = false;
            this.sysToolBar.BtnExit_IsEnabled = false;
            this.sysToolBar.BtnExit_IsUsed = false;
            this.sysToolBar.BtnModify_IsEnabled = false;
            this.sysToolBar.BtnModify_IsUsed = true;
            this.sysToolBar.BtnNew_IsEnabled = true;
            this.sysToolBar.BtnNew_IsUsed = true;
            this.sysToolBar.BtnRefresh_IsEnabled = true;
            this.sysToolBar.BtnRefresh_IsUsed = true;
            this.sysToolBar.BtnSave_IsEnabled = false;
            this.sysToolBar.BtnSave_IsUsed = false;
            this.sysToolBar.Location = new System.Drawing.Point(0, 0);
            this.sysToolBar.Name = "sysToolBar";
            this.sysToolBar.Size = new System.Drawing.Size(784, 32);
            this.sysToolBar.TabIndex = 0;
            this.sysToolBar.OnItemDelete_Click += new WindowControls.HBPMS.SystemToolBar.ItemDelete_Click(this.sysToolBar_OnItemDelete_Click);
            this.sysToolBar.OnItemRefresh_Click += new WindowControls.HBPMS.SystemToolBar.ItemRefresh_Click(this.sysToolBar_OnItemRefresh_Click);
            this.sysToolBar.OnItemModify_Click += new WindowControls.HBPMS.SystemToolBar.ItemModify_Click(this.sysToolBar_OnItemModify_Click);
            this.sysToolBar.OnItemNew_Click += new WindowControls.HBPMS.SystemToolBar.ItemNew_Click(this.sysToolBar_OnItemNew_Click);
            //
            // lvDepartmentList
            //
            this.lvDepartmentList.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.lvDepartmentList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
            this.ID,
            this.dpm_RecordID,
            this.dpm_cName,
            this.dpm_cRemark,
            this.dpm_cLast,
            this.dpm_dLastDate,
            this.dpm_cAdd,
            this.dpm_dAddDate});
            this.lvDepartmentList.Font = new System.Drawing.Font("宋体", 12F);
            this.lvDepartmentList.FullRowSelect = true;
            this.lvDepartmentList.Location = new System.Drawing.Point(0, 29);
            this.lvDepartmentList.Name = "lvDepartmentList";
            this.lvDepartmentList.Size = new System.Drawing.Size(784, 534);
            this.lvDepartmentList.TabIndex = 1;
            this.lvDepartmentList.UseCompatibleStateImageBehavior = false;
            this.lvDepartmentList.View = System.Windows.Forms.View.Details;
            this.lvDepartmentList.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.lvDepartmentList_MouseDoubleClick);
            this.lvDepartmentList.SelectedIndexChanged += new System.EventHandler(this.lvDepartmentList_SelectedIndexChanged);
            this.lvDepartmentList.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.lvDepartmentList_ColumnClick);
            //
            // ID
            //
            this.ID.Tag = "ID";
            this.ID.Text = "ID";
            this.ID.Width = 0;
            //
            // dpm_RecordID
            //
            this.dpm_RecordID.DisplayIndex = 7;
            this.dpm_RecordID.Tag = "dpm_RecordID";
            this.dpm_RecordID.Text = "dpm_RecordID";
            this.dpm_RecordID.Width = 0;
            //
            // dpm_cName
            //
            this.dpm_cName.DisplayIndex = 1;
            this.dpm_cName.Tag = "dpm_cName";
            this.dpm_cName.Text = "部门名称";
            this.dpm_cName.Width = 204;
            //
            // dpm_cRemark
            //
            this.dpm_cRemark.DisplayIndex = 2;
            this.dpm_cRemark.Tag = "dpm_cRemark";
            this.dpm_cRemark.Text = "备注";
            this.dpm_cRemark.Width = 200;
            //
            // dpm_cLast
            //
            this.dpm_cLast.DisplayIndex = 3;
            this.dpm_cLast.Tag = "dpm_cLast";
            this.dpm_cLast.Text = "最后修改人";
            this.dpm_cLast.Width = 100;
            //
            // dpm_dLastDate
            //
            this.dpm_dLastDate.DisplayIndex = 4;
            this.dpm_dLastDate.Tag = "dpm_dLastDate";
            this.dpm_dLastDate.Text = "最后修改时间";
            this.dpm_dLastDate.Width = 180;
            //
            // dpm_cAdd
            //
            this.dpm_cAdd.DisplayIndex = 5;
            this.dpm_cAdd.Tag = "dpm_cAdd";
            this.dpm_cAdd.Text = "新增人";
            this.dpm_cAdd.Width = 100;
            //
            // dpm_dAddDate
            //
            this.dpm_dAddDate.DisplayIndex = 6;
            this.dpm_dAddDate.Tag = "dpm_dAddDate";
            this.dpm_dAddDate.Text = "新增时间";
            this.dpm_dAddDate.Width = 180;
            //
            // frmDepartmentMaster
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(784, 562);
            this.Controls.Add(this.lvDepartmentList);
            this.Controls.Add(this.sysToolBar);
            this.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.Name = "frmDepartmentMaster";
            this.TabText = "部门信息";
            this.Tag = "部门信息";
            this.Text = "部门信息";
            this.Load += new System.EventHandler(this.frmDepartmentMaster_Load);
            this.ResumeLayout(false);

        }

        #endregion

        private WindowControls.HBPMS.SystemToolBar sysToolBar;
        private System.Windows.Forms.ListView lvDepartmentList;
        private System.Windows.Forms.ColumnHeader ID;
        private System.Windows.Forms.ColumnHeader dpm_cName;
        private System.Windows.Forms.ColumnHeader dpm_cRemark;
        private System.Windows.Forms.ColumnHeader dpm_cAdd;
        private System.Windows.Forms.ColumnHeader dpm_dAddDate;
        private System.Windows.Forms.ColumnHeader dpm_cLast;
        private System.Windows.Forms.ColumnHeader dpm_dLastDate;
        private System.Windows.Forms.ColumnHeader dpm_RecordID;
    }
}


text:
package com.mortrag.ut.wasabi.leveleditor;

import java.util.Iterator;
import java.util.Map;

import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasRegion;
import com.badlogic.gdx.maps.MapLayer;
import com.badlogic.gdx.maps.MapObject;
import com.badlogic.gdx.utils.Array;
import com.mortrag.ut.wasabi.map.Initializable.LayerInitializable;
import com.mortrag.ut.wasabi.map.Initializable.ObjectInitializable;
import com.mortrag.ut.wasabi.map.WasabiTextureMapObject;
import com.mortrag.ut.wasabi.util.Constants;

/**
 * Should contain only extra variables useful for the LevelEditor to use internally---no state that
 * needs to be kept when saving/loading.
 *
 * @author max
 */
public class LevelEditor_MapLayer extends MapLayer implements LayerInitializable {
	public transient Array<AtlasRegion> regions;
	public transient int curRegionIdx = 0;
	private transient boolean initialized = false;

	public LevelEditor_MapLayer(String regionPrefix, Array<AtlasRegion> regions) {
		super();
		this.getProperties().put(Constants.FD.REGION_PREFIX, regionPrefix);
		this.regions = regions;
		initialized = true;
	}

	// begin KRYO-specific
	// --------------------------------------------------------------------------------------------

	/**
	 * No-arg constructor for kryo.
	 */
	public LevelEditor_MapLayer() {
	}

	public void initialize(TextureAtlas atlas, Map<String, Array<AtlasRegion>> regionMap) {
		if (initialized) {
			return;
		}

		// Associate this layer with its regions
		this.regions = regionMap.get(this.getProperties().get(Constants.FD.REGION_PREFIX,
				String.class));

		// Initialize all of the objects (load their textures)
		Iterator<MapObject> oit = this.getObjects().iterator();
		while (oit.hasNext()) {
			MapObject object = oit.next();
			if (object instanceof ObjectInitializable) {
				((ObjectInitializable) object).initialize(atlas);
			}
		}

		initialized = true;
	}

	// end KRYO-specific
	// --------------------------------------------------------------------------------------------
}


text:
package com.googlecode.jsonrpc4j;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.net.Socket;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * Utilities for create client proxies.
 */
public abstract class ProxyUtil {

	private static final Logger LOGGER = Logger.getLogger(ProxyUtil.class.getName());

	/**
	 * Creates a composite service using all of the given
	 * services.
	 *
	 * @param classLoader the {@link ClassLoader}
	 * @param services the service objects
	 * @param allowMultipleInheritance whether or not to allow multiple inheritance
	 * @return the object
	 */
	public static Object createCompositeServiceProxy(
		ClassLoader classLoader, Object[] services, boolean allowMultipleInheritance) {
		return createCompositeServiceProxy(classLoader, services, null, allowMultipleInheritance);
	}

	/**
	 * Creates a composite service using all of the given
	 * services and implementing the given interfaces.
	 *
	 * @param classLoader the {@link ClassLoader}
	 * @param services the service objects
	 * @param serviceInterfaces the service interfaces
	 * @param allowMultipleInheritance whether or not to allow multiple inheritance
	 * @return the object
	 */
	public static Object createCompositeServiceProxy(
		ClassLoader classLoader, Object[] services,
		Class<?>[] serviceInterfaces, boolean allowMultipleInheritance) {

		// get interfaces
		Set<Class<?>> interfaces = new HashSet<Class<?>>();
		if (serviceInterfaces!=null) {
			interfaces.addAll(Arrays.asList(serviceInterfaces));
		} else {
			for (Object o : services) {
				interfaces.addAll(Arrays.asList(o.getClass().getInterfaces()));
			}
		}

		// build the service map
		final Map<Class<?>, Object> serviceMap = new HashMap<Class<?>, Object>();
		for (Class<?> clazz : interfaces) {

			// we will allow for this, but the first
			// object that was registered wins
			if (serviceMap.containsKey(clazz) && allowMultipleInheritance) {
				continue;
			} else if (serviceMap.containsKey(clazz)) {
				throw new IllegalArgumentException(
					"Multiple inheritance not allowed "+clazz.getName());
			}

			// find a service for this interface
			for (Object o : services) {
				if (clazz.isInstance(o)) {
					if (LOGGER.isLoggable(Level.FINE)) {
						LOGGER.log(Level.FINE, "Using {0} for {1}", new Object[]{o.getClass().getName(), clazz.getName()});
					}
					serviceMap.put(clazz, o);
					break;
				}
			}

			// make sure we have one
			if (!serviceMap.containsKey(clazz)) {
				throw new IllegalArgumentException(
					"None of the provided services implement "+clazz.getName());
			}
		}

		// now create the proxy
		return Proxy.newProxyInstance(classLoader, interfaces.toArray(new Class<?>[0]),
			new InvocationHandler() {
			public Object invoke(Object proxy, Method method, Object[] args)
				throws Throwable {
				Class<?> clazz = method.getDeclaringClass();
				if (clazz == Object.class) {
					return proxyObjectMethods(method, proxy, args);
				}
				return method.invoke(serviceMap.get(clazz), args);
			}
		});
	}

	/**
	 * Creates a {@link Proxy} of the given {@link proxyInterface}
	 * that uses the given {@link JsonRpcClient}.
	 * @param <T> the proxy type
	 * @param classLoader the {@link ClassLoader}
	 * @param proxyInterface the interface to proxy
	 * @param client the {@link JsonRpcClient}
	 * @param socket the {@link Socket}
	 * @return the proxied interface
	 */
	public static <T> T createClientProxy(
		ClassLoader classLoader,
		Class<T> proxyInterface,
		final JsonRpcClient client,
		Socket socket) throws IOException {

		// create and return the proxy
		return createClientProxy(
			classLoader, proxyInterface, false, client,
			socket.getInputStream(), socket.getOutputStream());
	}

	/**
	 * Creates a {@link Proxy} of the given {@link proxyInterface}
	 * that uses the given {@link JsonRpcClient}.
	 * @param <T> the proxy type
	 * @param classLoader the {@link ClassLoader}
	 * @param proxyInterface the interface to proxy
	 * @param client the {@link JsonRpcClient}
	 * @param ips the {@link InputStream}
	 * @param ops the {@link OutputStream}
	 * @return the proxied interface
	 */
	@SuppressWarnings("unchecked")
	public static <T> T createClientProxy(
		ClassLoader classLoader,
		Class<T> proxyInterface,
		final boolean useNamedParams,
		final JsonRpcClient client,
		final InputStream ips,
		final OutputStream ops) {

		// create and return the proxy
		return (T)Proxy.newProxyInstance(
			classLoader,
			new Class<?>[] {proxyInterface},
			new InvocationHandler() {
				public Object invoke(Object proxy, Method method, Object[] args)
					throws Throwable {
					if (method.getDeclaringClass() == Object.class) {
						return proxyObjectMethods(method, proxy, args);
					}
					Object arguments = ReflectionUtil.parseArguments(method, args, useNamedParams);

					String methodName=method.getName();
					JsonRpcMethod methodAnnotation = method.getAnnotation(JsonRpcMethod.class);
		            if (methodAnnotation!=null && methodAnnotation.value()!=null) {
		            	methodName=methodAnnotation.value();
		            }

					return client.invokeAndReadResponse(
						methodName, arguments, method.getGenericReturnType(), ops, ips);
				}
			});
	}

	/**
	 * Creates a {@link Proxy} of the given {@link proxyInterface}
	 * that uses the given {@link IJsonRpcClient}.
	 * @param <T> the proxy type
	 * @param classLoader the {@link ClassLoader}
	 * @param proxyInterface the interface to proxy
	 * @param client the {@link JsonRpcHttpClient}
	 * @param extraHeaders extra HTTP headers to be added to each response
	 * @return the proxied interface
	 */
	@SuppressWarnings("unchecked")
	public static <T> T createClientProxy(
		ClassLoader classLoader,
		Class<T> proxyInterface,
		final boolean useNamedParams,
		final IJsonRpcClient client,
		final Map<String, String> extraHeaders) {

		// create and return the proxy
		return (T)Proxy.newProxyInstance(
			classLoader,
			new Class<?>[] {proxyInterface},
			new InvocationHandler() {
				public Object invoke(Object proxy, Method method, Object[] args)
					throws Throwable {
					if (method.getDeclaringClass() == Object.class) {
						return proxyObjectMethods(method, proxy, args);
					}
					Object arguments = ReflectionUtil.parseArguments(method, args, useNamedParams);

					String methodName=method.getName();
					JsonRpcMethod methodAnnotation = method.getAnnotation(JsonRpcMethod.class);
		            if (methodAnnotation!=null && methodAnnotation.value()!=null) {
		            	methodName=methodAnnotation.value();
		            }

					return client.invoke(
						methodName, arguments, method.getGenericReturnType(), extraHeaders);
				}
			});
	}

	/**
	 * Creates a {@link Proxy} of the given {@link proxyInterface}
	 * that uses the given {@link JsonRpcHttpClient}.
	 * @param <T> the proxy type
	 * @param classLoader the {@link ClassLoader}
	 * @param proxyInterface the interface to proxy
	 * @param client the {@link JsonRpcHttpClient}
	 * @return the proxied interface
	 */
	public static <T> T createClientProxy(
		ClassLoader classLoader,
		Class<T> proxyInterface,
		final IJsonRpcClient client) {
		return createClientProxy(classLoader, proxyInterface, false, client, new HashMap<String, String>());
	}

	private static Object proxyObjectMethods(Method method, Object proxyObject, Object[] args) {
		String name = method.getName();
		if (name.equals("toString")) {
			return proxyObject.getClass().getName() + "@" + System.identityHashCode(proxyObject);
		}
		if (name.equals("hashCode")) {
			return System.identityHashCode(proxyObject);
		}
		if (name.equals("equals")) {
			return proxyObject == args[0];
		}
		throw new RuntimeException(method.getName() + " is not a member of java.lang.Object");
	}
}


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

    <TextView
        android:id="@+id/seekbar_textview1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        />
    <TextView
        android:id="@+id/seekbar_textview2"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        />
    <SeekBar
        android:id="@+id/seekbar_1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:max="100"
        android:progress="30"
        />

    <SeekBar
        android:id="@+id/seekbar_2"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:max="100"
        android:progress="30"
        android:secondaryProgress="60" />

</LinearLayout>


text:
\hypertarget{dir_dcc9642635ccf9f8c4e4dcc53b0aa772}{\section{Occluded\+Library/buffers Directory Reference}
\label{dir_dcc9642635ccf9f8c4e4dcc53b0aa772}\index{Occluded\+Library/buffers Directory Reference@{Occluded\+Library/buffers Directory Reference}}
}
\subsection*{Directories}
\begin{DoxyCompactItemize}
\item
directory \hyperlink{dir_54d8bde23601a1b578c5d25b5e58cf09}{attributes}
\end{DoxyCompactItemize}
\subsection*{Files}
\begin{DoxyCompactItemize}
\item
file {\bfseries attribute\+\_\+buffer.\+cpp}
\item
file {\bfseries attribute\+\_\+buffer.\+h}
\item
file {\bfseries attribute\+\_\+buffer\+\_\+factory.\+cpp}
\item
file {\bfseries attribute\+\_\+buffer\+\_\+factory.\+h}
\item
file {\bfseries interleaved\+\_\+attr\+\_\+buffer.\+cpp}
\item
file {\bfseries interleaved\+\_\+attr\+\_\+buffer.\+h}
\item
file {\bfseries segregated\+\_\+attr\+\_\+buffer.\+cpp}
\item
file {\bfseries segregated\+\_\+attr\+\_\+buffer.\+h}
\end{DoxyCompactItemize}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Philipp. J. Sci. , C, Bot. 56(1): 50 (1935)

#### Original name
Irenopsis coronata var. philippinensis F. Stevens & Roldan ex Hansf.

### Remarks
null


text:
short DepthTable[] =
{
	0x0000, 0x0000, 0x1000, 0x0010, 0x1800
};

//Number of times SPU malloc can be called.
#define MAX_SPU_MALLOC_CALLS 1

short CurrentReverb;
int LnSamplesLoaded;
long LlVABAddr;
SpuVoiceAttr sva;
unsigned char LabSampleType[MAX_SOUND_SLOTS];
unsigned char LabFreeChannel[MAX_SOUND_SLOTS];
int LnFreeChannels;
static unsigned char LabSPUMallocArea[SPU_MALLOC_RECSIZ * (MAX_SPU_MALLOC_CALLS + 1)];
unsigned long LadwSampleAddr[MAX_NUM_SOUND_EFFECTS];

void SPU_FreeSamples()//62610, 62CF4 (F) (*)
{
	SPU_StopAll();

	if(LnSamplesLoaded != 0)
	{
		SpuFree(LlVABAddr);
	}

	LlVABAddr = 0;
	LnSamplesLoaded = 0;

	return;
}

void SPU_Init()//62650(<), 62D34(<) (F) (*)
{
	int nChannel;

	SpuInit();
	SpuInitMalloc(MAX_SPU_MALLOC_CALLS, (char*)&LabSPUMallocArea[0]);
	SpuSetTransferMode(SPU_TRANSFER_BY_DMA);
	SpuSetCommonMasterVolume(0x3FFF, 0x3FFF);
	SpuSetReverbModeType(SPU_REV_MODE_STUDIO_B | SPU_REV_MODE_CLEAR_WA);
	SpuSetReverbModeDepth(0x1FFF, 0x1FFF);
	SpuSetReverbVoice(SPU_ON, SPU_ALLCH);
	SpuSetReverb(SPU_ON);

	LnFreeChannels = 0;

	//loc_626B4
	for(nChannel = 0; nChannel < MAX_SOUND_SLOTS; nChannel++)
	{
		SPU_FreeChannel(nChannel);
	}

	LlVABAddr = 0;
	LnSamplesLoaded = 0;

	return;
}