text:
// Copyright 2017 The Ray Authors.
//
// 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.

#include "io_ray_runtime_task_NativeTaskSubmitter.h"

#include <jni.h>

#include "jni_utils.h"
#include "ray/common/id.h"
#include "ray/core_worker/common.h"
#include "ray/core_worker/core_worker.h"

/// Store C++ instances of ray function in the cache to avoid unnessesary JNI operations.
thread_local std::unordered_map<jint, std::vector<std::pair<jobject, ray::RayFunction>>>
    submitter_function_descriptor_cache;

inline const ray::RayFunction &ToRayFunction(JNIEnv *env, jobject functionDescriptor,
                                             jint hash) {
  auto &fd_vector = submitter_function_descriptor_cache[hash];
  for (auto &pair : fd_vector) {
    if (env->CallBooleanMethod(pair.first, java_object_equals, functionDescriptor)) {
      return pair.second;
    }
  }

  std::vector<std::string> function_descriptor_list;
  jobject list =
      env->CallObjectMethod(functionDescriptor, java_function_descriptor_to_list);
  RAY_CHECK_JAVA_EXCEPTION(env);
  JavaStringListToNativeStringVector(env, list, &function_descriptor_list);
  jobject java_language =
      env->CallObjectMethod(functionDescriptor, java_function_descriptor_get_language);
  RAY_CHECK_JAVA_EXCEPTION(env);
  auto language = static_cast<::Language>(
      env->CallIntMethod(java_language, java_language_get_number));
  RAY_CHECK_JAVA_EXCEPTION(env);
  ray::FunctionDescriptor function_descriptor =
      ray::FunctionDescriptorBuilder::FromVector(language, function_descriptor_list);
  fd_vector.emplace_back(env->NewGlobalRef(functionDescriptor),
                         ray::RayFunction(language, function_descriptor));
  return fd_vector.back().second;
}

inline std::vector<std::unique_ptr<ray::TaskArg>> ToTaskArgs(JNIEnv *env, jobject args) {
  std::vector<std::unique_ptr<ray::TaskArg>> task_args;
  JavaListToNativeVector<std::unique_ptr<ray::TaskArg>>(
      env, args, &task_args, [](JNIEnv *env, jobject arg) {
        auto java_id = env->GetObjectField(arg, java_function_arg_id);
        if (java_id) {
          auto java_id_bytes = static_cast<jbyteArray>(
              env->CallObjectMethod(java_id, java_base_id_get_bytes));
          RAY_CHECK_JAVA_EXCEPTION(env);
          auto id = JavaByteArrayToId<ray::ObjectID>(env, java_id_bytes);
          auto java_owner_address =
              env->GetObjectField(arg, java_function_arg_owner_address);
          RAY_CHECK(java_owner_address);
          auto owner_address =
              JavaProtobufObjectToNativeProtobufObject<ray::rpc::Address>(
                  env, java_owner_address);
          return std::unique_ptr<ray::TaskArg>(
              new ray::TaskArgByReference(id, owner_address));
        }
        auto java_value =
            static_cast<jbyteArray>(env->GetObjectField(arg, java_function_arg_value));
        RAY_CHECK(java_value) << "Both id and value of FunctionArg are null.";
        auto value = JavaNativeRayObjectToNativeRayObject(env, java_value);
        return std::unique_ptr<ray::TaskArg>(new ray::TaskArgByValue(value));
      });
  return task_args;
}

inline std::unordered_map<std::string, double> ToResources(JNIEnv *env,
                                                           jobject java_resources) {
  return JavaMapToNativeMap<std::string, double>(
      env, java_resources,
      [](JNIEnv *env, jobject java_key) {
        return JavaStringToNativeString(env, (jstring)java_key);
      },
      [](JNIEnv *env, jobject java_value) {
        double value = env->CallDoubleMethod(java_value, java_double_double_value);
        RAY_CHECK_JAVA_EXCEPTION(env);
        return value;
      });
}

inline std::pair<ray::PlacementGroupID, int64_t> ToPlacementGroupOptions(
    JNIEnv *env, jobject callOptions) {
  auto placement_group_options = std::make_pair(ray::PlacementGroupID::Nil(), -1);
  auto group = env->GetObjectField(callOptions, java_task_creation_options_group);
  if (group) {
    auto placement_group_id = env->GetObjectField(group, java_placement_group_id);
    auto java_id_bytes = static_cast<jbyteArray>(
        env->CallObjectMethod(placement_group_id, java_base_id_get_bytes));
    RAY_CHECK_JAVA_EXCEPTION(env);
    auto id = JavaByteArrayToId<ray::PlacementGroupID>(env, java_id_bytes);
    auto index = env->GetIntField(callOptions, java_task_creation_options_bundle_index);
    placement_group_options = std::make_pair(id, index);
  }
  return placement_group_options;
}

inline ray::TaskOptions ToTaskOptions(JNIEnv *env, jint numReturns, jobject callOptions) {
  std::unordered_map<std::string, double> resources;
  std::string name = "";
  if (callOptions) {
    jobject java_resources =
        env->GetObjectField(callOptions, java_base_task_options_resources);
    resources = ToResources(env, java_resources);
    auto java_name = (jstring)env->GetObjectField(callOptions, java_call_options_name);
    if (java_name) {
      name = JavaStringToNativeString(env, java_name);
    }
  }

  ray::TaskOptions task_options{name, numReturns, resources};
  return task_options;
}

inline ray::ActorCreationOptions ToActorCreationOptions(JNIEnv *env,
                                                        jobject actorCreationOptions) {
  bool global = false;
  std::string name = "";
  int64_t max_restarts = 0;
  std::unordered_map<std::string, double> resources;
  std::vector<std::string> dynamic_worker_options;
  uint64_t max_concurrency = 1;
  auto placement_options = std::make_pair(ray::PlacementGroupID::Nil(), -1);
  if (actorCreationOptions) {
    global =
        env->GetBooleanField(actorCreationOptions, java_actor_creation_options_global);
    auto java_name = (jstring)env->GetObjectField(actorCreationOptions,
                                                  java_actor_creation_options_name);
    if (java_name) {
      name = JavaStringToNativeString(env, java_name);
    }
    max_restarts =
        env->GetIntField(actorCreationOptions, java_actor_creation_options_max_restarts);
    jobject java_resources =
        env->GetObjectField(actorCreationOptions, java_base_task_options_resources);
    resources = ToResources(env, java_resources);
    jobject java_jvm_options = env->GetObjectField(
        actorCreationOptions, java_actor_creation_options_jvm_options);
    if (java_jvm_options) {
      JavaStringListToNativeStringVector(env, java_jvm_options, &dynamic_worker_options);
    }
    max_concurrency = static_cast<uint64_t>(env->GetIntField(
        actorCreationOptions, java_actor_creation_options_max_concurrency));

    auto group =
        env->GetObjectField(actorCreationOptions, java_actor_creation_options_group);
    if (group) {
      auto placement_group_id = env->GetObjectField(group, java_placement_group_id);
      auto java_id_bytes = static_cast<jbyteArray>(
          env->CallObjectMethod(placement_group_id, java_base_id_get_bytes));
      RAY_CHECK_JAVA_EXCEPTION(env);
      auto id = JavaByteArrayToId<ray::PlacementGroupID>(env, java_id_bytes);
      auto index = env->GetIntField(actorCreationOptions,
                                    java_actor_creation_options_bundle_index);
      placement_options = std::make_pair(id, index);
    }
  }

  auto full_name = GetFullName(global, name);
  ray::ActorCreationOptions actor_creation_options{
      max_restarts,
      0,  // TODO: Allow setting max_task_retries from Java.
      static_cast<int>(max_concurrency),
      resources,
      resources,
      dynamic_worker_options,
      /*is_detached=*/false,
      full_name,
      /*is_asyncio=*/false,
      placement_options};
  return actor_creation_options;
}

inline ray::PlacementStrategy ConvertStrategy(jint java_strategy) {
  switch (java_strategy) {
  case 0:
    return ray::rpc::PACK;
  case 1:
    return ray::rpc::SPREAD;
  case 2:
    return ray::rpc::STRICT_PACK;
  default:
    return ray::rpc::STRICT_SPREAD;
  }
}

inline ray::PlacementGroupCreationOptions ToPlacementGroupCreationOptions(
    JNIEnv *env, jobject placementGroupCreationOptions) {
  // We have make sure the placementGroupCreationOptions is not null in java api.
  bool global = env->GetBooleanField(placementGroupCreationOptions,
                                     java_placement_group_creation_options_global);
  std::string name = "";
  jstring java_name = (jstring)env->GetObjectField(
      placementGroupCreationOptions, java_placement_group_creation_options_name);
  if (java_name) {
    name = JavaStringToNativeString(env, java_name);
  }
  jobject java_obj_strategy = env->GetObjectField(
      placementGroupCreationOptions, java_placement_group_creation_options_strategy);
  jint java_strategy = env->CallIntMethod(
      java_obj_strategy, java_placement_group_creation_options_strategy_value);
  jobject java_bundles = env->GetObjectField(
      placementGroupCreationOptions, java_placement_group_creation_options_bundles);
  std::vector<std::unordered_map<std::string, double>> bundles;
  JavaListToNativeVector<std::unordered_map<std::string, double>>(
      env, java_bundles, &bundles, [](JNIEnv *env, jobject java_bundle) {
        return JavaMapToNativeMap<std::string, double>(
            env, java_bundle,
            [](JNIEnv *env, jobject java_key) {
              return JavaStringToNativeString(env, (jstring)java_key);
            },
            [](JNIEnv *env, jobject java_value) {
              double value = env->CallDoubleMethod(java_value, java_double_double_value);
              RAY_CHECK_JAVA_EXCEPTION(env);
              return value;
            });
      });
  auto full_name = GetFullName(global, name);
  return ray::PlacementGroupCreationOptions(full_name, ConvertStrategy(java_strategy),
                                            bundles,
                                            /*is_detached=*/false);
}

#ifdef __cplusplus
extern "C" {
#endif

JNIEXPORT jobject JNICALL Java_io_ray_runtime_task_NativeTaskSubmitter_nativeSubmitTask(
    JNIEnv *env, jclass p, jobject functionDescriptor, jint functionDescriptorHash,
    jobject args, jint numReturns, jobject callOptions) {
  const auto &ray_function =
      ToRayFunction(env, functionDescriptor, functionDescriptorHash);
  auto task_args = ToTaskArgs(env, args);
  auto task_options = ToTaskOptions(env, numReturns, callOptions);
  auto placement_group_options = ToPlacementGroupOptions(env, callOptions);

  std::vector<ObjectID> return_ids;
  // TODO (kfstorm): Allow setting `max_retries` via `CallOptions`.
  ray::CoreWorkerProcess::GetCoreWorker().SubmitTask(
      ray_function, task_args, task_options, &return_ids,
      /*max_retries=*/0,
      /*placement_options=*/placement_group_options,
      /*placement_group_capture_child_tasks=*/true,
      /*debugger_breakpoint*/ "");

  // This is to avoid creating an empty java list and boost performance.
  if (return_ids.empty()) {
    return nullptr;
  }

  return NativeIdVectorToJavaByteArrayList(env, return_ids);
}

JNIEXPORT jbyteArray JNICALL
Java_io_ray_runtime_task_NativeTaskSubmitter_nativeCreateActor(
    JNIEnv *env, jclass p, jobject functionDescriptor, jint functionDescriptorHash,
    jobject args, jobject actorCreationOptions) {
  const auto &ray_function =
      ToRayFunction(env, functionDescriptor, functionDescriptorHash);
  auto task_args = ToTaskArgs(env, args);
  auto actor_creation_options = ToActorCreationOptions(env, actorCreationOptions);

  ActorID actor_id;
  auto status = ray::CoreWorkerProcess::GetCoreWorker().CreateActor(
      ray_function, task_args, actor_creation_options,
      /*extension_data*/ "", &actor_id);

  THROW_EXCEPTION_AND_RETURN_IF_NOT_OK(env, status, nullptr);
  return IdToJavaByteArray<ray::ActorID>(env, actor_id);
}

JNIEXPORT jobject JNICALL
Java_io_ray_runtime_task_NativeTaskSubmitter_nativeSubmitActorTask(
    JNIEnv *env, jclass p, jbyteArray actorId, jobject functionDescriptor,
    jint functionDescriptorHash, jobject args, jint numReturns, jobject callOptions) {
  auto actor_id = JavaByteArrayToId<ray::ActorID>(env, actorId);
  const auto &ray_function =
      ToRayFunction(env, functionDescriptor, functionDescriptorHash);
  auto task_args = ToTaskArgs(env, args);
  auto task_options = ToTaskOptions(env, numReturns, callOptions);

  std::vector<ObjectID> return_ids;
  ray::CoreWorkerProcess::GetCoreWorker().SubmitActorTask(
      actor_id, ray_function, task_args, task_options, &return_ids);

  // This is to avoid creating an empty java list and boost performance.
  if (return_ids.empty()) {
    return nullptr;
  }

  return NativeIdVectorToJavaByteArrayList(env, return_ids);
}

JNIEXPORT jbyteArray JNICALL
Java_io_ray_runtime_task_NativeTaskSubmitter_nativeCreatePlacementGroup(
    JNIEnv *env, jclass, jobject placementGroupCreationOptions) {
  auto options = ToPlacementGroupCreationOptions(env, placementGroupCreationOptions);
  ray::PlacementGroupID placement_group_id;
  auto status = ray::CoreWorkerProcess::GetCoreWorker().CreatePlacementGroup(
      options, &placement_group_id);
  THROW_EXCEPTION_AND_RETURN_IF_NOT_OK(env, status, nullptr);
  return IdToJavaByteArray<ray::PlacementGroupID>(env, placement_group_id);
}

JNIEXPORT void JNICALL
Java_io_ray_runtime_task_NativeTaskSubmitter_nativeRemovePlacementGroup(
    JNIEnv *env, jclass p, jbyteArray placement_group_id_bytes) {
  const auto placement_group_id =
      JavaByteArrayToId<ray::PlacementGroupID>(env, placement_group_id_bytes);
  auto status =
      ray::CoreWorkerProcess::GetCoreWorker().RemovePlacementGroup(placement_group_id);
  THROW_EXCEPTION_AND_RETURN_IF_NOT_OK(env, status, (void)0);
}

JNIEXPORT jboolean JNICALL
Java_io_ray_runtime_task_NativeTaskSubmitter_nativeWaitPlacementGroupReady(
    JNIEnv *env, jclass p, jbyteArray placement_group_id_bytes, jint timeout_seconds) {
  const auto placement_group_id =
      JavaByteArrayToId<ray::PlacementGroupID>(env, placement_group_id_bytes);
  auto status = ray::CoreWorkerProcess::GetCoreWorker().WaitPlacementGroupReady(
      placement_group_id, timeout_seconds);
  if (status.IsNotFound()) {
    env->ThrowNew(java_ray_exception_class, status.message().c_str());
  }
  return status.ok();
}

#ifdef __cplusplus
}
#endif


text:
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;

namespace PNChartDemos {

    [Register("AppDelegate")]
    public partial class AppDelegate : UIApplicationDelegate {

        UIWindow window;
        UIStoryboard storyboard;

        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) {
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            storyboard = UIStoryboard.FromName("PNChartStoryboard", null);
            window.RootViewController = (UIViewController)storyboard.InstantiateInitialViewController();
            window.MakeKeyAndVisible();
            return true;
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
import sys
import argparse

if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="Rend a spatial data database/application")

    parser.add_argument("-t", "--tests", action="store_true")
    parser.add_argument("-p", "--port", type=int)
    parser.add_argument("-i", "--index")
    parser.add_argument("-d", "--data")

    args = parser.parse_args()

    if args.tests:
        """
        Imports the tests and runs them , then exits.
        """
        import tests
        sys.exit()

    if args.port and args.index and args.data:
        """
        Sets up a HTTP Server
        """
        from plugins.config import PLUGINS
        from core.index_struct import SpatialIndex
        from core.http_handler import make_http_server
        spatial_index = SpatialIndex()
        spatial_index.set(PLUGINS[args.index])
        spatial_index.load_points(args.data)
        httpd = make_http_server(spatial_index, port=args.port)
        print('Starting httpd...')
        httpd.serve_forever()
        sys.exit()

    elif args.port or args.index or args.data:
        """
        Missing arguments, prints help and exits
        """
        parser.print_help()
        sys.exit()

    """
    If no argument is passed then it initializes the qt gui
    application and styles it into a darker theme
    """

    from PyQt5.QtCore import Qt
    from PyQt5.QtGui import QColor, QPalette
    from PyQt5.QtWidgets import QApplication
    from core.main import MainApplication

    app = QApplication(sys.argv)
    app.setStyle('Fusion')

    palette = QPalette()
    palette.setColor(QPalette.Window, QColor(53, 53, 53))
    palette.setColor(QPalette.WindowText, Qt.white)
    palette.setColor(QPalette.Base, QColor(15, 15, 15))
    palette.setColor(QPalette.AlternateBase, QColor(53, 53, 53))
    palette.setColor(QPalette.ToolTipBase, Qt.white)
    palette.setColor(QPalette.ToolTipText, Qt.white)
    palette.setColor(QPalette.Text, Qt.white)
    palette.setColor(QPalette.Button, QColor(53, 53, 53))
    palette.setColor(QPalette.ButtonText, Qt.white)
    palette.setColor(QPalette.BrightText, Qt.red)
    palette.setColor(QPalette.Highlight, QColor(142, 45, 197).lighter())
    palette.setColor(QPalette.HighlightedText, Qt.black)

    app.setPalette(palette)

    main_app = MainApplication()
    sys.exit(app.exec_())


text:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Pass: (1410)  Species with boundary condition false
                   cannot be in reaction and rule-->
<sbml xmlns="http://www.sbml.org/sbml/level2" level="2" version="1">
	<model>
		<listOfCompartments>
			<compartment id="c"/>
		</listOfCompartments>
		<listOfSpecies>
			<species id="s" compartment="c" boundaryCondition="true"/>
			<species id="x" compartment="c"/>
		</listOfSpecies>
		<listOfRules>
			<assignmentRule variable="s"/>
		</listOfRules>
		<listOfReactions>
			<reaction id="r">
				<listOfReactants>
					<speciesReference species="x"/>
				</listOfReactants>
				<listOfProducts>
					<speciesReference species="s"/>
				</listOfProducts>
			</reaction>
		</listOfReactions>
	</model>
</sbml>


text:
set -e

export CI=true
tests_repo="github.com/clearcontainers/tests"

make check

sudo -E PATH=$PATH sh -c "go test -bench=."

sudo -E PATH=$PATH sh -c "go test -bench=CreateStartStopDeletePodQemuHypervisorNoopAgentNetworkCNI -benchtime=60s"

sudo -E PATH=$PATH sh -c "go test -bench=CreateStartStopDeletePodQemuHypervisorHyperstartAgentNetworkCNI -benchtime=60s"

pushd "${GOPATH}/src/${tests_repo}"
.ci/run.sh
popd


text:
package org.postgresql.replication;

import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assume.assumeThat;

import org.postgresql.PGConnection;
import org.postgresql.PGProperty;
import org.postgresql.test.TestUtil;
import org.postgresql.test.util.rules.ServerVersionRule;
import org.postgresql.test.util.rules.annotation.HaveMinimalServerVersion;

import org.hamcrest.CoreMatchers;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;

import java.nio.ByteBuffer;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Arrays;
import java.util.Properties;

@HaveMinimalServerVersion("9.4")
public class PhysicalReplicationTest {

  private static final String SLOT_NAME = "pgjdbc_physical_replication_slot";

  @Rule
  public ServerVersionRule versionRule = new ServerVersionRule();

  private Connection replConnection;
  private Connection sqlConnection;

  @Before
  public void setUp() throws Exception {
    sqlConnection = TestUtil.openDB();
    //DriverManager.setLogWriter(new PrintWriter(System.out));
    replConnection = openReplicationConnection();
    TestUtil.createTable(sqlConnection, "test_physic_table",
        "pk serial primary key, name varchar(100)");
    TestUtil.recreatePhysicalReplicationSlot(sqlConnection, SLOT_NAME);
  }

  @After
  public void tearDown() throws Exception {
    replConnection.close();
    TestUtil.dropTable(sqlConnection, "test_physic_table");
    TestUtil.dropReplicationSlot(sqlConnection, SLOT_NAME);
    sqlConnection.close();
  }

  @Test
  public void testReceiveChangesWithoutReplicationSlot() throws Exception {
    PGConnection pgConnection = (PGConnection) replConnection;

    LogSequenceNumber lsn = getCurrentLSN();

    Statement st = sqlConnection.createStatement();
    st.execute("insert into test_physic_table(name) values('previous value')");
    st.close();

    PGReplicationStream stream =
        pgConnection
            .getReplicationAPI()
            .replicationStream()
            .physical()
            .withStartPosition(lsn)
            .start();

    ByteBuffer read = stream.read();

    assertThat("Physical replication can be start without replication slot",
        read, CoreMatchers.notNullValue()
    );
  }

  @Test
  public void testReceiveChangesWithReplicationSlot() throws Exception {
    PGConnection pgConnection = (PGConnection) replConnection;

    LogSequenceNumber lsn = getCurrentLSN();

    Statement st = sqlConnection.createStatement();
    st.execute("insert into test_physic_table(name) values('previous value')");
    st.close();

    PGReplicationStream stream =
        pgConnection
            .getReplicationAPI()
            .replicationStream()
            .physical()
            .withSlotName(SLOT_NAME)
            .withStartPosition(lsn)
            .start();

    ByteBuffer read = stream.read();

    assertThat(read, CoreMatchers.notNullValue());
  }

  @Test
  public void testAfterStartStreamingDBSlotStatusActive() throws Exception {
    PGConnection pgConnection = (PGConnection) replConnection;

    LogSequenceNumber lsn = getCurrentLSN();

    PGReplicationStream stream =
        pgConnection
            .getReplicationAPI()
            .replicationStream()
            .physical()
            .withSlotName(SLOT_NAME)
            .withStartPosition(lsn)
            .start();

    boolean isActive = isActiveOnView();
    stream.close();

    Assert.assertThat(
        "After start streaming, database status should be update on view pg_replication_slots to active",
        isActive, equalTo(true)
    );
  }

  @Test
  public void testAfterCloseReplicationStreamDBSlotStatusNotActive() throws Exception {
    PGConnection pgConnection = (PGConnection) replConnection;

    LogSequenceNumber lsn = getCurrentLSN();

    PGReplicationStream stream =
        pgConnection
            .getReplicationAPI()
            .replicationStream()
            .physical()
            .withSlotName(SLOT_NAME)
            .withStartPosition(lsn)
            .start();

    boolean isActive = isActiveOnView();
    assumeThat(isActive, equalTo(true));

    stream.close();

    isActive = isActiveOnView();
    Assert.assertThat(
        "Execute close method on PGREplicationStream should lead to stop replication, "
            + "as result we wait that on view pg_replication_slots status for slot will change to no active",
        isActive, equalTo(false)
    );
  }

  @Test
  public void testWalRecordCanBeRepeatBeRestartReplication() throws Exception {
    PGConnection pgConnection = (PGConnection) replConnection;

    LogSequenceNumber lsn = getCurrentLSN();

    Statement st = sqlConnection.createStatement();
    st.execute("insert into test_physic_table(name) values('previous value')");
    st.close();

    PGReplicationStream stream =
        pgConnection
            .getReplicationAPI()
            .replicationStream()
            .physical()
            .withSlotName(SLOT_NAME)
            .withStartPosition(lsn)
            .start();

    byte[] first = toByteArray(stream.read());
    stream.close();

    //reopen stream
    stream =
        pgConnection
            .getReplicationAPI()
            .replicationStream()
            .physical()
            .withSlotName(SLOT_NAME)
            .withStartPosition(lsn)
            .start();

    byte[] second = toByteArray(stream.read());
    stream.close();

    boolean arrayEquals = Arrays.equals(first, second);
    assertThat("On same replication connection we can restart replication from already "
            + "received LSN if they not recycled yet on backend",
        arrayEquals, CoreMatchers.equalTo(true)
    );
  }

  private boolean isActiveOnView() throws SQLException {
    boolean result = false;
    Statement st = sqlConnection.createStatement();
    ResultSet
        rs =
        st.executeQuery("select * from pg_replication_slots where slot_name = '" + SLOT_NAME + "'");
    if (rs.next()) {
      result = rs.getBoolean("active");
    }
    rs.close();
    st.close();
    return result;
  }

  private byte[] toByteArray(ByteBuffer buffer) {
    int offset = buffer.arrayOffset();
    byte[] source = buffer.array();
    return Arrays.copyOfRange(source, offset, source.length);
  }

  private LogSequenceNumber getCurrentLSN() throws SQLException {
    Statement st = sqlConnection.createStatement();
    ResultSet rs = null;
    try {
      rs = st.executeQuery("select pg_current_xlog_location()");

      if (rs.next()) {
        String lsn = rs.getString(1);
        return LogSequenceNumber.valueOf(lsn);
      } else {
        return LogSequenceNumber.INVALID_LSN;
      }
    } finally {
      if (rs != null) {
        rs.close();
      }
      st.close();
    }
  }

  private Connection openReplicationConnection() throws Exception {
    Properties properties = new Properties();
    PGProperty.ASSUME_MIN_SERVER_VERSION.set(properties, "9.4");
    PGProperty.REPLICATION.set(properties, "database");
    return TestUtil.openDB(properties);
  }
}


text:
'use strict';

/**
 * Perform a set of runtime diagnostics, usually useful for test purpose.
 * This is only meaningful for __DEV__ mode.
 */
export type RuntimeDiagnostics = {|
  /**
   * Check if the runtime diagnostics is enabled at all.
   */
  isEnabled: () => boolean,

  /**
   * If enabled, simulate early JavaScript errors during initialization.
   */
  simulateEarlyJavaScriptErrors: () => void,
|};

export type RuntimeDiagnosticFlag = 'early_js_errors' | 'all';

const flags: Array<RuntimeDiagnosticFlag> = [];
let isEnabled = false;
let shouldEnableAll = false;

if (__DEV__) {
  if (typeof global.RN$DiagnosticFlags === 'string') {
    global.RN$DiagnosticFlags.split(',').forEach(flag => {
      switch (flag) {
        case 'early_js_errors':
        case 'all':
          flags.push(flag);
          break;
        default:
          throw Error(
            `RuntimeDiagnosticsFlags: unknown flag was supplied: '${flag}'`,
          );
      }
    });
    isEnabled = flags.length > 0;
    shouldEnableAll = flags.includes('all');
  }
}

const ReactNativeRuntimeDiagnostics: RuntimeDiagnostics = {
  isEnabled: () => isEnabled,
  simulateEarlyJavaScriptErrors: () => {
    if (__DEV__) {
      if (!isEnabled) {
        return;
      }
      if (shouldEnableAll || flags.includes('early_js_errors')) {
        throw Error('[Runtime Diagnostics] Throwing a JavaScript error.');
      }
    }
  },
};

module.exports = ReactNativeRuntimeDiagnostics;


text:
using Quasar.Communication.Packets.Outgoing.Rooms.Avatar;
using Quasar.HabboHotel.GameClients;
using Quasar.HabboHotel.Quests;
using Quasar.HabboHotel.Rooms;
using Quasar.Communication.Packets.Incoming;

namespace Quasar.Communication.Packets.Incoming.Rooms.Avatar
{
    public class ActionEvent : IPacketEvent
    {
        public void Parse(GameClient Session, ClientPacket Packet)
        {
            if (!Session.GetHabbo().InRoom)
                return;

            int Action = Packet.PopInt();

            Room Room = null;
            if (!QuasarEnvironment.GetGame().GetRoomManager().TryGetRoom(Session.GetHabbo().CurrentRoomId, out Room))
                return;

            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
            if (User == null)
                return;

            if (User.DanceId > 0)
                User.DanceId = 0;

            if (Session.GetHabbo().Effects().CurrentEffect > 0)
                Room.SendMessage(new AvatarEffectComposer(User.VirtualId, 0));

            User.UnIdle();
            Room.SendMessage(new ActionComposer(User.VirtualId, Action));

            if (Action == 5) // idle
            {
                User.IsAsleep = true;
                Room.SendMessage(new SleepComposer(User, true));
            }

            QuasarEnvironment.GetGame().GetQuestManager().ProgressUserQuest(Session, QuestType.SOCIAL_WAVE);
            QuasarEnvironment.GetGame().GetAchievementManager().ProgressAchievement(Session, "ACH_ExploreWave", 1);

         }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/rename_directory_holder"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:padding="@dimen/activity_margin">

    <com.simplemobiletools.commons.views.MyTextView
        android:id="@+id/image_width_label"
        android:layout_width="100dp"
        android:layout_height="wrap_content"
        android:text="@string/width"/>

    <com.simplemobiletools.commons.views.MyEditText
        android:id="@+id/image_width"
        android:layout_width="100dp"
        android:layout_height="wrap_content"
        android:layout_below="@+id/image_width_label"
        android:layout_marginBottom="@dimen/activity_margin"
        android:inputType="number"
        android:maxLength="6"
        android:maxLines="1"
        android:textCursorDrawable="@null"/>

    <com.simplemobiletools.commons.views.MyTextView
        android:id="@+id/image_height_label"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="50dp"
        android:layout_marginStart="50dp"
        android:layout_toRightOf="@+id/image_width_label"
        android:text="@string/height"/>

    <com.simplemobiletools.commons.views.MyEditText
        android:id="@+id/image_height"
        android:layout_width="100dp"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/image_height_label"
        android:layout_alignStart="@+id/image_height_label"
        android:layout_below="@+id/image_width_label"
        android:inputType="number"
        android:maxLength="6"
        android:maxLines="1"
        android:textCursorDrawable="@null"/>

    <com.simplemobiletools.commons.views.MyAppCompatCheckbox
        android:id="@+id/keep_aspect_ratio"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/image_height"
        android:layout_marginTop="@dimen/activity_margin"
        android:checked="true"
        android:paddingBottom="@dimen/activity_margin"
        android:paddingTop="@dimen/activity_margin"
        android:text="@string/keep_aspect_ratio"/>

</RelativeLayout>


text: Project Euler problems in various languages


text:
<?php
namespace Phoebe\Plugin\UserInfo;

interface StorageInterface
{
    public function clear();
    public function setUserMode($nickname, $channel, $mode);
    public function getUserMode($nickname, $channel);
    public function updateNickname($oldNickname, $newNickname);
    public function removeUser($nickname, $channel = null);
    public function getChannels($nickname);
    public function getUsers($channel);
    public function getRandomUser($channel, $ignore = []);
}


text:
std::string opt_general_axes_label0(OPT_ARGS_STR);
std::string opt_general_axes_label1(OPT_ARGS_STR);
std::string opt_general_axes_label2(OPT_ARGS_STR);
std::string opt_general_axes_format0(OPT_ARGS_STR);
std::string opt_general_axes_format1(OPT_ARGS_STR);
std::string opt_general_axes_format2(OPT_ARGS_STR);
std::string opt_general_background_image_filename(OPT_ARGS_STR);
std::string opt_general_display(OPT_ARGS_STR);
std::string opt_general_version(OPT_ARGS_STR);
std::string opt_general_build_options(OPT_ARGS_STR);
std::string opt_general_filename(OPT_ARGS_STR);
std::string opt_general_executable_filename(OPT_ARGS_STR);
std::string opt_general_default_filename(OPT_ARGS_STR);
std::string opt_general_tmp_filename(OPT_ARGS_STR);
std::string opt_general_error_filename(OPT_ARGS_STR);
std::string opt_general_session_filename(OPT_ARGS_STR);
std::string opt_general_options_filename(OPT_ARGS_STR);
std::string opt_general_recent_file0(OPT_ARGS_STR);
std::string opt_general_recent_file1(OPT_ARGS_STR);
std::string opt_general_recent_file2(OPT_ARGS_STR);
std::string opt_general_recent_file3(OPT_ARGS_STR);
std::string opt_general_recent_file4(OPT_ARGS_STR);
std::string opt_general_recent_file5(OPT_ARGS_STR);
std::string opt_general_recent_file6(OPT_ARGS_STR);
std::string opt_general_recent_file7(OPT_ARGS_STR);
std::string opt_general_recent_file8(OPT_ARGS_STR);
std::string opt_general_recent_file9(OPT_ARGS_STR);
std::string opt_general_editor(OPT_ARGS_STR);
std::string opt_general_watch_file_pattern(OPT_ARGS_STR);
std::string opt_general_gui_theme(OPT_ARGS_STR);
std::string opt_general_graphics_font(OPT_ARGS_STR);
std::string opt_general_graphics_font_title(OPT_ARGS_STR);
std::string opt_general_graphics_font_engine(OPT_ARGS_STR);
std::string opt_geometry_double_clicked_point_command(OPT_ARGS_STR);
std::string opt_geometry_double_clicked_curve_command(OPT_ARGS_STR);
std::string opt_geometry_double_clicked_surface_command(OPT_ARGS_STR);
std::string opt_geometry_double_clicked_volume_command(OPT_ARGS_STR);
std::string opt_geometry_occ_target_unit(OPT_ARGS_STR);
std::string opt_solver_socket_name(OPT_ARGS_STR);
std::string opt_solver_name(OPT_ARGS_STR);
std::string opt_solver_name0(OPT_ARGS_STR);
std::string opt_solver_name1(OPT_ARGS_STR);
std::string opt_solver_name2(OPT_ARGS_STR);
std::string opt_solver_name3(OPT_ARGS_STR);
std::string opt_solver_name4(OPT_ARGS_STR);
std::string opt_solver_name5(OPT_ARGS_STR);
std::string opt_solver_name6(OPT_ARGS_STR);
std::string opt_solver_name7(OPT_ARGS_STR);
std::string opt_solver_name8(OPT_ARGS_STR);
std::string opt_solver_name9(OPT_ARGS_STR);
std::string opt_solver_extension(OPT_ARGS_STR);
std::string opt_solver_extension0(OPT_ARGS_STR);
std::string opt_solver_extension1(OPT_ARGS_STR);
std::string opt_solver_extension2(OPT_ARGS_STR);
std::string opt_solver_extension3(OPT_ARGS_STR);
std::string opt_solver_extension4(OPT_ARGS_STR);
std::string opt_solver_extension5(OPT_ARGS_STR);
std::string opt_solver_extension6(OPT_ARGS_STR);
std::string opt_solver_extension7(OPT_ARGS_STR);
std::string opt_solver_extension8(OPT_ARGS_STR);
std::string opt_solver_extension9(OPT_ARGS_STR);
std::string opt_solver_executable(OPT_ARGS_STR);
std::string opt_solver_executable0(OPT_ARGS_STR);
std::string opt_solver_executable1(OPT_ARGS_STR);
std::string opt_solver_executable2(OPT_ARGS_STR);
std::string opt_solver_executable3(OPT_ARGS_STR);
std::string opt_solver_executable4(OPT_ARGS_STR);
std::string opt_solver_executable5(OPT_ARGS_STR);
std::string opt_solver_executable6(OPT_ARGS_STR);
std::string opt_solver_executable7(OPT_ARGS_STR);
std::string opt_solver_executable8(OPT_ARGS_STR);
std::string opt_solver_executable9(OPT_ARGS_STR);
std::string opt_solver_remote_login(OPT_ARGS_STR);
std::string opt_solver_remote_login0(OPT_ARGS_STR);
std::string opt_solver_remote_login1(OPT_ARGS_STR);
std::string opt_solver_remote_login2(OPT_ARGS_STR);
std::string opt_solver_remote_login3(OPT_ARGS_STR);
std::string opt_solver_remote_login4(OPT_ARGS_STR);
std::string opt_solver_remote_login5(OPT_ARGS_STR);
std::string opt_solver_remote_login6(OPT_ARGS_STR);
std::string opt_solver_remote_login7(OPT_ARGS_STR);
std::string opt_solver_remote_login8(OPT_ARGS_STR);
std::string opt_solver_remote_login9(OPT_ARGS_STR);
std::string opt_solver_octave_interpreter(OPT_ARGS_STR);
std::string opt_solver_python_interpreter(OPT_ARGS_STR);
std::string opt_post_double_clicked_graph_point_command(OPT_ARGS_STR);
std::string opt_view_name(OPT_ARGS_STR);
std::string opt_view_format(OPT_ARGS_STR);
std::string opt_view_filename(OPT_ARGS_STR);
std::string opt_view_double_clicked_command(OPT_ARGS_STR);
std::string opt_view_group(OPT_ARGS_STR);
std::string opt_view_axes_label0(OPT_ARGS_STR);
std::string opt_view_axes_label1(OPT_ARGS_STR);
std::string opt_view_axes_label2(OPT_ARGS_STR);
std::string opt_view_axes_format0(OPT_ARGS_STR);
std::string opt_view_axes_format1(OPT_ARGS_STR);
std::string opt_view_axes_format2(OPT_ARGS_STR);
std::string opt_view_gen_raise0(OPT_ARGS_STR);
std::string opt_view_gen_raise1(OPT_ARGS_STR);
std::string opt_view_gen_raise2(OPT_ARGS_STR);
std::string opt_view_stipple0(OPT_ARGS_STR);
std::string opt_view_stipple1(OPT_ARGS_STR);
std::string opt_view_stipple2(OPT_ARGS_STR);
std::string opt_view_stipple3(OPT_ARGS_STR);
std::string opt_view_stipple4(OPT_ARGS_STR);
std::string opt_view_stipple5(OPT_ARGS_STR);
std::string opt_view_stipple6(OPT_ARGS_STR);
std::string opt_view_stipple7(OPT_ARGS_STR);
std::string opt_view_stipple8(OPT_ARGS_STR);
std::string opt_view_stipple9(OPT_ARGS_STR);
std::string opt_view_attributes(OPT_ARGS_STR);
std::string opt_print_parameter_command(OPT_ARGS_STR);

// NUMBERS

double opt_general_initial_context(OPT_ARGS_NUM);
double opt_general_show_options_on_startup(OPT_ARGS_NUM);
double opt_general_show_messages_on_startup(OPT_ARGS_NUM);
double opt_general_fontsize(OPT_ARGS_NUM);
double opt_general_gui_color_scheme(OPT_ARGS_NUM);
double opt_general_graphics_fontsize(OPT_ARGS_NUM);
double opt_general_graphics_fontsize_title(OPT_ARGS_NUM);
double opt_general_graphics_position0(OPT_ARGS_NUM);
double opt_general_graphics_position1(OPT_ARGS_NUM);
double opt_general_graphics_size0(OPT_ARGS_NUM);
double opt_general_graphics_size1(OPT_ARGS_NUM);
double opt_general_context_position0(OPT_ARGS_NUM);
double opt_general_context_position1(OPT_ARGS_NUM);
double opt_general_file_chooser_position0(OPT_ARGS_NUM);
double opt_general_file_chooser_position1(OPT_ARGS_NUM);
double opt_general_polygon_offset_always(OPT_ARGS_NUM);
double opt_general_polygon_offset_factor(OPT_ARGS_NUM);
double opt_general_polygon_offset_units(OPT_ARGS_NUM);
double opt_general_system_menu_bar(OPT_ARGS_NUM);
double opt_general_show_module_menu(OPT_ARGS_NUM);
double opt_general_meshdiscrete(OPT_ARGS_NUM);
double opt_general_message_size(OPT_ARGS_NUM);
double opt_general_message_fontsize(OPT_ARGS_NUM);
double opt_general_detached_menu(OPT_ARGS_NUM);
double opt_general_menu_size0(OPT_ARGS_NUM);
double opt_general_menu_size1(OPT_ARGS_NUM);
double opt_general_menu_position0(OPT_ARGS_NUM);
double opt_general_menu_position1(OPT_ARGS_NUM);
double opt_general_option_position0(OPT_ARGS_NUM);
double opt_general_option_position1(OPT_ARGS_NUM);
double opt_general_plugin_position0(OPT_ARGS_NUM);
double opt_general_plugin_position1(OPT_ARGS_NUM);
double opt_general_plugin_size0(OPT_ARGS_NUM);
double opt_general_plugin_size1(OPT_ARGS_NUM);
double opt_general_field_position0(OPT_ARGS_NUM);
double opt_general_field_position1(OPT_ARGS_NUM);
double opt_general_field_size0(OPT_ARGS_NUM);
double opt_general_field_size1(OPT_ARGS_NUM);
double opt_general_extra_position0(OPT_ARGS_NUM);
double opt_general_extra_position1(OPT_ARGS_NUM);
double opt_general_extra_size0(OPT_ARGS_NUM);
double opt_general_extra_size1(OPT_ARGS_NUM);
double opt_general_statistics_position0(OPT_ARGS_NUM);
double opt_general_statistics_position1(OPT_ARGS_NUM);
double opt_general_visibility_position0(OPT_ARGS_NUM);
double opt_general_visibility_position1(OPT_ARGS_NUM);
double opt_general_clip_position0(OPT_ARGS_NUM);
double opt_general_clip_position1(OPT_ARGS_NUM);
double opt_general_manip_position0(OPT_ARGS_NUM);
double opt_general_manip_position1(OPT_ARGS_NUM);
double opt_general_hot_position0(OPT_ARGS_NUM);
double opt_general_hot_position1(OPT_ARGS_NUM);
double opt_general_high_resolution_graphics(OPT_ARGS_NUM);
double opt_general_high_resolution_point_size_factor(OPT_ARGS_NUM);
double opt_general_session_save(OPT_ARGS_NUM);
double opt_general_options_save(OPT_ARGS_NUM);
double opt_general_rotation0(OPT_ARGS_NUM);
double opt_general_rotation1(OPT_ARGS_NUM);
double opt_general_rotation2(OPT_ARGS_NUM);
double opt_general_rotation_center0(OPT_ARGS_NUM);
double opt_general_rotation_center1(OPT_ARGS_NUM);
double opt_general_rotation_center2(OPT_ARGS_NUM);
double opt_general_quaternion0(OPT_ARGS_NUM);
double opt_general_quaternion1(OPT_ARGS_NUM);
double opt_general_quaternion2(OPT_ARGS_NUM);
double opt_general_quaternion3(OPT_ARGS_NUM);
double opt_general_translation0(OPT_ARGS_NUM);
double opt_general_translation1(OPT_ARGS_NUM);
double opt_general_translation2(OPT_ARGS_NUM);
double opt_general_scale0(OPT_ARGS_NUM);
double opt_general_scale1(OPT_ARGS_NUM);
double opt_general_scale2(OPT_ARGS_NUM);
double opt_general_clip_factor(OPT_ARGS_NUM);
double opt_general_display_border_factor(OPT_ARGS_NUM);
double opt_general_point_size(OPT_ARGS_NUM);
double opt_general_line_width(OPT_ARGS_NUM);
double opt_general_shine(OPT_ARGS_NUM);
double opt_general_shine_exponent(OPT_ARGS_NUM);
double opt_general_color_scheme(OPT_ARGS_NUM);
double opt_general_background_gradient(OPT_ARGS_NUM);
double opt_general_background_image_position0(OPT_ARGS_NUM);
double opt_general_background_image_position1(OPT_ARGS_NUM);
double opt_general_background_image_size0(OPT_ARGS_NUM);
double opt_general_background_image_size1(OPT_ARGS_NUM);
double opt_general_background_image_3d(OPT_ARGS_NUM);
double opt_general_background_image_page(OPT_ARGS_NUM);
double opt_general_verbosity(OPT_ARGS_NUM);
double opt_general_progress_meter_step(OPT_ARGS_NUM);
double opt_general_nopopup(OPT_ARGS_NUM);
double opt_general_non_modal_windows(OPT_ARGS_NUM);
double opt_general_terminal(OPT_ARGS_NUM);
double opt_general_tooltips(OPT_ARGS_NUM);
double opt_general_confirm_overwrite(OPT_ARGS_NUM);
double opt_general_orthographic(OPT_ARGS_NUM);
double opt_general_mouse_selection(OPT_ARGS_NUM);
double opt_general_mouse_hover_meshes(OPT_ARGS_NUM);
double opt_general_mouse_invert_zoom(OPT_ARGS_NUM);
double opt_general_draw_bounding_box(OPT_ARGS_NUM);
double opt_general_draw_oriented_bounding_box(OPT_ARGS_NUM);
double opt_general_fast_redraw(OPT_ARGS_NUM);
double opt_general_xmin(OPT_ARGS_NUM);
double opt_general_xmax(OPT_ARGS_NUM);
double opt_general_ymin(OPT_ARGS_NUM);
double opt_general_ymax(OPT_ARGS_NUM);
double opt_general_zmin(OPT_ARGS_NUM);
double opt_general_zmax(OPT_ARGS_NUM);
double opt_general_lc(OPT_ARGS_NUM);
double opt_general_axes(OPT_ARGS_NUM);
double opt_general_axes_mikado(OPT_ARGS_NUM);
double opt_general_axes_auto_position(OPT_ARGS_NUM);
double opt_general_axes_xmin(OPT_ARGS_NUM);
double opt_general_axes_xmax(OPT_ARGS_NUM);
double opt_general_axes_ymin(OPT_ARGS_NUM);
double opt_general_axes_ymax(OPT_ARGS_NUM);
double opt_general_axes_zmin(OPT_ARGS_NUM);
double opt_general_axes_zmax(OPT_ARGS_NUM);
double opt_general_axes_tics0(OPT_ARGS_NUM);
double opt_general_axes_tics1(OPT_ARGS_NUM);
double opt_general_axes_tics2(OPT_ARGS_NUM);
double opt_general_axes_force_value(OPT_ARGS_NUM);
double opt_general_axes_value_xmin(OPT_ARGS_NUM);
double opt_general_axes_value_xmax(OPT_ARGS_NUM);
double opt_general_axes_value_ymin(OPT_ARGS_NUM);
double opt_general_axes_value_ymax(OPT_ARGS_NUM);
double opt_general_axes_value_zmin(OPT_ARGS_NUM);
double opt_general_axes_value_zmax(OPT_ARGS_NUM);
double opt_general_small_axes(OPT_ARGS_NUM);
double opt_general_small_axes_position0(OPT_ARGS_NUM);
double opt_general_small_axes_position1(OPT_ARGS_NUM);
double opt_general_small_axes_size(OPT_ARGS_NUM);
double opt_general_quadric_subdivisions(OPT_ARGS_NUM);
double opt_general_double_buffer(OPT_ARGS_NUM);
double opt_general_antialiasing(OPT_ARGS_NUM);
double opt_general_alpha_blending(OPT_ARGS_NUM);
double opt_general_vector_type(OPT_ARGS_NUM);
double opt_general_arrow_head_radius(OPT_ARGS_NUM);
double opt_general_arrow_stem_length(OPT_ARGS_NUM);
double opt_general_arrow_stem_radius(OPT_ARGS_NUM);
double opt_general_trackball(OPT_ARGS_NUM);
double opt_general_trackball_hyperbolic_sheet(OPT_ARGS_NUM);
//double opt_general_gamepad(OPT_ARGS_NUM);
double opt_general_rotation_center_cg(OPT_ARGS_NUM);
double opt_general_zoom_factor(OPT_ARGS_NUM);
double opt_general_expert_mode(OPT_ARGS_NUM);
double opt_general_stereo_mode(OPT_ARGS_NUM);
double opt_general_camera_mode(OPT_ARGS_NUM);
#if defined(HAVE_VISUDEV)
double opt_general_heavy_visualization(OPT_ARGS_NUM);
#endif
double opt_general_eye_sep_ratio(OPT_ARGS_NUM);
double opt_general_focallength_ratio(OPT_ARGS_NUM);
double opt_general_camera_aperture(OPT_ARGS_NUM);
double opt_general_clip0a(OPT_ARGS_NUM);
double opt_general_clip0b(OPT_ARGS_NUM);
double opt_general_clip0c(OPT_ARGS_NUM);
double opt_general_clip0d(OPT_ARGS_NUM);
double opt_general_clip1a(OPT_ARGS_NUM);
double opt_general_clip1b(OPT_ARGS_NUM);
double opt_general_clip1c(OPT_ARGS_NUM);
double opt_general_clip1d(OPT_ARGS_NUM);
double opt_general_clip2a(OPT_ARGS_NUM);
double opt_general_clip2b(OPT_ARGS_NUM);
double opt_general_clip2c(OPT_ARGS_NUM);
double opt_general_clip2d(OPT_ARGS_NUM);
double opt_general_clip3a(OPT_ARGS_NUM);
double opt_general_clip3b(OPT_ARGS_NUM);
double opt_general_clip3c(OPT_ARGS_NUM);
double opt_general_clip3d(OPT_ARGS_NUM);
double opt_general_clip4a(OPT_ARGS_NUM);
double opt_general_clip4b(OPT_ARGS_NUM);
double opt_general_clip4c(OPT_ARGS_NUM);
double opt_general_clip4d(OPT_ARGS_NUM);
double opt_general_clip5a(OPT_ARGS_NUM);
double opt_general_clip5b(OPT_ARGS_NUM);
double opt_general_clip5c(OPT_ARGS_NUM);
double opt_general_clip5d(OPT_ARGS_NUM);
double opt_general_clip_whole_elements(OPT_ARGS_NUM);
double opt_general_clip_only_draw_intersecting_volume(OPT_ARGS_NUM);
double opt_general_clip_only_volume(OPT_ARGS_NUM);
double opt_general_light0(OPT_ARGS_NUM);
double opt_general_light00(OPT_ARGS_NUM);
double opt_general_light01(OPT_ARGS_NUM);
double opt_general_light02(OPT_ARGS_NUM);
double opt_general_light03(OPT_ARGS_NUM);
double opt_general_light1(OPT_ARGS_NUM);
double opt_general_light10(OPT_ARGS_NUM);
double opt_general_light11(OPT_ARGS_NUM);
double opt_general_light12(OPT_ARGS_NUM);
double opt_general_light13(OPT_ARGS_NUM);
double opt_general_light2(OPT_ARGS_NUM);
double opt_general_light20(OPT_ARGS_NUM);
double opt_general_light21(OPT_ARGS_NUM);
double opt_general_light22(OPT_ARGS_NUM);
double opt_general_light23(OPT_ARGS_NUM);
double opt_general_light3(OPT_ARGS_NUM);
double opt_general_light30(OPT_ARGS_NUM);
double opt_general_light31(OPT_ARGS_NUM);
double opt_general_light32(OPT_ARGS_NUM);
double opt_general_light33(OPT_ARGS_NUM);
double opt_general_light4(OPT_ARGS_NUM);
double opt_general_light40(OPT_ARGS_NUM);
double opt_general_light41(OPT_ARGS_NUM);
double opt_general_light42(OPT_ARGS_NUM);
double opt_general_light43(OPT_ARGS_NUM);
double opt_general_light5(OPT_ARGS_NUM);
double opt_general_light50(OPT_ARGS_NUM);
double opt_general_light51(OPT_ARGS_NUM);
double opt_general_light52(OPT_ARGS_NUM);
double opt_general_light53(OPT_ARGS_NUM);
double opt_general_num_threads(OPT_ARGS_NUM);
double opt_geometry_transform(OPT_ARGS_NUM);
double opt_geometry_transform00(OPT_ARGS_NUM);
double opt_geometry_transform01(OPT_ARGS_NUM);
double opt_geometry_transform02(OPT_ARGS_NUM);
double opt_geometry_transform10(OPT_ARGS_NUM);
double opt_geometry_transform11(OPT_ARGS_NUM);
double opt_geometry_transform12(OPT_ARGS_NUM);
double opt_geometry_transform20(OPT_ARGS_NUM);
double opt_geometry_transform21(OPT_ARGS_NUM);
double opt_geometry_transform22(OPT_ARGS_NUM);
double opt_geometry_offset0(OPT_ARGS_NUM);
double opt_geometry_offset1(OPT_ARGS_NUM);
double opt_geometry_offset2(OPT_ARGS_NUM);
double opt_geometry_auto_coherence(OPT_ARGS_NUM);
double opt_geometry_oriented_physicals(OPT_ARGS_NUM);
double opt_geometry_highlight_orphans(OPT_ARGS_NUM);
double opt_geometry_tolerance(OPT_ARGS_NUM);
double opt_geometry_tolerance_boolean(OPT_ARGS_NUM);
double opt_geometry_normals(OPT_ARGS_NUM);
double opt_geometry_tangents(OPT_ARGS_NUM);
double opt_geometry_points(OPT_ARGS_NUM);
double opt_geometry_curves(OPT_ARGS_NUM);
double opt_geometry_surfaces(OPT_ARGS_NUM);
double opt_geometry_volumes(OPT_ARGS_NUM);
double opt_geometry_points_num(OPT_ARGS_NUM);
double opt_geometry_curves_num(OPT_ARGS_NUM);
double opt_geometry_surfaces_num(OPT_ARGS_NUM);
double opt_geometry_volumes_num(OPT_ARGS_NUM);
double opt_geometry_label_type(OPT_ARGS_NUM);
double opt_geometry_point_size(OPT_ARGS_NUM);
double opt_geometry_point_sel_size(OPT_ARGS_NUM);
double opt_geometry_point_type(OPT_ARGS_NUM);
double opt_geometry_reparam_on_face_robust(OPT_ARGS_NUM);
double opt_geometry_curve_width(OPT_ARGS_NUM);
double opt_geometry_curve_sel_width(OPT_ARGS_NUM);
double opt_geometry_curve_type(OPT_ARGS_NUM);
double opt_geometry_surface_type(OPT_ARGS_NUM);
double opt_geometry_light(OPT_ARGS_NUM);
double opt_geometry_light_two_side(OPT_ARGS_NUM);
double opt_geometry_occ_auto_fix(OPT_ARGS_NUM);
double opt_geometry_occ_disable_stl(OPT_ARGS_NUM);
double opt_geometry_occ_fix_degenerated(OPT_ARGS_NUM);
double opt_geometry_occ_fix_small_edges(OPT_ARGS_NUM);
double opt_geometry_occ_fix_small_faces(OPT_ARGS_NUM);
double opt_geometry_occ_sew_faces(OPT_ARGS_NUM);
double opt_geometry_occ_parallel(OPT_ARGS_NUM);
double opt_geometry_occ_boolean_preserve_numbering(OPT_ARGS_NUM);
double opt_geometry_occ_scaling(OPT_ARGS_NUM);
double opt_geometry_occ_import_labels(OPT_ARGS_NUM);
double opt_geometry_old_circle(OPT_ARGS_NUM);
double opt_geometry_old_newreg(OPT_ARGS_NUM);
double opt_geometry_old_ruled_surface(OPT_ARGS_NUM);
double opt_geometry_num_sub_edges(OPT_ARGS_NUM);
double opt_geometry_extrude_spline_points(OPT_ARGS_NUM);
double opt_geometry_extrude_return_lateral(OPT_ARGS_NUM);
double opt_geometry_scaling_factor(OPT_ARGS_NUM);
double opt_geometry_snap0(OPT_ARGS_NUM);
double opt_geometry_snap1(OPT_ARGS_NUM);
double opt_geometry_snap2(OPT_ARGS_NUM);
double opt_geometry_clip(OPT_ARGS_NUM);
double opt_geometry_copy_meshing_method(OPT_ARGS_NUM);
double opt_geometry_double_clicked_entity_tag(OPT_ARGS_NUM);
double opt_geometry_exact_extrusion(OPT_ARGS_NUM);
double opt_geometry_match_geom_and_mesh(OPT_ARGS_NUM);
double opt_geometry_match_mesh_scale_factor(OPT_ARGS_NUM);
double opt_geometry_match_mesh_tolerance(OPT_ARGS_NUM);
double opt_mesh_label_sampling(OPT_ARGS_NUM);
double opt_mesh_optimize(OPT_ARGS_NUM);
double opt_mesh_optimize_threshold(OPT_ARGS_NUM);
double opt_mesh_optimize_netgen(OPT_ARGS_NUM);
double opt_mesh_refine_steps(OPT_ARGS_NUM);
double opt_mesh_normals(OPT_ARGS_NUM);
double opt_mesh_num_sub_edges(OPT_ARGS_NUM);
double opt_mesh_tangents(OPT_ARGS_NUM);
double opt_mesh_explode(OPT_ARGS_NUM);
double opt_mesh_scaling_factor(OPT_ARGS_NUM);
double opt_mesh_lc_min(OPT_ARGS_NUM);
double opt_mesh_lc_max(OPT_ARGS_NUM);
double opt_mesh_tolerance_edge_length(OPT_ARGS_NUM);
double opt_mesh_tolerance_initial_delaunay(OPT_ARGS_NUM);
double opt_mesh_lc_factor(OPT_ARGS_NUM);
double opt_mesh_lc_from_curvature(OPT_ARGS_NUM);
double opt_mesh_lc_from_points(OPT_ARGS_NUM);
double opt_mesh_lc_extend_from_boundary(OPT_ARGS_NUM);
double opt_mesh_lc_integration_precision(OPT_ARGS_NUM);
double opt_mesh_rand_factor(OPT_ARGS_NUM);
double opt_mesh_rand_factor3d(OPT_ARGS_NUM);
double opt_mesh_quality_inf(OPT_ARGS_NUM);
double opt_mesh_quality_sup(OPT_ARGS_NUM);
double opt_mesh_quality_type(OPT_ARGS_NUM);
double opt_mesh_radius_inf(OPT_ARGS_NUM);
double opt_mesh_radius_sup(OPT_ARGS_NUM);
double opt_mesh_label_type(OPT_ARGS_NUM);
double opt_mesh_points(OPT_ARGS_NUM);
double opt_mesh_lines(OPT_ARGS_NUM);
double opt_mesh_triangles(OPT_ARGS_NUM);
double opt_mesh_quadrangles(OPT_ARGS_NUM);
double opt_mesh_tetrahedra(OPT_ARGS_NUM);
double opt_mesh_hexahedra(OPT_ARGS_NUM);
double opt_mesh_prisms(OPT_ARGS_NUM);
double opt_mesh_pyramids(OPT_ARGS_NUM);
double opt_mesh_trihedra(OPT_ARGS_NUM);
double opt_mesh_surfaces_edges(OPT_ARGS_NUM);
double opt_mesh_surfaces_faces(OPT_ARGS_NUM);
double opt_mesh_volumes_edges(OPT_ARGS_NUM);
double opt_mesh_volumes_faces(OPT_ARGS_NUM);
double opt_mesh_points_num(OPT_ARGS_NUM);
double opt_mesh_lines_num(OPT_ARGS_NUM);
double opt_mesh_surfaces_num(OPT_ARGS_NUM);
double opt_mesh_volumes_num(OPT_ARGS_NUM);
double opt_mesh_point_size(OPT_ARGS_NUM);
double opt_mesh_point_type(OPT_ARGS_NUM);
double opt_mesh_line_width(OPT_ARGS_NUM);
double opt_mesh_smooth_normals(OPT_ARGS_NUM);
double opt_mesh_smooth_ratio(OPT_ARGS_NUM);
double opt_mesh_angle_smooth_normals(OPT_ARGS_NUM);
double opt_mesh_aniso_max(OPT_ARGS_NUM);
double opt_mesh_light(OPT_ARGS_NUM);
double opt_mesh_light_lines(OPT_ARGS_NUM);
double opt_mesh_light_two_side(OPT_ARGS_NUM);
double opt_mesh_file_format(OPT_ARGS_NUM);
double opt_mesh_newton_convergence_test_xyz(OPT_ARGS_NUM);
double opt_mesh_msh_file_version(OPT_ARGS_NUM);
double opt_mesh_med_file_minor_version(OPT_ARGS_NUM);
double opt_mesh_med_import_groups_of_nodes(OPT_ARGS_NUM);
double opt_mesh_partition_split_mesh_files(OPT_ARGS_NUM);
double opt_mesh_partition_save_topology_file(OPT_ARGS_NUM);
double opt_mesh_partition_num(OPT_ARGS_NUM);
double opt_mesh_partition_metis_algorithm(OPT_ARGS_NUM);
double opt_mesh_partition_metis_edge_matching(OPT_ARGS_NUM);
double opt_mesh_partition_metis_refinement_algorithm(OPT_ARGS_NUM);
double opt_mesh_partition_hex_weight(OPT_ARGS_NUM);
double opt_mesh_partition_pri_weight(OPT_ARGS_NUM);
double opt_mesh_partition_pyr_weight(OPT_ARGS_NUM);
double opt_mesh_partition_trih_weight(OPT_ARGS_NUM);
double opt_mesh_partition_qua_weight(OPT_ARGS_NUM);
double opt_mesh_partition_tet_weight(OPT_ARGS_NUM);
double opt_mesh_partition_tri_weight(OPT_ARGS_NUM);
double opt_mesh_partition_line_weight(OPT_ARGS_NUM);
double opt_mesh_partition_create_topology(OPT_ARGS_NUM);
double opt_mesh_partition_create_physicals(OPT_ARGS_NUM);
double opt_mesh_partition_create_ghost_cells(OPT_ARGS_NUM);
double opt_mesh_partition_old_style_msh2(OPT_ARGS_NUM);
double opt_mesh_binary(OPT_ARGS_NUM);
double opt_mesh_smooth_cross_field(OPT_ARGS_NUM);
double opt_mesh_cross_field_closest_point(OPT_ARGS_NUM);
double opt_mesh_bdf_field_format(OPT_ARGS_NUM);
double opt_mesh_stl_remove_duplicate_triangles(OPT_ARGS_NUM);
double opt_mesh_stl_one_solid_per_surface(OPT_ARGS_NUM);
double opt_mesh_boundary_layer_fan_points(OPT_ARGS_NUM);
double opt_mesh_nb_smoothing(OPT_ARGS_NUM);
double opt_mesh_algo2d(OPT_ARGS_NUM);
double opt_mesh_algo3d(OPT_ARGS_NUM);
double opt_mesh_algo_recombine(OPT_ARGS_NUM);
double opt_mesh_recombine_all(OPT_ARGS_NUM);
double opt_mesh_recombine_optimize_topology(OPT_ARGS_NUM);
double opt_mesh_recombine3d_all(OPT_ARGS_NUM);
double opt_mesh_recombine3d_level(OPT_ARGS_NUM);
double opt_mesh_recombine3d_conformity(OPT_ARGS_NUM);
double opt_mesh_flexible_transfinite(OPT_ARGS_NUM);
double opt_mesh_algo_subdivide(OPT_ARGS_NUM);
double opt_mesh_mesh_only_visible(OPT_ARGS_NUM);
double opt_mesh_min_circ_points(OPT_ARGS_NUM);
double opt_mesh_allow_swap_edge_angle(OPT_ARGS_NUM);
double opt_mesh_min_curv_points(OPT_ARGS_NUM);
double opt_mesh_order(OPT_ARGS_NUM);
double opt_mesh_ho_optimize(OPT_ARGS_NUM);
double opt_mesh_ho_periodic(OPT_ARGS_NUM);
double opt_mesh_ho_nlayers(OPT_ARGS_NUM);
double opt_mesh_ho_threshold_min(OPT_ARGS_NUM);
double opt_mesh_ho_threshold_max(OPT_ARGS_NUM);
double opt_mesh_ho_poisson(OPT_ARGS_NUM);
double opt_mesh_ho_prim_surf_mesh(OPT_ARGS_NUM);
double opt_mesh_ho_iter_max(OPT_ARGS_NUM);
double opt_mesh_ho_pass_max(OPT_ARGS_NUM);
double opt_mesh_second_order_experimental(OPT_ARGS_NUM);
double opt_mesh_second_order_linear(OPT_ARGS_NUM);
double opt_mesh_second_order_incomplete(OPT_ARGS_NUM);
double opt_mesh_cgns_import_order(OPT_ARGS_NUM);
double opt_mesh_cgns_construct_topology(OPT_ARGS_NUM);
double opt_mesh_dual(OPT_ARGS_NUM);
double opt_mesh_voronoi(OPT_ARGS_NUM);
double opt_mesh_draw_skin_only(OPT_ARGS_NUM);
double opt_mesh_save_all(OPT_ARGS_NUM);
double opt_mesh_save_element_tag_type(OPT_ARGS_NUM);
double opt_mesh_save_parametric(OPT_ARGS_NUM);
double opt_mesh_save_topology(OPT_ARGS_NUM);
double opt_mesh_save_groups_of_nodes(OPT_ARGS_NUM);
double opt_mesh_color_carousel(OPT_ARGS_NUM);
double opt_mesh_switch_elem_tags(OPT_ARGS_NUM);
double opt_mesh_zone_definition(OPT_ARGS_NUM);
double opt_mesh_nb_nodes(OPT_ARGS_NUM);
double opt_mesh_nb_triangles(OPT_ARGS_NUM);
double opt_mesh_nb_quadrangles(OPT_ARGS_NUM);
double opt_mesh_nb_tetrahedra(OPT_ARGS_NUM);
double opt_mesh_nb_hexahedra(OPT_ARGS_NUM);
double opt_mesh_nb_prisms(OPT_ARGS_NUM);
double opt_mesh_nb_pyramids(OPT_ARGS_NUM);
double opt_mesh_nb_trihedra(OPT_ARGS_NUM);
double opt_mesh_cpu_time(OPT_ARGS_NUM);
double opt_mesh_clip(OPT_ARGS_NUM);
double opt_mesh_ignore_periodicity(OPT_ARGS_NUM);
double opt_mesh_preserve_numbering_msh2(OPT_ARGS_NUM);
double opt_mesh_max_num_threads_1d(OPT_ARGS_NUM);
double opt_mesh_max_num_threads_2d(OPT_ARGS_NUM);
double opt_mesh_max_num_threads_3d(OPT_ARGS_NUM);
double opt_mesh_angle_tolerance_facet_overlap(OPT_ARGS_NUM);
double opt_mesh_renumber(OPT_ARGS_NUM);
double opt_mesh_unv_strict_format(OPT_ARGS_NUM);
double opt_solver_listen(OPT_ARGS_NUM);
double opt_solver_timeout(OPT_ARGS_NUM);
double opt_solver_plugins(OPT_ARGS_NUM);
double opt_solver_auto_load_database(OPT_ARGS_NUM);
double opt_solver_auto_save_database(OPT_ARGS_NUM);
double opt_solver_auto_archive_output_files(OPT_ARGS_NUM);
double opt_solver_auto_check(OPT_ARGS_NUM);
double opt_solver_auto_mesh(OPT_ARGS_NUM);
double opt_solver_auto_merge_file(OPT_ARGS_NUM);
double opt_solver_auto_show_views(OPT_ARGS_NUM);
double opt_solver_auto_show_last_step(OPT_ARGS_NUM);
double opt_solver_show_invisible_parameters(OPT_ARGS_NUM);
double opt_post_horizontal_scales(OPT_ARGS_NUM);
double opt_post_link(OPT_ARGS_NUM);
double opt_post_smooth(OPT_ARGS_NUM);
double opt_post_anim_delay(OPT_ARGS_NUM);
double opt_post_anim_cycle(OPT_ARGS_NUM);
double opt_post_anim_step(OPT_ARGS_NUM);
double opt_post_combine_remove_orig(OPT_ARGS_NUM);
double opt_post_plugins(OPT_ARGS_NUM);
double opt_post_nb_views(OPT_ARGS_NUM);
double opt_post_file_format(OPT_ARGS_NUM);
double opt_post_force_node_data(OPT_ARGS_NUM);
double opt_post_force_element_data(OPT_ARGS_NUM);
double opt_post_save_mesh(OPT_ARGS_NUM);
double opt_post_save_interpolation_matrices(OPT_ARGS_NUM);
double opt_post_double_clicked_graph_point_x(OPT_ARGS_NUM);
double opt_post_double_clicked_graph_point_y(OPT_ARGS_NUM);
double opt_post_double_clicked_view(OPT_ARGS_NUM);
double opt_view_nb_timestep(OPT_ARGS_NUM);
double opt_view_nb_non_empty_timestep(OPT_ARGS_NUM);
double opt_view_timestep(OPT_ARGS_NUM);
double opt_view_time(OPT_ARGS_NUM);
double opt_view_min(OPT_ARGS_NUM);
double opt_view_max(OPT_ARGS_NUM);
double opt_view_min_visible(OPT_ARGS_NUM);
double opt_view_max_visible(OPT_ARGS_NUM);
double opt_view_custom_min(OPT_ARGS_NUM);
double opt_view_custom_max(OPT_ARGS_NUM);
double opt_view_custom_abscissa_min(OPT_ARGS_NUM);
double opt_view_custom_abscissa_max(OPT_ARGS_NUM);
double opt_view_xmin(OPT_ARGS_NUM);
double opt_view_xmax(OPT_ARGS_NUM);
double opt_view_ymin(OPT_ARGS_NUM);
double opt_view_ymax(OPT_ARGS_NUM);
double opt_view_zmin(OPT_ARGS_NUM);
double opt_view_zmax(OPT_ARGS_NUM);
double opt_view_offset0(OPT_ARGS_NUM);
double opt_view_offset1(OPT_ARGS_NUM);
double opt_view_offset2(OPT_ARGS_NUM);
double opt_view_raise0(OPT_ARGS_NUM);
double opt_view_raise1(OPT_ARGS_NUM);
double opt_view_raise2(OPT_ARGS_NUM);
double opt_view_normal_raise(OPT_ARGS_NUM);
double opt_view_transform00(OPT_ARGS_NUM);
double opt_view_transform01(OPT_ARGS_NUM);
double opt_view_transform02(OPT_ARGS_NUM);
double opt_view_transform10(OPT_ARGS_NUM);
double opt_view_transform11(OPT_ARGS_NUM);
double opt_view_transform12(OPT_ARGS_NUM);
double opt_view_transform20(OPT_ARGS_NUM);
double opt_view_transform21(OPT_ARGS_NUM);
double opt_view_transform22(OPT_ARGS_NUM);
double opt_view_arrow_size_min(OPT_ARGS_NUM);
double opt_view_arrow_size_max(OPT_ARGS_NUM);
double opt_view_normals(OPT_ARGS_NUM);
double opt_view_tangents(OPT_ARGS_NUM);
double opt_view_displacement_factor(OPT_ARGS_NUM);
double opt_view_fake_transparency(OPT_ARGS_NUM);
double opt_view_use_stipple(OPT_ARGS_NUM);
double opt_view_explode(OPT_ARGS_NUM);
double opt_view_visible(OPT_ARGS_NUM);
double opt_view_intervals_type(OPT_ARGS_NUM);
double opt_view_saturate_values(OPT_ARGS_NUM);
double opt_view_max_recursion_level(OPT_ARGS_NUM);
double opt_view_adapt_visualization_grid(OPT_ARGS_NUM);
double opt_view_target_error(OPT_ARGS_NUM);
double opt_view_colormap_alpha(OPT_ARGS_NUM);
double opt_view_colormap_alpha_power(OPT_ARGS_NUM);
double opt_view_colormap_beta(OPT_ARGS_NUM);
double opt_view_colormap_bias(OPT_ARGS_NUM);
double opt_view_colormap_curvature(OPT_ARGS_NUM);
double opt_view_colormap_invert(OPT_ARGS_NUM);
double opt_view_colormap_number(OPT_ARGS_NUM);
double opt_view_colormap_rotation(OPT_ARGS_NUM);
double opt_view_colormap_swap(OPT_ARGS_NUM);
double opt_view_external_view(OPT_ARGS_NUM);
double opt_view_gen_raise_view(OPT_ARGS_NUM);
double opt_view_gen_raise_factor(OPT_ARGS_NUM);
double opt_view_use_gen_raise(OPT_ARGS_NUM);
double opt_view_type(OPT_ARGS_NUM);
double opt_view_axes(OPT_ARGS_NUM);
double opt_view_axes_mikado(OPT_ARGS_NUM);
double opt_view_axes_auto_position(OPT_ARGS_NUM);
double opt_view_axes_tics0(OPT_ARGS_NUM);
double opt_view_axes_tics1(OPT_ARGS_NUM);
double opt_view_axes_tics2(OPT_ARGS_NUM);
double opt_view_axes_xmin(OPT_ARGS_NUM);
double opt_view_axes_ymin(OPT_ARGS_NUM);
double opt_view_axes_zmin(OPT_ARGS_NUM);
double opt_view_axes_xmax(OPT_ARGS_NUM);
double opt_view_axes_ymax(OPT_ARGS_NUM);
double opt_view_axes_zmax(OPT_ARGS_NUM);
double opt_view_position0(OPT_ARGS_NUM);
double opt_view_position1(OPT_ARGS_NUM);
double opt_view_auto_position(OPT_ARGS_NUM);
double opt_view_sampling(OPT_ARGS_NUM);
double opt_view_size0(OPT_ARGS_NUM);
double opt_view_size1(OPT_ARGS_NUM);
double opt_view_nb_iso(OPT_ARGS_NUM);
double opt_view_boundary(OPT_ARGS_NUM);
double opt_view_light(OPT_ARGS_NUM);
double opt_view_light_two_side(OPT_ARGS_NUM);
double opt_view_light_lines(OPT_ARGS_NUM);
double opt_view_smooth_normals(OPT_ARGS_NUM);
double opt_view_angle_smooth_normals(OPT_ARGS_NUM);
double opt_view_show_element(OPT_ARGS_NUM);
double opt_view_show_time(OPT_ARGS_NUM);
double opt_view_show_scale(OPT_ARGS_NUM);
double opt_view_draw_strings(OPT_ARGS_NUM);
double opt_view_draw_points(OPT_ARGS_NUM);
double opt_view_draw_quadrangles(OPT_ARGS_NUM);
double opt_view_draw_lines(OPT_ARGS_NUM);
double opt_view_draw_triangles(OPT_ARGS_NUM);
double opt_view_draw_tetrahedra(OPT_ARGS_NUM);
double opt_view_draw_hexahedra(OPT_ARGS_NUM);
double opt_view_draw_prisms(OPT_ARGS_NUM);
double opt_view_draw_pyramids(OPT_ARGS_NUM);
double opt_view_draw_trihedra(OPT_ARGS_NUM);
double opt_view_draw_scalars(OPT_ARGS_NUM);
double opt_view_draw_vectors(OPT_ARGS_NUM);
double opt_view_draw_tensors(OPT_ARGS_NUM);
double opt_view_draw_skin_only(OPT_ARGS_NUM);
double opt_view_scale_type(OPT_ARGS_NUM);
double opt_view_tensor_type(OPT_ARGS_NUM);
double opt_view_range_type(OPT_ARGS_NUM);
double opt_view_abscissa_range_type(OPT_ARGS_NUM);
double opt_view_vector_type(OPT_ARGS_NUM);
double opt_view_glyph_location(OPT_ARGS_NUM);
double opt_view_center_glyphs(OPT_ARGS_NUM);
double opt_view_point_size(OPT_ARGS_NUM);
double opt_view_line_width(OPT_ARGS_NUM);
double opt_view_point_type(OPT_ARGS_NUM);
double opt_view_line_type(OPT_ARGS_NUM);
double opt_view_clip(OPT_ARGS_NUM);
double opt_view_force_num_components(OPT_ARGS_NUM);
double opt_view_component_map0(OPT_ARGS_NUM);
double opt_view_component_map1(OPT_ARGS_NUM);
double opt_view_component_map2(OPT_ARGS_NUM);
double opt_view_component_map3(OPT_ARGS_NUM);
double opt_view_component_map4(OPT_ARGS_NUM);
double opt_view_component_map5(OPT_ARGS_NUM);
double opt_view_component_map6(OPT_ARGS_NUM);
double opt_view_component_map7(OPT_ARGS_NUM);
double opt_view_component_map8(OPT_ARGS_NUM);
double opt_view_closed(OPT_ARGS_NUM);
double opt_print_file_format(OPT_ARGS_NUM);
double opt_print_eps_compress(OPT_ARGS_NUM);
double opt_print_eps_ps3shading(OPT_ARGS_NUM);
double opt_print_eps_quality(OPT_ARGS_NUM);
double opt_print_eps_occlusion_culling(OPT_ARGS_NUM);
double opt_print_eps_best_root(OPT_ARGS_NUM);
double opt_print_eps_line_width_factor(OPT_ARGS_NUM);
double opt_print_eps_point_size_factor(OPT_ARGS_NUM);
double opt_print_jpeg_quality(OPT_ARGS_NUM);
double opt_print_jpeg_smoothing(OPT_ARGS_NUM);
double opt_print_geo_labels(OPT_ARGS_NUM);
double opt_print_geo_only_physicals(OPT_ARGS_NUM);
double opt_print_pos_elementary(OPT_ARGS_NUM);
double opt_print_pos_element(OPT_ARGS_NUM);
double opt_print_pos_gamma(OPT_ARGS_NUM);
double opt_print_pos_eta(OPT_ARGS_NUM);
double opt_print_pos_SICN(OPT_ARGS_NUM);
double opt_print_pos_SIGE(OPT_ARGS_NUM);
double opt_print_pos_disto(OPT_ARGS_NUM);
double opt_print_gif_dither(OPT_ARGS_NUM);
double opt_print_gif_sort(OPT_ARGS_NUM);
double opt_print_gif_interlace(OPT_ARGS_NUM);
double opt_print_gif_transparent(OPT_ARGS_NUM);
double opt_print_background(OPT_ARGS_NUM);
double opt_print_pgf_two_dim(OPT_ARGS_NUM);
double opt_print_pgf_export_axis(OPT_ARGS_NUM);
double opt_print_pgf_horiz_bar(OPT_ARGS_NUM);
double opt_print_text(OPT_ARGS_NUM);
double opt_print_tex_as_equation(OPT_ARGS_NUM);
double opt_print_composite_windows(OPT_ARGS_NUM);
double opt_print_delete_tmp_files(OPT_ARGS_NUM);
double opt_print_height(OPT_ARGS_NUM);
double opt_print_width(OPT_ARGS_NUM);
double opt_print_parameter(OPT_ARGS_NUM);
double opt_print_parameter_first(OPT_ARGS_NUM);
double opt_print_parameter_last(OPT_ARGS_NUM);
double opt_print_parameter_steps(OPT_ARGS_NUM);
double opt_print_x3d_compatibility(OPT_ARGS_NUM);
double opt_print_x3d_transparency(OPT_ARGS_NUM);
double opt_print_x3d_remove_inner_borders(OPT_ARGS_NUM);
double opt_print_x3d_precision(OPT_ARGS_NUM);

// COLORS

unsigned int opt_general_color_background(OPT_ARGS_COL);
unsigned int opt_general_color_background_gradient(OPT_ARGS_COL);
unsigned int opt_general_color_foreground(OPT_ARGS_COL);
unsigned int opt_general_color_text(OPT_ARGS_COL);
unsigned int opt_general_color_axes(OPT_ARGS_COL);
unsigned int opt_general_color_small_axes(OPT_ARGS_COL);
unsigned int opt_general_color_ambient_light(OPT_ARGS_COL);
unsigned int opt_general_color_diffuse_light(OPT_ARGS_COL);
unsigned int opt_general_color_specular_light(OPT_ARGS_COL);
unsigned int opt_geometry_color_points(OPT_ARGS_COL);
unsigned int opt_geometry_color_curves(OPT_ARGS_COL);
unsigned int opt_geometry_color_surfaces(OPT_ARGS_COL);
unsigned int opt_geometry_color_volumes(OPT_ARGS_COL);
unsigned int opt_geometry_color_selection(OPT_ARGS_COL);
unsigned int opt_geometry_color_highlight0(OPT_ARGS_COL);
unsigned int opt_geometry_color_highlight1(OPT_ARGS_COL);
unsigned int opt_geometry_color_highlight2(OPT_ARGS_COL);
unsigned int opt_geometry_color_tangents(OPT_ARGS_COL);
unsigned int opt_geometry_color_normals(OPT_ARGS_COL);
unsigned int opt_geometry_color_projection(OPT_ARGS_COL);
unsigned int opt_mesh_color_nodes(OPT_ARGS_COL);
unsigned int opt_mesh_color_nodes_sup(OPT_ARGS_COL);
unsigned int opt_mesh_color_lines(OPT_ARGS_COL);
unsigned int opt_mesh_color_triangles(OPT_ARGS_COL);
unsigned int opt_mesh_color_quadrangles(OPT_ARGS_COL);
unsigned int opt_mesh_color_tetrahedra(OPT_ARGS_COL);
unsigned int opt_mesh_color_hexahedra(OPT_ARGS_COL);
unsigned int opt_mesh_color_prisms(OPT_ARGS_COL);
unsigned int opt_mesh_color_pyramid(OPT_ARGS_COL);
unsigned int opt_mesh_color_trihedron(OPT_ARGS_COL);
unsigned int opt_mesh_color_tangents(OPT_ARGS_COL);
unsigned int opt_mesh_color_normals(OPT_ARGS_COL);
unsigned int opt_mesh_color_0(OPT_ARGS_COL);
unsigned int opt_mesh_color_1(OPT_ARGS_COL);
unsigned int opt_mesh_color_2(OPT_ARGS_COL);
unsigned int opt_mesh_color_3(OPT_ARGS_COL);
unsigned int opt_mesh_color_4(OPT_ARGS_COL);
unsigned int opt_mesh_color_5(OPT_ARGS_COL);
unsigned int opt_mesh_color_6(OPT_ARGS_COL);
unsigned int opt_mesh_color_7(OPT_ARGS_COL);
unsigned int opt_mesh_color_8(OPT_ARGS_COL);
unsigned int opt_mesh_color_9(OPT_ARGS_COL);
unsigned int opt_mesh_color_10(OPT_ARGS_COL);
unsigned int opt_mesh_color_11(OPT_ARGS_COL);
unsigned int opt_mesh_color_12(OPT_ARGS_COL);
unsigned int opt_mesh_color_13(OPT_ARGS_COL);
unsigned int opt_mesh_color_14(OPT_ARGS_COL);
unsigned int opt_mesh_color_15(OPT_ARGS_COL);
unsigned int opt_mesh_color_16(OPT_ARGS_COL);
unsigned int opt_mesh_color_17(OPT_ARGS_COL);
unsigned int opt_mesh_color_18(OPT_ARGS_COL);
unsigned int opt_mesh_color_19(OPT_ARGS_COL);
unsigned int opt_view_color_points(OPT_ARGS_COL);
unsigned int opt_view_color_lines(OPT_ARGS_COL);
unsigned int opt_view_color_triangles(OPT_ARGS_COL);
unsigned int opt_view_color_quadrangles(OPT_ARGS_COL);
unsigned int opt_view_color_tetrahedra(OPT_ARGS_COL);
unsigned int opt_view_color_hexahedra(OPT_ARGS_COL);
unsigned int opt_view_color_prisms(OPT_ARGS_COL);
unsigned int opt_view_color_pyramids(OPT_ARGS_COL);
unsigned int opt_view_color_trihedra(OPT_ARGS_COL);
unsigned int opt_view_color_tangents(OPT_ARGS_COL);
unsigned int opt_view_color_normals(OPT_ARGS_COL);
unsigned int opt_view_color_text2d(OPT_ARGS_COL);
unsigned int opt_view_color_text3d(OPT_ARGS_COL);
unsigned int opt_view_color_axes(OPT_ARGS_COL);
unsigned int opt_view_color_background2d(OPT_ARGS_COL);

// Data structures and global functions

typedef struct {
    const char *str;
    int int1, int2, int3, int4;
} StringX4Int;

typedef struct {
    int level;
    const char *str;
    std::string (*function)(int num, int action, std::string val);
    std::string def;
    const char *help;
} StringXString;

typedef struct {
    int level;
    const char *str;
    double (*function)(int num, int action, double val);
    double def;
    const char *help;
} StringXNumber;

typedef struct {
    int level;
    const char *str;
    unsigned int (*function)(int num, int action, unsigned int val);
    // the defaults are stored in individual bytes so that we can initialize
    // them statically independently of the machine endianness. They will be
    // packed into unsigned ints at runtime
    unsigned char def1[4], def2[4], def3[4], def4[4];
    const char *help;
} StringXColor;

void InitOptions(int num);
void InitOptionsGUI(int num);
void ReInitOptions(int num);
void PrintOptions(int num, int level, int diff, int help, const char *filename,
                  std::vector<std::string> *vec = 0);
void PrintOptionsDoc();

bool StringOption(int action, const char *category, int num, const char *name,
                  std::string &val, bool warnIfUnknown = true);
bool NumberOption(int action, const char *category, int num, const char *name,
                  double &val, bool warnIfUnknown = true);
bool ColorOption(int action, const char *category, int num, const char *name,
                 unsigned int &val, bool warnIfUnknown = true);

GmshColorTable *GetColorTable(int num);
int GetColorForString(int alpha, const char *string, int *FlagError);
bool GetRGBForString(const char *string, int &r, int &g, int &b);

#endif


text:
using System;
using osu.Framework.Allocation;
using osu.Framework.Graphics.Containers;

namespace osu.Game.Tests.Visual
{
    /// <summary>
    /// A <see cref="Container"/> which providing ad-hoc dependencies to the child drawables.
    /// </summary>
    /// <remarks>
    /// The <see cref="CachedDependencies"/> must be set while this <see cref="DependencyProvidingContainer"/> is not loaded.
    /// </remarks>
    public class DependencyProvidingContainer : Container
    {
        /// <summary>
        /// The dependencies provided to the children.
        /// </summary>
        // TODO: should be an init-only property when C# 9
        public (Type, object)[] CachedDependencies { get; set; } = Array.Empty<(Type, object)>();

        protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
        {
            var dependencyContainer = new DependencyContainer(base.CreateChildDependencies(parent));

            foreach ((var type, object value) in CachedDependencies)
                dependencyContainer.CacheAs(type, value);

            return dependencyContainer;
        }
    }
}


text:
<?php

namespace app\controllers;

use Yii;
use app\models\Estimates;
use app\models\EstimatedAreas;
use app\models\ProductServices;
use app\models\Companies;
use app\models\Products;
use app\models\ServiceEstimates;
use app\models\Customers;
use app\models\DynamicForms;
use app\models\EstimatesSearch;
use app\models\AssignmentsSearch;
use app\models\Employees;
use app\models\Assignments;
use app\models\ProductsUsedPerArea;
use app\models\ProductsPerEstimate;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use yii\data\ArrayDataProvider;
use yii\data\SqlDataProvider;
use yii\data\ActiveDataProvider;
use mPDF;

/**
 * EstimatesController implements the CRUD actions for Estimates model.
 */
class DashboardController extends Controller
{

    public function actionIndex()
    {
        $data = \Yii::$app->db->createCommand("SELECT count(estimate_id) as `Total`, Month(received_date) as `date`
                                               from estimates where status_id = 3 and  Year(received_date) = Year(NOW())
                                               group by Month(received_date) order by `date` ASC")->queryAll();
        $declinedData = \Yii::$app->db->createCommand("SELECT count(estimate_id) as `Total`, Month(received_date) as `date`
                                               from estimates where status_id = 2 and  Year(received_date) = Year(NOW())
                                               group by Month(received_date) order by `date` ASC")->queryAll();
       $jobOrders = $this->setMonths($data);
       $declined = $this->setMonths($declinedData);
      //var_dump($newData);die();
        return $this->render('index', [
            'jobOrders' => $jobOrders,
            'declined' => $declined
        ]);
    }

    public function setMonths($data){
      $list = [];
       $found = 0;
        for($i=0; $i < 12; $i++){
          for($j=0; $j < count($data); $j++){
           if($i == $data[$j]['date']){
             $list[$i] = (int)$data[$j]['Total'];
             $found=1;
             break;
           }

          $found=0;
         }
         if($found == 0) $list[$i] = 0;
       }

      return $list;
    }

}


text:
package org.assertj.core.error.uri;

import static org.assertj.core.util.Strings.isNullOrEmpty;

import java.net.URI;
import java.net.URL;

import org.assertj.core.error.BasicErrorMessageFactory;
import org.assertj.core.error.ErrorMessageFactory;

public class ShouldHavePath extends BasicErrorMessageFactory {

  private static final String SHOULD_NOT_HAVE_PATH = "%nExpecting:%n  <%s>%nnot to have a path but had:%n  <%s>";
  private static final String SHOULD_HAVE_PATH = "%nExpecting path of%n  <%s>%nto be:%n  <%s>%nbut was:%n  <%s>";

  public static ErrorMessageFactory shouldHavePath(URI actual, String expectedPath) {
    return expectedPath == null ? new ShouldHavePath(actual) : new ShouldHavePath(actual, expectedPath);
  }

  private ShouldHavePath(URI actual, String expectedPath) {
    super(SHOULD_HAVE_PATH, actual, expectedPath, actual.getPath());
  }

  private ShouldHavePath(URI actual) {
    super(SHOULD_NOT_HAVE_PATH, actual, actual.getPath());
  }

  public static ErrorMessageFactory shouldHavePath(URL actual, String expectedPath) {
    return isNullOrEmpty(expectedPath) ? new ShouldHavePath(actual) : new ShouldHavePath(actual, expectedPath);
  }

  private ShouldHavePath(URL actual, String expectedPath) {
    super(SHOULD_HAVE_PATH, actual, expectedPath, actual.getPath());
  }

  private ShouldHavePath(URL actual) {
    super(SHOULD_NOT_HAVE_PATH, actual, actual.getPath());
  }

}


text:
@implementation NSString (toNSArray)

- (NSArray *)toNSArray {
    NSMutableArray *letterArray = [NSMutableArray array];
    [self enumerateSubstringsInRange:NSMakeRange(0, self.length) options:(NSStringEnumerationByComposedCharacterSequences) usingBlock:^(NSString *substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop) {
        [letterArray addObject:substring];
    }];

    return letterArray;
}
@end


text:
using CommandLine;
using CommandLine.Text;

namespace VSTS.WIT.Reporting.Providers.JsonFile
{
    public class JsonFileSourceProviderOptions
    {
        [Option("sourcePath", Required = true, HelpText = "Full path to where json files will be read from")]
        public string Path { get; set; }

        [HelpOption]
        public string GetUsage()
        {
            var helpText = HelpText.AutoBuild(this, (HelpText current) => HelpText.DefaultParsingErrorsHandler(this, current));

            return helpText;
        }
    }
}


text:
namespace InheritanceAndPolymorphism
{
    using System;
    using System.Collections.Generic;
    using System.Text;

    public class OffsiteCourse : Course
    {
        private string p1;
        private string p2;
        private List<string> list;

        public OffsiteCourse(string courseName, string teacherName)
            : base(courseName, teacherName)
        {
            this.Town = null;
        }

        public OffsiteCourse(string courseName, string teacherName, IList<string> students)
            : base(courseName, teacherName, students)
        {
            this.Town = null;
        }

        public string Town { get; set; }

        public override string ToString()
        {
            string result = base.ToString();

            if (this.Town != null)
            {
                result += string.Format("; Lab = ", this.Town);
            }

            result += " }";
            return result;
        }
    }
}


text:
Book Movie Tickets

<input type="text" placeholder="Search Movies" class="form-control" data-ng-model="search">

{{movie.name | uppercase}}

{{movie.review | limitTo:99}}...

                Availability ({{movie.availability}})
                Review
                Book »


text:
all:
	scons -f SConscript
clean:
	scons -f SConscript -c


text:
package comutil

import "errors"

var (
	// ErrCreationFailed is returned when instance creation fails for an
	// unspecified reason. This generally means that NULL was returned from
	// CoCreateInstanceEx but an HRESULT value of S_OK was returned instead of a
	// proper error code. Under normal circumstances with correctly written
	// component object model servers this error should never occur.
	ErrCreationFailed = errors.New("unable to create interface instance")

	// ErrMultiDimArray is returned when a safe array contains more than one
	// one dimension. Multi-dimensional array parsing is not currently supported.
	ErrMultiDimArray = errors.New("attribute contains a multi-dimensional array of values")

	// ErrUnsupportedArray is returned when members of a safe array members are
	// supported for type conversion.
	ErrUnsupportedArray = errors.New("unsupported safe array member type")

	// ErrVariantArray is returned when members of a safe array members were not
	// expected to variants but are.
	ErrVariantArray = errors.New("attribute contains variant array members")

	// ErrNonVariantArray is returned when members of a safe array members were
	// expected to variants but are not.
	ErrNonVariantArray = errors.New("attribute contains non-variant array members")
)


text:
<?php

declare(strict_types=1);

namespace StructType;

use InvalidArgumentException;
use WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for InsightContent StructType
 * @package Ews
 * @subpackage Structs
 * @author WsdlToPhp <contact@wsdltophp.com>
 */
class EwsInsightContent extends AbstractStructBase
{
}


text:
import * as path from 'path';
import * as express from 'express';
import * as _debug from 'debug';

import config from './config';
import routes from './routes';
import { expressMiddleware } from './middleware';

const debug = _debug('bear:server');
const server = express();

// ==============================================================================
// 中间件
// ==============================================================================
// Base Express middleware - body-parser, method-override, busboy, cors
expressMiddleware(server);

debug(`mounting routes ...`);

// ==============================================================================
// ROUTES
// ==============================================================================
// All routes for the server
routes(server);

export default server;


text:
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';

moduleForComponent('focus-textarea', 'Integration | Component | focus textarea', {
  integration: true
});

test('it renders', function(assert) {

  // Set any properties with this.set('myProperty', 'value');
  // Handle any actions with this.on('myAction', function(val) { ... });" + EOL + EOL +

  this.render(hbs`{{focus-textarea}}`);

  assert.equal(this.$().text().trim(), '');

  // Template block usage:" + EOL +
  this.render(hbs`
    {{#focus-textarea}}
      template block text
    {{/focus-textarea}}
  `);

  assert.equal(this.$().text().trim(), 'template block text');
});


text:
package org.lwjgl.util.spvc;

import javax.annotation.*;

import java.nio.*;

import org.lwjgl.*;
import org.lwjgl.system.*;

import static org.lwjgl.system.MemoryUtil.*;
import static org.lwjgl.system.MemoryStack.*;

/**
 *
Layout

 *
 *

 * struct spvc_buffer_range {
 *     unsigned int index;
 *     size_t offset;
 *     size_t range;
 * }

 */
@NativeType("struct spvc_buffer_range")
public class SpvcBufferRange extends Struct implements NativeResource {

    /** The struct size in bytes. */
    public static final int SIZEOF;

    /** The struct alignment in bytes. */
    public static final int ALIGNOF;

    /** The struct member offsets. */
    public static final int
        INDEX,
        OFFSET,
        RANGE;

    static {
        Layout layout = __struct(
            __member(4),
            __member(POINTER_SIZE),
            __member(POINTER_SIZE)
        );

        SIZEOF = layout.getSize();
        ALIGNOF = layout.getAlignment();

        INDEX = layout.offsetof(0);
        OFFSET = layout.offsetof(1);
        RANGE = layout.offsetof(2);
    }

    /**
     * Creates a {@code SpvcBufferRange} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be
     * visible to the struct instance and vice versa.
     *
     *
The created instance holds a strong reference to the container object.

     */
    public SpvcBufferRange(ByteBuffer container) {
        super(memAddress(container), __checkContainer(container, SIZEOF));
    }

    @Override
    public int sizeof() { return SIZEOF; }

    /** @return the value of the {@code index} field. */
    @NativeType("unsigned int")
    public int index() { return nindex(address()); }
    /** @return the value of the {@code offset} field. */
    @NativeType("size_t")
    public long offset() { return noffset(address()); }
    /** @return the value of the {@code range} field. */
    @NativeType("size_t")
    public long range() { return nrange(address()); }

    /** Sets the specified value to the {@code index} field. */
    public SpvcBufferRange index(@NativeType("unsigned int") int value) { nindex(address(), value); return this; }
    /** Sets the specified value to the {@code offset} field. */
    public SpvcBufferRange offset(@NativeType("size_t") long value) { noffset(address(), value); return this; }
    /** Sets the specified value to the {@code range} field. */
    public SpvcBufferRange range(@NativeType("size_t") long value) { nrange(address(), value); return this; }

    /** Initializes this struct with the specified values. */
    public SpvcBufferRange set(
        int index,
        long offset,
        long range
    ) {
        index(index);
        offset(offset);
        range(range);

        return this;
    }

    /**
     * Copies the specified struct data to this struct.
     *
     * @param src the source struct
     *
     * @return this struct
     */
    public SpvcBufferRange set(SpvcBufferRange src) {
        memCopy(src.address(), address(), SIZEOF);
        return this;
    }

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

    /** Returns a new {@code SpvcBufferRange} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */
    public static SpvcBufferRange malloc() {
        return wrap(SpvcBufferRange.class, nmemAllocChecked(SIZEOF));
    }

    /** Returns a new {@code SpvcBufferRange} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */
    public static SpvcBufferRange calloc() {
        return wrap(SpvcBufferRange.class, nmemCallocChecked(1, SIZEOF));
    }

    /** Returns a new {@code SpvcBufferRange} instance allocated with {@link BufferUtils}. */
    public static SpvcBufferRange create() {
        ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF);
        return wrap(SpvcBufferRange.class, memAddress(container), container);
    }

    /** Returns a new {@code SpvcBufferRange} instance for the specified memory address. */
    public static SpvcBufferRange create(long address) {
        return wrap(SpvcBufferRange.class, address);
    }

    /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */
    @Nullable
    public static SpvcBufferRange createSafe(long address) {
        return address == NULL ? null : wrap(SpvcBufferRange.class, address);
    }

    /**
     * Returns a new {@link SpvcBufferRange.Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed.
     *
     * @param capacity the buffer capacity
     */
    public static SpvcBufferRange.Buffer malloc(int capacity) {
        return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity);
    }

    /**
     * Returns a new {@link SpvcBufferRange.Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed.
     *
     * @param capacity the buffer capacity
     */
    public static SpvcBufferRange.Buffer calloc(int capacity) {
        return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity);
    }

    /**
     * Returns a new {@link SpvcBufferRange.Buffer} instance allocated with {@link BufferUtils}.
     *
     * @param capacity the buffer capacity
     */
    public static SpvcBufferRange.Buffer create(int capacity) {
        ByteBuffer container = __create(capacity, SIZEOF);
        return wrap(Buffer.class, memAddress(container), capacity, container);
    }

    /**
     * Create a {@link SpvcBufferRange.Buffer} instance at the specified memory.
     *
     * @param address  the memory address
     * @param capacity the buffer capacity
     */
    public static SpvcBufferRange.Buffer create(long address, int capacity) {
        return wrap(Buffer.class, address, capacity);
    }

    /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */
    @Nullable
    public static SpvcBufferRange.Buffer createSafe(long address, int capacity) {
        return address == NULL ? null : wrap(Buffer.class, address, capacity);
    }

    /**
     * Returns a new {@code SpvcBufferRange} instance allocated on the specified {@link MemoryStack}.
     *
     * @param stack the stack from which to allocate
     */
    public static SpvcBufferRange malloc(MemoryStack stack) {
        return wrap(SpvcBufferRange.class, stack.nmalloc(ALIGNOF, SIZEOF));
    }

    /**
     * Returns a new {@code SpvcBufferRange} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero.
     *
     * @param stack the stack from which to allocate
     */
    public static SpvcBufferRange calloc(MemoryStack stack) {
        return wrap(SpvcBufferRange.class, stack.ncalloc(ALIGNOF, 1, SIZEOF));
    }

    /**
     * Returns a new {@link SpvcBufferRange.Buffer} instance allocated on the specified {@link MemoryStack}.
     *
     * @param stack    the stack from which to allocate
     * @param capacity the buffer capacity
     */
    public static SpvcBufferRange.Buffer malloc(int capacity, MemoryStack stack) {
        return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity);
    }

    /**
     * Returns a new {@link SpvcBufferRange.Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero.
     *
     * @param stack    the stack from which to allocate
     * @param capacity the buffer capacity
     */
    public static SpvcBufferRange.Buffer calloc(int capacity, MemoryStack stack) {
        return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity);
    }

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

    /** Unsafe version of {@link #index}. */
    public static int nindex(long struct) { return UNSAFE.getInt(null, struct + SpvcBufferRange.INDEX); }
    /** Unsafe version of {@link #offset}. */
    public static long noffset(long struct) { return memGetAddress(struct + SpvcBufferRange.OFFSET); }
    /** Unsafe version of {@link #range}. */
    public static long nrange(long struct) { return memGetAddress(struct + SpvcBufferRange.RANGE); }

    /** Unsafe version of {@link #index(int) index}. */
    public static void nindex(long struct, int value) { UNSAFE.putInt(null, struct + SpvcBufferRange.INDEX, value); }
    /** Unsafe version of {@link #offset(long) offset}. */
    public static void noffset(long struct, long value) { memPutAddress(struct + SpvcBufferRange.OFFSET, value); }
    /** Unsafe version of {@link #range(long) range}. */
    public static void nrange(long struct, long value) { memPutAddress(struct + SpvcBufferRange.RANGE, value); }

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

    /** An array of {@link SpvcBufferRange} structs. */
    public static class Buffer extends StructBuffer<SpvcBufferRange, Buffer> implements NativeResource {

        private static final SpvcBufferRange ELEMENT_FACTORY = SpvcBufferRange.create(-1L);

        /**
         * Creates a new {@code SpvcBufferRange.Buffer} instance backed by the specified container.
         *
         * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values
         * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided
         * by {@link SpvcBufferRange#SIZEOF}, and its mark will be undefined.
         *
         *
The created buffer instance holds a strong reference to the container object.

         */
        public Buffer(ByteBuffer container) {
            super(container, container.remaining() / SIZEOF);
        }

        public Buffer(long address, int cap) {
            super(address, null, -1, 0, cap, cap);
        }

        Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) {
            super(address, container, mark, pos, lim, cap);
        }

        @Override
        protected Buffer self() {
            return this;
        }

        @Override
        protected SpvcBufferRange getElementFactory() {
            return ELEMENT_FACTORY;
        }

        /** @return the value of the {@code index} field. */
        @NativeType("unsigned int")
        public int index() { return SpvcBufferRange.nindex(address()); }
        /** @return the value of the {@code offset} field. */
        @NativeType("size_t")
        public long offset() { return SpvcBufferRange.noffset(address()); }
        /** @return the value of the {@code range} field. */
        @NativeType("size_t")
        public long range() { return SpvcBufferRange.nrange(address()); }

        /** Sets the specified value to the {@code index} field. */
        public SpvcBufferRange.Buffer index(@NativeType("unsigned int") int value) { SpvcBufferRange.nindex(address(), value); return this; }
        /** Sets the specified value to the {@code offset} field. */
        public SpvcBufferRange.Buffer offset(@NativeType("size_t") long value) { SpvcBufferRange.noffset(address(), value); return this; }
        /** Sets the specified value to the {@code range} field. */
        public SpvcBufferRange.Buffer range(@NativeType("size_t") long value) { SpvcBufferRange.nrange(address(), value); return this; }

    }

}


text:
package org.encog.neural.cpn;

import org.encog.Encog;
import org.encog.mathutil.matrices.Matrix;
import org.encog.mathutil.randomize.ConsistentRandomizer;
import org.encog.ml.BasicML;
import org.encog.ml.MLError;
import org.encog.ml.MLRegression;
import org.encog.ml.MLResettable;
import org.encog.ml.data.MLData;
import org.encog.ml.data.MLDataSet;
import org.encog.ml.data.basic.BasicMLData;
import org.encog.util.simple.EncogUtility;

/**
 * Counterpropagation Neural Networks (CPN) were developed by Professor
 * Robert Hecht-Nielsen in 1987. CPN neural networks are a hybrid neural
 * network, employing characteristics of both a feedforward neural
 * network and a self-organzing map (SOM). The CPN is composed of
 * three layers, the input, the instar and the outstar. The connection
 * from the input to the instar layer is competitive, with only one
 * neuron being allowed to win. The connection between the instar and
 * outstar is feedforward. The layers are trained separately,
 * using instar training and outstar training. The CPN network is
 * good at regression.
 *
 */
public class CPN extends BasicML implements MLRegression,
	MLResettable, MLError {

	/**
	 * Serial id.
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * The number of neurons in the input layer.
	 */
	private final int inputCount;

	/**
	 * The number of neurons in the instar, or hidden, layer.
	 */
	private final int instarCount;

	/**
	 * The number of neurons in the outstar, or output, layer.
	 */
	private final int outstarCount;

	/**
	 * The number of winning neurons.
	 */
	private final int winnerCount;

	/**
	 * The weights from the input to the instar layer.
	 */
	private final Matrix weightsInputToInstar;

	/**
	 * The weights from the instar to the outstar layer.
	 */
	private final Matrix weightsInstarToOutstar;

	/**
	 * Construct the counterpropagation neural network.
	 * @param theInputCount The number of input neurons.
	 * @param theInstarCount The number of instar neurons.
	 * @param theOutstarCount The number of outstar neurons.
	 * @param theWinnerCount The winner count.
	 */
	public CPN(final int theInputCount, final int theInstarCount,
			final int theOutstarCount, final int theWinnerCount) {
		this.inputCount = theInputCount;
		this.instarCount = theInstarCount;
		this.outstarCount = theOutstarCount;

		this.weightsInputToInstar = new Matrix(inputCount, instarCount);
		this.weightsInstarToOutstar = new Matrix(instarCount, outstarCount);
		this.winnerCount = theWinnerCount;
	}

	/**
	 * Calculate the error for this neural network.
	 *
	 * @param data
	 *            The training set.
	 * @return The error percentage.
	 */
	@Override
	public final double calculateError(final MLDataSet data) {
		return EncogUtility.calculateRegressionError(this, data);
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public final MLData compute(final MLData input) {
		final MLData temp = computeInstar(input);
		return computeOutstar(temp);
	}

	/**
	 * Compute the instar layer.
	 * @param input The input.
	 * @return The output.
	 */
	public final MLData computeInstar(final MLData input) {
		final MLData result = new BasicMLData(this.instarCount);
		int w, i, j;
		double sum, sumWinners, maxOut;
		int winner = 0;
		final boolean[] winners = new boolean[this.instarCount];

		for (i = 0; i < this.instarCount; i++) {
			sum = 0;
			for (j = 0; j < this.inputCount; j++) {
				sum += this.weightsInputToInstar.get(j, i) * input.getData(j);
			}
			result.setData(i, sum);
			winners[i] = false;
		}
		sumWinners = 0;
		for (w = 0; w < this.winnerCount; w++) {
			maxOut = Double.MIN_VALUE;
			for (i = 0; i < this.instarCount; i++) {
				if (!winners[i] && (result.getData(i) > maxOut)) {
					winner = i;
					maxOut = result.getData(winner);
				}
			}
			winners[winner] = true;
			sumWinners += result.getData(winner);
		}
		for (i = 0; i < this.instarCount; i++) {
			if (winners[i]
					&& (Math.abs(sumWinners) > Encog.DEFAULT_DOUBLE_EQUAL)) {
				result.getData()[i] /= sumWinners;
			} else {
				result.getData()[i] = 0;
			}
		}

		return result;
	}

	/**
	 * Compute the outstar layer.
	 * @param input The input.
	 * @return The output.
	 */
	public final MLData computeOutstar(final MLData input) {
		final MLData result = new BasicMLData(this.outstarCount);

		double sum = 0;

		for (int i = 0; i < this.outstarCount; i++) {
			sum = 0;
			for (int j = 0; j < this.instarCount; j++) {
				sum += this.weightsInstarToOutstar.get(j, i) * input.getData(j);
			}
			result.setData(i, sum);
		}
		return result;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public final int getInputCount() {
		return this.inputCount;
	}

	/**
	 * @return The instar count, same as the input count.
	 */
	public final int getInstarCount() {
		return this.instarCount;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public final int getOutputCount() {
		return this.outstarCount;
	}

	/**
	 * @return The outstar count, same as the output count.
	 */
	public final int getOutstarCount() {
		return this.outstarCount;
	}

	/**
	 * @return The weights between the input and instar.
	 */
	public final Matrix getWeightsInputToInstar() {
		return this.weightsInputToInstar;
	}

	/**
	 * @return The weights between the instar and outstar.
	 */
	public final Matrix getWeightsInstarToOutstar() {
		return this.weightsInstarToOutstar;
	}

	/**
	 * @return The winner count.
	 */
	public final int getWinnerCount() {
		return this.winnerCount;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public final void reset() {
		reset(0);
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public final void reset(final int seed) {
		final ConsistentRandomizer randomize = new ConsistentRandomizer(-1, 1,
				seed);
		randomize.randomize(this.weightsInputToInstar);
		randomize.randomize(this.weightsInstarToOutstar);
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public void updateProperties() {
		// unneeded
	}

}


text:
layout: post
date: 2016-03-27
title: "Jonathan James Couture Alyssa"
category: Jonathan James Couture
tags: [Jonathan James Couture]
---
### Jonathan James Couture Alyssa
Just **$379.99**
###

BRANDS	Jonathan James Couture

Buy it: [https://www.readybrides.com/en/jonathan-james-couture/36409-jonathan-james-couture-alyssa.html](https://www.readybrides.com/en/jonathan-james-couture/36409-jonathan-james-couture-alyssa.html)