text:
package com.gmadorell.youtube_sync.module.synchronize.test.behaviour.sync

import com.gmadorell.youtube_sync.module.shared.stub.ListStub
import com.gmadorell.youtube_sync.module.synchronize.application.sync.{
  PlayListSynchronizer,
  SynchronizePlayListCommandHandler
}
import com.gmadorell.youtube_sync.module.synchronize.domain.error.PlayListNotFound
import com.gmadorell.youtube_sync.module.synchronize.domain.model.{PlayList, PlayListVideo}
import com.gmadorell.youtube_sync.module.synchronize.test.behaviour.YoutubeBehaviourSpec
import com.gmadorell.youtube_sync.module.synchronize.test.infrastructure.stub.{
  PlayListIdStub,
  PlayListStub,
  PlayListVideoStub,
  SynchronizePlayListCommandStub
}

final class SynchronizePlayListSpec extends YoutubeBehaviourSpec {

  val handler = new SynchronizePlayListCommandHandler(
    new PlayListSynchronizer(playListRepository, remotePlayListVideoRepository, localPlayListVideoRepository))

  "A SynchronizePlayListCommandHandler" should {
    "create videos that exist in the remote but not locally" in {
      val command = SynchronizePlayListCommandStub.create()

      val playListId                 = PlayListIdStub.create(command.playListId)
      val playList                   = PlayListStub.create(playListId)
      val videosBothInRemoteAndLocal = randomPlayListVideos(playList)
      val onlyRemoteVideos           = randomPlayListVideos(playList)
      val onlyLocalVideos            = randomPlayListVideos(playList)
      val remoteVideos               = onlyRemoteVideos ++ videosBothInRemoteAndLocal
      val localVideos                = onlyLocalVideos ++ videosBothInRemoteAndLocal

      shouldFindPlayList(playListId, playList)
      shouldFindRemotePlayListVideos(playList, remoteVideos)
      shouldFindLocalPlayListVideos(playList, localVideos)
      onlyRemoteVideos.foreach(shouldCreateLocalPlayListVideo)

      handler.handle(command).futureValue.isRight should ===(true)
    }

    "fail when the playlist doesn't exist" in {
      val command = SynchronizePlayListCommandStub.create()

      val playListId = PlayListIdStub.create(command.playListId)

      shouldNotFindPlayList(playListId)

      val result = handler.handle(command).futureValue
      result.isLeft should ===(true)
      result.left.map(error => error should ===(PlayListNotFound(playListId)))
    }
  }

  def randomPlayListVideos(playList: PlayList): List[PlayListVideo] =
    ListStub.randomElements(() => PlayListVideoStub.create(playList))
}


text:
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { Plugin, Cordova } from './plugin';
import { Observable } from 'rxjs/Observable';
/**
 * @name Gyroscope
 * @description Read Gyroscope sensor data
 * @usage
 * ```
 * import { Gyroscope, GyroscopeOrientation, GyroscopeOptions } from 'ionic-native';
 *
 *
 * let options: GyroscopeOptions = {
 *    frequency: 1000
 * };
 *
 * Gyroscope.getCurrent(options)
 *   .then((orientation: GyroscopeOrientation) => {
 *      console.log(orientation.x, orientation.y, orientation.z, orientation.timestamp);
 *    })
 *   .catch()
 *
 *
 * Gyroscope.watch()
 *    .subscribe((orientation: GyroscopeOrientation) => {
 *       console.log(orientation.x, orientation.y, orientation.z, orientation.timestamp);
 *    });
 *
 * ```
 */
export var Gyroscope = (function () {
    function Gyroscope() {
    }
    /**
     * Watching for gyroscope sensor changes
     * @param options {GyroscopeOptions} (optional)
     * @return {Observable<GyroscopeOrientation>} Returns an Observable that resolves GyroscopeOrientation
     */
    Gyroscope.watch = function (options) {
        return new Observable(function (observer) {
            var watchId = navigator.gyroscope.watch(observer.next.bind(observer), observer.next.bind(observer), options);
            return function () { return navigator.gyroscope.clearWatch(watchId); };
        });
    };
    /**
    * Get current data from gyroscope sensor
    * @param options {GyroscopeOptions} (optional)
    * @return {Promise<GyroscopeOrientation>} Returns a promise that resolves GyroscopeOrientation
    */
    Gyroscope.getCurrent = function (options) { return; };
    __decorate([
        Cordova({
            callbackOrder: 'reverse'
        })
    ], Gyroscope, "getCurrent", null);
    Gyroscope = __decorate([
        Plugin({
            pluginName: 'Gyroscope',
            plugin: 'cordova-plugin-gyroscope',
            pluginRef: 'navigator.gyroscope',
            repo: 'https://github.com/NeoLSN/cordova-plugin-gyroscope',
            platforms: ['Android', 'iOS']
        })
    ], Gyroscope);
    return Gyroscope;
}());
//# sourceMappingURL=gyroscope.js.map

redpajama_set_name: RedPajamaGithub


text:
const request = require('request');
const LimitedParallelStream = require('./limited_parallel_stream').LimitedParallelStream;

class Http {

    constructor(options){
        this.baseUrl = `${options.host}:${options.port}/riak/${options.bucket}`;
    }

    listKeys(){
        return request(this.baseUrl)
    }

    fetchObject(key, concurrency){
        new LimitedParallelStream(concurrency, function(key, enc, done){
            request(`${this.baseUrl}/${key}`, (err, data) =>{
                if(err) {
                    this.emit('error', err);
                    return done();
                }

                if(data.statusCode !== 200) {
                    this.emit('error', new Error(`Wrong statusCode: ${data.statusCode}`));
                    return done();
                }

                this.push(`${key}\t${data.body}\t${data.headers['content-type']}\n`);
                done();
            });
        });
    }
}

module.exports.create = (options) =>{
    return new Http(options);
};


text:
class Management::StaticPageController < ManagementController

  # GET /management
  def dashboard
    @sites = if user_can?('access_admin_only')
               Site
             else
               Site.joins(:users).where(users: {id: current_user.id})
             end

    @sites = @sites.order('created_at ASC')

    respond_to do |format|
      format.html { render layout: 'management' }
      format.json { render json: @sites.map { |s| s.attributes} }
    end
  end
end


text:
default: all

SRC = $(shell find src -name "*.coffee" -type f | sort)
LIB = $(SRC:src/%.coffee=lib/coffee2ls/%.js) lib/coffee2ls/parser.js
LIBMIN = $(LIB:lib/coffee2ls/%.js=lib/coffee2ls/%.min.js)
TESTS = $(shell find test -name "*.coffee" -type f | sort)
ROOT = $(shell pwd)

COFFEE = node_modules/CoffeeScriptRedux/bin/coffee --js --bare
PEGJS = node_modules/.bin/pegjs --track-line-and-column --cache --export-var 'module.exports'
MOCHA = node_modules/.bin/mocha --compilers coffee:. -u tdd
BROWSERIFY = node_modules/.bin/browserify
MINIFIER = node_modules/.bin/uglifyjs --no-copyright --mangle-toplevel --reserved-names require,module,exports,global,window,CoffeeScript

all: $(LIB)
build: all
parser: lib/coffee2ls/parser.js
browser: extras/coffee2ls.min.js
minify: $(LIBMIN)
# TODO: test-browser
# TODO: doc
# TODO: bench

lib:
	mkdir lib/

lib/coffee2ls: lib
	mkdir -p lib/coffee2ls/

lib/coffee2ls/parser.js: src/grammar.pegjs lib/coffee2ls
	$(PEGJS) < "$<" > "$@"

lib/coffee2ls/%.min.js: lib/coffee2ls/%.js lib/coffee2ls
	$(MINIFIER) < "$<" >"$@"

lib/coffee2ls/%.js: src/%.coffee lib/coffee2ls
	$(COFFEE) < "$<" > "$@"

lib/coffee2ls/%.min.js: lib/coffee2ls/%.js lib/coffee2ls
	$(MINIFIER) <"$<" >"$@"

extras:
	mkdir extras/

extras/coffee2ls.js: extras $(LIB)
	$(BROWSERIFY) lib/coffee2ls/module.js > "$@"

extras/coffee2ls.min.js: extras/coffee2ls.js
	$(MINIFIER) < "$<" > "$@"

.PHONY: test coverage install loc clean

test: $(LIB) $(TESTS)
	$(MOCHA) -R dot

xtest: $(TESTS)
	$(MOCHA) -R dot

coverage: $(LIB)
	@which jscoverage || (echo "install node-jscoverage"; exit 1)
	rm -rf instrumented
	jscoverage -v lib instrumented
	$(MOCHA) -R dot
	$(MOCHA) -r instrumented/coffee-script/compiler -R html-cov > coverage.html
	@xdg-open coverage.html &> /dev/null

install: $(LIB)
	npm install -g .

loc:
	wc -l src/*

clean:
	rm -rf instrumented
	rm -f coverage.html
	rm -rf lib


text:
package com.kant.system.design.parking;

public class ParkinSystem2 {

}

 class ParkingLot {
    private Level[] levels;
    private final int NUM_LEVELS = 5;

    public ParkingLot() {
        levels = new Level[NUM_LEVELS];
        for (int i = 0; i < NUM_LEVELS; i++) {
            levels[i] = new Level(i, 30);
        }
    }

    /* Park the vehicle in a spot (or multiple spots). Return false if failed. */
    public boolean parkVehicle(Vehicle vehicle) {
        for (int i = 0; i < levels.length; i++) {
            if (levels[i].parkVehicle(vehicle)) {
                return true;
            }
        }
        return false;
    }
}

 /* Represents a level in a parking garage */
 class Level {
     private int floor;
     private ParkingSpot[] spots;
     private int availableSpots = 0; // number of free spots
     private static final int SPOTS_PER_ROW = 10;

     public Level(int flr, int numberSpots) {
         floor = flr;
         spots = new ParkingSpot[numberSpots];
         int largeSpots = numberSpots / 4;
         int bikeSpots = numberSpots / 4;
         int compactSpots = numberSpots - largeSpots - bikeSpots;
         for (int i = 0; i < numberSpots; i++) {
             VehicleSize sz = VehicleSize.Motorcycle;
             if (i < largeSpots) {
                 sz = VehicleSize.Large;
             } else if (i < largeSpots + compactSpots) {
                 sz = VehicleSize.Compact;
             }
             int row = i / SPOTS_PER_ROW;
             spots[i] = new ParkingSpot(this, row, i, sz);
         }
         availableSpots = numberSpots;
     }

     public int availableSpots() {
         return availableSpots;
     }

     /* Try to find a place to park this vehicle. Return false if failed. */
     public boolean parkVehicle(Vehicle vehicle) {
         if (availableSpots() < vehicle.getSpotsNeeded()) {
             return false;
         }
         int spotNumber = findAvailableSpots(vehicle);
         if (spotNumber < 0) {
             return false;
         }
         return parkStartingAtSpot(spotNumber, vehicle);
     }

     /* Park a vehicle starting at the spot spotNumber, and continuing until vehicle.spotsNeeded. */
     private boolean parkStartingAtSpot(int spotNumber, Vehicle vehicle) {
         vehicle.clearSpots();
         boolean success = true;
         for (int i = spotNumber; i < spotNumber + vehicle.spotsNeeded; i++) {
              success &= spots[i].park(vehicle);
         }
         availableSpots -= vehicle.spotsNeeded;
         return success;
     }

     /* find a spot to park this vehicle. Return index of spot, or -1 on failure. */
     private int findAvailableSpots(Vehicle vehicle) {
         int spotsNeeded = vehicle.getSpotsNeeded();
         int lastRow = -1;
         int spotsFound = 0;
         for (int i = 0; i < spots.length; i++) {
             ParkingSpot spot = spots[i];
             if (lastRow != spot.getRow()) {
                 spotsFound = 0;
                 lastRow = spot.getRow();
             }
             if (spot.canFitVehicle(vehicle)) {
                 spotsFound++;
             } else {
                 spotsFound = 0;
             }
             if (spotsFound == spotsNeeded) {
                 return i - (spotsNeeded - 1);
             }
         }
         return -1;
     }

     public void print() {
         int lastRow = -1;
         for (int i = 0; i < spots.length; i++) {
             ParkingSpot spot = spots[i];
             if (spot.getRow() != lastRow) {
                 System.out.print("  ");
                 lastRow = spot.getRow();
             }
             spot.print();
         }
     }

     /* When a car was removed from the spot, increment availableSpots */
     public void spotFreed() {
         availableSpots++;
     }
 }


text:
INSERT INTO PORTAL_WIDGET(ID,NAME,URL) VALUES(11,'导航','/cdn/navigation.html');
INSERT INTO PORTAL_WIDGET(ID,NAME,URL) VALUES(12,'日程','/cdn/calendar.html');
INSERT INTO PORTAL_WIDGET(ID,NAME,URL) VALUES(13,'任务','/pim/portal/tasks.do');

INSERT INTO PORTAL_ITEM(ID,NAME,COLUMN_INDEX,ROW_INDEX,INFO_ID,WIDGET_ID) VALUES(9,'导航',3,3,1,11);
INSERT INTO PORTAL_ITEM(ID,NAME,COLUMN_INDEX,ROW_INDEX,INFO_ID,WIDGET_ID) VALUES(10,'日程',1,4,1,12);
INSERT INTO PORTAL_ITEM(ID,NAME,COLUMN_INDEX,ROW_INDEX,INFO_ID,WIDGET_ID) VALUES(11,'任务',2,4,1,13);

UPDATE PORTAL_WIDGET SET URL='/cdn/tools.html' WHERE ID=5;
UPDATE PORTAL_WIDGET SET URL='/cdn/weather.html' WHERE ID=6;
UPDATE PORTAL_WIDGET SET URL='/cdn/map.html' WHERE ID=7;
UPDATE PORTAL_WIDGET SET URL='/cdn/clock.html' WHERE ID=8;
UPDATE PORTAL_WIDGET SET URL='/cdn/android.html' WHERE ID=10;

UPDATE PORTAL_WIDGET SET URL='/humantask/portal/personalTasks.do' WHERE ID=1;
UPDATE PORTAL_WIDGET SET URL='/bpm/portal/runningProcesses.do' WHERE ID=2;
UPDATE PORTAL_WIDGET SET URL='/bpm/portal/processes.do' WHERE ID=3;
UPDATE PORTAL_WIDGET SET URL='/cms/portal/articles.do' WHERE ID=4;
UPDATE PORTAL_WIDGET SET URL='/msg/portal/msg.do' WHERE ID=9;


text:
<?php

namespace Nette\Forms;

use Nette;

/**
 * Instant validation JavaScript generator.
 *
 * @copyright  Copyright (c) 2004, 2010 David Grudl
 * @package    Nette\Forms
 */
final class InstantClientScript extends Nette\Object
{
	/** @var array */
	private $validateScripts;

	/** @var string */
	private $toggleScript;

	/** @var bool */
	private $central;

	/** @var Form */
	private $form;

	public function __construct(Form $form)
	{
		$this->form = $form;
	}

	public function enable()
	{
		$this->validateScripts = array();
		$this->toggleScript = '';
		$this->central = TRUE;

		foreach ($this->form->getControls() as $control) {
			$script = $this->getValidateScript($control->getRules());
			if ($script) {
				$this->validateScripts[$control->getHtmlName()] = $script;
			}
			$this->toggleScript .= $this->getToggleScript($control->getRules());

			if ($control instanceof ISubmitterControl && $control->getValidationScope() !== TRUE) {
				$this->central = FALSE;
			}
		}

		if ($this->validateScripts || $this->toggleScript) {
			if ($this->central) {
				$this->form->getElementPrototype()->onsubmit("return nette.validateForm(this)", TRUE);

			} else {
				foreach ($this->form->getComponents(TRUE, 'Nette\Forms\ISubmitterControl') as $control) {
					if ($control->getValidationScope()) {
						$control->getControlPrototype()->onclick("return nette.validateForm(this)", TRUE);
					}
				}
			}
		}
	}

	/**
	 * Generates the client side validation script.
	 * @return string
	 */
	public function renderClientScript()
	{
		if (!$this->validateScripts && !$this->toggleScript) {
			return;
		}

		$formName = json_encode((string) $this->form->getElementPrototype()->id);
		ob_start();
		include __DIR__ . '/InstantClientScript.phtml';
		return ob_get_clean();
	}

	private function getValidateScript(Rules $rules)
	{
		$res = '';
		foreach ($rules as $rule) {
			if (!is_string($rule->operation)) continue;

			if (strcasecmp($rule->operation, 'Nette\\Forms\\InstantClientScript::javascript') === 0) {
				$res .= "$rule->arg\n";
				continue;
			}

			$script = $this->getClientScript($rule->control, $rule->operation, $rule->arg);
			if (!$script) continue;

			if (!empty($rule->message)) { // this is rule
				$message = Rules::formatMessage($rule, FALSE);
				$res .= "$script\n"
					. "if (" . ($rule->isNegative ? '' : '!') . "res) "
					. "return " . json_encode((string) $message) . (strpos($message, '%value') === FALSE ? '' : ".replace('%value', val);\n") . ";\n";
			}

			if ($rule->type === Rule::CONDITION) { // this is condition
				$innerScript = $this->getValidateScript($rule->subRules);
				if ($innerScript) {
					$res .= "$script\nif (" . ($rule->isNegative ? '!' : '') . "res) {\n" . Nette\String::indent($innerScript) . "}\n";
					if ($rule->control instanceof ISubmitterControl) {
						$this->central = FALSE;
					}
				}
			}
		}
		return $res;
	}

	private function getToggleScript(Rules $rules, $cond = NULL)
	{
		$s = '';
		foreach ($rules->getToggles() as $id => $visible) {
			$s .= "visible = true; {$cond}\n"
				. "nette.toggle(" . json_encode((string) $id) . ", " . ($visible ? '' : '!') . "visible);\n";
		}
		$formName = json_encode((string) $this->form->getElementPrototype()->id);
		foreach ($rules as $rule) {
			if ($rule->type === Rule::CONDITION && is_string($rule->operation)) {
				$script = $this->getClientScript($rule->control, $rule->operation, $rule->arg);
				if ($script) {
					$res = $this->getToggleScript($rule->subRules, $cond . "$script visible = visible && " . ($rule->isNegative ? '!' : '') . "res;\n");
					if ($res) {
						$el = $rule->control->getControlPrototype();
						if ($el->getName() === 'select') {
							$el->onchange("nette.forms[$formName].toggle(this)", TRUE);
						} else {
							$el->onclick("nette.forms[$formName].toggle(this)", TRUE);
							//$el->onkeyup("nette.forms[$formName].toggle(this)", TRUE);
						}
						$s .= $res;
					}
				}
			}
		}
		return $s;
	}

	private function getClientScript(IFormControl $control, $operation, $arg)
	{
		$operation = strtolower($operation);
		$elem = 'form[' . json_encode($control->getHtmlName()) . ']';

		switch (TRUE) {
		case $control instanceof HiddenField || $control->isDisabled():
			return NULL;

		case $operation === ':filled' && $control instanceof RadioList:
			return "res = (val = nette.getValue($elem)) !== null;";

		case $operation === ':submitted' && $control instanceof SubmitButton:
			return "res = sender && sender.name==" . json_encode($control->getHtmlName()) . ";";

		case $operation === ':equal' && $control instanceof MultiSelectBox:
			$tmp = array();
			foreach ((is_array($arg) ? $arg : array($arg)) as $item) {
				$tmp[] = "options[i].value==" . json_encode((string) $item);
			}
			$first = $control->isFirstSkipped() ? 1 : 0;
			return "var options = $elem.options; res = false;\n"
				. "for (var i=$first, len=options.length; i<len; i++)\n\t"
				. "if (options[i].selected && (" . implode(' || ', $tmp) . ")) { res = true; break; }";

		case $operation === ':filled' && $control instanceof SelectBox:
			return "res = $elem.selectedIndex >= " . ($control->isFirstSkipped() ? 1 : 0) . ";";

		case $operation === ':filled' && $control instanceof TextBase:
			return "val = nette.getValue($elem); res = val!='' && val!=" . json_encode((string) $control->getEmptyValue()) . ";";

		case $operation === ':minlength' && $control instanceof TextBase:
			return "res = (val = nette.getValue($elem)).length>=" . (int) $arg . ";";

		case $operation === ':maxlength' && $control instanceof TextBase:
			return "res = (val = nette.getValue($elem)).length<=" . (int) $arg . ";";

		case $operation === ':length' && $control instanceof TextBase:
			if (!is_array($arg)) {
				$arg = array($arg, $arg);
			}
			return "val = nette.getValue($elem); res = " . ($arg[0] === NULL ? "true" : "val.length>=" . (int) $arg[0]) . " && "
				. ($arg[1] === NULL ? "true" : "val.length<=" . (int) $arg[1]) . ";";

		case $operation === ':email' && $control instanceof TextBase:
			return 'res = /^[^@\s]+@[^@\s]+\.[a-z]{2,10}$/i.test(val = nette.getValue('.$elem.'));';

		case $operation === ':url' && $control instanceof TextBase:
			return 'res = /^.+\.[a-z]{2,6}(\\/.*)?$/i.test(val = nette.getValue('.$elem.'));';

		case $operation === ':regexp' && $control instanceof TextBase:
			if (!preg_match('#^(/.*/)([imu]*)$#', $arg, $matches)) {
				return NULL; // regular expression must be JavaScript compatible
			}
			$arg = $matches[1] . str_replace('u', '', $matches[2]);
			return "res = $arg.test(val = nette.getValue($elem));";

		case $operation === ':integer' && $control instanceof TextBase:
			return "res = /^-?[0-9]+$/.test(val = nette.getValue($elem));";

		case $operation === ':float' && $control instanceof TextBase:
			return "res = /^-?[0-9]*[.,]?[0-9]+$/.test(val = nette.getValue($elem));";

		case $operation === ':range' && $control instanceof TextBase:
			return "val = nette.getValue($elem); res = " . ($arg[0] === NULL ? "true" : "parseFloat(val)>=" . json_encode((float) $arg[0])) . " && "
				. ($arg[1] === NULL ? "true" : "parseFloat(val)<=" . json_encode((float) $arg[1])) . ";";

		case $operation === ':filled' && $control instanceof FormControl:
			return "res = (val = nette.getValue($elem)) != '';";

		case $operation === ':valid' && $control instanceof FormControl:
			return "res = !this[" . json_encode($control->getHtmlName()) . "](sender);";

		case $operation === ':equal' && $control instanceof FormControl:
			if ($control instanceof Checkbox) $arg = (bool) $arg;
			$tmp = array();
			foreach ((is_array($arg) ? $arg : array($arg)) as $item) {
				if ($item instanceof IFormControl) { // compare with another form control?
					$tmp[] = "val==nette.getValue(form[" . json_encode($item->getHtmlName()) . "])";
				} else {
					$tmp[] = "val==" . json_encode($item);
				}
			}
			return "val = nette.getValue($elem); res = (" . implode(' || ', $tmp) . ");";
		}
	}

	public static function javascript()
	{
		return TRUE;
	}

}


text:
<?php

namespace wondernetwork\wiuphp\Exception;

class Exception extends \RuntimeException {}


text:
<?php

namespace Billy\ProjectBundle\Command;

use \Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand,
    \Symfony\Component\Console\Input\InputArgument,
    \Symfony\Component\Console\Input\InputOption,
    \Symfony\Component\Console\Input\InputInterface,
    \Symfony\Component\Console\Input\ArrayInput,
    \Symfony\Component\Console\Output\OutputInterface
;

class InitCommand extends ContainerAwareCommand
{

  /**
   * @return void
   */
  protected function configure()
  {
    $this
      ->setName('project:init')
      ->setDescription('Initialisation du projet')
      ->setDefinition(array(
          new InputArgument('username', InputArgument::REQUIRED, 'The username'),
          new InputArgument('email', InputArgument::REQUIRED, 'The email'),
          new InputArgument('password', InputArgument::REQUIRED, 'The password'),
          new InputOption('super-admin', null, InputOption::VALUE_NONE, 'Set the user as super admin'),
      ))
    ;
  }

  /**
   * @param \Symfony\Component\Console\Input\InputInterface $input
   * @param \Symfony\Component\Console\Output\OutputInterface $output
   * @return void
   */
  protected function execute(InputInterface $input, OutputInterface $output)
  {
    // Génération des fichiers modèles et insertion en base
    $propelBuildCommand = $this->getApplication()->get('propel:table:drop');
    $propelBuildCommand->run(new ArrayInput(array(
        'command' => 'propel:table:drop',
        '--force'  => true
      )),
      $output
    );

    // Génération des fichiers modèles et insertion en base
    $propelBuildCommand = $this->getApplication()->get('propel:build');
    $propelBuildCommand->run(new ArrayInput(array(
        'command' => 'propel:build',
        '--insert-sql'  => true
      )),
      $output
    );

    // Création d'un utilisateur
    $fosUserCreateCommand = $this->getApplication()->get('fos:user:create');
    $fosUserCreateCommand->run($input,$output);

    // Installation des assets
    $propelBuildCommand = $this->getApplication()->get('assets:install');
    $propelBuildCommand->run(new ArrayInput(array(
        'command' => 'assets:install',
        '--symlink'  => true,
        'target'  => '../../../web',
      )),
      $output
    );
  }
}


text:
using UnityEngine;
using System.Collections;

public class godMode : MonoBehaviour {
    public static bool godModeActive;
    public GameObject godMenu;
	// Use this for initialization
	void Start () {
        godMenu.SetActive(false);
        if (godModeActive == true)
        {
            godMenu.SetActive(true);
        }
	}

	// Update is called once per frame
	void Update () {

	}
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace h4t3
{
    class Boss : Employee

    {
        public string Car
        {
            get;
            set;
        }

        public int Bonus
        {
            get;
            set;
        }

        public Boss(string name, string profession, int salary, string car, int bonus)
            : base(name, profession, salary)
        {
            Car = car;
            Bonus = bonus;

        }
        public Boss()
            {

            }

        public override string ToString()
        {
            return base.ToString() + " Car:  " + Car + " Bonus:  " + Bonus;
        }

    }
}


text:
module FillDB where

import Database.HDBC
import Database.HDBC.PostgreSQL
import Database.HDBC.Sqlite3
import System.Random
import Control.Monad

main = do
	gen <- getStdGen
	males <- replicateM 500 $ mkPeople maleNames gen
	females <- replicateM 500 $ mkPeople femaleNames gen
	let couples = zipWith (\x y -> [x!!0, y!!0]) females males
	conn <- connectPostgreSQL []
	--conn <- connectSqlite3 "../test.db"
	quickQuery' conn "DROP TABLE IF EXISTS people" []
	quickQuery' conn "DROP TABLE IF EXISTS couples" []
	quickQuery' conn "CREATE TABLE people (name TEXT, age INT)" []
	quickQuery' conn "CREATE TABLE couples (her TEXT, him text)" []
	insPeople <- prepare conn "INSERT INTO people VALUES ((?), (?))"
	executeMany insPeople males
	executeMany insPeople females
	insCouples <- prepare conn "INSERT INTO couples VALUES ((?), (?))"
	executeMany insCouples couples
	-- newStdGen
	-- let male2 = mkPerson maleNames gen
	commit conn
	res <-	quickQuery' conn "SELECT * FROM people LIMIT 10" []
	disconnect conn
	return res
	-- let males = take 50000 $

maleNames = ["Tom", "John", "Ron", "Harry", "Mark", "Fred", "Richard", "Robin", "Christian", "Ben",  "Bert", "Drew"]

femaleNames =["Laura", "Cindy", "Lisa", "Louis", "Jeniffer", "Catherine", "Kate", "Carol", "Jane", "Alex", "Cora", "Edna"]

age gen = fst $ randomR (18,80) gen :: Int

mkPerson names gen = [toSql (names !! ((fst (randomR (0, 11) gen))::Int)), toSql $ (age gen)]
mkPeople names gen = do
	gen <- newStdGen
	return $ mkPerson names gen


text:
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities

def check_browser(browser):
  driver = webdriver.Remote(
    command_executor='http://selenium-hub:4444/wd/hub',
    desired_capabilities=getattr(DesiredCapabilities, browser)
  )
  driver.get("http://google.com")
  assert "google" in driver.page_source
  driver.close()
  print("Browser %s checks out!" % browser)

check_browser("FIREFOX")
check_browser("CHROME")


text:
@interface ACArtInfoViewController : UIViewController {
    UIScrollView *scrollView;
    NSInteger initialPage;
}

@property(nonatomic, strong) IBOutlet NINetworkImageView *leftFrameDetailImage;
@property(nonatomic, strong) IBOutlet NINetworkImageView *rightFrameDetailImage;

@property(nonatomic, strong) IBOutlet UIButton *addToCartButton;

@property(nonatomic, strong) NSString *itemNumber;

@property(nonatomic, strong) IBOutlet UIScrollView *scrollView;
@property(nonatomic, weak) NSDictionary *frameData;
@property(nonatomic, assign) NSInteger initialPage;

@property(nonatomic, strong) IBOutlet UILabel *itemType;
@property(nonatomic, strong) IBOutlet UILabel *name;
@property(nonatomic, strong) IBOutlet UILabel *owner;
@property(nonatomic, strong) IBOutlet UILabel *skuLabel;
@property(nonatomic, strong) IBOutlet UILabel *size;
@property(nonatomic, strong) IBOutlet UILabel *withoutBorderSize;
@property(nonatomic, strong) IBOutlet UILabel *price;
@property(nonatomic, strong) IBOutlet UILabel *time;
@property(nonatomic, strong) IBOutlet UILabel *description;
@property (weak, nonatomic) IBOutlet UILabel *aboutLabel;
@property(nonatomic, strong) IBOutlet NINetworkImageView *imageView;

@property(nonatomic, strong) IBOutlet UIScrollView *frameInfoView;
@property(nonatomic, strong) IBOutlet UIActivityIndicatorView *activityIndicatorView;

@property(nonatomic, strong) IBOutlet UILabel *frameProfileLabel;
@property(nonatomic, strong) IBOutlet UILabel *frameSizeLabel;
@property(nonatomic, strong) IBOutlet UILabel *frameColorLabel;
@property(nonatomic, strong) IBOutlet UILabel *frameMaterialLabel;
@property(nonatomic, strong) IBOutlet UILabel *frameStyleLabel;
@property(nonatomic, strong) IBOutlet UILabel *frameFinishLabel;
@property(nonatomic, strong) IBOutlet UILabel *frameIDLabel;
@property(nonatomic, strong) IBOutlet UILabel *framePriceLabel;
@property(nonatomic, strong) IBOutlet UILabel *frameDescriptionLabel;

@property(nonatomic, strong) NSMutableArray *networkRequests;

- (void)resizeToFit;

- (void)loadDataFromAPI;

- (void)showSegmentedControlIfNeeded;

- (void)configureFrameInfo;

//- (void)startRequest:(ACJSONAPIRequest *)request;

@end


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>

    <string name="weather_info_frame_layout_pane_number_tag" translatable="false">dual_pane</string>

</resources>


text:
if exists (select * from dbo.sysobjects where id = object_id(N'[GPT_USER]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  drop table [GPT_USER]
GO

CREATE TABLE [GPT_USER] (
  [USERID] [numeric](32, 0) IDENTITY(1,1) NOT NULL,
  [DN] [varchar](900) ,
  [USERNAME] [varchar](64) ,
  CONSTRAINT GPT_USER_PK PRIMARY KEY (USERID)
)
GO

CREATE INDEX GPT_USER_IDX1 ON GPT_USER(DN)
GO

CREATE INDEX GPT_USER_IDX2 ON GPT_USER(USERNAME)
GO

-- Saved search table ----------------------------------------------------------

if exists (select * from dbo.sysobjects where id = object_id(N'[GPT_SEARCH]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  drop table [GPT_SEARCH]
GO

CREATE TABLE GPT_SEARCH (
  [UUID] [varchar](38) NOT NULL ,
  [NAME] [varchar] (255) NULL,
  [USERID] [numeric](32, 0)  ,
  [CRITERIA] [text] NULL,
  CONSTRAINT GPT_SEARCH_PK PRIMARY KEY (UUID)
);

CREATE INDEX GPT_SEARCH_IDX1 ON GPT_SEARCH(USERID);

-- Create Harvesting Jobs table ------------------------------------------------

CREATE TABLE [GPT_HARVESTING_JOBS_PENDING] (
  [UUID] [varchar](38) NOT NULL ,
  [HARVEST_ID] [varchar](38) NOT NULL ,
  [INPUT_DATE] [datetime] NULL DEFAULT (getdate()),
  [HARVEST_DATE] [datetime] NULL DEFAULT (getdate()),
  [JOB_STATUS] [varchar](10) NOT NULL ,
  [JOB_TYPE] [varchar](10) NOT NULL ,
  [CRITERIA] [varchar](1024) NULL,
  [SERVICE_ID] [varchar](128) ,
  CONSTRAINT [GPT_HARVJOBSPNDG_PK] PRIMARY KEY (
    [HARVEST_ID]
  )
)
GO

CREATE INDEX GPT_HJOBSPNDG_IDX1 ON GPT_HARVESTING_JOBS_PENDING(UUID)
GO

CREATE INDEX GPT_HJOBSPNDG_IDX2 ON GPT_HARVESTING_JOBS_PENDING(HARVEST_DATE)
GO

CREATE INDEX GPT_HJOBSPNDG_IDX3 ON GPT_HARVESTING_JOBS_PENDING(INPUT_DATE)
GO

CREATE TABLE [GPT_HARVESTING_JOBS_COMPLETED] (
  [UUID] [varchar](38) NOT NULL ,
  [HARVEST_ID] [varchar](38) NOT NULL ,
  [INPUT_DATE] [datetime] NULL DEFAULT (getdate()),
  [HARVEST_DATE] [datetime] NULL DEFAULT (getdate()),
  [JOB_TYPE] [varchar](10) NOT NULL ,
  [SERVICE_ID] [varchar](128) ,
  CONSTRAINT [GPT_HARVJOBSCMPLTD_PK] PRIMARY KEY (
    [UUID]
  )
)
GO

CREATE INDEX GPT_HJOBSCMPLTD_IDX1 ON GPT_HARVESTING_JOBS_COMPLETED(HARVEST_ID)
GO

-- Create Harvesting History table ---------------------------------------------

CREATE TABLE [GPT_HARVESTING_HISTORY] (
  [UUID] [varchar](38) NOT NULL ,
  [HARVEST_ID] [varchar](38) NOT NULL ,
  [HARVEST_DATE] [datetime] NULL DEFAULT (getdate()),
  [HARVESTED_COUNT] [numeric](10, 0) DEFAULT 0,
  [VALIDATED_COUNT] [numeric](10, 0) DEFAULT 0,
  [PUBLISHED_COUNT] [numeric](10, 0) DEFAULT 0,
  [HARVEST_REPORT] [text] NULL,
  CONSTRAINT [GPT_HARVHIST_PK] PRIMARY KEY (
    [UUID]
  )
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

-- Create resource table ---------------------------------------------------------
if exists (select * from dbo.sysobjects where id = object_id(N'[GPT_RESOURCE_DATA]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  drop table [GPT_RESOURCE_DATA]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[GPT_RESOURCE]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  drop table [GPT_RESOURCE]
GO

CREATE TABLE [GPT_RESOURCE] (
   [DOCUUID]           [varchar](38) PRIMARY KEY,
   [TITLE]             [varchar](4000),
   [OWNER]             [numeric](32,0),
   [INPUTDATE]         [datetime] DEFAULT (getdate()),
   [UPDATEDATE]        [datetime] DEFAULT (getdate()),
   [ID]                [numeric](10, 0) IDENTITY(1,1) NOT NULL,
   [APPROVALSTATUS]    [varchar](64),
   [PUBMETHOD]         [varchar](64),
   [SITEUUID]          [varchar](38),
   [SOURCEURI]         [varchar](4000),
   [FILEIDENTIFIER]    [varchar](4000),
   [ACL]               [varchar](4000),
   [HOST_URL]          [varchar](255) NULL,
   [PROTOCOL_TYPE]     [varchar](20) NULL,
   [PROTOCOL]          [varchar](1000) NULL,
   [FREQUENCY]         [varchar](10),
   [SEND_NOTIFICATION] [varchar](10),
   [FINDABLE]          [varchar](6),
   [SEARCHABLE]        [varchar](6),
   [SYNCHRONIZABLE]    [varchar](6),
   [LASTSYNCDATE]      [datetime]
)
GO

CREATE INDEX GPT_RESOURCE_IDX1  ON GPT_RESOURCE(SITEUUID)
GO

CREATE INDEX GPT_RESOURCE_IDX2  ON GPT_RESOURCE(FILEIDENTIFIER)
GO

CREATE INDEX GPT_RESOURCE_IDX3  ON GPT_RESOURCE(SOURCEURI)
GO

CREATE INDEX GPT_RESOURCE_IDX4  ON GPT_RESOURCE(UPDATEDATE)
GO

CREATE INDEX GPT_RESOURCE_IDX5  ON GPT_RESOURCE(TITLE)
GO

CREATE INDEX GPT_RESOURCE_IDX6  ON GPT_RESOURCE(OWNER)
GO

CREATE INDEX GPT_RESOURCE_IDX8  ON GPT_RESOURCE(APPROVALSTATUS)
GO

CREATE INDEX GPT_RESOURCE_IDX9  ON GPT_RESOURCE(PUBMETHOD)
GO

CREATE INDEX GPT_RESOURCE_IDX11 ON GPT_RESOURCE(ACL)
GO

CREATE INDEX GPT_RESOURCE_IDX12 ON GPT_RESOURCE(PROTOCOL_TYPE)
GO

CREATE INDEX GPT_RESOURCE_IDX13 ON GPT_RESOURCE(ID)
GO

CREATE INDEX GPT_RESOURCE_IDX14 ON GPT_RESOURCE(LASTSYNCDATE)
GO

CREATE TABLE [GPT_RESOURCE_DATA] (
  [DOCUUID]   [varchar](38) PRIMARY KEY,
  [ID]        [numeric](10, 0) UNIQUE NOT NULL,
  [XML]       [text] NULL,
  [THUMBNAIL] [varBinary](MAX)
)
GO

CREATE INDEX GPT_RESOURCE_DATA_IDX1 ON GPT_RESOURCE_DATA(ID)
GO

CREATE TABLE GPT_COLLECTION (
  COLUUID    VARCHAR(38) NOT NULL,
  SHORTNAME  VARCHAR(128) UNIQUE NOT NULL,
  CONSTRAINT GPT_COLLECTION_PK PRIMARY KEY (COLUUID)
);
GO
CREATE INDEX GPT_COLLECTION_IDX1 ON GPT_COLLECTION(SHORTNAME);
GO

CREATE TABLE GPT_COLLECTION_MEMBER (
    DOCUUID VARCHAR(38) NOT NULL,
    COLUUID VARCHAR(38) NOT NULL
);
GO
CREATE INDEX GPT_COLL_MEMBER_IDX1 ON GPT_COLLECTION_MEMBER(DOCUUID);
GO
CREATE INDEX GPT_COLL_MEMBER_IDX2 ON GPT_COLLECTION_MEMBER(COLUUID);
GO


text:
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.

namespace mod_quiz\event;
defined('MOODLE_INTERNAL') || die();

/**
 * The mod_quiz attempt submitted event class.
 *
 * @property-read array $other {
 *      Extra information about event.
 *
 *      - int submitterid: id of submitter (null when trigged by CLI script).
 *      - int quizid: (optional) the id of the quiz.
 * }
 *
 * @package    mod_quiz
 * @since      Moodle 2.6
 * @copyright  2013 Adrian Greeve <adrian@moodle.com>
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */
class attempt_submitted extends \core\event\base {

    /**
     * Init method.
     */
    protected function init() {
        $this->data['objecttable'] = 'quiz_attempts';
        $this->data['crud'] = 'u';
        $this->data['edulevel'] = self::LEVEL_PARTICIPATING;
    }

    /**
     * Returns description of what happened.
     *
     * @return string
     */
    public function get_description() {
        return "The user with id '$this->relateduserid' has submitted the attempt with id '$this->objectid' for the " .
            "quiz with course module id '$this->contextinstanceid'.";
    }

    /**
     * Returns localised general event name.
     *
     * @return string
     */
    public static function get_name() {
        return get_string('eventquizattemptsubmitted', 'mod_quiz');
    }

    /**
     * Does this event replace a legacy event?
     *
     * @return string legacy event name
     */
    static public function get_legacy_eventname() {
        return 'quiz_attempt_submitted';
    }

    /**
     * Returns relevant URL.
     *
     * @return \moodle_url
     */
    public function get_url() {
        return new \moodle_url('/mod/quiz/review.php', array('attempt' => $this->objectid));
    }

    /**
     * Legacy event data if get_legacy_eventname() is not empty.
     *
     * @return \stdClass
     */
    protected function get_legacy_eventdata() {
        $attempt = $this->get_record_snapshot('quiz_attempts', $this->objectid);

        $legacyeventdata = new \stdClass();
        $legacyeventdata->component = 'mod_quiz';
        $legacyeventdata->attemptid = $this->objectid;
        $legacyeventdata->timestamp = $attempt->timefinish;
        $legacyeventdata->userid = $this->relateduserid;
        $legacyeventdata->quizid = $attempt->quiz;
        $legacyeventdata->cmid = $this->contextinstanceid;
        $legacyeventdata->courseid = $this->courseid;
        $legacyeventdata->submitterid = $this->other['submitterid'];
        $legacyeventdata->timefinish = $attempt->timefinish;

        return $legacyeventdata;
    }

    /**
     * Custom validation.
     *
     * @throws \coding_exception
     * @return void
     */
    protected function validate_data() {
        parent::validate_data();

        if (!isset($this->relateduserid)) {
            throw new \coding_exception('The \'relateduserid\' must be set.');
        }

        if (!array_key_exists('submitterid', $this->other)) {
            throw new \coding_exception('The \'submitterid\' value must be set in other.');
        }
    }

    public static function get_objectid_mapping() {
        return array('db' => 'quiz_attempts', 'restore' => 'quiz_attempt');
    }

    public static function get_other_mapping() {
        $othermapped = array();
        $othermapped['submitterid'] = array('db' => 'user', 'restore' => 'user');
        $othermapped['quizid'] = array('db' => 'quiz', 'restore' => 'quiz');

        return $othermapped;
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
    <record id="view_hr_job_form" model="ir.ui.view">
        <field name="name">hr.job.form.inherit</field>
        <field name="model">hr.job</field>
        <field name="inherit_id" ref="hr.view_hr_job_form"/>
        <field name="arch" type="xml">
            <!-- add state field in header -->
            <xpath expr="//sheet/div" position="before">
                <field name="website_url" invisible="1"/>
                <field name="website_published" class="pull-right" widget="website_button"/>
            </xpath>
        </field>
    </record>
</data>
</openerp>


text:
package se.toxbee.sleepfighter.challenge.snake;

import android.graphics.Paint;

/**
 * A Simple circular entity.
 *
 * @author Hassel
 *
 */
public class CircleEntity extends Entity {
	private int radius;

	/**
	 * @param x the middle of the circle
	 * @param y the middle of the circle
	 * @param radius the radius of the circle
	 * @param paint the color of the circle
	 */
	public CircleEntity(float x, float y, int radius, Paint paint) {
		super(x, y, paint);

		this.radius = radius;
	}

	/**
	 * @return the radius
	 */
	public float getRadius() {
		return radius;
	}
}


text:
import { __assign } from "tslib";
import * as tf from '@tensorflow/tfjs-core';
import { extractConvParamsFactory, extractFCParamsFactory, extractWeightsFactory, } from '../common';
function extractorsFactory(extractWeights, paramMappings) {
    var extractConvParams = extractConvParamsFactory(extractWeights, paramMappings);
    var extractFCParams = extractFCParamsFactory(extractWeights, paramMappings);
    function extractPReluParams(size, paramPath) {
        var alpha = tf.tensor1d(extractWeights(size));
        paramMappings.push({ paramPath: paramPath });
        return alpha;
    }
    function extractSharedParams(numFilters, mappedPrefix, isRnet) {
        if (isRnet === void 0) { isRnet = false; }
        var conv1 = extractConvParams(numFilters[0], numFilters[1], 3, mappedPrefix + "/conv1");
        var prelu1_alpha = extractPReluParams(numFilters[1], mappedPrefix + "/prelu1_alpha");
        var conv2 = extractConvParams(numFilters[1], numFilters[2], 3, mappedPrefix + "/conv2");
        var prelu2_alpha = extractPReluParams(numFilters[2], mappedPrefix + "/prelu2_alpha");
        var conv3 = extractConvParams(numFilters[2], numFilters[3], isRnet ? 2 : 3, mappedPrefix + "/conv3");
        var prelu3_alpha = extractPReluParams(numFilters[3], mappedPrefix + "/prelu3_alpha");
        return { conv1: conv1, prelu1_alpha: prelu1_alpha, conv2: conv2, prelu2_alpha: prelu2_alpha, conv3: conv3, prelu3_alpha: prelu3_alpha };
    }
    function extractPNetParams() {
        var sharedParams = extractSharedParams([3, 10, 16, 32], 'pnet');
        var conv4_1 = extractConvParams(32, 2, 1, 'pnet/conv4_1');
        var conv4_2 = extractConvParams(32, 4, 1, 'pnet/conv4_2');
        return __assign(__assign({}, sharedParams), { conv4_1: conv4_1, conv4_2: conv4_2 });
    }
    function extractRNetParams() {
        var sharedParams = extractSharedParams([3, 28, 48, 64], 'rnet', true);
        var fc1 = extractFCParams(576, 128, 'rnet/fc1');
        var prelu4_alpha = extractPReluParams(128, 'rnet/prelu4_alpha');
        var fc2_1 = extractFCParams(128, 2, 'rnet/fc2_1');
        var fc2_2 = extractFCParams(128, 4, 'rnet/fc2_2');
        return __assign(__assign({}, sharedParams), { fc1: fc1, prelu4_alpha: prelu4_alpha, fc2_1: fc2_1, fc2_2: fc2_2 });
    }
    function extractONetParams() {
        var sharedParams = extractSharedParams([3, 32, 64, 64], 'onet');
        var conv4 = extractConvParams(64, 128, 2, 'onet/conv4');
        var prelu4_alpha = extractPReluParams(128, 'onet/prelu4_alpha');
        var fc1 = extractFCParams(1152, 256, 'onet/fc1');
        var prelu5_alpha = extractPReluParams(256, 'onet/prelu5_alpha');
        var fc2_1 = extractFCParams(256, 2, 'onet/fc2_1');
        var fc2_2 = extractFCParams(256, 4, 'onet/fc2_2');
        var fc2_3 = extractFCParams(256, 10, 'onet/fc2_3');
        return __assign(__assign({}, sharedParams), { conv4: conv4, prelu4_alpha: prelu4_alpha, fc1: fc1, prelu5_alpha: prelu5_alpha, fc2_1: fc2_1, fc2_2: fc2_2, fc2_3: fc2_3 });
    }
    return {
        extractPNetParams: extractPNetParams,
        extractRNetParams: extractRNetParams,
        extractONetParams: extractONetParams
    };
}
export function extractParams(weights) {
    var _a = extractWeightsFactory(weights), extractWeights = _a.extractWeights, getRemainingWeights = _a.getRemainingWeights;
    var paramMappings = [];
    var _b = extractorsFactory(extractWeights, paramMappings), extractPNetParams = _b.extractPNetParams, extractRNetParams = _b.extractRNetParams, extractONetParams = _b.extractONetParams;
    var pnet = extractPNetParams();
    var rnet = extractRNetParams();
    var onet = extractONetParams();
    if (getRemainingWeights().length !== 0) {
        throw new Error("weights remaing after extract: " + getRemainingWeights().length);
    }
    return { params: { pnet: pnet, rnet: rnet, onet: onet }, paramMappings: paramMappings };
}
//# sourceMappingURL=extractParams.js.map


text:
import os
import sys
os.environ['PYTHONUNBUFFERED'] = '1'
os.environ['MXNET_CUDNN_AUTOTUNE_DEFAULT'] = '0'
os.environ['MXNET_ENABLE_GPU_P2P'] = '0'
#os.environ['MXNET_ENGINE_TYPE'] = 'NaiveEngine'
this_dir = os.path.dirname(__file__)
sys.path.insert(0, os.path.join(this_dir, '..', '..', 'faster_rcnn'))

import train_end2end
import test

if __name__ == "__main__":
    train_end2end.main()
    test.main()


text:
import React from "react";
import Breadcrumbs from "react-breadcrumbs";

export const MyBreadcrumbs = props => (
  <Breadcrumbs
    hideNoPath={true}
    wrapperClass="breadcrumbs"
    itemClass="breadcrumb"
    routes={props.routes}
    params={props.params}
  />
);

export default MyBreadcrumbs;


text:
package ingress

import (
	"context"
	"testing"

	"k8s.io/apimachinery/pkg/util/intstr"
	"knative.dev/networking/pkg/apis/networking"
	"knative.dev/networking/pkg/apis/networking/v1alpha1"
	"knative.dev/networking/test"
)

// TestIngressTLS verifies that the Ingress properly handles the TLS field.
func TestIngressTLS(t *testing.T) {
	t.Parallel()
	ctx, clients := context.Background(), test.Setup(t)

	name, port, _ := CreateRuntimeService(ctx, t, clients, networking.ServicePortNameHTTP1)

	hosts := []string{name + ".example.com"}

	secretName, tlsConfig, _ := CreateTLSSecret(ctx, t, clients, hosts)

	_, client, _ := CreateIngressReadyWithTLS(ctx, t, clients, v1alpha1.IngressSpec{
		Rules: []v1alpha1.IngressRule{{
			Hosts:      hosts,
			Visibility: v1alpha1.IngressVisibilityExternalIP,
			HTTP: &v1alpha1.HTTPIngressRuleValue{
				Paths: []v1alpha1.HTTPIngressPath{{
					Splits: []v1alpha1.IngressBackendSplit{{
						IngressBackend: v1alpha1.IngressBackend{
							ServiceName:      name,
							ServiceNamespace: test.ServingNamespace,
							ServicePort:      intstr.FromInt(port),
						},
					}},
				}},
			},
		}},
		TLS: []v1alpha1.IngressTLS{{
			Hosts:           hosts,
			SecretName:      secretName,
			SecretNamespace: test.ServingNamespace,
		}},
	}, tlsConfig)

	// Check without TLS.
	RuntimeRequest(ctx, t, client, "http://"+name+".example.com")

	// Check with TLS.
	RuntimeRequest(ctx, t, client, "https://"+name+".example.com")
}

// TODO(mattmoor): Consider adding variants where we have multiple hosts with distinct certificates.


text:
Setup script which I've used after clean installation of Linux Mint to install common used apps and tools (can be used for a lot of other distributions as well)

To run the script, execute the following line in terminal:

`sh ./linux-mint-setup.sh`

License
=================
The MIT License (MIT)

   Copyright (c) 2016 Yuriy Yunikov

   Permission is hereby granted, free of charge, to any person obtaining a copy
   of this software and associated documentation files (the "Software"), to deal
   in the Software without restriction, including without limitation the rights
   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   copies of the Software, and to permit persons to whom the Software is
   furnished to do so, subject to the following conditions:

   The above copyright notice and this permission notice shall be included in all
   copies or substantial portions of the Software.

   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
   SOFTWARE.


text:
'use strict';

/**
 * Represents the error used to indicate why the target compute size is not
 * applicable.
 *
 */
class ComputeSizeErrorDetails {
  /**
   * Create a ComputeSizeErrorDetails.
   * @member {string} [message] The error message.
   * @member {string} [severity] The severity of the error.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ComputeSizeErrorDetails
   *
   * @returns {object} metadata of ComputeSizeErrorDetails
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ComputeSizeErrorDetails',
      type: {
        name: 'Composite',
        className: 'ComputeSizeErrorDetails',
        modelProperties: {
          message: {
            required: false,
            serializedName: 'message',
            type: {
              name: 'String'
            }
          },
          severity: {
            required: false,
            serializedName: 'severity',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = ComputeSizeErrorDetails;


text:
package common.base.adapters;

import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
import androidx.viewpager.widget.PagerAdapter;

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

import common.base.utils.CommonLog;

/**
 * ******************(^_^)***********************

 * User: fee(QQ/WeiXin:1176610771)

 * Date: 2020/8/27

 * Time: 21:08

 *
DESC:
 * 一个不带保存Fragment状态的 PagerAdapter
 *

 * ******************(^_^)***********************
 */
public class AFragmentPagerAdapter extends FragmentPagerAdapter {
    private static final String TAG = "AFragmentPagerAdapter";
    private String belongTag = "";
    private List<Fragment> fragments;
    private List<CharSequence> pageTitles;

    /**
     * 当给适配器添加 title时是否要刷新适配器?
     * def: false,此情况下,添加完成后,主动调用一次 notifyDataSetChanged()刷新适配器
     */
    private boolean isNeedUpdateWhenAddTitles = false;

    /**
     * 当给适配器添加 Fragment item数据时,是否要自动刷新适配器?
     * def: false,此情况下,添加完成后,主动调用一次 notifyDataSetChanged()刷新适配器
     */
    private boolean isNeedUpdateWhenAddData = false;

    private boolean isNeedSaveFragmentState = true;

    public AFragmentPagerAdapter(FragmentManager fm) {
        super(fm);
    }

    public AFragmentPagerAdapter(FragmentManager fm, List<Fragment> fragments) {
        super(fm);
        this.fragments = fragments == null ? new ArrayList<Fragment>() : fragments;
    }

    /**
     * Return the Fragment associated with a specified position.
     *
     * @param position
     */
    @Override
    public Fragment getItem(int position) {
        Fragment theItemFragment = null;
        if (fragments != null) {
            if (!fragments.isEmpty()) {
                theItemFragment = fragments.get(position);
            }
        }
        CommonLog.i(TAG, belongTag + " --> getItem() position = " + position + " theItemFragment = " + theItemFragment);
        return theItemFragment;
    }

    @Override
    public int getItemPosition(Object object) {
        return PagerAdapter.POSITION_NONE;
    }

    @Override
    public long getItemId(int position) {
        return getItem(position).hashCode();
    }

    /**
     * Return the number of views available.
     */
    @Override
    public int getCount() {
        return fragments != null ? fragments.size() : 0;
    }

    @Nullable
    @Override
    public CharSequence getPageTitle(int position) {
        //如果ViewPager与TabLayout配合使用,tablayout会从这里来取 tab title
        return pageTitles != null && !pageTitles.isEmpty() ? pageTitles.get(position) : null;
    }

    public AFragmentPagerAdapter needUpdateWhenAddData(boolean isNeedUpdateWhenAddData) {
        this.isNeedUpdateWhenAddData = isNeedUpdateWhenAddData;
        return this;
    }

    public AFragmentPagerAdapter needUpdateWhenAddTitle(boolean isNeedUpdateWhenAddTitles) {
        this.isNeedUpdateWhenAddTitles = isNeedUpdateWhenAddTitles;
        return this;
    }
    public AFragmentPagerAdapter addData(Fragment fragment) {
        addData(fragment, -1);
        return this;
    }

    public AFragmentPagerAdapter addData(Fragment fragment, int addToIndex) {
        if (fragment != null) {
            if (fragments == null) {
                fragments = new ArrayList<>();
            }
            if (addToIndex >= 0) {
                fragments.add(addToIndex, fragment);
            }
            else {
                fragments.add(fragment);
            }
            if (isNeedUpdateWhenAddData) {
                notifyDataSetChanged();
            }
        }
        return this;
    }

    public AFragmentPagerAdapter addData(Fragment... fragments) {
        if (fragments != null && fragments.length > 0) {
            List<Fragment> fragmentList = Arrays.asList(fragments);
            addData(fragmentList);
        }
        return this;
    }

    public AFragmentPagerAdapter addData(Collection<Fragment> fragments) {
        if (fragments != null) {
            if (this.fragments != null) {
                this.fragments.addAll(fragments);
            }
            else {
                this.fragments = new ArrayList<>(fragments);
            }
            if (isNeedUpdateWhenAddData) {
                notifyDataSetChanged();
            }
        }
        return this;
    }

    public AFragmentPagerAdapter setNewDatas(Collection<? extends Fragment> newFragments) {
        if (newFragments == null || newFragments.isEmpty()) {
            this.fragments = null;
        }
        else {
            this.fragments = new ArrayList<>(newFragments);
        }

        notifyDataSetChanged();
        return this;
    }

    public AFragmentPagerAdapter addPageTitle(CharSequence title) {
        if (title != null) {
            addPageTitle(title, -1);
        }
        return this;
    }
    public AFragmentPagerAdapter addPageTitle(CharSequence title,int addToIndex) {
        if (title != null) {
            if (pageTitles == null) {
                pageTitles = new ArrayList<>();
            }
            if (addToIndex >= 0) {
                pageTitles.add(addToIndex, title);
            }
            else {
                pageTitles.add(title);
            }
            //添加 标题是否需要刷新?
            if (isNeedUpdateWhenAddTitles) {
                notifyDataSetChanged();
            }
        }
        return this;
    }

    public AFragmentPagerAdapter addPageTitle(CharSequence... titles) {
        if (titles != null && titles.length > 0) {
            List<CharSequence> titleList = Arrays.asList(titles);
            addPageTitle(titleList);
        }
        return this;
    }

    public AFragmentPagerAdapter addPageTitle(Collection<? extends CharSequence> pageTitles) {
        if (this.pageTitles != null) {
            this.pageTitles.addAll(pageTitles);
        }
        else {
            this.pageTitles = new ArrayList<>(pageTitles);
        }
        if (isNeedUpdateWhenAddTitles) {
            notifyDataSetChanged();
        }
        return this;
    }

    public AFragmentPagerAdapter setNewPageTitles(Collection<CharSequence> newPageTitles) {
        if (newPageTitles == null || newPageTitles.isEmpty()) {
            this.pageTitles = null;
        }
        else {
            this.pageTitles = new ArrayList<>(newPageTitles);
        }
        notifyDataSetChanged();
        return this;
    }

    public AFragmentPagerAdapter setBelongTag(String belongTag) {
        this.belongTag = belongTag;
        return this;
    }
}


text:
<?php

/**
 * Class LogViewerRouteTest
 */
class LogViewerRouteTest extends TestCase
{
    public function testLogViewerDashboard()
    {
        $this->actingAs($this->admin)
            ->visit('/admin/log-viewer')
            ->see('Log Viewer');
    }

    public function testLogViewerList()
    {
        $this->actingAs($this->admin)
            ->visit('/admin/log-viewer/logs')
            ->see('Logs');
    }

    public function testLogViewerSingle()
    {
        $this->actingAs($this->admin)
            ->visit('/admin/log-viewer/'.date('Y-m-d'))
            ->see('Log ['.date('Y-m-d').']');
    }

    public function testLogViewerSingleType()
    {
        $this->actingAs($this->admin)
            ->visit('/admin/log-viewer/'.date('Y-m-d').'/error')
            ->see('Log ['.date('Y-m-d').']');
    }
}


text:
#include "src/core/lib/iomgr/iomgr.h"
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/endpoint.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/executor.h"

/*******************************************************************************
 * NOTE: If this test fails to compile, then the api changes are likely to cause
 *       merge failures downstream. Please pay special attention to reviewing
 *       these changes, and solicit help as appropriate when merging downstream.
 *
 * This test is NOT expected to be run directly.
 ******************************************************************************/

static void test_code(void) {
  /* iomgr.h */
  grpc_iomgr_init();
  grpc_iomgr_shutdown(NULL);

  /* closure.h */
  grpc_closure closure;
  closure.cb = NULL;
  closure.cb_arg = NULL;
  closure.next_data.scratch = 0;

  grpc_closure_list closure_list = GRPC_CLOSURE_LIST_INIT;
  closure_list.head = NULL;
  closure_list.tail = NULL;

  grpc_closure_init(&closure, NULL, NULL, grpc_schedule_on_exec_ctx);

  grpc_closure_create(NULL, NULL, grpc_schedule_on_exec_ctx);

  grpc_closure_list_move(NULL, NULL);
  grpc_closure_list_append(NULL, NULL, GRPC_ERROR_CREATE("Foo"));
  grpc_closure_list_empty(closure_list);

  /* exec_ctx.h */
  grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
  grpc_exec_ctx_flush(&exec_ctx);
  grpc_exec_ctx_finish(&exec_ctx);
  grpc_closure_sched(&exec_ctx, &closure, GRPC_ERROR_CREATE("Foo"));
  grpc_closure_list_sched(&exec_ctx, &closure_list);

  /* endpoint.h */
  grpc_endpoint endpoint;
  grpc_endpoint_vtable vtable = {grpc_endpoint_read,
                                 grpc_endpoint_write,
                                 grpc_endpoint_get_workqueue,
                                 grpc_endpoint_add_to_pollset,
                                 grpc_endpoint_add_to_pollset_set,
                                 grpc_endpoint_shutdown,
                                 grpc_endpoint_destroy,
                                 grpc_endpoint_get_resource_user,
                                 grpc_endpoint_get_peer,
                                 grpc_endpoint_get_fd};
  endpoint.vtable = &vtable;

  grpc_endpoint_read(&exec_ctx, &endpoint, NULL, NULL);
  grpc_endpoint_get_peer(&endpoint);
  grpc_endpoint_write(&exec_ctx, &endpoint, NULL, NULL);
  grpc_endpoint_shutdown(&exec_ctx, &endpoint);
  grpc_endpoint_destroy(&exec_ctx, &endpoint);
  grpc_endpoint_add_to_pollset(&exec_ctx, &endpoint, NULL);
  grpc_endpoint_add_to_pollset_set(&exec_ctx, &endpoint, NULL);

  /* executor.h */
  grpc_executor_init();
  grpc_executor_shutdown(NULL);

  /* pollset.h */
  grpc_pollset_size();
  grpc_pollset_init(NULL, NULL);
  grpc_pollset_shutdown(NULL, NULL, NULL);
  grpc_pollset_reset(NULL);
  grpc_pollset_destroy(NULL);
  GRPC_ERROR_UNREF(grpc_pollset_work(NULL, NULL, NULL,
                                     gpr_now(GPR_CLOCK_REALTIME),
                                     gpr_now(GPR_CLOCK_MONOTONIC)));
  GRPC_ERROR_UNREF(grpc_pollset_kick(NULL, NULL));
}

int main(void) {
  if (false) test_code();
  return 0;
}


text:
<?php

use Tmdb\Client;
use Tmdb\Event\BeforeRequestEvent;
use Tmdb\Token\Api\ApiToken;
use Tmdb\Token\Session\SessionToken;

require_once '../../../vendor/autoload.php';
require_once '../../apikey.php';

/** @var Client $client * */
$client = require_once('../../setup-client.php');
$token = new ApiToken(TMDB_API_KEY);
$client->getEventDispatcher()->addListener(
    BeforeRequestEvent::class,
    new Tmdb\Event\Listener\Request\SessionTokenRequestListener(
        new SessionToken(TMDB_SESSION_TOKEN)
    )
);

$favorite_movies = $client->getAccountApi()->getFavoriteMovies(TMDB_ACCOUNT_ID);

var_dump($favorite_movies);


text:
package org.apache.batik.apps.svgbrowser;

import org.apache.batik.swing.gvt.Overlay;

import org.w3c.dom.Document;
import org.w3c.dom.Node;

/**
 * Provides the information needed for the DOMViewer to show and edit the
 * document.
 *
 * @version $Id$
 */
public interface DOMViewerController {

    /**
     * Performs the document update.
     *
     * @param r The runnable that contains the update
     */
    void performUpdate(Runnable r);

    /**
     * Creates the ElementSelectionManager to manage the selection overlay on
     * the canvas.
     *
     * @return ElementSelectionManager
     */
    ElementOverlayManager createSelectionManager();

    /**
     * Removes the given selection overlay from the canvas.
     *
     * @param selectionOverlay
     *            The given selection overlay
     */
    void removeSelectionOverlay(Overlay selectionOverlay);

    /**
     * Gets the document for the DOMViewer to show.
     *
     * @return the document
     */
    Document getDocument();

    /**
     * Selects the given node in the DOMViewer's document tree.
     *
     * @param node
     *            The node to select
     */
    void selectNode(Node node);

    /**
     * Checks whether the DOMViewer should be allowed to edit the document.
     *
     * @return True for non static documents, when UpdateManager is available
     */
    boolean canEdit();
}


text:
$packageName = '{{PackageName}}'
$installerType = 'msi'
$url = '{{DownloadUrl}}'
$silentArgs = '/passive /norestart'
$validExitCodes = @(0)

Install-ChocolateyPackage $packageName $installerType `
  $silentArgs $url -validExitCodes $validExitCodes


text:
module dojox.widget{
export class SortList extends dijit.layout._LayoutWidget {
templateString : String;
templatePath : String;
widgetsInTemplate : bool;
_skipNodeCache : bool;
_earlyTemplatedStartup : bool;
_attachPoints : any;
_attachEvents : any[];
declaredClass : any;
_startupWidgets : Object;
_supportingWidgets : Object;
_templateCache : Object;
_stringRepl (tmpl:any) : any;
_fillContent (source:HTMLElement) : any;
_attachTemplateNodes (rootNode:HTMLElement,getAttrFunc?:Function) : any;
getCachedTemplate (templatePath:String,templateString?:String,alwaysUseString?:any) : any;
heading : String;
descending : bool;
sortable : bool;
store : Object;
key : String;
_selected : Object;
_addItem (item:any) : any;
onSort (e:any) : any;
_unset (e:any) : any;
_handleClick (e:any) : any;
_updateValues () : any;
_sorter (a:any,b:any) : any;
setTitle (title:String) : any;
onChanged () : any;
}
}


text:
Official HLR Lookup API SDK for NodeJS by www.hlr-lookups.com. Obtain live mobile phone connectivity and portability data from network operators directly.

This SDK implements the REST API documented at https://www.hlr-lookups.com/en/api-docs and includes an [HLR API](https://www.hlr-lookups.com/en/api-docs#post-hlr-lookup) (live connectivity), [NT API](https://www.hlr-lookups.com/en/api-docs#post-nt-lookup) (number types), as well as an [MNP API](https://www.hlr-lookups.com/en/api-docs#post-mnp-lookup) (mobile number portability).

For SDKs in different programming languages, see https://www.hlr-lookups.com/en/api-docs#sdks

Requirements
------------
* NodeJS >= 10.14.0
* axios >= 0.19.2

Installation with npm
---------------------
`npm install node-hlr-client`

**Usage Client**
```javascript
require('node-hlr-client');

const client = new HlrLookupClient(
    'YOUR-API-KEY',
    'YOUR-API-SECRET'
);
```
Get your API key and secret [here](https://www.hlr-lookups.com/en/api-settings).

## Examples

**Test Authentication** (https://www.hlr-lookups.com/en/api-docs#get-auth-test)

Performs an authenticated request against the `GET /auth-test` endpoint. A status code of 200 indicates that you were able to authenticate using you [API credentials](https://www.hlr-lookups.com/en/api-settings#authSettings).

```javascript
let response = await client.get('/auth-test');

console.log(response.status);
console.log(response.data);

if (response.status === 200) {
    // authentication was successful
}
```

Get your API key and secret [here](https://www.hlr-lookups.com/en/api-settings).

**Submitting an HLR Lookup** ([HLR API Docs](https://www.hlr-lookups.com/en/api-docs#post-hlr-lookup))

```javascript
let response = await client.post('/hlr-lookup', {msisdn: '+905536939460'});

// The API returns an HTTP status code of 200 if the request was successfully processed. Let's have a look.
console.log('HLR Lookup Status Code', response.status);
console.log('HLR Lookup Response Body', response.data);

if (response.status !== 200) {
    console.log('Received non-OK status code from server.');
    return;
}

let data = response.data;
// do something with the data
```

The HLR API Response Object:

```json
{
   "id":"f94ef092cb53",
   "msisdn":"+14156226819",
   "connectivity_status":"CONNECTED",
   "mccmnc":"310260",
   "mcc":"310",
   "mnc":"260",
   "imsi":"***************",
   "msin":"**********",
   "msc":"************",
   "original_network_name":"Verizon Wireless",
   "original_country_name":"United States",
   "original_country_code":"US",
   "original_country_prefix":"+1",
   "is_ported":true,
   "ported_network_name":"T-Mobile US",
   "ported_country_name":"United States",
   "ported_country_code":"US",
   "ported_country_prefix":"+1",
   "is_roaming":false,
   "roaming_network_name":null,
   "roaming_country_name":null,
   "roaming_country_code":null,
   "roaming_country_prefix":null,
   "cost":"0.0100",
   "timestamp":"2020-08-07 19:16:17.676+0300",
   "storage":"SYNC-API-2020-08",
   "route":"IP1",
   "processing_status":"COMPLETED",
   "error_code":null,
   "data_source":"LIVE_HLR"
}
```

A detailed documentation of the attributes and connectivity statuses in the HLR API response is [here](https://www.hlr-lookups.com/en/api-docs#post-hlr-lookup).

**Submitting a Number Type (NT) Lookup** ([NT API Docs](https://www.hlr-lookups.com/en/api-docs#post-nt-lookup))

```javascript
let response = await client.post('/nt-lookup', {number: '+4989702626'});

// The API returns an HTTP status code of 200 if the request was successfully processed. Let's have a look.
console.log('NT Lookup Status Code', response.status);
console.log('NT Lookup Response Body', response.data);

if (response.status !== 200) {
    console.log('Received non-OK status code from server.');
    return;
}

let data = response.data;
// do something with the data
```

The NT API Response Object:

```json
{
     "id":"2ed0788379c6",
     "number":"+4989702626",
     "number_type":"LANDLINE",
     "query_status":"OK",
     "is_valid":true,
     "invalid_reason":null,
     "is_possibly_ported":false,
     "is_vanity_number":false,
     "qualifies_for_hlr_lookup":false,
     "mccmnc":null,
     "mcc":null,
     "mnc":null,
     "original_network_name":null,
     "original_country_name":"Germany",
     "original_country_code":"DE",
     "regions":[
        "Munich"
     ],
     "timezones":[
        "Europe/Berlin"
     ],
     "info_text":"This is a landline number.",
     "cost":"0.0050",
     "timestamp":"2015-12-04 10:36:41.866283+00",
     "storage":"SYNC-API-NT-2015-12",
     "route":"LC1"
}
```

A detailed documentation of the attributes and connectivity statuses in the NT API response is [here](https://www.hlr-lookups.com/en/api-docs#post-nt-lookup).

**Submitting an MNP Lookup (Mobile Number Portability)** ([MNP API Docs](https://www.hlr-lookups.com/en/api-docs#post-mnp-lookup))

```javascript
let response = await client.post('/mnp-lookup', {msisdn: '+14156226819'});

// The API returns an HTTP status code of 200 if the request was successfully processed. Let's have a look.
console.log('MNP Lookup Status Code', response.status);
console.log('MNP Lookup Response Body', response.data);

if (response.status !== 200) {
    console.log('Received non-OK status code from server.');
    return;
}

let data = response.data;
// do something with the data
```

The MNP API Response Object:

```json
{
   "id":"e428acb1c0ae",
   "msisdn":"+14156226819",
   "query_status":"OK",
   "mccmnc":"310260",
   "mcc":"310",
   "mnc":"260",
   "is_ported":true,
   "original_network_name":"Verizon Wireless:6006 - SVR/2",
   "original_country_name":"United States",
   "original_country_code":"US",
   "original_country_prefix":"+1415",
   "ported_network_name":"T-Mobile US:6529 - SVR/2",
   "ported_country_name":"United States",
   "ported_country_code":"US",
   "ported_country_prefix":"+1",
   "extra":"LRN:4154250000",
   "cost":"0.0050",
   "timestamp":"2020-08-05 21:21:33.490+0300",
   "storage":"WEB-CLIENT-SOLO-MNP-2020-08",
   "route":"PTX",
   "error_code":null
}
```

A detailed documentation of the attributes and connectivity statuses in the MNP API response is [here](https://www.hlr-lookups.com/en/api-docs#post-mnp-lookup).

API Documentation
-----------------
Please inspect https://www.hlr-lookups.com/en/api-docs for detailed API documentation or email us at service@hlr-lookups.com.

Support and Feedback
--------------------
We appreciate your feedback! If you have specific problems or bugs with this SDK, please file an issue on Github. For general feedback and support requests, email us at service@hlr-lookups.com.

Contributing
------------

1. Fork it ( https://github.com/vmgltd/hlr-lookup-api-nodejs-sdk/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request


text:
     NAME
	  glStencilMask	- control the writing of individual bits in
	  the stencil planes

     C SPECIFICATION
	  void glStencilMask( GLuint mask )

     PARAMETERS
	  mask	Specifies a bit	mask to	enable and disable writing of
		individual bits	in the stencil planes.	Initially, the
		mask is	all 1's.

     DESCRIPTION
	  glStencilMask	controls the writing of	individual bits	in the
	  stencil planes.  The least significant n bits	of mask, where
	  n is the number of bits in the stencil buffer, specify a
	  mask.	 Where a 1 appears in the mask,	it's possible to write
	  to the corresponding bit in the stencil buffer.  Where a 0
	  appears, the corresponding bit is write-protected.
	  Initially, all bits are enabled for writing.

     ERRORS
	  GL_INVALID_OPERATION is generated if glStencilMask is
	  executed between the execution of glBegin and	the
	  corresponding	execution of glEnd.

     ASSOCIATED	GETS
	  glGet	with argument GL_STENCIL_WRITEMASK
	  glGet	with argument GL_STENCIL_BITS

     SEE ALSO
	  glColorMask, glDepthMask, glIndexMask, glStencilFunc,
	  glStencilOp


text:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:util="http://www.springframework.org/schema/util"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
         http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
         http://www.springframework.org/schema/util
         http://www.springframework.org/schema/util/spring-util-3.1.xsd">

    <util:list id="testList" value-type="java.lang.String">
        <value>one</value>
        <value>two</value>
        <value>three</value>
    </util:list>
</beans>


text:
This is an extension to allow using the [Eclipse Mosquitto™ MQTT client library](http://mosquitto.org) with PHP. See the `examples/` directory for usage.

[![Build Status](https://travis-ci.org/mgdm/Mosquitto-PHP.svg?branch=master)](https://travis-ci.org/mgdm/Mosquitto-PHP)

## PHP 7 support

Thanks to [Sara Golemon](https://twitter.com/SaraMG) this extension now supports PHP 7. I would be grateful if anyone using PHP 7 could test it and let me know how it works out.

## Requirements

* PHP 5.3+
* libmosquitto 1.2.x or later
* Linux or Mac OS X. I do not have a Windows machine handy, though patches or
  pull requests are of course very welcome!

## Installation

If you've used a pre-built package to install Mosquitto, you need to make sure you have the development headers installed. On Red Hat-derived systems, this is probably called `libmosquitto-devel`, and on Debian-based systems it will be `libmosquitto-dev`.

You may obtain this package using [PECL](http://pecl.php.net):

````
pecl install Mosquitto-alpha
````

Alternatively, you can use the normal extension build process:

````
phpize
./configure --with-mosquitto=/path/to/libmosquitto
make
make install
````

Then add `extension=mosquitto.so` to your `php.ini`.

The `--with-mosquitto` argument is optional, and only required if your
libmosquitto install cannot be found.

## General operation

The underlying library is based on callbacks and asynchronous operation. As such, you have to call the `loop()` method of the `Client` frequently to permit the library to handle the messages in its queues. Also, you should use the callback functions to ensure that you only attempt to publish after the client has connected, etc. For example, here is how you would correctly publish a QoS=2 message:

```php
<?php

use Mosquitto\Client;

$mid = 0;
$c = new Mosquitto\Client("PHP");
$c->onLog('var_dump');
$c->onConnect(function() use ($c, &$mid) {
    $mid = $c->publish("mgdm/test", "Hello", 2);
});

$c->onPublish(function($publishedId) use ($c, $mid) {
    if ($publishedId == $mid) {
        $c->disconnect();
    }
});

$c->connect("localhost");
$c->loopForever();

echo "Finished"
```

## Documentation

Full documentation is [available on ReadTheDocs](http://mosquitto-php.readthedocs.io/).


text:
package io.protostuff.generator.html.markdown;

import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.*;

class FlexmarkMarkdownProcessorTest {

    FlexmarkMarkdownProcessor processor;

    @BeforeEach
    void setUp() {
        processor = new FlexmarkMarkdownProcessor();
    }

    @Test
    @DisplayName("Simple text")
    void test() {
        assertThat(processor.toHtml("Hello, world"))
                .isEqualTo("
Hello, world
");
    }
}


text:
package org.apache.kafka.clients.consumer.internals;

/**
 * Listener interface to hook into RequestFuture completion.
 */
public interface RequestFutureListener<T> {

    void onSuccess(T value);

    void onFailure(RuntimeException e);
}


text:
namespace autoboost
{
namespace detail
{
namespace winapi
{
#if defined( AUTOBOOST_USE_WINDOWS_H )
    typedef ::FARPROC FARPROC_;
    typedef ::NEARPROC NEARPROC_;
    typedef ::PROC PROC_;

# ifdef AUTOBOOST_NO_ANSI_APIS
    using ::LoadLibraryW;
    using ::GetModuleHandleW;
# else
    using ::LoadLibraryA;
    using ::GetModuleHandleA;
# endif
    using ::FreeLibrary;
    using ::GetProcAddress;
#else
extern "C" {
# ifdef _WIN64
    typedef INT_PTR_ (WINAPI *FARPROC_)();
    typedef INT_PTR_ (WINAPI *NEARPROC_)();
    typedef INT_PTR_ (WINAPI *PROC_)();
# else
    typedef int (WINAPI *FARPROC_)();
    typedef int (WINAPI *NEARPROC_)();
    typedef int (WINAPI *PROC_)();
# endif // _WIN64

# ifdef AUTOBOOST_NO_ANSI_APIS
    __declspec(dllimport) HMODULE_ WINAPI
        LoadLibraryW(
            LPCWSTR_ lpFileName
    );
    __declspec(dllimport) HMODULE_ WINAPI
        GetModuleHandleW(
            LPCWSTR_ lpFileName
    );
# else
    __declspec(dllimport) HMODULE_ WINAPI
        LoadLibraryA(
            LPCSTR_ lpFileName
    );
    __declspec(dllimport) HMODULE_ WINAPI
        GetModuleHandleA(
            LPCSTR_ lpFileName
    );
# endif

    __declspec(dllimport) BOOL_ WINAPI
        FreeLibrary(
            HMODULE_ hModule
    );
    __declspec(dllimport) FARPROC_ WINAPI
        GetProcAddress(
            HMODULE_ hModule,
            LPCSTR_ lpProcName
    );
}
#endif
}
}
}

#endif // AUTOBOOST_DETAIL_WINAPI_DLL_HPP