text:
package org.jetbrains.plugins.javaFX.fxml.refs;

import com.intellij.lang.ASTNode;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiReference;
import com.intellij.psi.PsiReferenceProvider;
import com.intellij.psi.xml.XmlProcessingInstruction;
import com.intellij.psi.xml.XmlTokenType;
import com.intellij.util.ArrayUtil;
import com.intellij.util.ProcessingContext;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.plugins.javaFX.fxml.JavaFxPsiUtil;

/**
* User: anna
*/
class ImportReferenceProvider extends PsiReferenceProvider {

  @NotNull
  @Override
  public PsiReference[] getReferencesByElement(@NotNull PsiElement element, @NotNull ProcessingContext context) {
    if (element instanceof XmlProcessingInstruction) {
      final ASTNode importNode = element.getNode().findChildByType(XmlTokenType.XML_TAG_CHARACTERS);
      if (importNode != null) {
        final PsiElement importInstr = importNode.getPsi();
        final String instructionTarget = JavaFxPsiUtil.getInstructionTarget("import", (XmlProcessingInstruction)element);
        if (instructionTarget != null && instructionTarget.equals(importInstr.getText())) {
          final PsiReference[] references =
            FxmlReferencesContributor.CLASS_REFERENCE_PROVIDER.getReferencesByString(instructionTarget, element, importInstr.getStartOffsetInParent());
          if (instructionTarget.endsWith(".*")) {
            return ArrayUtil.remove(references, references.length - 1);
          }
          else {
            return references;
          }
        }
      }
    }
    return PsiReference.EMPTY_ARRAY;
  }
}

redpajama_set_name: RedPajamaGithub


text:
- First assignment in the curriculum for the second half of NSS.
- Use Ionic and Angular to develop a weather app.


text:
@interface GVUserTableViewController : PFQueryTableViewController
@property (assign,nonatomic) int displayMode;
@end


text:
#include "Logger.h"

#include <cstdio>
#include <cstdarg>
#include "flann.h"
#include <sstream>

using namespace std;

Logger logger;

void log_params(int level, Params p)
{
    Params::iterator it;
    logger.log(level, "{ ");
    bool first = true;
    for (it=p.begin(); it!=p.end(); ++it) {
        if (!first) {
            logger.info(", ");
        }
        first = false;
        logger.log(level, "%s : ",it->first.c_str());
        logger.log(level, "%s",(it->second).toString().c_str());
    }
    logger.log(level, " }");
}

int Logger::log(int level, const char* fmt, ...)
{
  (void) level;
    if (level > logLevel ) return -1;

    int ret;
    va_list arglist;
    va_start(arglist, fmt);
    ret = vfprintf(stream, fmt, arglist);
    va_end(arglist);

    return ret;
}

int Logger::log(int level, const char* fmt, va_list arglist)
{
  (void)level;
    if (level > logLevel ) return -1;

    int ret;
    ret = vfprintf(stream, fmt, arglist);

    return ret;
}

#define LOG_METHOD(NAME,LEVEL) \
    int Logger::NAME(const char* fmt, ...) \
    { \
        int ret; \
        va_list ap; \
        va_start(ap, fmt); \
        ret = log(LEVEL, fmt, ap); \
        va_end(ap); \
        return ret; \
    }

LOG_METHOD(fatal, LOG_FATAL)
LOG_METHOD(error, LOG_ERROR)
LOG_METHOD(warn, LOG_WARN)
LOG_METHOD(info, LOG_INFO)


text:
package com.baidubce.services.iothisk.model;

/**
 * Possible status of batch create status.
 */
public enum JobStatus {
    Processing,
    PartialSucceed,
    Succeed,
    Failed
}


text:
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// 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.
// ----------------------------------------------------------------------------------
namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation
{
    /// <summary>
    ///     Allows an assembly to register services with the IoC container.
    /// </summary>
    internal interface IServiceLocationRegistrar : IRegisteringService
    {
    }
}


text:
package sbql4j8.com.sun.tools.javac.sym;

import sbql4j8.com.sun.tools.javac.api.JavacTaskImpl;
import sbql4j8.com.sun.tools.javac.code.Kinds;
import sbql4j8.com.sun.tools.javac.code.Scope;
import sbql4j8.com.sun.tools.javac.code.Symbol.*;
import sbql4j8.com.sun.tools.javac.code.Symbol;
import sbql4j8.com.sun.tools.javac.code.Attribute;
import sbql4j8.com.sun.tools.javac.code.Symtab;
import sbql4j8.com.sun.tools.javac.code.Type;
import sbql4j8.com.sun.tools.javac.code.Types;
import sbql4j8.com.sun.tools.javac.jvm.ClassWriter;
import sbql4j8.com.sun.tools.javac.jvm.Pool;
import sbql4j8.com.sun.tools.javac.processing.JavacProcessingEnvironment;
import sbql4j8.com.sun.tools.javac.util.List;
import sbql4j8.com.sun.tools.javac.util.Names;
import sbql4j8.com.sun.tools.javac.util.Pair;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.Map;
import java.util.ResourceBundle;
import java.util.Set;

import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.annotation.processing.SupportedOptions;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.ElementKind;
import javax.lang.model.element.TypeElement;
import javax.tools.Diagnostic;
import javax.tools.JavaCompiler;
import javax.tools.JavaFileManager.Location;
import javax.tools.JavaFileObject;
import static javax.tools.JavaFileObject.Kind.CLASS;
import javax.tools.StandardJavaFileManager;
import javax.tools.StandardLocation;
import javax.tools.ToolProvider;

/**
 * Used to generate a "symbol file" representing rt.jar that only
 * includes supported or legacy proprietary API.  Valid annotation
 * processor options:
 *
 *

 *
sbql4j8.com.sun.tools.javac.sym.Jar

 *
Specifies the location of rt.jar.

 *
sbql4j8.com.sun.tools.javac.sym.Dest

 *
Specifies the destination directory.

 *

 *
 *
This is NOT part of any supported API.
 * If you write code that depends on this, you do so at your own
 * risk.  This code and its internal interfaces are subject to change
 * or deletion without notice.

 *
 * @author Peter von der Ah\u00e9
 */
@SupportedOptions({
    "sbql4j8.com.sun.tools.javac.sym.Jar",
    "sbql4j8.com.sun.tools.javac.sym.Dest",
    "sbql4j8.com.sun.tools.javac.sym.Profiles"})
@SupportedAnnotationTypes("*")
public class CreateSymbols extends AbstractProcessor {

    static Set<String> getLegacyPackages() {
        ResourceBundle legacyBundle
            = ResourceBundle.getBundle("sbql4j8.com.sun.tools.javac.resources.legacy");
        Set<String> keys = new HashSet<String>();
        for (Enumeration<String> e = legacyBundle.getKeys(); e.hasMoreElements(); )
            keys.add(e.nextElement());
        return keys;
    }

    public boolean process(Set<? extends TypeElement> tes, RoundEnvironment renv) {
        try {
            if (renv.processingOver())
                createSymbols();
        } catch (IOException e) {
            CharSequence msg = e.getLocalizedMessage();
            if (msg == null)
                msg = e.toString();
            processingEnv.getMessager()
                .printMessage(Diagnostic.Kind.ERROR, msg);
        } catch (Throwable t) {
            t.printStackTrace();
            Throwable cause = t.getCause();
            if (cause == null)
                cause = t;
            CharSequence msg = cause.getLocalizedMessage();
            if (msg == null)
                msg = cause.toString();
            processingEnv.getMessager()
                .printMessage(Diagnostic.Kind.ERROR, msg);
        }
        return true;
    }

    void createSymbols() throws IOException {
        Set<String> legacy = getLegacyPackages();
        Set<String> legacyProprietary = getLegacyPackages();
        Set<String> documented = new HashSet<String>();
        Set<PackageSymbol> packages =
            ((JavacProcessingEnvironment)processingEnv).getSpecifiedPackages();
        Map<String,String> pOptions = processingEnv.getOptions();
        String jarName = pOptions.get("sbql4j8.com.sun.tools.javac.sym.Jar");
        if (jarName == null)
            throw new RuntimeException("Must use -Acom.sun.tools.javac.sym.Jar=LOCATION_OF_JAR");
        String destName = pOptions.get("sbql4j8.com.sun.tools.javac.sym.Dest");
        if (destName == null)
            throw new RuntimeException("Must use -Acom.sun.tools.javac.sym.Dest=LOCATION_OF_JAR");
        String profileSpec=pOptions.get("sbql4j8.com.sun.tools.javac.sym.Profiles");
        if (profileSpec == null)
            throw new RuntimeException("Must use -Acom.sun.tools.javac.sym.Profiles=PROFILES_SPEC");
        Profiles profiles = Profiles.read(new File(profileSpec));

        for (PackageSymbol psym : packages) {
            String name = psym.getQualifiedName().toString();
            legacyProprietary.remove(name);
            documented.add(name);
        }

        JavaCompiler tool = ToolProvider.getSystemJavaCompiler();
        StandardJavaFileManager fm = tool.getStandardFileManager(null, null, null);
        Location jarLocation = StandardLocation.locationFor(jarName);
        File jarFile = new File(jarName);
        fm.setLocation(jarLocation, List.of(jarFile));
        fm.setLocation(StandardLocation.CLASS_PATH, List.<File>nil());
        fm.setLocation(StandardLocation.SOURCE_PATH, List.<File>nil());
        {
            ArrayList<File> bootClassPath = new ArrayList<File>();
            bootClassPath.add(jarFile);
            for (File path : fm.getLocation(StandardLocation.PLATFORM_CLASS_PATH)) {
                if (!new File(path.getName()).equals(new File("rt.jar")))
                    bootClassPath.add(path);
            }
            System.err.println("Using boot class path = " + bootClassPath);
            fm.setLocation(StandardLocation.PLATFORM_CLASS_PATH, bootClassPath);
        }
        // System.out.println(fm.getLocation(StandardLocation.PLATFORM_CLASS_PATH));
        File destDir = new File(destName);
        if (!destDir.exists())
            if (!destDir.mkdirs())
                throw new RuntimeException("Could not create " + destDir);
        fm.setLocation(StandardLocation.CLASS_OUTPUT, List.of(destDir));
        Set<String> hiddenPackages = new HashSet<String>();
        Set<String> crisp = new HashSet<String>();
        List<String> options = List.of("-XDdev");
        // options = options.prepend("-doe");
        // options = options.prepend("-verbose");
        JavacTaskImpl task = (JavacTaskImpl)
            tool.getTask(null, fm, null, options, null, null);
        sbql4j8.com.sun.tools.javac.main.JavaCompiler compiler =
            sbql4j8.com.sun.tools.javac.main.JavaCompiler.instance(task.getContext());
        ClassWriter writer = ClassWriter.instance(task.getContext());
        Symtab syms = Symtab.instance(task.getContext());
        Names names = Names.instance(task.getContext());
        Attribute.Compound proprietaryAnno =
            new Attribute.Compound(syms.proprietaryType,
                                   List.<Pair<Symbol.MethodSymbol,Attribute>>nil());
        Attribute.Compound[] profileAnnos = new Attribute.Compound[profiles.getProfileCount() + 1];
        Symbol.MethodSymbol profileValue = (MethodSymbol) syms.profileType.tsym.members().lookup(names.value).sym;
        for (int i = 1; i < profileAnnos.length; i++) {
            profileAnnos[i] = new Attribute.Compound(syms.profileType,
                    List.<Pair<Symbol.MethodSymbol, Attribute>>of(
                    new Pair<Symbol.MethodSymbol, Attribute>(profileValue, new Attribute.Constant(syms.intType, i))));
        }

        Type.moreInfo = true;
        Types types = Types.instance(task.getContext());
        Pool pool = new Pool(types);
        for (JavaFileObject file : fm.list(jarLocation, "", EnumSet.of(CLASS), true)) {
            String className = fm.inferBinaryName(jarLocation, file);
            int index = className.lastIndexOf('.');
            String pckName = index == -1 ? "" : className.substring(0, index);
            boolean addLegacyAnnotation = false;
            if (documented.contains(pckName)) {
                if (!legacy.contains(pckName))
                    crisp.add(pckName);
                // System.out.println("Documented: " + className);
            } else if (legacyProprietary.contains(pckName)) {
                addLegacyAnnotation = true;
                // System.out.println("Legacy proprietary: " + className);
            } else {
                // System.out.println("Hidden " + className);
                hiddenPackages.add(pckName);
                continue;
            }
            TypeSymbol sym = (TypeSymbol)compiler.resolveIdent(className);
            if (sym.kind != Kinds.TYP) {
                if (className.indexOf('$') < 0) {
                    System.err.println("Ignoring (other) " + className + " : " + sym);
                    System.err.println("   " + sym.getClass().getSimpleName() + " " + sym.type);
                }
                continue;
            }
            sym.complete();
            if (sym.getEnclosingElement().getKind() != ElementKind.PACKAGE) {
                System.err.println("Ignoring (bad) " + sym.getQualifiedName());
                continue;
            }
            ClassSymbol cs = (ClassSymbol) sym;
            if (addLegacyAnnotation) {
                cs.prependAttributes(List.of(proprietaryAnno));
            }
            int p = profiles.getProfile(cs.fullname.toString().replace(".", "/"));
            if (0 < p && p < profileAnnos.length)
                cs.prependAttributes(List.of(profileAnnos[p]));
            writeClass(pool, cs, writer);
        }

        if (false) {
            for (String pckName : crisp)
                System.out.println("Crisp: " + pckName);
            for (String pckName : hiddenPackages)
                System.out.println("Hidden: " + pckName);
            for (String pckName : legacyProprietary)
                System.out.println("Legacy proprietary: " + pckName);
            for (String pckName : documented)
                System.out.println("Documented: " + pckName);
        }
    }

    void writeClass(final Pool pool, final ClassSymbol cs, final ClassWriter writer)
        throws IOException
    {
        try {
            pool.reset();
            cs.pool = pool;
            writer.writeClass(cs);
            for (Scope.Entry e = cs.members().elems; e != null; e = e.sibling) {
                if (e.sym.kind == Kinds.TYP) {
                    ClassSymbol nestedClass = (ClassSymbol)e.sym;
                    nestedClass.complete();
                    writeClass(pool, nestedClass, writer);
                }
            }
        } catch (ClassWriter.StringOverflow ex) {
            throw new RuntimeException(ex);
        } catch (ClassWriter.PoolOverflow ex) {
            throw new RuntimeException(ex);
        }
    }

    public SourceVersion getSupportedSourceVersion() {
        return SourceVersion.latest();
    }

    // used for debugging
    public static void main(String... args) {
        String rt_jar = args[0];
        String dest = args[1];
        args = new String[] {
            "-Xbootclasspath:" + rt_jar,
            "-XDprocess.packages",
            "-proc:only",
            "-processor",
            "sbql4j8.com.sun.tools.javac.sym.CreateSymbols",
            "-Acom.sun.tools.javac.sym.Jar=" + rt_jar,
            "-Acom.sun.tools.javac.sym.Dest=" + dest,
            // <editor-fold defaultstate="collapsed">
            "java.applet",
            "java.awt",
            "java.awt.color",
            "java.awt.datatransfer",
            "java.awt.dnd",
            "java.awt.event",
            "java.awt.font",
            "java.awt.geom",
            "java.awt.im",
            "java.awt.im.spi",
            "java.awt.image",
            "java.awt.image.renderable",
            "java.awt.print",
            "java.beans",
            "java.beans.beancontext",
            "java.io",
            "java.lang",
            "java.lang.annotation",
            "java.lang.instrument",
            "java.lang.management",
            "java.lang.ref",
            "java.lang.reflect",
            "java.math",
            "java.net",
            "java.nio",
            "java.nio.channels",
            "java.nio.channels.spi",
            "java.nio.charset",
            "java.nio.charset.spi",
            "java.rmi",
            "java.rmi.activation",
            "java.rmi.dgc",
            "java.rmi.registry",
            "java.rmi.server",
            "java.security",
            "java.security.acl",
            "java.security.cert",
            "java.security.interfaces",
            "java.security.spec",
            "java.sql",
            "java.text",
            "java.text.spi",
            "java.util",
            "java.util.concurrent",
            "java.util.concurrent.atomic",
            "java.util.concurrent.locks",
            "java.util.jar",
            "java.util.logging",
            "java.util.prefs",
            "java.util.regex",
            "java.util.spi",
            "java.util.zip",
            "sbql4j8.javax.accessibility",
            "sbql4j8.javax.activation",
            "sbql4j8.javax.activity",
            "sbql4j8.javax.annotation",
            "sbql4j8.javax.annotation.processing",
            "sbql4j8.javax.crypto",
            "sbql4j8.javax.crypto.interfaces",
            "sbql4j8.javax.crypto.spec",
            "sbql4j8.javax.imageio",
            "sbql4j8.javax.imageio.event",
            "sbql4j8.javax.imageio.metadata",
            "sbql4j8.javax.imageio.plugins.jpeg",
            "sbql4j8.javax.imageio.plugins.bmp",
            "sbql4j8.javax.imageio.spi",
            "sbql4j8.javax.imageio.stream",
            "sbql4j8.javax.jws",
            "sbql4j8.javax.jws.soap",
            "sbql4j8.javax.lang.model",
            "sbql4j8.javax.lang.model.element",
            "sbql4j8.javax.lang.model.type",
            "sbql4j8.javax.lang.model.util",
            "sbql4j8.javax.management",
            "sbql4j8.javax.management.loading",
            "sbql4j8.javax.management.monitor",
            "sbql4j8.javax.management.relation",
            "sbql4j8.javax.management.openmbean",
            "sbql4j8.javax.management.timer",
            "sbql4j8.javax.management.modelmbean",
            "sbql4j8.javax.management.remote",
            "sbql4j8.javax.management.remote.rmi",
            "sbql4j8.javax.naming",
            "sbql4j8.javax.naming.directory",
            "sbql4j8.javax.naming.event",
            "sbql4j8.javax.naming.ldap",
            "sbql4j8.javax.naming.spi",
            "sbql4j8.javax.net",
            "sbql4j8.javax.net.ssl",
            "sbql4j8.javax.print",
            "sbql4j8.javax.print.attribute",
            "sbql4j8.javax.print.attribute.standard",
            "sbql4j8.javax.print.event",
            "sbql4j8.javax.rmi",
            "sbql4j8.javax.rmi.CORBA",
            "sbql4j8.javax.rmi.ssl",
            "sbql4j8.javax.script",
            "sbql4j8.javax.security.auth",
            "sbql4j8.javax.security.auth.callback",
            "sbql4j8.javax.security.auth.kerberos",
            "sbql4j8.javax.security.auth.login",
            "sbql4j8.javax.security.auth.spi",
            "sbql4j8.javax.security.auth.x500",
            "sbql4j8.javax.security.cert",
            "sbql4j8.javax.security.sasl",
            "sbql4j8.javax.sound.sampled",
            "sbql4j8.javax.sound.sampled.spi",
            "sbql4j8.javax.sound.midi",
            "sbql4j8.javax.sound.midi.spi",
            "sbql4j8.javax.sql",
            "sbql4j8.javax.sql.rowset",
            "sbql4j8.javax.sql.rowset.serial",
            "sbql4j8.javax.sql.rowset.spi",
            "sbql4j8.javax.swing",
            "sbql4j8.javax.swing.border",
            "sbql4j8.javax.swing.colorchooser",
            "sbql4j8.javax.swing.filechooser",
            "sbql4j8.javax.swing.event",
            "sbql4j8.javax.swing.table",
            "sbql4j8.javax.swing.text",
            "sbql4j8.javax.swing.text.html",
            "sbql4j8.javax.swing.text.html.parser",
            "sbql4j8.javax.swing.text.rtf",
            "sbql4j8.javax.swing.tree",
            "sbql4j8.javax.swing.undo",
            "sbql4j8.javax.swing.plaf",
            "sbql4j8.javax.swing.plaf.basic",
            "sbql4j8.javax.swing.plaf.metal",
            "sbql4j8.javax.swing.plaf.multi",
            "sbql4j8.javax.swing.plaf.synth",
            "sbql4j8.javax.tools",
            "sbql4j8.javax.transaction",
            "sbql4j8.javax.transaction.xa",
            "sbql4j8.javax.xml.parsers",
            "sbql4j8.javax.xml.bind",
            "sbql4j8.javax.xml.bind.annotation",
            "sbql4j8.javax.xml.bind.annotation.adapters",
            "sbql4j8.javax.xml.bind.attachment",
            "sbql4j8.javax.xml.bind.helpers",
            "sbql4j8.javax.xml.bind.util",
            "sbql4j8.javax.xml.soap",
            "sbql4j8.javax.xml.ws",
            "sbql4j8.javax.xml.ws.handler",
            "sbql4j8.javax.xml.ws.handler.soap",
            "sbql4j8.javax.xml.ws.http",
            "sbql4j8.javax.xml.ws.soap",
            "sbql4j8.javax.xml.ws.spi",
            "sbql4j8.javax.xml.transform",
            "sbql4j8.javax.xml.transform.sax",
            "sbql4j8.javax.xml.transform.dom",
            "sbql4j8.javax.xml.transform.stax",
            "sbql4j8.javax.xml.transform.stream",
            "sbql4j8.javax.xml",
            "sbql4j8.javax.xml.crypto",
            "sbql4j8.javax.xml.crypto.dom",
            "sbql4j8.javax.xml.crypto.dsig",
            "sbql4j8.javax.xml.crypto.dsig.dom",
            "sbql4j8.javax.xml.crypto.dsig.keyinfo",
            "sbql4j8.javax.xml.crypto.dsig.spec",
            "sbql4j8.javax.xml.datatype",
            "sbql4j8.javax.xml.validation",
            "sbql4j8.javax.xml.namespace",
            "sbql4j8.javax.xml.xpath",
            "sbql4j8.javax.xml.stream",
            "sbql4j8.javax.xml.stream.events",
            "sbql4j8.javax.xml.stream.util",
            "org.ietf.jgss",
            "org.omg.CORBA",
            "org.omg.CORBA.DynAnyPackage",
            "org.omg.CORBA.ORBPackage",
            "org.omg.CORBA.TypeCodePackage",
            "org.omg.stub.java.rmi",
            "org.omg.CORBA.portable",
            "org.omg.CORBA_2_3",
            "org.omg.CORBA_2_3.portable",
            "org.omg.CosNaming",
            "org.omg.CosNaming.NamingContextExtPackage",
            "org.omg.CosNaming.NamingContextPackage",
            "org.omg.SendingContext",
            "org.omg.PortableServer",
            "org.omg.PortableServer.CurrentPackage",
            "org.omg.PortableServer.POAPackage",
            "org.omg.PortableServer.POAManagerPackage",
            "org.omg.PortableServer.ServantLocatorPackage",
            "org.omg.PortableServer.portable",
            "org.omg.PortableInterceptor",
            "org.omg.PortableInterceptor.ORBInitInfoPackage",
            "org.omg.Messaging",
            "org.omg.IOP",
            "org.omg.IOP.CodecFactoryPackage",
            "org.omg.IOP.CodecPackage",
            "org.omg.Dynamic",
            "org.omg.DynamicAny",
            "org.omg.DynamicAny.DynAnyPackage",
            "org.omg.DynamicAny.DynAnyFactoryPackage",
            "org.w3c.dom",
            "org.w3c.dom.events",
            "org.w3c.dom.bootstrap",
            "org.w3c.dom.ls",
            "org.xml.sax",
            "org.xml.sax.ext",
            "org.xml.sax.helpers",
            "sbql4j8.com.sun.java.browser.dom",
            "org.w3c.dom",
            "org.w3c.dom.bootstrap",
            "org.w3c.dom.ls",
            "org.w3c.dom.ranges",
            "org.w3c.dom.traversal",
            "org.w3c.dom.html",
            "org.w3c.dom.stylesheets",
            "org.w3c.dom.css",
            "org.w3c.dom.events",
            "org.w3c.dom.views",
            "sbql4j8.com.sun.management",
            "sbql4j8.com.sun.security.auth",
            "sbql4j8.com.sun.security.auth.callback",
            "sbql4j8.com.sun.security.auth.login",
            "sbql4j8.com.sun.security.auth.module",
            "sbql4j8.com.sun.security.jgss",
            "sbql4j8.com.sun.net.httpserver",
            "sbql4j8.com.sun.net.httpserver.spi",
            "sbql4j8.javax.smartcardio"
            // </editor-fold>
        };
        sbql4j8.com.sun.tools.javac.Main.compile(args);
    }

}


text:
declare
    i number :=1; j number :=1;k number :=1;l number :=1;
    sql_stmt varchar2(150);
begin

	select nvl(max(identifier),0)+1 into i from DYEXTN_CONSTRAINTKEY_PROP;
    sql_stmt :='create sequence DYEXTN_CNSTRKEY_PROP_SEQ start with ' || i ;
    execute immediate sql_stmt;

 end;

declare
    i number :=1;
    sql_stmt varchar2(150);
begin
    select nvl(max(identifier),0)+1 into i from DYEXTN_DATABASE_PROPERTIES;
    sql_stmt :='drop sequence DYEXTN_DATABASE_PROPERTIES_SEQ';
    execute immediate sql_stmt;
    sql_stmt :='create sequence DYEXTN_DATABASE_PROPERTIES_SEQ start with ' || i;
    execute immediate sql_stmt;
end;


text:
var util = require('util');
var assert = require('assert');
var TYPE = require('./Type.js');
var Class = require('./Class.js');

var counter = {};
/**
 An interface definition
 an interface is a group of related methods with empty bodies
 An interface can contain constant declarations in addition to method declarations. All constant values defined in an interface are implicitly public, static, and final.

 var myInterface = defineInterface({
 	name : "myInterface",
 	extend : [superinterface1, superinterface2]
 	methods : {
 		method1 : function(arg1, arg2){},
 		method2 : function(){}
 	},
 	variables : {
 		var1 : xx
 	}
 });

 JAVA Reference  http://docs.oracle.com/javase/tutorial/java/IandI/interfaceDef.html

 @def - definition
 @post
**/
var defineInterface = function(def, post){
	assert(def.name);
	assert(!counter[def.name]);
	counter[def.name] = 1;
	if(!def.extend) def.extend = [];
	else if(!(def.extend instanceof Array)) def.extend = [def.extend];
	if(!def.methods) def.methods = {};
	if(!def.variables) def.variables = {};
	assert(def.methods instanceof Object);
	assert(def.variables instanceof Object);
	if(!post) post = function(){};
	assert(typeof(post)=="function");

	//the interface class's constructor
	//prevent interface from instanciation
	//if user do this
	//    var obj = new MyInterface()  will throw the error
	var constructor = function(){throw new Error("cannot instanciate an interface!");};

	//an interface class object simply inherits from object
	var proto = new Object();
	proto.constructor = constructor;
	constructor.prototype = proto;

	//Interface Methods are defined on Prototype object
	for(var p in def.methods){
		var method = def.methods[p];
		if(typeof(method)!="function") throw Error("invalid interface method definition: method="+p + " for interface " + def.name);

		//dynamically create the function with specified parameters and replace body with throw
		//this is essentiiall not required, as an interface will never get instantiated therefore the method will never had a chance to get called
		var str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; //max 26 parameters for the function
		assert(method.length <= str.length, "MAX NUMBER OF METHOD PARAMETERS REACHED");

		var args = new Array(method.length+1);
		for(var i=0;i<method.length;i++) args[i] = str.charAt(i); //mock argument name "A", "B", "C" ...
		args[method.length]= "throw new Error(\"abstract method invocation not allowed in an interface\");";
 		proto[p] = Function.apply(this, args);

 		//all methods defined in interface are implicit abstract method
		proto[p]["__abstract"] = true;
	}

	//Interface variables are class-level statics defined on the constructor
	for(var p in def.variables){
		var variable = def.variables[p];
		if(typeof(variable)=="function") throw Error("invalid interface constant definition: variable="+p + " for interface " + def.name);
		constructor[p] = variable;
	}

	//A constructor has a reserved word "__class" that points to a Class object that describes this interface
	constructor.__class = new Class(TYPE.INTERFACE, constructor, def);

	//enable user to find the Class object from the object instance of an interface
	proto.getClass = function(){return constructor.__class;};

	return constructor;
};

defineInterface.reset = function(){ counter = {}; }
module.exports = exports = defineInterface;


text:
package com.intellij.application.options.codeStyle;

import com.intellij.application.options.CodeStyleAbstractPanel;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.command.CommandProcessor;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.editor.Document;
import com.intellij.openapi.editor.colors.EditorColorsScheme;
import com.intellij.openapi.editor.highlighter.EditorHighlighter;
import com.intellij.openapi.fileTypes.FileType;
import com.intellij.openapi.fileTypes.FileTypeEditorHighlighterProviders;
import com.intellij.openapi.fileTypes.StdFileTypes;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.project.ProjectUtil;
import com.intellij.psi.PsiDocumentManager;
import com.intellij.psi.PsiFile;
import com.intellij.psi.codeStyle.CodeStyleManager;
import com.intellij.psi.codeStyle.CodeStyleSettings;
import com.intellij.psi.codeStyle.CodeStyleSettingsCustomizable;
import com.intellij.psi.codeStyle.LanguageCodeStyleSettingsProvider;
import com.intellij.util.Function;
import com.intellij.util.IncorrectOperationException;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.containers.MultiMap;
import gnu.trove.THashSet;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;
import java.awt.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Set;

/**
 * Base class for code style settings panels supporting multiple programming languages.
 *
 * @author rvishnyakov
 */
public abstract class CustomizableLanguageCodeStylePanel extends CodeStyleAbstractPanel implements CodeStyleSettingsCustomizable {
  private static final Logger LOG = Logger.getInstance(CustomizableLanguageCodeStylePanel.class);

  protected CustomizableLanguageCodeStylePanel(CodeStyleSettings settings) {
    super(settings);
  }

  protected void init() {
    customizeSettings();
  }

  protected void customizeSettings() {
    LanguageCodeStyleSettingsProvider provider = LanguageCodeStyleSettingsProvider.forLanguage(getDefaultLanguage());
    if (provider != null) {
      provider.customizeSettings(this, getSettingsType());
    }
  }

  public abstract LanguageCodeStyleSettingsProvider.SettingsType getSettingsType();

  protected void resetDefaultNames() {
  }

  @Override
  protected String getPreviewText() {
    if (getDefaultLanguage() == null) return "";
    String sample = LanguageCodeStyleSettingsProvider.getCodeSample(getDefaultLanguage(), getSettingsType());
    if (sample == null) return "";
    return sample;
  }

  @Override
  protected int getRightMargin() {
    if (getDefaultLanguage() == null) return -1;
    return LanguageCodeStyleSettingsProvider.getRightMargin(getDefaultLanguage(), getSettingsType());
  }

  @Override
  protected String getFileExt() {
    String fileExt = LanguageCodeStyleSettingsProvider.getFileExt(getDefaultLanguage());
    if (fileExt != null) return fileExt;
    return super.getFileExt();
  }

  @NotNull
  @Override
  protected FileType getFileType() {
    if (getDefaultLanguage() != null) {
      FileType assocType = getDefaultLanguage().getAssociatedFileType();
      if (assocType != null) {
        return assocType;
      }
    }
    return StdFileTypes.JAVA;
  }

  @Override
  @Nullable
  protected EditorHighlighter createHighlighter(final EditorColorsScheme scheme) {
    FileType fileType = getFileType();
    return FileTypeEditorHighlighterProviders.INSTANCE.forFileType(fileType).getEditorHighlighter(
      ProjectUtil.guessCurrentProject(getPanel()), fileType, null, scheme);
  }

  @Override
  protected PsiFile doReformat(final Project project, final PsiFile psiFile) {
    final String text = psiFile.getText();
    final PsiDocumentManager manager = PsiDocumentManager.getInstance(project);
    final Document doc = manager.getDocument(psiFile);
    CommandProcessor.getInstance().executeCommand(project, () -> ApplicationManager.getApplication().runWriteAction(() -> {
      if (doc != null) {
        doc.replaceString(0, doc.getTextLength(), text);
        manager.commitDocument(doc);
      }
      try {
        CodeStyleManager.getInstance(project).reformat(psiFile);
      }
      catch (IncorrectOperationException e) {
        LOG.error(e);
      }
    }), "", "");
    if (doc != null) {
      manager.commitDocument(doc);
    }
    return psiFile;
  }

  protected static JPanel createPreviewPanel() {
    return new JPanel(new BorderLayout());
  }

  @Override
  public void moveStandardOption(String fieldName, String newGroup) {
    throw new UnsupportedOperationException();
  }

  protected <T extends OrderedOption>List<T> sortOptions(Collection<? extends T> options) {
    Set<String> names = new THashSet<>(ContainerUtil.map(options, (Function<OrderedOption, String>)option -> option.getOptionName()));

    List<T> order = new ArrayList<>(options.size());
    MultiMap<String, T> afters = new MultiMap<>();
    MultiMap<String, T> befores = new MultiMap<>();

    for (T each : options) {
        String anchorOptionName = each.getAnchorOptionName();
        if (anchorOptionName != null && names.contains(anchorOptionName)) {
          if (each.getAnchor() == OptionAnchor.AFTER) {
            afters.putValue(anchorOptionName, each);
            continue;
          }
          else if (each.getAnchor() == OptionAnchor.BEFORE) {
            befores.putValue(anchorOptionName, each);
            continue;
          }
        }
      order.add(each);
    }

    List<T> result = new ArrayList<>(options.size());
    for (T each : order) {
      result.addAll(befores.get(each.getOptionName()));
      result.add(each);
      result.addAll(afters.get(each.getOptionName()));
    }

    assert result.size() == options.size();
    return result;
  }

  protected abstract static class OrderedOption {
    @NotNull private final String optionName;
    @Nullable private final OptionAnchor anchor;
    @Nullable private final String anchorOptionName;

    protected OrderedOption(@NotNull String optionName,
                            @Nullable OptionAnchor anchor,
                            @Nullable String anchorOptionName) {
      this.optionName = optionName;
      this.anchor = anchor;
      this.anchorOptionName = anchorOptionName;
    }

    @NotNull
    public String getOptionName() {
      return optionName;
    }

    @Nullable
    public OptionAnchor getAnchor() {
      return anchor;
    }

    @Nullable
    public String getAnchorOptionName() {
      return anchorOptionName;
    }
  }
}


text:
<?php

// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.

defined('MOODLE_INTERNAL') || die();

$string['activityremindersboth'] = 'Para ambos aperturas y cierres';
$string['activityremindersonlyclosings'] = 'Solamente para cierres de actividad';
$string['activityremindersonlyopenings'] = 'Solamente para aperturas de actividad';
$string['admintreelabel'] = 'Recordatorios';
$string['contentdescription'] = 'Descripción';
$string['contenttypeactivity'] = 'Actividad';
$string['contenttypecourse'] = 'Curso';
$string['contenttypegroup'] = 'Grupo';
$string['contenttypeuser'] = 'Usuario';
$string['contentwhen'] = 'Cuando';
$string['courseheading'] = 'Recordatorios de Eventos de Curso';
$string['days1'] = '1 Día';
$string['days3'] = '3 Días';
$string['days7'] = '7 Días';
$string['dueheading'] = 'Recordatorios de Eventos de Actividad';
$string['enabled'] = 'Habilitado:';
$string['enableddescription'] = 'Habilitar/deshabilitar plugin recordatorio';
$string['explaincourseheading'] = 'Configuraciones del recordatorio para eventos de curso. Estos eventos provienen de un curso.';
$string['explaindueheading'] = 'Configuraciones del recordatorio para eventos de actividad. Estos eventos provienen de actividades/módulos dentro de un curso.';
$string['explaingroupheading'] = 'Configuraciones del recordatorio para eventos de grupo. Estos eventos están basados solamente para un grupo específico.';
$string['explainsendactivityreminders'] = 'Indica en cual estado de la actividad deberían de enviarse los recordatorios.';
$string['explainuserheading'] = 'Configuraciones del recordatorio para eventos de usuario. Estos eventos son individuales para cada usuario.';
$string['filterevents'] = 'Filtrar eventos de calendario:';
$string['filtereventsdescription'] = 'Cuales eventos del calendario deberían ser filtrados y enviarse recordatorios para ellos.';
$string['filtereventsonlyhidden'] = 'Solamente eventos ocultos en calendario';
$string['filtereventsonlyvisible'] = 'Solamente eventos visibles en calendario';
$string['filtereventssendall'] = 'Todos los eventos';
$string['groupheading'] = 'Recordatorios de Eventos de Grupo';
$string['messageprovider:reminders_course'] = 'Notificaciones de Recordatorio para Eventos de Curso';
$string['messageprovider:reminders_due'] = 'Notificaciones de Recordatorio para Eventos de Actividad';
$string['messageprovider:reminders_group'] = 'Notificaciones de Recordatorio para Eventos de Grupo';
$string['messageprovider:reminders_site'] = 'Notificaciones de Recordatorio para Eventos de Sitio';
$string['messageprovider:reminders_user'] = 'Notificaciones de Recordatorio para Eventos de Usuario';
$string['pluginname'] = 'Recordatorios de Evento';
$string['reminderdaysahead'] = 'Enviar antes de:';
$string['reminderfrom'] = 'Recordatorio de';
$string['sendactivityreminders'] = 'Recordatorios de Actividades:';
$string['siteheading'] = 'Recordatorios de Evento de Sitio';
$string['titlesubjectprefix'] = 'Recordatorio';
$string['userheading'] = 'Recordatorios de Evento de Usuario';


text:
sap.ui.define([
		"sap/ui/core/Component",
		"sap/ui/core/mvc/Controller",
		"sap/ui/VersionInfo",
		"sap/base/util/merge",
		"sap/base/util/UriParameters"
	], function(Component, Controller, VersionInfo, merge, UriParameters) {
	"use strict";

	var Component = Component.extend("sap.ui.documentation.sdk.cookieSettingsDialog.Component", {

		"COOKIE_NAMES": {
			"APPROVAL_REQUESTED": "dk_approval_requested",
			"ALLOW_REQUIRED_COOKIES": "dk_allow_required_cookies"
		},

		metadata : {
			manifest: "json"
		},

		enable: function(oRootView) {
			var oUriParameters = UriParameters.fromQuery(location.search),
			sParameter = "cookie-settings-dialog",
			bCookieSettingsParameter = oUriParameters.has(sParameter);

			if (bCookieSettingsParameter) {
				this.sCookieSettingsParameterValue = oUriParameters.get(sParameter);
			}

			if (this.sCookieSettingsParameterValue === "true" || this.sCookieSettingsParameterValue === "" || !bCookieSettingsParameter) {

				var bApprovalRequested = this.getCookieValue(this.COOKIE_NAMES.APPROVAL_REQUESTED) === "1";

				if (!bApprovalRequested) {
					this.cookieSettingsDialogOpen({
						showCookieDetails: false,
						enableAdvancedSettings: false // this flag is left for eventual future advanced cookie settings
					}, oRootView);
				}
			}
		},

		setCookie: function (sCookieName, sValue) {
			var sExpiresDate,
				oDate = new Date();

			oDate.setTime(oDate.getTime() + (356 * 24 * 60 * 60 * 1000)); // one year
			sExpiresDate = "expires=" + oDate.toUTCString();

			document.cookie = sCookieName + "=" + sValue + ";" + sExpiresDate + ";path=/";
		},

		getCookieValue: function (sCookieName) {
			var aCookies = document.cookie.split(';'),
				sCookie;

			sCookieName = sCookieName + "=";

			for (var i = 0; i < aCookies.length; i++) {
				sCookie = aCookies[i].trim();

				if (sCookie.indexOf(sCookieName) === 0) {
					return sCookie.substring(sCookieName.length, sCookie.length);
				}
			}

			return "";
		},

		/**
		 * Opens the cookie settings dialog
		 * @public
		 */
		cookieSettingsDialogOpen: function (oOptions, oView) {
			this.getCookieSettingsController().then(function(oController) {
				oController.openCookieSettingsDialog(oOptions, oView, this);
			}.bind(this));
		},

		/**
		 * Obtains the controller and creates it if no instance created yet
		 * @returns {Promise<any>}
		 */
		getCookieSettingsController: function() {
			if (!this.oCookieSettingsControllerPromise) {
				this.oCookieSettingsControllerPromise = new Promise(function(resolve, reject) {
					Controller.create({name: "sap.ui.documentation.sdk.cookieSettingsDialog.controller.CookieSettingsDialog"}).then(function(oController) {
						resolve(oController);
					});
				});
			}
			return this.oCookieSettingsControllerPromise;
		}

	});

	return Component;

});


text:
<?php

namespace Litalex\Http\Controllers;

use Illuminate\Http\Response;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Redirect;
use Litalex\Models\Trainer;
use Litalex\Repositories\TrainerRepository;
use Symfony\Component\HttpFoundation\Request;

class TrainerController extends Controller
{
    const TRAINERS_PER_PAGE = 9;
    /**
     * The news repository instance.
     *
     * @var TrainerRepository
     */
    protected $trainer;

    /**
     * Create a new controller instance.
     *
     * @param TrainerRepository $trainer
     */
    public function __construct(TrainerRepository $trainer)
    {
        $this->trainer = $trainer;
    }

    /**
     * Display a list of all of the trainers.
     *
     * @param Request $request
     *
     * @return Response
     */
    public function index(Request $request)
    {
        $trainers = Trainer::whereEnabled(true)->paginate(self::TRAINERS_PER_PAGE);

        $links = str_replace('/?', '?', $trainers->render());

        return view(
            'trainer.index',
            [
                'trainers' => $trainers,
                'links'    => $links,
            ]
        );
    }

    public function search(Request $request)
    {
        if (Input::has('reset')) {
            return Redirect::route('index_trainer');
        }

        $search = $request->request->all();

        $filters = [
            'city'                 => '',
            'gender'               => '',
            'minPayByHour'         => 0,
            'maxPayByHour'         => 1000000,
            //            'minPayByDistance' => 0,
            //            'maxPayByDistance' => 1000000,
            'minTrainerExperience' => 0,
            'maxTrainerExperience' => 100,
            'studentCar'           => '',
            'brand'                => '',
            'transmission'         => '',
        ];

        foreach ($search as $name => $value) {
            $filters[$name] = !empty($value) ? $value : $filters[$name];
        }

        $trainers = Trainer::whereEnabled(true)
            ->ofGender($filters['gender'])
            ->OfPayByHour($filters['minPayByHour'], $filters['maxPayByHour'])
//            ->OfPayByDistance($filters['minPayByDistance'], $filters['maxPayByDistance'])
            ->ofTrainerExperience($filters['minTrainerExperience'], $filters['maxTrainerExperience'])
            ->OfStudentCar($filters['studentCar'])
            ->ofCarBrand($filters['brand'])
            ->ofCarTransmission($filters['transmission'])
            ->ofCity($filters['city'])
            ->get();

        return view(
            'trainer.index',
            [
                'trainers' => $trainers,
                'error' => trans("base.errors.not_found_posts"),
            ]
        );
    }

    public function store(Request $request)
    {
        // TODO: Implement store() method.
    }

    public function destroy(Request $request)
    {
        // TODO: Implement destroy() method.
    }

    /**
     * Display one trainer.
     *
     * @param $slug
     *
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     */
    public function view($slug)
    {
        return view(
            'trainer.view',
            [
                'trainer' => $this->trainer->getOneEnabledBySlugWithCars($slug),
            ]
        );
    }
}


text:
Pliny.default_context = {}
Pliny.default_context[:app] = Config.app_name if Config.app_name
Pliny.default_context[:deployment] = Config.deployment


text:
<?php
/**
 * Interlingua language file
 *
 * @author robocap <robocap1@gmail.com>
 * @author Martijn Dekker <martijn@inlv.org>
 */
$lang['admin_acl']             = 'Gestion de listas de controlo de accesso';
$lang['acl_group']             = 'Gruppo:';
$lang['acl_user']              = 'Usator:';
$lang['acl_perms']             = 'Permissiones pro';
$lang['page']                  = 'Pagina';
$lang['namespace']             = 'Spatio de nomines';
$lang['btn_select']            = 'Seliger';
$lang['p_user_id']             = 'Le usator %s ha actualmente le sequente permissiones in le pagina %s: %s.';
$lang['p_user_ns']             = 'Le usator %s ha actualmente le sequente permissiones in le spatio de nomines %s: %s.';
$lang['p_group_id']            = 'Le membros del gruppo %s a actualmente le sequente permissiones in le pagina %s: %s.';
$lang['p_group_ns']            = 'Le membros del gruppo %s ha actualmente le sequente permissiones in le spatio de nomines %s: %s.';
$lang['p_choose_id']           = 'Per favor entra un usator o gruppo in le formulario hic supra pro vider o modificar le permissiones configurate pro le pagina %s.';
$lang['p_choose_ns']           = 'Per favor entra un usator o gruppo in le formulario hic supra pro vider o modificar le permissiones configurate pro le spatio de nomines %s.';
$lang['p_inherited']           = 'Nota ben: Iste permissiones non ha essite configurate explicitemente ma ha essite hereditate de altere gruppos o de spatios de nomines superior.';
$lang['p_isadmin']             = 'Nota ben: Le gruppo o usator seligite ha sempre permissiones integral proque es configurate como superusator.';
$lang['p_include']             = 'Le permissiones superior include les inferior. Le permissiones de Crear, Incargar e Deler es solmente applicabile a spatios de nomines, non a paginas.';
$lang['current']               = 'Regulas ACL actual';
$lang['where']                 = 'Pagina/Spatio de nomines';
$lang['who']                   = 'Usator/Gruppo';
$lang['perm']                  = 'Permissiones';
$lang['acl_perm0']             = 'Nulle';
$lang['acl_perm1']             = 'Leger';
$lang['acl_perm2']             = 'Modificar';
$lang['acl_perm4']             = 'Crear';
$lang['acl_perm8']             = 'Incargar';
$lang['acl_perm16']            = 'Deler';
$lang['acl_new']               = 'Adder nove entrata';
$lang['acl_mod']               = 'Modificar entrata';


text:
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System.Linq;
using StixGames.GrassShader;
using Object = UnityEngine.Object;

public class GrassEditor : MaterialEditor
{
	private static readonly string[] grassTypeLabels =
	{
	"Simple", "Simple with density", "1 Texture", "2 Textures",
	"3 Textures", "4 Textures"
};

	private static readonly string[] grassTypeString =
	{
	"SIMPLE_GRASS", "SIMPLE_GRASS_DENSITY", "ONE_GRASS_TYPE", "TWO_GRASS_TYPES", "THREE_GRASS_TYPES",
	"FOUR_GRASS_TYPES"
};

	private const int defaultGrassType = 0;

	private static readonly string[] lightingModeLabels = { "Unlit", "Unshaded", "Inverted Specular PBR", "Default PBR" };
	private static readonly string[] lightingModes = { "GRASS_UNLIT_LIGHTING", "GRASS_UNSHADED_LIGHTING", "", "GRASS_PBR_LIGHTING" };
	private const int defaultLightingMode = 2;

	private static readonly string[] densityModeLabels = { "Value Based Density", "Vertex Density", "Texture Density" };

	private static readonly string[] defaultKeywords = { "SIMPLE_GRASS", "GRASS_HEIGHT_SMOOTHING" };

	public override void OnInspectorGUI()
	{
		if (!isVisible)
		{
			return;
		}

		bool forceUpdate = false;
		Material targetMat = target as Material;
		string[] originalKeywords = targetMat.shaderKeywords;

		//Set default values when the material is newly created
		if (originalKeywords.Length == 0)
		{
			originalKeywords = defaultKeywords;

			targetMat.shaderKeywords = defaultKeywords;
			EditorUtility.SetDirty(targetMat);
		}

		//Grass type
		int grassType = -1;
		for (int i = 0; i < grassTypeLabels.Length; i++)
		{
			if (originalKeywords.Contains(grassTypeString[i]))
			{
				grassType = i;
				break;
			}
		}
		if (grassType < 0)
		{
			grassType = defaultGrassType;
			forceUpdate = true;
		}

		//Lighting mode
		int lightingMode = -1;
		for (int i = 0; i < lightingModeLabels.Length; i++)
		{
			if (originalKeywords.Contains(lightingModes[i]))
			{
				lightingMode = i;
				break;
			}
		}
		if (lightingMode < 0)
		{
			lightingMode = defaultLightingMode;
			forceUpdate = true;
		}

		//Density mode
		var densityMode = GrassEditorUtility.GetDensityMode(targetMat);

		bool ignoreGISpecular = originalKeywords.Contains("GRASS_IGNORE_GI_SPECULAR");
		bool widthSmoothing = originalKeywords.Contains("GRASS_WIDTH_SMOOTHING");
		bool heightSmoothing = originalKeywords.Contains("GRASS_HEIGHT_SMOOTHING");
		bool objectMode = originalKeywords.Contains("GRASS_OBJECT_MODE");
		bool topViewCompensation = originalKeywords.Contains("GRASS_TOP_VIEW_COMPENSATION");
		bool surfaceNormal = originalKeywords.Contains("GRASS_FOLLOW_SURFACE_NORMAL");
		bool useTextureAtlas = originalKeywords.Contains("GRASS_USE_TEXTURE_ATLAS");

		//Grass painter
		if (Selection.activeObject == null || AssetDatabase.Contains(Selection.activeObject))
		{
			EditorGUILayout.LabelField("To open the grass painter, select a scene object with a grass material.");
			EditorGUILayout.LabelField("For Unity Terrain you can open it from Window > Stix Games > GrassPainter");
		}
		else
		{
			if (GUILayout.Button("Open Grass Painter"))
			{
				GrassPainterWindow.OpenWindow();
			}
		}
		EditorGUILayout.Space();

		EditorGUI.BeginChangeCheck();

		EditorGUILayout.LabelField("Shader Variants", EditorStyles.boldLabel);
		EditorGUILayout.LabelField("Grass Modes", EditorStyles.boldLabel);
		grassType = EditorGUILayout.Popup("Grass type:", grassType, grassTypeLabels);
		densityMode = (DensityMode)EditorGUILayout.Popup("Density mode:", (int)densityMode, densityModeLabels);
		EditorGUILayout.Separator();

		EditorGUILayout.LabelField("Grass Lighting", EditorStyles.boldLabel);
		lightingMode = EditorGUILayout.Popup("Lighting mode:", lightingMode, lightingModeLabels);
		ignoreGISpecular = GUILayout.Toggle(ignoreGISpecular,
			new GUIContent("Ignore global specular lighting", "If checked, the specular lighting from the " +
															  "global illumination engine will be ignored. " +
															  "Skyboxes will no longer reflect on the grass."));
		EditorGUILayout.Separator();

		EditorGUILayout.LabelField("Level of Detail Interpolation", EditorStyles.boldLabel);
		widthSmoothing = GUILayout.Toggle(widthSmoothing, "Smooth grass width");
		heightSmoothing = GUILayout.Toggle(heightSmoothing, "Smooth grass height");
		EditorGUILayout.Separator();

		EditorGUILayout.LabelField("Object / World Space Modes", EditorStyles.boldLabel);
		objectMode = GUILayout.Toggle(objectMode, "Object space mode");
		surfaceNormal = GUILayout.Toggle(surfaceNormal, "Follow surface normals");
		EditorGUILayout.Separator();

		EditorGUILayout.LabelField("Other Shader Variants", EditorStyles.boldLabel);
		topViewCompensation = GUILayout.Toggle(topViewCompensation, "Improve viewing grass from above");
		EditorGUILayout.Separator();

		useTextureAtlas = grassType >= 2 && GUILayout.Toggle(useTextureAtlas, "Use texture atlas");
		EditorGUILayout.Separator();

		if (EditorGUI.EndChangeCheck() || forceUpdate)
		{
			Undo.RecordObject(targetMat, "Changed grass shader keywords");

			var keywords = new List<string>();

			keywords.Add(grassTypeString[grassType]);
			keywords.Add(lightingModes[lightingMode]);
			keywords.Add(GrassEditorUtility.DensityModes[(int)densityMode]);

			if (ignoreGISpecular)
			{
				keywords.Add("GRASS_IGNORE_GI_SPECULAR");
			}

			if (widthSmoothing)
			{
				keywords.Add("GRASS_WIDTH_SMOOTHING");
			}

			if (heightSmoothing)
			{
				keywords.Add("GRASS_HEIGHT_SMOOTHING");
			}

			if (objectMode)
			{
				keywords.Add("GRASS_OBJECT_MODE");
			}

			if (topViewCompensation)
			{
				keywords.Add("GRASS_TOP_VIEW_COMPENSATION");
			}

			if (surfaceNormal)
			{
				keywords.Add("GRASS_FOLLOW_SURFACE_NORMAL");
			}

			if (useTextureAtlas)
			{
				keywords.Add("GRASS_USE_TEXTURE_ATLAS");
			}

			targetMat.shaderKeywords = keywords.ToArray();
			EditorUtility.SetDirty(targetMat);
		}

		EditorGUILayout.LabelField("Shader Settings", EditorStyles.boldLabel);
		serializedObject.Update();
		var theShader = serializedObject.FindProperty("m_Shader");
		if (isVisible && !theShader.hasMultipleDifferentValues && theShader.objectReferenceValue != null)
		{
			EditorGUIUtility.fieldWidth = 64;
			EditorGUI.BeginChangeCheck();

			int grassLabel = 1;
			var properties = GetMaterialProperties(new Object[] { targetMat });
			foreach (var property in properties)
			{
				//Ignore unused grass types
				if ((grassType < 3 && property.name.Contains("01")) ||
					(grassType < 4 && property.name.Contains("02")) ||
					(grassType < 5 && property.name.Contains("03")))
				{
					break;
				}

				// =========== Labels ==================
				if (property.name == "_EdgeLength")
				{
					EditorGUILayout.LabelField("Performance Settings", EditorStyles.boldLabel);
				}
				if (property.name == "_GrassFadeStart")
				{
					EditorGUILayout.Space();
					EditorGUILayout.LabelField("Visual Settings", EditorStyles.boldLabel);
				}
				if (property.name == "_ColorMap")
				{
					EditorGUILayout.Space();
					EditorGUILayout.LabelField("Base Textures", EditorStyles.boldLabel);
				}
				if (property.name == "_WindParams")
				{
					EditorGUILayout.Space();
					EditorGUILayout.LabelField("Wind Settings", EditorStyles.boldLabel);
				}

				//Grass type label
				if (property.name.Contains("_GrassTex"))
				{
					EditorGUILayout.Space();
					EditorGUILayout.LabelField("Grass Type Nr. " + grassLabel, EditorStyles.boldLabel);
					grassLabel++;
				}

				// ============ Non standard settings =============
				//Max tessellation can only be a int between 1 and 6
				if (property.name == "_MaxTessellation")
				{
					property.floatValue = EditorGUILayout.IntSlider(property.displayName, (int)property.floatValue,
						1, 6);
					continue;
				}

				//Hide texture atlas settings if not active
				if (property.name.Contains("_TextureAtlas"))
				{
					if (useTextureAtlas)
					{
						property.floatValue = Math.Max(EditorGUILayout.IntField(property.displayName, (int)property.floatValue), 1);
					}
					continue;
				}

				// ============ Standard settings =============
				//Density
				if (property.name.Contains("_Density"))
				{
					//Vertex density
					if (densityMode == DensityMode.Vertex || grassType == 0)
					{
						continue;
					}

					//Texture density
					if (densityMode == DensityMode.Texture && property.name == "_DensityValues")
					{
						continue;
					}

					//Density value
					if (densityMode == DensityMode.Value && property.name == "_Density")
					{
						continue;
					}
				}

				//In simple grass, ignore grass texture
				if ((grassType == 0 || grassType == 1) && property.name.Contains("_GrassTex"))
				{
					continue;
				}

				DrawProperty(property);
			}

			if (EditorGUI.EndChangeCheck())
			{
				PropertiesChanged();
			}
		}
	}

	private void DrawProperty(MaterialProperty property)
	{
		switch (property.type)
		{
			case MaterialProperty.PropType.Range: // float ranges
				RangeProperty(property, property.displayName);
				break;

			case MaterialProperty.PropType.Float: // floats
				FloatProperty(property, property.displayName);
				break;

			case MaterialProperty.PropType.Color: // colors
				ColorProperty(property, property.displayName);
				break;

			case MaterialProperty.PropType.Texture: // textures
				TextureProperty(property, property.displayName);

				GUILayout.Space(6);
				break;

			case MaterialProperty.PropType.Vector: // vectors
				VectorProperty(property, property.displayName);
				break;

			default:
				GUILayout.Label("ARGH" + property.displayName + " : " + property.type);
				break;
		}
	}
}


text:
module Diameter
  module Constants
    # Contains Vendor-ID constants
    module Vendors
      # The 3GPP/IMS Vendor-ID
      TGPP = 10_415
    end

    # Represents the type of data a particular AVP should be interpreted
    # as.
    module AVPType
      # Represents an AVP of Grouped type
      Grouped = :Grouped

      # Represents an AVP of Unsigned32 type
      Unsigned32 = :Unsigned32
      Enumerated = Unsigned32

      Unsigned64 = :Unsigned64
      Integer32 = :Integer32
      Integer64 = :Integer64
      Float32 = :Float32
      Float64 = :Float64

      # Represents an AVP of OctetString type
      OctetString = :OctetString
      DiameterIdentity = OctetString
      DiameterURI = OctetString
      UTF8String = OctetString

      # Represents an AVP of IPAddress type
      IPAddress = :Address
    end
  end
end


text:
package com.polymathiccoder.avempace.util;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;

import org.apache.avro.Schema;
import org.apache.avro.io.DatumWriter;
import org.apache.avro.io.Decoder;
import org.apache.avro.io.DecoderFactory;
import org.apache.avro.io.Encoder;
import org.apache.avro.io.EncoderFactory;
import org.apache.avro.reflect.ReflectData;
import org.apache.avro.reflect.ReflectDatumReader;
import org.apache.avro.reflect.ReflectDatumWriter;
import org.apache.commons.lang3.ClassUtils;

import com.google.common.base.Preconditions;
import com.polymathiccoder.avempace.util.error.UtilsException;

public final class BinaryUtils {
// Static behavior
    @SuppressWarnings("unchecked")
	public static <T> ByteBuffer toBinary(final Class<? extends T> clazz, final Object value) {
		Preconditions.checkArgument(ClassUtils.isAssignable(clazz, value.getClass()));

    	final DatumWriter<T> writer = new ReflectDatumWriter<T>(getSchema(clazz));
    	final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); // NOPMD
        final Encoder encoder = EncoderFactory.get().binaryEncoder(byteArrayOutputStream, null);

        try {
			writer.write((T) value, encoder);
			encoder.flush();
        } catch (IOException ioException) {
        	throw new BinaryUtilsException(
        			String.format(BinaryUtilsException.ERROR_SERIALIZATION__UNREACHABLE_SERVICE, clazz));
		}

        byte[] bytes = byteArrayOutputStream.toByteArray();

        ByteBuffer buffer = ByteBuffer.allocate(bytes.length);
        buffer.put(bytes, 0, bytes.length);
        buffer.position(0);
        return buffer;
    }

    public static <T> T fromBinary(Class<? extends T> clazz, final Object value) {
    	byte[] bytes = ((ByteBuffer) value).array();
        final ReflectDatumReader<T> reader = new ReflectDatumReader<T>(getSchema(clazz));
        final Decoder decoder = DecoderFactory.get().binaryDecoder(bytes, null);
        T object;

        try {
			object = reader.read(null, decoder); // NOPMD
		} catch (final IOException ioException) {
			throw new BinaryUtilsException(
					String.format(BinaryUtilsException.ERROR_DESERIALIZATION__UNREACHABLE_SERVICE, clazz));
		}

        return object;
    }

    private static Schema getSchema(final Class<?> clazz) {
    	final ReflectData reflectData = ReflectData.get();
        return reflectData.getSchema(clazz);
    }

// Types
    @SuppressWarnings("serial")
	public static final class BinaryUtilsException extends UtilsException {
    // Static fields
    	public static final String ERROR_DESERIALIZATION__UNREACHABLE_SERVICE = "Deserialization: Could not deserialize into type '%s'";
        public static final String ERROR_SERIALIZATION__UNREACHABLE_SERVICE = "Serialization: Could not serialize type '%s'";

    // Life cycle
    	private BinaryUtilsException(final String message) {
    		super(message);
    	}

    	private BinaryUtilsException(final String message, final Throwable cause) {
    		super(message, cause);
    	}
    }
}


text:
package w3.html;

import divconq.web.WebContext;
import divconq.web.dcui.Attributes;
import divconq.web.dcui.HtmlUtil;
import divconq.web.dcui.ICodeTag;
import divconq.web.dcui.MixedElement;
import divconq.web.dcui.Nodes;
import divconq.xml.XElement;

public class Option extends MixedElement implements ICodeTag {
    public Option() {
    	super();
	}

    public Option(Object... args) {
    	super(args);
	}

	@Override
	public void parseElement(WebContext ctx, Nodes nodes, XElement xel) {
		Attributes attrs = HtmlUtil.initAttrs(xel);

		if (xel.hasAttribute("disabled"))
			attrs.add("disabled", xel.getRawAttribute("disabled"));

		if (xel.hasAttribute("label"))
			attrs.add("label", xel.getRawAttribute("label"));

		if (xel.hasAttribute("selected"))
			attrs.add("selected", xel.getRawAttribute("selected"));

		if (xel.hasAttribute("value"))
			attrs.add("value", xel.getRawAttribute("value"));

        this.myArguments = new Object[] { attrs, ctx.getDomain().parseXml(ctx, xel) };

		nodes.add(this);
	}

    @Override
	public void build(WebContext ctx, Object... args) {
	    super.build(ctx, "option", args);
	}
}


text:
<!DOCTYPE html>

 <meta charset="utf-8">
 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
 <title>Wirefy | The Responsive Wireframe Boilerplate</title>
 <meta name="description" content="">
 <meta name="author" content="">

 <link rel="stylesheet" href="css/base.css">
 <link rel="stylesheet" href="css/layout.css">
 <link rel="stylesheet" href="css/site.css">
 <link rel="stylesheet" href="css/jquery-ui-1.10.0.custom.min.css">

 <link rel="shortcut icon" href="img/startup/favicon.ico">

 <meta http-equiv="cleartype" content="on">

    begin nav here

  	footer nav


text:
''' Database initializer

This module implement database initializer which provide functionality to
parse dict files, and update or create database content.
'''
import sys
from pymongo import MongoClient

class Dict(object):

    def __init__(self):
        self.words = []

    def addWord(self, id, word):
        if word:
            self.words.append(Word(id, word))

    def setMeta(self, language, category):
        if language:
            self.language = language

        if category:
            self.category = category

class Word(object):

    def __init__(self, id, word):
        self.id = id
        self.word = word

class DictionaryParser(object):

    def __init__(self):
        pass

    def parse(self, dict_path):
        if not dict_path:
            raise Exception("Error: Path to dictionaty file is not provided")

        def parseLine(string):
            if not string:
                raise Exception("Error: Line is empty")

            if string[0] == '#':
                return                        # skip comment string
            elif string[0] == '>':
                try:
                    arr = string[1:].split('|')
                    language = arr[0].strip()
                    category = arr[1].strip()
                    self.dict.setMeta(language, category)
                    #print("language: {} \tcategory: {}".format(self.dict.language, self.dict.category))
                except:
                    raise Exception("Error: Dictionary title has incorrect format")
            else:
                try:
                    arr = string.split('|')
                    word_id = str(arr[0]).strip().translate(None, "[]'")
                    word = str(arr[1]).strip().translate(None, "'")
                    self.dict.addWord(word_id, word)
                    #print("ID: '{}'\tWord: '{}'".format(word_id, word))
                except:
                    raise Exception("Error: Dictionary format is incorrect")

        self.dict = Dict()
        with open(dict_path, 'r') as file:
            for line in file:
                parseLine(line)

        return self.dict

class DatabaseMapper(object):

    def __init__(self, connection_string):
        self.context = MongoClient(connection_string)

    def __exit__(self):
        self.context.close()

    def mapDictionary(self, dictionary):
        col = self.context[dictionary.language][dictionary.category]
        for i in dictionary.words:
            print("{} {}".format(i.id, i.word))
            col.insert({'id': i.id, 'word': i.word})

def main():
    mapper = DatabaseMapper("mongodb://localhost/dicts");
    parser = DictionaryParser()
    dictonary = parser.parse("../English/verbs.dict")
    mapper.mapDictionary(dictonary)

if __name__ == '__main__':
    main()


text:
goog.provide('ol.render.VectorContext');

/**
 * Context for drawing geometries.  A vector context is available on render
 * events and does not need to be constructed directly.
 * @constructor
 * @abstract
 * @struct
 * @api
 */
ol.render.VectorContext = function() {
};

/**
 * Render a geometry with a custom renderer.
 *
 * @param {ol.geom.SimpleGeometry} geometry Geometry.
 * @param {ol.Feature|ol.render.Feature} feature Feature.
 * @param {Function} renderer Renderer.
 */
ol.render.VectorContext.prototype.drawCustom = function(geometry, feature, renderer) {};

/**
 * Render a geometry.
 *
 * @param {ol.geom.Geometry} geometry The geometry to render.
 */
ol.render.VectorContext.prototype.drawGeometry = function(geometry) {};

/**
 * Set the rendering style.
 *
 * @param {ol.style.Style} style The rendering style.
 */
ol.render.VectorContext.prototype.setStyle = function(style) {};

/**
 * @param {ol.geom.Circle} circleGeometry Circle geometry.
 * @param {ol.Feature} feature Feature.
 */
ol.render.VectorContext.prototype.drawCircle = function(circleGeometry, feature) {};

/**
 * @param {ol.Feature} feature Feature.
 * @param {ol.style.Style} style Style.
 */
ol.render.VectorContext.prototype.drawFeature = function(feature, style) {};

/**
 * @param {ol.geom.GeometryCollection} geometryCollectionGeometry Geometry
 *     collection.
 * @param {ol.Feature} feature Feature.
 */
ol.render.VectorContext.prototype.drawGeometryCollection = function(geometryCollectionGeometry, feature) {};

/**
 * @param {ol.geom.LineString|ol.render.Feature} lineStringGeometry Line
 *     string geometry.
 * @param {ol.Feature|ol.render.Feature} feature Feature.
 */
ol.render.VectorContext.prototype.drawLineString = function(lineStringGeometry, feature) {};

/**
 * @param {ol.geom.MultiLineString|ol.render.Feature} multiLineStringGeometry
 *     MultiLineString geometry.
 * @param {ol.Feature|ol.render.Feature} feature Feature.
 */
ol.render.VectorContext.prototype.drawMultiLineString = function(multiLineStringGeometry, feature) {};

/**
 * @param {ol.geom.MultiPoint|ol.render.Feature} multiPointGeometry MultiPoint
 *     geometry.
 * @param {ol.Feature|ol.render.Feature} feature Feature.
 */
ol.render.VectorContext.prototype.drawMultiPoint = function(multiPointGeometry, feature) {};

/**
 * @param {ol.geom.MultiPolygon} multiPolygonGeometry MultiPolygon geometry.
 * @param {ol.Feature|ol.render.Feature} feature Feature.
 */
ol.render.VectorContext.prototype.drawMultiPolygon = function(multiPolygonGeometry, feature) {};

/**
 * @param {ol.geom.Point|ol.render.Feature} pointGeometry Point geometry.
 * @param {ol.Feature|ol.render.Feature} feature Feature.
 */
ol.render.VectorContext.prototype.drawPoint = function(pointGeometry, feature) {};

/**
 * @param {ol.geom.Polygon|ol.render.Feature} polygonGeometry Polygon
 *     geometry.
 * @param {ol.Feature|ol.render.Feature} feature Feature.
 */
ol.render.VectorContext.prototype.drawPolygon = function(polygonGeometry, feature) {};

/**
 * @param {Array.<number>} flatCoordinates Flat coordinates.
 * @param {number} offset Offset.
 * @param {number} end End.
 * @param {number} stride Stride.
 * @param {ol.geom.Geometry|ol.render.Feature} geometry Geometry.
 * @param {ol.Feature|ol.render.Feature} feature Feature.
 */
ol.render.VectorContext.prototype.drawText = function(flatCoordinates, offset, end, stride, geometry, feature) {};

/**
 * @param {ol.style.Fill} fillStyle Fill style.
 * @param {ol.style.Stroke} strokeStyle Stroke style.
 */
ol.render.VectorContext.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) {};

/**
 * @param {ol.style.Image} imageStyle Image style.
 */
ol.render.VectorContext.prototype.setImageStyle = function(imageStyle) {};

/**
 * @param {ol.style.Text} textStyle Text style.
 */
ol.render.VectorContext.prototype.setTextStyle = function(textStyle) {};


text:
package org.apache.juddi.query;

import java.util.List;

import javax.persistence.EntityManager;

import org.apache.juddi.query.util.FindQualifiers;
import org.uddi.api_v3.CategoryBag;

/**
 * Returns the list of business keys possessing the keyedReferenceGroups in the passed category bag.
 * Output is restricted by list of business keys passed in.  If null, all business entities are searched.
 * Output is produced by building the appropriate JPA query based on input and find qualifiers.
 *
 * From specification:
 * "combineCategoryBags:  this may only be used in the find_business and find_service calls.  In the case of
 * find_business, this qualifier makes the categoryBag entries for the full businessEntity element behave as though all
 * categoryBag elements found at the businessEntity level and in all contained or referenced businessService elements
 * and bindingTemplate elements were combined.  Searching for a category will yield a positive match on a registered
 * business if any of the categoryBag elements contained within the full businessEntity element (including the
 * categoryBag elements within contained or referenced businessService elements or bindingTemplate elements)
 * contains the filter criteria.  In the case of find_service, this qualifier makes the categoryBag entries
 * for the full businessService element behave as though all categoryBag elements found at the businessService level
 * and in all contained or referenced elements in the bindingTemplate elements were combined.  Searching for a category
 * will yield a positive match on a registered service if any of the categoryBag elements contained within the
 * full businessService element (including the categoryBag elements within contained or referenced bindingTemplate
 * elements) contains the filter criteria. This find qualifier does not cause the keyedReferences in categoryBags
 * to be combined with the keyedReferences in keyedReferenceGroups in categoryBags when performing the comparison.
 * The keyedReferences are combined with each other, and the keyedReferenceGroups are combined with each other."
 *
 * @author Tom Cunningham
 */
public class FindBusinessByCombinedCategoryQuery {

        private static final String ENTITY_NAME_CHILD  = "BusinessCategoryBag";
        private static final String ENTITY_FIELD2      = "businessService." + BusinessEntityQuery.ENTITY_FIELD;
        private static final String ENTITY_NAME_CHILD2 = "ServiceCategoryBag";
        private static final String ENTITY_FIELD3      = "bindingTemplate.businessService." + BusinessEntityQuery.ENTITY_FIELD;
        private static final String ENTITY_NAME_CHILD3 = "BindingCategoryBag";

        private static FindEntityByCombinedCategoryQuery findQuery;

        static {
            findQuery = new FindEntityByCombinedCategoryQuery(BusinessEntityQuery.ENTITY_NAME,
                            BusinessEntityQuery.ENTITY_ALIAS,
                            BusinessEntityQuery.KEY_NAME,
                            BusinessEntityQuery.ENTITY_FIELD,
                            ENTITY_NAME_CHILD,
                            ENTITY_FIELD2,
                            ENTITY_NAME_CHILD2,
                            ENTITY_FIELD3,
                            ENTITY_NAME_CHILD3,
                            BusinessEntityQuery.SIGNATURE_PRESENT);
        }

        public static List<Object> select(EntityManager em, FindQualifiers fq, CategoryBag categoryBag, List<Object> keysIn) {
                return findQuery.select(em, fq, categoryBag, keysIn);
        }
}


text:
#region S# License

#endregion S# License
namespace StockSharp.Algo.Derivatives
{
	using System;

	using Ecng.Common;

	using StockSharp.BusinessEntities;
	using StockSharp.Messages;
	using StockSharp.Localization;

	/// <summary>
	/// The model for calculating Greeks values by the Black-Scholes formula.
	/// </summary>
	public class BlackScholes : IBlackScholes
	{
		/// <summary>
		/// Initialize <see cref="BlackScholes"/>.
		/// </summary>
		/// <param name="securityProvider">The provider of information about instruments.</param>
		/// <param name="dataProvider">The market data provider.</param>
		protected BlackScholes(ISecurityProvider securityProvider, IMarketDataProvider dataProvider)
		{
			if (securityProvider == null)
				throw new ArgumentNullException(nameof(securityProvider));

			if (dataProvider == null)
				throw new ArgumentNullException(nameof(dataProvider));

			SecurityProvider = securityProvider;
			DataProvider = dataProvider;
		}

		/// <summary>
		/// Initializes a new instance of the <see cref="BlackScholes"/>.
		/// </summary>
		/// <param name="option">Options contract.</param>
		/// <param name="securityProvider">The provider of information about instruments.</param>
		/// <param name="dataProvider">The market data provider.</param>
		public BlackScholes(Security option, ISecurityProvider securityProvider, IMarketDataProvider dataProvider)
			: this(securityProvider, dataProvider)
		{
			if (option == null)
				throw new ArgumentNullException(nameof(option));

			Option = option;
		}

		/// <summary>
		/// The provider of information about instruments.
		/// </summary>
		public ISecurityProvider SecurityProvider { get; }

		/// <summary>
		/// The market data provider.
		/// </summary>
		public virtual IMarketDataProvider DataProvider { get; }

		/// <summary>
		/// Options contract.
		/// </summary>
		public virtual Security Option { get; }

		/// <summary>
		/// The risk free interest rate.
		/// </summary>
		public decimal RiskFree { get; set; }

		/// <summary>
		/// The dividend amount on shares.
		/// </summary>
		public virtual decimal Dividend { get; set; }

		private int _roundDecimals = -1;

		/// <summary>
		/// The number of decimal places at calculated values. The default is -1, which means no values rounding.
		/// </summary>
		public virtual int RoundDecimals
		{
			get { return _roundDecimals; }
			set
			{
				if (value < -1)
					throw new ArgumentOutOfRangeException(nameof(value), value, LocalizedStrings.Str702);

				_roundDecimals = value;
			}
		}

		private Security _underlyingAsset;

		/// <summary>
		/// Underlying asset.
		/// </summary>
		public virtual Security UnderlyingAsset => _underlyingAsset ?? (_underlyingAsset = Option.GetUnderlyingAsset(SecurityProvider));

		/// <summary>
		/// The standard deviation by default.
		/// </summary>
		public decimal DefaultDeviation => ((decimal?)DataProvider.GetSecurityValue(Option, Level1Fields.ImpliedVolatility) ?? 0) / 100;

		/// <summary>
		/// The time before expiration calculation.
		/// </summary>
		/// <param name="currentTime">The current time.</param>
		/// <returns>The time remaining until expiration. If the value is equal to <see langword="null" />, then the value calculation currently is impossible.</returns>
		public virtual double? GetExpirationTimeLine(DateTimeOffset currentTime)
		{
			return DerivativesHelper.GetExpirationTimeLine(Option.GetExpirationTime(), currentTime);
		}

		/// <summary>
		/// To get the price of the underlying asset.
		/// </summary>
		/// <param name="assetPrice">The price of the underlying asset if it is specified.</param>
		/// <returns>The price of the underlying asset. If the value is equal to <see langword="null" />, then the value calculation currently is impossible.</returns>
		public decimal? GetAssetPrice(decimal? assetPrice = null)
		{
			if (assetPrice != null)
				return (decimal)assetPrice;

			return (decimal?)DataProvider.GetSecurityValue(UnderlyingAsset, Level1Fields.LastTradePrice);
		}

		/// <summary>
		/// Option type.
		/// </summary>
		protected OptionTypes OptionType
		{
			get
			{
				var type = Option.OptionType;

				if (type == null)
					throw new InvalidOperationException(LocalizedStrings.Str703Params.Put(Option));

				return type.Value;
			}
		}

		/// <summary>
		/// To round to <see cref="BlackScholes.RoundDecimals"/>.
		/// </summary>
		/// <param name="value">The initial value.</param>
		/// <returns>The rounded value.</returns>
		protected decimal? TryRound(decimal? value)
		{
			if (value != null && RoundDecimals >= 0)
				value = Math.Round(value.Value, RoundDecimals);

			return value;
		}

		/// <summary>
		/// To calculate the option premium.
		/// </summary>
		/// <param name="currentTime">The current time.</param>
		/// <param name="deviation">The standard deviation. If it is not specified, then <see cref="BlackScholes.DefaultDeviation"/> is used.</param>
		/// <param name="assetPrice">The price of the underlying asset. If the price is not specified, then the last trade price getting from <see cref="BlackScholes.UnderlyingAsset"/>.</param>
		/// <returns>The option premium. If the value is equal to <see langword="null" />, then the value calculation currently is impossible.</returns>
		public virtual decimal? Premium(DateTimeOffset currentTime, decimal? deviation = null, decimal? assetPrice = null)
		{
			deviation = deviation ?? DefaultDeviation;
			assetPrice = GetAssetPrice(assetPrice);

			if (assetPrice == null)
				return null;

			var timeToExp = GetExpirationTimeLine(currentTime);

			if (timeToExp == null)
				return null;

			return TryRound(DerivativesHelper.Premium(OptionType, GetStrike(), assetPrice.Value, RiskFree, Dividend, deviation.Value, timeToExp.Value, D1(deviation.Value, assetPrice.Value, timeToExp.Value)));
		}

		/// <summary>
		/// To calculate the option delta.
		/// </summary>
		/// <param name="currentTime">The current time.</param>
		/// <param name="deviation">The standard deviation. If it is not specified, then <see cref="BlackScholes.DefaultDeviation"/> is used.</param>
		/// <param name="assetPrice">The price of the underlying asset. If the price is not specified, then the last trade price getting from <see cref="BlackScholes.UnderlyingAsset"/>.</param>
		/// <returns>The option delta. If the value is equal to <see langword="null" />, then the value calculation currently is impossible.</returns>
		public virtual decimal? Delta(DateTimeOffset currentTime, decimal? deviation = null, decimal? assetPrice = null)
		{
			assetPrice = GetAssetPrice(assetPrice);

			if (assetPrice == null)
				return null;

			var timeToExp = GetExpirationTimeLine(currentTime);

			if (timeToExp == null)
				return null;

			return TryRound(DerivativesHelper.Delta(OptionType, assetPrice.Value, D1(deviation ?? DefaultDeviation, assetPrice.Value, timeToExp.Value)));
		}

		/// <summary>
		/// To calculate the option gamma.
		/// </summary>
		/// <param name="currentTime">The current time.</param>
		/// <param name="deviation">The standard deviation. If it is not specified, then <see cref="BlackScholes.DefaultDeviation"/> is used.</param>
		/// <param name="assetPrice">The price of the underlying asset. If the price is not specified, then the last trade price getting from <see cref="BlackScholes.UnderlyingAsset"/>.</param>
		/// <returns>The option gamma. If the value is equal to <see langword="null" />, then the value calculation currently is impossible.</returns>
		public virtual decimal? Gamma(DateTimeOffset currentTime, decimal? deviation = null, decimal? assetPrice = null)
		{
			deviation = deviation ?? DefaultDeviation;
			assetPrice = GetAssetPrice(assetPrice);

			if (assetPrice == null)
				return null;

			var timeToExp = GetExpirationTimeLine(currentTime);

			if (timeToExp == null)
				return null;

			return TryRound(DerivativesHelper.Gamma(assetPrice.Value, deviation.Value, timeToExp.Value, D1(deviation.Value, assetPrice.Value, timeToExp.Value)));
		}

		/// <summary>
		/// To calculate the option vega.
		/// </summary>
		/// <param name="currentTime">The current time.</param>
		/// <param name="deviation">The standard deviation. If it is not specified, then <see cref="BlackScholes.DefaultDeviation"/> is used.</param>
		/// <param name="assetPrice">The price of the underlying asset. If the price is not specified, then the last trade price getting from <see cref="BlackScholes.UnderlyingAsset"/>.</param>
		/// <returns>The option vega. If the value is equal to <see langword="null" />, then the value calculation currently is impossible.</returns>
		public virtual decimal? Vega(DateTimeOffset currentTime, decimal? deviation = null, decimal? assetPrice = null)
		{
			assetPrice = GetAssetPrice(assetPrice);

			if (assetPrice == null)
				return null;

			var timeToExp = GetExpirationTimeLine(currentTime);

			if (timeToExp == null)
				return null;

			return TryRound(DerivativesHelper.Vega(assetPrice.Value, timeToExp.Value, D1(deviation ?? DefaultDeviation, assetPrice.Value, timeToExp.Value)));
		}

		/// <summary>
		/// To calculate the option theta.
		/// </summary>
		/// <param name="currentTime">The current time.</param>
		/// <param name="deviation">The standard deviation. If it is not specified, then <see cref="BlackScholes.DefaultDeviation"/> is used.</param>
		/// <param name="assetPrice">The price of the underlying asset. If the price is not specified, then the last trade price getting from <see cref="BlackScholes.UnderlyingAsset"/>.</param>
		/// <returns>The option theta. If the value is equal to <see langword="null" />, then the value calculation currently is impossible.</returns>
		public virtual decimal? Theta(DateTimeOffset currentTime, decimal? deviation = null, decimal? assetPrice = null)
		{
			deviation = deviation ?? DefaultDeviation;
			assetPrice = GetAssetPrice(assetPrice);

			if (assetPrice == null)
				return null;

			var timeToExp = GetExpirationTimeLine(currentTime);

			if (timeToExp == null)
				return null;

			return TryRound(DerivativesHelper.Theta(OptionType, GetStrike(), assetPrice.Value, RiskFree, deviation.Value, timeToExp.Value, D1(deviation.Value, assetPrice.Value, timeToExp.Value)));
		}

		/// <summary>
		/// To calculate the option rho.
		/// </summary>
		/// <param name="currentTime">The current time.</param>
		/// <param name="deviation">The standard deviation. If it is not specified, then <see cref="BlackScholes.DefaultDeviation"/> is used.</param>
		/// <param name="assetPrice">The price of the underlying asset. If the price is not specified, then the last trade price getting from <see cref="BlackScholes.UnderlyingAsset"/>.</param>
		/// <returns>The option rho. If the value is equal to <see langword="null" />, then the value calculation currently is impossible.</returns>
		public virtual decimal? Rho(DateTimeOffset currentTime, decimal? deviation = null, decimal? assetPrice = null)
		{
			deviation = deviation ?? DefaultDeviation;
			assetPrice = GetAssetPrice(assetPrice);

			if (assetPrice == null)
				return null;

			var timeToExp = GetExpirationTimeLine(currentTime);

			if (timeToExp == null)
				return null;

			return TryRound(DerivativesHelper.Rho(OptionType, GetStrike(), assetPrice.Value, RiskFree, deviation.Value, timeToExp.Value, D1(deviation.Value, assetPrice.Value, timeToExp.Value)));
		}

		/// <summary>
		/// To calculate the implied volatility.
		/// </summary>
		/// <param name="currentTime">The current time.</param>
		/// <param name="premium">The option premium.</param>
		/// <returns>The implied volatility. If the value is equal to <see langword="null" />, then the value calculation currently is impossible.</returns>
		public virtual decimal? ImpliedVolatility(DateTimeOffset currentTime, decimal premium)
		{
			//var timeToExp = GetExpirationTimeLine();
			return TryRound(DerivativesHelper.ImpliedVolatility(premium, diviation => Premium(currentTime, diviation)));
		}

		/// <summary>
		/// To calculate the d1 parameter of the option fulfilment probability estimating.
		/// </summary>
		/// <param name="deviation">Standard deviation.</param>
		/// <param name="assetPrice">Underlying asset price.</param>
		/// <param name="timeToExp">The option period before the expiration.</param>
		/// <returns>The d1 parameter.</returns>
		protected virtual double D1(decimal deviation, decimal assetPrice, double timeToExp)
		{
			return DerivativesHelper.D1(assetPrice, GetStrike(), RiskFree, Dividend, deviation, timeToExp);
		}

		/// <summary>
		/// To create the order book of volatility.
		/// </summary>
		/// <param name="currentTime">The current time.</param>
		/// <returns>The order book volatility.</returns>
		public virtual MarketDepth ImpliedVolatility(DateTimeOffset currentTime)
		{
			return DataProvider.GetMarketDepth(Option).ImpliedVolatility(this, currentTime);
		}

		internal decimal GetStrike()
		{
			return Option.Strike.Value;
		}
	}
}


text:
class CreateTracks < ActiveRecord::Migration
  def change
    create_table :tracks do |t|
      t.string :title
      t.string :artist
      t.string :spotify_track_id
      t.string :spotify_album_id
      t.string :spotify_artist_id

      t.timestamps null: false
    end
  end
end


text:
<?php

declare(strict_types=1);

namespace Sylius\Bundle\UiBundle\Twig;

use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;

final class TestHtmlAttributeExtension extends AbstractExtension
{
    private string $env;

    public function __construct(string $env)
    {
        $this->env = $env;
    }

    /**
     * @return TwigFunction[]
     */
    public function getFunctions(): array
    {
        return [
            new TwigFunction(
                'sylius_test_html_attribute',
                function (string $name, ?string $value = null): string {
                    if (strpos($this->env, 'test') === 0) {
                        return sprintf('data-test-%s="%s"', $name, (string) $value);
                    }

                    return '';
                },
                ['is_safe' => ['html']]
            ),
        ];
    }
}


text:
/**
 * Spring Data JPA repositories.
 */
package org.terracotta.demo.repository;


text:
(function($) {

	/**
	 * FlipClock Slovak Language Pack
	 *
	 * This class will used to translate tokens into the Slovak language.
	 *
	 */

	FlipClock.Lang.Slovak = {

		'years'   : 'Roky',
		'months'  : 'Mesiace',
		'days'    : 'Dni',
		'hours'   : 'Hodiny',
		'minutes' : 'Minúty',
		'seconds' : 'Sekundy'

	};

	/* Create various aliases for convenience */

	FlipClock.Lang['sk']      = FlipClock.Lang.Slovak;
	FlipClock.Lang['sk-sk']   = FlipClock.Lang.Slovak;
	FlipClock.Lang['slovak'] = FlipClock.Lang.Slovak;

}(jQuery));


text:
CREATE TABLE `ptws` (
  `dateID` varchar(8) NOT NULL,
  `date` text NOT NULL,
  `weather` text NOT NULL,
  `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`dateID`),
  KEY `dateID` (`dateID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


text:
/*
 * The first byte of the regexp internal "program" is actually this magic
 * number; the start node begins in the second byte.
 */
#define	MAGIC	0234


text:
@interface ENMBatteryManager : NSObject

-(id)initWithPowerSource;
-(int)getVoltage;
-(int)getAmperage;
-(int)getWattage;
-(double)getPercentage;
-(float)getTemperature;

@end