text:
rexel today, the essentials

your company at a glance

              <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1"
                width="20" height="20" viewBox="0 0 20 20" overflow="visible" xml:space="preserve" class="ScreenLink-sign">
                <polygon fill="#ffffff" points="0,0 20,10 0,20 "/>
              </svg>

            what we do

            who we are

      fermer
      <video controls class="VideoPlayer-player" listen-stop-or-play>
        <source src="video/rexel-today.mp4" type="video/mp4">
        Votre navigateur ne gère pas cette vidéo.
      </video>

INFOGRAPHIE.TITLE

INFOGRAPHIE.ARTICLE_1.INTRO

                  INFOGRAPHIE.ARTICLE_1.CONTENU_1

                  INFOGRAPHIE.ARTICLE_1.CONTENU_2

INFOGRAPHIE.ARTICLE_1.ARROW_1.ITEM_1

INFOGRAPHIE.ARTICLE_1.ARROW_1.ITEM_2

INFOGRAPHIE.ARTICLE_1.ARROW_1.ITEM_3

INFOGRAPHIE.ARTICLE_1.ARROW_1.ITEM_4

INFOGRAPHIE.ARTICLE_1.ARROW_1.MAIN_ITEM

INFOGRAPHIE.ARTICLE_1.ARROW_1.ITEM_5

INFOGRAPHIE.ARTICLE_1.ARROW_1.ITEM_6

INFOGRAPHIE.ARTICLE_1.ARROW_1.ITEM_7

INFOGRAPHIE.ARTICLE_1.ARROW_1.ITEM_8

                      INFOGRAPHIE.ARTICLE_1.ARROW_2.ITEM_1

                      INFOGRAPHIE.ARTICLE_1.ARROW_2.ITEM_2

                      INFOGRAPHIE.ARTICLE_1.ARROW_2.ITEM_3

                      INFOGRAPHIE.ARTICLE_1.ARROW_2.ITEM_4

INFOGRAPHIE.ARTICLE_1.ARROW_3.ITEM_1

INFOGRAPHIE.ARTICLE_1.ARROW_3.ITEM_2

INFOGRAPHIE.ARTICLE_1.ARROW_3.ITEM_3

INFOGRAPHIE.ARTICLE_1.ARROW_4.ITEM_1

INFOGRAPHIE.ARTICLE_1.ARROW_4.ITEM_2

INFOGRAPHIE.ARTICLE_1.ARROW_4.ITEM_3

INFOGRAPHIE.ARTICLE_2.INTRO

                    INFOGRAPHIE.ARTICLE_2.LIST_1.ITEM_1

                    INFOGRAPHIE.ARTICLE_2.LIST_1.ITEM_2

                    INFOGRAPHIE.ARTICLE_2.LIST_1.ITEM_3

                    INFOGRAPHIE.ARTICLE_2.LIST_1.ITEM_4

                    INFOGRAPHIE.ARTICLE_2.LIST_1.ITEM_5

                    INFOGRAPHIE.ARTICLE_2.LIST_1.ITEM_6

                    INFOGRAPHIE.ARTICLE_2.LIST_1.ITEM_7

INFOGRAPHIE.ARTICLE_2.LIST_2.INTRO

                  INFOGRAPHIE.ARTICLE_2.LIST_2.ITEM_1

                  INFOGRAPHIE.ARTICLE_2.LIST_2.ITEM_2

                  INFOGRAPHIE.ARTICLE_2.LIST_2.ITEM_3

INFOGRAPHIE.ARTICLE_3.INTRO

INFOGRAPHIE.ARTICLE_3.LIST_1.ITEM_1

INFOGRAPHIE.ARTICLE_3.LIST_1.ITEM_2

INFOGRAPHIE.ARTICLE_3.LIST_1.ITEM_3

INFOGRAPHIE.ARTICLE_3.LIST_1.ITEM_4

INFOGRAPHIE.ARTICLE_3.LIST_1.ITEM_5

INFOGRAPHIE.ARTICLE_3.LIST_1.ITEM_6

INFOGRAPHIE.ARTICLE_3.LIST_1.ITEM_7

INFOGRAPHIE.ARTICLE_3.END

INFOGRAPHIE.ARTICLE_4.INTRO

                        INFOGRAPHIE.ARTICLE_4.LIST_1.ITEM_1

                        INFOGRAPHIE.ARTICLE_4.LIST_1.ITEM_2

                        INFOGRAPHIE.ARTICLE_4.LIST_1.ITEM_3

                        INFOGRAPHIE.ARTICLE_4.LIST_1.ITEM_4

INFOGRAPHIE.ARTICLE_4.LIST_2.INTRO

INFOGRAPHIE.ARTICLE_5.INTRO

                      0%

                      INFOGRAPHIE.ARTICLE_5.LIST_1.ITEM_1

                      0%

                      INFOGRAPHIE.ARTICLE_5.LIST_1.ITEM_2

                      0%

                      INFOGRAPHIE.ARTICLE_5.LIST_1.ITEM_3

INFOGRAPHIE.ARTICLE_5.INTRO_2

INFOGRAPHIE.ARTICLE_5.MIDDLE

INFOGRAPHIE.ARTICLE_5.LIST_2.ITEM_1

INFOGRAPHIE.ARTICLE_5.LIST_2.ITEM_2

INFOGRAPHIE.ARTICLE_5.LIST_2.ITEM_3

INFOGRAPHIE.ARTICLE_5.LIST_2.ITEM_4

INFOGRAPHIE.ARTICLE_5.LIST_2.ITEM_5

INFOGRAPHIE.ARTICLE_5.LIST_2.ITEM_6

INFOGRAPHIE.TITLE2

INFOGRAPHIE.ARTICLE_6.INTRO

                    INFOGRAPHIE.ARTICLE_6.LIST_1.CONTINENTS.EUROPE

                    55%

                    INFOGRAPHIE.ARTICLE_6.LIST_1.CONTINENTS.SALES

                    INFOGRAPHIE.ARTICLE_6.LIST_1.CONTINENTS.N-AMERICA

                    34%

                    INFOGRAPHIE.ARTICLE_6.LIST_1.CONTINENTS.SALES

                    INFOGRAPHIE.ARTICLE_6.LIST_1.CONTINENTS.ASIA

                    9%

                    INFOGRAPHIE.ARTICLE_6.LIST_1.CONTINENTS.SALES

                    INFOGRAPHIE.ARTICLE_6.LIST_1.CONTINENTS.L-AMERICA

                    2%

                    INFOGRAPHIE.ARTICLE_6.LIST_1.CONTINENTS.SALES

                  38
                  INFOGRAPHIE.ARTICLE_6.LIST_2.ITEM_1

                  40
                  INFOGRAPHIE.ARTICLE_6.LIST_2.ITEM_2

                  2,300
                  INFOGRAPHIE.ARTICLE_6.LIST_2.ITEM_3

                  135
                  INFOGRAPHIE.ARTICLE_6.LIST_2.ITEM_4

                  INFOGRAPHIE.ARTICLE_6.LIST_2.ITEM_5

                  INFOGRAPHIE.ARTICLE_6.LIST_2.ITEM_6
                  INFOGRAPHIE.ARTICLE_6.LIST_2.ITEM_6_BIS

                  INFOGRAPHIE.ARTICLE_6.LIST_2.ITEM_7
                  INFOGRAPHIE.ARTICLE_6.LIST_2.ITEM_7_BIS

                  INFOGRAPHIE.ARTICLE_6.LIST_2.ITEM_8
                  INFOGRAPHIE.ARTICLE_6.LIST_2.ITEM_8_BIS

                  INFOGRAPHIE.ARTICLE_6.LIST_2.ITEM_9
                  INFOGRAPHIE.ARTICLE_6.LIST_2.ITEM_9_BIS

INFOGRAPHIE.ARTICLE_6.LIST_2.TEXTE

INFOGRAPHIE.ARTICLE_7.INTRO

                    INFOGRAPHIE.ARTICLE_7.MANAGERS-1
                    INFOGRAPHIE.ARTICLE_7.MANAGERS-1-DATA

                    INFOGRAPHIE.ARTICLE_7.MANAGERS-2-DATA
                    INFOGRAPHIE.ARTICLE_7.MANAGERS-2

                      22.6%
                      INFOGRAPHIE.ARTICLE_7.DATA-1-TEXT

                      INFOGRAPHIE.ARTICLE_7.DATA-2
                      INFOGRAPHIE.ARTICLE_7.DATA-2-TEXT

                      INFOGRAPHIE.ARTICLE_7.DATA-3
                      INFOGRAPHIE.ARTICLE_7.DATA-3-TEXT

                        INFOGRAPHIE.ARTICLE_7.DATA-4
                        INFOGRAPHIE.ARTICLE_7.DATA-4-TEXT

                        INFOGRAPHIE.ARTICLE_7.DATA-5
                        INFOGRAPHIE.ARTICLE_7.DATA-5-TEXT

                        INFOGRAPHIE.ARTICLE_7.DATA-6
                        INFOGRAPHIE.ARTICLE_7.DATA-6-TEXT

INFOGRAPHIE.ARTICLE_8.INTRO

                  INFOGRAPHIE.ARTICLE_8.LIST_1.ITEM_1

                  INFOGRAPHIE.ARTICLE_8.LIST_1.ITEM_2

                  INFOGRAPHIE.ARTICLE_8.LIST_1.ITEM_3

                  INFOGRAPHIE.ARTICLE_8.LIST_1.ITEM_4

                  INFOGRAPHIE.ARTICLE_8.LIST_1.ITEM_5

                  INFOGRAPHIE.ARTICLE_8.LIST_2.ITEM_1

                    INFOGRAPHIE.ARTICLE_8.LIST_2.ITEM_1

INFOGRAPHIE.ARTICLE_9.INTRO

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_1

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_2

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_3

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_4

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_5

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_6

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_7

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_8

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_9

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_10

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_11

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_12

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_13

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_14

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_15

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_16

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_17

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_18

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_1

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_2

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_3

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_4

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_5

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_6

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_7

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_8

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_9

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_10

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_11

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_12

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_13

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_14

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_15

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_16

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_17

INFOGRAPHIE.ARTICLE_9.LIST_1.DATE_18


text:
cask 'alfred' do
  version '4.0.4_1111'
  sha256 '640e007b00606b30094972184d115fe8c8219f29d6617d700c63cce5624f30e9'

  url "https://cachefly.alfredapp.com/Alfred_#{version}.dmg"
  appcast "https://www.alfredapp.com/app/update#{version.major}/general.xml"
  name 'Alfred'
  homepage 'https://www.alfredapp.com/'

  auto_updates true

  app "Alfred #{version.major}.app"

  uninstall quit: 'com.runningwithcrayons.Alfred'

  zap trash: [
               '~/Library/Application Support/Alfred',
               '~/Library/Caches/com.runningwithcrayons.Alfred',
               '~/Library/Preferences/com.runningwithcrayons.Alfred.plist',
               '~/Library/Preferences/com.runningwithcrayons.Alfred-Preferences.plist',
               '~/Library/Saved Application State/com.runningwithcrayons.Alfred-Preferences.savedState',
             ]
end

redpajama_set_name: RedPajamaGithub


text:
package cgi

import (
	"os"
	"strconv"
	"testing"
)

func isProcessRunning(t *testing.T, pid int) bool {
	_, err := os.Stat("/proc/" + strconv.Itoa(pid))
	return err == nil
}


text:
function formatDate(d) {
    var date = new Date(d);
    var year = date.getFullYear();
    var month = ('0' + (date.getMonth() + 1)).slice(-2);
    var day = ('0' + date.getDate()).slice(-2);
    var hour = ('0' + date.getHours()).slice(-2);
    var minute = ('0' + date.getMinutes()).slice(-2);
    return year + '-' + month + '-' + day + ' ' + hour + ':' + minute;
}

/*
 This method returns the most significant results of the resultset.
 "significantRecordCount" is the number of most significant results to be returned.
 The rest, if any, will be aggregated under the name "groupName".
 */
function getShrinkedResultset(resultset, significantRecordCount, groupName) {
    var shrinkedResultset;
    var total = 0;
    var percentage = 0;
    var i;

    if (significantRecordCount >= resultset.length) {
        return resultset;
    }

    shrinkedResultset = resultset.slice(0, significantRecordCount);

    for (i = significantRecordCount; i < resultset.length; i++) {
        total = total + resultset[i]['request_count'];
        percentage = percentage + resultset[i]['percentage_request_count'];
    }

    shrinkedResultset.push({
        'request_count': total,
        'percentage_request_count': percentage.toFixed(2),
        'name': groupName
    });
    return shrinkedResultset;
}

/*
 This method returns the dataset to suit to be displayed in a datatable.
 */
function getTabularData(dataSet, columns, sortColumn) {
    var i, len;
    var key;
    var dataArray = [];
    var row;
    if (dataSet == null) {
        return;
    }

    for (i = 0, len = dataSet.length; i < len; i++) {
        row = [];
        for (key in dataSet[i]) {
            if (dataSet[i].hasOwnProperty(key)) {
                row.push(dataSet[i][key]);
            }
        }
        dataArray.push(row);
    }
    return {'data': dataArray, 'headings': columns, 'orderColumn': [sortColumn, 'desc']};
}

function parseDate(input) {
    var parts;
    if (!input) {
        return;
    }
    var p = input.split(' ');
    input = p[0];
    parts = input.split('-');

    // new Date(year, month [, day [, hours[, minutes[, seconds[, ms]]]]])
    return new Date(parts[0], parts[1] - 1, parts[2]); // Note: months are 0-based
}


text:
struct BuildingGroup
{
	string id;
	vector<Building*> buildings;

	// Hardcoded building groups
	static BuildingGroup* BG_INN;
	static BuildingGroup* BG_HALL;
	static BuildingGroup* BG_TRAINING_GROUNDS;
	static BuildingGroup* BG_ARENA;
	static BuildingGroup* BG_FOOD_SELLER;
	static BuildingGroup* BG_ALCHEMIST;
	static BuildingGroup* BG_BLACKSMITH;
	static BuildingGroup* BG_MERCHANT;

	static vector<BuildingGroup*> groups;
	static BuildingGroup* TryGet(Cstring id);
	static BuildingGroup* Get(Cstring id)
	{
		auto group = TryGet(id);
		assert(group);
		return group;
	}
};


text:
<?php
error_reporting(error_reporting() & ~E_NOTICE);
include('/var/www4/BigInteger.php');
$config = include('../../config.php');
$m = new Memcached();
$m->addServer('localhost', 11211);

if (isset($_SERVER["HTTP_CF_CONNECTING_IP"])) {
  $_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_CF_CONNECTING_IP"];
}

$real_visitor_ip = $_SERVER["REMOTE_ADDR"];
$real_visitor_ip_mem = $m->get($real_visitor_ip);
if (!$real_visitor_ip_mem) {
    $m->set($real_visitor_ip,'true',1);
} else{
   die('too many request from your ip to this endpoint');
}

$ether_wei = 1000000000000000000;
$cacheTime = 5;
$avg_stats = 4;

  $mysqli=mysqli_connect($config['host'], $config['username'], $config['password'], $config['bdd']) or die("Database Error");
  $task = "SELECT count(1) FROM blocks";
  $response = mysqli_query($mysqli,$task)or die("Database Error");
  $row = mysqli_fetch_row($response);
  $minedblocks = $row[0];

  $result = mysqli_query($mysqli,"select count(1) FROM shares");
  $sharesCount = mysqli_fetch_array($result);
  $sharesCountTotal = $sharesCount[0];

  $data = array("jsonrpc" => "2.0", "method" => "eth_accounts", "params" => [], "id" => 64);
  $data_string = json_encode($data);
  $ch1 = curl_init('http://127.0.0.1:8983');
  curl_setopt($ch1, CURLOPT_CUSTOMREQUEST, "POST");
  curl_setopt($ch1, CURLOPT_POSTFIELDS, $data_string);
  curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch1, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data_string))
  );
    $result1 = curl_exec($ch1);

  $block_info_last = json_decode($result1, true);
  $addrr = $block_info_last['result'];

$ch1 = curl_init('http://api.etherscan.io/api?module=account&action=balance&address='.$addrr[0].'&tag=latest');
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
$result3 = curl_exec($ch1);

if (!$result3) {
  $data = array("jsonrpc" => "2.0", "method" => "eth_getBalance", "params" => [$addrr[0],'latest'], "id" => 1);
  $data_string = json_encode($data);
  $ch1 = curl_init('http://127.0.0.1:8983');
  curl_setopt($ch1, CURLOPT_CUSTOMREQUEST, "POST");
  curl_setopt($ch1, CURLOPT_POSTFIELDS, $data_string);
  curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch1, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data_string))
  );
  $result3 = curl_exec($ch1);
    $block_info_last = json_decode($result3, true);
    $escapeDot = explode('.', sprintf('%f', hexdec($block_info_last['result'])));
    $balanceaddr = new Math_BigInteger($escapeDot[0]);
  } else {
    $block_info_last = json_decode($result3, true);
    $balanceaddr = new Math_BigInteger($block_info_last['result']);
  }

  $ether = floatval($balanceaddr->toString())/$ether_wei;

  $data = array("jsonrpc" => "2.0", "method" => "eth_getBlockByNumber", "params" => ["latest", true], "id" => "1");
  $data_string = json_encode($data);
  $ch1 = curl_init('http://127.0.0.1:8983');
  curl_setopt($ch1, CURLOPT_CUSTOMREQUEST, "POST");
  curl_setopt($ch1, CURLOPT_POSTFIELDS, $data_string);
  curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch1, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data_string))
  );
  $result1 = curl_exec($ch1);
  $block_info_last = json_decode($result1, true);
  $block_info_lasdsdst = $block_info_last['result'];
  $blockstamp = hexdec($block_info_lasdsdst['timestamp']);
  $data = array("jsonrpc" => "2.0", "method" => "eth_getBalance", "params" => [$block_info_last['miner'],'latest'], "id" => 1);
  $data_string = json_encode($data);
  $ch1 = curl_init('http://127.0.0.1:8983');
  curl_setopt($ch1, CURLOPT_CUSTOMREQUEST, "POST");
  curl_setopt($ch1, CURLOPT_POSTFIELDS, $data_string);
  curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch1, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data_string))
  );
  $result3 = curl_exec($ch1);

  $block_info_last = json_decode($result3, true);
  $balanceaddr22 = $block_info_last['result'];

$existQuery = "SELECT userid,hashrate,val_timestamp,user FROM stats ORDER BY id DESC LIMIT 2000;";
$existResult = mysqli_query($mysqli,$existQuery)or die("Database Error");
$workers_count=0;
$hashrate_real = 0;
$hashrate_est = 0;
$miner_payouts = array();
$miner_payouts_checker = array();
while ($row=mysqli_fetch_row($existResult)){
    $cur_time = time();
    $difference = $cur_time - $row[2];
    if ($difference < 120) {
        $newArr = array($row[0],$row[1]);
        $workers_count++;
        $user_userid = $row[0].$row[3];
        $miner_adr = $row[3];
        if (!isset($miner_payouts["'$miner_adr'"])) {
            $miner_payouts["'$miner_adr'"] = $row[1];
            $miner_payouts_checker["'$user_userid'"] = $user_userid;
            $hashrate_real = $hashrate_real + $row[1];
            $hashrate_est = $hashrate_est + $row[0];
        } else {
            if (!isset($miner_payouts_checker["'$user_userid'"])) {
              $miner_hashrate_fix = $miner_payouts["'$miner_adr'"] + $row[1];
              $miner_payouts["'$miner_adr'"] = $miner_hashrate_fix;
              $miner_payouts_checker["'$user_userid'"] = $user_userid;
              $hashrate_real = $hashrate_real + $row[1];
              $hashrate_est = $hashrate_est + $row[0];
            } else {
              //already been
            }
        }
    }
}
foreach ($miner_payouts as $key => $value) {
  $key = str_replace('"', '', $key);
  $key = str_replace("'", '', $key);
  $value = $value;
  $mhash_rl_temp = number_format((float)$value/1000000, 2, '.', '');
  $activeminers = $activeminers.'
    '.$key.' running at:'.$mhash_rl_temp.' MHash';
  $minerCount++;
}

echo '<!DOCTYPE html>

    <title>Statistics</title>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Ethereumpool is stable, transparent and fair mining pool with low fee and great support! Just switch your rig to us, and see it on yourself :)">
    <meta name="author" content="eth">
    <meta property="og:type"               content="website" />
    <meta property="og:title"              content="Ethereum Mining Pool"/>
    <meta property="og:description"        content="Ethereumpool is stable, transparent and fair mining pool with low fee and great support! Just switch your rig to us, and see it on yourself :)"/>
    <link rel="shortcut icon" href="../favicon.ico">
    <meta name="keywords" content="eth,gpu,mining,mine,ethereum,calculator,profitability,profit,how,to,ether,ethers">
    <link href="http://fonts.googleapis.com/css?family=Merriweather+Sans:700,300italic,400italic,700italic,300,400" rel="stylesheet" type="text/css">
    <link href="http://fonts.googleapis.com/css?family=Russo+One" rel="stylesheet" type="text/css">
    <link href="http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">

    <link rel="stylesheet" href="../assets/plugins/bootstrap/css/bootstrap.min.css">

    <link rel="stylesheet" href="../assets/plugins/font-awesome/css/font-awesome.css">
    <link rel="stylesheet" href="../assets/plugins/elegant_font/css/style.css">

    <link id="theme-style" rel="stylesheet" href="../assets/css/styles-2.css">

                    Ethereumpool

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

                        </button>

Home

Stats

Charts

Miner Stats

How to Mine?

Support

Statistics

            <form id="contact-form" class="contact-form form" method="post" action="push.php">

';

    $hashrate_real = $hashrate_real;
    $mhash_rl = number_format((float)$hashrate_real/1000000, 2, '.', '');
    $mhash_rl_g = number_format((float)$hashrate_real/1000000000, 2, '.', '');
    $ether_in_wei = str_replace('.', '', $ether);

    echo '';
    echo '

'.$mhash_rl.' MHash/s

'.$mhash_rl_g.' GHash/s

';
    echo '

'.$ether.' ethers

'.$ether_in_wei.' wei

';
    echo '

'.$addrr[0].'

http://etherscan.io/address/'.$addrr[0].'

';
    echo '

'.$sharesCountTotal.'

Shares submited since last block: '.$sharesCountTotal.'

';
    echo '

'.$minedblocks.'

Mined blocks and uncles: '.$minedblocks.'

';
    echo '

'.$minerCount.'

Active Miners: '.$minerCount.'

';
    echo '

'.intval($workers_count/$avg_stats).'

Active Workers: '.intval($workers_count/$avg_stats).'

';

    echo '';

  echo '
    Active miners:';
  echo $activeminers;
  echo '

Mined Blocks / Uncles (last 50):
';
  $existQuery = "SELECT blockid FROM blocks ORDER BY id DESC LIMIT 50;";
  $existResultMinersss = mysqli_query($mysqli,$existQuery)or die("Database Error");
  while ($row=mysqli_fetch_row($existResultMinersss)){
      echo ''.$row[0].', ';
      $xd++;
      if ($xd == 9) {
        echo '
';
        $xd = 0;
      }
  }

  echo '

            </form>

Quick Links

Home

Pool statistics

Charts

Miner statistics

How to start mine?

Forum threads

Support

';

?>


text:
package com.jukusoft.rpgcreator.server.common.user;

import com.jukusoft.rpgcreator.server.common.user.User;

/**
 * Created by Justin on 26.06.2017.
 */
public interface UserManager {

    /**
    * find user by username
     *
     * @return instance of user or null, if user doesnt exists
    */
    public User findUserByName (String username);

    /**
     * find user by username
     *
     * @return instance of user or null, if user doesnt exists
     */
    public User findUserByMail (String mail);

    /**
    * count all registered users
    */
    public int countRegisteredUsers ();

    /**
    * count all online users
    */
    public int countOnlineUsers ();

}


text:
package com.foo.bar;

import _com._foo._bar.ClassB;

import static _com._foo._bar.ClassB.InnerClassB.staticApi;

public class ClassD extends ClassB {
    private InnerClassB innerClassB;

    public void doNothing() {
        staticApi();
    }
}


text:
<?php

/**
 * nocache actions.
 *
 * @package    project
 * @subpackage nocache
 * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
 * @version    SVN: $Id: actions.class.php 2288 2006-10-02 15:22:13Z fabien $
 */
class nocacheActions extends sfActions
{
  /**
   * Executes index action
   *
   */
  public function executeIndex()
  {
  }
}


text:
var express = require('express');
var app = express();
var path = require('path');

app.get('/', function(req, res){
    res.sendFile(path.join(__dirname + '/index.html'));
});

app.listen(1337);

var routes = require('./Routes/Routes.js') (app);

console.log('Ready on 1337');


text:
import {NgModule} from '@angular/core';
import {SharedModule} from '../shared/shared.module';

import {AddressForm} from './address-form';

@NgModule({
  imports: [SharedModule],
  declarations: [AddressForm],
})
export class AddressFormModule {}


text:
<!DOCTYPE html>

        <meta charset="UTF-8">
        <title></title>
        <?php echo link_tag('web/css/EstiloGeral.css'); ?>

Preencha todas as informações.

Erro ao gravar as informações.

Tente novamente mais tarde ou entre em contato com o administrador.


text:
This is a abstraction in golang to Hipchat's implementation of XMPP. It communicates over
TLS and requires zero knowledge of XML or the XMPP protocol.

* Examples [available here][1]
* Documentation [available here][2]

### bot building

Hipchat treats the "bot" resource differently from any other resource connected to their service. When connecting to Hipchat with a resource of "bot", a chat history will not be sent. Any other resource will receive a chat history.

### example/hello.go

```go
package main

import (
	"github.com/daneharrigan/hipchat"
)

func main() {
	user := "11111_22222"
	pass := "secret"
	resource := "bot"
	roomJid := "11111_room_name@conf.hipchat.com"
	fullName := "Some Bot"

	client, err := hipchat.NewClient(user, pass, resource)
	if err != nil {
		fmt.Printf("client error: %s\n", err)
		return
	}

	client.Status("chat")
	client.Join(roomJid, fullName)
	client.Say(roomJid, fullName, "Hello")
	select {}
}
```

[1]: https://github.com/daneharrigan/hipchat/tree/master/example
[2]: http://godoc.org/github.com/daneharrigan/hipchat


text:
class empty_while_statement {
  public static void main(String[] args) {
    System.out.println(new empty_while_statement().test(1));
    System.out.println(new empty_while_statement().test(2));
  }
  public int test(int i) {
    while ((i = i - 1) == 0)
      ;
    while (i == 0)
      return 1;
    return 0;
  }
}


text:
"""
Add new servername entries to an existing run

CSV formats

   index, hostname, port, protocol
   index, hostname, port			# HTTPS assumed
   index, hostname  				# Port 443, HTTPS assumed; line starts with number
   hostname, port					# HTTPS assumed; line starts with letter; port may be empty

Options:

--input	<name>	: CSV File containing a list of hosts
--count <num>	: Only configure max <num> servers from the source

--run-id <num>	: add the new entries to this job

--verbose		: Print more information

--testbase2		: use the debug test database for this job

--threads <num>	: Use the specified number of threads when inserting the entries for the job

"""

from optparse import OptionParser
import probedb.standalone
import probedb.cluster.models as Cluster
import probedb.probedata2.models as Probe
import probedb.resultdb2.models as Results
import fileinput
from django.db import connection, transaction
import datetime
import threading
from multiprocessing import Process, JoinableQueue as Queue, Lock

def __ProgressCounter(run, queue, threads, options):
	i=0
	while True:
		queue.get()

		i += 1
		if i%100 == 0:
			if options.verbose:
				print "Queued ", i, "servers so far. Threads active ", sum([t.is_alive() for t in threads])

		queue.task_done()

def SetupQueueThread(tid, run, probe_servers, progress_queue, ):
	connection.close()
	try:
		while True:
			item = probe_servers.get()

			if isinstance(item, int):
				try:
					item = Probe.Server.objects.get(id=item)
				except:
					probe_servers.task_done()
					continue

				hostname = item.servername.strip()
				if (not hostname or
						any([x in hostname for x in " \t%/&#\"'\\{[]}()*,;<>$"]) or
						any([ord(x)>=128 or ord(x)<=32  for x in hostname])):
					item.enabled = False
					item.save()
					probe_servers.task_done()
					continue

				hostname = hostname.strip(".")
				while hostname.find("..")>=0:
					hostname = hostname.replace("..", ".")

				if hostname != item.servername:
					item.enabled = False
					item.save()
					item = "0," + hostname+","+str(item.port) # Convert to string to correct the list

			if not isinstance(item, Probe.Server):
				hostname_line = item

				if not hostname_line.strip():
					probe_servers.task_done()
					continue

				split_line = hostname_line.strip().split(",")

				if len(split_line) > 2:
					(index, hostname, port) = split_line[:3]
				else:
					port = ""
					(var1, var2) = split_line
					if var1.isdigit():
						(index, hostname) = (var1, var2)
					else:
						(hostname, port) =  (var1, var2)

				hostname = hostname.strip()
				if (not hostname or
						any([x in hostname for x in " \t%/&#\"'\\{[]}()*,;<>$"]) or
						any([ord(x)>=128 or ord(x)<=32  for x in hostname])):
					probe_servers.task_done()
					continue

				hostname = hostname.strip(".")
				while hostname.find("..")>=0:
					hostname = hostname.replace("..", ".")

				if not port:
					port = 443
				else:
					port = int(port)

				sn_t = "%s:%05d" % (hostname, port)
				(item, created) = Probe.Server.objects.get_or_create(
									full_servername = sn_t,
									defaults={'enabled':True,
											"alexa_rating":0,
											"servername":hostname,
											"port": port,
											}
									)

				if created:
					item.Construct()

			if item.enabled:
				try:
					sid = transaction.savepoint()
					run_entry = Probe.ProbeQueue.objects.create(part_of_run=run,server=item,state=Probe.ProbeQueue.PROBEQ_IDLE)
					transaction.savepoint_commit(sid)
					progress_queue.put(True)
				except:
					transaction.savepoint_rollback(sid)
					pass

			probe_servers.task_done()
	except:
		pass

def setup_queue(options):
	probe_servers = Queue()
	progress_queue = Queue()

	run = Probe.ProbeRun.objects.get(id = options.run_id)

	summary_top = Results.ResultSummaryList.objects.get(part_of_run=run)
	summary_top.setup()

	connection.close()

	threads = []
	for i in range(options.threads):
		new_thread = Process(target=SetupQueueThread, args=(i,run, probe_servers, progress_queue))
		new_thread.daemon = True
		new_thread.start()
		threads.append(new_thread)

	progress_thread = threading.Thread(target=__ProgressCounter, args=(run,  progress_queue, threads,options))
	progress_thread.daemon = True
	progress_thread.start()

	i = 0;
	if options.input_filename and (not options.count or i < options.count):
		for hostname_line in fileinput.input(options.input_filename, openhook=fileinput.hook_compressed):
			probe_servers.put(hostname_line)
			i+=1
			if options.count and i >= options.count:
				break;

	probe_servers.join()
	progress_queue.join()

	return run

def main():
	options_config = OptionParser()

	options_config.add_option("--input", action="store", type="string", dest="input_filename", default="testlist.csv")
	options_config.add_option("--testbase2", action="store_true", dest="use_testbase2")
	options_config.add_option("--threads", action="store", type="int", dest="threads", default=30)
	options_config.add_option("--verbose", action="store_true", dest="verbose")
	options_config.add_option("--count", action="store", type="int", dest="count", default=0)
	options_config.add_option("--run-id", action="store", type="int", dest="run_id", default=0)

	(options, args) = options_config.parse_args()

	started = datetime.datetime.now()

	run = setup_queue(options)

	if options.verbose:
		print "Run %d for %s/%s has been updated with more items. Total %d items" %(run.id, run.source_name, run.description, Probe.ProbeQueue.objects.filter(part_of_run=run).count())

	ended = datetime.datetime.now()

	if options.verbose:
		print "Time to run: ", (ended-started)

if __name__ == "__main__":
	main()


text:
Inspired by [Spectrum](https://github.com/bgrins/spectrum) colorpicker, Symbolic is a jQuery plugin that provides a way to select a character from a set of characters presented on a palette.

[Symbolic](https://github.com/AlekseiS/symbolic) gives a nice way to create a palette of smileys, emojis, special symbols or just plain characters and ask the user to pick one of them. See [demo/index.html](https://github.com/AlekseiS/symbolic/blob/master/demo/index.html) for a smileys example.

The plugin supports "show", "hide", "toggle", "get", "set" methods. Initial markup is customizable via plugin settings. Appearance is customizeable via CSS.

## Usage

1. Include jQuery and Symbolic's code along with styles:

    ```html
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
    <script src="dist/js/symbolic.min.js"></script>
    <link href="dist/css/symbolic.min.css" rel="stylesheet">
    ```

2. Add a div container where Symbolic will be attached:

    ```html
    <div id="element"></div>
    ```

3. Attach Symbolic to the container and provide a symbol palette you want:

    ```javascript
    $("#element").symbolic({
        palette: [
            ["😂", "😅", "😄"],
            ["😏", "😆", "😀"]
        ]
    });
    ```
4. You can add a handler for "selected.symbolic" event which will fire when a user picks an element:

    ```javascript
    $("#element").on("selected.symbolic", function(e, value){
        console.log("User selected:", value);
    });
    ```

## Demo
See [demo/index.html](https://github.com/AlekseiS/symbolic/blob/master/demo/index.html) for a complete example demonstrating initial setup, handling "selected.symbolic" event and using "set" method.

## License
MIT license. See [LICENSE](https://github/AlekseiS/symbolic/LICENSE) file for more information.


text:
const { runAndGetProcess, processKill } = require("../../utils/test-utils");

describe("--watch-options-stdin", () => {
  it('should stop the process when stdin ends using "--watch" and "--watch-options-stdin" options', (done) => {
    const proc = runAndGetProcess(__dirname, ["--watch", "--watch-options-stdin"]);

    let semaphore = false;

    proc.on("exit", () => {
      expect(semaphore).toBe(true);

      processKill(proc);

      done();
    });

    proc.stdin.end(() => {
      semaphore = true;
    });
  });

  it('should stop the process when stdin ends using the "watch" command and the "--watch-options-stdin" option', (done) => {
    const proc = runAndGetProcess(__dirname, ["watch", "--watch-options-stdin"]);

    let semaphore = false;

    proc.on("exit", () => {
      expect(semaphore).toBe(true);

      processKill(proc);

      done();
    });

    proc.stdin.end(() => {
      semaphore = true;
    });
  });

  it("should stop the process when stdin ends using the config file", (done) => {
    const proc = runAndGetProcess(__dirname, ["--config", "./watch.config.js"]);

    let semaphore = false;

    proc.on("exit", () => {
      expect(semaphore).toBe(true);

      processKill(proc);

      done();
    });

    proc.stdin.end(() => {
      semaphore = true;
    });
  });

  it("should stop the process when stdin ends using the config file in multi compiler mode", (done) => {
    const proc = runAndGetProcess(__dirname, ["--config", "./multi-watch.config.js"]);

    let semaphore = false;

    proc.on("exit", () => {
      expect(semaphore).toBe(true);

      processKill(proc);

      done();
    });

    proc.stdin.end(() => {
      semaphore = true;
    });
  });

  it('should stop the process when stdin ends using the "serve" command and the "--watch-options-stdin" option', (done) => {
    const proc = runAndGetProcess(__dirname, ["serve", "--watch-options-stdin"]);

    let semaphore = false;

    proc.on("exit", () => {
      expect(semaphore).toBe(true);
      processKill(proc);
      done();
    });

    proc.stdin.end(() => {
      semaphore = true;
    });
  });

  it('should stop the process when stdin ends using the "serve" command and the "--stdin" option', (done) => {
    const proc = runAndGetProcess(__dirname, ["serve", "--stdin"]);

    let semaphore = false;

    proc.on("exit", () => {
      expect(semaphore).toBe(true);
      processKill(proc);
      done();
    });

    proc.stdin.end(() => {
      semaphore = true;
    });
  });

  it('should stop the process when stdin ends using the "serve" command and configuration', (done) => {
    const proc = runAndGetProcess(__dirname, ["serve", "--config", "./serve.config.js"]);

    let semaphore = false;

    proc.on("exit", () => {
      expect(semaphore).toBe(true);
      processKill(proc);
      done();
    });

    proc.stdin.end(() => {
      semaphore = true;
    });
  });

  it('should stop the process when stdin ends using the "serve" command and the config file in multi compiler mode', (done) => {
    const proc = runAndGetProcess(__dirname, ["--config", "./multi-watch.config.js"]);

    let semaphore = false;

    proc.on("exit", () => {
      expect(semaphore).toBe(true);

      processKill(proc);

      done();
    });

    proc.stdin.end(() => {
      semaphore = true;
    });
  });
});


text:
/**
 *      @file IRecorder.h
 *
 *      @brief Header file for IRecorder.h
 */
//! An interface for recording spikes history

/**
 ** \class IRecorder IRecorder.h "IRecorder.h"
 **
 ** \latexonly  \subsubsection*{Implementation} \endlatexonly
 ** \htmlonly
Implementation
 \endhtmlonly
 **
 ** The IRecorder provides an interface for recording spikes history.
 **
 ** \latexonly  \subsubsection*{Credits} \endlatexonly
 ** \htmlonly
Credits
 \endhtmlonly
 **
 ** Some models in this simulator is a rewrite of CSIM (2006) and other
 ** work (Stiber and Kawasaki (2007?))
 **
 **
 **     @author Fumitaka Kawasaki
 **/

#pragma once

#ifndef _IRECORDER_H_
#define _IRECORDER_H_

#include "Global.h"
#include "SimulationInfo.h"
#include "AllSpikingNeurons.h"

class IRecorder
{
public:
    virtual ~IRecorder() {}

    /**
     * Initialize data
     *
     * @param[in] stateOutputFileName       File name to save histories
     */
    virtual void init(const string& stateOutputFileName) = 0;

    /**
     * Init radii and rates history matrices with default values
     */
    virtual void initDefaultValues() = 0;

    /**
     * Init radii and rates history matrices with current radii and rates
     */
    virtual void initValues() = 0;

    /**
     * Get the current radii and rates vlaues
     */
    virtual void getValues() = 0;

    /**
     * Terminate process
     */
    virtual void term() = 0;

    /**
     * Compile history information in every epoch
     *
     * @param[in] vtClr      Vector of pointer to the Cluster object.
     * @param[in] vtClrInfo  Vecttor of pointer to the ClusterInfo object.
     */
    virtual void compileHistories(vector<Cluster *> &vtClr, vector<ClusterInfo *> &vtClrInfo) = 0;

    /**
     * Writes simulation results to an output destination.
     *
     * @param[in] vtClr      Vector of pointer to the Cluster object.
     * @param[in] vtClrInfo  Vecttor of pointer to the ClusterInfo object.
     **/
    virtual void saveSimData(vector<Cluster *> &vtClr, vector<ClusterInfo *> &vtClrInfo) = 0;
};

#endif // _IRECORDER_H_


text:
<?php

namespace Libreame\BackendBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * LbEjemplares
 *
 * @ORM\Table(name="lb_ejemplares", indexes={@ORM\Index(name="fk_lb_ejemplares_lb_usuarios1_idx", columns={"inEjeUsuDueno"}), @ORM\Index(name="fk_lb_ejemplares_lb_libros1_idx", columns={"inEjeLibro"})})
 * @ORM\Entity
 */
class LbEjemplares
{
    /**
     * @var integer
     *
     * @ORM\Column(name="inEjemplar", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $inejemplar;

    /**
     * @var integer
     *
     * @ORM\Column(name="inEjeCantidad", type="integer", nullable=false)
     */
    private $inejecantidad = 1;

    /**
     * @var float
     *
     * @ORM\Column(name="dbEjeAvaluo", type="float", precision=10, scale=0, nullable=false)
     */
    private $dbejeavaluo = 0;

    /**
     * @var string
     *
     * @ORM\Column(name="txEjeImagen", type="text", nullable=false)
     */
    private $txejeimagen;

    /**
     * @var integer
     *
     * @ORM\Column(name="inEjePuntos", type="integer", nullable=false)
     */
    private $inejepuntos = 0;

    /**
     * @var integer
     *
     * @ORM\Column(name="inEjePublicado", type="integer", nullable=false)
     */
    private $inejepublicado = 0;

    /**
     * @var integer
     *
     * @ORM\Column(name="inEjeBloqueado", type="integer", nullable=false)
     */
    private $inejebloqueado = 0;

    /**
     * @var integer
     *
     * @ORM\Column(name="inEjeEstado", type="integer", nullable=false)
     */
    private $inejeestado = 1;

    /**
     * @var integer
     *
     * @ORM\Column(name="inEjeCondicion", type="integer", nullable=false)
     */
    private $inejecondicion = 1;

    /**
     * @var integer
     *
     * @ORM\Column(name="inEjeSoloventa", type="integer", nullable=false)
     */
    private $inejesoloventa = 0;

    /**
     * @var \Libreame\BackendBundle\Entity\LbLibros
     *
     * @ORM\ManyToOne(targetEntity="Libreame\BackendBundle\Entity\LbLibros")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="inEjeLibro", referencedColumnName="inLibro")
     * })
     */
    private $inejelibro;

    /**
     * @var \Libreame\BackendBundle\Entity\LbUsuarios
     *
     * @ORM\ManyToOne(targetEntity="Libreame\BackendBundle\Entity\LbUsuarios")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="inEjeUsuDueno", referencedColumnName="inUsuario")
     * })
     */
    private $inejeusudueno;
    /**
     * @var integer
     *
     * @ORM\Column(name="inEjeEstadoNegocio", type="integer", nullable=false)
     */
    private $inejeestadonegocio = 0;
    /**
     * @var integer
     *
     * @ORM\Column(name="inEjeRegHisBloqueo", type="integer", nullable=false)
     */
    private $inejereghisbloqueo = 0;
    /**
     * @var integer
     *
     * @ORM\Column(name="inEjeRegHisPublicacion", type="integer", nullable=false)
     */
    private $inejereghispublicacion = 0;
    /**
     * @var integer
     *
     * @ORM\Column(name="inEjeRegHisBajaSis", type="integer", nullable=false)
     */
    private $inejereghisbajasis = 0;
    /**
     * @var integer
     *
     * @ORM\Column(name="inEjeRegHisAprobDueno", type="integer", nullable=false)
     */
    private $inejereghisaprobdueno = 0;
    /**
     * @var integer
     *
     * @ORM\Column(name="inEjeRegHisAprobSolic", type="integer", nullable=false)
     */
    private $inejereghisaprobsolic = 0;
    /**
     * @var integer
     *
     * @ORM\Column(name="inEjeRegHisEntrega", type="integer", nullable=false)
     */
    private $inejereghisentrega = 0;
    /**
     * @var integer
     *
     * @ORM\Column(name="inEjeRegHisRecibido", type="integer", nullable=false)
     */
    private $inejereghisrecibido = 0;

    /**
     * Get inejemplar
     *
     * @return integer
     */
    public function getInejemplar()
    {
        return $this->inejemplar;
    }

    /**
     * Set inejecantidad
     *
     * @param integer $inejecantidad
     * @return LbEjemplares
     */
    public function setInejecantidad($inejecantidad)
    {
        $this->inejecantidad = $inejecantidad;

        return $this;
    }

    /**
     * Get inejecantidad
     *
     * @return integer
     */
    public function getInejecantidad()
    {
        return $this->inejecantidad;
    }

    /**
     * Set dbejeavaluo
     *
     * @param float $dbejeavaluo
     * @return LbEjemplares
     */
    public function setDbejeavaluo($dbejeavaluo)
    {
        $this->dbejeavaluo = $dbejeavaluo;

        return $this;
    }

    /**
     * Get dbejeavaluo
     *
     * @return float
     */
    public function getDbejeavaluo()
    {
        return $this->dbejeavaluo;
    }

    /**
     * Set txejeimagen
     *
     * @param string $txejeimagen
     * @return LbEjemplares
     */
    public function setTxejeimagen($txejeimagen)
    {
        $this->txejeimagen = $txejeimagen;

        return $this;
    }

    /**
     * Get txejeimagen
     *
     * @return string
     */
    public function getTxejeimagen()
    {
        return $this->txejeimagen;
    }

    /**
     * Set inejepuntos
     *
     * @param integer $inejepuntos
     * @return LbEjemplares
     */
    public function setInejepuntos($inejepuntos)
    {
        $this->inejepuntos = $inejepuntos;

        return $this;
    }

    /**
     * Get inejepuntos
     *
     * @return integer
     */
    public function getInejepuntos()
    {
        return $this->inejepuntos;
    }

    /**
     * Set inejepublicado
     *
     * @param integer $inejepublicado
     * @return LbEjemplares
     */
    public function setInejepublicado($inejepublicado)
    {
        $this->inejepublicado = $inejepublicado;

        return $this;
    }

    /**
     * Get inejepublicado
     *
     * @return integer
     */
    public function getInejepublicado()
    {
        return $this->inejepublicado;
    }

    /**
     * Set inejebloqueado
     *
     * @param integer $inejebloqueado
     * @return LbEjemplares
     */
    public function setInejebloqueado($inejebloqueado)
    {
        $this->inejebloqueado = $inejebloqueado;

        return $this;
    }

    /**
     * Get inejebloqueado
     *
     * @return integer
     */
    public function getInejebloqueado()
    {
        return $this->inejebloqueado;
    }

    /**
     * Set inejeestado
     *
     * @param integer $inejeestado
     * @return LbEjemplares
     */
    public function setInejeestado($inejeestado)
    {
        $this->inejeestado = $inejeestado;

        return $this;
    }

    /**
     * Get inejeestado
     *
     * @return integer
     */
    public function getInejeestado()
    {
        return $this->inejeestado;
    }

    /**
     * Set inejecondicion
     *
     * @param integer $inejecondicion
     * @return LbEjemplares
     */
    public function setInejecondicion($inejecondicion)
    {
        $this->inejecondicion = $inejecondicion;

        return $this;
    }

    /**
     * Get inejecondicion
     *
     * @return integer
     */
    public function getInejecondicion()
    {
        return $this->inejecondicion;
    }

    /**
     * Set inejesoloventa
     *
     * @param integer $inejesoloventa
     * @return LbEjemplares
     */
    public function setInejesoloventa($inejesoloventa)
    {
        $this->inejesoloventa = $inejesoloventa;

        return $this;
    }

    /**
     * Get inejesoloventa
     *
     * @return integer
     */
    public function getInejesoloventa()
    {
        return $this->inejesoloventa;
    }

    /**
     * Set inejelibro
     *
     * @param \Libreame\BackendBundle\Entity\LbLibros $inejelibro
     * @return LbEjemplares
     */
    public function setInejelibro(\Libreame\BackendBundle\Entity\LbLibros $inejelibro = null)
    {
        $this->inejelibro = $inejelibro;

        return $this;
    }

    /**
     * Get inejelibro
     *
     * @return \Libreame\BackendBundle\Entity\LbLibros
     */
    public function getInejelibro()
    {
        return $this->inejelibro;
    }

    /**
     * Set inejeusudueno
     *
     * @param \Libreame\BackendBundle\Entity\LbUsuarios $inejeusudueno
     * @return LbEjemplares
     */
    public function setInejeusudueno(\Libreame\BackendBundle\Entity\LbUsuarios $inejeusudueno = null)
    {
        $this->inejeusudueno = $inejeusudueno;

        return $this;
    }

    /**
     * Get inejeusudueno
     *
     * @return \Libreame\BackendBundle\Entity\LbUsuarios
     */
    public function getInejeusudueno()
    {
        return $this->inejeusudueno;
    }

     /**
     * Set inejeestadonegocio
     *
     * @param integer $inejeestadonegocio
     * @return LbEjemplares
     */
    public function setInejeestadonegocio($inejeestadonegocio)
    {
        $this->inejeestadonegocio = $inejeestadonegocio;

        return $this;
    }

    /**
     * Get inejeestadonegocio
     *
     * @return integer
     */
    public function getInejeestadonegocio()
    {
        return $this->inejeestadonegocio;
    }

     /**
     * Set inejereghisbloqueo
     *
     * @param integer $inejereghisbloqueo
     * @return LbEjemplares
     */
    public function setInejereghisbloqueo($inejereghisbloqueo)
    {
        $this->inejereghisbloqueo = $inejereghisbloqueo;

        return $this;
    }

    /**
     * Get inejereghisbloqueo
     *
     * @return integer
     */
    public function getInejereghisbloqueo()
    {
        return $this->inejereghisbloqueo;
    }

     /**
     * Set inejereghispublicacion
     *
     * @param integer $inejereghispublicacion
     * @return LbEjemplares
     */
    public function setInejereghispublicacion($inejereghispublicacion)
    {
        $this->inejereghispublicacion = $inejereghispublicacion;

        return $this;
    }

    /**
     * Get inejereghispublicacion
     *
     * @return integer
     */
    public function getInejereghispublicacion()
    {
        return $this->inejereghispublicacion;
    }

     /**
     * Set inejereghisbajasis
     *
     * @param integer $inejereghisbajasis
     * @return LbEjemplares
     */
    public function setInejereghisbajasis($inejereghisbajasis)
    {
        $this->inejereghisbajasis = $inejereghisbajasis;

        return $this;
    }

    /**
     * Get inejereghisbajasis
     *
     * @return integer
     */
    public function getInejereghisbajasis()
    {
        return $this->inejereghisbajasis;
    }

     /**
     * Set inejereghisaprobdueno
     *
     * @param integer $inejereghisaprobdueno
     * @return LbEjemplares
     */
    public function setInejereghisaprobdueno($inejereghisaprobdueno)
    {
        $this->inejereghisaprobdueno = $inejereghisaprobdueno;

        return $this;
    }

    /**
     * Get inejereghisaprobdueno
     *
     * @return integer
     */
    public function getInejereghisaprobdueno()
    {
        return $this->inejereghisaprobdueno;
    }
     /**
     * Set inejereghisaprobsolic
     *
     * @param integer $inejereghisaprobsolic
     * @return LbEjemplares
     */
    public function setInejereghisaprobsolic($inejereghisaprobsolic)
    {
        $this->inejereghisaprobsolic = $inejereghisaprobsolic;

        return $this;
    }

    /**
     * Get inejereghisaprobsolic
     *
     * @return integer
     */
    public function getInejereghisaprobsolic()
    {
        return $this->inejereghisaprobsolic;
    }

     /**
     * Set inejereghisentrega
     *
     * @param integer $inejereghisentrega
     * @return LbEjemplares
     */
    public function setInejereghisentrega($inejereghisentrega)
    {
        $this->inejereghisentrega = $inejereghisentrega;

        return $this;
    }

    /**
     * Get inejereghisentrega
     *
     * @return integer
     */
    public function getInejereghisentrega()
    {
        return $this->inejereghisentrega;
    }

     /**
     * Set inejereghisrecibido
     *
     * @param integer $inejereghisrecibido
     * @return LbEjemplares
     */
    public function setInejereghisrecibido($inejereghisrecibido)
    {
        $this->inejereghisrecibido = $inejereghisrecibido;

        return $this;
    }

    /**
     * Get inejereghisrecibido
     *
     * @return integer
     */
    public function getInejereghisrecibido()
    {
        return $this->inejereghisrecibido;
    }

 }


text:
package org.apache.hadoop.hbase.regionserver;

import org.apache.yetus.audience.InterfaceAudience;

/**
 * This interface will be implemented to allow single regions to push metrics into
 * MetricsRegionAggregateSource that will in turn push data to the Hadoop metrics system.
 */
@InterfaceAudience.Private
public interface MetricsRegionSource extends Comparable<MetricsRegionSource> {

  String OPS_SAMPLE_NAME = "ops";
  String SIZE_VALUE_NAME = "size";
  String COMPACTIONS_COMPLETED_COUNT = "compactionsCompletedCount";
  String COMPACTIONS_FAILED_COUNT = "compactionsFailedCount";
  String LAST_MAJOR_COMPACTION_AGE = "lastMajorCompactionAge";
  String COMPACTIONS_QUEUED_COUNT = "compactionsQueuedCount";
  String MAX_COMPACTION_QUEUE_SIZE = "maxCompactionQueueSize";
  String NUM_BYTES_COMPACTED_COUNT = "numBytesCompactedCount";
  String NUM_FILES_COMPACTED_COUNT = "numFilesCompactedCount";
  String FLUSHES_QUEUED_COUNT = "flushesQueuedCount";
  String MAX_FLUSH_QUEUE_SIZE = "maxFlushQueueSize";
  String COMPACTIONS_COMPLETED_DESC = "Number of compactions that have completed.";
  String COMPACTIONS_FAILED_DESC = "Number of compactions that have failed.";
  String LAST_MAJOR_COMPACTION_DESC = "Age of the last major compaction in milliseconds.";
  String COMPACTIONS_QUEUED_DESC = "Number of compactions that are queued/running for this region";
  String MAX_COMPACTION_QUEUE_DESC = "Max number of compactions queued for this region";
  String FLUSHES_QUEUED_DESC = "Number flushes requested/queued for this region";
  String MAX_FLUSH_QUEUE_DESC = "Max number of flushes queued for this region";
  String  NUM_BYTES_COMPACTED_DESC =
      "Sum of filesize on all files entering a finished, successful or aborted, compaction";
  String NUM_FILES_COMPACTED_DESC =
      "Number of files that were input for finished, successful or aborted, compactions";
  String COPROCESSOR_EXECUTION_STATISTICS = "coprocessorExecutionStatistics";
  String COPROCESSOR_EXECUTION_STATISTICS_DESC = "Statistics for coprocessor execution times";
  String REPLICA_ID = "replicaid";
  String REPLICA_ID_DESC = "The replica ID of a region. 0 is primary, otherwise is secondary";

  /**
   * Close the region's metrics as this region is closing.
   */
  void close();

  /**
   * Update related counts of puts.
   */
  void updatePut();

  /**
   * Update related counts of deletes.
   */
  void updateDelete();

  /**
   * Update time of gets
   * @param mills time for this get operation.
   */
  void updateGet(long mills);

  /**
   * Update time used of resultScanner.next().
   * */
  void updateScanTime(long mills);

  /**
   * Update related counts of increments.
   */
  void updateIncrement();

  /**
   * Update related counts of appends.
   */
  void updateAppend();

  /**
   * Get the aggregate source to which this reports.
   */
  MetricsRegionAggregateSource getAggregateSource();

}


text:
@import Social;
@import Accounts;
#import "TTMAccountStoreManager.h"

NSString * const TTMAccountErrorDomain = @"com.shu223.SocialAPIHelpers.TTMAccountHelper";

@implementation TTMAccountHelper

+ (NSError *)errorWithCode:(TTMAccountError)code message:(NSString *)message {

    NSError *err = [NSError errorWithDomain:TTMAccountErrorDomain
                                       code:code
                                   userInfo:@{NSLocalizedDescriptionKey: message}];
    return err;
}

+ (void)requestAccessToAccountsWithType:(NSString *)typeIdentifier
                                options:(NSDictionary *)options
                                handler:(void (^)(NSError *error))handler
{
    ACAccountStore *store = [TTMAccountStoreManager sharedManager].store;
    ACAccountType *type = [store accountTypeWithAccountTypeIdentifier:typeIdentifier];

    dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
    dispatch_async(queue, ^{

        [store requestAccessToAccountsWithType:type
                                       options:options
                                    completion:
         ^(BOOL granted, NSError *error) {

             if (error) {

             }
             // no error, but not granted
             else if (!granted) {

                 error = [NSError errorWithDomain:NSStringFromClass([self class])
                                             code:TTMAccountErrorNotGranted
                                         userInfo:@{NSLocalizedDescriptionKey: @"not granted"}];
             }
             // granted!
             else {

                 ACAccountType *accountType = [store accountTypeWithAccountTypeIdentifier:typeIdentifier];
                 NSArray<ACAccount *> *accounts = [store accountsWithAccountType:accountType];

                 if (accounts.count == 0) {

                     error = [NSError errorWithDomain:NSStringFromClass([self class])
                                                 code:TTMAccountErrorNoAccounts
                                             userInfo:@{NSLocalizedDescriptionKey: @"no accounts"}];
                 }
                 // http://stackoverflow.com/questions/13349187/strange-behaviour-when-trying-to-use-twitter-acaccount
                 else if ([typeIdentifier isEqualToString:ACAccountTypeIdentifierTwitter]) {

                     for (ACAccount *anAccount in accounts) {

                         anAccount.accountType = accountType;
                     }
                 }
             }

             dispatch_async(dispatch_get_main_queue(), ^{

                 handler(error);
             });
         }];
    });
}

+ (void)requestAccessToTwitterAccountsWithHandler:(void (^)(NSError *error))handler
{
    [TTMAccountHelper requestAccessToAccountsWithType:ACAccountTypeIdentifierTwitter
                                           options:nil
                                           handler:handler];
}

+ (ACAccount *)facebookAccount {

    ACAccountStore *store = [TTMAccountStoreManager sharedManager].store;

    ACAccountType *accountType = [store accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];

    return [store accountsWithAccountType:accountType].lastObject;
}

+ (NSArray<ACAccount *> *)twitterAccounts {

    ACAccountStore *store = [TTMAccountStoreManager sharedManager].store;

    ACAccountType *accountType = [store accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];

    return [store accountsWithAccountType:accountType];
}

+ (void)showAccountSelectWithDelegate:(id<UIActionSheetDelegate>)delegate
                               inView:(UIView *)view
{
    NSString *title = NSLocalizedString(@"Choose Twitter Account", nil);

    UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:title
                                                             delegate:delegate
                                                    cancelButtonTitle:nil
                                               destructiveButtonTitle:nil
                                                    otherButtonTitles:nil];

    NSArray<ACAccount *> *accounts = [TTMAccountHelper twitterAccounts];

    for (ACAccount *anAccount in accounts) {

        [actionSheet addButtonWithTitle:anAccount.username];
    }

    [actionSheet showInView:view];
}

+ (void)renewCredentialsForFacebookAccountWithCompletion:(void (^)(NSError *error))completion
{
    ACAccountStore *store = [TTMAccountStoreManager sharedManager].store;

    [store renewCredentialsForAccount:[self facebookAccount]
                           completion:
     ^(ACAccountCredentialRenewResult renewResult, NSError *error) {

         if (error) {

             completion(error);
         }
         else {

             switch (renewResult) {

                 case ACAccountCredentialRenewResultRenewed:
                 {
                     NSLog(@"ACAccountCredentialRenewResultRenewed");
                     completion(nil);

                     break;
                 }
                 case ACAccountCredentialRenewResultRejected:
                 {
                     NSLog(@"ACAccountCredentialRenewResultRejected");
                     NSError *err = [self errorWithCode:TTMAccountErrorCredentialNotRenewed
                                                message:@"Failed to renew credentials: ACAccountCredentialRenewResultRejected"];
                     completion(err);

                     break;
                 }
                 case ACAccountCredentialRenewResultFailed:
                 {
                     NSLog(@"ACAccountCredentialRenewResultFailed");
                     NSError *err = [self errorWithCode:TTMAccountErrorCredentialNotRenewed
                                                message:@"Failed to renew credentials: ACAccountCredentialRenewResultFailed"];
                     completion(err);

                     break;
                 }
                 default:
                 {
                     NSError *err = [self errorWithCode:TTMAccountErrorCredentialNotRenewed
                                                message:@"Failed to renew credentials: Other"];
                     completion(err);
                     break;
                 }
             }
         }
     }];
}

// =============================================================================
#pragma mark - Methods to retrieve options

+ (NSDictionary *)optionsToInviteViaFacebookWithAppId:(NSString *)appID {

    NSAssert([appID length], @"Facebook App ID must be set.");

    NSDictionary *options = @{
                              ACFacebookAppIdKey: appID,
                              ACFacebookPermissionsKey: @[kFBPermissionKeyEmail, kFBPermissionKeyXMPPLogin]
                              };

    return options;
}

+ (NSDictionary *)optionsToReadBasicInfoOnFacebookWithAppId:(NSString *)appID {

    NSAssert([appID length], @"Facebook App ID must be set.");

    // http://stackoverflow.com/questions/16472383/parse-facebook-login-app-must-ask-for-basic-read-permission
    NSDictionary *options = @{
                              ACFacebookAppIdKey: appID,
                              ACFacebookPermissionsKey: @[kFBPermissionKeyBasicInfo]
                              };

    return options;
}

+ (NSDictionary *)optionsToReadStreamOnFacebookWithAppId:(NSString *)appID {

    NSAssert([appID length], @"Facebook App ID must be set.");

    NSDictionary *options = @{
                              ACFacebookAppIdKey: appID,
                              ACFacebookPermissionsKey: @[kFBPermissionKeyBasicInfo, kFBPermissionKeyReadStream]
                              };

    return options;
}

+ (NSDictionary *)optionsToWriteOnFacebookWithAppId:(NSString *)appID {

    NSAssert([appID length], @"Facebook App ID must be set.");

    // 投稿用のoptionを作成
    NSDictionary *options = @{
                              ACFacebookAppIdKey: appID,
                              ACFacebookPermissionsKey: @[kFBPermissionKeyPublishStream],
                              ACFacebookAudienceKey : ACFacebookAudienceFriends,
                              };

    return options;
}

@end


text:
package com.github.maxopoly.SkilUp.listeners.abstractListeners;

import org.bukkit.entity.EntityType;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.PlayerShearEntityEvent;

import com.github.maxopoly.SkilUp.ListenerUser;

public class ShearListener extends AbstractListener {

	private EntityType entity;

	public ShearListener(ListenerUser listenerUser, EntityType entity) {
		super(listenerUser);
		this.entity = entity;
	}

	@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)
	public void shearing(PlayerShearEntityEvent e) {
		if (e.getEntity().getType() == entity) {
			tellUser(e, e.getPlayer());
		}
	}
}


text:
import { RouteRecordRaw } from 'vue-router';

export const routeDiscoverGamesViewOverview: RouteRecordRaw = {
	name: 'discover.games.view.overview',
	path: '',
	component: () => import('./overview.vue'),
};


text:
package view.slot;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Graphics;

import javax.swing.BorderFactory;
import javax.swing.JFrame;
import javax.swing.JPanel;

import controller.ActionManager;
import models.MElement;
import models.MGraphSlot;
import models.MSlot;
import models.MTextSlot;
import utilities.Focusable;
import utilities.Observer;

public abstract class VSlot extends JPanel implements Observer, Focusable {
	protected MSlot slot;
	private boolean focused;
	private float heightScale = (float) 1.3;

	public VSlot(MSlot slot) {
		super();
		this.slot = slot;
		focused = false;
		setLayout(new BorderLayout());

		slot.addObserver(this);
		addMouseListener(ActionManager.getInstance().getcMouseListener());
	}

	@Override
	public void setFocus() {
		slot.setFocus();
		focused = true;
	}

	@Override
	public void unfocus() {
		focused = false;
		repaint();
		updateUI();
	}

	@Override
	public void update(Object observable, Object arg, String command) {
		if (arg instanceof MSlot) {
			if (command.equals("focus")) {
				focused = true;
			}
			if (command.equals("unfocus")) {
				unfocus();
			}
			if (command.equals("del")) {
				this.getParent().remove(this);
				slot = null;
			}
		}

	}

	@Override
	protected void paintComponent(Graphics g) {
		super.paintComponent(g);
		this.setBackground(Color.decode("#e3e8ef"));
		if (focused) {
			this.setBorder(BorderFactory.createLineBorder(Color.decode("#3961c6")));
		} else
			this.setBorder(null);
	}

	@Override
	public Dimension getMinimumSize() {
		return new Dimension(0, (int) (this.getWidth() * heightScale));
	}

}


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Zentbl. Bakt. ParasitKde, Abt. II 107: 531 (1954)

#### Original name
Mortierella nodosa E. Wolf, 1954

### Remarks
null


text:
require 'rhubarb/rhubarb'

require 'mrg/grid/config/Parameter'
require 'mrg/grid/config/Feature'
require 'mrg/grid/config/DataValidating'
require 'mrg/grid/config/MethodUtils'

require 'mrg/grid/config/auth'

require 'digest/md5'

module Mrg
  module Grid
    module Config
      # forward declaration
      class NodeMembership
      end

      class Group
        include ::Rhubarb::Persisting
        include ::SPQR::Manageable
        include ::Mrg::Grid::Config::Auth::ORIZING

        include DataValidating
        include ConfigValidating
        include MethodUtils

        declare_table_name('nodegroup') # this line is necessary because you can't have a SQL table named "group"
        qmf_package_name 'com.redhat.grid.config'
        qmf_class_name 'Group'
        ### Property method declarations
        # property uid uint32

        def uid
          @row_id
        end

        def Group.find_by_uid(u)
          find(u)
        end

        DEFAULT_GROUP_NAME = "+++DEFAULT"
        SKELETON_GROUP_NAME = "+++SKEL"

        def Group.DEFAULT_GROUP
          (Group.find_first_by_name(DEFAULT_GROUP_NAME) or Group.create(:name => DEFAULT_GROUP_NAME))
        end

        def Group.SKELETON_GROUP
          Group.find_first_by_name(SKELETON_GROUP_NAME) || Group.create(:name => SKELETON_GROUP_NAME)
        end

        qmf_property :uid, :uint32, :index=>true

        declare_column :name, :text

        declare_column :is_identity_group, :boolean, :default, :false
        qmf_property :is_identity_group, :bool

        include ::Mrg::Grid::Config::Annotatable

        ### Schema method declarations

        # membership
        # * nodes (map/O)
        #   A list of the nodes associated with this group
        def membership()
          log.debug "membership called on group #{self.inspect}"
          db_membership.map{|n| n.name}
        end

        def db_membership()
          NodeMembership.find_by(:grp=>self).map{|nm| nm.node}
        end

        authorize_before :membership, :READ

        expose :membership do |args|
          args.declare :nodes, :list, :out, "A list of node names from the nodes that are members of this group."
        end

        qmf_property :name, :sstr, :desc=>"This group's name."
        alias orig_name name
        alias orig_name= name=

        qmf_property :display_name, :sstr, :desc=>"A human-readable version of this group's name, useful for presenting names of identity groups to end-users."
        def display_name
          return "the default group" if name == DEFAULT_GROUP_NAME
          return "the skeleton group" if name == SKELETON_GROUP_NAME
          return "the identity group for #{membership[0]}" if is_identity_group
          return "group #{name}"
        end

        # name
        # * name (sstr/O)
        def name()
          log.debug "name called on group #{self.orig_name}"
          # Assign values to output parameters
          self.orig_name ||= ""
          # Return value
          return self.orig_name
        end

        # setName
        # * name (sstr/I)
        def setName(name)
          # Print values of input parameters
          log.debug "setName: name => #{name.inspect}"
          fail(Errors.make(Errors::NAME_ALREADY_IN_USE, Errors::GROUP), "Group name #{name} is taken") if (self.name != name and Group.find_first_by_name(name))
          fail(Errors.make(Errors::BAD_COMMAND, Errors::GROUP), "Can't rename special group #{self.name}") if is_special
          self.name = name
        end

        authorize_before :setName, :WRITE

        expose :setName do |args|
          args.declare :name, :sstr, :in, "A new name for this group; it must not be in use by another group."
        end

        qmf_property :features, :list, :desc=>"A list of features to be applied to this group, from highest to lowest priority."

        # features
        # * features (map/O)
        #   A list of features to be applied to this group, in priority order (that is, the first one will be applied last, to take effect after ones with less priority)
        def features()
          log.debug "features called on group #{self.inspect}"
          feature_objs.map{|f| f.name}
        end

        def clearParams
          DirtyElement.dirty_group(self);
          self.modifyParams("REPLACE", {})
          0
        end

        authorize_before :clearParams, :WRITE

        expose :clearParams do |args|
          args.declare :ret, :int, :out, "0 if successful."
        end

        def clearFeatures
          DirtyElement.dirty_group(self);
          self.modifyFeatures("REPLACE", [])
          0
        end

        authorize_before :clearFeatures, :WRITE

        expose :clearFeatures do |args|
          args.declare :ret, :int, :out, "0 if successful."
        end

        # modifyFeatures
        # * command (sstr/I)
        #   Valid commands are 'ADD', 'REMOVE', and 'REPLACE'.
        # * features (map/I)
        #   A list of features to apply to this group dependency priority
        # * params (map/O)
        #   A map(paramName, reasonString) for parameters that need to be set as a result of the features added before the configuration will be considered valid
        def modifyFeatures(command,feats,options={})
          # Print values of input parameters
          log.debug "modifyFeatures: command => #{command.inspect}"
          log.debug "modifyFeatures: features => #{feats.inspect}"

          invalid_features = []
          current_features = self.features

          command = command.upcase

          feats = feats - current_features if command == "ADD"

          feats = feats.uniq.map do |fn|
            frow = Feature.find_first_by_name(fn)
            invalid_features << fn unless frow
            frow
          end

          fail(Errors.make(Errors::NONEXISTENT_ENTITY, Errors::FEATURE), "Invalid features applied to #{self.display_name}:  #{invalid_features.inspect}") if invalid_features != []

          case command
          when "ADD", "REMOVE" then
            feats.each do |frow|
              # Delete any prior mappings for each supplied grp in either case
              GroupFeatures.find_by(:grp=>self, :feature=>frow).each {|nm| nm.delete}

              # Add new mappings when requested
              GroupFeatures.create(:grp=>self, :feature=>frow) if command.upcase == "ADD"
            end
          when "REPLACE" then
            GroupFeatures.find_by(:grp=>self).each {|nm| nm.delete}

            feats.each do |frow|
              GroupFeatures.create(:grp=>self, :feature=>frow)
            end
          else fail(Errors.make(Errors::BAD_COMMAND), "Invalid command #{command}")
          end

          DirtyElement.dirty_group(self);

          nil
        end

        authorize_before :modifyFeatures, :WRITE

        expose :modifyFeatures do |args|
          args.declare :command, :sstr, :in, "Valid commands are 'ADD', 'REMOVE', and 'REPLACE'."
          args.declare :features, :list, :in, "A list of features to apply to this group, in order of decreasing priority."
          args.declare :options, :map, :in, "No options are supported at this time."
        end

        def addFeature(f)
          log.debug("In addFeature, with f == #{f.inspect}")
          self.modifyFeatures("ADD", [f])
        end

        def removeFeature(f)
          log.debug("In removeFeature, with f == #{f.inspect}")
          self.modifyFeatures("REMOVE", [f])
        end

        authorize_before :addFeature, :WRITE

        expose :addFeature do |args|
          args.declare :feature, :lstr, :in
        end

        authorize_before :removeFeature, :WRITE

        expose :removeFeature do |args|
          args.declare :feature, :lstr, :in
        end

        qmf_property :params, :map, :desc=>"A map from parameter names to values as set as custom parameter mappings for this group (i.e. independently of any features that are enabled on this group)"

        # modifyParams
        # * command (sstr/I)
        #   Valid commands are 'ADD', 'REMOVE', and 'REPLACE'.
        # * params (map/I)
        #   A map(featureName, priority) of parameter/value mappings
        def modifyParams(command,pvmap,options={})
          # Print values of input parameters
          log.debug "modifyParams: command => #{command.inspect}"
          log.debug "modifyParams: params => #{pvmap.inspect}"

          invalid_params = []

          pvmap = pvmap.dup if ENV['WALLABY_TECH_PREVIEW']

          prms = pvmap.keys.map do |pn|
            prow = Parameter.find_first_by_name(pn)

            if prow && ENV['WALLABY_TECH_PREVIEW']
              pvmap[prow.name] = pvmap.delete(pn) if prow.name != pn
            else
              invalid_params << pn unless prow
            end

            prow
          end

          fail(Errors.make(Errors::NONEXISTENT_ENTITY, Errors::PARAMETER), "Invalid parameters for #{self.display_name}:  #{invalid_params.inspect}") if invalid_params != []

          command = command.upcase

          case command
          when "ADD", "REMOVE" then
            prms.each do |prow|
              pn = prow.name

              # Delete any prior mappings for each supplied param in either case
              GroupParams.find_by(:grp=>self, :param=>prow).map {|gp| gp.delete}

              # Add new mappings when requested
              GroupParams.create(:grp=>self, :param=>prow, :value=>pvmap[pn]) if command == "ADD"
            end
          when "REPLACE" then
            GroupParams.find_by(:grp=>self).map {|gp| gp.delete}

            prms.each do |prow|
              pn = prow.name

              GroupParams.create(:grp=>self, :param=>prow, :value=>pvmap[pn])
            end
          else fail(Errors.make(Errors::BAD_COMMAND), "invalid command #{command}")
          end

          DirtyElement.dirty_group(self);
        end

        authorize_before :modifyParams, :WRITE

        expose :modifyParams do |args|
          args.declare :command, :sstr, :in, "Valid commands are 'ADD', 'REMOVE', and 'REPLACE'."
          args.declare :params, :map, :in, "A map from parameter names to values as set as custom parameter mappings for this group (i.e. independently of any features that are enabled on this group)"
          args.declare :options, :map, :in, "No options are supported at this time."
        end

        def apply_to(config, ss_prepend=false)
          feature_objs.reverse_each do |feature|
            log.debug("applying config for #{feature.name}")
            config = feature.apply_to(config, ss_prepend)
            log.debug("config is #{config.inspect}")
          end

          # apply group-specific param settings
          # XXX: doesn't check for null-v; is this a problem (not in practice, maybe in theory)
          params.each do |param,val|
            log.debug("applying config params #{param.inspect} --> #{val.inspect}")
            ValueUtil.apply!(config, param, val, ss_prepend)

            log.debug("config is #{config.inspect}")
          end

          config
        end

        def explain(context=nil, history=nil)
          context ||= ExplanationContext.make(:group=>self.display_name, :history=>history)
          explanation = {}

          feature_objs.reverse_each do |feature|
            f_ctx = ExplanationContext.make(:feature=>feature.name, :how=>ExplanationContext::FEATURE_INSTALLED_ON, :whence=>context, :history=>history)
            explanation.merge!(feature.explain(f_ctx))
          end

          params.keys.each do |param|
            explanation[param] = ExplanationContext.make(:param=>param, :how=>ExplanationContext::PARAM_EXPLICIT, :whence=>context, :history=>history)
          end

          explanation
        end

        authorize_before :explain, :READ

        expose :explain do |args|
          args.declare :explanation, :map, :out, "A structure representing where the parameters set on this group get their values."
        end

        def getRawConfig
          log.debug "getConfig called for group #{self.inspect}"

          # prepend an append-value marker to stringset-valued params, because
          # we're going to print out the config for this group.
          apply_to({}, false)
        end

        def getConfig
          log.debug "getConfig called for group #{self.inspect}"

          # prepend an append-value marker to stringset-valued params, because
          # we're going to print out the config for this group.
          apply_to({}, true)
        end

        authorize_before :getConfig, :READ

        expose :getConfig do |args|
          args.declare :config, :map, :out, "Current parameter-value mappings for this group, including those from all enabled features and group-specific parameter mappings."
        end

        declare_query :default_has_feature?, <<-QUERY
        row_id IN (SELECT grp FROM groupfeatures WHERE feature = ?) AND name = '#{DEFAULT_GROUP_NAME}'
        QUERY

        def feature_objs
          GroupFeatures.find_by(:grp=>self).map{|gf| gf.feature}
        end

        def params
          log.debug "params called on group #{self.inspect}"
          Hash[*GroupParams.find_by(:grp=>self).map {|gp| [gp.param.name, gp.value]}.flatten]
        end

        def is_special
          name.slice(0,3) == "+++"
        end

      end

      class GroupFeatures
        include ::Rhubarb::Persisting
        declare_column :grp, :integer, references(Group, :on_delete=>:cascade)
        declare_column :feature, :integer, references(Feature, :on_delete=>:cascade)
      end

      class GroupParams
        include ::Rhubarb::Persisting
        declare_column :grp, :integer, references(Group, :on_delete=>:cascade)
        declare_column :param, :integer, references(Parameter, :on_delete=>:cascade)
        declare_column :value, :text
      end
    end
  end
end


text:
/**
 * @author UCSD MOOC development team
 *
 * Utility class to add vertices and edges to a graph
 *
 */
package util;

import java.io.File;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class GraphLoader {
    /**
     * Loads graph with data from a file.
     * The file should consist of lines with 2 integers each, corresponding
     * to a "from" vertex and a "to" vertex.
     */
    public static void loadGraph(graph.Graph g, String filename) {
        Set<Integer> seen = new HashSet<Integer>();
        Scanner sc;
        try {
            sc = new Scanner(new File(filename));
        } catch (Exception e) {
            e.printStackTrace();
            return;
        }
        // Iterate over the lines in the file, adding new
        // vertices as they are found and connecting them with edges.
        while (sc.hasNextInt()) {
            int v1 = sc.nextInt();
            int v2 = sc.nextInt();
            if (!seen.contains(v1)) {
                g.addVertex(v1);
                seen.add(v1);
            }
            if (!seen.contains(v2)) {
                g.addVertex(v2);
                seen.add(v2);
            }
            g.addEdge(v1, v2);
        }

        sc.close();
    }
}


Naam

ALLOWED_FILE_TYPE: Only following files are allowed :

AUTHORIZATION_REQUIRED: Je hebt niet de nodige rechten om filemanager te gebruiken.

DIRECTORY_ALREADY_EXISTS: De map '%s' bestaat al.

DIRECTORY_NOT_EXIST: De map %s bestaat niet.

DISALLOWED_FILE_TYPE: Following files are not allowed :

ERROR_RENAMING_DIRECTORY: Fout bij het hernoemen van de map %s naar %s.

ERROR_RENAMING_FILE: Fout bij het hernoemen van het bestand %s naar %s.

FILE_ALREADY_EXISTS: The file '%s' already exists.

FILE_DOES_NOT_EXIST: Het bestand %s bestaat niet.

INVALID_ACTION: Ongeldige actie.

INVALID_DIRECTORY_OR_FILE: Ongeldige map of bestand.

INVALID_FILE_TYPE: File upload is not allowed.

INVALID_FILE_UPLOAD: Ongeldige bestandsupload.

INVALID_VAR: Ongeldige variabele %s.

LANGUAGE_FILE_NOT_FOUND: Het taalbestand is niet gevonden.

MODE_ERROR: Mode fout.

UNABLE_TO_CREATE_DIRECTORY: De map %s kon niet worden aangemaakt.

UNABLE_TO_OPEN_DIRECTORY: De map %s kon niet worden geopend.

UPLOAD_FILES_SMALLER_THAN: Upload alleen bestanden kleiner dan %s a.u.b.

UPLOAD_IMAGES_ONLY: Alleen het uploaden van afbeeldingen is toegestaan.

UPLOAD_IMAGES_TYPE_JPEG_GIF_PNG: Alleen het uploaden van afbeeldingen van het type JPEG, GIF of PNG is toegestaan.

browse: Browse...

bytes: bytes

cancel: Annuleren

confirmation_delete: Weet je zeker dat je dit bestand wilt verwijderen?

could_not_retrieve_folder: Could not retrieve folder contents.

create_folder: Nieuwe Map

created: Gemaakt

current_folder: Huidige map:

default_foldername: Mijn map

del: Verwijderen

dimensions: Formaat

download: Downloaden

fck_select_integration: De 'selecteer' functie is alleen voor integratie met CKEditor.

file_size_limit: The file size limit is :

file_too_big: The file is too big.

gb: gb

grid_view: Pictogrammen

kb: kb

list_view: Lijst

loading_data: Transferring data ...

mb: mb

modified: Gewijzigd

new_filename: Vul een nieuwe naam in voor het bestand

new_folder: Nieuwe map

no: Nee

no_foldername: Je dient een naam te geven aan deze map.

parentfolder: Terug naar bestanden

prompt_foldername: Vul de nieuwe mapnaam in

rename: Naam wijzigen

search: Search

search_reset: Reset

select: Selecteren

select_from_left: Selecteer een item aan de linker kant.

size: Grootte

successful_added_file: Het nieuwe bestand is toegevoegd.

successful_added_folder: De nieuwe map is toegevoegd.

successful_delete: Het bestand is verwijderd.

successful_rename: De naam is gewijzigd.

upload: Upload

yes: Ja


text:
#include "libtorrent/config.hpp"
#include "libtorrent/extensions/ut_pex.hpp"
#include "libtorrent/extensions/ut_metadata.hpp"
#include "libtorrent/extensions/smart_ban.hpp"
#include "libtorrent/session.hpp"
#include "libtorrent/extensions.hpp"
#include "libtorrent/aux_/session_impl.hpp"
#include "libtorrent/aux_/session_call.hpp"
#include "libtorrent/extensions.hpp" // for add_peer_flags_t

namespace libtorrent {

#ifndef TORRENT_DISABLE_EXTENSIONS
	// declared in extensions.hpp
	// remove this once C++17 is required
	constexpr feature_flags_t plugin::optimistic_unchoke_feature;
	constexpr feature_flags_t plugin::tick_feature;
	constexpr feature_flags_t plugin::dht_request_feature;
	constexpr feature_flags_t plugin::alert_feature;
#endif

namespace aux {
	constexpr torrent_list_index_t session_interface::torrent_state_updates;
	constexpr torrent_list_index_t session_interface::torrent_want_tick;
	constexpr torrent_list_index_t session_interface::torrent_want_peers_download;
	constexpr torrent_list_index_t session_interface::torrent_want_peers_finished;
	constexpr torrent_list_index_t session_interface::torrent_want_scrape;
	constexpr torrent_list_index_t session_interface::torrent_downloading_auto_managed;
	constexpr torrent_list_index_t session_interface::torrent_seeding_auto_managed;
	constexpr torrent_list_index_t session_interface::torrent_checking_auto_managed;
}

#ifndef TORRENT_DISABLE_EXTENSIONS
constexpr add_peer_flags_t torrent_plugin::first_time;
constexpr add_peer_flags_t torrent_plugin::filtered;
#endif

namespace {

#if defined TORRENT_ASIO_DEBUGGING
	void wait_for_asio_handlers()
	{
		int counter = 0;
		while (log_async())
		{
			std::this_thread::sleep_for(seconds(1));
			++counter;
			std::printf("\x1b[2J\x1b[0;0H\x1b[33m==== Waiting to shut down: %d ==== \x1b[0m\n\n"
				, counter);
		}
		async_dec_threads();

		std::fprintf(stderr, "\n\nEXPECTS NO MORE ASYNC OPS\n\n\n");
	}
#endif
} // anonymous namespace

	settings_pack min_memory_usage()
	{
		settings_pack set;
#if TORRENT_ABI_VERSION == 1
		// receive data directly into disk buffers
		// this yields more system calls to read() and
		// kqueue(), but saves RAM.
		set.set_bool(settings_pack::contiguous_recv_buffer, false);
#endif

		set.set_int(settings_pack::max_peer_recv_buffer_size, 32 * 1024 + 200);

		set.set_int(settings_pack::disk_io_write_mode, settings_pack::disable_os_cache);
		set.set_int(settings_pack::disk_io_read_mode, settings_pack::disable_os_cache);

		// keep 2 blocks outstanding when hashing
		set.set_int(settings_pack::checking_mem_usage, 2);

		// don't use any extra threads to do SHA-1 hashing
		set.set_int(settings_pack::aio_threads, 1);

		set.set_int(settings_pack::alert_queue_size, 100);

		set.set_int(settings_pack::max_out_request_queue, 300);
		set.set_int(settings_pack::max_allowed_in_request_queue, 100);

		// setting this to a low limit, means more
		// peers are more likely to request from the
		// same piece. Which means fewer partial
		// pieces and fewer entries in the partial
		// piece list
		set.set_int(settings_pack::whole_pieces_threshold, 2);
		set.set_bool(settings_pack::use_parole_mode, false);
		set.set_bool(settings_pack::prioritize_partial_pieces, true);

		// connect to 5 peers per second
		set.set_int(settings_pack::connection_speed, 5);

		// only have 4 files open at a time
		set.set_int(settings_pack::file_pool_size, 4);

		// we want to keep the peer list as small as possible
		set.set_bool(settings_pack::allow_multiple_connections_per_ip, false);
		set.set_int(settings_pack::max_failcount, 2);
		set.set_int(settings_pack::inactivity_timeout, 120);

		// whenever a peer has downloaded one block, write
		// it to disk, and don't read anything from the
		// socket until the disk write is complete
		set.set_int(settings_pack::max_queued_disk_bytes, 1);

		// don't keep track of all upnp devices, keep
		// the device list small
		set.set_bool(settings_pack::upnp_ignore_nonrouters, true);

		// never keep more than one 16kB block in
		// the send buffer
		set.set_int(settings_pack::send_buffer_watermark, 9);

		// don't use any disk cache
		set.set_int(settings_pack::cache_size, 0);
		set.set_bool(settings_pack::use_read_cache, false);

		set.set_bool(settings_pack::close_redundant_connections, true);

		set.set_int(settings_pack::max_peerlist_size, 500);
		set.set_int(settings_pack::max_paused_peerlist_size, 50);

		// udp trackers are cheaper to talk to
		set.set_bool(settings_pack::prefer_udp_trackers, true);

		set.set_int(settings_pack::max_rejects, 10);

		set.set_int(settings_pack::recv_socket_buffer_size, 16 * 1024);
		set.set_int(settings_pack::send_socket_buffer_size, 16 * 1024);

		// use less memory when reading and writing
		// whole pieces
		set.set_bool(settings_pack::coalesce_reads, false);
		set.set_bool(settings_pack::coalesce_writes, false);
		return set;
	}

	settings_pack high_performance_seed()
	{
		settings_pack set;
		// don't throttle TCP, assume there is
		// plenty of bandwidth
		set.set_int(settings_pack::mixed_mode_algorithm, settings_pack::prefer_tcp);

		set.set_int(settings_pack::max_out_request_queue, 1500);
		set.set_int(settings_pack::max_allowed_in_request_queue, 2000);

		set.set_int(settings_pack::max_peer_recv_buffer_size, 5 * 1024 * 1024);

		// we will probably see a high rate of alerts, make it less
		// likely to loose alerts
		set.set_int(settings_pack::alert_queue_size, 10000);

		// allow 500 files open at a time
		set.set_int(settings_pack::file_pool_size, 500);

		// don't update access time for each read/write
		set.set_bool(settings_pack::no_atime_storage, true);

		// as a seed box, we must accept multiple peers behind
		// the same NAT
//		set.set_bool(settings_pack::allow_multiple_connections_per_ip, true);

		// connect to 50 peers per second
		set.set_int(settings_pack::connection_speed, 500);

		// allow 8000 peer connections
		set.set_int(settings_pack::connections_limit, 8000);

		// allow lots of peers to try to connect simultaneously
		set.set_int(settings_pack::listen_queue_size, 3000);

		// unchoke all peers
		set.set_int(settings_pack::unchoke_slots_limit, -1);

		// use 1 GB of cache
		set.set_int(settings_pack::cache_size, 32768 * 2);
		set.set_bool(settings_pack::use_read_cache, true);
		set.set_int(settings_pack::read_cache_line_size, 32);
		set.set_int(settings_pack::write_cache_line_size, 256);
		// 30 seconds expiration to save cache
		// space for active pieces
		set.set_int(settings_pack::cache_expiry, 30);

		// in case the OS we're running on doesn't support
		// readv/writev, allocate contiguous buffers for
		// reads and writes
		// disable, since it uses a lot more RAM and a significant
		// amount of CPU to copy it around
		set.set_bool(settings_pack::coalesce_reads, false);
		set.set_bool(settings_pack::coalesce_writes, false);

		// the max number of bytes pending write before we throttle
		// download rate
		set.set_int(settings_pack::max_queued_disk_bytes, 7 * 1024 * 1024);

		// prevent fast pieces to interfere with suggested pieces
		// since we unchoke everyone, we don't need fast pieces anyway
		set.set_int(settings_pack::allowed_fast_set_size, 0);

		// suggest pieces in the read cache for higher cache hit rate
		set.set_int(settings_pack::suggest_mode, settings_pack::suggest_read_cache);

		set.set_bool(settings_pack::close_redundant_connections, true);

		set.set_int(settings_pack::max_rejects, 10);

		set.set_int(settings_pack::recv_socket_buffer_size, 1024 * 1024);
		set.set_int(settings_pack::send_socket_buffer_size, 1024 * 1024);

		// don't let connections linger for too long
		set.set_int(settings_pack::request_timeout, 10);
		set.set_int(settings_pack::peer_timeout, 20);
		set.set_int(settings_pack::inactivity_timeout, 20);

		set.set_int(settings_pack::active_limit, 20000);
		set.set_int(settings_pack::active_tracker_limit, 2000);
		set.set_int(settings_pack::active_dht_limit, 600);
		set.set_int(settings_pack::active_seeds, 2000);

		set.set_int(settings_pack::choking_algorithm, settings_pack::fixed_slots_choker);

		// of 500 ms, and a send rate of 4 MB/s, the upper
		// limit should be 2 MB
		set.set_int(settings_pack::send_buffer_watermark, 3 * 1024 * 1024);

		// put 1.5 seconds worth of data in the send buffer
		// this gives the disk I/O more heads-up on disk
		// reads, and can maximize throughput
		set.set_int(settings_pack::send_buffer_watermark_factor, 150);

		// always stuff at least 1 MiB down each peer
		// pipe, to quickly ramp up send rates
		set.set_int(settings_pack::send_buffer_low_watermark, 1 * 1024 * 1024);

		// don't retry peers if they fail once. Let them
		// connect to us if they want to
		set.set_int(settings_pack::max_failcount, 1);

		// number of disk threads for low level file operations
		set.set_int(settings_pack::aio_threads, 8);

		set.set_int(settings_pack::checking_mem_usage, 2048);

		return set;
	}

	session_params read_session_params(bdecode_node const& e, save_state_flags_t const flags)
	{
		session_params params;

		bdecode_node settings;
		if (e.type() != bdecode_node::dict_t) return params;

		if (flags & session_handle::save_settings)
		{
			settings = e.dict_find_dict("settings");
			if (settings)
			{
				params.settings = load_pack_from_dict(settings);
			}
		}

#ifndef TORRENT_DISABLE_DHT
		if (flags & session_handle::save_dht_settings)
		{
			settings = e.dict_find_dict("dht");
			if (settings)
			{
				params.dht_settings = dht::read_dht_settings(settings);
			}
		}

		if (flags & session_handle::save_dht_state)
		{
			settings = e.dict_find_dict("dht state");
			if (settings)
			{
				params.dht_state = dht::read_dht_state(settings);
			}
		}
#endif

		return params;
	}

	void session::start(session_params&& params, io_service* ios)
	{
		bool const internal_executor = ios == nullptr;

		if (internal_executor)
		{
			// the user did not provide an executor, we have to use our own
			m_io_service = std::make_shared<io_service>(1);
			ios = m_io_service.get();
		}

		m_impl = std::make_shared<aux::session_impl>(std::ref(*ios), std::ref(params.settings));
		*static_cast<session_handle*>(this) = session_handle(m_impl);

#ifndef TORRENT_DISABLE_EXTENSIONS
		for (auto& ext : params.extensions)
		{
			m_impl->add_ses_extension(std::move(ext));
		}
#endif

#ifndef TORRENT_DISABLE_DHT
		m_impl->set_dht_settings(std::move(params.dht_settings));
		m_impl->set_dht_state(std::move(params.dht_state));

		TORRENT_ASSERT(params.dht_storage_constructor);
		m_impl->set_dht_storage(std::move(params.dht_storage_constructor));
#endif

		m_impl->start_session();

		if (internal_executor)
		{
			// start a thread for the message pump
			m_thread = std::make_shared<std::thread>(
				[&] { m_io_service->run(); });
		}
	}

namespace {

		std::vector<std::shared_ptr<plugin>> default_plugins(
			bool empty = false)
		{
#ifndef TORRENT_DISABLE_EXTENSIONS
			if (empty) return {};
			using wrapper = aux::session_impl::session_plugin_wrapper;
			return {
				std::make_shared<wrapper>(create_ut_pex_plugin),
				std::make_shared<wrapper>(create_ut_metadata_plugin),
				std::make_shared<wrapper>(create_smart_ban_plugin)
			};
#else
			TORRENT_UNUSED(empty);
			return {};
#endif
		}
	}

	void session::start(session_flags_t const flags, settings_pack&& sp, io_service* ios)
	{
		start({std::move(sp),
			default_plugins(!(flags & add_default_plugins))}, ios);
	}

	session::~session()
	{
		aux::dump_call_profile();
		TORRENT_ASSERT(m_impl);

		// capture the shared_ptr in the dispatched function
		// to keep the session_impl alive
		m_impl->call_abort();

		if (m_thread && m_thread.use_count() == 1)
		{
#if defined TORRENT_ASIO_DEBUGGING
			wait_for_asio_handlers();
#endif
			m_thread->join();
		}
	}

	session_proxy session::abort()
	{
		// stop calling the alert notify function now, to avoid it thinking the
		// session is still alive
		m_impl->alerts().set_notify_function({});
		return session_proxy(m_io_service, m_thread, m_impl);
	}

	session_proxy::session_proxy() = default;
	session_proxy::session_proxy(std::shared_ptr<io_service> ios
		, std::shared_ptr<std::thread> t
		, std::shared_ptr<aux::session_impl> impl)
		: m_io_service(std::move(ios))
		, m_thread(std::move(t))
		, m_impl(std::move(impl))
	{}
	session_proxy::session_proxy(session_proxy const&) = default;
	session_proxy& session_proxy::operator=(session_proxy const&) = default;
	session_proxy::session_proxy(session_proxy&&) noexcept = default;
	session_proxy& session_proxy::operator=(session_proxy&&) noexcept = default;
	session_proxy::~session_proxy()
	{
		if (m_thread && m_thread.use_count() == 1)
		{
#if defined TORRENT_ASIO_DEBUGGING
			wait_for_asio_handlers();
#endif
			m_thread->join();
		}
	}

	session_params::session_params(settings_pack&& sp)
		: session_params(std::move(sp), default_plugins())
	{}

	session_params::session_params(settings_pack const& sp)
		: session_params(sp, default_plugins())
	{}

	session_params::session_params()
		: extensions(default_plugins())
#ifndef TORRENT_DISABLE_DHT
		, dht_storage_constructor(dht::dht_default_storage_constructor)
#endif
	{}

	session_params::session_params(settings_pack&& sp
		, std::vector<std::shared_ptr<plugin>> exts)
		: settings(std::move(sp))
		, extensions(std::move(exts))
#ifndef TORRENT_DISABLE_DHT
		, dht_storage_constructor(dht::dht_default_storage_constructor)
#endif
	{}

	session_params::session_params(settings_pack const& sp
		, std::vector<std::shared_ptr<plugin>> exts)
		: settings(sp)
		, extensions(std::move(exts))
#ifndef TORRENT_DISABLE_DHT
		, dht_storage_constructor(dht::dht_default_storage_constructor)
#endif
	{}
}


text:
var Etcd = require('./promise.etcd');
var Q = require('q');
var _ = require('underscore');
var HashRing = require('hashring');

function Frodo(config) {
  this.config = config || {};
  this.context = this.config.context || 'frodo';
  this.ready = Q();
  var rawServers = this.config.etcdServers || [
    { host: '127.0.0.1', port: 4001 }
  ];
  if (!_.isArray(rawServers)) {
    rawServers = [ rawServers ];
  }
  var servers = [];
  rawServers.forEach(function (server) {
    if (_.isString(server)) {
      servers.push(server + ':4001');
    } else if (_.isObject(server)) {
      servers.push('' + (server.host || '127.0.0.1') + ':' + (server.port || '4001'));
    } else {
      throw new Error(server + ' as a server should be an address <string> or { host: <string>, port: <integer> }')
    }
  });

  this.etcd = new Etcd(servers, config.sslopts);

  if (!this.config.lazy) {
    this.ready = this.init();
  }
}

function addToMaps(node) {
  this.hosts.push(node.value);
  if (!this.hostsToKeys[node.value]) {
    this.hostsToKeys[node.value] = [];
  }
  this.hostsToKeys[node.value].push(node.key);
}

Frodo.prototype.init = function () {
  var self = this;
  self.pid = process.pid;
  self.hosts = [];
  self.hostsToKeys = {};
  self.hashRing = new HashRing(self.hosts, 'md5');
  self.hostsWatcher = self.etcd.watcher(self.context + '/hosts', null, { recursive: true });
  self.hostsWatcher.on('change', function (result) {
    if (result.action == 'set' && result.node.value) {
      addToMaps.call(self, result.node);

      self.hashRing.add(result.node.value);
    } else if (result.action == 'delete' && result.prevNode.value) {
      var hostsIndexOf = self.hosts.indexOf(result.prevNode.value);
      var hostsToKeysIndexOf = self.hostsToKeys[result.prevNode.value].indexOf(result.prevNode.key);

      if (hostsIndexOf >= 0) {
        self.hosts.splice(hostsIndexOf, 1);
        if (!self.hostsToKeys[result.prevNode.value] || self.hostsToKeys[result.prevNode.value].length == 1) {
          self.hashRing.remove(result.prevNode.value);
        }
      }

      if (hostsToKeysIndexOf >= 0) {
        self.hostsToKeys[result.prevNode.value].splice(hostsToKeysIndexOf, 1);
      }
    }
  });

  return self.etcd.get(self.context + '/hosts', { recursive: true }).then(function (result) {
    if (result && result[0] && result[0].node.nodes) {
      result[0].node.nodes.forEach(function (node) {
        addToMaps.call(self, node);
      });
      self.hosts = _.pluck(result[0].node.nodes, 'value');
      self.hashRing.add(self.hosts);
    }
  }, function (err) {
    if (err.errorCode == 100) {
      return self.etcd.mkdir(self.context + '/hosts/');
    } else {
      return Q.reject(err);
    }
  });
};

Frodo.prototype.addServer = function (server, options) {
  var self = this;
  var options = options || {};
  return this.ready.then(function () {
    return self.etcd.set(self.context + '/hosts/' + server + ':' + (options.id ? options.id : self.pid), server);
  });
};

Frodo.prototype.removeServer = function (server, options) {
  var self = this;
  var options = options || {};
  return this.ready.then(function () {
    if (options.all && self.hostsToKeys[server]) {
      return Q.all(self.hostsToKeys[server].map(function (key) {
        return self.etcd.del(key)
      }));
    } else {
      return self.etcd.del(self.context + '/hosts/' + server + ':' + (options.id ? options.id : self.pid));
    }
  });
};

Frodo.prototype.servers = function () {
  var self = this;
  return this.ready.then(function () {
    return self.hosts;
  });
};

Frodo.prototype.serverById = function (id) {
  var self = this;
  return this.ready.then(function () {
    return self.hashRing.get(id);
  });
};

Frodo.prototype.close = function () {
  this.hostsWatcher.stop();
  return Q();
};

module.exports = Frodo;


text:
import sbt.Keys._
import sbt.{Configuration, _}
import uk.gov.hmrc.gitstamp.GitStampPlugin

object DefaultBuildSettings {

  lazy val targetJvm = settingKey[String]("The version of the JVM the build targets")

  lazy val scalaSettings : Seq[Setting[_]] = {
    targetJvm := "jvm-1.8"

    Seq(
      scalaVersion := "2.12.10",
      scalacOptions ++= Seq(
        "-unchecked",
        "-deprecation",
        "-Xlint",
        "-language:_",
        "-target:" + targetJvm.value,
        "-Xmax-classfile-name", "100",
        "-encoding", "UTF-8"
      )
    )
  }

  def defaultSettings(addScalaTestReports: Boolean = true) : Seq[Setting[_]] =
    Seq(
      organization := "uk.gov.hmrc",
      console / initialCommands := "import " + organization + "._",
      Test / parallelExecution := false,
      isSnapshot := version.value.matches("([\\w]+\\-SNAPSHOT)|([\\.\\w]+)\\-([\\d]+)\\-([\\w]+)")
    ) ++ GitStampPlugin.gitStampSettings ++
      (if (addScalaTestReports) addTestReportOption(Test) else Seq.empty)

  def addTestReportOption(conf: Configuration, directory: String = "test-reports") = {
    val testResultDir = "target/" + directory
    conf / testOptions += Tests.Argument("-o", "-u", testResultDir, "-h", testResultDir + "/html-report")
  }
}