text:
set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles")

# The top level Makefile was generated from the following files:
set(CMAKE_MAKEFILE_DEPENDS
  "CMakeCache.txt"
  "../CMake/AppleInfo.plist"
  "../CMakeLists.txt"
  "CMakeFiles/3.4.1/CMakeCCompiler.cmake"
  "CMakeFiles/3.4.1/CMakeSystem.cmake"
  "CMakeFiles/feature_tests.c"
  "../cmake_uninstall.cmake.in"
  "../docs/Doxyfile.in"
  "../examples/CMakeLists.txt"
  "../src/CMakeLists.txt"
  "../src/glfw3.pc.in"
  "../src/glfw3Config.cmake.in"
  "../src/glfw_config.h.in"
  "../tests/CMakeLists.txt"
  "/opt/local/share/cmake-3.4/Modules/BasicConfigVersion-SameMajorVersion.cmake.in"
  "/opt/local/share/cmake-3.4/Modules/CMakeCCompiler.cmake.in"
  "/opt/local/share/cmake-3.4/Modules/CMakeCCompilerABI.c"
  "/opt/local/share/cmake-3.4/Modules/CMakeCInformation.cmake"
  "/opt/local/share/cmake-3.4/Modules/CMakeCommonLanguageInclude.cmake"
  "/opt/local/share/cmake-3.4/Modules/CMakeCompilerIdDetection.cmake"
  "/opt/local/share/cmake-3.4/Modules/CMakeConfigurableFile.in"
  "/opt/local/share/cmake-3.4/Modules/CMakeDetermineCCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/CMakeDetermineCompileFeatures.cmake"
  "/opt/local/share/cmake-3.4/Modules/CMakeDetermineCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/CMakeDetermineCompilerABI.cmake"
  "/opt/local/share/cmake-3.4/Modules/CMakeDetermineCompilerId.cmake"
  "/opt/local/share/cmake-3.4/Modules/CMakeDetermineSystem.cmake"
  "/opt/local/share/cmake-3.4/Modules/CMakeFindBinUtils.cmake"
  "/opt/local/share/cmake-3.4/Modules/CMakeGenericSystem.cmake"
  "/opt/local/share/cmake-3.4/Modules/CMakePackageConfigHelpers.cmake"
  "/opt/local/share/cmake-3.4/Modules/CMakeParseArguments.cmake"
  "/opt/local/share/cmake-3.4/Modules/CMakeParseImplicitLinkInfo.cmake"
  "/opt/local/share/cmake-3.4/Modules/CMakeSystem.cmake.in"
  "/opt/local/share/cmake-3.4/Modules/CMakeSystemSpecificInformation.cmake"
  "/opt/local/share/cmake-3.4/Modules/CMakeSystemSpecificInitialize.cmake"
  "/opt/local/share/cmake-3.4/Modules/CMakeTestCCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/CMakeTestCompilerCommon.cmake"
  "/opt/local/share/cmake-3.4/Modules/CMakeUnixFindMake.cmake"
  "/opt/local/share/cmake-3.4/Modules/CheckIncludeFile.c.in"
  "/opt/local/share/cmake-3.4/Modules/CheckIncludeFile.cmake"
  "/opt/local/share/cmake-3.4/Modules/CheckLibraryExists.cmake"
  "/opt/local/share/cmake-3.4/Modules/CheckSymbolExists.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/ADSP-DetermineCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/AppleClang-C-FeatureTests.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/AppleClang-C.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/AppleClang-DetermineCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/Borland-DetermineCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/Clang-DetermineCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/Clang-DetermineCompilerInternal.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/Clang.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/Compaq-C-DetermineCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/Cray-DetermineCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/Embarcadero-DetermineCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/Fujitsu-DetermineCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/GHS-DetermineCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/GNU-DetermineCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/GNU.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/HP-C-DetermineCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/IAR-DetermineCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/Intel-DetermineCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/MIPSpro-DetermineCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/MSVC-DetermineCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/PGI-DetermineCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/PathScale-DetermineCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/SCO-DetermineCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/SDCC-C-DetermineCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/SunPro-C-DetermineCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/TI-DetermineCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/Watcom-DetermineCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/XL-C-DetermineCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/Compiler/zOS-C-DetermineCompiler.cmake"
  "/opt/local/share/cmake-3.4/Modules/FindDoxygen.cmake"
  "/opt/local/share/cmake-3.4/Modules/FindOpenGL.cmake"
  "/opt/local/share/cmake-3.4/Modules/FindPackageHandleStandardArgs.cmake"
  "/opt/local/share/cmake-3.4/Modules/FindPackageMessage.cmake"
  "/opt/local/share/cmake-3.4/Modules/FindThreads.cmake"
  "/opt/local/share/cmake-3.4/Modules/Internal/FeatureTesting.cmake"
  "/opt/local/share/cmake-3.4/Modules/Platform/Darwin-AppleClang-C.cmake"
  "/opt/local/share/cmake-3.4/Modules/Platform/Darwin-Clang-C.cmake"
  "/opt/local/share/cmake-3.4/Modules/Platform/Darwin-Clang.cmake"
  "/opt/local/share/cmake-3.4/Modules/Platform/Darwin-Initialize.cmake"
  "/opt/local/share/cmake-3.4/Modules/Platform/Darwin.cmake"
  "/opt/local/share/cmake-3.4/Modules/Platform/UnixPaths.cmake"
  "/opt/local/share/cmake-3.4/Modules/WriteBasicConfigVersionFile.cmake"
  )

# The corresponding makefile is:
set(CMAKE_MAKEFILE_OUTPUTS
  "Makefile"
  "CMakeFiles/cmake.check_cache"
  )

# Byproducts of CMake generate step:
set(CMAKE_MAKEFILE_PRODUCTS
  "CMakeFiles/3.4.1/CMakeSystem.cmake"
  "CMakeFiles/3.4.1/CMakeCCompiler.cmake"
  "CMakeFiles/3.4.1/CMakeCCompiler.cmake"
  "src/glfw3Config.cmake"
  "src/glfw3ConfigVersion.cmake"
  "docs/Doxyfile"
  "src/glfw_config.h"
  "src/glfw3.pc"
  "cmake_uninstall.cmake"
  "CMakeFiles/CMakeDirectoryInformation.cmake"
  "src/CMakeFiles/CMakeDirectoryInformation.cmake"
  "examples/CMakeFiles/CMakeDirectoryInformation.cmake"
  "tests/CMakeFiles/CMakeDirectoryInformation.cmake"
  )

# Dependency information for all targets:
set(CMAKE_DEPEND_INFO_FILES
  "CMakeFiles/uninstall.dir/DependInfo.cmake"
  "src/CMakeFiles/glfw.dir/DependInfo.cmake"
  "examples/CMakeFiles/Wave.dir/DependInfo.cmake"
  "examples/CMakeFiles/Simple.dir/DependInfo.cmake"
  "examples/CMakeFiles/SplitView.dir/DependInfo.cmake"
  "examples/CMakeFiles/Particles.dir/DependInfo.cmake"
  "examples/CMakeFiles/Gears.dir/DependInfo.cmake"
  "examples/CMakeFiles/Heightmap.dir/DependInfo.cmake"
  "examples/CMakeFiles/Boing.dir/DependInfo.cmake"
  "tests/CMakeFiles/clipboard.dir/DependInfo.cmake"
  "tests/CMakeFiles/title.dir/DependInfo.cmake"
  "tests/CMakeFiles/windows.dir/DependInfo.cmake"
  "tests/CMakeFiles/threads.dir/DependInfo.cmake"
  "tests/CMakeFiles/gamma.dir/DependInfo.cmake"
  "tests/CMakeFiles/tearing.dir/DependInfo.cmake"
  "tests/CMakeFiles/monitors.dir/DependInfo.cmake"
  "tests/CMakeFiles/sharing.dir/DependInfo.cmake"
  "tests/CMakeFiles/empty.dir/DependInfo.cmake"
  "tests/CMakeFiles/peter.dir/DependInfo.cmake"
  "tests/CMakeFiles/cursor.dir/DependInfo.cmake"
  "tests/CMakeFiles/glfwinfo.dir/DependInfo.cmake"
  "tests/CMakeFiles/cursoranim.dir/DependInfo.cmake"
  "tests/CMakeFiles/reopen.dir/DependInfo.cmake"
  "tests/CMakeFiles/iconify.dir/DependInfo.cmake"
  "tests/CMakeFiles/joysticks.dir/DependInfo.cmake"
  "tests/CMakeFiles/events.dir/DependInfo.cmake"
  "tests/CMakeFiles/accuracy.dir/DependInfo.cmake"
  "tests/CMakeFiles/fsaa.dir/DependInfo.cmake"
  "tests/CMakeFiles/defaults.dir/DependInfo.cmake"
  )


text:
require 'logger'
require 'net/http'
require 'cgi'

class Ocular
    module DSL
        module File

            def getfullpath(file)
                return dirname + file
            end

        end

    end
end

redpajama_set_name: RedPajamaGithub


text:
package idbc.core.db;

/**
 * An ImageGroupType declares in which way an ImageGroup should be interpreted.
 * @author zing
 * @version 1.0
 * @since 1.0
 *
 */
public enum ImageGroupType
{
    /**
     * An image Stack is essentially an ordered List of Images.
     * Often, an application GUI allows the stack to be collapsed,
     * only showing the "uppermost" image (i.e. the first in the list).
     */
    Stack,
    /**
     * Within a VersionHistory ImageGroup, the images are to be
     * interpreted as different versions of the same image.
     * The list position in this case maps to the version,
     * i.e. the first in list is the oldest.
     */
    VersionHistory
}


text:
package software.amazon.awssdk.enhanced.dynamodb.internal;

import software.amazon.awssdk.annotations.NotThreadSafe;
import software.amazon.awssdk.annotations.SdkInternalApi;

/**
 * Internal configuration for attribute
 */
@SdkInternalApi
public final class AttributeConfiguration {
    private final boolean preserveEmptyObject;
    private final boolean ignoreNulls;

    public AttributeConfiguration(Builder builder) {
        this.preserveEmptyObject = builder.preserveEmptyObject;
        this.ignoreNulls = builder.ignoreNulls;
    }

    public boolean preserveEmptyObject() {
        return preserveEmptyObject;
    }

    public boolean ignoreNulls() {
        return ignoreNulls;
    }

    public static Builder builder() {
        return new Builder();
    }

    @NotThreadSafe
    public static final class Builder {
        private boolean preserveEmptyObject;
        private boolean ignoreNulls;

        private Builder() {
        }

        public Builder preserveEmptyObject(boolean preserveEmptyObject) {
            this.preserveEmptyObject = preserveEmptyObject;
            return this;
        }

        public Builder ignoreNulls(boolean ignoreNulls) {
            this.ignoreNulls = ignoreNulls;
            return this;
        }

        public AttributeConfiguration build() {
            return new AttributeConfiguration(this);
        }
    }
}


text:
<?php

declare(strict_types=1);

namespace Arcanedev\Support\Providers;

use Illuminate\Contracts\View\Factory as ViewFactory;

/**
 * Class     ViewComposerServiceProvider
 *
 * @author   ARCANEDEV <arcanedev.maroc@gmail.com>
 */
abstract class ViewComposerServiceProvider extends ServiceProvider
{
    /* -----------------------------------------------------------------
     |  Properties
     | -----------------------------------------------------------------
     */

    /**
     * Register the composer classes.
     *
     * @var array
     */
    protected $composerClasses = [
        // 'view-name' => 'class'
    ];

    /* -----------------------------------------------------------------
     |  Main Methods
     | -----------------------------------------------------------------
     */

    /**
     * Boot the view composer service provider.
     */
    public function boot()
    {
        $this->registerComposerClasses();
    }

    /**
     * Register the view composer classes.
     */
    protected function registerComposerClasses()
    {
        foreach ($this->composerClasses as $view => $class) {
            $this->composer($view, $class);
        }
    }

    /* -----------------------------------------------------------------
     |  Other Methods
     | -----------------------------------------------------------------
     */

    /**
     * Get the view factory instance.
     *
     * @return \Illuminate\Contracts\View\Factory
     */
    protected function view()
    {
        return $this->app->make(ViewFactory::class);
    }

    /**
     * Register a view composer event.
     *
     * @param  array|string     $views
     * @param  \Closure|string  $callback
     *
     * @return array
     */
    public function composer($views, $callback)
    {
        return $this->view()->composer($views, $callback);
    }
}


text:
{% extends 'base.html' %}
{% load i18n %}

{% block title %}{% translate "Send Print" %} - {{ block.super }}{% endblock %}

{% block content %}

    <form method="post" enctype="multipart/form-data">
      {% csrf_token %}

        {{ form }}
        {{ form_imgs }}

            <button type="submit">{% translate "Send Print" %}</button>

    </form>

{% endblock %}


text:
@interface SDLUnsubscribeWayPoints : SDLRPCRequest

@end

__deprecated_msg("Use SDLUnsubscribeWayPoints instead")
    @interface SDLUnsubscribeWaypoints : SDLUnsubscribeWayPoints
                                         @end


text:
package com.ddsnowboard.fantasystocksandroid.AsyncTasks;

import android.content.Context;
import android.os.AsyncTask;
import android.util.Log;

import com.ddsnowboard.fantasystocksandroid.Utilities;
import com.jameswk2.FantasyStocksAPI.FantasyStocksAPI;
import com.jameswk2.FantasyStocksAPI.Floor;
import com.jameswk2.FantasyStocksAPI.Player;
import com.jameswk2.FantasyStocksAPI.User;

import java.util.Arrays;
import java.util.function.Consumer;
import java.util.function.IntSupplier;

/**
 * This gets all the floors that the logged-in player belongs to.
 */

public class GetFloorsTask extends GetterTask<Floor[]> {
    public static final String TAG = "GetFloorsTask";

    public GetFloorsTask(Context ctx, Consumer<Floor[]> cb) {
        super(ctx, cb);
    }

    @Override
    protected Floor[] doInBackground(IntSupplier... voids) {
        // This one doesn't actually use the int suppliers. You can still use it though.
        // If I wanted to I could make them optional, using them if they're there and using the
        // context otherwise.
        User u = Utilities.login(ctx);
        return Arrays.stream(FantasyStocksAPI.getInstance().getUser().getPlayers())
                .map(p -> p.getFloor())
                .toArray(Floor[]::new);
    }

}


text:
const LocalFs = require("./LocalFs")

class Commands {

    static get HELP_CONNECT() {
        return "connect <optional_mongo_db_nick_name> <optional_mongo_db_URI_with_password>\n    - Connects to a mongo db.\n    - Saves the name URI pair into the mongo-file-store.txt file.\n    - If already saved it is enough to provide the name.\n    - If you don't want to save the server provide only the URI.\n    - To list all servers call it without parameters."
    }
    static get HELP() {
        return [
            "ls - Lists files and folders.",
            "tree - Lists recursively files and folders.",
            "find - Lists recursively all file paths.",
            "cd - Changes directory.",
            "pwd - Prints working directory.",
            "md <remote_path> - Makes directories and step into it.",
            "cat - Prints remote file to console.",
            "rm <remote_file_or_dir> - Removes a relative file or folder.",
            "clear - Removes all contents from current remote directory.",
            "up <from_local_dir> - Uploads local directory into the empty server folder.",
            "down <into_local_dir> - Downloads server folder into a new local directory.",
            Commands.HELP_CONNECT,
            "disconnect <optional_mongo_db_nick_name>\n    - Disconnects from the current mongo db.\n    - If you provide a name, it will be removed from the mongo-file-store.txt file.",
            "exit - Exits from this tool."
        ]
    }

    static get COMMANDS() {
        const help = Commands.HELP
        return help.map(line => {
            const ix = line.indexOf(" ")
            return ix > 0 ? line.substring(0, ix) : line
        })
    }

    constructor(connection) {
        this.connection = connection
    }

    async tree(parts) {
        const {treeFs}=this.connection
        if (parts.length > 1) throw new Error("Extra parameters are not supported.")
        const list = treeFs.getContents()
        list.sort((a, b) => {
            const depthA = a.path.split("").filter(c => c === '/').length
            const depthB = b.path.split("").filter(c => c === '/').length
            const lowDepthFirst = depthA - depthB
            if (lowDepthFirst !== 0) return lowDepthFirst
            return a.path.toLowerCase().localeCompare(b.path.toLowerCase())
        })
        const list2 = list.map(item => {
            const ix = item.path.lastIndexOf('/', item.path.length - 2)
            const start = item.path.substring(0, ix + 1)
            const prefix = start.split("").filter(c => c === '/').join("")
            const pre = prefix.replace(/\//g, '   ')
            return "" + pre + "" + (item.folder ? "" : "") + "└─ " + item.path.substring(ix + 1)
        })
        console.log(list2.join("\n"))
    }

    async find(parts) {
        const {treeFs}=this.connection
        if (parts.length > 1) throw new Error("Extra parameters are not supported.")
        const list = treeFs.getFiles()
        list.sort((a, b) => {
            const depthA = a.path.split("").filter(c => c === '/').length
            const depthB = b.path.split("").filter(c => c === '/').length
            const lowDepthFirst = depthA - depthB
            if (lowDepthFirst !== 0) return lowDepthFirst
            return a.path.toLowerCase().localeCompare(b.path.toLowerCase())
        })
        const list2 = list.map(item => item.path)
        console.log(list2.join("\n"))
    }

    async ls(parts) {
        const {treeFs}=this.connection
        if (parts.length > 1) throw new Error("Extra parameters are not supported.")
        const list = treeFs.ls()
        list.sort((a, b) => {
            const depthA = a.path.split("").filter(c => c === '/').length
            const depthB = b.path.split("").filter(c => c === '/').length
            const lowDepthFirst = depthA - depthB
            if (lowDepthFirst !== 0) return lowDepthFirst
            return a.name.toLowerCase().localeCompare(b.name.toLowerCase())
        })
        const list2 = list.map(item => item.name)
        console.log("" + list2.join("  "))
    }

    async pwd(parts) {
        const {treeFs}=this.connection
        let at = treeFs.pwd()
        console.log("at: " + (at || "/"))
    }

    async cd(parts) {
        const {treeFs}=this.connection
        treeFs.cd(parts[1])
    }

    async cat(parts) {
        const {treeFs, loadFile}=this.connection
        const path = treeFs.pwd() + parts[1]
        const entry = treeFs.getPath(path)
        if (entry) {
            const text = await loadFile(path)
            console.log(text)
        }
    }

    async down(parts) {
        const {treeFs, loadFile}=this.connection
        if (!parts[1]) throw new Error("Define a new local directory.\n" + listDir(".").join("  "))
        const into = parts[1]
        if (!into) throw new Error("Define a new local directory.\n" + listDir(".").join("  "))
        const exists = LocalFs.exists("./" + into)
        if (exists) throw new Error("Local directory already exists")
        const files = treeFs.getFiles()
        for (const file of files) {
            const text = await loadFile(file.path)
            const to = file.path.substring(treeFs.pwd().length)
            const path = "./" + into + "/" + to
            console.log("saving: " + file.path)
            LocalFs.saveFile(path, text)
        }
    }

    async clear(parts) {
        const {treeFs, deleteAll, updateTree}=this.connection
        if (parts[1]) throw new Error("Extra parameters not supported")
        const pwd = treeFs.pwd()
        const files = treeFs.getFiles()
        const paths = files.map(entry => entry.path)
        await deleteAll(paths)
        await updateTree(pwd)
    }

    async rm(parts) {
        const {treeFs, deleteAll, updateTree}=this.connection
        if (!parts[1]) throw new Error("Select a remote file or directory.")
        const ref = parts[1]
        const entry = treeFs.getFile(ref)
        if (!entry) throw new Error("File or directory doesn't exists: " + ref)
        const pwd = treeFs.pwd()
        let toRemove
        if (entry.folder) {
            const files = treeFs.getFiles(ref)
            toRemove = files.map(entry => entry.path)
        }
        else {
            toRemove = [entry.path]
        }
        await deleteAll(toRemove)
        await updateTree(pwd)
    }

    async md(parts) {
        const {treeFs}=this.connection
        const relative = parts[1]
        if (!relative) throw new Error("Define a directory name.")
        treeFs.md(relative)
        console.log("at: " + treeFs.pwd())
    }

    async up(parts) {
        const {treeFs, save, updateTree}=this.connection
        const already = treeFs.getFiles()
        if (already.length > 0)
            throw new Error("Remote directory is not empty:\n" + already.map(file => file.path).join("  "))
        const from = parts[1]
        if (!from) throw new Error("Select a local file or directory:\n" + listDir(".").join("  "))
        const exists = LocalFs.exists("./" + from)
        if (!exists) throw new Error("Local file or directory doesn't exists:\n" + listDir(".").join("  "))
        const files = LocalFs.listFiles("./" + from)
        for (const file of files) {
            const buffer = LocalFs.readFile(file)
            const rel = file.substring(("./" + from + "/").length)
            const path = treeFs.pwd() + rel
            console.log("uploading: " + path)
            await save(path, buffer)
        }
        const pwd = treeFs.pwd()
        await updateTree(pwd)
    }

}

module.exports = Commands


text:
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>W21893_extracted</title>
        <link rel="stylesheet" type="text/css" href="style.css" />

                »

    <p class="styleSans11.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">GMX Resources Inc. Confidenlial - Tight Hole Frank 31-3-1 H Lot 2 (NW NE), 239' FNL and 2220' FEL Sec. 3 (Surface)
SE SW, 249' FSL and 1863' FWL Sec. 10 (Bottom Hole) T140N - RQBW DRILLING PROGRAM
Stark Conny, Norm Dakota Page 2

    <p class="styleSans2.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans153.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">T - e and Amount
Lead: 198 sx Varicem + 3.25 pps LCM at 11.5 ppg. Tail: 343 sx Varicem + 0.25 pps LCM at 13 ppg

TOC @ Surface (541 sx)
Intermediate Type and Amount
TOC @ 4925' Lead Slurry 1: Tuned Spacer II (773 sx) Lead Spacer 2: 321 sx Econocem + 3% Microbond HT + LCM at 11.8 ppg Tail: 452 sx Extendacem + 3% Microbond HT + 0.6% HR-5 + LCM at 13 . . .

    <p class="styleSans4.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans95.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans2.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans13.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">The anticipated type and amount of testing, logging and coring are as follows:
a. No drill stem tests are anticipated.
b. The logging program will consist of a MWD/GR. Triple Combo (Resistivity, GR, SP. DensityNeutron). .

    <p class="styleSans9.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">The cement program will be as follows:

    <p class="styleSans12.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">MUD PROGRAM
a. The proposed circulating mediums to be employed in drilling are as follows:

    <p class="styleSans9.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">EVALUATION PROGRAM


text:
package net.larry1123.elec.util.logger;

import java.io.PrintWriter;
import java.io.StringWriter;
import java.text.SimpleDateFormat;
import java.util.logging.Level;
import java.util.logging.LogRecord;
import java.util.logging.SimpleFormatter;

public class UtilsLogFormat extends SimpleFormatter {

    private final SimpleDateFormat dateform = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss");
    private final String linesep = System.getProperty("line.separator");

    /**
     * {@inheritDoc}
     * <p/>
     * [Level] [Prefix] Message
     */
    @Override
    public final String format(LogRecord rec) {
        Level level = rec.getLevel();
        StringBuilder message = new StringBuilder();
        message.append(dateform.format(rec.getMillis())).append(" ");
        message.append("[").append(level.getName()).append("] ");
        if (level instanceof LoggerLevel) {
            LoggerLevel handle = (LoggerLevel) level;
            if (!handle.getPrefix().equals("")) {
                message.append("[").append(handle.getPrefix()).append("] ");
            }
        }
        message.append(rec.getMessage());

        message.append(linesep);
        if (rec.getThrown() != null) {
            StringWriter stringwriter = new StringWriter();
            rec.getThrown().printStackTrace(new PrintWriter(stringwriter));
            message.append(stringwriter.toString());
        }
        return message.toString();
    }

}


text:
package net.endhq.remoteentities.api.thinking;

public interface OneTimeDesire
{
	/**
	 * Checks if the desire is finished and can be removed
	 *
	 * @return true if it's done, false if not
	 */
	public boolean isFinished();
}


text:
Article 39
----
Ces actes seront signés par l'officier de l'état civil, par les comparants et
les témoins ; ou mention sera faite de la cause qui empêchera les comparants et
les témoins de signer.


text:
@interface DKScannerViewController () <UIImagePickerControllerDelegate, UINavigationControllerDelegate>
@property (nonatomic, strong, readwrite) DKScannerBorderView *scannerBorderView;
@property (nonatomic, strong, readwrite) DKScannerMaskView *maskView;
@property (nonatomic, strong, readwrite) UILabel *tipsLabel;
@property (nonatomic, strong) DKScannerCapture *scannerCapture;
@property (nonatomic) CGRect scanTargetFrame;
@end

@implementation DKScannerViewController

- (CGRect)scanTargetFrame
{
    CGFloat screenW = [UIScreen mainScreen].bounds.size.width;
    CGFloat screenH = [UIScreen mainScreen].bounds.size.height;
    CGFloat wh = screenW - DKScannerBorderViewMargin * 2;
    CGFloat x = screenW * 0.5 - wh * 0.5;
    CGFloat y = screenH * 0.5 - wh * 0.5;
    return CGRectMake(x, y, wh, wh);
}

- (DKScannerBorderView *)scannerBorderView
{
    if (!_scannerBorderView) {
        DKScannerBorderView *scannerBorderView = [[DKScannerBorderView alloc] init];
        scannerBorderView.tintColor = [UIColor whiteColor];
        _scannerBorderView = scannerBorderView;
    }
    return _scannerBorderView;
}

- (DKScannerMaskView *)maskView
{
    if (!_maskView) {
        _maskView = [DKScannerMaskView maskViewWithFrame:[UIScreen mainScreen].bounds cropRect:self.scanTargetFrame];
    }
    return _maskView;
}

- (UILabel *)tipsLabel
{
    if (!_tipsLabel) {
        UILabel *tipsLabel = [[UILabel alloc] init];
        tipsLabel.text = [NSBundle dk_localizedStringForKey:DKScannerPutAndScanText];
        tipsLabel.font = [UIFont systemFontOfSize:13];
        tipsLabel.textColor = [UIColor whiteColor];
        tipsLabel.textAlignment = NSTextAlignmentCenter;
        tipsLabel.numberOfLines = 0;
        [tipsLabel sizeToFit];
        _tipsLabel = tipsLabel;
    }
    return _tipsLabel;
}

#pragma mark - Life Cycle

- (instancetype)initWithCompletion:(DKScannerCompletion)completion
{
    if (self = [super init]) {
        self.completion = completion;
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];

    [self setupUI];
    [self setupScanner];
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];

    [self startScan];
}

- (void)viewWillDisappear:(BOOL)animated
{
    [super viewWillDisappear:animated];

    [self stopScan];
}

- (void)setupUI
{
    [self setupNavigationBar];
    [self setupScanerBorderView];
    [self setupMaskView];
    [self setupTipsLabel];
}

- (void)setupNavigationBar
{
    void(^setupNavigationBar)() = ^{
        self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
        self.navigationController.navigationBar.translucent = YES;
        self.navigationController.navigationBar.shadowImage = [[UIImage alloc] init];

        self.navigationItem.title = [NSBundle dk_localizedStringForKey:DKScannerScanText];
        self.navigationItem.leftBarButtonItem = [self barButtonItemWithTitle:[NSBundle dk_localizedStringForKey:DKScannerCloseText] action:@selector(closeBtnClick)];
        self.navigationItem.rightBarButtonItem = [self barButtonItemWithTitle:[NSBundle dk_localizedStringForKey:DKScannerAlbumText] action:@selector(albumBtnClick)];
    };

    if (self.navigationController) {
        setupNavigationBar();
    } else {
        dispatch_async(dispatch_get_main_queue(), ^{
            if (self.navigationController) {
                setupNavigationBar();
            }
        });
    }
}

- (void)setupScanerBorderView
{
    [self.view addSubview:self.scannerBorderView];

    [self.scannerBorderView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.mas_equalTo(self.scanTargetFrame.size);
        make.center.equalTo(self.view);
    }];
}

- (void)setupMaskView
{
    [self.view insertSubview:self.maskView atIndex:0];
}

- (void)setupTipsLabel
{
    [self.view addSubview:self.tipsLabel];

    // Constraints
    [self.tipsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.view);
        make.top.equalTo(self.scannerBorderView.mas_bottom).offset(DKScannerTipsLabelMargin);
        make.left.right.equalTo(self.view).offset(10);
    }];
}

- (void)setupScanner
{
    self.scannerCapture = [DKScannerCapture scanerWithView:self.view scanFrame:self.scanTargetFrame completion:^(NSString *result, NSError *error) {
        if (self.completion) {
            self.completion(result, error);
        }
        [self closeBtnClick];
    }];
}

#pragma mark - Private Method

- (UIBarButtonItem *)barButtonItemWithTitle:(NSString *)title action:(SEL)selector
{
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeSystem];
    [btn setTitle:title forState:UIControlStateNormal];
    [btn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [btn sizeToFit];
    [btn addTarget:self action:selector forControlEvents:UIControlEventTouchUpInside];

    return [[UIBarButtonItem alloc] initWithCustomView:btn];
}

#pragma mark - Events

- (void)startScan
{
    [self.scannerCapture startScan];
    [self.scannerBorderView startScannerAnimating];
}

- (void)stopScan
{
    [self.scannerCapture stopScan];
    [self.scannerBorderView stopScannerAnimating];
}

- (void)closeBtnClick
{
    if (self.navigationController.childViewControllers.count > 1) {
        [self.navigationController popViewControllerAnimated:YES];
    } else {
        [self dismissViewControllerAnimated:YES completion:nil];
    }
}

- (void)albumBtnClick
{
    if (![UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) {
        self.tipsLabel.text = [NSBundle dk_localizedStringForKey:DKScannerCanNotAccessText];
        return;
    }

    UIImagePickerController *picker = [[UIImagePickerController alloc] init];
    picker.view.backgroundColor = [UIColor whiteColor];
    picker.delegate = self;

    [self presentViewController:picker animated:YES completion:nil];
}

#pragma mark - <UIImagePickerControllerDelegate>

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<NSString *,id> *)info
{
    [picker dismissViewControllerAnimated:YES completion:nil];

    [DKScannerCapture scanWithImage:info[UIImagePickerControllerOriginalImage] completion:^(NSArray *values) {
        if (values.count) {
            [self dismissViewControllerAnimated:YES completion:^{
                self.completion(values.firstObject, nil);
            }];
        } else {
            NSString *errorStr = [NSBundle dk_localizedStringForKey:DKScannerCanNotDetectText];
            self.tipsLabel.text = errorStr;
            [self.tipsLabel sizeToFit];
            self.tipsLabel.center = CGPointMake(self.scannerBorderView.center.x, CGRectGetMaxY(self.scannerBorderView.frame) + DKScannerTipsLabelMargin);
            NSError *error = [NSError errorWithDomain:@"cn.dankal.scanner" code:0 userInfo:@{@"message":errorStr}];
            self.completion(nil, error);
        }
    }];
}

@end


text:
package gocast

import (
	"reflect"
)

// TryTo cast any input type into the target
func TryTo(v, to any, tags ...string) (any, error) {
	if v == nil || to == nil {
		return nil, errInvalidParams
	}
	return TryToType(v, reflect.ValueOf(to).Type(), tags...)
}

// TryTo cast any input type into the target
func To(v, to any, tags ...string) any {
	val, _ := TryTo(v, to, tags...)
	return val
}

// TryToType cast any input type into the target reflection
func TryToType(v any, t reflect.Type, tags ...string) (any, error) {
	if v == nil || t == nil {
		return nil, errInvalidParams
	}
	vl, err := ReflectTryToType(reflect.ValueOf(v), t, true, tags...)
	return vl, err
}

// ToType cast any input type into the target reflection
func ToType(v any, t reflect.Type, tags ...string) any {
	val, _ := TryToType(v, t, tags...)
	return val
}

// ReflectTryToType converts reflection value to reflection type or returns error
func ReflectTryToType(v reflect.Value, t reflect.Type, recursive bool, tags ...string) (any, error) {
	v = reflectTarget(v)
	var err error
	switch t.Kind() {
	case reflect.String:
		return Str(v.Interface()), nil
	case reflect.Bool:
		return Bool(v.Interface()), nil
	case reflect.Int:
		return Number[int](v.Interface()), nil
	case reflect.Int8:
		return Number[int8](v.Interface()), nil
	case reflect.Int16:
		return Number[int16](v.Interface()), nil
	case reflect.Int32:
		return Number[int32](v.Interface()), nil
	case reflect.Int64:
		return Number[int64](v.Interface()), nil
	case reflect.Uint:
		return Number[uint](v.Interface()), nil
	case reflect.Uint8:
		return Number[uint8](v.Interface()), nil
	case reflect.Uint16:
		return Number[uint16](v.Interface()), nil
	case reflect.Uint32:
		return Number[uint32](v.Interface()), nil
	case reflect.Uint64:
		return Number[uint64](v.Interface()), nil
	case reflect.Float32:
		return Number[float32](v.Interface()), nil
	case reflect.Float64:
		return Number[float64](v.Interface()), nil
	case reflect.Slice:
		slice := reflect.New(t)
		if err = ToSlice(slice.Interface(), v.Interface(), tags...); err == nil {
			return slice.Elem().Interface(), nil
		}
	case reflect.Map:
		mp := reflect.MakeMap(t).Interface()
		if err = ToMap(mp, v.Interface(), recursive, tags...); err == nil {
			return mp, nil
		}
	case reflect.Ptr:
		var vl any
		if vl, err = ReflectTryToType(v, t.Elem(), true, tags...); err == nil {
			if reflect.Ptr != t.Elem().Kind() {
				return vl, nil
			}
			vlPtr := reflect.Zero(t)
			val := reflect.ValueOf(vl)
			vlPtr.Set(val)
			return vlPtr.Interface(), nil
		}
	case reflect.Struct:
		st := reflect.New(t).Interface()
		if err = TryCopyStruct(st, v.Interface(), tags...); err == nil {
			return st, nil
		}
	}
	return nil, err
}

// ReflectToType converts reflection valut to reflection type or returns nil
func ReflectToType(v reflect.Value, t reflect.Type, tags ...string) any {
	val, _ := ReflectTryToType(v, t, true, tags...)
	return val
}

// TryCastValue source type into the target type
func TryCastValue[R any, T any](v T, recursive bool, tags ...string) (R, error) {
	var (
		rVal     R
		val, err = TryTo(v, rVal, tags...)
	)
	if err != nil {
		return rVal, err
	}
	return val.(R), nil
}

// TryCastRecursive source type into the target type with recursive data converting
func TryCastRecursive[R any, T any](v T, tags ...string) (R, error) {
	return TryCastValue[R](v, true, tags...)
}

// TryCast source type into the target type
func TryCast[R any, T any](v T, tags ...string) (R, error) {
	return TryCastValue[R](v, false, tags...)
}

// Cast source type into the target type
func Cast[R any, T any](v T, tags ...string) R {
	val, _ := TryCast[R](v, tags...)
	return val
}

// CastRecursive source type into the target type
func CastRecursive[R any, T any](v T, tags ...string) R {
	val, _ := TryCastRecursive[R](v, tags...)
	return val
}


text:
pyfibot-modules
===============
My collection of modules for https://github.com/lepinkainen/pyfibot


text:
using MasterDevs.ChromeDevTools;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;

namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target
{
	/// <summary>
	/// Deletes a BrowserContext, will fail of any open page uses it.
	/// </summary>
	[Command(ProtocolName.Target.DisposeBrowserContext)]
	[SupportedBy("Chrome")]
	public class DisposeBrowserContextCommand: ICommand<DisposeBrowserContextCommandResponse>
	{
		/// <summary>
		/// Gets or sets BrowserContextId
		/// </summary>
		public string BrowserContextId { get; set; }
	}
}


text:
// ZAP: 2012/01/12 Reflected the rename of the class ExtensionPopupMenu to
// ExtensionPopupMenuItem.
// ZAP: 2012/04/25 Added @Override annotation to all appropriate methods.
// ZAP: 2012/07/29 Issue 43: Cleaned up access to ExtensionHistory UI
// ZAP: 2013/03/03 Issue 546: Remove all template Javadoc comments
// ZAP: 2014/03/23 Changed to a JMenuItem.
// ZAP: 2016/07/25 Remove String constructor (unused/unnecessary)

package org.parosproxy.paros.extension.history;

import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.util.List;

import javax.swing.JFileChooser;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;

import org.apache.log4j.Logger;
import org.parosproxy.paros.Constant;
import org.parosproxy.paros.model.HistoryReference;
import org.parosproxy.paros.network.HttpMessage;

public class PopupMenuExportResponse extends JMenuItem {

	private static final long serialVersionUID = 1L;

	// ZAP: Added logger
    private static Logger log = Logger.getLogger(PopupMenuExportResponse.class);

    private ExtensionHistory extension = null;

    public PopupMenuExportResponse() {
        super(Constant.messages.getString("history.export.response.popup"));	// ZAP: i18n

        this.addActionListener(new java.awt.event.ActionListener() {

        	@Override
        	public void actionPerformed(java.awt.event.ActionEvent e) {

        		List<HistoryReference> hrefs = extension.getSelectedHistoryReferences();
        	    if (hrefs.size() == 0) {
                    extension.getView().showWarningDialog(Constant.messages.getString("history.export.response.select.warning"));        	        	// ZAP: i18n
                    return;
        	    }

                if (hrefs.size() > 1) {
                    extension.getView().showWarningDialog(Constant.messages.getString("history.export.response.single.warning"));	// ZAP: i18n
                    return;
                }

                HttpMessage msg = null;
                try {
                    msg = hrefs.get(0).getHttpMessage();
                } catch (Exception e1) {
                    extension.getView().showWarningDialog(Constant.messages.getString("history.export.response.read.warning"));	// ZAP: i18n
                    return;
                }

                if (msg.getResponseHeader().isEmpty() || msg.getResponseBody().length() == 0) {
                    extension.getView().showWarningDialog(Constant.messages.getString("history.export.response.body.warning"));	// ZAP: i18n
                    return;
                }

        	    File file = getOutputFile(msg);
        	    if (file == null) {
        	        return;
        	    }

        	    boolean isAppend = true;
        	    if (file.exists()) {
                    int rc = extension.getView().showYesNoCancelDialog(Constant.messages.getString("file.overwrite.warning"));
                    if (rc == JOptionPane.CANCEL_OPTION) {
                        return;
                    } else if (rc == JOptionPane.YES_OPTION) {
                        isAppend = false;
                    }
        	    }

        	    BufferedOutputStream bos = null;
                try {
                    bos = new BufferedOutputStream(new FileOutputStream(file, isAppend));
           	        exportHistory(msg, bos);

                } catch (Exception e1) {
                    extension.getView().showWarningDialog(Constant.messages.getString("file.save.error") + file.getAbsolutePath() + ".");
                	// ZAP: Log exceptions
                	log.warn(e1.getMessage(), e1);
                } finally {
            	    try {
            	        bos.close();
            	    } catch (Exception e2) {
                    	// ZAP: Log exceptions
                    	log.warn(e2.getMessage(), e2);
            	    }
                }
        	}
        });

	}

    void setExtension(ExtensionHistory extension) {
        this.extension = extension;
    }

    private void exportHistory(HttpMessage msg, BufferedOutputStream bos) {

        try {
            if (!msg.getResponseHeader().isEmpty()) {

                bos.write(msg.getResponseBody().getBytes());
            }

        } catch (Exception e) {
        	// ZAP: Log exceptions
        	log.warn(e.getMessage(), e);
        }

    }

    private File getOutputFile(HttpMessage msg) {

        String filename = "";
        try {
            filename = msg.getRequestHeader().getURI().getPath();
            int pos = filename.lastIndexOf("/");
            filename = filename.substring(pos);
        } catch (Exception e) {
        }
        JFileChooser chooser = new JFileChooser(extension.getModel().getOptionsParam().getUserDirectory());
        if (filename.length() > 0) {
            chooser.setSelectedFile(new File(filename));
        }

		File file = null;
	    int rc = chooser.showSaveDialog(extension.getView().getMainFrame());
	    if(rc == JFileChooser.APPROVE_OPTION) {
    		file = chooser.getSelectedFile();
    		if (file == null) {
    			return file;
    		}

            extension.getModel().getOptionsParam().setUserDirectory(chooser.getCurrentDirectory());

    		return file;

	    }
	    return file;
    }

}


text:
如果使用@EnableSpringHttpSession
则注释掉application.yml中的以下内容
spring:
    redis:
        database: 1
        host: 172.20.97.63
        pool:
            max-active: 20
并在GateBootstrap.java中添加如下Bean的定义
@Bean
public MapSessionRepository sessionRepository() {
        return new MapSessionRepository();
}
如果使用@EnableRedisHttpSession
则将application.yml中的以下内容去掉注释
spring:
    redis:
        database: 1
        host: 172.20.97.63
        pool:
            max-active: 20
并在GateBootstrap.java中去掉如下Bean的定义
@Bean
public MapSessionRepository sessionRepository() {
        return new MapSessionRepository();
}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="Ace.IM.Theme" parent="@android:style/Theme.DeviceDefault.Wallpaper.NoTitleBar"/>
</resources>


text:
using System;
using System.Collections.Generic;
using ZKWeb.Plugins.Common.Admin.src.Domain.Entities.Interfaces;
using ZKWeb.Plugins.Common.Admin.src.Domain.Services;
using ZKWeb.Plugins.Common.AdminSettings.src.UIComponents.MenuPages.Interfaces;
using ZKWeb.Plugins.Common.Base.src.Controllers.Bases;
using ZKWeb.Plugins.Common.Base.src.UIComponents.MenuItems;
using ZKWeb.Web;
using ZKWeb.Web.ActionResults;
using ZKWebStandard.Extensions;
using ZKWebStandard.Ioc;

namespace ZKWeb.Plugins.Common.AdminSettings.src.Controllers {
	/// <summary>
	/// 后台设置的Api控制器
	/// </summary>
	[ExportMany]
	public class AdminSettingsApiController : ControllerBase {
		/// <summary>
		/// 获取后台设置的菜单项分组列表
		/// </summary>
		/// <returns></returns>
		[Action("api/admin/settings/menu_groups")]
		public IActionResult AdminSettingsMenuGroups() {
			var privilegeManager = Application.Ioc.Resolve<PrivilegeManager>();
			privilegeManager.Check(typeof(ICanUseAdminPanel));
			var groups = new List<MenuItemGroup>();
			var handlers = Application.Ioc.ResolveMany<IAdminSettingsMenuProvider>();
			handlers.ForEach(h => h.Setup(groups));
			return new JsonResult(groups);
		}
	}
}


text:
from unittest import TestCase

import numpy as np

from sklearn import datasets, manifold
from manifold.infrastructure.base import EuclideanDistancesFromDataSet, class_stress

class EuclideanDistancesFromDataSetTest(TestCase):
    def test_basic(self):
        data_set = np.array([
            [0, 0, 0],
            [1, 0, 0],
            [1, 1, 0],
            [1, 1, 1],
        ])

        expected = {
            0: {1: 1, 2: 1.4142135623730951, 3: 1.7320508075688772},
            1: {2: 1, 3: 1.4142135623730951},
            2: {3: 1},
        }

        actual = EuclideanDistancesFromDataSet(data_set).run()

        self.assertDictEqual(expected, actual)

class ClassStressTest(TestCase):
    def test_basic(self):
        X, target = datasets.make_swiss_roll(n_samples=1000, random_state=0)
        Y = manifold.Isomap().fit_transform(X)
        result = class_stress(X, Y, target, n_jobs=8)

        self.fail(result)


text:
require 'active_record/version'

if ("%02d%03d%05d" % [ActiveRecord::VERSION::MAJOR, ActiveRecord::VERSION::MINOR, ActiveRecord::VERSION::TINY]) < '0200100000'
  # Fixes for not properly converting Date objects to their database equivalents.
  module ActiveRecord # :nodoc:
    module ConnectionAdapters # :nodoc:
      module Quoting # :nodoc:
        def quote(value, column = nil)
          return value.quoted_id if value.respond_to?(:quoted_id)

          case value
            when String, ActiveSupport::Multibyte::Chars
              value = value.to_s
              if column && column.type == :binary && column.class.respond_to?(:string_to_binary)
                "'#{quote_string(column.class.string_to_binary(value))}'" # ' (for ruby-mode)
              elsif column && [:integer, :float].include?(column.type)
                value = column.type == :integer ? value.to_i : value.to_f
                value.to_s
              else
                "'#{quote_string(value)}'" # ' (for ruby-mode)
              end
            when NilClass              then "NULL"
            when TrueClass             then (column && column.type == :integer ? '1' : quoted_true)
            when FalseClass            then (column && column.type == :integer ? '0' : quoted_false)
            when Float, Fixnum, Bignum then value.to_s
            # BigDecimals need to be output in a non-normalized form and quoted.
            when BigDecimal               then value.to_s('F')
            when Date                  then "'#{value.strftime("%Y-%m-%d")}'"
            when Time, DateTime        then "'#{quoted_date(value)}'"
            else                            "'#{quote_string(value.to_yaml)}'"
          end
        end
      end

      class SQLServerAdapter < AbstractAdapter # :nodoc:
        def quote(value, column = nil)
          case value
            when String
              if column && column.type == :binary && column.class.respond_to?(:string_to_binary)
                "'#{quote_string(column.class.string_to_binary(value))}'"
              else
                "'#{quote_string(value)}'"
              end
            when NilClass              then "NULL"
            when TrueClass             then '1'
            when FalseClass            then '0'
            when Float, Fixnum, Bignum then value.to_s
            when Date                  then "'#{value.strftime("%Y-%m-%d")}'"
            when Time, DateTime        then "'#{value.strftime("%Y-%m-%d %H:%M:%S")}'"
            else                            "'#{quote_string(value.to_yaml)}'"
          end
        end
      end

      class SybaseAdapter < AbstractAdapter # :nodoc:
        def quote(value, column = nil)
          case value
            when String
              if column && column.type == :binary && column.class.respond_to?(:string_to_binary)
                "#{quote_string(column.class.string_to_binary(value))}"
              elsif value =~ /^[+-]?[0-9]+$/o
                value
              else
                "'#{quote_string(value)}'"
              end
            when NilClass              then (column && column.type == :boolean) ? '0' : "NULL"
            when TrueClass             then '1'
            when FalseClass            then '0'
            when Float, Fixnum, Bignum then value.to_s
            when Date                  then "'#{value.strftime("%Y-%m-%d")}'"
            when Time, DateTime        then "'#{value.strftime("%Y-%m-%d %H:%M:%S")}'"
            else                            "'#{quote_string(value.to_yaml)}'"
          end
        end
      end

      class FirebirdAdapter < AbstractAdapter # :nodoc:
        def quote(value, column = nil)
          if [Time, DateTime].include?(value.class)
            "CAST('#{value.strftime("%Y-%m-%d %H:%M:%S")}' AS TIMESTAMP)"
          elsif value.class == Date
            "CAST('#{value.strftime("%Y-%m-%d")}' AS DATE)"
          else
            super
          end
        end
      end

      class SybaseAdapter < AbstractAdapter # :nodoc:
        def quote(value, column = nil)
          case value
            when String
              if column && column.type == :binary && column.class.respond_to?(:string_to_binary)
                "#{quote_string(column.class.string_to_binary(value))}"
              elsif value =~ /^[+-]?[0-9]+$/o
                value
              else
                "'#{quote_string(value)}'"
              end
            when NilClass              then (column && column.type == :boolean) ? '0' : "NULL"
            when TrueClass             then '1'
            when FalseClass            then '0'
            when Float, Fixnum, Bignum then value.to_s
            when Date                  then "'#{value.strftime("%Y-%m-%d")}'"
            when Time, DateTime        then "'#{value.strftime("%Y-%m-%d %H:%M:%S")}'"
            else                            "'#{quote_string(value.to_yaml)}'"
          end
        end
      end
    end
  end
end


text:
package org.sistemafinanciero.entity.type;

public enum EstadoCuentaAporte {
	ACTIVO, CONGELADO, INACTIVO
}


text:
import Checkbox from './Checkbox'
import Group from './Group';

Checkbox.Group = Group;

export default Checkbox


text:
setup() {
    cwd=`dirname "${BASH_SOURCE[0]}"` # Assumes that setup.bash is in the root of the concourse-bash-tests directory
    distribution_directory="$cwd/../concourse-server/build/distributions"

    # Check to see if the $DISTRIBUTION_DIRECTORY exists, if not fail immediately
    if [ ! -d $distribution_directory ]; then
        echo "Cannot run any unit test because the distribution directory does not exist:
        $distribution_directory
        Please run ./gradlew clean installer" >&2
        false
    fi

    # Get the name of the installer file
    installer=`ls $distribution_directory | grep ".bin$" | head -n 1`
    installer_filename=$distribution_directory/$installer
    if [ -z $installer ] || [ ! -e $installer_filename ]; then
        echo "Cannot run any unit tests because no installer exists in $distribution_directory.
        Please run ./gradlew clean installer" >&2
        false
    fi

    # Create temporary directory and copy the installer there
    CONCOURSE_TEMP_DIR=`mktemp -d $cwd/tmp/XXXXXX`
    CONCOURSE_INSTALLER_FILENAME=$CONCOURSE_TEMP_DIR/concourse-server.bin
    cp $installer_filename $CONCOURSE_INSTALLER_FILENAME
    extend_setup
}

# This teardown routine is run after each unit test.
teardown() {
    extend_teardown
    if [ -d "$CONCOURSE_TEMP_DIR" ]; then
        rm -r $CONCOURSE_TEMP_DIR
    fi
}

# This function can be overridden by tests deeper down the chain to provide additional setup logic.
extend_setup() {
    true
}

# This function can be overriden by tests deeper down the chain to provide additional teardown logic.
extend_teardown() {
    true
}


text:
<title>tcn_drw :: Functions (Hytool Toolbox)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="hytool.css">

HYTOOL Function Reference

tcn_drw

 Draw type curves with two boundaries

Syntax

tcn_drw()

Description

    Draw a series of type curves for the steady state discharge for a well
    located between a constant head and a no flow boundaries

See Also

tcn_dls

    Published output in the Help browser
       showdemo tcn_drw

Hytool

© 1998-2017 Philppe Renard and Co.
<tt class="minicdot">•</tt> Terms of Use
<tt class="minicdot">•</tt> Acknowledgments


text:
package com.miicard.consumers.service.v1.financial.impl;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import com.miicard.consumers.service.v1.claims.impl.MiiApiResponseOfFinancialRefreshStatus;

@SuppressWarnings("restriction")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "refreshFinancialDataCreditCardsResult"
})
@XmlRootElement(name = "RefreshFinancialDataCreditCardsResponse", namespace = "http://tempuri.org/")
public class RefreshFinancialDataCreditCardsResponse {
	@XmlElement(name = "RefreshFinancialDataCreditCardsResult", namespace = "http://tempuri.org/", nillable = true)
	private MiiApiResponseOfFinancialRefreshStatus refreshFinancialDataCreditCardsResult;

	protected MiiApiResponseOfFinancialRefreshStatus getRefreshFinancialDataCreditCardsResult() {
		return refreshFinancialDataCreditCardsResult;
	}

	protected void setRefreshFinancialDataCreditCardsResult(
			final MiiApiResponseOfFinancialRefreshStatus refreshFinancialDataCreditCardsResult) {
		this.refreshFinancialDataCreditCardsResult = refreshFinancialDataCreditCardsResult;
	}
}


text:
touch /home/rtws/sudoers
cat /etc/sudoers >> /home/rtws/sudoers

origFile=/home/rtws/sudoers
tmpFile=/usr/local/rtws/ca/conf/sudoers.ca

cmdLine=`grep Cmnd_Alias $tmpFile`

lineNumber=`sed -n '/# Cmnd alias specification/=' $origFile  | head -n 1`

((lineNumber++))

#add cmd alias
sed -i "$lineNumber i\\$cmdLine" $origFile

#add jetty user
grep jetty $tmpFile >> /home/rtws/sudoers

mv /home/rtws/sudoers /etc/sudoers
chown root:root /etc/sudoers
chmod 440 /etc/sudoers


text:
package io.reflectoring.boundaries;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class BoundariesApplication {

	public static void main(String[] args) {
		SpringApplication.run(BoundariesApplication.class, args);
	}

}


text:
@interface PPCalendarVC : UIViewController

@end


text:
/**
 * Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/)
 * http://cssreset.com
 */

 html, body, div, span, applet, object, iframe,
 h1, h2, h3, h4, h5, h6, p, blockquote, pre,
 a, abbr, acronym, address, big, cite, code,
 del, dfn, em, img, ins, kbd, q, s, samp,
 small, strike, strong, sub, sup, tt, var,
 b, u, i, center,
 dl, dt, dd, ol, ul, li,
 fieldset, form, label, legend,
 table, caption, tbody, tfoot, thead, tr, th, td,
 article, aside, canvas, details, embed,
 figure, figcaption, footer, header, hgroup,
 menu, nav, output, ruby, section, summary,
 time, mark, audio, video{
   margin: 0;
   padding: 0;
   border: 0;
   font-size: 100%;
   font: inherit;
   font-weight: normal;
   vertical-align: baseline;
 }
 /* HTML5 display-role reset for older browsers */
 article, aside, details, figcaption, figure,
 footer, header, hgroup, menu, nav, section{
   display: block;
 }
 ol, ul, li{
   list-style: none;
 }
 blockquote, q{
   quotes: none;
 }
 blockquote:before, blockquote:after,
 q:before, q:after{
   content: '';
   content: none;
 }
 table{
   border-collapse: collapse;
   border-spacing: 0;
 }

 /* custom */
 a{
   color: #7e8c8d;
   text-decoration: none;
   -webkit-backface-visibility: hidden;
 }
 ::-webkit-scrollbar{
   width: 5px;
   height: 5px;
 }
 ::-webkit-scrollbar-track-piece{
   background-color: rgba(0, 0, 0, 0.2);
   -webkit-border-radius: 6px;
 }
 ::-webkit-scrollbar-thumb:vertical{
   height: 5px;
   background-color: rgba(125, 125, 125, 0.7);
   -webkit-border-radius: 6px;
 }
 ::-webkit-scrollbar-thumb:horizontal{
   width: 5px;
   background-color: rgba(125, 125, 125, 0.7);
   -webkit-border-radius: 6px;
 }
 html, body{
   width: 100%;
   font-family: "Arial", "Microsoft YaHei", "黑体", "宋体", "微软雅黑", sans-serif;
 }
 body{
   line-height: 1;
   -webkit-text-size-adjust: none;
   -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
 }
 html{
   overflow-y: scroll;
 }

 /*清除浮动*/
 .clearfix:before,
 .clearfix:after{
   content: " ";
   display: inline-block;
   height: 0;
   clear: both;
   visibility: hidden;
 }
 .clearfix{
   *zoom: 1;
 }

 /*隐藏*/
 .dn{
   display: none;
 }


text:
import 'mocha'
import { assert } from 'chai'

describe('Component: score', () => {
    let check

    beforeEach(() => {
        check = true
    })

    it('check test', () => {
        assert.equal(check, true)
    })
})


text:
/**
 * English
 *
 * LCD Menu Messages
 * Please note these are limited to 17 characters!
 *
 */
#ifndef LANGUAGE_EN_H
#define LANGUAGE_EN_H

#define WELCOME_MSG                         MACHINE_NAME " ready."
#define MSG_SD_INSERTED                     "Card inserted"
#define MSG_SD_REMOVED                      "Card removed"
#define MSG_MAIN                            "Main"
#define MSG_AUTOSTART                       "Autostart"
#define MSG_DISABLE_STEPPERS                "Disable steppers"
#define MSG_AUTO_HOME                       "Auto home"
#define MSG_SET_HOME_OFFSETS                "Set home offsets"
#define MSG_SET_ORIGIN                      "Set origin"
#define MSG_PREHEAT_PLA                     "Preheat PLA"
#define MSG_PREHEAT_PLA0                    "Preheat PLA 1"
#define MSG_PREHEAT_PLA1                    "Preheat PLA 2"
#define MSG_PREHEAT_PLA2                    "Preheat PLA 3"
#define MSG_PREHEAT_PLA012                  "Preheat PLA All"
#define MSG_PREHEAT_PLA_BEDONLY             "Preheat PLA Bed"
#define MSG_PREHEAT_PLA_SETTINGS            "Preheat PLA conf"
#define MSG_PREHEAT_ABS                     "Preheat ABS"
#define MSG_PREHEAT_ABS0                    "Preheat ABS 1"
#define MSG_PREHEAT_ABS1                    "Preheat ABS 2"
#define MSG_PREHEAT_ABS2                    "Preheat ABS 3"
#define MSG_PREHEAT_ABS012                  "Preheat ABS All"
#define MSG_PREHEAT_ABS_BEDONLY             "Preheat ABS Bed"
#define MSG_PREHEAT_ABS_SETTINGS            "Preheat ABS conf"
#define MSG_COOLDOWN                        "Cooldown"
#define MSG_SWITCH_PS_ON                    "Switch power on"
#define MSG_SWITCH_PS_OFF                   "Switch power off"
#define MSG_EXTRUDE                         "Extrude"
#define MSG_RETRACT                         "Retract"
#define MSG_MOVE_AXIS                       "Move axis"
#define MSG_MOVE_X                          "Move X"
#define MSG_MOVE_Y                          "Move Y"
#define MSG_MOVE_Z                          "Move Z"
#define MSG_MOVE_01MM                       "Move 0.1mm"
#define MSG_MOVE_1MM                        "Move 1mm"
#define MSG_MOVE_10MM                       "Move 10mm"
#define MSG_SPEED                           "Speed"
#define MSG_NOZZLE                          "Nozzle"
#define MSG_NOZZLE1                         "Nozzle2"
#define MSG_NOZZLE2                         "Nozzle3"
#define MSG_BED                             "Bed"
#define MSG_FAN_SPEED                       "Fan speed"
#define MSG_FLOW                            "Flow"
#define MSG_FLOW0                           "Flow 0"
#define MSG_FLOW1                           "Flow 1"
#define MSG_FLOW2                           "Flow 2"
#define MSG_CONTROL                         "Control"
#define MSG_MIN                             " \002 Min"
#define MSG_MAX                             " \002 Max"
#define MSG_FACTOR                          " \002 Fact"
#define MSG_ON                              "On "
#define MSG_OFF                             "Off"
#define MSG_PID_P                           "PID-P"
#define MSG_PID_I                           "PID-I"
#define MSG_PID_D                           "PID-D"
#define MSG_PID_C                           "PID-C"
#define MSG_ACC                             "Accel"
#define MSG_VXY_JERK                        "Vxy-jerk"
#define MSG_VZ_JERK                         "Vz-jerk"
#define MSG_VE_JERK                         "Ve-jerk"
#define MSG_VMAX                            "Vmax "
#define MSG_X                               "x"
#define MSG_Y                               "y"
#define MSG_Z                               "z"
#define MSG_E                               "e"
#define MSG_VMIN                            "Vmin"
#define MSG_VTRAV_MIN                       "VTrav min"
#define MSG_AMAX                            "Amax "
#define MSG_A_RETRACT                       "A-retract"
#define MSG_XSTEPS                          "Xsteps/mm"
#define MSG_YSTEPS                          "Ysteps/mm"
#define MSG_ZSTEPS                          "Zsteps/mm"
#define MSG_ESTEPS                          "Esteps/mm"
#define MSG_TEMPERATURE                     "Temperature"
#define MSG_MOTION                          "Motion"
#define MSG_CONTRAST                        "LCD contrast"
#define MSG_STORE_EPROM                     "Store memory"
#define MSG_LOAD_EPROM                      "Load memory"
#define MSG_RESTORE_FAILSAFE                "Restore failsafe"
#define MSG_REFRESH                         "Refresh"
#define MSG_WATCH                           "Info screen"
#define MSG_PREPARE                         "Prepare"
#define MSG_TUNE                            "Tune"
#define MSG_PAUSE_PRINT                     "Pause print"
#define MSG_RESUME_PRINT                    "Resume print"
#define MSG_STOP_PRINT                      "Stop print"
#define MSG_CARD_MENU                       "Print from SD"
#define MSG_NO_CARD                         "No SD card"
#define MSG_DWELL                           "Sleep..."
#define MSG_USERWAIT                        "Wait for user..."
#define MSG_RESUMING                        "Resuming print"
#define MSG_PRINT_ABORTED                   "Print aborted"
#define MSG_NO_MOVE                         "No move."
#define MSG_KILLED                          "KILLED. "
#define MSG_STOPPED                         "STOPPED. "
#define MSG_CONTROL_RETRACT                 "Retract mm"
#define MSG_CONTROL_RETRACT_SWAP            "Swap Re.mm"
#define MSG_CONTROL_RETRACTF                "Retract  V"
#define MSG_CONTROL_RETRACT_ZLIFT           "Hop mm"
#define MSG_CONTROL_RETRACT_RECOVER         "UnRet +mm"
#define MSG_CONTROL_RETRACT_RECOVER_SWAP    "S UnRet+mm"
#define MSG_CONTROL_RETRACT_RECOVERF        "UnRet  V"
#define MSG_AUTORETRACT                     "AutoRetr."
#define MSG_FILAMENTCHANGE                  "Change filament"
#define MSG_INIT_SDCARD                     "Init. SD card"
#define MSG_CNG_SDCARD                      "Change SD card"
#define MSG_ZPROBE_OUT                      "Z probe out. bed"
#define MSG_POSITION_UNKNOWN                "Home X/Y before Z"
#define MSG_ZPROBE_ZOFFSET                  "Z Offset"
#define MSG_BABYSTEP_X                      "Babystep X"
#define MSG_BABYSTEP_Y                      "Babystep Y"
#define MSG_BABYSTEP_Z                      "Babystep Z"
#define MSG_ENDSTOP_ABORT                   "Endstop abort"

#define MSG_RECTRACT                        "Rectract"

#ifdef DELTA_CALIBRATION_MENU
    #define MSG_DELTA_CALIBRATE             "Delta Calibration"
    #define MSG_DELTA_CALIBRATE_X           "Calibrate X"
    #define MSG_DELTA_CALIBRATE_Y           "Calibrate Y"
    #define MSG_DELTA_CALIBRATE_Z           "Calibrate Z"
    #define MSG_DELTA_CALIBRATE_CENTER      "Calibrate Center"
#endif // DELTA_CALIBRATION_MENU

#endif // LANGUAGE_EN_H


text:
// -*- mode: C++ -*-
//
// Copyright (c) 2007, 2008, 2010, 2011 The University of Utah
// All rights reserved.
//
// This file is part of `csmith', a random generator of C programs.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
//   * Redistributions of source code must retain the above copyright notice,
//     this list of conditions and the following disclaimer.
//
//   * Redistributions in binary form must reproduce the above copyright
//     notice, this list of conditions and the following disclaimer in the
//     documentation and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.

#ifndef EXPRESSION_FUNCALL_H
#define EXPRESSION_FUNCALL_H

///////////////////////////////////////////////////////////////////////////////

#include <ostream>

#include "Expression.h"
#include "FunctionInvocation.h"

class CGContext;
class FunctionInvocation;
class ExpressionVariable;
class RecursiveCGContext;

/*
 *
 */
class ExpressionFuncall : public Expression
{
public:
	// Factory method.
	static Expression *make_random(CGContext &cg_context, const Type* type, const CVQualifiers* qfer=0);

	explicit ExpressionFuncall(const FunctionInvocation &fi);

	virtual ~ExpressionFuncall(void);

	virtual Expression* clone() const;

	virtual CVQualifiers get_qualifiers(void) const;

	virtual void get_eval_to_subexps(vector<const Expression*>& subs) const {subs.push_back(this);}

	virtual const FunctionInvocation* get_invoke(void) const { return &invoke; };

	virtual const Type &get_type(void) const;

	virtual void get_called_funcs(std::vector<const FunctionInvocationUser*>& funcs ) const;

	virtual unsigned int get_complexity(void) const;

	virtual bool visit_facts(vector<const Fact*>& inputs, CGContext& cg_context) const;

	virtual bool has_uncertain_call_recursive(void) const;

	virtual bool compatible(const Variable *) const;

	virtual bool compatible(const Expression *) const;

	virtual bool use_var(const Variable* v) const;

	virtual bool equals(int num) const { return invoke.equals(num);}
	virtual bool is_0_or_1(void) const { return invoke.is_0_or_1();}

	virtual std::vector<const ExpressionVariable*> get_dereferenced_ptrs(void) const;
	virtual void get_referenced_ptrs(std::vector<const Variable*>& ptrs) const;

	void Output(std::ostream &) const;
	virtual void indented_output(std::ostream &out, int indent) const;

private:
	const FunctionInvocation &invoke;

	explicit ExpressionFuncall(const ExpressionFuncall &efun);

	// unimplementable
	ExpressionFuncall &operator=(const ExpressionFuncall &ec);
};

///////////////////////////////////////////////////////////////////////////////

#endif // EXPRESSION_FUNCALL_H

// Local Variables:
// c-basic-offset: 4
// tab-width: 4
// End:

// End of file.


text:
#!/usr/bin/env node

/**
 * Module dependencies.
 */

var path = require('path');
var fs = require('fs');
var app = require('../app');
var debug = require('debug')('debug');
var https = require('https');

// Generated VIA:
// openssl genrsa -out private-key-for-self-signed-cert.pem 1024
var key = fs.readFileSync('private-key-for-self-signed-cert.pem')

// Generated VIA:
// openssl req -new -key private-key-for-self-signed-cert.pem \
//             -out cert-req-for-self-signed-cert.csr
// openssl x509 -req -in cert-req-for-self-signed-cert.csr \
//              -signkey private-key-for-self-signed-cert.pem \
//              -out     self-signed-cert.pem
var cert = fs.readFileSync('self-signed-cert.pem')

/**
 * Get port from environment and store in Express.
 */

var port = normalizePort(process.env.PORT || '3443');
app.set('port', port);
console.log('%s: PORT = %d', path.parse(__filename).name, port)

/**
 * Create HTTP server.
 */

var server = https.createServer({ key: key, cert: cert }, app);

/**
 * Listen on provided port, on all network interfaces.
 */

server.listen(port);
server.on('error', onError);
server.on('listening', onListening);

/**
 * Normalize a port into a number, string, or false.
 */

function normalizePort(val) {
  var port = parseInt(val, 10);

  if (isNaN(port)) {
    // named pipe
    return val;
  }

  if (port >= 0) {
    // port number
    return port;
  }

  return false;
}

/**
 * Event listener for HTTP server "error" event.
 */

function onError(error) {
  if (error.syscall !== 'listen') {
    throw error;
  }

  var bind = typeof port === 'string'
    ? 'Pipe ' + port
    : 'Port ' + port;

  // handle specific listen errors with friendly messages
  switch (error.code) {
    case 'EACCES':
      console.error(bind + ' requires elevated privileges');
      process.exit(1);
      break;
    case 'EADDRINUSE':
      console.error(bind + ' is already in use');
      process.exit(1);
      break;
    default:
      throw error;
  }
}

/**
 * Event listener for HTTP server "listening" event.
 */

function onListening() {
  var addr = server.address();
  var bind = typeof addr === 'string'
    ? 'pipe ' + addr
    : 'port ' + addr.port;
  debug('Listening on ' + bind);
}


text:
/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.facebook.presto.execution;

import com.facebook.presto.client.FailureInfo;
import com.facebook.presto.operator.TaskStats;
import com.facebook.presto.sql.planner.plan.PlanNodeId;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Function;
import com.google.common.base.Objects;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import org.joda.time.DateTime;

import javax.annotation.concurrent.Immutable;

import java.net.URI;
import java.util.List;
import java.util.Map;
import java.util.Set;

import static com.google.common.base.Preconditions.checkNotNull;

@Immutable
public class TaskInfo
{
    /**
     * The first valid version that will be returned for a remote task.
     */
    public static final long STARTING_VERSION = 1;

    /**
     * A value lower than {@link #STARTING_VERSION}. This value can be used to
     * create an initial local task that is always older than any remote task.
     */
    public static final long MIN_VERSION = 0;

    /**
     * A value larger than any valid value. This value can be used to create
     * a final local task that is always newer than any remote task.
     */
    public static final long MAX_VERSION = Long.MAX_VALUE;

    private final TaskId taskId;
    private final long version;
    private final TaskState state;
    private final URI self;
    private final DateTime lastHeartbeat;
    private final SharedBufferInfo outputBuffers;
    private final Set<PlanNodeId> noMoreSplits;
    private final TaskStats stats;
    private final List<FailureInfo> failures;
    private final Map<PlanNodeId, Set<?>> outputs;

    @JsonCreator
    public TaskInfo(@JsonProperty("taskId") TaskId taskId,
            @JsonProperty("version") long version,
            @JsonProperty("state") TaskState state,
            @JsonProperty("self") URI self,
            @JsonProperty("lastHeartbeat") DateTime lastHeartbeat,
            @JsonProperty("outputBuffers") SharedBufferInfo outputBuffers,
            @JsonProperty("noMoreSplits") Set<PlanNodeId> noMoreSplits,
            @JsonProperty("stats") TaskStats stats,
            @JsonProperty("failures") List<FailureInfo> failures,
            @JsonProperty("outputs") Map<PlanNodeId, Set<?>> outputs)
    {
        this.taskId = checkNotNull(taskId, "taskId is null");
        this.version = checkNotNull(version, "version is null");
        this.state = checkNotNull(state, "state is null");
        this.self = checkNotNull(self, "self is null");
        this.lastHeartbeat = checkNotNull(lastHeartbeat, "lastHeartbeat is null");
        this.outputBuffers = checkNotNull(outputBuffers, "outputBuffers is null");
        this.noMoreSplits = checkNotNull(noMoreSplits, "noMoreSplits is null");
        this.stats = checkNotNull(stats, "stats is null");

        if (failures != null) {
            this.failures = ImmutableList.copyOf(failures);
        }
        else {
            this.failures = ImmutableList.of();
        }

        this.outputs = ImmutableMap.copyOf(checkNotNull(outputs, "outputs is null"));
    }

    @JsonProperty
    public TaskId getTaskId()
    {
        return taskId;
    }

    @JsonProperty
    public long getVersion()
    {
        return version;
    }

    @JsonProperty
    public TaskState getState()
    {
        return state;
    }

    @JsonProperty
    public URI getSelf()
    {
        return self;
    }

    @JsonProperty
    public DateTime getLastHeartbeat()
    {
        return lastHeartbeat;
    }

    @JsonProperty
    public SharedBufferInfo getOutputBuffers()
    {
        return outputBuffers;
    }

    @JsonProperty
    public Set<PlanNodeId> getNoMoreSplits()
    {
        return noMoreSplits;
    }

    @JsonProperty
    public TaskStats getStats()
    {
        return stats;
    }

    @JsonProperty
    public List<FailureInfo> getFailures()
    {
        return failures;
    }

    @JsonProperty
    public Map<PlanNodeId, Set<?>> getOutputs()
    {
        return outputs;
    }

    @Override
    public String toString()
    {
        return Objects.toStringHelper(this)
                .add("taskId", taskId)
                .add("state", state)
                .toString();
    }

    public static Function<TaskInfo, TaskState> taskStateGetter()
    {
        return new Function<TaskInfo, TaskState>()
        {
            @Override
            public TaskState apply(TaskInfo taskInfo)
            {
                return taskInfo.getState();
            }
        };
    }
}


text:
package org.jetbrains.idea.devkit.build;

import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.actionSystem.LangDataKeys;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.module.ModuleManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.ui.configuration.ChooseModulesDialog;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.idea.devkit.DevKitBundle;
import org.jetbrains.idea.devkit.module.PluginModuleType;

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

public class PrepareAllToDeployAction extends PrepareToDeployAction {

  @Override
  public void actionPerformed(@NotNull final AnActionEvent e) {
    final Project project = e.getData(CommonDataKeys.PROJECT);
    if (project == null) return;

    List<Module> pluginModules = new ArrayList<>();
    for (Module aModule : ModuleManager.getInstance(project).getModules()) {
      if (PluginModuleType.isOfType(aModule)) {
        pluginModules.add(aModule);
      }
    }

    ChooseModulesDialog dialog = new ChooseModulesDialog(project,
                                                         pluginModules,
                                                         DevKitBundle.message("select.plugin.modules.title"),
                                                         DevKitBundle.message("select.plugin.modules.description"));
    if (dialog.showAndGet()) {
      doPrepare(dialog.getChosenElements(), project);
    }
  }

  @Override
  public void update(@NotNull AnActionEvent e) {
    long moduleCount = 0;
    final Project project = e.getData(CommonDataKeys.PROJECT);
    if (project != null) {
      moduleCount = Arrays.stream(ModuleManager.getInstance(project).getModules()).filter(PluginModuleType::isOfType)
        .limit(2).count();
    }
    boolean enabled = false;
    if (moduleCount > 1) {
      enabled = true;
    }
    else if (moduleCount > 0) {
      final Module module = e.getData(LangDataKeys.MODULE);
      if (module == null || !(PluginModuleType.isOfType(module))) {
        enabled = true;
      }
    }
    e.getPresentation().setVisible(enabled);
    e.getPresentation().setEnabled(enabled);
    if (enabled) {
      e.getPresentation().setText(DevKitBundle.message("prepare.for.deployment.all"));
    }
  }
}


text:
<?php
class Ingredients_Model extends CI_Model{
    public function __construct(){
        parent::__construct();
        $this->load->database();
    }
    public function get_user_ingredient($id){
        $sql = "SELECT * FROM u_ingredientes WHERE u_id = $id";
        $query = $this->db->query($sql);
        return $query->result();
    }
    public function get_ingredient_info($id){
        $sql = "SELECT * FROM i_info WHERE id = $id";
        $query = $this->db->query($sql);
        return $query->result();
    }
}


text:
#pragma once

#include <array>
#include <memory>
#include <optional>

#include "Runtime/CGameDebug.hpp"
#include "Runtime/CGameOptionsTouchBar.hpp"
#include "Runtime/CIOWin.hpp"
#include "Runtime/CToken.hpp"
#include "Runtime/RetroTypes.hpp"
#include "Runtime/Audio/CSfxManager.hpp"
#include "Runtime/Audio/CStaticAudioPlayer.hpp"
#include "Runtime/Camera/CCameraFilter.hpp"
#include "Runtime/Graphics/Shaders/CColoredQuadFilter.hpp"
#include "Runtime/Graphics/Shaders/CTexturedQuadFilter.hpp"
#include "Runtime/GuiSys/CGuiTextSupport.hpp"
#include "Runtime/Input/CRumbleGenerator.hpp"
#include "Runtime/MP1/CFrontEndUITouchBar.hpp"
#include "Runtime/MP1/CGBASupport.hpp"

#include <zeus/CVector3f.hpp>

namespace metaforce {
class CAudioGroupSet;
class CDependencyGroup;
class CGuiFrame;
class CGuiModel;
class CGuiSliderGroup;
class CGuiTableGroup;
class CGuiTableGroup;
class CGuiTextPane;
class CGuiWidget;
class CMoviePlayer;
class CSaveWorld;
class CStringTable;
class CTexture;
struct SObjectTag;

namespace MP1 {
class CNESEmulator;
class CSaveGameScreen;
class CQuitGameScreen;

class CFrontEndUI : public CIOWin {
public:
  enum class EPhase { LoadDepsGroup, LoadDeps, LoadFrames, LoadMovies, DisplayFrontEnd, ToPlayGame, ExitFrontEnd };
  enum class EScreen { OpenCredits, Title, AttractMovie, FileSelect, FusionBonus, ToPlayGame };
  enum class EMenuMovie {
    Stopped = -1,
    FirstStart = 0,
    StartLoop,
    StartFileSelectA,
    FileSelectLoop,
    FileSelectPlayGameA,
    FileSelectGBA,
    GBALoop,
    GBAFileSelectA,
    GBAFileSelectB
  };

  static void PlayAdvanceSfx();

  struct SGuiTextPair {
    std::array<CGuiTextPane*, 2> x0_panes{};
    void SetPairText(std::u16string_view str);
  };
  static SGuiTextPair FindTextPanePair(CGuiFrame* frame, std::string_view name);
  static void FindAndSetPairText(CGuiFrame* frame, std::string_view name, std::u16string_view str);

  struct SFileMenuOption {
    CGuiWidget* x0_base;

    /* filename, world, playtime, date */
    std::array<SGuiTextPair, 4> x4_textpanes;

    u32 x28_curField = 0;
    float x2c_chRate = ComputeRandom();

    static float ComputeRandom() { return rand() / float(RAND_MAX) * 30.f + 30.f; }
  };

  struct SNewFileSelectFrame {
    enum class ESubMenu { Root, EraseGame, EraseGamePopup, NewGamePopup };

    enum class EAction { None, GameOptions, FusionBonus, SlideShow };

    u32 x0_rnd;
    CSaveGameScreen* x4_saveUI;
    ESubMenu x8_subMenu = ESubMenu::Root;
    EAction xc_action = EAction::None;
    TLockedToken<CGuiFrame> x10_frme;
    CGuiFrame* x1c_loadedFrame = nullptr;
    CGuiTableGroup* x20_tablegroup_fileselect = nullptr;
    CGuiModel* x24_model_erase = nullptr;
    SGuiTextPair x28_textpane_erase;
    SGuiTextPair x30_textpane_cheats;
    SGuiTextPair x38_textpane_gba;
    CGuiTableGroup* x40_tablegroup_popup = nullptr;
    CGuiModel* x44_model_dash7 = nullptr;
    SGuiTextPair x48_textpane_popupadvance;
    SGuiTextPair x50_textpane_popupcancel;
    SGuiTextPair x58_textpane_popupextra;
    CGuiTextPane* x60_textpane_cancel = nullptr;
    std::array<SFileMenuOption, 3> x64_fileSelections;
    zeus::CVector3f xf8_model_erase_position;
    float x104_rowPitch = 0.f;
    float x108_curTime = 0.f;
    bool x10c_saveReady = false;
    bool x10d_needsEraseToggle = false;
    bool x10e_needsNewToggle = false;

    CFrontEndUITouchBar& m_touchBar;

    SNewFileSelectFrame(CSaveGameScreen* sui, u32 rnd, CFrontEndUITouchBar& touchBar);
    void FinishedLoading();
    bool PumpLoad();
    bool IsTextDoneAnimating() const;
    void Update(float dt);
    EAction ProcessUserInput(const CFinalInput& input, CFrontEndUITouchBar::EAction tbAction);
    void Draw() const;

    void HandleActiveChange(CGuiTableGroup* active);
    void DeactivateEraseGamePopup();
    void ActivateEraseGamePopup();
    void DeactivateNewGamePopup();
    void ActivateNewGamePopup();

    void ResetFrame();
    void ActivateErase();
    void ClearFrameContents();
    void SetupFrameContents();

    void DoPopupCancel(CGuiTableGroup* caller);
    void DoPopupAdvance(CGuiTableGroup* caller);
    void DoFileMenuCancel(CGuiTableGroup* caller);
    void DoSelectionChange(CGuiTableGroup* caller, int oldSel);
    void DoFileMenuAdvance(CGuiTableGroup* caller);

    static SFileMenuOption FindFileSelectOption(CGuiFrame* frame, int idx);
    static void StartTextAnimating(CGuiTextPane* text, std::u16string_view str, float chRate);
  };

  struct SFusionBonusFrame {
    struct SGBALinkFrame {
      enum class EUIType {
        Empty = -1,
        InsertPak = 0,
        ConnectSocket = 1,
        PressStartAndSelect = 2,
        BeginLink = 3,
        Linking = 4,
        LinkFailed = 5,
        LinkCompleteOrLinking = 6,
        TurnOffGBA = 7,
        Complete = 8,
        Cancelled = 9
      };

      enum class EAction { None = 0, Complete = 1, Cancelled = 2 };

      EUIType x0_uiType;
      CGBASupport* x4_gbaSupport;
      CGuiFrame* x8_frme;
      SGuiTextPair xc_textpane_instructions;
      CGuiTextPane* x14_textpane_yes = nullptr;
      CGuiTextPane* x18_textpane_no = nullptr;
      CGuiModel* x1c_model_gc = nullptr;
      CGuiModel* x20_model_gba = nullptr;
      CGuiModel* x24_model_cable = nullptr;
      CGuiModel* x28_model_circlegcport = nullptr;
      CGuiModel* x2c_model_circlegbaport = nullptr;
      CGuiModel* x30_model_circlestartselect = nullptr;
      CGuiModel* x34_model_pakout = nullptr;
      CGuiModel* x38_model_gbascreen = nullptr;
      CGuiModel* x3c_model_connect = nullptr;
      bool x40_linkInProgress;

      void SetUIText(EUIType tp);
      EAction ProcessUserInput(const CFinalInput& input, bool linkInProgress, CFrontEndUITouchBar::EAction tbAction);
      void Update(float dt);
      void FinishedLoading();
      void Draw();
      SGBALinkFrame(CGuiFrame* linkFrame, CGBASupport* support, bool linkInProgress);
    };

    enum class EAction { None, GoBack, PlayNESMetroid };

    std::unique_ptr<SGBALinkFrame> x0_gbaLinkFrame;
    std::unique_ptr<CGBASupport> x4_gbaSupport;
    EAction x8_action = EAction::None;
    TLockedToken<CGuiFrame> xc_gbaScreen;
    TLockedToken<CGuiFrame> x18_gbaLink;
    CGuiFrame* x24_loadedFrame = nullptr;
    CGuiTableGroup* x28_tablegroup_options = nullptr;
    CGuiTableGroup* x2c_tablegroup_fusionsuit = nullptr;
    SGuiTextPair x30_textpane_instructions;
    bool x38_lastDoDraw = false;
    bool x39_fusionNotComplete = false;
    bool x3a_mpNotComplete = false;

    CFrontEndUITouchBar& m_touchBar;

    bool m_gbaOverride = false;

    explicit SFusionBonusFrame(CFrontEndUITouchBar& touchBar);
    void FinishedLoading();
    bool PumpLoad();
    void SetTableColors(CGuiTableGroup* tbgp) const;
    void Update(float dt, CSaveGameScreen* saveUI);
    EAction ProcessUserInput(const CFinalInput& input, CSaveGameScreen* sui, CFrontEndUITouchBar::EAction tbAction);
    void Draw() const;

    void ResetCompletionFlags() {
      x39_fusionNotComplete = false;
      x3a_mpNotComplete = false;
    }

    void DoCancel(CGuiTableGroup* caller);
    void DoSelectionChange(CGuiTableGroup* caller, int oldSel);
    void DoAdvance(CGuiTableGroup* caller);
  };

  struct SFrontEndFrame {
    enum class EAction { None, StartGame, FusionBonus, GameOptions, SlideShow };

    u32 x0_rnd;
    EAction x4_action = EAction::None;
    TLockedToken<CGuiFrame> x8_frme;
    CGuiFrame* x14_loadedFrme = nullptr;
    CGuiTableGroup* x18_tablegroup_mainmenu = nullptr;
    SGuiTextPair x1c_gbaPair;
    SGuiTextPair x24_cheatPair;

    CFrontEndUITouchBar& m_touchBar;

    SFrontEndFrame(u32 rnd, CFrontEndUITouchBar& touchBar);
    void FinishedLoading();
    bool PumpLoad();
    void Update(float dt);
    EAction ProcessUserInput(const CFinalInput& input, CFrontEndUITouchBar::EAction tbAction);
    void Draw() const;
    void HandleActiveChange(CGuiTableGroup* active);

    void DoCancel(CGuiTableGroup* caller);
    void DoSelectionChange(CGuiTableGroup* caller, int oldSel);
    void DoAdvance(CGuiTableGroup* caller);
  };

  struct SNesEmulatorFrame {
    enum class EMode { Emulator, SaveProgress, ContinuePlaying, QuitNESMetroid };

    EMode x0_mode = EMode::Emulator;
    std::unique_ptr<CNESEmulator> x4_nesEmu;
    std::unique_ptr<CQuitGameScreen> x8_quitScreen;
    std::unique_ptr<CGuiTextSupport> xc_textSupport;
    float x10_remTime = 8.f;
    bool x14_emulationSuspended = false;
    bool x15_enableFiltering = true;

    SNesEmulatorFrame();
    void SetMode(EMode mode);
    void ProcessUserInput(const CFinalInput& input, CSaveGameScreen* sui);
    bool Update(float dt, CSaveGameScreen* saveUi);
    void Draw(CSaveGameScreen* saveUi) const;
  };

  struct SOptionsFrontEndFrame {
    float x0_uiAlpha = 0.f;
    TLockedToken<CGuiFrame> x4_frme;
    TLockedToken<CStringTable> x10_pauseScreen;
    CGuiFrame* x1c_loadedFrame = nullptr;
    CStringTable* x20_loadedPauseStrg = nullptr;
    CGuiTableGroup* x24_tablegroup_leftmenu = nullptr;
    CGuiTableGroup* x28_tablegroup_rightmenu = nullptr;
    CGuiTableGroup* x2c_tablegroup_double = nullptr;
    CGuiTableGroup* x30_tablegroup_triple = nullptr;
    CGuiSliderGroup* x34_slidergroup_slider = nullptr;
    float x38_rowPitch = 0.f;
    CSfxHandle x3c_sliderSfx;
    CRumbleGenerator x40_rumbleGen;
    bool x134_24_visible : 1 = true;
    bool x134_25_exitOptions : 1 = false;

    std::unique_ptr<CGameOptionsTouchBar> m_touchBar;
    bool m_touchBarInValue = false;
    bool m_touchBarValueDirty = false;

    SOptionsFrontEndFrame();

    void DoSliderChange(CGuiSliderGroup* caller, float value);
    void DoMenuCancel(CGuiTableGroup* caller);
    void DoMenuSelectionChange(CGuiTableGroup* caller, int oldSel);
    void DoLeftMenuAdvance(CGuiTableGroup* caller);

    void DeactivateRightMenu();
    void HandleRightSelectionChange();

    void SetRightUIText();
    void SetTableColors(CGuiTableGroup* tbgp) const;
    void FinishedLoading();
    bool PumpLoad();

    bool ProcessUserInput(const CFinalInput& input, CSaveGameScreen* sui);
    void Update(float dt, CSaveGameScreen* saveUi);
    void Draw() const;
  };

  bool CanShowSaveUI() const {
    if (x50_curScreen != EScreen::FileSelect && x50_curScreen != EScreen::FusionBonus)
      return false;
    if (x54_nextScreen != EScreen::FileSelect && x54_nextScreen != EScreen::FusionBonus)
      return false;
    return true;
  }

private:
  EPhase x14_phase = EPhase::LoadDepsGroup;
  u32 x18_rndA;
  u32 x1c_rndB;
  TLockedToken<CDependencyGroup> x20_depsGroup;
  std::vector<CToken> x2c_deps;
  TLockedToken<CTexture> x38_pressStart;
  TLockedToken<CAudioGroupSet> x44_frontendAudioGrp;
  EScreen x50_curScreen = EScreen::OpenCredits;
  EScreen x54_nextScreen = EScreen::OpenCredits;
  float x58_fadeBlackTimer = 0.f;
  bool x5c_fadeBlackWithMovie = false;
  float x60_pressStartTime = 0.f;
  float x64_pressStartAlpha = 0.f;
  float x68_musicVol = 1.f;
  u32 x6c_;
  std::array<std::unique_ptr<CMoviePlayer>, 9> x70_menuMovies;
  EMenuMovie xb8_curMovie = EMenuMovie::Stopped;
  int xbc_nextAttract = 0;
  int xc0_attractCount = 0;
  std::unique_ptr<CMoviePlayer> xc4_attractMovie;
  CMoviePlayer* xcc_curMoviePtr = nullptr;
  bool xd0_playerSkipToTitle = false;
  bool xd1_moviesLoaded = false;
  bool xd2_deferSlideShow = false;
  std::unique_ptr<CStaticAudioPlayer> xd4_audio1;
  std::unique_ptr<CStaticAudioPlayer> xd8_audio2;
  std::unique_ptr<CSaveGameScreen> xdc_saveUI;
  std::unique_ptr<SNewFileSelectFrame> xe0_frontendCardFrme;
  std::unique_ptr<SFusionBonusFrame> xe4_fusionBonusFrme;
  std::unique_ptr<SFrontEndFrame> xe8_frontendNoCardFrme;
  std::unique_ptr<SNesEmulatorFrame> xec_emuFrme;
  std::unique_ptr<SOptionsFrontEndFrame> xf0_optionsFrme;
  CStaticAudioPlayer* xf4_curAudio = nullptr;

  CColoredQuadFilter m_fadeToBlack{EFilterType::Blend};
  std::optional<CTexturedQuadFilterAlpha> m_pressStartQuad;

  std::unique_ptr<CFrontEndUITouchBar> m_touchBar;

  void SetFadeBlackWithMovie() {
    x58_fadeBlackTimer = 1000000.f;
    x5c_fadeBlackWithMovie = true;
  }

  void SetFadeBlackTimer(float seconds) {
    x58_fadeBlackTimer = seconds;
    x5c_fadeBlackWithMovie = false;
  }

  void TransitionToGame();
  void UpdateMusicVolume();
  void FinishedLoadingDepsGroup();
  bool PumpLoad();

public:
  CFrontEndUI();
  ~CFrontEndUI();
  void StartSlideShow(CArchitectureQueue& queue);
  std::string GetAttractMovieFileName(int idx);
  std::string GetNextAttractMovieFileName();
  void SetCurrentMovie(EMenuMovie movie);
  void StopAttractMovie();
  void StartAttractMovie();
  void StartStateTransition(EScreen screen);
  void CompleteStateTransition();
  void HandleDebugMenuReturnValue(CGameDebug::EReturnValue val, CArchitectureQueue& queue);
  void Draw() override;
  void UpdateMovies(float dt);
  bool PumpMovieLoad();
  void ProcessUserInput(const CFinalInput& input, CArchitectureQueue& queue);
  EMessageReturn Update(float dt, CArchitectureQueue& queue);
  EMessageReturn OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue) override;
};

} // namespace MP1
} // namespace metaforce


text:
require "chef/log"
require "chef/provider"
require "chef/mixin/command"
require "fileutils"

class Chef
  class Provider
    class Subversion < Chef::Provider

      provides :subversion

      SVN_INFO_PATTERN = /^([\w\s]+): (.+)$/

      include Chef::Mixin::Command

      def whyrun_supported?
        true
      end

      def load_current_resource
        @current_resource = Chef::Resource::Subversion.new(@new_resource.name)

        unless [:export, :force_export].include?(Array(@new_resource.action).first)
          if current_revision = find_current_revision
            @current_resource.revision current_revision
          end
        end
      end

      def define_resource_requirements
        requirements.assert(:all_actions) do |a|
          # Make sure the parent dir exists, or else fail.
          # for why run, print a message explaining the potential error.
          parent_directory = ::File.dirname(@new_resource.destination)
          a.assertion { ::File.directory?(parent_directory) }
          a.failure_message(Chef::Exceptions::MissingParentDirectory,
            "Cannot clone #{@new_resource} to #{@new_resource.destination}, the enclosing directory #{parent_directory} does not exist")
          a.whyrun("Directory #{parent_directory} does not exist, assuming it would have been created")
        end
      end

      def action_checkout
        if target_dir_non_existent_or_empty?
          converge_by("perform checkout of #{@new_resource.repository} into #{@new_resource.destination}") do
            shell_out!(checkout_command, run_options)
          end
        else
          Chef::Log.debug "#{@new_resource} checkout destination #{@new_resource.destination} already exists or is a non-empty directory - nothing to do"
        end
      end

      def action_export
        if target_dir_non_existent_or_empty?
          action_force_export
        else
          Chef::Log.debug "#{@new_resource} export destination #{@new_resource.destination} already exists or is a non-empty directory - nothing to do"
        end
      end

      def action_force_export
        converge_by("export #{@new_resource.repository} into #{@new_resource.destination}") do
          shell_out!(export_command, run_options)
        end
      end

      def action_sync
        assert_target_directory_valid!
        if ::File.exist?(::File.join(@new_resource.destination, ".svn"))
          current_rev = find_current_revision
          Chef::Log.debug "#{@new_resource} current revision: #{current_rev} target revision: #{revision_int}"
          unless current_revision_matches_target_revision?
            converge_by("sync #{@new_resource.destination} from #{@new_resource.repository}") do
              shell_out!(sync_command, run_options)
              Chef::Log.info "#{@new_resource} updated to revision: #{revision_int}"
            end
          end
        else
          action_checkout
        end
      end

      def sync_command
        c = scm :update, @new_resource.svn_arguments, verbose, authentication, "-r#{revision_int}", @new_resource.destination
        Chef::Log.debug "#{@new_resource} updated working copy #{@new_resource.destination} to revision #{@new_resource.revision}"
        c
      end

      def checkout_command
        c = scm :checkout, @new_resource.svn_arguments, verbose, authentication,
            "-r#{revision_int}", @new_resource.repository, @new_resource.destination
        Chef::Log.info "#{@new_resource} checked out #{@new_resource.repository} at revision #{@new_resource.revision} to #{@new_resource.destination}"
        c
      end

      def export_command
        args = ["--force"]
        args << @new_resource.svn_arguments << verbose << authentication <<
          "-r#{revision_int}" << @new_resource.repository << @new_resource.destination
        c = scm :export, *args
        Chef::Log.info "#{@new_resource} exported #{@new_resource.repository} at revision #{@new_resource.revision} to #{@new_resource.destination}"
        c
      end

      # If the specified revision isn't an integer ("HEAD" for example), look
      # up the revision id by asking the server
      # If the specified revision is an integer, trust it.
      def revision_int
        @revision_int ||= begin
          if @new_resource.revision =~ /^\d+$/
            @new_resource.revision
          else
            command = scm(:info, @new_resource.repository, @new_resource.svn_info_args, authentication, "-r#{@new_resource.revision}")
            svn_info = shell_out!(command, run_options(:cwd => cwd, :returns => [0, 1])).stdout

            extract_revision_info(svn_info)
          end
        end
      end

      alias :revision_slug :revision_int

      def find_current_revision
        return nil unless ::File.exist?(::File.join(@new_resource.destination, ".svn"))
        command = scm(:info)
        svn_info = shell_out!(command, run_options(:cwd => cwd, :returns => [0, 1])).stdout

        extract_revision_info(svn_info)
      end

      def current_revision_matches_target_revision?
        (!@current_resource.revision.nil?) && (revision_int.strip.to_i == @current_resource.revision.strip.to_i)
      end

      def run_options(run_opts = {})
        run_opts[:user] = @new_resource.user if @new_resource.user
        run_opts[:group] = @new_resource.group if @new_resource.group
        run_opts[:timeout] = @new_resource.timeout if @new_resource.timeout
        run_opts
      end

      private

      def cwd
        @new_resource.destination
      end

      def verbose
        "-q"
      end

      def extract_revision_info(svn_info)
        repo_attrs = svn_info.lines.inject({}) do |attrs, line|
          if line =~ SVN_INFO_PATTERN
            property, value = $1, $2
            attrs[property] = value
          end
          attrs
        end
        rev = (repo_attrs["Last Changed Rev"] || repo_attrs["Revision"])
        rev.strip! if rev
        raise "Could not parse `svn info` data: #{svn_info}" if repo_attrs.empty?
        Chef::Log.debug "#{@new_resource} resolved revision #{@new_resource.revision} to #{rev}"
        rev
      end

      # If a username is configured for the SCM, return the command-line
      # switches for that. Note that we don't need to return the password
      # switch, since Capistrano will check for that prompt in the output
      # and will respond appropriately.
      def authentication
        return "" unless @new_resource.svn_username
        result = "--username #{@new_resource.svn_username} "
        result << "--password #{@new_resource.svn_password} "
        result
      end

      def scm(*args)
        binary = svn_binary
        binary = "\"#{binary}\"" if binary =~ /\s/
        [binary, *args].compact.join(" ")
      end

      def target_dir_non_existent_or_empty?
        !::File.exist?(@new_resource.destination) || Dir.entries(@new_resource.destination).sort == [".", ".."]
      end

      def svn_binary
        @new_resource.svn_binary ||
          (Chef::Platform.windows? ? "svn.exe" : "svn")
      end

      def assert_target_directory_valid!
        target_parent_directory = ::File.dirname(@new_resource.destination)
        unless ::File.directory?(target_parent_directory)
          msg = "Cannot clone #{@new_resource} to #{@new_resource.destination}, the enclosing directory #{target_parent_directory} does not exist"
          raise Chef::Exceptions::MissingParentDirectory, msg
        end
      end
    end
  end
end