text:
// Type definitions for react-native-indicators 0.13
// Project: https://github.com/n4kz/react-native-indicators#readme
// Definitions by: Ifiok Jr. <https://github.com/ifiokjr>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6

import { Component } from 'react';
import { Animated, EasingFunction } from 'react-native';
export interface BaseIndicatorProps {
    /**
     * Animation easing function
     * @default Easing.linear
     */
    animationEasing?: EasingFunction;

    /**
     * Animation duration in ms
     * @default1200
     */
    animationDuration?: number;
}

export interface UIActivityIndicatorProps extends BaseIndicatorProps {
    /**
     * Component color
     * @default 'rgb(0, 0, 0)'
     */
    color?: string;
    /**
     * Component count
     * @default 12
     */
    count?: number;
    /**
     * Base component size
     * @default 40
     */
    size?: number;
}

export class UIActivityIndicator extends Component<
    UIActivityIndicatorProps
> {}

export interface BallIndicatorProps extends BaseIndicatorProps {
    /**
     * Component color
     * @default 'rgb(0, 0, 0)'
     */
    color?: string;
    /**
     * Component count
     * @default 8
     */
    count?: number;
    /**
     * Base component size
     * @default 40
     */
    size?: number;
}

export class BallIndicator extends Component<BallIndicatorProps> {}

export interface BarIndicatorProps extends BaseIndicatorProps {
    /**
     * Component color
     * @default 'rgb(0, 0, 0)'
     */
    color?: string;
    /**
     * Component count
     * @default 3
     */
    count?: number;
    /**
     * Base component size
     * @default 40
     */
    size?: number;
}

export class BarIndicator extends Component<BarIndicatorProps> {}

export interface DotIndicatorProps extends BaseIndicatorProps {
    /**
     * Component color
     * @default 'rgb(0, 0, 0)'
     */
    color?: string;
    /**
     * Component count
     * @default 4
     */
    count?: number;
    /**
     * Base component size
     * @default 16
     */
    size?: number;
}

export class DotIndicator extends Component<DotIndicatorProps> {}

export interface MaterialIndicatorProps extends BaseIndicatorProps {
    /**
     * Component color
     * @default 'rgb(0, 0, 0)'
     */
    color?: string;

    /**
     * Base component size
     * @default 40
     */
    size?: number;
}

export class MaterialIndicator extends Component<MaterialIndicatorProps> {}

export interface PulseIndicatorProps extends BaseIndicatorProps {
    /**
     * Component color
     * @default 'rgb(0, 0, 0)'
     */
    color?: string;

    /**
     * Base component size
     * @default 40
     */
    size?: number;
}

export class PulseIndicator extends Component<PulseIndicatorProps> {}

export interface PacmanIndicatorProps extends BaseIndicatorProps {
    /**
     * Component color
     * @default 'rgb(0, 0, 0)'
     */
    color?: string;

    /**
     * Base component size
     * @default 48
     */
    size?: number;
}

export class PacmanIndicator extends Component<PacmanIndicatorProps> {}

export interface SkypeIndicatorProps extends BaseIndicatorProps {
    /**
     * Component color
     * @default 'rgb(0, 0, 0)'
     */
    color?: string;
    /**
     * Component count
     * @default 5
     */
    count?: number;
    /**
     * Base component size
     * @default 40
     */
    size?: number;
    /**
     * Minimum component scale
     * @default 0.2
     */
    minScale?: number;
    /**
     * Maximum component scale
     * @default 1.0
     */
    maxScale?: number;
}

export class SkypeIndicator extends Component<SkypeIndicatorProps> {}

export interface WaveIndicatorProps extends BaseIndicatorProps {
    /**
     * Component color
     * @default 'rgb(0, 0, 0)'
     */
    color?: string;
    /**
     * Component count
     * @default 4
     */
    count?: number;
    /**
     * Base component size
     * @default 40
     */
    size?: number;
    /**
     * Minimum component scale
     * @default 0.54
     */
    waveFactor?: number;
    /**
     * Maximum component scale
     * @default 'fill'
     */
    waveMode?: 'fill' | 'outline';
}

export class WaveIndicator extends Component<WaveIndicatorProps> {}


text:
(function () {
  'use strict';

  var OdoHotspots = window.OdoHotspots;

  var hotspots = new OdoHotspots(document.getElementById('basic-hotspots'));

  hotspots.on(OdoHotspots.EventType.WILL_OPEN, function (data) {
    var hotspot = data.hotspot;
    console.log(hotspot);

    // Prevent hotspot from opening.
    // data.preventDefault();
  }, false);

  // Animation switcher.
  var animations = document.getElementById('animations');
  var animationOptions = Array.from(animations.children);
  var animationBase = 'odo-hotspots--';
  animations.addEventListener('change', function (evt) {
    var element = document.getElementById('basic-hotspots');
    var value = evt.target.value;

    animationOptions.forEach(function (option) {
      element.classList.remove(animationBase + option.value);
    });

    if (value) {
      element.classList.add(animationBase + value);
    }

    hotspots.refresh();
  }, false);

  // Randomize hotspot placement.
  document.getElementById('randomize').addEventListener('click', function () {
    hotspots.dispose();

    var spots = Array.from(document.querySelectorAll('#basic-hotspots .odo-hotspot'));

    spots[spots.length - 1].classList.remove(OdoHotspots.ClassName.HOTSPOT_LEFT);
    spots[spots.length - 1].classList.remove(OdoHotspots.ClassName.HOTSPOT_BOTTOM);

    spots.forEach(function (element) {
      var x = (Math.random() * 90 + 5).toFixed(2);
      var y = (Math.random() * 86 + 7).toFixed(2);
      element.setAttribute('data-position', x + ',' + y);
    });

    hotspots = new OdoHotspots(document.getElementById('basic-hotspots'));
  });

}());

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html>

        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <title>Blog archive</title>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="description" content="a blog about iOS programming
">
        <link rel="canonical"
        href="/blog/">

        <link rel="stylesheet" type="text/css" href="/assets/css/main.css">

OakZ

This is a blog about iOS programming.

		About/

		Blog/

Blog Archive

2016

今天很残酷,明天也很残酷,后天很美好

Few more links

About

Blog

Help / FAQ

Follow me

        Twitter

                © 2016 OakZ with help from Harmony and Jekyll


text:
require 'spec_helper'

describe "PuppetPal::Pal" do

end


text:
package org.kuleuven.mai.languagemodel

import java.io.File

import breeze.linalg.DenseVector
import com.github.tototoshi.csv.CSVWriter
import org.apache.log4j.Logger
import org.apache.spark.{SparkContext, SparkConf}
import org.kuleuven.mai.glove.GloveModel
import org.kuleuven.mai.utils

import scala.util.Random

/**
 * @author @mandar2812
 */
object FlikrTestUnigram extends Serializable{
  def main(args: Array[String]): Unit = {
    val logger = Logger.getLogger(this.getClass)

    val root = args(0) match {
      case "local" => "file://"+args(1)
      case "yarn" => "hdfs://"+args(1)
    }

    val conf = new SparkConf().setAppName("Flickr8kUnigram").setMaster("local[4]")
    val sc = new SparkContext(conf)

    val writer = args(2) match {
      case "unigram" =>
        CSVWriter.open(new File("/var/Datasets/textBasedIR/flickr8k_unigram_results.csv"),
          append = true)
      case "hybrid" =>
        CSVWriter.open(new File("/var/Datasets/textBasedIR/flickr8k_unigram_hybrid_results.csv"),
          append = true)
    }

    //Load the Flikr image annotations
    //and the list of test images
    logger.info("Loading test image IDs and captions")
    val imageIds = sc.textFile(root+"Flicker8k_annotations/Flickr_8k.testImages.txt").collect()
    val annotations = sc.textFile(root+
      "Flicker8k_annotations/Flickr8k.lemma.token.txt")
      .map((line) => {
      val line_split = line.split('\t')
      val id_split = line_split(0).split('#')
      val sentence = line_split(1)
      ((id_split(0), id_split(1).toInt), sentence)
    }).filter((p) => imageIds contains p._1._1)
      .cache()
    logger.info("*************")
    logger.info("Annotations: "+annotations.count())
    logger.info("*************")
    logger.info("Calculating global Language model")
    //For Linear Interpolation Smoothing
    //we must first generate a global unigram
    //language model. For that we must
    //collate all the sentences together
    //and generate word frequencies
    val sentences = annotations.map{p => p._2}
    val unigram_freq_global = sentences.map{
      UnigramModel.getWordFreq
    }.flatMap{identity}.reduceByKey(_+_).collect

    val normalizer:Double = unigram_freq_global.map{_._2}.sum
    val unigram_prob_global = unigram_freq_global.map{w =>
      (w._1, w._2.toDouble/normalizer)}.toMap
    logger.info("*************")
    logger.info("Global Frequencies: "+ unigram_prob_global)
    logger.info("*************")

    logger.info("Global Model calculated, now proceeding to splitting data set")

    //Now separate out the training
    //sentences from the test queries
    val testIDs = imageIds.map((_, Random.nextInt(5))).toList
    logger.info("*************")
    logger.info("Test Ids count: "+ testIDs)
    logger.info("*************")
    val testset = annotations.filter(i => testIDs.contains(i._1))
      .collect()
      .toList
    logger.info("*************")
    logger.info("Test Set Sample: "+ testset.take(5))
    logger.info("*************")
    logger.info("Test Set count: "+ testset.length)
    logger.info("*************")

    logger.info("Test queries separated, now getting document models")
    val trainingSet = annotations.filter((i) => {
      !testIDs.contains(i._1)
    }).cache()
    logger.info("*************")
    logger.info("Training Set count: "+ trainingSet.count())
    logger.info("*************")
    annotations.unpersist()
    val tf = CSVWriter.open(new File("/var/Datasets/textBasedIR/flickr_temp.csv"),
      append = true)

    val fList: Map[String, List[Double] => Double] =
      Map("mean" -> {(p) => p.sum/p.length},
        "max" -> {(p) => p.max},
        "median" -> {(p) => utils.median(p)})

    val unigramModel = UnigramModel(trainingSet)

    val gloveModel = args(2) match {
      case "hybrid" =>
        val glove =
          sc.textFile(root+"vectors.6B.50d.txt",
          minPartitions = 4).map((line) => {
          val splits = line.split(' ')
          (splits(0),
            DenseVector(splits.slice(1, splits.length)
              .map((num: String) => num.toDouble))
            )
        }).cache()
        new GloveModel(glove)
      case "unigram" =>
        null
    }

    val imageEq = (a: (String, Int), b:(String, Int)) => a._1 == b._1
    val lambdavals = List(0.05, 0.2, 0.4, 0.6, 0.8, 0.95)
    fList.foreach((func) => {
      lambdavals.foreach((l) => {
        val metrics = testset.map((query) => {
          val recs = args(2) match {
            case "unigram" =>
              unigramModel.query(UnigramModel.getWordFreq(query._2),
                unigram_prob_global, LAMBDA = l)
            case "hybrid" =>
              unigramModel.queryWithGlove(UnigramModel.getWordFreq(query._2),
                gloveModel, unigram_prob_global, LAMBDA = l)
          }

          val (recall, rr) = UnigramModel
            .evaluate(imageEq)(_._1)(func._2)(recs, query._1)
          logger.info("Recall@1: "+recall+" MRR: "+rr)
          tf.writeRow(List(func._1, l, recall, rr))
          (recall, rr)
        })

        val res = metrics.reduce((a, b) => (a._1+b._1, a._2+b._2))
        logger.info("Metrics: Recall@1: " +
          res._1/metrics.length +
          " MRR: " + res._2/metrics.length)
        writer.writeRow(List(func._1, l, res._1/metrics.length, res._2/metrics.length))
      })

    })
    sc.stop()
    writer.close()
    tf.close()
  }
}


text:
#ifndef IVW_OUTPORT_H
#define IVW_OUTPORT_H

#include <inviwo/core/common/inviwo.h>
#include <inviwo/core/common/inviwocoredefine.h>
#include <inviwo/core/ports/port.h>
#include <inviwo/core/properties/invalidationlevel.h>
#include <inviwo/core/util/statecoordinator.h>
#include <inviwo/core/util/callback.h>

namespace inviwo {

class Event;
class Inport;
class Processor;

/**
 * \class Outport
 * \brief Abstract base class for all outports
 * The Outport can be connected to an arbitrary number of Inports.
 */
class IVW_CORE_API Outport : public Port {
    friend class Inport;
    friend class Processor;

public:
    virtual ~Outport();
    virtual bool isConnected() const override;

    /**
     * An outport is ready if it has data and is valid. The port is set valid after its
     * processor successfully finishes processing.
     * @see invalidate @see setValid
     */
    virtual bool isReady() const override;

    /**
     * Called by Processor::invalidate, will invalidate its connected inports.
     */
    virtual void invalidate(InvalidationLevel invalidationLevel);
    virtual InvalidationLevel getInvalidationLevel() const;

    /**
     * Propagate events upwards, i.e. to the owning processor.
     */
    virtual void propagateEvent(Event* event);

    bool isConnectedTo(const Inport* port) const;
    const std::vector<Inport*>& getConnectedInports() const;

    /**
     * Called each time connected to an inport.
     */
    const BaseCallBack* onConnect(std::function<void()> lambda);
    /**
     * Called each time disconnected from an inport.
     */
    const BaseCallBack* onDisconnect(std::function<void()> lambda);
    void removeOnConnect(const BaseCallBack* callback);
    void removeOnDisconnect(const BaseCallBack* callback);
    /**
     * Called by Processor::setValid, will call setValid its connected inports.
     */
    virtual void setValid();

protected:
    Outport(std::string identifier = "");

    // These function are only called by the corresponding inport.
    virtual void connectTo(Inport* port);
    virtual void disconnectFrom(Inport* port);

    StateCoordinator<bool> isReady_;
    InvalidationLevel invalidationLevel_;
    std::vector<Inport*> connectedInports_;

    CallBackList onConnectCallback_;
    CallBackList onDisconnectCallback_;
};

}  // namespace inviwo

#endif  // IVW_OUTPORT_H


text:
define(['onefold-dom', 'stringifyable', 'indexed-list', 'onefold-lists', 'onefold-js', 'ko-grid', 'ko-data-source', 'ko-indexed-repeat', 'knockout'],    function(onefold_dom, stringifyable, indexed_list, onefold_lists, onefold_js, ko_grid, ko_data_source, ko_indexed_repeat, knockout) {
var ko_grid_links_links, ko_grid_links;

ko_grid_links_links = function (module, ko, koGrid) {
  var extensionId = 'ko-grid-links'.indexOf('/') < 0 ? 'ko-grid-links' : 'ko-grid-links'.substring(0, 'ko-grid-links'.indexOf('/'));
  koGrid.defineExtension(extensionId, {
    Constructor: function LinksExtension(bindingValue, config, grid) {
      Object.keys(bindingValue).forEach(function (columnId) {
        var column = grid.columns.byId(columnId);
        var uriSpec = bindingValue[columnId].uri;
        var labelSpec = bindingValue[columnId].label;
        var uriSelector = typeof uriSpec === 'function' ? uriSpec : function (row) {
          return grid.data.observableValueSelector(ko.unwrap(row[uriSpec]));
        };
        var labelSelector = typeof labelSpec === 'function' ? labelSpec : function (row) {
          return grid.data.observableValueSelector(ko.unwrap(row[labelSpec || column.property]));
        };
        column.overrideValueBinding(function () {
          return {
            init: function (element) {
              var anchor = window.document.createElement('a');
              anchor.appendChild(window.document.createTextNode(''));
              element.appendChild(anchor);
            },
            update: function (element, cell, row) {
              element.firstChild.firstChild.nodeValue = labelSelector(row);
              element.firstChild.href = uriSelector(row);
            }
          };
        });
      });
    }
  });
  return koGrid.declareExtensionAlias('links', extensionId);
}({}, knockout, ko_grid);
ko_grid_links = function (main) {
  return main;
}(ko_grid_links_links);return ko_grid_links;
});


text:
<html>
<head>
	<title>Bootstrap TABS</title>
	<meta charset="utf-8">
	<link rel="stylesheet" type="text/css" href="dist/css/bootstrap.css">
	<script type="text/javascript" src="dist/js/jquery.js"></script>
<script type="text/javascript" src="dist/js/bootstrap.js"></script>
</head>
<body style="margin: 10px">
	<app></app>
</body>
<script type="text/javascript">
var app = require('../nwjs-tabs.js');

app.view_engine = 'ejs';
app.controllers = process.cwd()+"/controllers";
app.views = process.cwd()+"/views";
app.addTab({
	id: 'teste',
	title: "Teste",
	controller: 'teste'
});

app.addTab({
	id: 'testefile',
	title: "Test File",
	controller: 'testFile'
});

</script>
</html>


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * File:   EditorHighlightTab.h
 * Module:
 * Author: james
 * Email:
 * File Description:
 *
 * Created on February 7, 2016, 3:33 PM
 * Last Modified:
 */

#ifndef EDITOR_HIGHLIGHT_TAB_H
#define EDITOR_HIGHLIGHT_TAB_H

#include "OptionTabInterface.h"

class EditorHighlightTab : public OptionTabInterface
{

public:
    explicit EditorHighlightTab(OptionTabInterface* parent = 0);
    void setup();
    void setTabTitleStrPtr(QString* tabTitleStrPtr);
    QString* getTabTitleStrPtr();
    virtual ~EditorHighlightTab();

private:
    ;
};

#endif /* EDITOR_HIGHLIGHT_TAB_H */


text:
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading.Tasks;
using Amazon.S3;
using Amazon.S3.Model;
using Microsoft.AspNet.Mvc;

namespace DbSpeed.Controllers
{
    [Route("[controller]")]
    public class S3Controller : Controller
    {
        private const string TestBucketName = "speedtest";
        private readonly IAmazonS3 _client;

        public S3Controller(IAmazonS3 client)
        {
            _client = client;
        }

        [HttpGet]
        public async Task<IEnumerable<string>> Get()
        {
            var result = new List<string>();
            var watch = new Stopwatch();

            for (int i = 1; i < 11; i++)
            {
                watch.Restart();
                var request = new GetObjectRequest
                {
                    BucketName = TestBucketName,
                    Key = "test1.txt"
                };
                var response = await _client.GetObjectAsync(request);
                using (var stream = response.ResponseStream)
                {
                    stream.ReadByte();
                }
                watch.Stop();
                result.Add($"S3 {i} try: {watch.ElapsedMilliseconds}");
            }
            return result;
        }

        [HttpPost]
        public async Task<IEnumerable<string>> Post()
        {
            var result = new List<string>();
            var watch = new Stopwatch();
            var bucketRequest = new PutBucketRequest
            {
                BucketName = TestBucketName,
                BucketRegion = S3Region.EUC1
            };
            await _client.PutBucketAsync(bucketRequest);

            for (int i = 1; i < 11; i++)
            {
                watch.Restart();
                var request = new PutObjectRequest
                {
                    BucketName = TestBucketName,
                    Key = $"test{i}.txt",
                    ContentBody = "Testcontent" + i
                };
                await _client.PutObjectAsync(request);
                watch.Stop();
                result.Add($"S3 {i} try: {watch.ElapsedMilliseconds}");
            }
            return result;
        }

        [HttpDelete]
        public async Task<IActionResult> Delete()
        {
            var bucketRequest = new DeleteBucketRequest
            {
                BucketName = TestBucketName,
                BucketRegion = S3Region.EUC1
            };
            var request = new DeleteObjectsRequest
            {
                BucketName = TestBucketName,
                Objects = new List<KeyVersion>
                {
                    new KeyVersion { Key = "test1.txt" },
                    new KeyVersion { Key = "test2.txt" },
                    new KeyVersion { Key = "test3.txt" },
                    new KeyVersion { Key = "test4.txt" },
                    new KeyVersion { Key = "test5.txt" },
                    new KeyVersion { Key = "test6.txt" },
                    new KeyVersion { Key = "test7.txt" },
                    new KeyVersion { Key = "test8.txt" },
                    new KeyVersion { Key = "test9.txt" },
                    new KeyVersion { Key = "test10.txt" }
                }
            };
            await _client.DeleteObjectsAsync(request);
            await _client.DeleteBucketAsync(bucketRequest);
            return Ok();
        }
    }
}


text:
using AutoMapper;
using System;
using System.Linq;
using System.Web.Http;
using TotaMoviesRental.Core;
using TotaMoviesRental.Core.Dtos;
using TotaMoviesRental.Core.Models;

namespace TotaMoviesRental.Controllers.Api
{
    public class MoviesController : ApiController
    {
        private readonly IUnitOfWork _unitOfWork;

        public MoviesController(IUnitOfWork unitOfWork)
        {
            _unitOfWork = unitOfWork;
        }

        // GET /api/movies
        public IHttpActionResult GetMovies(string query = null)
        {
            var movieDtos = _unitOfWork.Movies
                .GetMoviesWithGenres(query)
                .Select(Mapper.Map<Movie, MovieDto>);

            return Ok(movieDtos);
        }

        // GET /api/movies/1
        public IHttpActionResult GetMovie(int id)
        {
            var movie = _unitOfWork.Movies.SingleOrDefault(c => c.Id == id);

            if (movie == null)
                return NotFound();

            return Ok(Mapper.Map<Movie, MovieDto>(movie));
        }

        // POST /api/movies
        [HttpPost]
        public IHttpActionResult CreateMovie(MovieDto movieDto)
        {
            if (!ModelState.IsValid)
                return BadRequest();

            var movie = Mapper.Map<MovieDto, Movie>(movieDto);
            movie.DateAdded = DateTime.Now;
            movie.NumberAvailable = movie.NumberInStock; // TODO: Remove this once you fix it in DbMigrtation.
            _unitOfWork.Movies.Add(movie);
            _unitOfWork.Complete();

            movieDto.Id = movie.Id;
            return Created(new Uri(Request.RequestUri + "/" + movie.Id), movieDto);
        }

        // PUT /api/movies/1
        [HttpPut]
        public IHttpActionResult UpdateMovie(int id, MovieDto movieDto)
        {
            if (!ModelState.IsValid)
                return BadRequest();
            var movieInDb = _unitOfWork.Movies.SingleOrDefault(c => c.Id == id);
            if (movieInDb == null)
                return NotFound();

            Mapper.Map(movieDto, movieInDb);

            _unitOfWork.Complete();
            return Ok();
        }

        // DELETE /api/cusomer/1
        [HttpDelete]
        public IHttpActionResult DeleteMovie(int id)
        {
            var movie = _unitOfWork.Movies.SingleOrDefault(c => c.Id == id);
            if (movie == null)
                return NotFound();
            _unitOfWork.Movies.Remove(movie);
            _unitOfWork.Complete();
            return Ok();
        }

        protected override void Dispose(bool disposing)
        {
            _unitOfWork.Dispose();
        }
    }
}


text:
#import <Foundation/Foundation.h>

#ifndef AlibcNetMock_h
#define AlibcNetMock_h

@interface AlibcNetMock : NSObject
+ (instancetype)sharedInstance;

- (NSString *)getMtopMockData:(NSString *)cmd;

@end

#endif


text:
namespace Fixtures.AcceptanceTestsAzureCompositeModelClient.Models
{
    using Fixtures.AcceptanceTestsAzureCompositeModelClient;
    using Newtonsoft.Json;
    using System.Collections;
    using System.Collections.Generic;
    using System.Linq;

    [Newtonsoft.Json.JsonObject("Fish")]
    public partial class FishInner
    {
        /// <summary>
        /// Initializes a new instance of the FishInner class.
        /// </summary>
        public FishInner() { }

        /// <summary>
        /// Initializes a new instance of the FishInner class.
        /// </summary>
        public FishInner(double length, string species = default(string), IList<FishInner> siblings = default(IList<FishInner>))
        {
            Species = species;
            Length = length;
            Siblings = siblings;
        }

        /// <summary>
        /// </summary>
        [JsonProperty(PropertyName = "species")]
        public string Species { get; set; }

        /// <summary>
        /// </summary>
        [JsonProperty(PropertyName = "length")]
        public double Length { get; set; }

        /// <summary>
        /// </summary>
        [JsonProperty(PropertyName = "siblings")]
        public IList<FishInner> Siblings { get; set; }

        /// <summary>
        /// Validate the object.
        /// </summary>
        /// <exception cref="Microsoft.Rest.ValidationException">
        /// Thrown if validation fails
        /// </exception>
        public virtual void Validate()
        {
            if (Siblings != null)
            {
                foreach (var element in Siblings)
                {
                    if (element != null)
                    {
                        element.Validate();
                    }
                }
            }
        }
    }
}


text:
/*
 * BS 5.1 + Tabler
 *
 */
/* Specific script for back office */
function themeMode(mode){
	var switchMode=$('#switch-darkmode');
	if( mode != 'dark'){
		switchMode.children('span').text('sombre');
		if( $('body').hasClass('theme-dark') ) $('body').removeClass('theme-dark');
	} else{
		switchMode.children('span').text('clair');
		$('body').addClass('theme-dark');
		switchMode.children('.ti').removeClass('ti-moon').addClass('ti-sun');
	}
}

$( function(){
	var nCounter = "";
	var luteceTheme=localStorage.getItem('theme-bo-lutece');
	// Set Mode
	themeMode( luteceTheme );
	$('.box-widget .counter').each( function () {
		nCounter = $(this).text();
		var sVal = "";
		var thisTXT = $(this).text().split("/");
		if ( thisTXT.length > 1 ){
			nCounter = thisTXT[0];
			sVal = " / " + thisTXT[1];
		}
		if ( $.isNumeric( nCounter ) ) {
			$(this).prop('Counter',0).animate({
				Counter: nCounter
			}, {
				duration: 1000,
				easing: 'swing',
				step: function (now) {
					$(this).text( Math.ceil(now) + sVal );
				}
			});
		}
	});

	// Disable Double Click on submit Buttons -> * NOT WORKING WITH IE *
	// let numForms = document.forms.length;
	// if( numForms > 0 ){
	// 	let aForms = Array.from(document.forms);
	// 	aForms.forEach( function(form){
	// 		form.addEventListener( 'submit', function(e) {
	// 			e.submitter.setAttribute('disabled', 'disabled');
	// 		}, false);
	// 	});
	// }

	// Sortable Widgets
	const dashSortables = [].slice.call(document.querySelectorAll('.dashboard-widgets .widget-col'));

	// Loop through each nested sortable element
	for ( var i = 0; i < dashSortables.length; i++) {
		var sortableDash = new Sortable( dashSortables[i], {
			group: 'widget-dashboard',
			swapThreshold: 0.65,
			draggable: '.box-widget',
			store: {
				get: function (sortable) {
					var order = localStorage.getItem(sortable.options.group.name);
					return order ? order.split('|') : [];
				},
				set: function (sortable) {
					var order = sortable.toArray();
					localStorage.setItem(sortable.options.group.name, order.join('|'));
				}
			}
		});
	}

	$(".widget-col > .card > .card-header, .widget-col > .card .avatar, .widget-col > .card .info-box-icon").css("cursor", "move");

	$('#switch-darkmode').on('click', function(){
		var boTheme=localStorage.getItem('theme-bo-lutece');
		if( boTheme === 'dark'){
			localStorage.setItem('theme-bo-lutece','default');
			themeMode('default');
		} else{
			localStorage.setItem('theme-bo-lutece','dark');
			themeMode('dark');
		}
	})

	// Page Header button Management
	if( $('.skip-header').length > 0 ){
		var title=$('.skip-header .card-title').html();
		$('.page-title').html(title);
		$('.skip-header .card-title').remove();
		var headerContent = $('.skip-header').html();
		$('.skip-header').remove();
		$('#page-header-buttons').prepend(headerContent);
	}

	// File Input Style
	$(":file").not(".noBootstrapFilestyle")
		.addClass("filestyle")
		.filestyle({buttonText: " Parcourir"});

	// Admin responsive preview
	function _fix() {
		var h = $(window).height();
        var w = $(window).width();
        $("#preview").css({
			width: (w - 30) + "px",
            height: (h - 50) + "px"
		});
	}
	_fix();
	$(window).resize(function() {
		_fix();
	});

	function iframe_width(width) {
		$("#preview").animate({width: width}, 500);
	}

	$("#display-full").click(function(e){
		e.preventDefault();
		iframe_width("100%");
	});

	$("#display-940").click(function(e){
		e.preventDefault();
		iframe_width("940px");
	});

	$("#display-480").click(function(e){
		e.preventDefault();
		iframe_width("480px");
	});

	// Admin Preview fullscreen
	if ( $("#fullscreen").length > 0 ){
		$("#fullscreen").on('click', function(e) {
			// Stop the link default behaviour.
			e.preventDefault();
			// Set preview fulscreen
			$('#preview').toggleClass('open');
			$(this).toggleClass('open');
		});
	}

	// Filter function
	var nb=0;
    $("#search_elements").on("keyup", function () {
        var search = $("#search_elements").val();
		if ( $("select#items_per_page").length > 0 ){
			var s1 = parseInt($("select#items_per_page:first option:selected").val());
			var s2 = parseInt($("select#items_per_page:first").attr("data-max-item"));

			if( s1 < s2 && nb ==0 ) {
				nb++;
				$(this).parent().after('Attention : Vous n\'avez pas sélectionner l\'ensemble des lignes  !! <button id="showall" class="btn btn-primary btn-xs">Tous afficher</button>')
				$("button#showall").click( function(){
					$("select#items_per_page:first").prop("")
				});
			 }
		}
        $(".element-box").each(function (index) {
            var elementName = $(this).attr("data-element").toLowerCase();
            if (elementName.match(search) == null) {
                $(this).parent().slideUp(200).fadeOut(500);
            } else {
                $(this).parent().slideDown(200).fadeIn(500);
            }
        });
    });

	$(".wrapper").show();

	// Translate data-toggle attr to data-bs-toggle
	$('[data-toggle="modal"]').each( function() {
		$(this).attr( 'data-bs-toggle', 'modal' );
		$(this).attr( 'data-bs-target', $(this).attr('data-target') );
	});

	// Translate data-toggle attr to data-bs-dropdown
	$('[data-toggle="dropdown"]').each( function() {
		$(this).attr( 'data-bs-toggle', 'dropdown' );
		$(this).attr( 'data-bs-target', $(this).attr('data-target') );
	});

	// Toggle collapse buttons
	$('[data-toggle="collapse"]').each( function() {
		$(this).attr( 'data-bs-toggle', 'collapse' );
		$(this).attr( 'data-bs-target', $(this).attr('data-target') );
	});

	$('[data-toggle="collapse"]').click(function() {
		if ($(this).find("i").hasClass("fa-minus")){
			$(this).find("i").addClass("fa-plus").removeClass("fa-minus");
		}
		else if ($(this).find("i").hasClass("fa-plus")){
			$(this).find("i").addClass("fa-minus").removeClass("fa-plus");
		}
	});

	var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'))
		var popoverList = popoverTriggerList.map(function (popoverTriggerEl) {
		return new bootstrap.Popover(popoverTriggerEl, {container: 'body', sanitize : false, placement: 'left'})
	})

});

/* Pretty print file size */
function prettySize( bytes, separator=' ', postFix=''){
if (bytes) {
	const sizes = ['Octets', 'Ko', 'Mo', 'Go', 'To'];
	const i = Math.min(parseInt(Math.floor(Math.log(bytes) / Math.log(1024)).toString(), 10), sizes.length - 1);
	return `${(bytes / (1024 ** i)).toFixed(i ? 1 : 0)}${separator}${sizes[i]}${postFix}`;
}
return 'n/a';
}

/* Manage progress bar  */
function progress( bar, complexity, valid ){
	bar.toggleClass('progress-bar-success', valid);
	bar.toggleClass('progress-bar-danger', !valid);
	bar.css({'width': complexity + '%'});
	bar.html( Math.round( complexity ) + '%');
}

/* Tab management for advanced user parameters */
function manageAdminFeatureTab( hc ){
	if( hc != undefined ){
		$(hc).parents('.collapse').addClass('show');
		$('.nav li').removeClass('active');
		var k='a[href="' + hc + '"]';
		$(k).parent().addClass('active');
		$('.tab-pane').removeClass('active').removeClass('in');
		$(hc).addClass('active show');
		$('html, body').animate({scrollTop: $(hc).offset().top}, 800);
	}

	$('[data-bs-toggle="tab"]').on('shown.bs.tab', function(e) {
		Cookies.set('technnicaltab', e.target.hash, { sameSite: 'Strict' } )
	});

	$('[data-bs-toggle="collapse"]').on('click', function(e){
		Cookies.remove('technnicaltab');
	});
}


text:
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by CSGenerator.
// </auto-generated>
//------------------------------------------------------------------------------
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;

using jsval = JSApi.jsval;

public class JSB_UnityEngine_SystemInfo
{

////////////////////// SystemInfo ///////////////////////////////////////
// constructors

static bool SystemInfo_SystemInfo1(JSVCall vc, int argc)
{
    int _this = JSApi.getObject((int)JSApi.GetType.Arg);
    JSApi.attachFinalizerObject(_this);
    --argc;

    int len = argc;
    if (len == 0)
    {
        JSMgr.addJSCSRel(_this, new UnityEngine.SystemInfo());
    }

    return true;
}

// fields

// properties
static void SystemInfo_operatingSystem(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.operatingSystem;
                JSApi.setStringS((int)JSApi.SetType.Rval, result);
}
static void SystemInfo_processorType(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.processorType;
                JSApi.setStringS((int)JSApi.SetType.Rval, result);
}
static void SystemInfo_processorCount(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.processorCount;
                JSApi.setInt32((int)JSApi.SetType.Rval, (System.Int32)(result));
}
static void SystemInfo_systemMemorySize(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.systemMemorySize;
                JSApi.setInt32((int)JSApi.SetType.Rval, (System.Int32)(result));
}
static void SystemInfo_graphicsMemorySize(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.graphicsMemorySize;
                JSApi.setInt32((int)JSApi.SetType.Rval, (System.Int32)(result));
}
static void SystemInfo_graphicsDeviceName(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.graphicsDeviceName;
                JSApi.setStringS((int)JSApi.SetType.Rval, result);
}
static void SystemInfo_graphicsDeviceVendor(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.graphicsDeviceVendor;
                JSApi.setStringS((int)JSApi.SetType.Rval, result);
}
static void SystemInfo_graphicsDeviceID(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.graphicsDeviceID;
                JSApi.setInt32((int)JSApi.SetType.Rval, (System.Int32)(result));
}
static void SystemInfo_graphicsDeviceVendorID(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.graphicsDeviceVendorID;
                JSApi.setInt32((int)JSApi.SetType.Rval, (System.Int32)(result));
}
static void SystemInfo_graphicsDeviceVersion(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.graphicsDeviceVersion;
                JSApi.setStringS((int)JSApi.SetType.Rval, result);
}
static void SystemInfo_graphicsShaderLevel(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.graphicsShaderLevel;
                JSApi.setInt32((int)JSApi.SetType.Rval, (System.Int32)(result));
}
static void SystemInfo_graphicsPixelFillrate(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.graphicsPixelFillrate;
                JSApi.setInt32((int)JSApi.SetType.Rval, (System.Int32)(result));
}
static void SystemInfo_supportsShadows(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.supportsShadows;
                JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(result));
}
static void SystemInfo_supportsRenderTextures(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.supportsRenderTextures;
                JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(result));
}
static void SystemInfo_supportsRenderToCubemap(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.supportsRenderToCubemap;
                JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(result));
}
static void SystemInfo_supportsImageEffects(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.supportsImageEffects;
                JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(result));
}
static void SystemInfo_supports3DTextures(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.supports3DTextures;
                JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(result));
}
static void SystemInfo_supportsComputeShaders(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.supportsComputeShaders;
                JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(result));
}
static void SystemInfo_supportsInstancing(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.supportsInstancing;
                JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(result));
}
static void SystemInfo_supportsSparseTextures(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.supportsSparseTextures;
                JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(result));
}
static void SystemInfo_supportedRenderTargetCount(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.supportedRenderTargetCount;
                JSApi.setInt32((int)JSApi.SetType.Rval, (System.Int32)(result));
}
static void SystemInfo_supportsStencil(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.supportsStencil;
                JSApi.setInt32((int)JSApi.SetType.Rval, (System.Int32)(result));
}
static void SystemInfo_supportsVertexPrograms(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.supportsVertexPrograms;
                JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(result));
}
static void SystemInfo_npotSupport(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.npotSupport;
                JSApi.setEnum((int)JSApi.SetType.Rval, (int)result);
}
static void SystemInfo_deviceUniqueIdentifier(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.deviceUniqueIdentifier;
                JSApi.setStringS((int)JSApi.SetType.Rval, result);
}
static void SystemInfo_deviceName(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.deviceName;
                JSApi.setStringS((int)JSApi.SetType.Rval, result);
}
static void SystemInfo_deviceModel(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.deviceModel;
                JSApi.setStringS((int)JSApi.SetType.Rval, result);
}
static void SystemInfo_supportsAccelerometer(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.supportsAccelerometer;
                JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(result));
}
static void SystemInfo_supportsGyroscope(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.supportsGyroscope;
                JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(result));
}
static void SystemInfo_supportsLocationService(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.supportsLocationService;
                JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(result));
}
static void SystemInfo_supportsVibration(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.supportsVibration;
                JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(result));
}
static void SystemInfo_deviceType(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.deviceType;
                JSApi.setEnum((int)JSApi.SetType.Rval, (int)result);
}
static void SystemInfo_maxTextureSize(JSVCall vc)
{
        var result = UnityEngine.SystemInfo.maxTextureSize;
                JSApi.setInt32((int)JSApi.SetType.Rval, (System.Int32)(result));
}

// methods

static bool SystemInfo_SupportsRenderTextureFormat__RenderTextureFormat(JSVCall vc, int argc)
{
    int len = argc;
    if (len == 1)
    {
        UnityEngine.RenderTextureFormat arg0 = (UnityEngine.RenderTextureFormat)JSApi.getEnum((int)JSApi.GetType.Arg);
                JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(UnityEngine.SystemInfo.SupportsRenderTextureFormat(arg0)));
    }

    return true;
}

//register

public static void __Register()
{
    JSMgr.CallbackInfo ci = new JSMgr.CallbackInfo();
    ci.type = typeof(UnityEngine.SystemInfo);
    ci.fields = new JSMgr.CSCallbackField[]
    {

    };
    ci.properties = new JSMgr.CSCallbackProperty[]
    {
        SystemInfo_operatingSystem,
        SystemInfo_processorType,
        SystemInfo_processorCount,
        SystemInfo_systemMemorySize,
        SystemInfo_graphicsMemorySize,
        SystemInfo_graphicsDeviceName,
        SystemInfo_graphicsDeviceVendor,
        SystemInfo_graphicsDeviceID,
        SystemInfo_graphicsDeviceVendorID,
        SystemInfo_graphicsDeviceVersion,
        SystemInfo_graphicsShaderLevel,
        SystemInfo_graphicsPixelFillrate,
        SystemInfo_supportsShadows,
        SystemInfo_supportsRenderTextures,
        SystemInfo_supportsRenderToCubemap,
        SystemInfo_supportsImageEffects,
        SystemInfo_supports3DTextures,
        SystemInfo_supportsComputeShaders,
        SystemInfo_supportsInstancing,
        SystemInfo_supportsSparseTextures,
        SystemInfo_supportedRenderTargetCount,
        SystemInfo_supportsStencil,
        SystemInfo_supportsVertexPrograms,
        SystemInfo_npotSupport,
        SystemInfo_deviceUniqueIdentifier,
        SystemInfo_deviceName,
        SystemInfo_deviceModel,
        SystemInfo_supportsAccelerometer,
        SystemInfo_supportsGyroscope,
        SystemInfo_supportsLocationService,
        SystemInfo_supportsVibration,
        SystemInfo_deviceType,
        SystemInfo_maxTextureSize,

    };
    ci.constructors = new JSMgr.MethodCallBackInfo[]
    {
        new JSMgr.MethodCallBackInfo(SystemInfo_SystemInfo1, ".ctor"),

    };
    ci.methods = new JSMgr.MethodCallBackInfo[]
    {
        new JSMgr.MethodCallBackInfo(SystemInfo_SupportsRenderTextureFormat__RenderTextureFormat, "SupportsRenderTextureFormat"),

    };
    JSMgr.allCallbackInfo.Add(ci);
}

}


text:
'use strict';
var execSync = require('child_process').execSync;
var conventionalRecommendedBump = require('../');
var equal = require('core-assert').deepStrictEqual;
var shell = require('shelljs');
var writeFileSync = require('fs').writeFileSync;
var betterThanBefore = require('better-than-before')();
var preparing = betterThanBefore.preparing;

betterThanBefore.setups([
  function() { // 1
    shell.mkdir('angular');
    shell.cd('angular');
    shell.exec('git init');
    writeFileSync('test1', '');
    shell.exec('git add --all && git commit -m "chore: first commit"');
    writeFileSync('test2', '');
    shell.exec('git add --all && git commit -m "feat($compile): new feature"');
    writeFileSync('test3', '');
    shell.exec('git add --all && git commit -m "perf(ngOptions): make it faster"');
  },
  function() { // 2
    writeFileSync('test4', '');
    execSync('git add --all && git commit -m "feat(): amazing new module" -m "BREAKING CHANGE: Not backward compatible."');
  },
  function() { // 3
    writeFileSync('test5', '');
    execSync('git add --all && git commit -m "feat(): another amazing new module" -m "Super backward compatible."');
  },
  function() { // 4
    writeFileSync('test6', '');
    var hash = execSync('git rev-parse HEAD~1').toString();
    execSync('git add --all && git commit -m "revert: feat(): amazing new module" -m "This reverts commit ' + hash.trim() + '."');
  },
  function() { // 5
    writeFileSync('test7', '');
    execSync('git add --all && git commit -m "feat(noteKeywords): make BREAKING CHANGE more forgiving\n\nPeople might type BREAKING CHANGES unintentionally. EG: https://github.com/angular/angular/commit/098b461"');
  }
]);

betterThanBefore.tearsWithJoy(function() {
  shell.cd('../');
  shell.rm('-rf', 'angular');
});

describe('preset', function() {
  describe('angular', function() {
    var opts = {
      preset: 'angular'
    };

    it('should release as minor', function(done) {
      preparing(1);

      conventionalRecommendedBump(opts, function(err, releaseType) {
        equal(releaseType, {
          level: 1,
          reason: 'There are 0 BREAKING CHANGES and 1 features',
          releaseType: 'minor'
        });

        done();
      });
    });

    it('should merge parserOpts', function(done) {
      preparing(1);

      conventionalRecommendedBump(opts, {
        headerPattern: /^(\w*)\: (.*)$/,
      }, function(err, releaseType) {
        equal(releaseType, {
          level: 2,
          reason: 'There are 0 BREAKING CHANGES and 0 features',
          releaseType: 'patch'
        });

        done();
      });
    });

    it('should release as major', function(done) {
      preparing(2);

      conventionalRecommendedBump(opts, function(err, releaseType) {
        equal(releaseType, {
          level: 0,
          reason: 'There are 1 BREAKING CHANGES and 1 features',
          releaseType: 'major'
        });

        done();
      });
    });

    it('should release as major even after a feature', function(done) {
      preparing(3);

      conventionalRecommendedBump(opts, function(err, releaseType) {
        equal(releaseType, {
          level: 0,
          reason: 'There are 1 BREAKING CHANGES and 2 features',
          releaseType: 'major'
        });

        done();
      });
    });

    it('should ignore a reverted commit', function(done) {
      preparing(4);

      conventionalRecommendedBump(opts, function(err, releaseType) {
        equal(releaseType, {
          level: 1,
          reason: 'There are 0 BREAKING CHANGES and 2 features',
          releaseType: 'minor'
        });

        done();
      });
    });

    it('should not ignore a reverted commit', function(done) {
      preparing(4);

      conventionalRecommendedBump({
        preset: 'angular',
        ignoreReverted: false
      }, function(err, releaseType) {
        equal(releaseType, {
          level: 0,
          reason: 'There are 1 BREAKING CHANGES and 2 features',
          releaseType: 'major'
        });

        done();
      });
    });

    it('should not be major', function(done) {
      preparing(5);

      conventionalRecommendedBump(opts, function(err, releaseType) {
        equal(releaseType, {
          level: 1,
          reason: 'There are 0 BREAKING CHANGES and 3 features',
          releaseType: 'minor'
        });

        done();
      });
    });
  });
});


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Namespace ZptSharp.Expressions.NotExpressions
   </title>
    <meta name="viewport" content="width=device-width">
    <meta name="title" content="Namespace ZptSharp.Expressions.NotExpressions
   ">
    <meta name="generator" content="docfx 2.56.6.0">

    <link rel="shortcut icon" href="../favicon.ico">
    <link rel="stylesheet" href="../styles/docfx.vendor.css">
    <link rel="stylesheet" href="../styles/docfx.css">
    <link rel="stylesheet" href="../styles/main.css">
    <meta property="docfx:navrel" content="../toc.html">
    <meta property="docfx:tocrel" content="toc.html">

              <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
                Toggle navigation

              </button>

              <form class="navbar-form navbar-right" role="search" id="search">

                  <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">

              </form>

          Show / Hide Table of Contents

Namespace ZptSharp.Expressions.NotExpressions

Classes

BooleanValueConverter

Implementation of ICoercesValueToBoolean which converts a value
to a boolean.

NotExpressionEvaluator

An implementation of IEvaluatesExpression which evaluates TALES 'nots' expressions.

Interfaces

ICoercesValueToBoolean

An object which converts a specified value to a boolean.  Specifically, this
uses rules unique to a TALES 'not' expression, and not the rules shared by
CoerceResultToBoolean(Object).s

In This Article

              Back to top

            Generated by DocFX


text:
package org.compass.core.test.querybuilder.polyaliasquerystring;

import org.compass.annotations.Searchable;

/**
 * @author kimchy
 */
@Searchable
public class B extends A {

}


text:
//using System;
//using System.Collections.Generic;
//using System.Text;

//namespace Evol.Domain.Uow
//{
//    public interface IOptionUnitOfWork
//    {
//        UnitOfWorkOption Option { get; }
//    }
//}


text:
<fieldset class="step">

Personal Details

Your personal details are safe with us

        First name:
        <input class="form-control" type="text" id="wiz-fname" placeholder="First name" />

        Last name:
        <input class="form-control" type="tel" id="wiz-lname" placeholder="Last name" />

        Phone:
        <input class="form-control" type="text" id="wiz-phone" placeholder="Phone" />

        Address:
        <textarea rows="5" class="form-control" id="wiz-address" placeholder="Your address"></textarea>

            <button type="button" class="wiz-prev btn btn-default">Previous</button>

            <button type="button" class="wiz-step btn btn-primary" data-target="0">Submit</button>

</fieldset>


text:
package org.apache.solr.search.grouping.distributed.requestfactory;

import org.apache.lucene.analysis.reverse.ReverseStringFilter;
import org.apache.lucene.search.grouping.SearchGroup;
import org.apache.lucene.util.BytesRef;
import org.apache.solr.common.params.CommonParams;
import org.apache.solr.common.params.GroupParams;
import org.apache.solr.common.params.ModifiableSolrParams;
import org.apache.solr.common.params.ShardParams;
import org.apache.solr.handler.component.ResponseBuilder;
import org.apache.solr.handler.component.ShardRequest;
import org.apache.solr.schema.FieldType;
import org.apache.solr.search.Grouping;
import org.apache.solr.search.SolrIndexSearcher;
import org.apache.solr.search.grouping.distributed.ShardRequestFactory;

import java.util.Collection;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

/**
 * Concrete implementation of {@link ShardRequestFactory} that creates {@link ShardRequest} instances for getting the
 * top groups from all shards.
 */
public class TopGroupsShardRequestFactory implements ShardRequestFactory {

  /**
   * Represents a string value for
   */
  public static final String GROUP_NULL_VALUE = "" + ReverseStringFilter.START_OF_HEADING_MARKER;

  /**
   * {@inheritDoc}
   */
  public ShardRequest[] constructRequest(ResponseBuilder rb) {
    // If we have a group.query we need to query all shards... Or we move this to the group first phase queries
    boolean containsGroupByQuery = rb.getGroupingSpec().getQueries().length > 0;
    // TODO: If groups.truncate=true we only have to query the specific shards even faceting and statistics are enabled
    if ((rb.getQueryCommand().getFlags() & SolrIndexSearcher.GET_DOCSET) != 0 || containsGroupByQuery) {
      // In case we need more results such as faceting and statistics we have to query all shards
      return createRequestForAllShards(rb);
    } else {
      // In case we only need top groups we only have to query the shards that contain these groups.
      return createRequestForSpecificShards(rb);
    }
  }

  private ShardRequest[] createRequestForSpecificShards(ResponseBuilder rb) {
    // Determine all unique shards to query for TopGroups
    Set<String> uniqueShards = new HashSet<String>();
    for (String command : rb.searchGroupToShards.keySet()) {
      Map<SearchGroup<BytesRef>, Set<String>> groupsToShard = rb.searchGroupToShards.get(command);
      for (Set<String> shards : groupsToShard.values()) {
        uniqueShards.addAll(shards);
      }
    }

    return createRequest(rb, uniqueShards.toArray(new String[uniqueShards.size()]));
  }

  private ShardRequest[] createRequestForAllShards(ResponseBuilder rb) {
    return createRequest(rb, ShardRequest.ALL_SHARDS);
  }

  private ShardRequest[] createRequest(ResponseBuilder rb, String[] shards)
  {
    ShardRequest sreq = new ShardRequest();
    sreq.shards = shards;
    sreq.purpose = ShardRequest.PURPOSE_GET_TOP_IDS;
    sreq.params = new ModifiableSolrParams(rb.req.getParams());

    // If group.format=simple group.offset doesn't make sense
    Grouping.Format responseFormat = rb.getGroupingSpec().getResponseFormat();
    if (responseFormat == Grouping.Format.simple || rb.getGroupingSpec().isMain()) {
      sreq.params.remove(GroupParams.GROUP_OFFSET);
    }

    sreq.params.remove(ShardParams.SHARDS);

    // set the start (offset) to 0 for each shard request so we can properly merge
    // results from the start.
    if (rb.shards_start > -1) {
      // if the client set shards.start set this explicitly
      sreq.params.set(CommonParams.START, rb.shards_start);
    } else {
      sreq.params.set(CommonParams.START, "0");
    }
    if (rb.shards_rows > -1) {
      // if the client set shards.rows set this explicity
      sreq.params.set(CommonParams.ROWS, rb.shards_rows);
    } else {
      sreq.params.set(CommonParams.ROWS, rb.getSortSpec().getOffset() + rb.getSortSpec().getCount());
    }

    sreq.params.set(GroupParams.GROUP_DISTRIBUTED_SECOND, "true");
    for (Map.Entry<String, Collection<SearchGroup<BytesRef>>> entry : rb.mergedSearchGroups.entrySet()) {
      for (SearchGroup<BytesRef> searchGroup : entry.getValue()) {
        String groupValue;
        if (searchGroup.groupValue != null) {
          String rawGroupValue = searchGroup.groupValue.utf8ToString();
          FieldType fieldType = rb.req.getSearcher().getSchema().getField(entry.getKey()).getType();
          groupValue = fieldType.indexedToReadable(rawGroupValue);
        } else {
          groupValue = GROUP_NULL_VALUE;
        }
        sreq.params.add(GroupParams.GROUP_DISTRIBUTED_TOPGROUPS_PREFIX + entry.getKey(), groupValue);
      }
    }

    if ((rb.getFieldFlags() & SolrIndexSearcher.GET_SCORES) != 0 || rb.getSortSpec().includesScore()) {
      sreq.params.set(CommonParams.FL, rb.req.getSchema().getUniqueKeyField().getName() + ",score");
    } else {
      sreq.params.set(CommonParams.FL, rb.req.getSchema().getUniqueKeyField().getName());
    }

    int origTimeAllowed = sreq.params.getInt(CommonParams.TIME_ALLOWED, -1);
    if (origTimeAllowed > 0) {
      sreq.params.set(CommonParams.TIME_ALLOWED, Math.max(1,origTimeAllowed - rb.firstPhaseElapsedTime));
    }

    return new ShardRequest[] {sreq};
  }

}


text:
class Arborist::Migration::ModelArguments
  attr_reader :model_ref, :method_name

  def initialize(args)
    options = args.extract_options!

    @model_ref   = args.first || model_from_options(options)
    @method_name = options.fetch :as, config.default_method_name
  end

  private

  RESERVED_OPTIONS = %i(as).freeze

  def model_from_options(options)
    options
      .select { |k, _| !RESERVED_OPTIONS.include? k }
      .values
      .first
  end

  def config
    Arborist.config.migration
  end
end


text:
<?php

use webvimark\modules\UserManagement\models\User;
use webvimark\extensions\BootstrapSwitch\BootstrapSwitch;
use webvimark\modules\UserManagement\UserManagementModule;
use yii\bootstrap\ActiveForm;
use yii\helpers\Html;

/**
 * @var yii\web\View $this
 * @var webvimark\modules\UserManagement\models\User $model
 */

$this->title = Yii::t('app', 'Editando Usuario:') . ' ' . $model->username;
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Usuarios'), 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->username, 'url' => ['view', 'id' => $model->id]];
$this->params['breadcrumbs'][] = Yii::t('app', 'Editando');
?>

<?= $this->title ?>

			<?= $this->render('_form', compact('model')) ?>


text:
layout: post
title:  The Jasper
author: Campfire & Co.
photographer: Joey Wharton Photography
role: Project Designer
category: Branding
img: ./assets/jasper/jasper-cocktail-ice.jpg
---


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

<title>DefaultValidationRule (doov-core 2.1.0 API)</title>
<meta name="date" content="2018-08-07">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

io.doov.core.dsl.impl

Class DefaultValidationRule

java.lang.Object

io.doov.core.dsl.impl.DefaultValidationRule

All Implemented Interfaces:

Readable, ValidationRule, SyntaxTree

public class DefaultValidationRule
extends java.lang.Object
implements ValidationRule

Constructor Summary

Constructors

Constructor and Description

DefaultValidationRule(StepWhen stepWhen)

DefaultValidationRule(StepWhen stepWhen,
                     boolean shortCircuit)

Method Summary

All Methods Instance Methods Concrete Methods

Modifier and Type
Method and Description

void
accept(MetadataVisitor visitor,
      int depth)

Result
executeOn(DslModel model)

Executes the validation rule on the given model.

Metadata
getRootMetadata()

Returns the root node metadata of this validation rule.

protected StepWhen
getStepWhen()

protected boolean
isShortCircuit()

java.lang.String
readable(java.util.Locale locale)

Returns the human readable version of this object.

ValidationRule
registerOn(RuleRegistry registry)

Registers this rule on the given registry.

ValidationRule
withShortCircuit(boolean shortCircuit)

Returns a validation rule with the given short circuit.

Methods inherited from class java.lang.Object

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

Methods inherited from interface io.doov.core.dsl.meta.SyntaxTree

markdown, markdown, readable

Constructor Detail

DefaultValidationRule

public DefaultValidationRule(StepWhen stepWhen)

DefaultValidationRule

public DefaultValidationRule(StepWhen stepWhen,
                             boolean shortCircuit)

Method Detail

isShortCircuit

protected boolean isShortCircuit()

getStepWhen

protected StepWhen getStepWhen()

withShortCircuit

public ValidationRule withShortCircuit(boolean shortCircuit)

Description copied from interface: ValidationRule

Returns a validation rule with the given short circuit.

Specified by:

withShortCircuit in interface ValidationRule

Parameters:

shortCircuit - the short circuit

Returns:

the validation rule

executeOn

public Result executeOn(DslModel model)

Description copied from interface: ValidationRule

Executes the validation rule on the given model.

Specified by:

executeOn in interface ValidationRule

Parameters:

model - the model

Returns:

the result

registerOn

public ValidationRule registerOn(RuleRegistry registry)

Description copied from interface: ValidationRule

Registers this rule on the given registry.

Specified by:

registerOn in interface ValidationRule

Parameters:

registry - the registry

Returns:

the validation rule

readable

public java.lang.String readable(java.util.Locale locale)

Description copied from interface: SyntaxTree

Returns the human readable version of this object.

Specified by:

readable in interface SyntaxTree

Parameters:

locale - the locale to use

Returns:

the readable string

See Also:

SyntaxTree.readable()

accept

public void accept(MetadataVisitor visitor,
                   int depth)

Specified by:

accept in interface SyntaxTree

getRootMetadata

public Metadata getRootMetadata()

Description copied from interface: ValidationRule

Returns the root node metadata of this validation rule.

Specified by:

getRootMetadata in interface ValidationRule

Returns:

the root metadata

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
package ca.uhn.fhir.rest.method;

import java.util.List;
import java.util.Map;

import org.hl7.fhir.instance.model.api.IIdType;

import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.rest.api.RequestTypeEnum;
import ca.uhn.fhir.rest.client.BaseHttpClientInvocation;
import ca.uhn.fhir.rest.client.api.IHttpRequest;
import ca.uhn.fhir.rest.server.EncodingEnum;

public class HttpDeleteClientInvocation extends BaseHttpClientInvocation {

	private String myUrlPath;
	private Map<String, List<String>> myParams;

	public HttpDeleteClientInvocation(FhirContext theContext, IIdType theId) {
		super(theContext);
		myUrlPath = theId.toUnqualifiedVersionless().getValue();
	}

	public HttpDeleteClientInvocation(FhirContext theContext, String theSearchUrl) {
		super(theContext);
		myUrlPath = theSearchUrl;
	}

	public HttpDeleteClientInvocation(FhirContext theContext, String theResourceType, Map<String, List<String>> theParams) {
		super(theContext);
		myUrlPath = theResourceType;
		myParams = theParams;
	}

	@Override
	public IHttpRequest asHttpRequest(String theUrlBase, Map<String, List<String>> theExtraParams, EncodingEnum theEncoding, Boolean thePrettyPrint) {
		StringBuilder b = new StringBuilder();
		b.append(theUrlBase);
		if (!theUrlBase.endsWith("/")) {
			b.append('/');
		}
		b.append(myUrlPath);

		appendExtraParamsWithQuestionMark(myParams, b, b.indexOf("?") == -1);
		appendExtraParamsWithQuestionMark(theExtraParams, b, b.indexOf("?") == -1);

		return createHttpRequest(b.toString(), theEncoding, RequestTypeEnum.DELETE);
	}

}