text:
OC.L10N.register(
    "files_external",
    {
    "Step 1 failed. Exception: %s" : "Pasul 1 a eșuat. Excepție: %s",
    "Step 2 failed. Exception: %s" : "Pasul 2 a eșuat. Excepție: %s",
    "External storage" : "Stocare externă",
    "Personal" : "Personal",
    "System" : "Sistem",
    "Grant access" : "Permite accesul",
    "Error configuring OAuth1" : "Eroare la configurarea OAuth1",
    "Generate keys" : "Generează chei",
    "Error generating key pair" : "Eroarea la generarea cheilor",
    "All users. Type to select user or group." : "Toți utilizatorii. Începe să scrii pentru a selecta un utilizator sau un grup.",
    "(group)" : "(grup)",
    "Admin defined" : "Administrator definit",
    "Saved" : "Salvat",
    "Empty response from the server" : "Răspuns nul de la server",
    "There was an error with message: " : "A apărut o eroare cu mesajul:",
    "Username" : "Nume utilizator",
    "Password" : "Parolă",
    "Credentials saved" : "Detalii de autentificare salvate",
    "Credentials saving failed" : "Salvarea detaliilor de autentificare a eșuat",
    "Credentials required" : "Detalii de autentificare necesare",
    "Save" : "Salvează",
    "Insufficient data: %s" : "Date insuficiente: %s",
    "%s" : "%s",
    "OAuth1" : "OAuth1",
    "App key" : "Cheie aplicație",
    "App secret" : "Secret aplicație",
    "OAuth2" : "OAuth2",
    "Client ID" : "ID client",
    "Client secret" : "Secret client",
    "OpenStack" : "OpenStack",
    "Tenant name" : "Nume titular",
    "API key" : "Cheie API",
    "RSA public key" : "Cheie publică RSA",
    "Public key" : "Cheie publică",
    "WebDAV" : "WebDAV",
    "URL" : "URL",
    "Secure https://" : "https:// sigur",
    "Google Drive" : "Google Drive",
    "Local" : "Local",
    "Location" : "Locație",
    "ownCloud" : "ownCloud",
    "SFTP" : "SFTP",
    "Host" : "Gazdă",
    "Root" : "Root",
    "SFTP with secret key login" : "SFTP cu cheie secretă de autentificare",
    "SMB / CIFS" : "SMB / CIFS",
    "Share" : "Partajează",
    "Domain" : "Domeniu",
    "SMB / CIFS using OC login" : "SMB / CIFS folosind autentificare OC",
    "Name" : "Nume",
    "Storage type" : "Tip stocare",
    "Scope" : "Scop",
    "Enable encryption" : "Activează criptarea",
    "Enable previews" : "Activează previzualizările",
    "Enable sharing" : "Activează partajarea",
    "Check for changes" : "Verifică dacă au intervenit modificări",
    "Never" : "Niciodată",
    "Once every direct access" : "O dată la fiecare acces direct",
    "External Storage" : "Stocare externă",
    "Folder name" : "Denumire director",
    "Authentication" : "Autentificare",
    "Configuration" : "Configurație",
    "Available for" : "Disponibil pentru",
    "Add storage" : "Adauga stocare",
    "Advanced settings" : "Setări avansate",
    "Delete" : "Șterge",
    "Allow users to mount the following external storage" : "Permite utilizatorilor să monteze următoarea unitate de stocare"
},
"nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));");


text:
.PHONY: latexmk clean dev pdf all

COMMON_FLAGS = -pdf

all: pdf

pdf: thesis.tex
	latexmk $(COMMON_FLAGS) $<

dev: thesis.tex
	latexmk $(COMMON_FLAGS) -pvc -view=none $<

clean:
	latexmk $(COMMON_FLAGS) -c

redpajama_set_name: RedPajamaGithub


text:
Things to take care about =>
```
    0. Exit                     [X]
    1. Promise Chains           [X]
    2. SQL Query Hits           [X]
    3. HTTP/HTTPS Calls         [X]
    4. Stubs                    [X]
    5. boilerplates             [X]
    6. imports                  [X]
    7. prototype functions      [X]
```

Flow
```
    - Welcome Master and then ask him what he wants
    - Read Master's input
    - Ask Master the detailed requirements of the task
    - Spun out the code for Master like a pro with amazing indentation
    - Copy it to the clipboard for Master
    - Ask for Master's permisson to Exit
```

Example

```
Sir, your code slave is at your service. Your Wish is my command.

What would you like automated?
Type :
	1     to     Brew a new Promise Chain
	2     to     Brew a new SQL Query Hit
	3     to     Brew a new HTTP/HTTPS Call
	4     to     Brew a new Stub
	5     to     Brew Boiler Plate
	6     to     Brew Imports
	7     to     Brew a new prototype function
	0     to     Exit

1
Master please list the functions you need (comma separated and in order) :

v,k

Master please list the parameters (comma separated and in order) and if it returns anything to the next function in queue chain (separated by :) accepted by your function v :

a,b,c

Master please list the parameters (comma separated and in order) and if it returns anything to the next function in queue chain (separated by :) accepted by your function k :

a,b,c

Master your code -

 Q(undefined)
	.then( () => {
		return self.v(a, b, c);
	})
	.then( () => {
		return self.k(a, b, c);
	})
	.fail( (error) => {
		L.error('error in q chain', error);
	})
	.fin( () => {

	});

Everything has been copied to the clipboard for you Master!

```


text:
package ru.plahotin.shapes;

import org.junit.Test;
import static org.junit.Assert.assertThat;
import static org.hamcrest.core.Is.is;

/**...
 * Test for strategy pattern train program
 */
public class PaintTest {

	/**...
	 * Test method
	 */
	@Test
	public void whenPaintShapeThenCorrectStringReturned() {
		final String correctTriangle = "   *\n  ***\n *****\n*******";
		final Paint paintTriangle = new Paint(new Triangle());
		final String triangle = paintTriangle.pic();
		assertThat(correctTriangle, is(triangle));

		final String correctSquare = "****\n*  *\n*  *\n****";
		final Paint paintSquare = new Paint(new Square());
		final String square = paintSquare.pic();
		assertThat(correctSquare, is(square));

	}
}


text:
@extends('layouts.default')

@section('content')

Planet Framework

Open source PHP web application framework

            Want to build Web App? »
            Project Source Code »

@if(Session::has('flash_notification.message'))
    @include('vendor.sun.flash.Flash_Message')
@endif

Install via composer:

    composer create-project sun/planet=~1.0@beta

Install via download zip:

     Download

Route

    // Get Route
    $app->get('/', function () {

        return 'Hello World!';

    });

    // Post Route
    $app->post('/', function () {

        return 'Hello World!';

    });

    // Delete Route
    $app->delete('/user/1', function () {

        return 'deleted!';

    });

    // Put Route
    $app->put('/user/1', function () {

        return 'updated!';

    });

    // Route Group
    $app->group(['filter' => 'Auth'], function () use ($app) {

        $app->get('/home', 'HomeController@index');
        $app->get('/about', 'HomeController@about');

    });

    // Route Any [ Its create get and post route for you.  ]
    $app->any('/home', 'HomeController@index');

    /**
    * [ Route catch all ]
    *
    * Its catch all route that does not match with any route
    * in the routes.php file
    */
    $app->get('*', function () {
        return view('index');
    });

    /**
    * [ Route Resource ]
    *
    * Its create RESTful route for you.
    * /users [ GET ] Get all the users.
    * /users [ POST ] Create a user.
    * /users/{id} [ GET ] Get a single user.
    * /users/{id} [ PUT ] Update a user.
    * /users/{id} [ DELETE ] Delete a user.
    */
    $app->resource('/users', 'UsersController');

    // Route filter [ To execute multiple filters use pipe ( | ) ]
    $app->get('/', 'HomeController@index', ['filter' => 'Guest | Csrf']);

Controller

    class HomeController extends Controller
    {
        /**
         * To show home page
         *
         * @return \Sun\View\View
         */
        public function index()
        {
            return View::render('index');
        }
    }

Form Validator

    $validate = Validator::validate([
        'email' => [Request::input('email'), 'required'],
        'password' => [Request::input('password'), 'required']
    ]);

    if ($validate->fails()) {

        return Redirect::backWith('errors', $validate->errors()->all());
    }

Console Command

    php planet list            [ list of commands ]

    php planet run             [ start built-in server ]

    php planet app:name        [ change app namespace ]

    php planet app:key         [ set app key ]

    php planet config:cache    [ Create configuration cache file ]

    php planet config:clear    [ Remove the configuration cache file ]

    php planet make:alien      [ create alien ]

    php planet make:command    [ create command bus ]

    php planet make:console    [ create console command ]

    php planet make:model      [ create model ]

    php planet make:controller [ create controller ]

    php planet make:filter     [ create filter ]

    php planet session:clear   [ clear session files ]

    php planet view:clear      [ clear compiled view ]

To create RESTful controller

    php planet make:controller Users --resource

To create plain controller

    php planet make:controller Users --plain

Alien

    // Built in Alien
    'Csrf'          => 'Sun\Alien\CsrfAlien',
    'File'          => 'Sun\Alien\FilesystemAlien',
    'Flash'         => 'Sun\Alien\FlashAlien',
    'Hash'          => 'Sun\Alien\HashAlien',
    'Log'           => 'Sun\Alien\LogAlien',
    'Mail'          => 'Sun\Alien\MailerAlien',
    'Redirect'      => 'Sun\Alien\RedirectAlien',
    'Request'       => 'Sun\Alien\RequestAlien',
    'Response'      => 'Sun\Alien\ResponseAlien',
    'Session'       => 'Sun\Alien\SessionAlien',
    'Validator'     => 'Sun\Alien\ValidatorAlien',
    'View'          => 'Sun\Alien\ViewAlien',

Custom Alien

    class CustomAlien extends \Sun\Alien
    {
        /**
         * To register Alien
         *
         * @return string namespace
         */
        public static function registerAlien()
        {
            return 'App\Custom';
        }
    }

Helper Functions

    app()
    app_path()
    base_path()
    config_path()
    storage_path()
    public_path()
    csrf_token();
    config();
    view();
    url();
    redirect();
    request();

    get();
    post();
    put();
    delete();
    any();
    resource();
    response();
    validator();
    bcrypt();
    bcrypt_verify();
    encrypt();
    decrypt();

Flash Message

    Flash::success('Hello');

    Flash::error('Whoops! There were some problems with your input.');

    Flash::info('your message');

    Flash::warning('your message');

    Flash::confirm('Message Title', 'Your Message');

    Flash::overlay('Message Title', 'Your Message');

Filters

    Guest, Auth, Csrf

Email

    // basic email
    Mail::send('name@example.com', 'name', 'Subject', 'Body');

    // email with html view
    $body = view('emailTemplate', [ 'data' => $data ]);
    Mail::send('name@example.com', 'name', 'Subject', $body);

Custom Filter

    class CustomFilter extends \Sun\Routing\Filter
    {
        /**
         * To handle request
         */
        public function handle()
        {
            if(\Session::has('login')) {
                \Redirect::to('/home');
            }
        }
    }

Filesystem

    // create file
    File::create(storage_path().'/app/file.txt', 'your file content');

    // delete file
    File::delete(storage_path().'/app/file.txt');

    // Check file exists
    File::exists(storage_path().'/app/file.txt');

    // update file
    File::update(storage_path().'/app/file.txt', 'your content');

    // to get file content
    File::get(storage_path().'/app/file.txt');

    // append file
    File::append(storage_path().'/app/file.txt', 'your content');

    // copy file
    File::copy(storage_path().'/app/file.txt',
                storage_path().'/app/newFile.txt');

    // move file
    File::move(storage_path().'/app/file.txt',
                storage_path().'/file.txt');

    // to get file size
    File::size(storage_path().'/app/file.txt');

    // to get all files in a directory
    File::files(storage_path().'/app);

    // to get all directories in a directory
    File::directories(storage_path().'/app');

    // create directory
    File::createDirectory(storage_path().'/app');

    // delete directory
    File::deleteDirectory(storage_path().'/app');

    // clean directory
    File::CleanDirectory(storage_path().'/app');

    // to check is file
    File::isFile(storage_path().'/app/file.txt');

    // to check is directory
    File::isDir(storage_path() . '/app');

Session

    // create session
    Session::Create('mySession', 'content');

    // to get session content
    Session::get('mySession');

    // delete session
    Session::delete('mySession');

    // to check session exists
    Session::has('mySession');

    // to get session content & delete this session
    Session::pull('mySession');

    // to push session data in the session array
    Session::push('myArraySession', 'content');

    // to pop session data from the session array
    Session::pull('myArraySession');

    // to shift session data from the session array
    Session::shift('myArraySession');

    // destroy all session data
    Session::destroy();

Contracts

    Sun\Contracts\Bus\CommandTranslator
    Sun\Contracts\Bus\Dispatcher
    Sun\Contracts\Database\Database
    Sun\Contracts\Filesystem\Filesystem
    Sun\Contracts\Http\Redirect
    Sun\Contracts\Http\Request
    Sun\Contracts\Http\Response
    Sun\Contracts\Log\Log
    Sun\Contracts\Mail\Mailer
    Sun\Contracts\Routing\UrlGenerator
    Sun\Contracts\Security\Csrf
    Sun\Contracts\Security\Encrypter
    Sun\Contracts\Security\Hash
    Sun\Contracts\Session\Session
    Sun\Contracts\Support\Config
    Sun\Contracts\Validation\Validator
    Sun\Contracts\View\View

Log

    /**
    * All log data saves in the path
    *
    * storage/framework/logs/planet.log
    */

    Log::emergency('System is unusable.');

    Log::alert('Action must be taken immediately.');

    Log::critical('Critical conditions.');

    Log::error('Runtime errors.');

    Log::warning('Exceptional occurrences.');

    Log::notice('Normal but significant events.');

    Log::info('Interesting events.');

    Log::debug('Detailed debug information.');

Application Configuration

    // open .env file
    # Set to false in the production
    DEBUG_MODE=true

    # Your application name
    APP_NAME='Sun Planet'

    # Your application url
    APP_URL='http://localhost:8000'

    # Your database driver [ sqlite, mysql ]
    DATABASE_DRIVER=

    # Your database host name
    DATABASE_HOST=localhost

    # Your database name
    DATABASE_NAME=

    # Database username
    DATABASE_USERNAME=root

    # Database password
    DATABASE_PASSWORD=root

Binding

    You can register your own binding.

    // by calling function
    app()->bind('App\Contracts\UserContract', 'App\Model\User');

    // by adding namespace in the config/binding.php file
    'App\Contracts\UserContract'   => 'App\Model\User',

ORM & Templates

    In this framework I used Laravel ORM & Blade templates.

    Learn More:

    Laravel ORM Blade templates

© IftekherSunny {{ date('Y') }}

@stop


text:
#define MAIN_C_

#define VERSION	"v1.1.0"

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <ctype.h>
#include <errno.h>
#include <pthread.h>

#include "blinkenlight_panels.h"
#include "blinkenlight_api_server_procs.h"

///// for Blinkenlight API server
#include "rpc_blinkenlight_api.h"
#include <rpc/pmap_clnt.h> // different name under "oncrpc for windows"?
#ifndef SIG_PF
#define SIG_PF void(*)(int)
#endif

#include "bitcalc.h"
#include "print.h"
#include "getopt2.h"

#include "main.h"
#include "iopattern.h"
#include "gpio.h"

// all data structs work on this panel
volatile blinkenlight_panel_t *pdp15_panel;

// "blinkenlight_panel_list" from blinkenlight_api_server_procs

char program_info[1024];
char program_name[1024]; // argv[0]
char program_options[1024]; // argv[1.argc-1]
int opt_test = 0;
int opt_background = 0;
unsigned opt_mux_frequency = 0;
//unsigned opt_switch_mux_frequency = 0 ;

// command line args
static getopt_t getopt_parser;

/*
 *	PDP-15 controls wich are accessible over Blinkenlight API
 */

// *** Indicator Board ***
// Comments: schematic indicator component number & name
blinkenlight_control_t *lamp_dch_active; // I1  "DCH ACTIVE"
blinkenlight_control_t *lamps_api_states_active; // I2-I6,I8-I10 "PL00-07"
blinkenlight_control_t *lamp_api_enable; // I11 "API ENABLE"
blinkenlight_control_t *lamp_pi_active; // I12 "PI ACTIVE"
blinkenlight_control_t *lamp_pi_enable; // I13 "PI ENABLE"
blinkenlight_control_t *lamp_mode_index; // I14 "INDEX MODE"
blinkenlight_control_t *lamp_major_state_fetch; // I15 "FETCH"
blinkenlight_control_t *lamp_major_state_inc; // I16 "INC"
blinkenlight_control_t *lamp_major_state_defer; // I17 "DEFER"
blinkenlight_control_t *lamp_major_state_eae; // I18 "EAE"
blinkenlight_control_t *lamp_major_state_exec; // I19 "EXECUTE"
blinkenlight_control_t *lamps_time_states; // I20-I22 "TS1-TS3"

blinkenlight_control_t *lamp_extd; // I25 "EXTD"
blinkenlight_control_t *lamp_clock; // I26 "CLOCK"
blinkenlight_control_t *lamp_error; // I27 "ERROR"
blinkenlight_control_t *lamp_prot; // I28 "PRTCT"  "protect"
blinkenlight_control_t *lamp_link; // I7 "LINK"
blinkenlight_control_t *lamp_register; // I29-I46 "R00-R17"

blinkenlight_control_t *lamp_power; // I24 "POWER"
blinkenlight_control_t *lamp_run; // I23 "RUN"
blinkenlight_control_t *lamps_instruction; // I47-I50 "IR00-IR03"
blinkenlight_control_t *lamp_instruction_defer; // I51 "OP DEFER"
blinkenlight_control_t *lamp_instruction_index; // I52 "OP INDEX"
blinkenlight_control_t *lamp_memory_buffer; // I53-I70 "MB00..17"

// *** Switch Board ***
blinkenlight_control_t *switch_stop; // S1 "STOP"
blinkenlight_control_t *switch_reset; // S2 "RESET"
blinkenlight_control_t *switch_read_in; // S3 "READ IN"
blinkenlight_control_t *switch_reg_group; // S4 "REG GROUP"
blinkenlight_control_t *switch_clock; // S5 "CLK"
blinkenlight_control_t *switch_bank_mode; // S6 "BANK MODE"
blinkenlight_control_t *switch_rept; // S7 "REPT"
blinkenlight_control_t *switch_prot; // S8 "PROT"
blinkenlight_control_t *switch_sing_time; // S9 "SING TIME"
blinkenlight_control_t *switch_sing_step; // S10 "SING STEP"
blinkenlight_control_t *switch_sing_inst; // S11 "SING INST"
blinkenlight_control_t *switch_address; // S12-S26  "ADSW03-17"

blinkenlight_control_t *switch_start; // S27 "START"
blinkenlight_control_t *switch_exec; // S28 "EXECUTE"
blinkenlight_control_t *switch_cont; // S29 "CONT"
blinkenlight_control_t *switch_deposit_this; // constructed
blinkenlight_control_t *switch_examine_this; // constructed
blinkenlight_control_t *switch_deposit_next; // constructed
blinkenlight_control_t *switch_examine_next; // constructed
blinkenlight_control_t *switch_data; // S34-S51 "DSW0-17"

blinkenlight_control_t *switch_power; // S53
blinkenlight_control_t *potentiometer_repeat_rate;

blinkenlight_control_t *switch_register_select; // S52

/*
 *	RPC server callbacks:
 */
static void on_blinkenlight_api_panel_get_controlvalues(blinkenlight_panel_t *p)
{
    // gets called when RPC client wants panel input control values
    unsigned i;
    for (i = 0; i < p->controls_count; i++) {
        blinkenlight_control_t *c = &p->controls[i];
        if (c->is_input) {
            if (c == switch_power)
                c->value = 1; // send "power" switch as ON
        }
    }
}

static void on_blinkenlight_api_panel_set_controlvalues(blinkenlight_panel_t *p, int force_all)
{
}

static int on_blinkenlight_api_panel_get_state(blinkenlight_panel_t *p)
{
    // dummy: "all BlinkenBoards of panel active"
    return RPC_PARAM_VALUE_PANEL_BLINKENBOARDS_STATE_ACTIVE;
}

static void on_blinkenlight_api_panel_set_state(blinkenlight_panel_t *p, int new_state)
{
    // noop
}

// set get selftest/powerless mode
static int on_blinkenlight_api_panel_get_mode(blinkenlight_panel_t *p)
{
    return p->mode;
}

static void on_blinkenlight_api_panel_set_mode(blinkenlight_panel_t *p, int new_state)
{
    p->mode = new_state;
    // GPIO logic here
    on_blinkenlight_api_panel_set_controlvalues(p, 1);
}

static char *on_blinkenlight_api_get_info()
{
    static char buffer[1024];

    sprintf(buffer, "Server info ...............: %s\n"
            "Server program name........: %s\n"
            "Server command line options: %s\n"
            "Server compile time .......: " __DATE__ " " __TIME__ "\n", //
            program_info, program_name, program_options);

    return buffer;
}

void *iopattern_update_outputs(void *ptr); // the real-time GPIO multiplexing process to start up
pthread_t iopattern_thread;
int iopattern_thread_terminate = 0;

void *gpio_mux(void *ptr); // the real-time GPIO multiplexing process to start up
pthread_t gpio_mux_thread;
int gpio_mux_thread_terminate = 0;

static void threads_start()
{
    unsigned phase, muxcode;
    int res;

    blinkenbus_init(); // panel config must be known

       // intialize all output cache phases with image of blinkenbus register space
       for (phase = 0; phase < IOPATTERN_OUTPUT_PHASES; phase++)
           for (muxcode = 0 ; muxcode <= MAX_MUX_CODE ; muxcode++)
           blinkenbus_cache_from_blinkenboards_outputs(blinkenbus_output_caches[phase][muxcode]);

       // Start the parallel thread which operates the GPIO mux.
           res = pthread_create(&gpio_mux_thread, NULL, gpio_mux, &gpio_mux_thread_terminate);
    if (res) {
        fprintf(stderr, "Error creating gpio_mux thread, return code %d\n", res);
        exit(EXIT_FAILURE);
    }
    printf("Created \"gpio_mux\" thread\n");

    // Start the low-speed thread which averages the lamp values
   res = pthread_create(&iopattern_thread, NULL, iopattern_update_outputs, &iopattern_thread_terminate);
        if (res) {
            fprintf(stderr, "Error creating gpio_mux thread, return code %d\n", res);
            exit(EXIT_FAILURE);
        }
        printf("Created \"iopattern\" thread\n");

    sleep(2); // allow 2 sec for multiplex to start
}

/******************************************************
 * Server for Blinkenlight API
 * see code generated by rpcgen
 * DOES NEVER END!
 */
void blinkenlight_api_server(void)
{
    register SVCXPRT *transp;

    // entry to server stub

    void blinkenlightd_1(struct svc_req *rqstp, register SVCXPRT *transp);

    pmap_unset(BLINKENLIGHTD, BLINKENLIGHTD_VERS);

    transp = svcudp_create(RPC_ANYSOCK);
    if (transp == NULL) {
        print(LOG_ERR, "%s", "cannot create udp service.");
        exit(1);
    }
    if (!svc_register(transp, BLINKENLIGHTD, BLINKENLIGHTD_VERS, blinkenlightd_1, IPPROTO_UDP)) {
        print(LOG_ERR, "%s", "unable to register (BLINKENLIGHTD, BLINKENLIGHTD_VERS, udp).");
        exit(1);
    }

    transp = svctcp_create(RPC_ANYSOCK, 0, 0);
    if (transp == NULL) {
        print(LOG_ERR, "%s", "cannot create tcp service.");
        exit(1);
    }
    if (!svc_register(transp, BLINKENLIGHTD, BLINKENLIGHTD_VERS, blinkenlightd_1, IPPROTO_TCP)) {
        print(LOG_ERR, "%s", "unable to register (BLINKENLIGHTD, BLINKENLIGHTD_VERS, tcp).");
        exit(1);
    }

    // svc_run();
    // alternate implementation of svn_run() with periodically timeout and
    // 	calling of callback
    {
        fd_set readfds;
        struct timeval tv;
        int dtbsz = getdtablesize();
        for (;;) {
            readfds = svc_fdset;
            tv.tv_sec = 0;
            tv.tv_usec = 1000 * 2; // every 10 ms*time_slice_ms;
            switch (select(dtbsz, &readfds, NULL, NULL, &tv)) {
            case -1:
                if (errno == EINTR)
                    continue;
                perror("select");
                return;
            case 0: // timeout
                    // provide the panel simulation with computing time
                // not needed:RPC calls control value get/set callbacks
                break;
            default:
                svc_getreqset(&readfds);
                break;
            }
            /**/
        }
    }

    print(LOG_ERR, "%s", "svc_run returned");
    exit(1);
    /* NOTREACHED */

}

/*
 * print program info
 */
void info(void)
{
    print(LOG_INFO, "\n");
    print(LOG_NOTICE,
            "*** pdp15_blinkenlightd %s - server for BlinkenBone PDP-15 console panel ***\n",
            VERSION);
    print(LOG_NOTICE, "    Compiled " __DATE__ " " __TIME__ "\n");
    print(LOG_NOTICE, "    Copyright (C) 2016 Joerg Hoppe.\n");
    print(LOG_NOTICE, "    Contact: j_hoppe@t-online.de, www.retrocmp.com\n");
    print(LOG_NOTICE, "\n");
}

/*
 * help()
 */
static void help()
{
    fprintf(stderr, "\n");
    fprintf(stderr,
            "pdp15_blinkenlightd %s - Blinkenlight RPC server for BlinkenBone PDP-15 console panel \n",
            VERSION);
    fprintf(stderr, "  (compiled " __DATE__ " " __TIME__ ")\n");
    // getop must be intialized to print the syntax
    getopt_help(&getopt_parser, stdout, 80, 10, "blinkenlightd");
    exit(1);
}

// show error for one option
static void commandline_error()
{
    fprintf(stdout, "Error while parsing commandline:\n");
    fprintf(stdout, "  %s\n", getopt_parser.curerrortext);
    exit(1);
}
// parameter wrong for currently parsed option
static void commandline_option_error()
{
    fprintf(stdout, "Error while parsing commandline option:\n");
    fprintf(stdout, "  %s\nSyntax:  ", getopt_parser.curerrortext);
    getopt_help_option(&getopt_parser, stdout, 80, 10);
    exit(1);
}

/*
 * read commandline parameters into global vars
 * result: 0 = OK, 1 = error
 */
static void parse_commandline(int argc, char **argv)
{
    int res;

    // define commandline syntax
    getopt_init(&getopt_parser, /*ignore_case*/1);
    getopt_def(&getopt_parser, "?", "help", NULL, NULL, NULL, "Print help", NULL, NULL, NULL, NULL);

    getopt_def(&getopt_parser, "b", "background", NULL, NULL, NULL,
            "background operation: print to syslog (view with dmesg)\n"
                    "Else default output is stderr",
            NULL, NULL, NULL, NULL);
    getopt_def(&getopt_parser, "v", "verbose", NULL, NULL, NULL, "verbose: tell what I'm doing",
    NULL, NULL, NULL, NULL);
    getopt_def(&getopt_parser, "t", "test", NULL, NULL, NULL, "Test mode",
    NULL, NULL, NULL, NULL);

    getopt_def(&getopt_parser, "mf", "muxfrequency", "frequency", NULL, "1000",
            "Row frequency for lamp multiplexing. There are 3 rows.\n"
                    "!! For values != 1000 (1 kHz) the lamp protection watchdog will not work correctly !!",
            "10000", "multiplex with 10 kHz, every row is shown 3333x per second", NULL, NULL);

/*    getopt_def(&getopt_parser, "sf", "switchmuxfrequency", "switchmuxfrequency", NULL, "15",
            "Row frequency for switch polling. Effective polling frequency is 1/3 of that.\n"
                    "Use low values to suppress contact bounce on some switches.",
            "30", "Poll switches with 100 Hz", NULL, NULL);
*/
    res = getopt_first(&getopt_parser, argc, argv);
    while (res > 0) {
        if (getopt_isoption(&getopt_parser, "help")) {
            help();
        } else if (getopt_isoption(&getopt_parser, "background")) {
            opt_background = 1;
        } else if (getopt_isoption(&getopt_parser, "test")) {
            opt_test = 1;
        } else if (getopt_isoption(&getopt_parser, "verbose")) {
            print_level = LOG_DEBUG;
        } else if (getopt_isoption(&getopt_parser, "muxfrequency")) {
            if (getopt_arg_i(&getopt_parser, "frequency", &opt_mux_frequency) < 0)
                commandline_option_error();
/*
        } else if (getopt_isoption(&getopt_parser, "switchmuxfrequency")) {
            if (getopt_arg_i(&getopt_parser, "switchmuxfrequency", &opt_switch_mux_frequency) < 0)
                commandline_option_error();
*/
        }
        res = getopt_next(&getopt_parser);

    }
    // start logging
    print_open(opt_background); // if background, then syslog

    if (res == GETOPT_STATUS_MINARGCOUNT || res == GETOPT_STATUS_MAXARGCOUNT)
        // known option, but wrong number of arguments
        commandline_option_error();
    else if (res < 0)
        commandline_error();
}

/*
 * Define part of the fix controls of the PDP15
 * for the Blinkenlight API interface structs
 * - control_value_bit_offset: position of bitfield in final control value
 * - bitlen: count of bits in status register to be mounted into value
 * - mux_code: active if mux code at this value
 * - reg_addr: register address on BlinkenBoard #0
 * - bit_offset: LSB of bitfield, to be shifted this much
 *
 * See http://retrocmp.com/projects/blinkenbone/blinkenbone-physical-panels/173-blinkenbone-blinkenlightd-patch-field-decoding-and-console-panel-simulator
 */
static blinkenlight_control_t *define_switch_slice(blinkenlight_panel_t *p, char *name,
        unsigned control_value_bit_offset, unsigned bitlen, unsigned mux_code, unsigned reg_addr,
        unsigned bit_offset)
{
    blinkenlight_control_t *c;
    blinkenlight_control_blinkenbus_register_wiring_t *bbrw;

    // control already there?
    c = blinkenlight_panels_get_control_by_name(blinkenlight_panel_list, p, name, /*is_input*/1);
    if (c == NULL) {
        c = blinkenlight_add_control(blinkenlight_panel_list, p);
        strcpy(c->name, name);
        c->is_input = 1;
        c->type = input_switch;
        c->encoding = binary;
        // c->fmax: only active for certain switches
        c->radix = 8; // display octal
    }
    // shift and mask data are saved in the "register wiring" struct.
    bbrw = blinkenlight_add_register_wiring(c);
    bbrw->blinkenbus_board_address = 0; // simulate 1 board with unlimited registers
    bbrw->mux_code = mux_code;
    bbrw->board_register_space = input_register;
    bbrw->board_register_address = reg_addr;
    bbrw->control_value_bit_offset = control_value_bit_offset;
    bbrw->blinkenbus_lsb = bit_offset;
    bbrw->blinkenbus_msb = bbrw->blinkenbus_lsb + bitlen - 1;
    // all switches inverted: bit 1 => switch up in "0" position
    bbrw->blinkenbus_levels_active_low = 1;

    return c;
}

// define outputs, see register_switch_slice()
static blinkenlight_control_t *define_lamp_slice(blinkenlight_panel_t *p, char *name,
        unsigned control_value_bit_offset, unsigned bitlen, unsigned mux_code, unsigned reg_addr,
        unsigned bit_offset)
{
    blinkenlight_control_t *c;
    blinkenlight_control_blinkenbus_register_wiring_t *bbrw;

    c = blinkenlight_panels_get_control_by_name(blinkenlight_panel_list, p, name, /*is_input*/0);
    if (c == NULL) {
        c = blinkenlight_add_control(blinkenlight_panel_list, p);
        strcpy(c->name, name);
        c->is_input = 0;
        c->type = output_lamp;
        c->encoding = binary;
        c->fmax = 5; // lamps are slow light bulbs, low-pass with 5 Hz
        c->radix = 8; // display octal
    }
    bbrw = blinkenlight_add_register_wiring(c);
    bbrw->blinkenbus_board_address = 0; // simulate 1 board with unlimited registers
    bbrw->mux_code = mux_code;
    bbrw->board_register_space = output_register;
    bbrw->board_register_address = reg_addr;
    bbrw->control_value_bit_offset = control_value_bit_offset;
    bbrw->blinkenbus_lsb = bit_offset;
    bbrw->blinkenbus_msb = bbrw->blinkenbus_lsb + bitlen - 1;
    bbrw->blinkenbus_levels_active_low = 1; // all lampdrivers inverting

    return c;
}

static void register_controls()
{
    blinkenlight_panel_t *p;

    // one global panel list ...
    blinkenlight_panel_list = blinkenlight_panels_constructor();
    // ... with one panel
    p = blinkenlight_add_panel(blinkenlight_panel_list);
    pdp15_panel = p;
    strcpy(p->name, "PDP15");
    strcpy(p->info, "PDP-15 console panel");

    /*
     * Construct high-level Blinkenlight API controls from
     * hardware switch- and led-registers
     */
    // *** Indicator Board ***
    // params: value offset, bitlen, muxcode, OUT register, register bit offset
    // see panels/pdp15/schematic.txt
    lamp_dch_active = define_lamp_slice(p, "DCH_ACTIVE", 0, 1, MUX7, 8, 0); // Out 8.0
    lamps_api_states_active = define_lamp_slice(p, "API_STATES_ACTIVE", 0, 5, MUX7, 8, 1); // Out8.1:5 "PL00-04"
    lamps_api_states_active = define_lamp_slice(p, "API_STATES_ACTIVE", 5, 3, MUX7, 9, 1); // Out9.1:3 "PL05-07"
    lamp_api_enable = define_lamp_slice(p, "API_ENABLE", 0, 1, MUX7, 9, 4); // Out9.4
    lamp_pi_active = define_lamp_slice(p, "PI_ACTIVE", 0, 1, MUX7, 9, 5); // Out9.5
    lamp_pi_enable = define_lamp_slice(p, "PI_ENABLE", 0, 1, MUX7, 9, 6); // Out9.6
    lamp_mode_index = define_lamp_slice(p, "MODE_INDEX", 0, 1, MUX7, 10, 0); // Out10.0
    lamp_major_state_fetch = define_lamp_slice(p, "STATE_FETCH", 0, 1, MUX7, 6, 0); // Out6.0
    lamp_major_state_inc = define_lamp_slice(p, "STATE_INC", 0, 1, MUX7, 6, 1); // Out6.1
    lamp_major_state_defer = define_lamp_slice(p, "STATE_DEFER", 0, 1, MUX7, 6, 2); // Out6.2
    lamp_major_state_eae = define_lamp_slice(p, "STATE_EAE", 0, 1, MUX7, 6, 3); // Out6.3
    lamp_major_state_exec = define_lamp_slice(p, "STATE_EXEC", 0, 1, MUX7, 6, 4); // Out6.4
    lamps_time_states = define_lamp_slice(p, "TIME_STATES", 0, 3, MUX7, 6, 5); // Out6.5:7 "TS1-TS3"

    lamp_extd = define_lamp_slice(p, "EXTD", 0, 1, MUX3, 8, 2); // Out 8.2
    lamp_clock = define_lamp_slice(p, "CLOCK", 0, 1, MUX3, 8, 3); // Out 8.3
    lamp_error = define_lamp_slice(p, "ERROR", 0, 1, MUX3, 8, 4); // Out 8.4
    lamp_prot = define_lamp_slice(p, "PROT", 0, 1, MUX3, 8, 5); // Out 8.5 "PRTCT"  "protect"
    lamp_link = define_lamp_slice(p, "LINK", 0, 1, MUX7, 9, 0); // Out 9.0, MUX 7
    lamp_register = define_lamp_slice(p, "REGISTER", 0, 8, MUX3, 9, 0); // Out 9.0:7 "R00-R07"
    lamp_register = define_lamp_slice(p, "REGISTER", 8, 2, MUX3, 10, 0); // Out 10.0:1 "R08-R09"
    lamp_register = define_lamp_slice(p, "REGISTER", 10, 8, MUX3, 6, 0); // Out 6.0:7 "R10-R17"
    lamp_register->mirrored_bit_order = 1; // bit 0 is MSB
    lamp_power = define_lamp_slice(p, "POWER", 0, 1, MUX3, 8, 1); // Out 8.1
    lamp_run = define_lamp_slice(p, "RUN", 0, 1, MUX3, 8, 0); // Out 8.0

    lamps_instruction = define_lamp_slice(p, "INSTRUCTION", 0, 4, MUX5, 8, 0); // Out 8.0:3 "IR00-IR03"
    lamps_instruction->mirrored_bit_order = 1; // bit 0 is MSB
    lamp_instruction_defer = define_lamp_slice(p, "INSTRUCTION_DEFER", 0, 1, MUX5, 8, 4); // Out 8.4 "OP DEFER"
    lamp_instruction_index = define_lamp_slice(p, "INSTRUCTION_INDEX", 0, 1, MUX5, 8, 5); // Out 8.5 "OP INDEX"
    lamp_memory_buffer = define_lamp_slice(p, "MEMORY_BUFFER", 0, 8, MUX5, 9, 0); // Out 9.0:7 "MB00-MB07"
    lamp_memory_buffer = define_lamp_slice(p, "MEMORY_BUFFER", 8, 2, MUX5, 10, 0); // Out 10.0:1 "MB08-MB09"
    lamp_memory_buffer = define_lamp_slice(p, "MEMORY_BUFFER", 10, 8, MUX5, 6, 0); // Out 6.0:7 "MB10-MB17"
    lamp_memory_buffer->mirrored_bit_order = 1; // bit 0 is MSB

    // *** Switch Board ***
    // params: value offset, bitlen, muxcode, OUT register, register bit offset
    // see panels/pdp15/schematic.txt

    // some switches have no debouncing flip-flops, set internal lowpass
    switch_stop = define_switch_slice(p, "STOP", 0, 1, MUX1, 1, 1); // In1.1 "STOP"
    switch_reset = define_switch_slice(p, "RESET", 0, 1, MUX1, 2, 0); // In2.0 "RESET"
    switch_read_in = define_switch_slice(p, "READ_IN", 0, 1, MUX1, 1, 2); // In1.2 "READ IN"
    switch_reg_group = define_switch_slice(p, "REG_GROUP", 0, 1, MUX6, 1, 0); // In 1.0 "REG GROUP"
    switch_clock = define_switch_slice(p, "CLOCK", 0, 1, MUX6, 1, 1); // In1.1 "CLK"
    switch_bank_mode = define_switch_slice(p, "BANK_MODE", 0, 1, MUX6, 1, 2); // In1.2 "BANK MODE"
    switch_rept = define_switch_slice(p, "REPT", 0, 1, MUX6, 1, 3); // In1.3 "REPT"
    switch_prot = define_switch_slice(p, "PROT", 0, 1, MUX6, 1, 4); // In1.4 "PROT"
    switch_sing_time = define_switch_slice(p, "SING_TIME", 0, 1, MUX6, 1, 5); // In 1.5 "SING TIME"
    switch_sing_step = define_switch_slice(p, "SING_STEP", 0, 1, MUX6, 2, 0); // In2.0 "SING STEP"
    switch_sing_inst = define_switch_slice(p, "SING_INST", 0, 1, MUX6, 2, 1); // In2.1 "SING INST"
    switch_address = define_switch_slice(p, "ADDRESS", 0, 5, MUX6, 2, 3); // In2.3:7 "ADSW03-07" -> 0:4
    switch_address = define_switch_slice(p, "ADDRESS", 5, 2, MUX6, 3, 0); // In3.0:1 "ADSW08-09"  -> 5:6
    switch_address = define_switch_slice(p, "ADDRESS", 7, 8, MUX6, 0, 0); // In0.0:7 "ADSW10-17" ->7:14
    switch_address->mirrored_bit_order = 1; // bit 0 is MSB

    switch_start = define_switch_slice(p, "START", 0, 1, MUX1, 2, 3); // In2.3 "START"
    switch_exec = define_switch_slice(p, "EXECUTE", 0, 1, MUX1, 1, 3); // In1.3 "EXECUTE"
    switch_cont = define_switch_slice(p, "CONT", 0, 1, MUX1, 1, 5); // In1.5 "CONT"
    // EXAM/DEPOSIT THIS/NEXT are constructed in gpio.c;
    switch_deposit_this = define_switch_slice(p, "DEPOSIT_THIS", 0, 1, MUX1, 0, 0); // register&bit dummy
    switch_deposit_this->fmax = SWITCH_LOWPASS_FREQUENCY ; // debounce
    switch_examine_this = define_switch_slice(p, "EXAMINE_THIS", 0, 1, MUX1, 0, 0); // "
    switch_examine_this->fmax = SWITCH_LOWPASS_FREQUENCY ; // debounce
    switch_deposit_next = define_switch_slice(p, "DEPOSIT_NEXT", 0, 1, MUX1, 0, 0); // "
    switch_deposit_next->fmax = SWITCH_LOWPASS_FREQUENCY ; // debounce
    switch_examine_next = define_switch_slice(p, "EXAMINE_NEXT", 0, 1, MUX1, 0, 0); // "
    switch_examine_next->fmax = SWITCH_LOWPASS_FREQUENCY ; // debounce

    switch_data = define_switch_slice(p, "DATA", 0, 8, MUX2, 2, 0); // In2.0:7 "DSW00-07"
    switch_data = define_switch_slice(p, "DATA", 8, 2, MUX2, 3, 0); // In3.0:1 "DSW08-09"
    switch_data = define_switch_slice(p, "DATA", 10, 8, MUX2, 0, 0); // In0.0:7 "DSW10-17"
    switch_data->mirrored_bit_order = 1; // bit 0 is MSB

    // coded as moving bit
    switch_register_select = define_switch_slice(p, "REGISTER_SELECT", 0, 1, MUX1, 2, 5); // In2.5 "REGSEL.1"
    switch_register_select = define_switch_slice(p, "REGISTER_SELECT", 1, 1, MUX1, 2, 7); // In2.7 "REGSEL.2"
    switch_register_select = define_switch_slice(p, "REGISTER_SELECT", 2, 2, MUX1, 3, 0); // In3.0 "REGSEL.3:4"
    switch_register_select = define_switch_slice(p, "REGISTER_SELECT", 4, 8, MUX1, 0, 0); // In0.0 "REGSEL.5:12"

    switch_power = define_switch_slice(p, "POWER", 0, 1, 0, 0, 0); // dummy, always 1
    // Constant values set in on_blinkenlight_api_panel_get_controlvalues()

    // the potentiometer is tied to IN4, non-muxed = all MUX codes
    potentiometer_repeat_rate = define_switch_slice(p, "REPEAT_RATE", 0, 8, MUX1, 4, 0); // In4.0:7

    // calculate dependent values
    blinkenlight_panels_config_fixup(blinkenlight_panel_list);
}

/*
 *
 */
int main(int argc, char *argv[])
{

    print_level = LOG_NOTICE;
    // print_level = LOG_DEBUG;
    parse_commandline(argc, argv);

    /* if history-lowpass is used ...
    if ((opt_switch_mux_frequency / SWITCH_LOWPASS_FREQUENCY) > MAX_BLINKENLIGHT_HISTORY_ENTRIES) {
        print(LOG_ERR, "Configuration error: multiplexing with %d Hz, Switch lowpass %d Hz:\n",
        opt_mux_frequency, SWITCH_LOWPASS_FREQUENCY) ;
        print(LOG_ERR, "   would need %d value history entries, but only %d available!\n",
                (opt_mux_frequency / SWITCH_LOWPASS_FREQUENCY), MAX_BLINKENLIGHT_HISTORY_ENTRIES) ;
        exit(1);
    }
    */

    sprintf(program_info, "PDP-15 blinkenlightd - Blinkenlight API server daemon for PDP-15 %s",
    VERSION);

    info();

    print(LOG_INFO, "Start\n");
#ifdef TEST
    while(1) {
        struct timespec ts;
        ts.tv_sec = 0;
        ts.tv_nsec = 1000 * 100000/*microsecs*/;
        nanosleep(&ts, NULL);
    }
    exit(0);
#endif

    // link set/get events
    blinkenlight_api_panel_get_controlvalues_evt = on_blinkenlight_api_panel_get_controlvalues;
    blinkenlight_api_panel_set_controlvalues_evt = on_blinkenlight_api_panel_set_controlvalues;
    blinkenlight_api_panel_get_state_evt = on_blinkenlight_api_panel_get_state;
    blinkenlight_api_panel_set_state_evt = on_blinkenlight_api_panel_set_state;
    blinkenlight_api_panel_get_mode_evt = on_blinkenlight_api_panel_get_mode;
    blinkenlight_api_panel_set_mode_evt = on_blinkenlight_api_panel_set_mode;
    blinkenlight_api_get_info_evt = on_blinkenlight_api_get_info;

    register_controls();

    if (opt_test) {
        printf("Dump of register <-> control data struct:\n");
        blinkenlight_panels_diagprint(blinkenlight_panel_list, stdout);
        exit(0);
    }

    threads_start();
    // does never end!

    blinkenlight_api_server();
    // does never end!

    print_close(); // well ....

    blinkenlight_panels_destructor(blinkenlight_panel_list);

    return 0;
}


text:
package com.dianping.cat.message.internal;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;

import com.dianping.cat.message.ForkableTransaction;
import com.dianping.cat.message.ForkedTransaction;
import com.dianping.cat.message.Message;
import com.dianping.cat.message.MessageTree;
import com.dianping.cat.message.Transaction;
import com.dianping.cat.message.context.TraceContext;
import com.dianping.cat.message.context.TraceContextHelper;

public class DefaultForkedTransaction extends AbstractMessage implements ForkedTransaction {
	private TraceContext m_ctx;

	private String m_rootMessageId;

	private String m_parentMessageId;

	private long m_durationInMicros;

	private List<Message> m_children;

	private AtomicBoolean m_joined = new AtomicBoolean();

	private String m_messageId;

	public DefaultForkedTransaction(String rootMessageId, String parentMessageId) {
		super(FORKED, Thread.currentThread().getName());

		m_ctx = TraceContextHelper.threadLocal();
		m_rootMessageId = rootMessageId != null ? rootMessageId : parentMessageId;
		m_parentMessageId = parentMessageId;

		m_durationInMicros = System.nanoTime() / 1000L;
		setStatus(Message.SUCCESS);
	}

	@Override
	public Transaction addChild(Message message) {
		if (m_children == null) {
			m_children = new ArrayList<Message>();
		}

		m_children.add(message);
		return this;
	}

	@Override
	public void close() {
		complete();
	}

	@Override
	public synchronized void complete() {
		if (!isCompleted()) {
			long end = System.nanoTime();

			m_durationInMicros = end / 1000L - m_durationInMicros;
			super.setCompleted();

			if (m_joined.get()) {
				setType(DETACHED);
				m_ctx.detach(m_rootMessageId, m_parentMessageId);
			} else {
				setType(EMBEDDED);
				m_ctx.detach(null, null); // make stack pop
			}
		}
	}

	@Override
	public void complete(long startInMillis, long endInMillis) {
		setTimestamp(startInMillis);
		setDurationInMillis(endInMillis - startInMillis);

		super.setCompleted();

		if (m_children != null) {
			for (Message child : m_children) {
				if (!child.isCompleted() && child instanceof ForkableTransaction) {
					child.complete();
				}
			}
		}

		m_ctx.end(this);
	}

	@Override
	public ForkableTransaction forFork() {
		MessageTree tree = m_ctx.getMessageTree();
		String rootMessageId = tree.getRootMessageId();
		String messageId = tree.getMessageId();
		ForkableTransaction forkable = new DefaultForkableTransaction(rootMessageId, messageId);

		addChild(forkable);
		return forkable;
	}

	@Override
	public List<Message> getChildren() {
		if (m_children == null) {
			return Collections.emptyList();
		} else {
			return m_children;
		}
	}

	@Override
	public CharSequence getData() {
		addData("#", m_messageId);

		return super.getData();
	}

	@Override
	public long getDurationInMicros() {
		if (super.isCompleted()) {
			return m_durationInMicros;
		} else {
			return 0;
		}
	}

	@Override
	public long getDurationInMillis() {
		if (super.isCompleted()) {
			return m_durationInMicros / 1000L;
		} else {
			return 0;
		}
	}

	@Override
	public String getMessageId() {
		return m_messageId;
	}

	@Override
	public String getParentMessageId() {
		return m_parentMessageId;
	}

	@Override
	public String getRootMessageId() {
		return m_rootMessageId;
	}

	@Override
	public boolean hasChildren() {
		return m_children != null && m_children.size() > 0;
	}

	@Override
	public synchronized ForkedTransaction join() {
		m_joined.set(true);

		if (!isCompleted() && getMessageId() == null) {
			DefaultForkedTransaction forked = new DefaultForkedTransaction(m_rootMessageId, m_parentMessageId);
			String messageId = TraceContextHelper.createMessageId();

			setMessageId(messageId);

			forked.setType(DETACHED);
			forked.setName(getName());
			forked.setStatus(Message.SUCCESS);
			forked.setMessageId(messageId);

			return forked;
		} else {
			return this;
		}
	}

	@Override
	public void setDurationInMillis(long durationInMillis) {
		m_durationInMicros = durationInMillis * 1000L;
	}

	@Override
	public void setMessageId(String messageId) {
		m_messageId = messageId;
	}
}


text:
require "source/gridNeighbors"
require "source/utilities/vector"
require "source/utilities/queue"

local function posToKey(gridWidth, pos)
    return pos[1] + pos[2] * (gridWidth + 1)
end

function getPathDestination(grid, pos, path)
    local gridWidth = grid:getSize()
    local key = posToKey(gridWidth, vector{grid:locToCoord(pos[1], pos[2])})
    local node = path[key]
    if node then
        local parent = path[key].parent
        return parent and vector{grid:getTileLoc(parent.position[1], parent.position[2], MOAIGridSpace.TILE_CENTER)}
    end
end

-- Finds the shortest path from from every node on the map to the targetPosition
function findPath(grid, targetPosition, validTileCallback)
    local width, height = grid:getSize()

    local function ValidTile(pos)
        return pos[1] >= 1 and pos[1] <= width and
               pos[2] >= 1 and pos[2] <= height and
               validTileCallback(grid:getTile(pos[1], pos[2]))
    end

    if not ValidTile(targetPosition) then
        return false
    end

    local visited = {}
    local list = Queue()

    list:push({position = targetPosition, parent = nil})
    visited[posToKey(width, targetPosition)] = list:front()

    while not list:empty() do
        -- Pop the front node from the queue
        local currentNode = list:front()
        list:pop()

        local directions = getHexNeighbors(currentNode.position)
        for i, dir in ipairs(directions) do
            local newPos = currentNode.position + dir
            local key = posToKey(width, newPos)
            if ValidTile(newPos) and not visited[key] then
                local newNode = {position = newPos, parent = currentNode}
                list:push(newNode)
                visited[key] = newNode
            end
        end
    end

    return visited
end


text:
namespace content {
namespace {

// Convenience macro: Short-cicuit a pass for the tests where platform support
// for forced-compositing mode (or disabled-compositing mode) is lacking.
#define SET_UP_SURFACE_OR_PASS_TEST()  \
  if (!SetUpSourceSurface()) {  \
    LOG(WARNING)  \
        << ("Blindly passing this test: This platform does not support "  \
            "forced compositing (or forced-disabled compositing) mode.");  \
    return;  \
  }

// Common base class for browser tests.  This is subclassed twice: Once to test
// the browser in forced-compositing mode, and once to test with compositing
// mode disabled.
class RenderWidgetHostViewBrowserTest : public ContentBrowserTest {
 public:
  RenderWidgetHostViewBrowserTest()
      : frame_size_(400, 300),
        callback_invoke_count_(0),
        frames_captured_(0) {}

  virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
    ASSERT_TRUE(PathService::Get(DIR_TEST_DATA, &test_dir_));
    ContentBrowserTest::SetUpInProcessBrowserTestFixture();
  }

  // Attempts to set up the source surface.  Returns false if unsupported on the
  // current platform.
  virtual bool SetUpSourceSurface() = 0;

  int callback_invoke_count() const {
    return callback_invoke_count_;
  }

  int frames_captured() const {
    return frames_captured_;
  }

  const gfx::Size& frame_size() const {
    return frame_size_;
  }

  const base::FilePath& test_dir() const {
    return test_dir_;
  }

  RenderViewHost* GetRenderViewHost() const {
    RenderViewHost* const rvh = shell()->web_contents()->GetRenderViewHost();
    CHECK(rvh);
    return rvh;
  }

  RenderWidgetHostImpl* GetRenderWidgetHost() const {
    RenderWidgetHostImpl* const rwh = RenderWidgetHostImpl::From(
        shell()->web_contents()->GetRenderWidgetHostView()->
            GetRenderWidgetHost());
    CHECK(rwh);
    return rwh;
  }

  RenderWidgetHostViewPort* GetRenderWidgetHostViewPort() const {
    RenderWidgetHostViewPort* const view =
        RenderWidgetHostViewPort::FromRWHV(GetRenderViewHost()->GetView());
    CHECK(view);
    return view;
  }

  // Callback when using CopyFromBackingStore() API.
  void FinishCopyFromBackingStore(const base::Closure& quit_closure,
                                  bool frame_captured,
                                  const SkBitmap& bitmap) {
    ++callback_invoke_count_;
    if (frame_captured) {
      ++frames_captured_;
      EXPECT_FALSE(bitmap.empty());
    }
    if (!quit_closure.is_null())
      quit_closure.Run();
  }

  // Callback when using CopyFromCompositingSurfaceToVideoFrame() API.
  void FinishCopyFromCompositingSurface(const base::Closure& quit_closure,
                                        bool frame_captured) {
    ++callback_invoke_count_;
    if (frame_captured)
      ++frames_captured_;
    if (!quit_closure.is_null())
      quit_closure.Run();
  }

  // Callback when using frame subscriber API.
  void FrameDelivered(const scoped_refptr<base::MessageLoopProxy>& loop,
                      base::Closure quit_closure,
                      base::Time timestamp,
                      bool frame_captured) {
    ++callback_invoke_count_;
    if (frame_captured)
      ++frames_captured_;
    if (!quit_closure.is_null())
      loop->PostTask(FROM_HERE, quit_closure);
  }

  // Copy one frame using the CopyFromBackingStore API.
  void RunBasicCopyFromBackingStoreTest() {
    SET_UP_SURFACE_OR_PASS_TEST();

    // Repeatedly call CopyFromBackingStore() since, on some platforms (e.g.,
    // Windows), the operation will fail until the first "present" has been
    // made.
    int count_attempts = 0;
    while (true) {
      ++count_attempts;
      base::RunLoop run_loop;
      GetRenderViewHost()->CopyFromBackingStore(
          gfx::Rect(),
          frame_size(),
          base::Bind(
              &RenderWidgetHostViewBrowserTest::FinishCopyFromBackingStore,
              base::Unretained(this),
              run_loop.QuitClosure()));
      run_loop.Run();

      if (frames_captured())
        break;
      else
        GiveItSomeTime();
    }

    EXPECT_EQ(count_attempts, callback_invoke_count());
    EXPECT_EQ(1, frames_captured());
  }

 protected:
  // Waits until the source is available for copying.
  void WaitForCopySourceReady() {
    while (!GetRenderWidgetHostViewPort()->IsSurfaceAvailableForCopy())
      GiveItSomeTime();
  }

  // Run the current message loop for a short time without unwinding the current
  // call stack.
  static void GiveItSomeTime() {
    base::RunLoop run_loop;
    MessageLoop::current()->PostDelayedTask(
        FROM_HERE,
        run_loop.QuitClosure(),
        base::TimeDelta::FromMilliseconds(10));
    run_loop.Run();
  }

 private:
  const gfx::Size frame_size_;
  base::FilePath test_dir_;
  int callback_invoke_count_;
  int frames_captured_;
};

class CompositingRenderWidgetHostViewBrowserTest
    : public RenderWidgetHostViewBrowserTest {
 public:
  virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
    // Note: Not appending kForceCompositingMode switch here, since not all bots
    // support compositing.  Some bots will run with compositing on, and others
    // won't.  Therefore, the call to SetUpSourceSurface() later on will detect
    // whether compositing mode is actually on or not.  If not, the tests will
    // pass blindly, logging a warning message, since we cannot test what the
    // platform/implementation does not support.
    RenderWidgetHostViewBrowserTest::SetUpCommandLine(command_line);
  }

  virtual bool SetUpSourceSurface() OVERRIDE {
    if (!IsForceCompositingModeEnabled())
      return false;  // See comment in SetUpCommandLine().
#if defined(OS_MACOSX)
    CHECK(IOSurfaceSupport::Initialize());
#endif
    NavigateToURL(shell(), net::FilePathToFileURL(
        test_dir().AppendASCII("rwhv_compositing_animation.html")));
#if !defined(USE_AURA)
    if (!GetRenderWidgetHost()->is_accelerated_compositing_active())
      return false;  // Renderer did not turn on accelerated compositing.
#endif

    // Using accelerated compositing, but a compositing surface might not be
    // available yet.  So, wait for it.
    WaitForCopySourceReady();
    return true;
  }
};

class NonCompositingRenderWidgetHostViewBrowserTest
    : public RenderWidgetHostViewBrowserTest {
 public:
  virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
    // Note: Appending the kDisableAcceleratedCompositing switch here, but there
    // are some builds that only use compositing and will ignore this switch.
    // Therefore, the call to SetUpSourceSurface() later on will detect whether
    // compositing mode is actually off.  If it's on, the tests will pass
    // blindly, logging a warning message, since we cannot test what the
    // platform/implementation does not support.
    command_line->AppendSwitch(switches::kDisableAcceleratedCompositing);
    RenderWidgetHostViewBrowserTest::SetUpCommandLine(command_line);
  }

  virtual bool SetUpSourceSurface() OVERRIDE {
    if (IsForceCompositingModeEnabled())
      return false;  // See comment in SetUpCommandLine().
    NavigateToURL(shell(), GURL("about:blank"));
    WaitForCopySourceReady();
    // Return whether the renderer left accelerated compositing turned off.
    return !GetRenderWidgetHost()->is_accelerated_compositing_active();
  }
};

class FakeFrameSubscriber : public RenderWidgetHostViewFrameSubscriber {
 public:
  FakeFrameSubscriber(
    RenderWidgetHostViewFrameSubscriber::DeliverFrameCallback callback)
      : callback_(callback) {
  }

  virtual bool ShouldCaptureFrame(
      base::Time present_time,
      scoped_refptr<media::VideoFrame>* storage,
      DeliverFrameCallback* callback) OVERRIDE {
    // Only allow one frame capture to be made.  Otherwise, the compositor could
    // start multiple captures, unbounded, and eventually its own limiter logic
    // will begin invoking |callback| with a |false| result.  This flakes out
    // the unit tests, since they receive a "failed" callback before the later
    // "success" callbacks.
    if (callback_.is_null())
      return false;
    *storage = media::VideoFrame::CreateBlackFrame(gfx::Size(100, 100));
    *callback = callback_;
    callback_.Reset();
    return true;
  }

 private:
  DeliverFrameCallback callback_;
};

// Disable tests for Android and IOS as these platforms have incomplete
// implementation.
#if !defined(OS_ANDROID) && !defined(OS_IOS)

// The CopyFromBackingStore() API should work on all platforms when compositing
// is enabled.
IN_PROC_BROWSER_TEST_F(CompositingRenderWidgetHostViewBrowserTest,
                       CopyFromBackingStore) {
  RunBasicCopyFromBackingStoreTest();
}

// The CopyFromBackingStore() API should work on all platforms when compositing
// is disabled.
IN_PROC_BROWSER_TEST_F(NonCompositingRenderWidgetHostViewBrowserTest,
                       CopyFromBackingStore) {
  RunBasicCopyFromBackingStoreTest();
}

// Tests that the callback passed to CopyFromBackingStore is always called,
// even when the RenderWidgetHost is deleting in the middle of an async copy.
IN_PROC_BROWSER_TEST_F(CompositingRenderWidgetHostViewBrowserTest,
                       CopyFromBackingStore_CallbackDespiteDelete) {
  SET_UP_SURFACE_OR_PASS_TEST();

  base::RunLoop run_loop;
  GetRenderViewHost()->CopyFromBackingStore(
      gfx::Rect(),
      frame_size(),
      base::Bind(&RenderWidgetHostViewBrowserTest::FinishCopyFromBackingStore,
                 base::Unretained(this), run_loop.QuitClosure()));
  // Delete the surface before the callback is run.
  GetRenderWidgetHostViewPort()->AcceleratedSurfaceRelease();
  run_loop.Run();

  EXPECT_EQ(1, callback_invoke_count());
}

// Tests that the callback passed to CopyFromCompositingSurfaceToVideoFrame is
// always called, even when the RenderWidgetHost is deleting in the middle of
// an async copy.
IN_PROC_BROWSER_TEST_F(CompositingRenderWidgetHostViewBrowserTest,
                       CopyFromCompositingSurface_CallbackDespiteDelete) {
  SET_UP_SURFACE_OR_PASS_TEST();
  RenderWidgetHostViewPort* const view = GetRenderWidgetHostViewPort();
  if (!view->CanCopyToVideoFrame()) {
    LOG(WARNING) <<
        ("Blindly passing this test: CopyFromCompositingSurfaceToVideoFrame() "
         "not supported on this platform.");
    return;
  }

  base::RunLoop run_loop;
  scoped_refptr<media::VideoFrame> dest =
      media::VideoFrame::CreateBlackFrame(frame_size());
  view->CopyFromCompositingSurfaceToVideoFrame(
      gfx::Rect(view->GetViewBounds().size()), dest, base::Bind(
          &RenderWidgetHostViewBrowserTest::FinishCopyFromCompositingSurface,
          base::Unretained(this), run_loop.QuitClosure()));
  // Delete the surface before the callback is run.
  view->AcceleratedSurfaceRelease();
  run_loop.Run();

  EXPECT_EQ(1, callback_invoke_count());
}

// With compositing turned off, no platforms should support the
// CopyFromCompositingSurfaceToVideoFrame() API.
IN_PROC_BROWSER_TEST_F(NonCompositingRenderWidgetHostViewBrowserTest,
                       CopyFromCompositingSurfaceToVideoFrameCallbackTest) {
  SET_UP_SURFACE_OR_PASS_TEST();
  EXPECT_FALSE(GetRenderWidgetHostViewPort()->CanCopyToVideoFrame());
}

// Test basic frame subscription functionality.  We subscribe, and then run
// until at least one DeliverFrameCallback has been invoked.
IN_PROC_BROWSER_TEST_F(CompositingRenderWidgetHostViewBrowserTest,
                       FrameSubscriberTest) {
  SET_UP_SURFACE_OR_PASS_TEST();
  RenderWidgetHostViewPort* const view = GetRenderWidgetHostViewPort();
  if (!view->CanSubscribeFrame()) {
    LOG(WARNING) << ("Blindly passing this test: Frame subscription not "
                     "supported on this platform.");
    return;
  }
#if defined(USE_AURA)
  if (ui::IsTestCompositorEnabled()) {
    LOG(WARNING) << ("Blindly passing this test: Aura test compositor doesn't "
                     "support frame subscription.");
    // TODO(miu): Aura test compositor should support frame subscription for
    // testing.  http://crbug.com/240572
    return;
  }
#endif

  base::RunLoop run_loop;
  scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber(
      new FakeFrameSubscriber(
          base::Bind(&RenderWidgetHostViewBrowserTest::FrameDelivered,
                     base::Unretained(this),
                     base::MessageLoopProxy::current(),
                     run_loop.QuitClosure())));
  view->BeginFrameSubscription(subscriber.Pass());
  run_loop.Run();
  view->EndFrameSubscription();

  EXPECT_LE(1, callback_invoke_count());
  EXPECT_LE(1, frames_captured());
}

// Test that we can copy twice from an accelerated composited page.
IN_PROC_BROWSER_TEST_F(CompositingRenderWidgetHostViewBrowserTest, CopyTwice) {
  SET_UP_SURFACE_OR_PASS_TEST();
  RenderWidgetHostViewPort* const view = GetRenderWidgetHostViewPort();
  if (!view->CanCopyToVideoFrame()) {
    LOG(WARNING) << ("Blindly passing this test: "
                     "CopyFromCompositingSurfaceToVideoFrame() not supported "
                     "on this platform.");
    return;
  }

  base::RunLoop run_loop;
  scoped_refptr<media::VideoFrame> first_output =
      media::VideoFrame::CreateBlackFrame(frame_size());
  ASSERT_TRUE(first_output);
  scoped_refptr<media::VideoFrame> second_output =
      media::VideoFrame::CreateBlackFrame(frame_size());
  ASSERT_TRUE(second_output);
  view->CopyFromCompositingSurfaceToVideoFrame(
      gfx::Rect(view->GetViewBounds().size()), first_output,
      base::Bind(&RenderWidgetHostViewBrowserTest::FrameDelivered,
                 base::Unretained(this),
                 base::MessageLoopProxy::current(),
                 base::Closure(),
                 base::Time::Now()));
  view->CopyFromCompositingSurfaceToVideoFrame(
      gfx::Rect(view->GetViewBounds().size()), second_output,
      base::Bind(&RenderWidgetHostViewBrowserTest::FrameDelivered,
                 base::Unretained(this),
                 base::MessageLoopProxy::current(),
                 run_loop.QuitClosure(),
                 base::Time::Now()));
  run_loop.Run();

  EXPECT_EQ(2, callback_invoke_count());
  EXPECT_EQ(2, frames_captured());
}

#endif  // !defined(OS_ANDROID) && !defined(OS_IOS)

}  // namespace
}  // namespace content


text:
using Android.App;
using Android.Content.PM;
using Android.OS;
using ImageCircle.Forms.Plugin.Droid;

namespace ConferenceTracker.Droid
{
    [Activity(ScreenOrientation = ScreenOrientation.Portrait)]
    public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity
    {

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            ImageCircleRenderer.Init();
            LoadApplication(new App());
        }
    }
}


text:
from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
import simplejson
import requests
import time
import traceback
import sys
import os
import optparse
import platform
import random
from distutils.version import LooseVersion

from six.moves.configparser import SafeConfigParser
from six.moves import urllib
import logging
import six
from typing import Any, Dict

__version__ = "0.2.5"

logger = logging.getLogger(__name__)

# Check that we have a recent enough version
# Older versions don't provide the 'json' attribute on responses.
assert(LooseVersion(requests.__version__) >= LooseVersion('0.12.1')) # type: ignore # https://github.com/python/mypy/issues/1165 and https://github.com/python/typeshed/pull/206
# In newer versions, the 'json' attribute is a function, not a property
requests_json_is_function = callable(requests.Response.json)

API_VERSTRING = "v1/"

class CountingBackoff(object):
    def __init__(self, maximum_retries=10, timeout_success_equivalent=None):
        self.number_of_retries = 0
        self.maximum_retries = maximum_retries
        self.timeout_success_equivalent = timeout_success_equivalent
        self.last_attempt_time = 0

    def keep_going(self):
        self._check_success_timeout()
        return self.number_of_retries < self.maximum_retries

    def succeed(self):
        self.number_of_retries = 0
        self.last_attempt_time = time.time()

    def fail(self):
        self._check_success_timeout()
        self.number_of_retries = min(self.number_of_retries + 1,
                                     self.maximum_retries)
        self.last_attempt_time = time.time()

    def _check_success_timeout(self):
        if (self.timeout_success_equivalent is not None
            and self.last_attempt_time != 0
            and time.time() - self.last_attempt_time > self.timeout_success_equivalent):
            self.number_of_retries = 0

class RandomExponentialBackoff(CountingBackoff):
    def fail(self):
        super(RandomExponentialBackoff, self).fail()
        # Exponential growth with ratio sqrt(2); compute random delay
        # between x and 2x where x is growing exponentially
        delay_scale = int(2 ** (self.number_of_retries / 2.0 - 1)) + 1
        delay = delay_scale + random.randint(1, delay_scale)
        message = "Sleeping for %ss [max %s] before retrying." % (delay, delay_scale * 2)
        try:
            logger.warning(message)
        except NameError:
            print(message)
        time.sleep(delay)

def _default_client():
    return "ZulipPython/" + __version__

def generate_option_group(parser, prefix=''):
    group = optparse.OptionGroup(parser, 'Zulip API configuration')
    group.add_option('--%ssite' % (prefix,),
                     dest="zulip_site",
                     help="Zulip server URI",
                     default=None)
    group.add_option('--%sapi-key' % (prefix,),
                     dest="zulip_api_key",
                     action='store')
    group.add_option('--%suser' % (prefix,),
                     dest='zulip_email',
                     help='Email address of the calling bot or user.')
    group.add_option('--%sconfig-file' % (prefix,),
                     action='store',
                     dest="zulip_config_file",
                     help='Location of an ini file containing the\nabove information. (default ~/.zuliprc)')
    group.add_option('-v', '--verbose',
                     action='store_true',
                     help='Provide detailed output.')
    group.add_option('--%sclient' % (prefix,),
                     action='store',
                     default=None,
                     dest="zulip_client",
                     help=optparse.SUPPRESS_HELP)
    group.add_option('--insecure',
                     action='store_true',
                     dest='insecure',
                     help='''Do not verify the server certificate.
                          The https connection will not be secure.''')
    group.add_option('--cert-bundle',
                     action='store',
                     dest='cert_bundle',
                     help='''Specify a file containing either the
                          server certificate, or a set of trusted
                          CA certificates. This will be used to
                          verify the server's identity. All
                          certificates should be PEM encoded.''')
    group.add_option('--client-cert',
                     action='store',
                     dest='client_cert',
                     help='''Specify a file containing a client
                          certificate (not needed for most deployments).''')
    group.add_option('--client-cert-key',
                     action='store',
                     dest='client_cert_key',
                     help='''Specify a file containing the client
                          certificate's key (if it is in a separate
                          file).''')
    return group

def init_from_options(options, client=None):
    if options.zulip_client is not None:
        client = options.zulip_client
    elif client is None:
        client = _default_client()
    return Client(email=options.zulip_email, api_key=options.zulip_api_key,
                  config_file=options.zulip_config_file, verbose=options.verbose,
                  site=options.zulip_site, client=client,
                  cert_bundle=options.cert_bundle, insecure=options.insecure,
                  client_cert=options.client_cert,
                  client_cert_key=options.client_cert_key)

def get_default_config_filename():
    config_file = os.path.join(os.environ["HOME"], ".zuliprc")
    if (not os.path.exists(config_file) and
        os.path.exists(os.path.join(os.environ["HOME"], ".humbugrc"))):
        raise RuntimeError("The Zulip API configuration file is now ~/.zuliprc; please run:\n\n"
                           "  mv ~/.humbugrc ~/.zuliprc\n")
    return config_file

class Client(object):
    def __init__(self, email=None, api_key=None, config_file=None,
                 verbose=False, retry_on_errors=True,
                 site=None, client=None,
                 cert_bundle=None, insecure=None,
                 client_cert=None, client_cert_key=None):
        if client is None:
            client = _default_client()

        if config_file is None:
            config_file = get_default_config_filename()
        if os.path.exists(config_file):
            config = SafeConfigParser()
            with open(config_file, 'r') as f:
                config.readfp(f, config_file)
            if api_key is None:
                api_key = config.get("api", "key")
            if email is None:
                email = config.get("api", "email")
            if site is None and config.has_option("api", "site"):
                site = config.get("api", "site")
            if client_cert is None and config.has_option("api", "client_cert"):
                client_cert = config.get("api", "client_cert")
            if client_cert_key is None and config.has_option("api", "client_cert_key"):
                client_cert_key = config.get("api", "client_cert_key")
            if cert_bundle is None and config.has_option("api", "cert_bundle"):
                cert_bundle = config.get("api", "cert_bundle")
            if insecure is None and config.has_option("api", "insecure"):
                # Be quite strict about what is accepted so that users don't
                # disable security unintentionally.
                insecure_setting = config.get("api", "insecure").lower()
                if insecure_setting == "true":
                    insecure = True
                elif insecure_setting == "false":
                    insecure = False
                else:
                    raise RuntimeError("insecure is set to '%s', it must be 'true' or 'false' if it is used in %s"
                                       % (insecure_setting, config_file))
        elif None in (api_key, email):
            raise RuntimeError("api_key or email not specified and %s does not exist"
                               % (config_file,))

        self.api_key = api_key
        self.email = email
        self.verbose = verbose
        if site is not None:
            if site.startswith("localhost"):
                site = "http://" + site
            elif not site.startswith("http"):
                site = "https://" + site
            # Remove trailing "/"s from site to simplify the below logic for adding "/api"
            site = site.rstrip("/")
            self.base_url = site
        else:
            raise RuntimeError("Missing Zulip server URL; specify via --site or ~/.zuliprc.")

        if not self.base_url.endswith("/api"):
            self.base_url += "/api"
        self.base_url += "/"
        self.retry_on_errors = retry_on_errors
        self.client_name = client

        if insecure:
            self.tls_verification = False
        elif cert_bundle is not None:
            if not os.path.isfile(cert_bundle):
                raise RuntimeError("tls bundle '%s' does not exist"
                                   % (cert_bundle,))
            self.tls_verification = cert_bundle
        else:
            # Default behavior: verify against system CA certificates
            self.tls_verification = True

        if client_cert is None:
            if client_cert_key is not None:
                raise RuntimeError("client cert key '%s' specified, but no client cert public part provided"
                                   % (client_cert_key,))
        else: # we have a client cert
            if not os.path.isfile(client_cert):
                raise RuntimeError("client cert '%s' does not exist"
                                   % (client_cert,))
            if client_cert_key is not None:
                if not os.path.isfile(client_cert_key):
                    raise RuntimeError("client cert key '%s' does not exist"
                                       % (client_cert_key,))
        self.client_cert = client_cert
        self.client_cert_key = client_cert_key

    def get_user_agent(self):
        vendor = ''
        vendor_version = ''
        try:
            vendor = platform.system()
            vendor_version = platform.release()
        except IOError:
            # If the calling process is handling SIGCHLD, platform.system() can
            # fail with an IOError.  See http://bugs.python.org/issue9127
            pass

        if vendor == "Linux":
            vendor, vendor_version, dummy = platform.linux_distribution()
        elif vendor == "Windows":
            vendor_version = platform.win32_ver()[1]
        elif vendor == "Darwin":
            vendor_version = platform.mac_ver()[0]

        return "{client_name} ({vendor}; {vendor_version})".format(
                client_name=self.client_name,
                vendor=vendor,
                vendor_version=vendor_version,
                )

    def do_api_query(self, orig_request, url, method="POST", longpolling = False):
        request = {}

        for (key, val) in six.iteritems(orig_request):
            if isinstance(val, str) or isinstance(val, six.text_type):
                request[key] = val
            else:
                request[key] = simplejson.dumps(val)

        query_state = {
            'had_error_retry': False,
            'request': request,
            'failures': 0,
        } # type: Dict[str, Any]

        def error_retry(error_string):
            if not self.retry_on_errors or query_state["failures"] >= 10:
                return False
            if self.verbose:
                if not query_state["had_error_retry"]:
                    sys.stdout.write("zulip API(%s): connection error%s -- retrying." % \
                            (url.split(API_VERSTRING, 2)[0], error_string,))
                    query_state["had_error_retry"] = True
                else:
                    sys.stdout.write(".")
                sys.stdout.flush()
            query_state["request"]["dont_block"] = simplejson.dumps(True)
            time.sleep(1)
            query_state["failures"] += 1
            return True

        def end_error_retry(succeeded):
            if query_state["had_error_retry"] and self.verbose:
                if succeeded:
                    print("Success!")
                else:
                    print("Failed!")

        while True:
            try:
                if method == "GET":
                    kwarg = "params"
                else:
                    kwarg = "data"
                kwargs = {kwarg: query_state["request"]}

                # Build a client cert object for requests
                if self.client_cert_key is not None:
                    client_cert = (self.client_cert, self.client_cert_key)
                else:
                    client_cert = self.client_cert

                res = requests.request(
                        method,
                        urllib.parse.urljoin(self.base_url, url),
                        auth=requests.auth.HTTPBasicAuth(self.email,
                                                         self.api_key),
                        verify=self.tls_verification,
                        cert=client_cert,
                        timeout=90,
                        headers={"User-agent": self.get_user_agent()},
                        **kwargs)

                # On 50x errors, try again after a short sleep
                if str(res.status_code).startswith('5'):
                    if error_retry(" (server %s)" % (res.status_code,)):
                        continue
                    # Otherwise fall through and process the python-requests error normally
            except (requests.exceptions.Timeout, requests.exceptions.SSLError) as e:
                # Timeouts are either a Timeout or an SSLError; we
                # want the later exception handlers to deal with any
                # non-timeout other SSLErrors
                if (isinstance(e, requests.exceptions.SSLError) and
                    str(e) != "The read operation timed out"):
                    raise
                if longpolling:
                    # When longpolling, we expect the timeout to fire,
                    # and the correct response is to just retry
                    continue
                else:
                    end_error_retry(False)
                    return {'msg': "Connection error:\n%s" % traceback.format_exc(),
                            "result": "connection-error"}
            except requests.exceptions.ConnectionError:
                if error_retry(""):
                    continue
                end_error_retry(False)
                return {'msg': "Connection error:\n%s" % traceback.format_exc(),
                        "result": "connection-error"}
            except Exception:
                # We'll split this out into more cases as we encounter new bugs.
                return {'msg': "Unexpected error:\n%s" % traceback.format_exc(),
                        "result": "unexpected-error"}

            try:
                if requests_json_is_function:
                    json_result = res.json()
                else:
                    json_result = res.json
            except Exception:
                json_result = None

            if json_result is not None:
                end_error_retry(True)
                return json_result
            end_error_retry(False)
            return {'msg': "Unexpected error from the server", "result": "http-error",
                    "status_code": res.status_code}

    @classmethod
    def _register(cls, name, url=None, make_request=None,
                  method="POST", computed_url=None, **query_kwargs):
        if url is None:
            url = name
        if make_request is None:
            def make_request(request=None):
                if request is None:
                    request = {}
                return request

        def call(self, *args, **kwargs):
            request = make_request(*args, **kwargs)
            if computed_url is not None:
                req_url = computed_url(request)
            else:
                req_url = url
            return self.do_api_query(request, API_VERSTRING + req_url, method=method, **query_kwargs)
        call.__name__ = name
        setattr(cls, name, call)

    def call_on_each_event(self, callback, event_types=None, narrow=None):
        if narrow is None:
            narrow = []

        def do_register():
            while True:
                if event_types is None:
                    res = self.register()
                else:
                    res = self.register(event_types=event_types, narrow=narrow)

                if 'error' in res.get('result'):
                    if self.verbose:
                        print("Server returned error:\n%s" % res['msg'])
                    time.sleep(1)
                else:
                    return (res['queue_id'], res['last_event_id'])

        queue_id = None
        while True:
            if queue_id is None:
                (queue_id, last_event_id) = do_register()

            res = self.get_events(queue_id=queue_id, last_event_id=last_event_id)
            if 'error' in res.get('result'):
                if res["result"] == "http-error":
                    if self.verbose:
                        print("HTTP error fetching events -- probably a server restart")
                elif res["result"] == "connection-error":
                    if self.verbose:
                        print("Connection error fetching events -- probably server is temporarily down?")
                else:
                    if self.verbose:
                        print("Server returned error:\n%s" % res["msg"])
                    if res["msg"].startswith("Bad event queue id:"):
                        # Our event queue went away, probably because
                        # we were asleep or the server restarted
                        # abnormally.  We may have missed some
                        # events while the network was down or
                        # something, but there's not really anything
                        # we can do about it other than resuming
                        # getting new ones.
                        #
                        # Reset queue_id to register a new event queue.
                        queue_id = None
                # TODO: Make this back off once it's more reliable
                time.sleep(1)
                continue

            for event in res['events']:
                last_event_id = max(last_event_id, int(event['id']))
                callback(event)

    def call_on_each_message(self, callback):
        def event_callback(event):
            if event['type'] == 'message':
                callback(event['message'])

        self.call_on_each_event(event_callback, ['message'])

def _mk_subs(streams, **kwargs):
    result = kwargs
    result['subscriptions'] = streams
    return result

def _mk_rm_subs(streams):
    return {'delete': streams}

def _mk_deregister(queue_id):
    return {'queue_id': queue_id}

def _mk_events(event_types=None, narrow=None):
    if event_types is None:
        return dict()
    if narrow is None:
        narrow = []
    return dict(event_types=event_types, narrow=narrow)

def _kwargs_to_dict(**kwargs):
    return kwargs

class ZulipStream(object):
    """
    A Zulip stream-like object
    """

    def __init__(self, type, to, subject, **kwargs):
        self.client = Client(**kwargs)
        self.type = type
        self.to = to
        self.subject = subject

    def write(self, content):
        message = {"type": self.type,
                   "to": self.to,
                   "subject": self.subject,
                   "content": content}
        self.client.send_message(message)

    def flush(self):
        pass

Client._register('send_message', url='messages', make_request=(lambda request: request))
Client._register('update_message', method='PATCH', url='messages', make_request=(lambda request: request))
Client._register('get_messages', method='GET', url='messages/latest', longpolling=True)
Client._register('get_events', url='events', method='GET', longpolling=True, make_request=(lambda **kwargs: kwargs))
Client._register('register', make_request=_mk_events)
Client._register('export', method='GET', url='export')
Client._register('deregister', url="events", method="DELETE", make_request=_mk_deregister)
Client._register('get_profile', method='GET', url='users/me')
Client._register('get_streams', method='GET', url='streams', make_request=_kwargs_to_dict)
Client._register('get_members', method='GET', url='users')
Client._register('list_subscriptions', method='GET', url='users/me/subscriptions')
Client._register('add_subscriptions', url='users/me/subscriptions', make_request=_mk_subs)
Client._register('remove_subscriptions', method='PATCH', url='users/me/subscriptions', make_request=_mk_rm_subs)
Client._register('get_subscribers', method='GET',
                 computed_url=lambda request: 'streams/%s/members' % (urllib.parse.quote(request['stream'], safe=''),),
                 make_request=_kwargs_to_dict)
Client._register('render_message', method='GET', url='messages/render')
Client._register('create_user', method='POST', url='users')


text:
FROM ubuntu:14.04

RUN apt-get update && apt-get install build-essential -y \
    libssl-dev \
    libdb++-dev \
    libboost-all-dev \
    libqrencode-dev \
    wget

ENV sarDir /sar

RUN mkdir sarDir
WORKDIR ${sarDir}

ADD http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.6.tar.gz ./miniupnpc-1.6.tar.gz
RUN tar -xvf miniupnpc-1.6.tar.gz
RUN cd miniupnpc-1.6 && make && make install

ADD ./share ./share
ADD ./src ./src
RUN cd src/ && make -f makefile.unix

RUN mkdir -p /root/.SARCoin
RUN wget -O /root/.SARCoin/bootstrap.dat https://github.com/sarcoin/SARCoin/releases/download/1.5.0/bootstrap.dat
ADD ./conf/* /root/.SARCoin/
RUN chmod 400 /root/.SARCoin/SARCoin.conf

CMD ["./src/SARCoind", "-logtimestamps"]


text:
#region Apache License Version 2.0

#endregion Apache License Version 2.0

namespace SF.Sys.BackEndConsole
{
	public interface IDefaultMenuCollection
	{
		void AddMenuItems(string MenuIdent,string Path,MenuItem[] Items);
		string[] MenuIdents { get; }
		MenuItem[] GetMenuItems(string MenuIdent);
	}
}


text:
package com.amazonaws.services.identitymanagement.model;

import java.io.Serializable;
import com.amazonaws.AmazonWebServiceRequest;

/**
 *
 */
public class DeleteRolePolicyRequest extends AmazonWebServiceRequest implements
        Serializable, Cloneable {

    /**
     *

     * The name (friendly name, not ARN) identifying the role that the policy is
     * embedded in.
     *

     */
    private String roleName;
    /**
     *

     * The name identifying the policy document to delete.
     *

     */
    private String policyName;

    /**
     *

     * The name (friendly name, not ARN) identifying the role that the policy is
     * embedded in.
     *

     *
     * @param roleName
     *        The name (friendly name, not ARN) identifying the role that the
     *        policy is embedded in.
     */
    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    /**
     *

     * The name (friendly name, not ARN) identifying the role that the policy is
     * embedded in.
     *

     *
     * @return The name (friendly name, not ARN) identifying the role that the
     *         policy is embedded in.
     */
    public String getRoleName() {
        return this.roleName;
    }

    /**
     *

     * The name (friendly name, not ARN) identifying the role that the policy is
     * embedded in.
     *

     *
     * @param roleName
     *        The name (friendly name, not ARN) identifying the role that the
     *        policy is embedded in.
     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     */
    public DeleteRolePolicyRequest withRoleName(String roleName) {
        setRoleName(roleName);
        return this;
    }

    /**
     *

     * The name identifying the policy document to delete.
     *

     *
     * @param policyName
     *        The name identifying the policy document to delete.
     */
    public void setPolicyName(String policyName) {
        this.policyName = policyName;
    }

    /**
     *

     * The name identifying the policy document to delete.
     *

     *
     * @return The name identifying the policy document to delete.
     */
    public String getPolicyName() {
        return this.policyName;
    }

    /**
     *

     * The name identifying the policy document to delete.
     *

     *
     * @param policyName
     *        The name identifying the policy document to delete.
     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     */
    public DeleteRolePolicyRequest withPolicyName(String policyName) {
        setPolicyName(policyName);
        return this;
    }

    /**
     * Returns a string representation of this object; useful for testing and
     * debugging.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getRoleName() != null)
            sb.append("RoleName: " + getRoleName() + ",");
        if (getPolicyName() != null)
            sb.append("PolicyName: " + getPolicyName());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof DeleteRolePolicyRequest == false)
            return false;
        DeleteRolePolicyRequest other = (DeleteRolePolicyRequest) obj;
        if (other.getRoleName() == null ^ this.getRoleName() == null)
            return false;
        if (other.getRoleName() != null
                && other.getRoleName().equals(this.getRoleName()) == false)
            return false;
        if (other.getPolicyName() == null ^ this.getPolicyName() == null)
            return false;
        if (other.getPolicyName() != null
                && other.getPolicyName().equals(this.getPolicyName()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode
                + ((getRoleName() == null) ? 0 : getRoleName().hashCode());
        hashCode = prime * hashCode
                + ((getPolicyName() == null) ? 0 : getPolicyName().hashCode());
        return hashCode;
    }

    @Override
    public DeleteRolePolicyRequest clone() {
        return (DeleteRolePolicyRequest) super.clone();
    }
}


text:
package heufybot.config;

import heufybot.core.Logger;
import heufybot.utils.FileUtils;
import org.yaml.snakeyaml.Yaml;

import java.util.HashMap;

public class ServerConfig extends GlobalConfig
{
    @SuppressWarnings("unchecked")
    public void loadServerConfig(String fileName, HashMap<String, Object> globalSettings)
    {
        this.settings = (HashMap<String, Object>) globalSettings.clone();
        if (fileName == null)
        {
            Logger.error("Config",
                    "No seperate server configs found. Using the settings from the global config instead.");
            return;
        }

        Yaml yaml = new Yaml();
        String settingsYaml = FileUtils.readFile(fileName);
        HashMap<String, Object> serverSettings = (HashMap<String, Object>) yaml.load(settingsYaml);

        for (String setting : serverSettings.keySet())
        {
            this.settings.put(setting, serverSettings.get(setting));
        }
    }
}


text:
namespace StackFaceSystem.Web.Areas.Moderator.ViewModels.ManageCategories
{
    using System.ComponentModel.DataAnnotations;

    public class EditCategoryViewModel
    {
        public int Id { get; set; }

        [Required]
        [MaxLength(20)]
        public string Name { get; set; }
    }
}


text:
import os
from setuptools import setup, find_packages

if os.path.exists("../../README.md"):
    # This path will work when building the Python package from the current
    # directory but may not work during the snap build process. We only need
    # the long description for the PyPI package, since the snap has its own
    # metadata.
    with open("../../README.md", "r") as source:
        long_description = source.read()
else:
    long_description = "Paradrop Edge Computing Agent"

setup(
    name="paradrop",
    version='0.13.3a8',
    description="Paradrop Edge Computing Agent",
    long_description=long_description,
    long_description_content_type="text/markdown",
    url="https://paradrop.org",

    project_urls = {
        "Documentation": "https://paradrop.readthedocs.io/en/latest/",
        "Homepage": "https://paradrop.org",
        "Source": "https://github.com/ParadropLabs/Paradrop",
    },

    packages=find_packages(),

    install_requires=[
        'attrs>=21.4.0',
        'autobahn[twisted]>=21.2.1',
        'bcrypt>=3.1.4',
        'colorama>=0.3.9',
        'configparser>=3.7.1',
        'docker>=2.5.1',
        'enum34',
        'functools32>=3.2.3.post2; python_version < "3.2"',
        'future>=0.16.0',
        'ipaddress>=1.0.16',
        'jsonpatch>=1.15',
        'klein>=16.12.0',
        'netifaces>=0.10.4',
        'psutil>=5.6.2',
        'pulsectl>=17.12.2',
        'pycurl',
        'PyJWT>=1.6.4',
        'pyOpenSSL>=22.0.0',
        'PyYAML>=6.0',
        'requests>=2.21.0',
        'ruamel.ordereddict>=0.4.13; python_version < "3.1"',
        'ruamel.yaml>=0.17.21',
        'service_identity>=17.0.0',
        'six>=1.10.0',
        'smokesignal>=0.7.0',
        'Twisted>=22.1.0',
        'wget>=3.2'
    ],

    python_requires=">=2.7",

    classifiers = [
        "Development Status :: 4 - Beta",
        "Environment :: Console",
        "Intended Audience :: Developers",
        "Intended Audience :: System Administrators",
        "License :: OSI Approved :: Apache Software License",
        "Operating System :: OS Independent",
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3",
        "Topic :: Software Development",
        "Topic :: Utilities",
    ],

    maintainer="Lance Hartung",
    maintainer_email="lance@paradrop.io",

    include_package_data=True,
    package_data={
        "paradrop": ["static/*"]
    },

    entry_points={
        'console_scripts': [
            'paradrop = paradrop:main',
            'pdconfd = paradrop:run_pdconfd'
        ]
    },
)


text:
package fr.acinq.eclair.blockchain

import fr.acinq.bitcoin.{ByteVector32, OutPoint, Satoshi, Transaction, TxIn}
import fr.acinq.eclair.blockchain.electrum.ElectrumWallet._
import fr.acinq.eclair.blockchain.fee.FeeratePerKw
import scodec.bits.ByteVector

import scala.concurrent.Future

object EclairWallet {
  final val OPT_IN_FULL_RBF = TxIn.SEQUENCE_FINAL - 2
  final val MAX_RECEIVE_ADDRESSES = 10

  // Wallet types
  final val BIP32 = "BIP32"
  final val BIP44 = "BIP44"
  final val BIP49 = "BIP49"
  final val BIP84 = "BIP84"
}

trait EclairWallet {
  def getData: Future[GetDataResponse]

  def getReceiveAddresses: Future[GetCurrentReceiveAddressesResponse]

  def makeFundingTx(pubkeyScript: ByteVector, amount: Satoshi, feeRatePerKw: FeeratePerKw): Future[GenerateTxResponse]

  def sendPreimageBroadcast(preimages: Set[ByteVector32], pubKeyScript: ByteVector, feeRatePerKw: FeeratePerKw): Future[GenerateTxResponse]

  def makeBatchTx(scriptToAmount: Map[ByteVector, Satoshi], feeRatePerKw: FeeratePerKw): Future[GenerateTxResponse]

  def makeTx(pubKeyScript: ByteVector, amount: Satoshi, prevScriptToAmount: Map[ByteVector, Satoshi], feeRatePerKw: FeeratePerKw): Future[GenerateTxResponse]

  def makeCPFP(fromOutpoints: Set[OutPoint], pubKeyScript: ByteVector, feeRatePerKw: FeeratePerKw): Future[GenerateTxResponse]

  def makeRBFBump(tx: Transaction, feeRatePerKw: FeeratePerKw): Future[RBFResponse]

  def makeRBFReroute(tx: Transaction, feeRatePerKw: FeeratePerKw, pubKeyScript: ByteVector): Future[RBFResponse]

  def provideExcludedOutpoints(excludedOutPoints: List[OutPoint] = Nil): Unit

  def doubleSpent(tx: Transaction): Future[IsDoubleSpentResponse]

  def broadcast(tx: Transaction): Future[Boolean]

  def hasFingerprint: Boolean

  def isBuiltIn: Boolean

  def isSigning: Boolean
}


text:
<?php

declare(strict_types=1);

namespace Rector\NetteToSymfony\Tests\Rector\RenameTesterTestToPHPUnitToTestFileRector\Source;

final class SomeCase
{
    public function testThis()
    {
    }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Blumea 7: 594 (1954)

#### Original name
Geisleria alpina Servít

### Remarks
null


text:
Bids

<button type="submit" class="btn btn-success"
	ng-click="clear()">
	Clear!
</button>

Up Bids

			<nvd3-scatter-chart
		            data="upBidss"
		            id="up"
		            width="500"
		            height="500"
			        showXAxis="true"
			        showYAxis="true"
			        yAxisLabel="Price DKK/kWh"
			        xAxisLabel="Quantity"
			        objectEquality="true"
					forcex=[0]
					forcey=[0]
					margin="{left:80,top:50,bottom:50,right:10}"
					showLegend="true"
					color="colorFunction()"
					legendColor="colorFunction()"
		            yAxisTickFormat="yAxisTickFormatFunction()"
		            xAxisTickFormat="xAxisTickFormatFunction()">
		        	<svg></svg>
		    </nvd3-scatter-chart>

Down Bids

			<nvd3-scatter-chart
		            data="downBidss"
		            id="down"
		            width="500"
		            height="500"
			        showXAxis="true"
			        showYAxis="true"
			        yAxisLabel="Price DKK/kWh"
			        xAxisLabel="Quantity wH"
			        objectEquality="true"
					forcex=[0]
					forcey=[0]
					margin="{left:80,top:50,bottom:50,right:10}"
					showLegend="true"
					color="colorFunction()"
					legendColor="colorFunction()"
		            yAxisTickFormat="yAxisTickFormatFunction()"
		            xAxisTickFormat="xAxisTickFormatFunction()">
		        	<svg></svg>
		    </nvd3-scatter-chart>


text:
/* The original from which this derives bore the following: */

/*

   Derby - Class org.apache.derby.impl.sql.compile.GroupByColumn

   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to you under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

 */

package com.foundationdb.sql.parser;

import com.foundationdb.sql.StandardException;

/**
 * A GroupByColumn is a column in the GROUP BY clause.
 *
 */
public class GroupByColumn extends OrderedColumn
{
    private ValueNode columnExpression;

    /**
     * Initializer.
     *
     * @param colRef The ColumnReference for the grouping column
     */
    public void init(Object colRef) {
        this.columnExpression = (ValueNode)colRef;
    }

    /**
     * Fill this node with a deep copy of the given node.
     */
    public void copyFrom(QueryTreeNode node) throws StandardException {
        super.copyFrom(node);

        GroupByColumn other = (GroupByColumn)node;
        this.columnExpression = (ValueNode)getNodeFactory().copyNode(other.columnExpression,
                                                                     getParserContext());
    }

    /**
     * Prints the sub-nodes of this object.  See QueryTreeNode.java for
     * how tree printing is supposed to work.
     *
     * @param depth The depth of this node in the tree
     */

    public void printSubNodes(int depth) {
        super.printSubNodes(depth);

        if (columnExpression != null) {
            printLabel(depth, "columnExpression: ");
            columnExpression.treePrint(depth + 1);
        }
    }

    /**
     * Get the name of this column
     *
     * @return The name of this column
     */
    public String getColumnName() {
        return columnExpression.getColumnName();
    }

    public ValueNode getColumnExpression() {
        return columnExpression;
    }

    public void setColumnExpression(ValueNode cexpr) {
        this.columnExpression = cexpr;

    }

    /**
     * Accept the visitor for all visitable children of this node.
     *
     * @param v the visitor
     *
     * @exception StandardException on error
     */
    void acceptChildren(Visitor v) throws StandardException {

        super.acceptChildren(v);

        if (columnExpression != null) {
            columnExpression = (ValueNode)columnExpression.accept(v);
        }
    }

}


text:
SYNONYM

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

#### Published in
Trans. Br. mycol. Soc. 57(3): 422 (1971)

#### Original name
Leptolegnia marina D. Atkins, 1954

### Remarks
null


text:
package org.gradle.kotlin.dsl.fixtures.codegen;

import java.util.Map;
import java.util.function.Consumer;

public interface ClassAndGroovyNamedArguments {

    <T> void mapAndClass(Map<String, ?> args, Class<? extends T> type);

    <T> void mapAndClassAndVarargs(Map<String, ?> args, Class<? extends T> type, String... options);

    <T> void mapAndClassAndSAM(Map<String, ?> args, Class<? extends T> type, Consumer<? super T> action);
}