text:
package water.fvec;

import java.io.File;
import java.util.*;
import java.util.concurrent.ExecutionException;

import hex.GLMTest2;
import hex.glm.GLM2;
import hex.glm.GLMParams;
import water.*;
import water.deploy.Node;
import water.deploy.NodeVM;
import water.exec.Env;
import water.exec.Exec2;
import water.parser.ParseDataset;
import water.serial.ModelSerializationTest;

public class DatasetCompare extends MRTask<DatasetCompare>{
  Frame _fr;
  boolean _eq = true;
  double _diff;
  public static final double compareDatasets(ValueArray ary, Frame fr){
    DatasetCompare tsk = new DatasetCompare();
    tsk._fr = fr;
    tsk.invoke(ary._key);
    System.out.println("diff = " + tsk._diff);
    return tsk._diff;
  }

  @Override public void map(Key key) {
    int cidx = (int)ValueArray.getChunkIndex(key);
    final Key vaKey = ValueArray.getArrayKey(key);
    final Vec [] vecs = _fr.vecs();
    for(int i  = 0; i < vecs.length; ++i)
      assert vecs[i] != null:"missing vector[" + i + "] "+ _fr.names()[i] + ", keys = " + Arrays.toString(_fr._keys) + ", vecs = " + Arrays.toString(_fr.vecs());
    ValueArray va = DKV.get(vaKey).get();
    AutoBuffer bits = va.getChunk(key);
    final int rows = va.rpc(cidx);
    long off = 0;
    for(int i = 0; i < cidx; ++i)
      off += va.rpc(i);
    for(int i = 0; i < rows; ++i){
      for(int j = 0; j < va._cols.length; ++j){
        if(va.isNA(bits, i, j) && vecs[j].isNA(i+off))continue;
        double diff = Math.abs(va.datad(bits, i, j) - vecs[j].at(i+off));
        if(diff > _diff)_diff = diff;
        if(diff >= 1e-3){
          _eq = false;
          System.out.println("incompatible values at row " + (off + i) + " column " + va._cols[j]._name + ", " + va.datad(bits, i, j) + " != " + vecs[j].at(i+off));
        }
      }
    }
  }
  @Override public void reduce(DatasetCompare drt) {
    _eq = _eq && drt._eq;
    _diff = Math.max(_diff,drt._diff);
  }

  private static void do_file(File f,Map<String,Double> diffs,Map<String,Exception> ex){
    if(f.isDirectory()){
      for(File f2:f.listFiles())do_file(f2,diffs,ex);
    } else {
      TestUtil.checkLeakedKeys(); // make sure we have no previous keys in
      System.out.print("parsing file " + f.getPath() + "...");
      Key vaHex = Key.make("va.hex");
      Key vaRaw = null;
      Key frHex = Key.make("fr.hex");
      Key frRaw = null;
      try {
        vaRaw = TestUtil.load_test_file(f,"va.bin");
        try{
          ParseDataset.parse(vaHex, new Key[]{vaRaw});
        }catch(Throwable t){
          System.err.println("Skipping file " + f.getPath() + " as parse1 failed, got exception '" + t.getClass() + "', with msg '" + t.getMessage()+"'");
          if(vaRaw != null)UKV.remove(vaRaw);
          UKV.remove(vaHex);
          return;
        }
        frRaw = NFSFileVec.make(f);
        ParseDataset2.parse(frHex, new Key[]{frRaw});
        ValueArray ary = DKV.get(vaHex).get();
        if(ary.length() > 0){
          Frame fr = DKV.get(frHex).get();
          double d = compareDatasets(ary, fr);
          if(d > 0)diffs.put(f.getPath(),d);
        }
      }catch(Exception e){
        ex.put(f.getPath(), e);
      }finally{
        if(vaRaw != null)UKV.remove(vaRaw);
        for(Key k:H2O.localKeySet())UKV.remove(k);
        UKV.remove(vaHex);
        UKV.remove(frHex);
        if(frRaw != null)UKV.remove(frRaw);
      }
    }
  }

  // to be parsed when cloud is up
  private static String [] datasets = new String[] {
    "/Users/tomasnykodym/h2o/smalldata/logreg/prostate.csv","prostate",
    "/Users/tomasnykodym/mydata/arcene/arcene_train.data","train_raw",
    "/Users/tomasnykodym/mydata/arcene/arcene_train_labels.labels","labels",
    "/Users/tomasnykodym/mydata/coll/train.csv","dtrain",
    "/Users/tomasnykodym/mydata/coll/test.csv","dtest"
  };

  private static String [] cmds = new String[] {
    "train2 <- cbind(train_raw,labels);","train",
  };

  public static void main(String [] args) throws InterruptedException, ExecutionException, Exception{
    System.out.println("Running Parser Cmp Test with args=" + Arrays.toString(args));
    System.out.println(Arrays.equals((int[])null,(int[])null));
    final int nnodes = 3;
    for( int i = 1; i < nnodes; i++ ) {
      Node n = new NodeVM(args);
      n.inheritIO();
      n.start();
    }
    H2O.waitForCloudSize(nnodes,20000);
    new GLMTest2().testCars();
    new ModelSerializationTest().testGLMModel();
    new NewVectorTest().testCompression();
    System.out.println("compression ok");
    for(int i = 0; i < datasets.length; i += 2){
      File f = new File(datasets[i]);
      if(!f.exists()) throw new RuntimeException("did not find file " + f.getAbsolutePath());
      Key frRaw = NFSFileVec.make(f);
      Key frHex = Key.make(datasets[i+1]);
      ParseDataset2.parse(frHex, new Key[]{frRaw});
    }
    Futures fs = new Futures();
    for(int i = 0; i < cmds.length; i += 2){
      System.out.println("Executing: '" + cmds[i] + "'");
      Env env = Exec2.exec(cmds[i]);
      Frame fr = env.popAry();
      DKV.put(Key.make(cmds[i+1]),fr,fs);
    }
    fs.blockForPending();
//    new GLMTest2().testCars();
//    File f = new File("/Users/tomasnykodym/h2o/smalldata/airlines/allyears2k_headers.csv");
//    assert f.exists():"did not find file " + f.getPath();
//    Key frRaw = NFSFileVec.make(f);
//    Key frHex = Key.make("allyears2k_headers.hex");
//    ParseDataset2.parse(frHex, new Key[]{frRaw});
//    GLM2 glm = new GLM2();
//    glm.ignored_cols = new int[]{4,6,10,11,13,14,15,19,20,21,22,23,24,25,26,27,28,29};
//    glm.source = DKV.get(frHex).get();
//    glm._glm = new GLMParams(GLMParams.Family.binomial, 0, GLMParams.Link.logit, 0);
//    glm.response = glm.source.vec("IsDepDelayed");
//    glm.job_key = Key.make();
//    glm.destination_key = Key.make();
//    glm.lambda = new double[]{1e-5};
//    long t1 = System.currentTimeMillis();
//    glm.init();
//    glm.fork().get();
//    System.out.println("glm done in " + (System.currentTimeMillis()-t1) + "ms");
    String root = (args.length > 0)?args[0]:"smalldata";
    System.out.println("ROOT = " + root);
    System.out.println("Running...");
//    new NewVectorTest().testCompression();
////    Map<String,Double> diffs = new TreeMap<String, Double>();
////    Map<String,Exception> exs = new TreeMap<String, Exception>();
////    do_file(TestUtil.find_test_file(root),diffs,exs);
////    System.out.println("DONE!!!");
//    File f = new File("/Users/tomasnykodym/mydata/c12/anon_file_bigger.csv");
//    assert f.exists():"did not find file " + f.getPath();
//    Key frRaw = NFSFileVec.make(f);
//    Key frHex = Key.make("anon_file_bigger.hex");
//    ParseDataset2.parse(frHex, new Key[]{frRaw});
//    File f2 = new File("/Users/tomasnykodym/h2o/smalldata/airlines/AirlinesTrain.csv.zip");
//    assert f2.exists():"did not find file " + f.getPath();
//    Key frRaw2 = NFSFileVec.make(f2);
//    Key frHex2 = Key.make("allyears2k_headers.hex");
//    ParseDataset2.parse(frHex2, new Key[]{frRaw2});
    System.out.println("DONE");
//    for(Map.Entry<String, Exception> e:exs.entrySet()){
//      System.err.println("Exception occured while processing " + e.getKey());
//      e.getValue().printStackTrace();
//    }
//    for(Map.Entry<String, Double> e:diffs.entrySet())
//      if(e.getValue() > 1e-5)System.err.println(e.getKey() + ", DIFF = " + e.getValue());
//    System.err.flush();
//    for(Map.Entry<String, Double> e:diffs.entrySet())
//      System.out.println(e.getKey() + ", diff = " + e.getValue());
  }
}


text:
@interface SSJBaseNavController : UINavigationController

@end

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Kecaknoah;
using Kecaknoah.Analyze;
using Kecaknoah.Type;
using System.Diagnostics;

namespace KecaknoahConsole
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length < 1)
            {
                Console.WriteLine("Usage: kecaknoah <input file>");
                return;
            }

            var txt = File.ReadAllText(args[0]);
            var lexer = new KecaknoahLexer();
            var parser = new KecaknoahParser();
            var lr = lexer.AnalyzeFromSource(txt);
            if (!lr.Success)
            {
                Console.WriteLine($"字句解析エラー ({lr.Error.Column}, {lr.Error.Line}): {lr.Error.Message}");
                Console.ReadLine();
                return;
            }
            var ast = parser.Parse(lr);
            if (!ast.Success)
            {
                Console.WriteLine($"構文解析エラー ({ast.Error.Column}, {ast.Error.Line}): {ast.Error.Message}");
                Console.ReadLine();
            }
            var prc = new KecaknoahPrecompiler();
            var src = prc.PrecompileAll(ast);

            var environment = new KecaknoahEnvironment();
            var module = environment.CreateModule("Main");
            module.RegisterSource(src);
            var ctx = module.CreateContext();
            var il = module["main"];
            var kargs = new List<KecaknoahString>();
            if (args.Length > 2)
            {
                kargs.AddRange(args.Skip(1).Select(p => p.AsKecaknoahString()));
            }
            if (il != KecaknoahNil.Instance) ctx.Execute(il, kargs.ToArray());
            /*
            var sw = new Stopwatch();
            sw.Start();
            for (int i = 0; i < 10; i++)
            {
                ctx.Execute(il);
            }
            sw.Stop();
            Console.WriteLine($"{sw.ElapsedMilliseconds}");
            */
            var asm = AssembleSource(src);
            File.WriteAllLines(args[0] + ".asm", asm);
            Console.ReadLine();
        }

        static IList<string> AssembleSource(KecaknoahSource info)
        {
            var result = new List<string>();
            foreach (var i in info.Classes)
            {
                result.AddRange(AssembleClass(i as KecaknoahScriptClassInfo));
                result.Add("");
            }
            foreach (var i in info.TopLevelMethods)
            {
                result.AddRange(AssembleFunction(i as KecaknoahScriptMethodInfo));
                result.Add("");
            }
            return result;
        }

        static IList<string> AssembleClass(KecaknoahScriptClassInfo info)
        {
            var result = new List<string>();
            result.Add($".class {info.Name}");
            foreach (var i in info.Locals)
            {
                result.Add("  .local" + i);
            }
            result.Add("  ");
            foreach (var i in info.InstanceMethods)
            {
                result.AddRange(AssembleFunction(i as KecaknoahScriptMethodInfo).Select(p => "  " + p));
                result.Add("  ");
            }
            foreach (var i in info.ClassMethods)
            {
                result.AddRange(AssembleFunction(i as KecaknoahScriptMethodInfo).Select(p => "  " + p));
                result.Add("  ");
            }
            foreach (var i in info.InnerClasses)
            {
                result.AddRange(AssembleClass(i as KecaknoahScriptClassInfo).Select(p => "  " + p));
                result.Add("  ");
            }
            return result;
        }

        static IList<string> AssembleFunction(KecaknoahScriptMethodInfo info)
        {
            var result = new List<string>();
            result.Add($".function {info.Name}");
            foreach (var i in info.Codes.Codes)
            {
                result.Add("  " + i.ToString());
            }
            return result;
        }
    }
}


text:
namespace Orchard.ContentManagement.Handlers {
    public class CloneContentContext : ContentContextBase {
        public CloneContentContext(ContentItem contentItem) : base(contentItem) {
        }
    }
}


text:
<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

/**
 * Class Cadmodels.
 *
 * @author  The scaffold-interface created at 2017-09-05 08:07:22pm
 * @link  https://github.com/amranidev/scaffold-interface
 */
class CadmodelsAddUserid extends Migration
{
    /**
     * Run the migrations.
     *
     * @return  void
     */
    public function up()
    {
        Schema::table('cadmodels',function (Blueprint $table){

        $table->unsignedInteger('user_id');

        });
    }

    /**
     * Reverse the migrations.
     *
     * @return  void
     */
    public function down()
    {
        Schema::table('cadmodels',function (Blueprint $table){
            $table->dropColumn('user_id');
        });
    }
}


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

package v201302.customtargetingservice;

import com.google.api.ads.dfp.lib.DfpService;
import com.google.api.ads.dfp.lib.DfpServiceLogger;
import com.google.api.ads.dfp.lib.DfpUser;
import com.google.api.ads.dfp.v201302.CustomTargetingKey;
import com.google.api.ads.dfp.v201302.CustomTargetingKeyType;
import com.google.api.ads.dfp.v201302.CustomTargetingServiceInterface;
import com.google.api.ads.dfp.v201302.CustomTargetingValue;
import com.google.api.ads.dfp.v201302.CustomTargetingValueMatchType;

/**
 * This example creates new custom targeting keys and values. To determine which
 * custom targeting keys and values exist, run
 * GetAllCustomTargetingKeysAndValuesExample.java. To target these custom
 * targeting keys and values, run TargetCustomCriteriaExample.java.
 *
 * Tags: CustomTargetingService.createCustomTargetingKeys
 * Tags: CustomTargetingService.createCustomTargetingValues
 *
 * @author api.arogal@gmail.com (Adam Rogal)
 */
public class CreateCustomTargetingKeysAndValuesExample {
  public static void main(String[] args) {
    try {
      // Log SOAP XML request and response.
      DfpServiceLogger.log();

      // Get DfpUser from "~/dfp.properties".
      DfpUser user = new DfpUser();

      // Get the CustomTargetingService.
      CustomTargetingServiceInterface customTargetingService =
          user.getService(DfpService.V201302.CUSTOM_TARGETING_SERVICE);

      // Create predefined key.
      CustomTargetingKey genderKey = new CustomTargetingKey();
      genderKey.setDisplayName("gender");
      genderKey.setName("g");
      genderKey.setType(CustomTargetingKeyType.PREDEFINED);

      // Create predefined key that may be used for content targeting.
      CustomTargetingKey genreKey = new CustomTargetingKey();
      genreKey.setDisplayName("genre");
      genreKey.setName("genre");
      genreKey.setType(CustomTargetingKeyType.PREDEFINED);

      // Create free-form key.
      CustomTargetingKey carModelKey = new CustomTargetingKey();
      carModelKey.setDisplayName("car model");
      carModelKey.setName("c");
      carModelKey.setType(CustomTargetingKeyType.FREEFORM);

      // Create the custom targeting keys on the server.
      CustomTargetingKey[] keys = customTargetingService.createCustomTargetingKeys(
          new CustomTargetingKey[] {genderKey, genreKey, carModelKey});

      if (keys != null) {
        for (CustomTargetingKey key : keys) {
          System.out.println("A custom targeting key with ID \"" + key.getId()
              + "\", name \"" + key.getName() + "\", and display name \""
              + key.getDisplayName() + "\" was created.");
        }
      } else {
        System.out.println("No keys were created.");
      }

      // Create custom targeting value for the predefined gender key.
      CustomTargetingValue genderMaleValue = new CustomTargetingValue();
      genderMaleValue.setCustomTargetingKeyId(keys[0].getId());
      genderMaleValue.setDisplayName("male");
      // Name is set to 1 so that the actual name can be hidden from website
      // users.
      genderMaleValue.setName("1");
      genderMaleValue.setMatchType(CustomTargetingValueMatchType.EXACT);

      CustomTargetingValue genderFemaleValue = new CustomTargetingValue();
      genderFemaleValue.setCustomTargetingKeyId(keys[0].getId());
      genderFemaleValue.setDisplayName("female");
      // Name is set to 2 so that the actual name can be hidden from website
      // users.
      genderFemaleValue.setName("2");
      genderFemaleValue.setMatchType(CustomTargetingValueMatchType.EXACT);

      // Create custom targeting value for the predefined genre key.
      CustomTargetingValue genreComedyValue = new CustomTargetingValue();
      genreComedyValue.setCustomTargetingKeyId(keys[1].getId());
      genreComedyValue.setDisplayName("comedy");
      genreComedyValue.setName("comedy");
      genreComedyValue.setMatchType(CustomTargetingValueMatchType.EXACT);

      CustomTargetingValue genreDramaValue = new CustomTargetingValue();
      genreDramaValue.setCustomTargetingKeyId(keys[1].getId());
      genreDramaValue.setDisplayName("drama");
      genreDramaValue.setName("drama");
      genreDramaValue.setMatchType(CustomTargetingValueMatchType.EXACT);

      // Create custom targeting value for the free-form age key. These are
      // values that would be suggested in the UI or can be used when targeting
      // with a {@link FreeFormCustomCriteria}.
      CustomTargetingValue carModelHondaCivicValue = new CustomTargetingValue();
      carModelHondaCivicValue.setCustomTargetingKeyId(keys[2].getId());
      carModelHondaCivicValue.setDisplayName("honda civic");
      carModelHondaCivicValue.setName("honda civic");
      // Setting match type to exact will match exactly "honda civic".
      carModelHondaCivicValue.setMatchType(CustomTargetingValueMatchType.EXACT);

      // Create the custom targeting values on the server.
      CustomTargetingValue[] returnValues =
          customTargetingService.createCustomTargetingValues(new CustomTargetingValue[] {
              genderMaleValue, genderFemaleValue, genreComedyValue, genreDramaValue,
              carModelHondaCivicValue});

      if (returnValues != null) {
        for (CustomTargetingValue value : returnValues) {
          System.out.println("A custom targeting value with ID \"" + value.getId()
              + "\", belonging to key with ID \"" + value.getCustomTargetingKeyId()
              + "\", name \"" + value.getName() + "\", and display name \""
              + value.getDisplayName() + "\" was created.");
        }
      } else {
        System.out.println("No values were created.");
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
}


text:
layout: default
title: CAS - RESTful Service Registry
category: Services
---

# RESTful Service Registry

```xml
<dependency>
     <groupId>org.apereo.cas</groupId>
     <artifactId>cas-server-support-rest-service-registry</artifactId>
     <version>${cas.version}</version>
</dependency>
```

## Configuration

To see the relevant list of CAS properties, please [review this guide](../configuration/Configuration-Properties.html#restful-service-registry).

| Operation         | Method          | Body                       | Response
|-------------------|-----------------|----------------------------------------------------------------------
| Save              | `POST`          | `RegisteredService` object | `RegisteredService` object
| Delete            | `DELETE`        | `RegisteredService` object | None
| Load              | `GET`           | None                       | Collection of `RegisteredService` objects
| FindById          | `GET`           | Service numeric id appended to the endpoint url as a path variable   | `RegisteredService` object
| FindById          | `GET`           | Service url appended to the endpoint url as a path variable    | `RegisteredService` object

All operations are expected to return a `200` status code. All other response status codes will force CAS to consider the requested operation nullified.

## Auto Initialization

Upon startup and configuration permitting, the registry is able to auto initialize itself from
default JSON service definitions available to CAS. See [this guide](AutoInitialization-Service-Management.html) for more info.

## Implementation

The following code snippet demonstrates an *example* implementation of the REST API expected by CAS via Spring Boot:

```java
@RestController
@RequestMapping("/services")
public class ServicesController {

    @DeleteMapping
    public Integer findByServiceId(@RequestBody final RegisteredService service) {
        // Locate the service...
        return HttpStatus.SC_OK;
    }

    @PostMapping
    public RegisteredService save(@RequestBody final RegisteredService service) {
        // Save the provided service...
        return ...;
    }

    @GetMapping("/{id}")
    public RegisteredService findServiceById(@PathVariable(name = "id") final String id) {
        if (NumberUtils.isParsable(id)) {
            // Locate service by its numeric internal identifier
            return ...
        }
         // Locate service by its service identifier
        return ...
    }

    @GetMapping
    public RegisteredService[] load() {
        // Load services...
        return new RegisteredService[]{...};
    }
}
```


text:
import { CALL_API } from 'redux-api-middleware';

export const GET_POSTS_REQUEST = "GET_POSTS_REQUEST";
export const GET_POSTS_SUCCESS = "GET_POSTS_SUCCESS";
export const GET_POSTS_FAILURE = "GET_POSTS_FAILURE";

export const GET_POST_REQUEST = "GET_POST_REQUEST";
export const GET_POST_SUCCESS = "GET_POST_SUCCESS";
export const GET_POST_FAILURE = "GET_POST_FAILURE";

export function getPosts(offset, tag) {
    return {
        [CALL_API]: {
            endpoint: '/api/posts?offset=' + offset + (typeof tag !== 'undefined' ? '&tag=' + tag: ''),
            method: 'GET',
            types: [GET_POSTS_REQUEST, GET_POSTS_SUCCESS, GET_POSTS_FAILURE]
        }
    }
}

export function getPost(slug) {
    return {
        [CALL_API]: {
            endpoint: '/api/posts/' + slug,
            method: 'GET',
            types: [GET_POST_REQUEST, GET_POST_SUCCESS, GET_POST_FAILURE]
        }
    }
}


text:
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [1.0.0] - 2015-07-10
### Breaking Changes
- ext now does not use a timer to wait after window load (forberg) to report sizes
- `iframe.html` introduces breaking change, to better support IE gardr-ext has to inject/write within an plain script-tag and not via a script-file.
    - the ext.js script does no longer auto-inject, but requires (as in `iframe.html`) `gardr.inject()` to run
    - If size reporting in IE8 and IE9 are important to you, an upgrade is advised.

### Fixes
- Cross-domain-events upgraded to 0.4.0 for legacy IE support
- IE11 empty url.protocol fix for allowed domains check
- `overflow-x` / `overflow-y` support with getting sizes in browsers(firefox) that does not compute this back to `overflow: auto`


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

<meta name="collection" content="api">

<TITLE>
InvalidSlot (Java 2 Platform SE 5.0)
</TITLE>

<META NAME="keywords" CONTENT="org.omg.PortableInterceptor.InvalidSlot class">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

JavaTM 2 Platform
Standard Ed. 5.0

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

org.omg.PortableInterceptor

Class InvalidSlot

java.lang.Object
  java.lang.Throwable
      java.lang.Exception
          org.omg.CORBA.UserException
              org.omg.PortableInterceptor.InvalidSlot

All Implemented Interfaces:
Serializable, IDLEntity

public final class InvalidSlot
extends UserException

org/omg/PortableInterceptor/InvalidSlot.java .
 Generated by the IDL-to-Java compiler (portable), version "3.2"
 from ../../../../src/share/classes/org/omg/PortableInterceptor/Interceptors.idl
 Wednesday, August 11, 2004 5:04:09 AM GMT-08:00

Constructor Summary

InvalidSlot()

InvalidSlot(String $reason)

Method Summary

Methods inherited from class java.lang.Throwable

fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvalidSlot

public InvalidSlot()

InvalidSlot

public InvalidSlot(String $reason)

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

JavaTM 2 Platform
Standard Ed. 5.0

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2004, 2010 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.


text:
<?xml version="1.0"?>
<resource>
  <metadata>
    <uri>http://dvorka/e-mentality/concept/MR_Documentation#Label_regexp</uri>
    <author>dvorka</author>
    <created>1109677956924</created>
    <revision>12</revision>
    <timestamp>1109678152655</timestamp>
    <type>http://e-mental.com/mindraider/owl/class#Concept</type>
    <mr>0.506</mr>
  </metadata>
  <data>
    <notebookProperty>
      <uri>http://dvorka/e-mentality/notebook#MR_Documentation</uri>
    </notebookProperty>
    <labelProperty>Label regexp</labelProperty>
    <annotationProperty>By default you may search Graph navigator's nodes labels. In this case you may use regular expressions, for example:
 o Note
 o (Your|Mine) concept
 o [Aa]cme
 o Complete name^</annotationProperty>
    <parentConceptUri></parentConceptUri>
    <propertyGroup uri="com:e-mental:mindraider:folder:notebook:concept:attachments" label="Attachments" />
  </data>
</resource>


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Epacris squarrosa (R.Br.) Poir.

### Remarks
null


text:
/**
 * Created by wangWei on 2016/5/14.
 */

angular.module('myApp')
    .factory('DetailService', ['commonService', function (commonService) {
            var services = {
            };
            services.getBlogDetail=function(params){
                var url=RESTPATH+"rest/blog/list/:blogId";
               return commonService.commonDo('GET',url,params);
            };

            services.pushlishComment=function(params,data){

                var url=RESTPATH+'rest/blog/:blogId/comment';
                return commonService.commonDo('SAVE',url,params,data);

            };

            services.publishApply=function(params,data){
                var url=RESTPATH+'rest/blog/:blogId/comment/:commentId/apply';
                return commonService.commonDo('SAVE',url,params,data);
            };

            services.nextPageComment=function(params){
                var url=RESTPATH+'rest/blog/:blogId/comment/:pageIndex';
                return commonService.commonDo('GET',url,params);
            };

            return services;
            //详情页中查询话题详细信息
    }])
;


text:
package database::oracle::mode::corruptedblocks;

use base qw(centreon::plugins::mode);

use strict;
use warnings;

sub new {
    my ($class, %options) = @_;
    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
    bless $self, $class;

    $options{options}->add_options(arguments => {
        "warning:s"               => { name => 'warning', },
        "critical:s"              => { name => 'critical', },
    });

    return $self;
}

sub check_options {
    my ($self, %options) = @_;
    $self->SUPER::init(%options);

    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
        $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
        $self->{output}->option_exit();
    }
    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
        $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
        $self->{output}->option_exit();
    }
}

sub run {
    my ($self, %options) = @_;
    # $options{sql} = sqlmode object
    $self->{sql} = $options{sql};

    $self->{sql}->connect();
    $self->{sql}->query(query => q{SELECT COUNT(*) FROM v$database_block_corruption});
    my $corrupted_blocks = $self->{sql}->fetchrow_array();
    $self->{sql}->disconnect();

    my $exit_code = $self->{perfdata}->threshold_check(value => $corrupted_blocks, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
    $self->{output}->output_add(severity => $exit_code,
                                  short_msg => sprintf("%i corrupted blocks.", $corrupted_blocks));
    $self->{output}->perfdata_add(label => 'corrupted_blocks',
                                  value => $corrupted_blocks,
                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
                                  min => 0);

    $self->{output}->display();
    $self->{output}->exit();
}

1;

__END__

=head1 MODE

Check Oracle corrupted blocks.

=over 8

=item B<--warning>

Threshold warning.

=item B<--critical>

Threshold critical.

=back

=cut


text:
using System.Collections.Generic;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.InteropServices.Tests.Common;
using Xunit;

namespace System.Runtime.InteropServices.Tests
{
    public partial class GenerateGuidForTypeTests
    {
        public static IEnumerable<object[]> GenerateGuidForType_Valid_TestData()
        {
            yield return new object[] { typeof(int) };
            yield return new object[] { typeof(int).MakePointerType() };
            // Crashes with .NET Framework.
            if (!PlatformDetection.IsFullFramework)
            {
                yield return new object[] { typeof(int).MakeByRefType() };
            }
            yield return new object[] { typeof(string) };
            yield return new object[] { typeof(string[]) };

            yield return new object[] { typeof(NonGenericClass) };
            yield return new object[] { typeof(GenericClass<string>) };
            yield return new object[] { typeof(AbstractClass) };

            yield return new object[] { typeof(NonGenericStruct) };
            yield return new object[] { typeof(GenericStruct<string>) };

            yield return new object[] { typeof(NonGenericInterface) };
            yield return new object[] { typeof(GenericInterface<string>) };

            yield return new object[] { typeof(GenericClass<>) };
            // Crashes with .NET Framework.
            if (!PlatformDetection.IsFullFramework)
            {
                yield return new object[] { typeof(GenericClass<>).GetTypeInfo().GenericTypeParameters[0] };
            }

            yield return new object[] { typeof(ClassWithGuidAttribute) };

#if !netstandard // TODO: Enable for netstandard2.1
            AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Assembly"), AssemblyBuilderAccess.RunAndCollect);
            ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("Module");
            TypeBuilder typeBuilder = moduleBuilder.DefineType("Type");
            Type collectibleType = typeBuilder.CreateType();
            yield return new object[] { collectibleType };
#endif
        }

        [Theory]
        [MemberData(nameof(GenerateGuidForType_Valid_TestData))]
        public void GenerateGuidForType_ValidType_ReturnsExpected(Type type)
        {
            if (type.HasElementType)
            {
                // [ActiveIssue(30940, ~TargetFrameworkMonikers.NetFramework)]
                if (PlatformDetection.IsNetCore)
                {
                    Assert.Equal(Guid.Empty, type.GUID);
                    Assert.Equal(type.GUID, Marshal.GenerateGuidForType(type));
                }
                else
                {
                    Assert.NotEqual(type.GUID, Marshal.GenerateGuidForType(type));
                }
            }
            else
            {
                Assert.Equal(type.GUID, Marshal.GenerateGuidForType(type));
            }
        }

        [Guid("12345678-0939-11d1-8be1-00c04fd8d503")]
        public class ClassWithGuidAttribute { }

        [Fact]
        [ActiveIssue(30926, ~TargetFrameworkMonikers.NetFramework)]
        public void GenerateGuidForType_NullType_ThrowsArgumentNullException()
        {
            AssertExtensions.Throws<ArgumentNullException>("type", () => Marshal.GenerateGuidForType(null));
        }

        [Fact]
        [ActiveIssue(30926, ~TargetFrameworkMonikers.NetFramework)]
        public void GenerateGuidForType_NotRuntimeType_ThrowsArgumentException()
        {
            AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Assembly"), AssemblyBuilderAccess.Run);
            ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("Module");
            TypeBuilder typeBuilder = moduleBuilder.DefineType("Type");
            AssertExtensions.Throws<ArgumentException>("type", () => Marshal.GenerateGuidForType(typeBuilder));
        }
    }
}


text:
'use strict';

// -----------------------------------------------------------------------------
// Rule Definition
// -----------------------------------------------------------------------------

module.exports = {
  meta: {
    docs: {
      description: 'Disallow use of moment(<ms>).utc()',
      category: 'Stylistic Issues',
      recommended: false
    },

    schema: []
  },

  create(context) {
    return {
      CallExpression(node) {
        if (node.callee.name === 'moment')
          context.report({
            node,
            message: 'Non-utc time. Use `abacus-moment.utc()` instead'
          });
      }
    };
  }
};


text:
package test.listeners.issue2456;

import java.lang.reflect.Method;
import org.testng.IDataProviderListener;
import org.testng.ITestContext;
import org.testng.ITestNGMethod;

public class SimpleErrorSniffingListener implements IDataProviderListener {

  private Method testMethod;
  private Method dataProvider;
  private Throwable exception;

  @Override
  public void onDataProviderFailure(ITestNGMethod method, ITestContext ctx, RuntimeException t) {
    this.testMethod = method.getConstructorOrMethod().getMethod();
    this.dataProvider = method.getDataProviderMethod().getMethod();
    this.exception = t.getCause();
  }

  public Method getDataProvider() {
    return dataProvider;
  }

  public Method getTestMethod() {
    return testMethod;
  }

  public Throwable getException() {
    return exception;
  }
}


text:
#pragma warning disable 1587   // invalid XML comment

/// <summary>
/// Ignite Streamer classes.
/// </summary>
namespace Apache.Ignite.Core.Datastream
{
    // No-op.
}


text:
set -e
set -x
cd "$(dirname "$0")"
CFLAGS="-c -mcpu=arm1176jzf-s -fpic -ffreestanding -std=c11  -O2 -Wall -Wextra -Werror -I . -I dlibc -g"

mkdir -p build
arm-none-eabi-gcc $CFLAGS boot/arm/boot.S -o build/boot.o
arm-none-eabi-gcc $CFLAGS core/kernel.c -o build/kernel.o
arm-none-eabi-gcc $CFLAGS arch/arm/uart.c -o build/uart.o
arm-none-eabi-gcc -T ./arch/arm/link.ld -o build/dk.elf -ffreestanding -O2 -nostdlib build/boot.o build/kernel.o build/uart.o

# Run with qemu-system-arm -kernel build/dk.elf -no-reboot  -serial stdio -M raspi2


text:
//// [types.d.ts]
declare module "tslib" { export const __exportStar: any; export const __importDefault: any; export const __importStar: any; }
//// [username.ts]
export const username = () => 'username';
//// [index.ts]
export * from './username';
//// [hello.ts]
const sayHello = (name?: string) => void (`Hello, ${name}!`);

export default sayHello;
//// [index.ts]
import sayHello from "./hello";
import { username } from './utils';

sayHello(username());

//// [username.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.username = void 0;
const username = () => 'username';
exports.username = username;
//// [index.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./username"), exports);
//// [hello.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const sayHello = (name) => void (`Hello, ${name}!`);
exports.default = sayHello;
//// [index.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const hello_1 = tslib_1.__importDefault(require("./hello"));
const utils_1 = require("./utils");
(0, hello_1.default)((0, utils_1.username)());


text:
package mcjty.rftools.blocks.screens.modulesclient;

import mcjty.lib.gui.widgets.Panel;
import mcjty.rftools.blocks.screens.ModuleGuiChanged;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.Gui;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import org.lwjgl.opengl.GL11;

public class RedstoneClientScreenModule implements ClientScreenModule {

    private String line = "";
    private String yestext = "on";
    private String notext = "off";
    private int color = 0xffffff;
    private int yescolor = 0xffffff;
    private int nocolor = 0xffffff;
    private int dim = 0;

    @Override
    public TransformMode getTransformMode() {
        return TransformMode.TEXT;
    }

    @Override
    public int getHeight() {
        return 10;
    }

    @Override
    public void render(FontRenderer fontRenderer, int currenty, Object[] screenData, float factor) {
        GL11.glDisable(GL11.GL_LIGHTING);
        int xoffset;
        if (!line.isEmpty()) {
            fontRenderer.drawString(line, 7, currenty, color);
            xoffset = 7 + 40;
        } else {
            xoffset = 7;
        }

        if (screenData != null && screenData.length > 0 && screenData[0] instanceof Boolean) {
            boolean rs = (Boolean) screenData[0];
            fontRenderer.drawString(rs ? yestext : notext, xoffset, currenty, rs ? yescolor : nocolor);
        } else {
            fontRenderer.drawString("<invalid>", xoffset, currenty, 0xff0000);
        }
    }

    @Override
    public void mouseClick(World world, int x, int y, boolean clicked) {

    }

    @Override
    public Panel createGui(Minecraft mc, Gui gui, final NBTTagCompound currentData, final ModuleGuiChanged moduleGuiChanged) {
        return new ScreenModuleGuiBuilder(mc, gui, currentData, moduleGuiChanged).
                label("Label:").text("text", "Label text").color("color", "Color for the label").nl().
                label("Yes:").text("yestext", "Positive text").color("yescolor", "Color for the positive text").nl().
                label("No:").text("notext", "Negative text").color("nocolor", "Color for the negative text").nl().
                label("Block:").monitor().nl().
                build();
    }

    @Override
    public void setupFromNBT(NBTTagCompound tagCompound, int dim, int x, int y, int z) {
        if (tagCompound != null) {
            line = tagCompound.getString("text");
            if (tagCompound.hasKey("yestext")) {
                yestext = tagCompound.getString("yestext");
            }
            if (tagCompound.hasKey("notext")) {
                notext = tagCompound.getString("notext");
            }
            if (tagCompound.hasKey("color")) {
                color = tagCompound.getInteger("color");
            } else {
                color = 0xffffff;
            }
            if (tagCompound.hasKey("yescolor")) {
                yescolor = tagCompound.getInteger("yescolor");
            } else {
                yescolor = 0xffffff;
            }
            if (tagCompound.hasKey("nocolor")) {
                nocolor = tagCompound.getInteger("nocolor");
            } else {
                nocolor = 0xffffff;
            }
        }
    }

    @Override
    public boolean needsServerData() {
        return true;
    }
}


text:
<!DOCTYPE HTML>

<title>Uses of Class com.google.ortools.constraintsolver.RoutingSearchParameters.Builder (com.google.ortools:ortools-java 9.4.1874 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2022-09-15">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

All Classes

SEARCH:
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">

JavaScript is disabled on your browser.

Uses of Class
com.google.ortools.constraintsolver.RoutingSearchParameters.Builder

Packages that use RoutingSearchParameters.Builder

Package
Description

com.google.ortools.constraintsolver

Uses of RoutingSearchParameters.Builder in com.google.ortools.constraintsolver

Methods in com.google.ortools.constraintsolver that return RoutingSearchParameters.Builder

Modifier and Type
Method
Description

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
                java.lang.Object value)

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clear()

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearCheapestInsertionAddUnperformedEntries()

 Whether or not to consider entries making the nodes/pairs unperformed in
 the GlobalCheapestInsertion heuristic.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearCheapestInsertionFarthestSeedsRatio()

 Ratio (between 0 and 1) of available vehicles in the model on which
 farthest nodes of the model are inserted as seeds in the
 GlobalCheapestInsertion first solution heuristic.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearCheapestInsertionFirstSolutionMinNeighbors()

int32 cheapest_insertion_first_solution_min_neighbors = 44;

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearCheapestInsertionFirstSolutionNeighborsRatio()

 Ratio (in ]0, 1]) of closest non start/end nodes to consider as neighbors
 for each node when creating new insertions in the parallel/sequential
 cheapest insertion heuristic.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearCheapestInsertionFirstSolutionUseNeighborsRatioForInitialization()

 Whether or not to only consider closest neighbors when initializing the
 assignment for the first solution.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearCheapestInsertionLsOperatorMinNeighbors()

int32 cheapest_insertion_ls_operator_min_neighbors = 45;

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearCheapestInsertionLsOperatorNeighborsRatio()

 Neighbors ratio and minimum number of neighbors for the heuristic when used
 in a local search operator (see
 local_search_operators.use_global_cheapest_insertion_path_lns and
 local_search_operators.use_global_cheapest_insertion_chain_lns below).

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearChristofidesUseMinimumMatching()

 If true use minimum matching instead of minimal matching in the
 Christofides algorithm.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearContinuousSchedulingSolver()

.operations_research.RoutingSearchParameters.SchedulingSolver continuous_scheduling_solver = 33;

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearDisableSchedulingBewareThisMayDegradePerformance()

 Setting this to true completely disables the LP and MIP scheduling in the
 solver.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearField(com.google.protobuf.Descriptors.FieldDescriptor field)

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearFirstSolutionStrategy()

 First solution strategies, used as starting point of local search.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearGuidedLocalSearchLambdaCoefficient()

 These are advanced settings which should not be modified unless you know
 what you are doing.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearHeuristicCloseNodesLnsNumNodes()

 Number of closest nodes to consider for each node during the destruction
 phase of the FilteredHeuristicCloseNodesLNSOperator.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearHeuristicExpensiveChainLnsNumArcsToConsider()

 Number of expensive arcs to consider cutting in the
 FilteredHeuristicExpensiveChainLNSOperator operator.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearImprovementLimitParameters()

 The improvement search limit is added to the solver if the following
 parameters are set.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearLnsTimeLimit()

 Limit to the time spent in the completion search for each local search
 neighbor.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearLocalCheapestInsertionEvaluatePickupDeliveryCostsIndependently()

 Whether or not to insert pickup/delivery pairs greedily in the
 LocalCheapestInsertion heuristic.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearLocalSearchMetaheuristic()

 Local search metaheuristics used to guide the search.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearLocalSearchOperators()

.operations_research.RoutingSearchParameters.LocalSearchNeighborhoodOperators local_search_operators = 3;

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearLogCostOffset()

double log_cost_offset = 29;

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearLogCostScalingFactor()

 In logs, cost values will be scaled and offset by the given values in the
 following way: log_cost_scaling_factor * (cost + log_cost_offset)

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearLogSearch()

 --- Miscellaneous ---
 Some of these are advanced settings which should not be modified unless you
 know what you are doing.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearLogTag()

 In logs, this tag will be appended to each line corresponding to a new
 solution.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearMixedIntegerSchedulingSolver()

.operations_research.RoutingSearchParameters.SchedulingSolver mixed_integer_scheduling_solver = 34;

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearMultiArmedBanditCompoundOperatorExplorationCoefficient()

 Positive parameter defining the exploration coefficient of the multi-armed
 bandit compound operator.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearMultiArmedBanditCompoundOperatorMemoryCoefficient()

 Memory coefficient related to the multi-armed bandit compound operator.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearNumberOfSolutionsToCollect()

 Number of solutions to collect during the search.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearOptimizationStep()

 Minimum step by which the solution must be improved in local search.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearRelocateExpensiveChainNumArcsToConsider()

 Number of expensive arcs to consider cutting in the RelocateExpensiveChain
 neighborhood operator (see
 LocalSearchNeighborhoodOperators.use_relocate_expensive_chain()).

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearSatParameters()

 If use_cp_sat or use_generalized_cp_sat is true, contains the SAT algorithm
 parameters which will be used.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearSavingsAddReverseArcs()

 Add savings related to reverse arcs when finding the nearest neighbors
 of the nodes.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearSavingsArcCoefficient()

 Coefficient of the cost of the arc for which the saving value is being
 computed:
 Saving(a-->b) = Cost(a-->end) + Cost(start-->b)
                 - savings_arc_coefficient * Cost(a-->b)
 This parameter must be greater than 0, and its default value is 1.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearSavingsMaxMemoryUsageBytes()

 The number of neighbors considered for each node in the Savings heuristic
 is chosen so that the space used to store the savings doesn't exceed
 savings_max_memory_usage_bytes, which must be in ]0, 1e10].

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearSavingsNeighborsRatio()

 Parameters specific to the Savings first solution heuristic.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearSavingsParallelRoutes()

 When true, the routes are built in parallel, sequentially otherwise.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearSolutionLimit()

 -- Search limits --
 Limit to the number of solutions generated during the search.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearTimeLimit()

 Limit to the time spent in the search.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearUseCp()

 If true, use the CP solver to find a solution.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearUseCpSat()

 If true, use the CP-SAT solver to find a solution.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearUseDepthFirstSearch()

 --- Search control ---
 If true, the solver should use depth-first search rather than local search
 to solve the problem.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearUseFullPropagation()

 --- Propagation control ---
 These are advanced settings which should not be modified unless you know
 what you are doing.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearUseGeneralizedCpSat()

 If true, use the CP-SAT solver to find a solution on generalized routing
 model.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearUseMultiArmedBanditConcatenateOperators()

 If true, the solver will use multi-armed bandit concatenate operators.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clearUseUnfilteredFirstSolutionStrategy()

 --- Advanced first solutions strategy settings ---
 Don't touch these unless you know what you are doing.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.clone()

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.mergeFrom(RoutingSearchParameters other)

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.mergeFrom(com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.mergeFrom(com.google.protobuf.Message other)

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.mergeImprovementLimitParameters(RoutingSearchParameters.ImprovementSearchLimitParameters value)

 The improvement search limit is added to the solver if the following
 parameters are set.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.mergeLnsTimeLimit(com.google.protobuf.Duration value)

 Limit to the time spent in the completion search for each local search
 neighbor.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.mergeLocalSearchOperators(RoutingSearchParameters.LocalSearchNeighborhoodOperators value)

.operations_research.RoutingSearchParameters.LocalSearchNeighborhoodOperators local_search_operators = 3;

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.mergeSatParameters(SatParameters value)

 If use_cp_sat or use_generalized_cp_sat is true, contains the SAT algorithm
 parameters which will be used.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.mergeTimeLimit(com.google.protobuf.Duration value)

 Limit to the time spent in the search.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)

static RoutingSearchParameters.Builder
RoutingSearchParameters.newBuilder()

static RoutingSearchParameters.Builder
RoutingSearchParameters.newBuilder(RoutingSearchParameters prototype)

RoutingSearchParameters.Builder
RoutingSearchParameters.newBuilderForType()

protected RoutingSearchParameters.Builder
RoutingSearchParameters.newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setCheapestInsertionAddUnperformedEntries(boolean value)

 Whether or not to consider entries making the nodes/pairs unperformed in
 the GlobalCheapestInsertion heuristic.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setCheapestInsertionFarthestSeedsRatio(double value)

 Ratio (between 0 and 1) of available vehicles in the model on which
 farthest nodes of the model are inserted as seeds in the
 GlobalCheapestInsertion first solution heuristic.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setCheapestInsertionFirstSolutionMinNeighbors(int value)

int32 cheapest_insertion_first_solution_min_neighbors = 44;

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setCheapestInsertionFirstSolutionNeighborsRatio(double value)

 Ratio (in ]0, 1]) of closest non start/end nodes to consider as neighbors
 for each node when creating new insertions in the parallel/sequential
 cheapest insertion heuristic.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setCheapestInsertionFirstSolutionUseNeighborsRatioForInitialization(boolean value)

 Whether or not to only consider closest neighbors when initializing the
 assignment for the first solution.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setCheapestInsertionLsOperatorMinNeighbors(int value)

int32 cheapest_insertion_ls_operator_min_neighbors = 45;

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setCheapestInsertionLsOperatorNeighborsRatio(double value)

 Neighbors ratio and minimum number of neighbors for the heuristic when used
 in a local search operator (see
 local_search_operators.use_global_cheapest_insertion_path_lns and
 local_search_operators.use_global_cheapest_insertion_chain_lns below).

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setChristofidesUseMinimumMatching(boolean value)

 If true use minimum matching instead of minimal matching in the
 Christofides algorithm.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setContinuousSchedulingSolver(RoutingSearchParameters.SchedulingSolver value)

.operations_research.RoutingSearchParameters.SchedulingSolver continuous_scheduling_solver = 33;

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setContinuousSchedulingSolverValue(int value)

.operations_research.RoutingSearchParameters.SchedulingSolver continuous_scheduling_solver = 33;

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setDisableSchedulingBewareThisMayDegradePerformance(boolean value)

 Setting this to true completely disables the LP and MIP scheduling in the
 solver.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setField(com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value)

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setFirstSolutionStrategy(FirstSolutionStrategy.Value value)

 First solution strategies, used as starting point of local search.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setFirstSolutionStrategyValue(int value)

 First solution strategies, used as starting point of local search.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setGuidedLocalSearchLambdaCoefficient(double value)

 These are advanced settings which should not be modified unless you know
 what you are doing.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setHeuristicCloseNodesLnsNumNodes(int value)

 Number of closest nodes to consider for each node during the destruction
 phase of the FilteredHeuristicCloseNodesLNSOperator.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setHeuristicExpensiveChainLnsNumArcsToConsider(int value)

 Number of expensive arcs to consider cutting in the
 FilteredHeuristicExpensiveChainLNSOperator operator.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setImprovementLimitParameters(RoutingSearchParameters.ImprovementSearchLimitParameters value)

 The improvement search limit is added to the solver if the following
 parameters are set.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setImprovementLimitParameters(RoutingSearchParameters.ImprovementSearchLimitParameters.Builder builderForValue)

 The improvement search limit is added to the solver if the following
 parameters are set.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setLnsTimeLimit(com.google.protobuf.Duration value)

 Limit to the time spent in the completion search for each local search
 neighbor.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setLnsTimeLimit(com.google.protobuf.Duration.Builder builderForValue)

 Limit to the time spent in the completion search for each local search
 neighbor.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setLocalCheapestInsertionEvaluatePickupDeliveryCostsIndependently(boolean value)

 Whether or not to insert pickup/delivery pairs greedily in the
 LocalCheapestInsertion heuristic.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setLocalSearchMetaheuristic(LocalSearchMetaheuristic.Value value)

 Local search metaheuristics used to guide the search.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setLocalSearchMetaheuristicValue(int value)

 Local search metaheuristics used to guide the search.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setLocalSearchOperators(RoutingSearchParameters.LocalSearchNeighborhoodOperators value)

.operations_research.RoutingSearchParameters.LocalSearchNeighborhoodOperators local_search_operators = 3;

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setLocalSearchOperators(RoutingSearchParameters.LocalSearchNeighborhoodOperators.Builder builderForValue)

.operations_research.RoutingSearchParameters.LocalSearchNeighborhoodOperators local_search_operators = 3;

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setLogCostOffset(double value)

double log_cost_offset = 29;

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setLogCostScalingFactor(double value)

 In logs, cost values will be scaled and offset by the given values in the
 following way: log_cost_scaling_factor * (cost + log_cost_offset)

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setLogSearch(boolean value)

 --- Miscellaneous ---
 Some of these are advanced settings which should not be modified unless you
 know what you are doing.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setLogTag(java.lang.String value)

 In logs, this tag will be appended to each line corresponding to a new
 solution.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setLogTagBytes(com.google.protobuf.ByteString value)

 In logs, this tag will be appended to each line corresponding to a new
 solution.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setMixedIntegerSchedulingSolver(RoutingSearchParameters.SchedulingSolver value)

.operations_research.RoutingSearchParameters.SchedulingSolver mixed_integer_scheduling_solver = 34;

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setMixedIntegerSchedulingSolverValue(int value)

.operations_research.RoutingSearchParameters.SchedulingSolver mixed_integer_scheduling_solver = 34;

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setMultiArmedBanditCompoundOperatorExplorationCoefficient(double value)

 Positive parameter defining the exploration coefficient of the multi-armed
 bandit compound operator.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setMultiArmedBanditCompoundOperatorMemoryCoefficient(double value)

 Memory coefficient related to the multi-armed bandit compound operator.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setNumberOfSolutionsToCollect(int value)

 Number of solutions to collect during the search.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setOptimizationStep(double value)

 Minimum step by which the solution must be improved in local search.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setRelocateExpensiveChainNumArcsToConsider(int value)

 Number of expensive arcs to consider cutting in the RelocateExpensiveChain
 neighborhood operator (see
 LocalSearchNeighborhoodOperators.use_relocate_expensive_chain()).

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
                int index,
                java.lang.Object value)

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setSatParameters(SatParameters value)

 If use_cp_sat or use_generalized_cp_sat is true, contains the SAT algorithm
 parameters which will be used.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setSatParameters(SatParameters.Builder builderForValue)

 If use_cp_sat or use_generalized_cp_sat is true, contains the SAT algorithm
 parameters which will be used.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setSavingsAddReverseArcs(boolean value)

 Add savings related to reverse arcs when finding the nearest neighbors
 of the nodes.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setSavingsArcCoefficient(double value)

 Coefficient of the cost of the arc for which the saving value is being
 computed:
 Saving(a-->b) = Cost(a-->end) + Cost(start-->b)
                 - savings_arc_coefficient * Cost(a-->b)
 This parameter must be greater than 0, and its default value is 1.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setSavingsMaxMemoryUsageBytes(double value)

 The number of neighbors considered for each node in the Savings heuristic
 is chosen so that the space used to store the savings doesn't exceed
 savings_max_memory_usage_bytes, which must be in ]0, 1e10].

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setSavingsNeighborsRatio(double value)

 Parameters specific to the Savings first solution heuristic.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setSavingsParallelRoutes(boolean value)

 When true, the routes are built in parallel, sequentially otherwise.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setSolutionLimit(long value)

 -- Search limits --
 Limit to the number of solutions generated during the search.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setTimeLimit(com.google.protobuf.Duration value)

 Limit to the time spent in the search.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setTimeLimit(com.google.protobuf.Duration.Builder builderForValue)

 Limit to the time spent in the search.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setUseCp(OptionalBoolean value)

 If true, use the CP solver to find a solution.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setUseCpSat(OptionalBoolean value)

 If true, use the CP-SAT solver to find a solution.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setUseCpSatValue(int value)

 If true, use the CP-SAT solver to find a solution.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setUseCpValue(int value)

 If true, use the CP solver to find a solution.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setUseDepthFirstSearch(boolean value)

 --- Search control ---
 If true, the solver should use depth-first search rather than local search
 to solve the problem.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setUseFullPropagation(boolean value)

 --- Propagation control ---
 These are advanced settings which should not be modified unless you know
 what you are doing.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setUseGeneralizedCpSat(OptionalBoolean value)

 If true, use the CP-SAT solver to find a solution on generalized routing
 model.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setUseGeneralizedCpSatValue(int value)

 If true, use the CP-SAT solver to find a solution on generalized routing
 model.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setUseMultiArmedBanditConcatenateOperators(boolean value)

 If true, the solver will use multi-armed bandit concatenate operators.

RoutingSearchParameters.Builder
RoutingSearchParameters.Builder.setUseUnfilteredFirstSolutionStrategy(boolean value)

 --- Advanced first solutions strategy settings ---
 Don't touch these unless you know what you are doing.

RoutingSearchParameters.Builder
RoutingSearchParameters.toBuilder()

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

All Classes

JavaScript is disabled on your browser.

Copyright © 2022. All rights reserved.


text:
using System.Reflection;
using Abp.Modules;
using Abp.Threading.BackgroundWorkers;
using Abp.Zero;

namespace DatabaseMaintainer
{
    [DependsOn(typeof (AbpZeroCoreModule))]
    public class DatabaseMaintainerModule : AbpModule
    {
        public override void Initialize()
        {
            IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
        }

        public override void PostInitialize()
        {
            var workManager = IocManager.Resolve<IBackgroundWorkerManager>();
            workManager.Add(IocManager.Resolve<DeleteOldAuditLogsWorker>());
        }
    }
}


text:
package ml.combust.mleap.springboot

import java.io.File
import java.net.URI
import java.nio.file.{Files, StandardCopyOption}

import ml.combust.mleap.core.types.{ScalarType, StructField, StructType}
import ml.combust.mleap.runtime.frame.{DefaultLeapFrame, Row}

object TestUtil {

  lazy val demoUri = getClass.getClassLoader.getResource("demo.zip").toURI

  lazy val validFrame = DefaultLeapFrame(
    StructType(Seq(StructField("demo:a", ScalarType.Double),
      StructField("demo:c", ScalarType.Double),
      StructField("demo:d", ScalarType.Double))).get,
    Seq(Row(44.5, 22.1, 98.2)))

  lazy val incompleteFrame = DefaultLeapFrame(
    StructType(Seq(StructField("demo:a", ScalarType.Double),
      StructField("demo:d", ScalarType.Double))).get,
    Seq(Row(44.5, 98.2)))

  lazy val failingBytes = Array[Byte](69, 121, 101, 45, 62, 118, 101, 114, 61, 101, 98)

  def getBundle(uri: URI, createTmp: Boolean): URI = {
    if (createTmp) {
      val tmpFile = Files.createTempFile("demo", ".bundle.zip")
      val file = new File(uri.getPath).toPath
      Files.copy(file, tmpFile, StandardCopyOption.REPLACE_EXISTING)
      tmpFile.toFile.deleteOnExit()
      tmpFile.toUri
    } else {
      uri
    }
  }
}


text:
package testkit

import (
	"testing"

	"github.com/pingcap/tidb/domain"
	"github.com/pingcap/tidb/kv"
	"github.com/pingcap/tidb/session"
	"github.com/pingcap/tidb/store/mockstore"
	"github.com/stretchr/testify/require"
	"github.com/tikv/client-go/v2/oracle"
	"github.com/tikv/client-go/v2/tikv"
)

// CreateMockStore return a new mock kv.Storage.
func CreateMockStore(t *testing.T, opts ...mockstore.MockTiKVStoreOption) (store kv.Storage, clean func()) {
	store, _, clean = CreateMockStoreAndDomain(t, opts...)
	return
}

// CreateMockStoreAndDomain return a new mock kv.Storage and *domain.Domain.
func CreateMockStoreAndDomain(t *testing.T, opts ...mockstore.MockTiKVStoreOption) (kv.Storage, *domain.Domain, func()) {
	store, err := mockstore.NewMockStore(opts...)
	require.NoError(t, err)
	dom, clean := bootstrap(t, store)
	return store, dom, clean
}

func bootstrap(t *testing.T, store kv.Storage) (*domain.Domain, func()) {
	session.SetSchemaLease(0)
	session.DisableStats4Test()
	dom, err := session.BootstrapSession(store)
	require.NoError(t, err)

	dom.SetStatsUpdating(true)

	clean := func() {
		dom.Close()
		err := store.Close()
		require.NoError(t, err)
	}
	return dom, clean
}

// CreateMockStoreWithOracle returns a new mock kv.Storage and *domain.Domain, providing the oracle for the store.
func CreateMockStoreWithOracle(t *testing.T, oracle oracle.Oracle, opts ...mockstore.MockTiKVStoreOption) (kv.Storage, *domain.Domain, func()) {
	store, err := mockstore.NewMockStore(opts...)
	require.NoError(t, err)
	store.GetOracle().Close()
	store.(tikv.Storage).SetOracle(oracle)
	dom, clean := bootstrap(t, store)
	return store, dom, clean
}