text:
import Binding from './Binding';
import getBindingGroup from './getBindingGroup';
import handleDomEvent from './handleDomEvent';

function getValue() {
	const checked = this.bindings.filter( b => b.node.checked );
	if ( checked.length > 0 ) {
		return checked[0].element.getAttribute( 'value' );
	}
}

export default class RadioNameBinding extends Binding {
	constructor ( element ) {
		super( element, 'name' );

		this.group = getBindingGroup( 'radioname', this.model, getValue );
		this.group.add( this );

		if ( element.checked ) {
			this.group.value = this.getValue();
		}
	}

	bind () {
		if ( !this.group.bound ) {
			this.group.bind();
		}

		// update name keypath when necessary
		this.nameAttributeBinding = {
			handleChange: () => this.node.name = `{{${this.model.getKeypath()}}}`
		};

		this.model.getKeypathModel().register( this.nameAttributeBinding );
	}

	getInitialValue () {
		if ( this.element.getAttribute( 'checked' ) ) {
			return this.element.getAttribute( 'value' );
		}
	}

	getValue () {
		return this.element.getAttribute( 'value' );
	}

	handleChange () {
		// If this <input> is the one that's checked, then the value of its
		// `name` model gets set to its value
		if ( this.node.checked ) {
			this.group.value = this.getValue();
			super.handleChange();
		}
	}

	render () {
		super.render();

		const node = this.node;

		node.name = `{{${this.model.getKeypath()}}}`;
		node.checked = this.model.get() == this.element.getAttribute( 'value' );

		node.addEventListener( 'change', handleDomEvent, false );

		if ( node.attachEvent ) {
			node.addEventListener( 'click', handleDomEvent, false );
		}
	}

	setFromNode ( node ) {
		if ( node.checked ) {
			this.group.model.set( this.element.getAttribute( 'value' ) );
		}
	}

	unbind () {
		this.group.remove( this );

		this.model.getKeypathModel().unregister( this.nameAttributeBinding );
	}

	unrender () {
		const node = this.node;

		node.removeEventListener( 'change', handleDomEvent, false );
		node.removeEventListener( 'click', handleDomEvent, false );
	}
}


text:
package org.knowm.xchange.quoine.dto.trade;

import com.fasterxml.jackson.annotation.JsonProperty;

public class QuoineNewOrderRequestWrapper {

    @JsonProperty("order")
    private final QuoineNewOrderRequest order;

    public QuoineNewOrderRequestWrapper(QuoineNewOrderRequest order) {
        this.order = order;
    }

    public QuoineNewOrderRequest getOrder() {
        return order;
    }
}

redpajama_set_name: RedPajamaGithub


text:
import { Record, TransformBuilder } from '../src/index';
import './test-helper';

const { module, test } = QUnit;

module('TransformBuilder', function(hooks) {
  let tb;

  hooks.beforeEach(function() {
    tb = new TransformBuilder();
  });

  test('#addRecord', function(assert) {
    let record = { type: 'planet', id: 'jupiter' };

    assert.deepEqual(
      tb.addRecord(record),
      { op: 'addRecord', record }
    );
  });

  test('#replaceRecord', function(assert) {
    let record = { type: 'planet', id: 'jupiter' };

    assert.deepEqual(
      tb.replaceRecord(record),
      { op: 'replaceRecord', record }
    );
  });

  test('#removeRecord', function(assert) {
    let record = { type: 'planet', id: 'jupiter' };

    assert.deepEqual(
      tb.removeRecord(record),
      { op: 'removeRecord', record }
    );
  });

  test('#replaceKey', function(assert) {
    let record = { type: 'planet', id: 'jupiter' };

    assert.deepEqual(
      tb.replaceKey(record, 'remoteId', '123'),
      { op: 'replaceKey', record, key: 'remoteId', value: '123' }
    );
  });

  test('#replaceAttribute', function(assert) {
    let record = { type: 'planet', id: 'jupiter' };

    assert.deepEqual(
      tb.replaceAttribute(record, 'name', 'Earth'),
      { op: 'replaceAttribute', record, attribute: 'name', value: 'Earth' }
    );
  });

  test('#addToRelatedRecords', function(assert) {
    let record = { type: 'planet', id: 'jupiter' };
    let relatedRecord = { type: 'moon', id: 'Io' };

    assert.deepEqual(
      tb.addToRelatedRecords(record, 'moons', relatedRecord),
      { op: 'addToRelatedRecords', record, relationship: 'moons', relatedRecord }
    );
  });

  test('#removeFromRelatedRecords', function(assert) {
    let record = { type: 'planet', id: 'jupiter' };
    let relatedRecord = { type: 'moon', id: 'Io' };

    assert.deepEqual(
      tb.removeFromRelatedRecords(record, 'moons', relatedRecord),
      { op: 'removeFromRelatedRecords', record, relationship: 'moons', relatedRecord }
    );
  });

  test('#replaceRelatedRecords', function(assert) {
    let record = { type: 'planet', id: 'jupiter' };
    let relatedRecords = [{ type: 'moon', id: 'Io' }];

    assert.deepEqual(
      tb.replaceRelatedRecords(record, 'moons', relatedRecords),
      { op: 'replaceRelatedRecords', record, relationship: 'moons', relatedRecords }
    );
  });

  test('#replaceRelatedRecord', function(assert) {
    let record = { type: 'moon', id: 'Io' };
    let relatedRecord = { type: 'planet', id: 'Jupiter' };

    assert.deepEqual(
      tb.replaceRelatedRecord(record, 'planet', relatedRecord),
      { op: 'replaceRelatedRecord', record, relationship: 'planet', relatedRecord }
    );
  });

  test('#addRecord - when a recordInitializer has been set', function(assert) {
    const recordInitializer = {
      initializeRecord(record: Record) {
        if (record.id === undefined) {
          record.id = 'abc123';
        }
      }
    }

    tb = new TransformBuilder({ recordInitializer });

    let record = { type: 'planet' };

    assert.deepEqual(
      tb.addRecord(record),
      { op: 'addRecord', record: { type: 'planet', id: 'abc123' } }
    );
  });
});


text:
package lila.game

import chess.Color

import lila.common.{ SecureRandom, ThreadLocalRandom }
import lila.db.dsl._

final class IdGenerator(gameRepo: GameRepo)(implicit ec: scala.concurrent.ExecutionContext) {

  import IdGenerator._

  def game: Fu[Game.ID] = {
    val id = uncheckedGame
    gameRepo.exists(id).flatMap {
      case true  => game
      case false => fuccess(id)
    }
  }

  def games(nb: Int): Fu[Set[Game.ID]] =
    if (nb < 1) fuccess(Set.empty)
    else if (nb == 1) game.dmap(Set(_))
    else if (nb < 5) Set.fill(nb)(game).sequenceFu
    else {
      val ids = Set.fill(nb)(uncheckedGame)
      gameRepo.coll.distinctEasy[Game.ID, Set]("_id", $inIds(ids)) flatMap { collisions =>
        games(collisions.size) dmap { _ ++ (ids diff collisions) }
      }
    }
}

object IdGenerator {

  private[this] val whiteSuffixChars = ('0' to '4') ++ ('A' to 'Z') mkString
  private[this] val blackSuffixChars = ('5' to '9') ++ ('a' to 'z') mkString

  def uncheckedGame: Game.ID = ThreadLocalRandom nextString Game.gameIdSize

  def player(color: Color): Player.ID = {
    // Trick to avoid collisions between player ids in the same game.
    val suffixChars = color.fold(whiteSuffixChars, blackSuffixChars)
    val suffix      = suffixChars(SecureRandom nextInt suffixChars.length)
    SecureRandom.nextString(Game.playerIdSize - 1) + suffix
  }
}


text:
.navbar {
  padding: 0.5rem 0.5rem !important;
}

#masthead {
  min-height: 100px;
  margin-top: 2px;
}

#title-page {
  font-size: 50px;
}

#sub-title-page {
  margin-top: 3px;
}

#sidebar {
  display: none;
}

#masthead .logos {
  display: none;
}

@media screen and (min-width: 1000px) {
  #masthead .logos {
    display: block;
  }

  #sidebar {
    display: block;
  }

  .navbar-toggler {
    display: none !important;
  }
}

.container .language {
  float:right;
  color:white;
  padding-top:10px;
  padding-right:10px;
  margin-right:0px;
}

.main-container {
    text-align: justify;
}

/* Start by setting display:none to make this hidden.
   Then we position it in relation to the viewport window
   with position:fixed. Width, height, top and left speak
   for themselves. Background we set to 80% white with
   our animation centered, and no-repeating */
.modalLoading {
    display:    none;
    position:   fixed;
    z-index:    1000;
    top:        0;
    left:       0;
    height:     100%;
    width:      100%;
    background: rgba( 255, 255, 255, .8 )
                url('img/loading.gif')
                50% 50%
                no-repeat;
}

/* When the body has the loading class, we turn
   the scrollbar off with overflow:hidden */
body.loading {
    overflow: hidden;
}

/* Anytime the body has the loading class, our
   modal element will be visible */
body.loading .modalLoading {
    display: block;
}

.modalError404 {
  display: none;
}

body.error404 .modalError404 {
  text-align: center;
  display: block;
}

body.error404 .main-container {
  display: none;
}

.enormous-font{
  font-size: 10em;
  margin-bottom: 0em;
}

.big-font{
  font-size: 2em;
}


text:
if ENV['CODECLIMATE_REPO_TOKEN']
  puts "Code climate test coverage enabled"
  require "codeclimate-test-reporter"
  CodeClimate::TestReporter.start
end

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)

unless ENV['IGNORE_BUNDLER']
  require 'bundler'
  Bundler.setup(:default, :test, ENV['RAILS_ENV'])
end

require 'pry-byebug' if Gem::Specification.find_by_name('pry-byebug')
require 'pathname'
require 'salesforce_id'

SALESFORCE_ID_ROOT_PATH = Pathname.new(File.expand_path('../../', __FILE__).to_s)

RSpec.configure do |config|
  config.expect_with :rspec do |expectations|
    expectations.include_chain_clauses_in_custom_matcher_descriptions = true
  end

  config.mock_with :rspec do |mocks|
    mocks.verify_partial_doubles = true
  end

  if ENV['all'].nil?
    config.filter_run focus: true
  end
  config.run_all_when_everything_filtered = true
  config.disable_monkey_patching!
  config.default_formatter = 'doc' if config.files_to_run.one?
  config.order = :random
  Kernel.srand config.seed
end


text:
#pragma once
#include <aws/sagemaker/SageMaker_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/sagemaker/model/InferenceRecommendationsJob.h>
#include <utility>

namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;

namespace Utils
{
namespace Json
{
  class JsonValue;
} // namespace Json
} // namespace Utils
namespace SageMaker
{
namespace Model
{
  class AWS_SAGEMAKER_API ListInferenceRecommendationsJobsResult
  {
  public:
    ListInferenceRecommendationsJobsResult();
    ListInferenceRecommendationsJobsResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
    ListInferenceRecommendationsJobsResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);

    /**
     *
The recommendations created from the Amazon SageMaker Inference Recommender
     * job.

     */
    inline const Aws::Vector<InferenceRecommendationsJob>& GetInferenceRecommendationsJobs() const{ return m_inferenceRecommendationsJobs; }

    /**
     *
The recommendations created from the Amazon SageMaker Inference Recommender
     * job.

     */
    inline void SetInferenceRecommendationsJobs(const Aws::Vector<InferenceRecommendationsJob>& value) { m_inferenceRecommendationsJobs = value; }

    /**
     *
The recommendations created from the Amazon SageMaker Inference Recommender
     * job.

     */
    inline void SetInferenceRecommendationsJobs(Aws::Vector<InferenceRecommendationsJob>&& value) { m_inferenceRecommendationsJobs = std::move(value); }

    /**
     *
The recommendations created from the Amazon SageMaker Inference Recommender
     * job.

     */
    inline ListInferenceRecommendationsJobsResult& WithInferenceRecommendationsJobs(const Aws::Vector<InferenceRecommendationsJob>& value) { SetInferenceRecommendationsJobs(value); return *this;}

    /**
     *
The recommendations created from the Amazon SageMaker Inference Recommender
     * job.

     */
    inline ListInferenceRecommendationsJobsResult& WithInferenceRecommendationsJobs(Aws::Vector<InferenceRecommendationsJob>&& value) { SetInferenceRecommendationsJobs(std::move(value)); return *this;}

    /**
     *
The recommendations created from the Amazon SageMaker Inference Recommender
     * job.

     */
    inline ListInferenceRecommendationsJobsResult& AddInferenceRecommendationsJobs(const InferenceRecommendationsJob& value) { m_inferenceRecommendationsJobs.push_back(value); return *this; }

    /**
     *
The recommendations created from the Amazon SageMaker Inference Recommender
     * job.

     */
    inline ListInferenceRecommendationsJobsResult& AddInferenceRecommendationsJobs(InferenceRecommendationsJob&& value) { m_inferenceRecommendationsJobs.push_back(std::move(value)); return *this; }

    /**
     *
A token for getting the next set of recommendations, if there are any.

     */
    inline const Aws::String& GetNextToken() const{ return m_nextToken; }

    /**
     *
A token for getting the next set of recommendations, if there are any.

     */
    inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }

    /**
     *
A token for getting the next set of recommendations, if there are any.

     */
    inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); }

    /**
     *
A token for getting the next set of recommendations, if there are any.

     */
    inline void SetNextToken(const char* value) { m_nextToken.assign(value); }

    /**
     *
A token for getting the next set of recommendations, if there are any.

     */
    inline ListInferenceRecommendationsJobsResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}

    /**
     *
A token for getting the next set of recommendations, if there are any.

     */
    inline ListInferenceRecommendationsJobsResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}

    /**
     *
A token for getting the next set of recommendations, if there are any.

     */
    inline ListInferenceRecommendationsJobsResult& WithNextToken(const char* value) { SetNextToken(value); return *this;}

  private:

    Aws::Vector<InferenceRecommendationsJob> m_inferenceRecommendationsJobs;

    Aws::String m_nextToken;
  };

} // namespace Model
} // namespace SageMaker
} // namespace Aws


text:
export default {
    master:  'master',
    replica: 'replica',
};


text:
import json
import os
import subprocess

def computeSeeds( inputImage, outputImage ):
    subprocess.call(["ImageMath", inputImage,
                     "-t", "0", "8", "0", "1",
                     "-W", "0", outputImage])

def segmentTubes(inputImage, outputTRE, seedImage, scaleImage, vascularModel):

    subprocess.call(["SegmentTubes",
                    #"-o", tmpDir + "/out_VesselMask.mha",
                    "-P", vascularModel,
                    "-M", seedImage,
                    "-s", "0.1",       #Scale constant
                    #"-S", scaleImage, # or scale image
                    inputImage,
                    outputTRE])
    # Fill gaps
    subprocess.call(["ConvertTubesToTubeTree",
                     "--maxTubeDistanceToRadiusRatio", "3",
                     "--removeOrphanTubes",
                    outputTRE,
                    outputTRE + "Tree.tre"])
    subprocess.call(["TreeMath",
                    "-f", "S",
                    outputTRE + "Tree.tre",
                    "-w", outputTRE + "Tree.tre"])

########
# Main #
########

# Set path variables
script_params = json.load(open('params.json'))
caffe_root = script_params['CAFFE_SRC_ROOT']
hardDrive_root = script_params['CNN_DATA_ROOT']

proj_name = "SegmentVesselsUsingNeuralNetworks"
caffe_vseg_root = os.path.join(caffe_root, "data", proj_name)
hardDrive_vseg_root = os.path.join(hardDrive_root, proj_name)

extractionDir = os.path.join(caffe_vseg_root, "Extraction")

# Images path
seedImage = os.path.join(hardDrive_vseg_root, "output/3d.mha")
inputImage = os.path.join(caffe_vseg_root, "Controls/A36/pp07_A36_left.mhd")
outputTRE = os.path.join(extractionDir, "out.tre")
scaleImage = os.path.join(extractionDir, "input_ExpertEnhancedScales.mha")
vascularModel = os.path.join(extractionDir, "vascularModel.mtp")

# Process extraction
computeSeeds(seedImage, os.path.join(extractionDir, "seed.mha"))
segmentTubes(inputImage, outputTRE, os.path.join(extractionDir, "seed.mha"), scaleImage, vascularModel)


text:
<?php declare(strict_types=1);

namespace Neomerx\JsonApi\Representation;

use Neomerx\JsonApi\Contracts\Representation\ErrorWriterInterface;
use Neomerx\JsonApi\Contracts\Schema\DocumentInterface;
use Neomerx\JsonApi\Contracts\Schema\ErrorInterface;

/**
 * @package Neomerx\JsonApi
 */
class ErrorWriter extends BaseWriter implements ErrorWriterInterface
{
    /**
     * @inheritdoc
     */
    public function __construct()
    {
        parent::__construct();

        $this->data[DocumentInterface::KEYWORD_ERRORS] = [];
    }

    /**
     * @inheritdoc
     */
    public function addError(ErrorInterface $error): ErrorWriterInterface
    {
        $representation = \array_filter([
            DocumentInterface::KEYWORD_ERRORS_ID     => $error->getId(),
            DocumentInterface::KEYWORD_LINKS         => $this->getErrorLinksRepresentation($error),
            DocumentInterface::KEYWORD_ERRORS_STATUS => $error->getStatus(),
            DocumentInterface::KEYWORD_ERRORS_CODE   => $error->getCode(),
            DocumentInterface::KEYWORD_ERRORS_TITLE  => $error->getTitle(),
            DocumentInterface::KEYWORD_ERRORS_DETAIL => $error->getDetail(),
            DocumentInterface::KEYWORD_ERRORS_SOURCE => $error->getSource(),
         ]);

        if ($error->hasMeta() === true) {
            $representation[DocumentInterface::KEYWORD_ERRORS_META] = $error->getMeta();
        }

        // There is a special case when error representation is an empty array
        // Due to further json transform it must be an object otherwise it will be an empty array in json
        $representation = empty($representation) === false ? $representation : (object)$representation;

        $this->data[DocumentInterface::KEYWORD_ERRORS][] = $representation;

        return $this;
    }

    /**
     * @param ErrorInterface $error
     *
     * @return array|null
     *
     * @SuppressWarnings(PHPMD.IfStatementAssignment)
     */
    private function getErrorLinksRepresentation(ErrorInterface $error): ?array
    {
        $linksRepresentation = null;

        if (($value = $error->getLinks()) !== null) {
            $linksRepresentation = $this->getLinksRepresentation($this->getUrlPrefix(), $value);
        }

        if (($value = $error->getTypeLinks()) !== null) {
            $linksRepresentation[DocumentInterface::KEYWORD_ERRORS_TYPE] =
                $this->getLinksListRepresentation($this->getUrlPrefix(), $value);
        }

        return $linksRepresentation;
    }
}


text:
/**
 * Created by usucuha on 1/2/14.
 */

    // "private" variables
var Table = (function() {
    var _sides;
    var _values;
    var _diceNums;
    var _allSingleNum = false;

    // constructor
    function Table(sides, values, diceNums){
        if (sides instanceof Array) {
            this.TableWithoutSides(sides);
        } else {
            this.TableWithSides(sides, values, diceNums);
        }
    };

    Table.prototype.TableWithoutSides = function(values) {
        this._allSingleNum = true;
        this._values = values;
        this._sides = this._values.length;
        this._diceNums = new Array(this._sides);
        for (var i = 0; i < this._sides; i++) {
            this._diceNums[i] = i;
        }
    }

    Table.prototype.TableWithSides = function (sides, values, diceNums) {
        this._sides = sides;
        if (values != undefined) {
            this._values = values;
        }
        if (diceNums != undefined) {
            this._diceNums = diceNums;
        } else if (values.length == sides) {
            this._diceNums = new Array(sides);
            for (var i = 0; i < sides; i++) {
                this._diceNums[i] = i;
            }
            this._allSingleNum = true;
        }
    }

    // add the methods to the prototype so that all of the
    // Foo instances can access the private static
    Table.prototype.getSides = function() {
        return this._sides;
    };

    Table.prototype.setSides = function(sides) {
        this._sides = sides;
    };

    Table.prototype.roll = function() {
        var num = Math.floor((Math.random() * this._sides) + 1);
        return num;
    }

    Table.prototype.getValue = function() {
        if (this._allSingleNum) {
            return this._values[this.roll() - 1];
        } else {
            return this.findTableValue();
        }
    }

    Table.prototype.findTableValue = function () {
        var num = this.findTableIndex();
        return this._values[num];
    }

    Table.prototype.findTableIndex = function () {
        var num = this.roll(this._sides);
        for (var i = 0; i < this._diceNums.length; i++) {
            if (num <= this._diceNums[i]) {
                return i;
            }
        }
        return -1;
    }

    return Table;
})();


text:
__author__ = 'bdl5jj'

from helper import greeting

greeting("hello")


text:
using System.Collections;
using System.Collections.Generic;
using System.Linq;

namespace H3Mapper.Internal
{
    public class Lookup<TKey, TValue> : ILookup<TKey, TValue>
    {
        private readonly IDictionary<TKey, IList<TValue>> data;

        public Lookup(IEqualityComparer<TKey> comparer = null)
        {
            data = new Dictionary<TKey, IList<TValue>>(comparer);
        }

        public void Add(TKey key, TValue value)
        {
            if (data.TryGetValue(key, out var list) == false)
            {
                data[key] = list = new List<TValue>(3);
            }

            list.Add(value);
        }

        public IEnumerator<IGrouping<TKey, TValue>> GetEnumerator()
        {
            foreach (var pair in data)
            {
                yield return new Grouping(pair);
            }
        }

        IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();

        public bool Contains(TKey key) => data.ContainsKey(key);

        public int Count => data.Count;

        public IEnumerable<TValue> this[TKey key] => data[key];

        private class Grouping : IGrouping<TKey, TValue>
        {
            private readonly KeyValuePair<TKey, IList<TValue>> data;

            public Grouping(KeyValuePair<TKey, IList<TValue>> data) => this.data = data;

            public IEnumerator<TValue> GetEnumerator() => data.Value.GetEnumerator();

            IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();

            public TKey Key => data.Key;
        }
    }
}


text:
<!DOCTYPE HTML>

	<title>Popover in SVG - sap.m</title>

    <svg width="600" height="300">
        <rect id="rect1" width="100" height="30" x="440" y="65" stroke="black" stroke-width="1" style="fill:rgb(0,0,255)" />
    </svg>

    <Button id="openPopover-btn" style="height: 30px; position: absolute; top: 65px">Open Popover</Button>

PreferredTopOrFlip

PreferredBottomOrFlip

PreferredRightOrFlip

PreferredLeftOrFlip

VerticalPreferredTop

VerticalPreferredBottom

HorizontalPreferredRight

HorizontalPreferredLeft

    <button id="moveButton">
        Move Rect to bottom corner
    </button>


text:
#ifndef ASF_H
#define ASF_H

/*
 * This file includes all API header files for the selected drivers from ASF.
 * Note: There might be duplicate includes required by more than one driver.
 *
 * The file is automatically generated and will be re-written when
 * running the ASF driver selector tool. Any changes will be discarded.
 */

// From module: ABDAC - Audio Bitstream DAC
#include <abdac.h>

// From module: Audio software components
#include <audio.h>

// From module: CPU Cycle Counter
#include <cycle_counter.h>

// From module: Compiler abstraction layer and code utilities
#include <compiler.h>
#include <status_codes.h>

// From module: DSP - Digital signal processing library
#include <dsp.h>

// From module: EBI Static Memory Controller (SMC)
#include <smc.h>

// From module: EVK1105
#include <led.h>

// From module: FLASHC - Flash Controller
#include <flashc.h>

// From module: GPIO - General-Purpose Input/Output
#include <gpio.h>

// From module: Generic board support
#include <board.h>

// From module: INTC - Interrupt Controller
#include <intc.h>

// From module: Interrupt management - UC3 implementation
#include <interrupt.h>

// From module: PDCA - Peripheral DMA Controller
#include <pdca.h>

// From module: PM Power Manager- UC3 A0/A1/A3/A4/B0/B1 implementation
#include <power_clocks_lib.h>
#include <sleep.h>

// From module: Part identification macros
#include <parts.h>

// From module: SSC - Synchronous Serial Controller (I2S)
#include <ssc_i2s.h>

// From module: TPA6130A2 Audio Amplifier Component - UC3 A0/A1 implementation
#include <tpa6130.h>

// From module: TWI - Two-Wire Interface
#include <twi.h>

// From module: USART - Universal Synchronous/Asynchronous Receiver/Transmitter
#include <usart.h>

// From module: USART Debug strings
#include <print_funcs.h>

#endif // ASF_H


text:
package org.jetbrains.ether;

/**
 * @author: db
 * Date: 23.09.11
 */
public class FieldModifierTest extends IncrementalTestCase {
  public FieldModifierTest() throws Exception {
    super("fieldModifiers");
  }

  public void testSetFinal() throws Exception {
    doTest();
  }

  public void testSetPrivate() throws Exception {
    doTest();
  }

  public void testSetPrivateToConstantField() throws Exception {
    doTest();
  }

  public void testSetProtected() throws Exception {
    doTest();
  }

  public void testSetStatic() throws Exception {
    doTest();
  }

  public void testUnsetStatic() throws Exception {
    doTest();
  }

  public void testUnsetStaticFinal() throws Exception {
    doTest();
  }
}


text:
package com.google.gerrit.client.ui;

import com.google.gerrit.client.Gerrit;
import com.google.gerrit.reviewdb.AccountDiffPreference;

public class ListenableAccountDiffPreference
    extends ListenableValue<AccountDiffPreference> {

  public ListenableAccountDiffPreference() {
    if (Gerrit.isSignedIn() && Gerrit.getAccountDiffPreference() != null) {
      set(Gerrit.getAccountDiffPreference());
    } else {
      set(AccountDiffPreference.createDefault(null));
    }
  }
}


text:
Improve this doc
Source

Demo

Things to notice

Take a look through the source and note:

The script tag that bootstraps the Angular environment.

The text input form control which is
bound to the greeting name text.

There is no need for listener registration and event firing on change events.

The implicit presence of the name variable which is in the root scope.

The double curly brace {{markup}}, which binds the name variable to the greeting text.

The concept of data binding, which reflects any
changes to the
input field in the greeting text.


text:
package org.kohsuke.stapler.jelly.jruby;

import org.apache.commons.jelly.Script;
import org.kohsuke.stapler.Dispatcher;
import org.kohsuke.stapler.RequestImpl;
import org.kohsuke.stapler.ResponseImpl;
import org.kohsuke.stapler.WebApp;
import org.kohsuke.stapler.jelly.JellyFacet;

import javax.servlet.ServletException;
import java.io.IOException;

/**
 * {@link Dispatcher} that invokes view script.
 *
 * @author Kohsuke Kawaguchi
 */
abstract class ScriptInvokingDispatcher extends Dispatcher {
    protected boolean invokeScript(RequestImpl req, ResponseImpl rsp, Object node, String next, Script script) throws IOException, ServletException {
        try {
            if(script==null) return false;

            req.tokens.next();

            if(traceable())
                trace(req,rsp,"Invoking "+next+" on "+node+" for "+req.tokens);

            WebApp.getCurrent().getFacet(JellyFacet.class).scriptInvoker.invokeScript(req, rsp, script, node);

            return true;
        } catch (RuntimeException e) {
            throw e;
        } catch (IOException e) {
            throw e;
        } catch (Exception e) {
            throw new ServletException(e);
        }
    }

    public String toString() {
        return "TOKEN for url=/TOKEN/...";
    }
}


text:
layout: post
title: Development of human brain
thumb: brain
pub:
  title: Isogeometric Analysis of a reaction-diffusion model for human brain development
  author: Jochen Hinz
  journal: MSc thesis
  url: http://ta.twi.tudelft.nl/nw/users/vuik/numanal/hinz_afst.pdf
---

Solution of a Reaction-Diffusion model on a sphere to mimic the geometrical
development of human brain structures. For details see this MSc
thesis.


text:
JS packed in PNG. Be inspired by JS Packer.

## Sample

### original.png
![original.png](https://raw.githubusercontent.com/3846masa/jsInPNG/master/sample/original.png)

### packed.png
![packed.png](https://raw.githubusercontent.com/3846masa/jsInPNG/master/sample/packed.png)

Please rename ``packed.png`` to ``packed.html``.


text:
import Ember from 'ember';
import injectService from 'ember-service/inject';

const { Route } = Ember;

export default Route.extend({
  SidenavService: injectService('sidenav'),

  model() {
    return {
      sidenav: this.get('SidenavService')
    };
  },

  actions: {
    authenticate() {
      // TODO: Implement -- here, I'm thinking it would just be calling an `authenticate`
      // method from the addon's session service
    },

    willTransition(transition) {
      const activeTopLevelRoute = transition.targetName.split('.')[0];

      this.set('SidenavService.activeTopLevelRoute', activeTopLevelRoute);
    },

    toggleSidenav() {
      const SidenavService = this.get('SidenavService');

      SidenavService.toggleProperty('isVisible');
      SidenavService.toggleProperty('isAnimatable');
    }
  }
});


text:
<?xml version="1.0" encoding="utf-8"?>
<reflection>
  <assemblies>
    <assembly name="MFWsStack">
      <assemblydata version="4.3.1.0" culture="" key="" hash="SHA1" />
      <attributes>
        <attribute>
          <type api="T:System.Reflection.AssemblyInformationalVersionAttribute" ref="true" />
          <argument>
            <type api="T:System.String" ref="true" />
            <value>4.3.1.0</value>
          </argument>
        </attribute>
        <attribute>
          <type api="T:System.Reflection.AssemblyFileVersionAttribute" ref="true" />
          <argument>
            <type api="T:System.String" ref="true" />
            <value>4.3.1.0</value>
          </argument>
        </attribute>
        <attribute>
          <type api="T:System.Reflection.AssemblyConfigurationAttribute" ref="true" />
          <argument>
            <type api="T:System.String" ref="true" />
            <value>Release</value>
          </argument>
        </attribute>
        <attribute>
          <type api="T:System.Reflection.AssemblyTrademarkAttribute" ref="true" />
          <argument>
            <type api="T:System.String" ref="true" />
            <value>.NET is a trademark of Microsoft Corporation.</value>
          </argument>
        </attribute>
        <attribute>
          <type api="T:System.Reflection.AssemblyTitleAttribute" ref="true" />
          <argument>
            <type api="T:System.String" ref="true" />
            <value>MFWsStack</value>
          </argument>
        </attribute>
        <attribute>
          <type api="T:System.Reflection.AssemblyDescriptionAttribute" ref="true" />
          <argument>
            <type api="T:System.String" ref="true" />
            <value />
          </argument>
        </attribute>
        <attribute>
          <type api="T:System.Reflection.AssemblyCompanyAttribute" ref="true" />
          <argument>
            <type api="T:System.String" ref="true" />
            <value>Microsoft Corporation</value>
          </argument>
        </attribute>
        <attribute>
          <type api="T:System.Reflection.AssemblyProductAttribute" ref="true" />
          <argument>
            <type api="T:System.String" ref="true" />
            <value>Microsoft .NET Micro Framework</value>
          </argument>
        </attribute>
        <attribute>
          <type api="T:System.Reflection.AssemblyCopyrightAttribute" ref="true" />
          <argument>
            <type api="T:System.String" ref="true" />
            <value>Copyright (C) Microsoft Corporation.  All rights reserved.</value>
          </argument>
        </attribute>
      </attributes>
    </assembly>
  </assemblies>
  <apis>
    <api id="N:Ws.Services.Transport.HTTP">
      <topicdata group="api" />
      <apidata name="Ws.Services.Transport.HTTP" group="namespace" />
      <elements>
        <element api="T:Ws.Services.Transport.HTTP.WsHttpClient" />
      </elements>
      <file name="0bcf9c42-d748-39ca-a442-0b7cb7faa347" />
    </api>
    <api id="T:Ws.Services.Transport.HTTP.WsHttpClient">
      <topicdata group="api" allMembersTopicId="AllMembers.T:Ws.Services.Transport.HTTP.WsHttpClient" />
      <apidata name="WsHttpClient" group="type" subgroup="class" />
      <typedata visibility="public" serializable="false" />
      <family>
        <ancestors>
          <type api="T:System.Object" ref="true" />
        </ancestors>
      </family>
      <containers>
        <library assembly="MFWsStack" module="MFWsStack" kind="DynamicallyLinkedLibrary">
          <assemblydata version="4.3.1.0" />
        </library>
        <namespace api="N:Ws.Services.Transport.HTTP" />
      </containers>
      <file name="a0ee672b-6296-4670-d2c9-6ad6a6d8071f" />
    </api>
    <api id="AllMembers.T:Ws.Services.Transport.HTTP.WsHttpClient">
      <topicdata name="WsHttpClient" group="list" subgroup="members" typeTopicId="T:Ws.Services.Transport.HTTP.WsHttpClient" />
      <apidata name="WsHttpClient" group="type" subgroup="class" />
      <typedata visibility="public" serializable="false" />
      <elements>
        <element api="M:System.Object.Equals(System.Object)" />
        <element api="M:System.Object.Finalize" />
        <element api="M:System.Object.GetHashCode" />
        <element api="M:System.Object.GetType" />
        <element api="M:System.Object.MemberwiseClone" />
        <element api="M:System.Object.ToString" />
        <element api="M:Ws.Services.Transport.HTTP.WsHttpClient.#ctor(Ws.Services.ProtocolVersion)" />
        <element api="F:Ws.Services.Transport.HTTP.WsHttpClient.ReceiveTimeout" />
        <element api="F:Ws.Services.Transport.HTTP.WsHttpClient.RequestTimeout" />
        <element api="M:Ws.Services.Transport.HTTP.WsHttpClient.SendRequest(Ws.Services.Soap.WsMessage,System.Uri)" />
        <element api="M:Ws.Services.Transport.HTTP.WsHttpClient.SendRequestOneWay(Ws.Services.Soap.WsMessage,System.Uri)" />
        <element api="F:Ws.Services.Transport.HTTP.WsHttpClient.SendTimeout" />
      </elements>
      <containers>
        <library assembly="MFWsStack" module="MFWsStack" kind="DynamicallyLinkedLibrary">
          <assemblydata version="4.3.1.0" />
        </library>
        <namespace api="N:Ws.Services.Transport.HTTP" />
        <type api="T:Ws.Services.Transport.HTTP.WsHttpClient" />
      </containers>
      <file name="7d8e1504-ac0b-61f1-af1e-964fe0c1767a" />
    </api>
    <api id="Methods.T:Ws.Services.Transport.HTTP.WsHttpClient">
      <topicdata name="WsHttpClient" group="list" subgroup="Methods" typeTopicId="T:Ws.Services.Transport.HTTP.WsHttpClient" />
      <apidata name="WsHttpClient" group="type" subgroup="class" />
      <typedata visibility="public" serializable="false" />
      <elements>
        <element api="M:System.Object.Equals(System.Object)" />
        <element api="M:System.Object.Finalize" />
        <element api="M:System.Object.GetHashCode" />
        <element api="M:System.Object.GetType" />
        <element api="M:System.Object.MemberwiseClone" />
        <element api="M:System.Object.ToString" />
        <element api="M:Ws.Services.Transport.HTTP.WsHttpClient.SendRequest(Ws.Services.Soap.WsMessage,System.Uri)" />
        <element api="M:Ws.Services.Transport.HTTP.WsHttpClient.SendRequestOneWay(Ws.Services.Soap.WsMessage,System.Uri)" />
      </elements>
      <containers>
        <library assembly="MFWsStack" module="MFWsStack" kind="DynamicallyLinkedLibrary">
          <assemblydata version="4.3.1.0" />
        </library>
        <namespace api="N:Ws.Services.Transport.HTTP" />
        <type api="T:Ws.Services.Transport.HTTP.WsHttpClient" />
      </containers>
      <file name="76e0df2a-f477-27a8-cb54-91c707d81d21" />
    </api>
    <api id="Fields.T:Ws.Services.Transport.HTTP.WsHttpClient">
      <topicdata name="WsHttpClient" group="list" subgroup="Fields" typeTopicId="T:Ws.Services.Transport.HTTP.WsHttpClient" />
      <apidata name="WsHttpClient" group="type" subgroup="class" />
      <typedata visibility="public" serializable="false" />
      <elements>
        <element api="F:Ws.Services.Transport.HTTP.WsHttpClient.ReceiveTimeout" />
        <element api="F:Ws.Services.Transport.HTTP.WsHttpClient.RequestTimeout" />
        <element api="F:Ws.Services.Transport.HTTP.WsHttpClient.SendTimeout" />
      </elements>
      <containers>
        <library assembly="MFWsStack" module="MFWsStack" kind="DynamicallyLinkedLibrary">
          <assemblydata version="4.3.1.0" />
        </library>
        <namespace api="N:Ws.Services.Transport.HTTP" />
        <type api="T:Ws.Services.Transport.HTTP.WsHttpClient" />
      </containers>
      <file name="7470a063-46f9-60b4-aae1-8c8b8899a4d5" />
    </api>
    <api id="M:Ws.Services.Transport.HTTP.WsHttpClient.#ctor(Ws.Services.ProtocolVersion)">
      <topicdata group="api" />
      <apidata name=".ctor" group="member" subgroup="constructor" />
      <memberdata visibility="public" special="true" />
      <parameters>
        <parameter name="version">
          <type api="T:Ws.Services.ProtocolVersion" ref="true" />
        </parameter>
      </parameters>
      <containers>
        <library assembly="MFWsStack" module="MFWsStack" kind="DynamicallyLinkedLibrary">
          <assemblydata version="4.3.1.0" />
          <noAptca />
        </library>
        <namespace api="N:Ws.Services.Transport.HTTP" />
        <type api="T:Ws.Services.Transport.HTTP.WsHttpClient" ref="true" />
      </containers>
      <file name="0d671f69-d738-3f70-6b7d-29426b18b18e" />
    </api>
    <api id="F:Ws.Services.Transport.HTTP.WsHttpClient.ReceiveTimeout">
      <topicdata group="api" />
      <apidata name="ReceiveTimeout" group="member" subgroup="field" />
      <memberdata visibility="public" />
      <fielddata literal="false" initonly="false" serialized="true" />
      <returns>
        <type api="T:System.Int32" ref="false" />
      </returns>
      <containers>
        <library assembly="MFWsStack" module="MFWsStack" kind="DynamicallyLinkedLibrary">
          <assemblydata version="4.3.1.0" />
          <noAptca />
        </library>
        <namespace api="N:Ws.Services.Transport.HTTP" />
        <type api="T:Ws.Services.Transport.HTTP.WsHttpClient" ref="true" />
      </containers>
      <file name="f622f2a1-3647-9e1f-06f4-68bdc2496e42" />
    </api>
    <api id="F:Ws.Services.Transport.HTTP.WsHttpClient.RequestTimeout">
      <topicdata group="api" />
      <apidata name="RequestTimeout" group="member" subgroup="field" />
      <memberdata visibility="public" />
      <fielddata literal="false" initonly="false" serialized="true" />
      <returns>
        <type api="T:System.Int32" ref="false" />
      </returns>
      <containers>
        <library assembly="MFWsStack" module="MFWsStack" kind="DynamicallyLinkedLibrary">
          <assemblydata version="4.3.1.0" />
          <noAptca />
        </library>
        <namespace api="N:Ws.Services.Transport.HTTP" />
        <type api="T:Ws.Services.Transport.HTTP.WsHttpClient" ref="true" />
      </containers>
      <file name="f89e554f-85a4-2f2f-d352-958533c40382" />
    </api>
    <api id="M:Ws.Services.Transport.HTTP.WsHttpClient.SendRequest(Ws.Services.Soap.WsMessage,System.Uri)">
      <topicdata group="api" />
      <apidata name="SendRequest" group="member" subgroup="method" />
      <memberdata visibility="public" />
      <proceduredata virtual="false" />
      <parameters>
        <parameter name="request">
          <type api="T:Ws.Services.Soap.WsMessage" ref="true" />
        </parameter>
        <parameter name="remoteEndpoint">
          <type api="T:System.Uri" ref="true" />
        </parameter>
      </parameters>
      <returns>
        <type api="T:Ws.Services.Soap.WsMessage" ref="true" />
      </returns>
      <containers>
        <library assembly="MFWsStack" module="MFWsStack" kind="DynamicallyLinkedLibrary">
          <assemblydata version="4.3.1.0" />
          <noAptca />
        </library>
        <namespace api="N:Ws.Services.Transport.HTTP" />
        <type api="T:Ws.Services.Transport.HTTP.WsHttpClient" ref="true" />
      </containers>
      <file name="1d0d1f98-f277-ed72-d019-ba016c5e1995" />
    </api>
    <api id="M:Ws.Services.Transport.HTTP.WsHttpClient.SendRequestOneWay(Ws.Services.Soap.WsMessage,System.Uri)">
      <topicdata group="api" />
      <apidata name="SendRequestOneWay" group="member" subgroup="method" />
      <memberdata visibility="public" />
      <proceduredata virtual="false" />
      <parameters>
        <parameter name="request">
          <type api="T:Ws.Services.Soap.WsMessage" ref="true" />
        </parameter>
        <parameter name="remoteEndpoint">
          <type api="T:System.Uri" ref="true" />
        </parameter>
      </parameters>
      <containers>
        <library assembly="MFWsStack" module="MFWsStack" kind="DynamicallyLinkedLibrary">
          <assemblydata version="4.3.1.0" />
          <noAptca />
        </library>
        <namespace api="N:Ws.Services.Transport.HTTP" />
        <type api="T:Ws.Services.Transport.HTTP.WsHttpClient" ref="true" />
      </containers>
      <file name="802767fb-0e70-a20c-83be-f41fa8221b5f" />
    </api>
    <api id="F:Ws.Services.Transport.HTTP.WsHttpClient.SendTimeout">
      <topicdata group="api" />
      <apidata name="SendTimeout" group="member" subgroup="field" />
      <memberdata visibility="public" />
      <fielddata literal="false" initonly="false" serialized="true" />
      <returns>
        <type api="T:System.Int32" ref="false" />
      </returns>
      <containers>
        <library assembly="MFWsStack" module="MFWsStack" kind="DynamicallyLinkedLibrary">
          <assemblydata version="4.3.1.0" />
          <noAptca />
        </library>
        <namespace api="N:Ws.Services.Transport.HTTP" />
        <type api="T:Ws.Services.Transport.HTTP.WsHttpClient" ref="true" />
      </containers>
      <file name="14c683a8-e85b-5487-d56d-8575d87fa1b0" />
    </api>
  </apis>
</reflection>


text:
Returns a specific group or all groups.
## Syntax
```powershell
Get-PnPGroup [-Web <WebPipeBind>]
             [-Identity <GroupPipeBind>]
```

```powershell
Get-PnPGroup [-AssociatedMemberGroup [<SwitchParameter>]]
             [-Web <WebPipeBind>]
```

```powershell
Get-PnPGroup [-AssociatedVisitorGroup [<SwitchParameter>]]
             [-Web <WebPipeBind>]
```

```powershell
Get-PnPGroup [-AssociatedOwnerGroup [<SwitchParameter>]]
             [-Web <WebPipeBind>]
```

```powershell
Get-PnPGroup [-Web <WebPipeBind>]
             [-Includes <String[]>]
```

## Returns
>[List<Microsoft.SharePoint.Client.Group>](https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.group.aspx)

## Parameters
Parameter|Type|Required|Description
---------|----|--------|-----------
|AssociatedMemberGroup|SwitchParameter|False|Retrieve the associated member group|
|AssociatedOwnerGroup|SwitchParameter|False|Retrieve the associated owner group|
|AssociatedVisitorGroup|SwitchParameter|False|Retrieve the associated visitor group|
|Identity|GroupPipeBind|False|Get a specific group by name|
|Includes|String[]|False|Specify properties to include when retrieving objects from the server.|
|Web|WebPipeBind|False|The web to apply the command to. Omit this parameter to use the current web.|
## Examples

### Example 1
```powershell
PS:> Get-PnPGroup
```
Returns all groups

### Example 2
```powershell
PS:> Get-PnPGroup -Identity 'My Site Users'
```
This will return the group called 'My Site Users' if available

### Example 3
```powershell
PS:> Get-PnPGroup -AssociatedMemberGroup
```
This will return the current members group for the site


text:
<?php

if (!defined('W3TC')) {
    die();
}

w3_require_once(W3TC_INC_DIR . '/functions/activation.php');
w3_require_once(W3TC_INC_DIR . '/functions/file.php');
w3_require_once(W3TC_INC_DIR . '/functions/rule.php');

/**
 * Class W3_CdnAdminEnvironment
 */
class W3_CdnAdminEnvironment {

    /**
     * Fixes environment in each wp-admin request
     *
     * @param W3_Config $config
     * @param bool $force_all_checks
     * @throws SelfTestExceptions
     */
    public function fix_on_wpadmin_request($config, $force_all_checks) {
        $exs = new SelfTestExceptions();

        if ($config->get_boolean('config.check') || $force_all_checks) {
            if ($config->get_boolean('cdn.enabled')) {
                $this->rules_add($config, $exs);
            } else {
                $this->rules_remove($exs);
            }
        }

        if (count($exs->exceptions()) > 0)
            throw $exs;
    }

    /**
     * Fixes environment once event occurs
     *
     * @param W3_Config $config
     * @param string $event
     * @param W3_Config|null $old_config
     * @throws SelfTestExceptions
     **/
    public function fix_on_event($config, $event, $old_config = null) {
        if ($config->get_boolean('cdn.enabled') &&
                !w3_is_cdn_mirror($config->get_string('cdn.engine'))) {
            if ($old_config != null &&
                    $config->get_integer('cdn.queue.interval') !=
                    $old_config->get_integer('cdn.queue.interval')) {
                $this->unschedule_queue_process();
            }

            if (!wp_next_scheduled('w3_cdn_cron_queue_process')) {
                wp_schedule_event(current_time('timestamp'),
                    'w3_cdn_cron_queue_process', 'w3_cdn_cron_queue_process');
            }
        } else {
            $this->unschedule_queue_process();
        }

        if ($config->get_boolean('cdn.enabled') &&
                $config->get_boolean('cdn.autoupload.enabled') &&
                !w3_is_cdn_mirror($config->get_string('cdn.engine'))) {
            if ($old_config != null &&
                    $config->get_integer('cdn.autoupload.interval') !=
                    $old_config->get_integer('cdn.autoupload.interval')) {
                $this->unschedule_upload();
            }

            if (!wp_next_scheduled('w3_cdn_cron_upload')) {
                wp_schedule_event(current_time('timestamp'),
                    'w3_cdn_cron_upload', 'w3_cdn_cron_upload');
            }
        } else {
            $this->unschedule_upload();
        }

        $exs = new SelfTestExceptions();

        if ($config->get_boolean('cdn.enabled')) {
            try {
                $this->table_create($event == 'activate');
            } catch (Exception $ex) {
                $exs->push($ex);
            }
        }

        if (count($exs->exceptions()) > 0)
            throw $exs;
    }

    /**
     * Fixes environment after plugin deactivation
     */
    public function fix_after_deactivation() {
        $exs = new SelfTestExceptions();

        $this->rules_remove($exs);
        $this->table_delete();

        if (count($exs->exceptions()) > 0)
            throw $exs;
    }

    /**
     * Returns required rules for module
     * @param W3_Config $config
     * @return array|null
     */
    function get_required_rules($config) {
        if (!$config->get_boolean('cdn.enabled'))
            return null;

        $rewrite_rules = array();
        $rules = $this->rules_generate($config);

        if (strlen($rules) > 0) {
            if ($config->get_string('cdn.engine') == 'ftp') {
                /**
                 * @var W3_Plugin_CdnCommon $w3_plugin_cdncommon
                 */
                $w3_plugin_cdncommon = w3_instance('W3_Plugin_CdnCommon');
                $domain = $w3_plugin_cdncommon->get_cdn()->get_domain();
                $cdn_rules_path = sprintf('ftp://%s/%s', $domain,
                    w3_get_cdn_rules_path());
                $rewrite_rules[] = array(
                    'filename' => $cdn_rules_path,
                    'content' => $rules
                );
            }

            $path = w3_get_browsercache_rules_cache_path();
            $rewrite_rules[] = array(
                'filename' => $path,
                'content' => $rules
            );
        }
        return $rewrite_rules;
    }

    /**
     * Generate rules for FTP
     **/
    public function rules_generate_for_ftp($config) {
        return $this->rules_generate($config, true);
    }

    /**
     * table operations
     **/

    /**
     * Create queue table
     *
     * @param bool $drop
     * @throws SelfTestFailedException
     */
    private function table_create($drop = false) {
        global $wpdb;

        if ($drop) {
            $sql = sprintf('DROP TABLE IF EXISTS `%s%s`', $wpdb->prefix, W3TC_CDN_TABLE_QUEUE);

            $wpdb->query($sql);
        }

        $sql = sprintf("CREATE TABLE IF NOT EXISTS `%s%s` (
            `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
            `local_path` varchar(500) NOT NULL DEFAULT '',
            `remote_path` varchar(500) NOT NULL DEFAULT '',
            `command` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '1 - Upload, 2 - Delete, 3 - Purge',
            `last_error` varchar(150) NOT NULL DEFAULT '',
            `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
            PRIMARY KEY (`id`),
            UNIQUE KEY `path` (`local_path`, `remote_path`),
            KEY `date` (`date`)
        ) /*!40100 CHARACTER SET latin1 */", $wpdb->prefix, W3TC_CDN_TABLE_QUEUE);

        $wpdb->query($sql);

        if (!$wpdb->result)
            throw new SelfTestFailedException('Can\'t create table ' .
                $wpdb->prefix . W3TC_CDN_TABLE_QUEUE);
    }

    /**
     * Delete queue table
     *
     * @return void
     */
    private function table_delete() {
        global $wpdb;

        $sql = sprintf('DROP TABLE IF EXISTS `%s%s`', $wpdb->prefix, W3TC_CDN_TABLE_QUEUE);
        $wpdb->query($sql);
    }

    /**
     * schedules
     **/

    /**
     * Unschedules cron events
     */
    private function unschedule_queue_process() {
        if (wp_next_scheduled('w3_cdn_cron_queue_process')) {
            wp_clear_scheduled_hook('w3_cdn_cron_queue_process');
        }
    }

    /**
     * Unschedule upload event
     */
    private function unschedule_upload() {
        if (wp_next_scheduled('w3_cdn_cron_upload')) {
            wp_clear_scheduled_hook('w3_cdn_cron_upload');
        }
    }

    /**
     * rules core modification
     **/

    /**
     * Writes directives to WP .htaccess
     *
     * @param W3_Config $config
     * @param SelfTestExceptions $exs
     * @throws FilesystemOperationException with S/FTP form if it can't get the required filesystem credentials
     * @throws FileOperationException
     */
    private function rules_add($config, $exs) {
        w3_add_rules($exs, w3_get_browsercache_rules_cache_path(),
            $this->rules_generate($config),
            W3TC_MARKER_BEGIN_CDN,
            W3TC_MARKER_END_CDN,
            array(
                W3TC_MARKER_BEGIN_MINIFY_CORE => 0,
                W3TC_MARKER_BEGIN_PGCACHE_CORE => 0,
                W3TC_MARKER_BEGIN_BROWSERCACHE_NO404WP => 0,
                W3TC_MARKER_BEGIN_BROWSERCACHE_CACHE => 0,
                W3TC_MARKER_BEGIN_WORDPRESS => 0,
                W3TC_MARKER_END_PGCACHE_CACHE => strlen(W3TC_MARKER_END_PGCACHE_CACHE) + 1,
                W3TC_MARKER_END_MINIFY_CACHE => strlen(W3TC_MARKER_END_MINIFY_CACHE) + 1
            )
        );
    }

    /**
     * Removes Page Cache core directives
     *
     * @param SelfTestExceptions $exs
     * @throws FilesystemOperationException with S/FTP form if it can't get the required filesystem credentials
     * @throws FileOperationException
     */
    private function rules_remove($exs) {
        w3_remove_rules($exs,
            w3_get_browsercache_rules_cache_path(),
            W3TC_MARKER_BEGIN_CDN,
            W3TC_MARKER_END_CDN);
    }

    /**
     * Generates rules for WP dir
     *
     * @param W3_Config $config
     * @param bool $cdnftp
     * @return string
     */
    private function rules_generate($config, $cdnftp = false) {
        $w3_dispatcher = w3_instance('W3_Dispatcher');
        $w3_sharedRules = w3_instance('W3_SharedRules');

        $rules = '';
        if ($w3_dispatcher->canonical_generated_by($config) == 'cdn')
            $rules .= $w3_sharedRules->canonical($config, $cdnftp);
        if ($w3_dispatcher->allow_origin_generated_by($config) == 'cdn')
            $rules .= $w3_sharedRules->allow_origin($config, $cdnftp);

        if (strlen($rules) > 0)
            $rules =
                W3TC_MARKER_BEGIN_CDN . "\n" .
                $rules .
                W3TC_MARKER_END_CDN . "\n";

        return $rules;
    }
}


text:
package wstxtest.cfg;

import javax.xml.stream.XMLInputFactory;

public interface InputTestConfig
{
    public boolean nextConfig(XMLInputFactory f);

    /**
     * Method that will reset iteration state to the initial, ie. state
     * before any iteration
     */
    public void firstConfig(XMLInputFactory f);

    /**
     * @return String that describes current settings this configuration
     *   Object has (has set when {@link #nextConfig} was called)
     */
    public String getDesc();
}


text:
package redis

import (
	"context"
	"testing"

	"github.com/stretchr/testify/assert"
)

func TestInstance(t *testing.T) {
	ins := Instance()
	assert.NotNil(t, ins, "should get instance")

	ctx := context.TODO()
	// Test set
	err := ins.Set(ctx, "foo", "bar", 0).Err()
	assert.NoError(t, err, "redis set should be success")
	// Test get
	val := ins.Get(ctx, "foo").Val()
	assert.Equal(t, "bar", val, "redis get should be success")
	// Test delete
	err = ins.Del(ctx, "foo").Err()
	assert.NoError(t, err, "redis delete should be success")
	exist := ins.Exists(ctx, "foo").Val()
	assert.Equal(t, int64(0), exist, "key should not exist")
}