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

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>CopyUtils</title>
<meta name="date" content="2015-09-17">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

org.apache.commons.io

Class CopyUtils

java.lang.Object

org.apache.commons.io.CopyUtils

Deprecated.

Use IOUtils. Will be removed in 2.0.
  Methods renamed to IOUtils.write() or IOUtils.copy().
  Null handling behaviour changed in IOUtils (null data does not
  throw NullPointerException).

@Deprecated
public class CopyUtils
extends java.lang.Object

This class provides static utility methods for buffered
 copying between sources (InputStream, Reader,
 String and byte[]) and destinations
 (OutputStream, Writer, String and
 byte[]).

 Unless otherwise noted, these copy methods do not
 flush or close the streams. Often doing so would require making non-portable
 assumptions about the streams' origin and further use. This means that both
 streams' close() methods must be called after copying. if one
 omits this step, then the stream resources (sockets, file descriptors) are
 released when the associated Stream is garbage-collected. It is not a good
 idea to rely on this mechanism. For a good overview of the distinction
 between "memory management" and "resource management", see
 this
 UnixReview article.

 For byte-to-char methods, a copy variant allows the encoding
 to be selected (otherwise the platform default is used). We would like to
 encourage you to always specify the encoding because relying on the platform
 default can lead to unexpected results.
 <p
 We don't provide special variants for the copy methods that
 let you specify the buffer size because in modern VMs the impact on speed
 seems to be minimal. We're using a default buffer size of 4 KB.

 The copy methods use an internal buffer when copying. It is
 therefore advisable not to deliberately wrap the stream arguments
 to the copy methods in Buffered* streams. For
 example, don't do the following:

  copy( new BufferedInputStream( in ), new BufferedOutputStream( out ) );

 The rationale is as follows:

 Imagine that an InputStream's read() is a very expensive operation, which
 would usually suggest wrapping in a BufferedInputStream. The
 BufferedInputStream works by issuing infrequent
 InputStream.read(byte[] b, int off, int len) requests on the
 underlying InputStream, to fill an internal buffer, from which further
 read requests can inexpensively get their data (until the buffer
 runs out).

 However, the copy methods do the same thing, keeping an
 internal buffer, populated by
 InputStream.read(byte[] b, int off, int len) requests. Having two
 buffers (or three if the destination stream is also buffered) is pointless,
 and the unnecessary buffer management hurts performance slightly (about 3%,
 according to some simple experiments).

 Behold, intrepid explorers; a map of this class:

       Method      Input               Output          Dependency
       ------      -----               ------          -------
 1     copy        InputStream         OutputStream    (primitive)
 2     copy        Reader              Writer          (primitive)

 3     copy        InputStream         Writer          2

 4     copy        Reader              OutputStream    2

 5     copy        String              OutputStream    2
 6     copy        String              Writer          (trivial)

 7     copy        byte[]              Writer          3
 8     copy        byte[]              OutputStream    (trivial)

 Note that only the first two methods shuffle bytes; the rest use these
 two, or (if possible) copy using native Java copy methods. As there are
 method variants to specify the encoding, each row may
 correspond to up to 2 methods.

 Origin of code: Excalibur.

Constructor Summary

Constructors

Constructor and Description

CopyUtils()

Deprecated.

Instances should NOT be constructed in standard programming.

Method Summary

All Methods Static Methods Concrete Methods Deprecated Methods

Modifier and Type
Method and Description

static void
copy(byte[] input,
    java.io.OutputStream output)

Deprecated.

Copy bytes from a byte[] to an OutputStream.

static void
copy(byte[] input,
    java.io.Writer output)

Deprecated.

Copy and convert bytes from a byte[] to chars on a
 Writer.

static void
copy(byte[] input,
    java.io.Writer output,
    java.lang.String encoding)

Deprecated.

Copy and convert bytes from a byte[] to chars on a
 Writer, using the specified encoding.

static int
copy(java.io.InputStream input,
    java.io.OutputStream output)

Deprecated.

Copy bytes from an InputStream to an
 OutputStream.

static void
copy(java.io.InputStream input,
    java.io.Writer output)

Deprecated.

Copy and convert bytes from an InputStream to chars on a
 Writer.

static void
copy(java.io.InputStream input,
    java.io.Writer output,
    java.lang.String encoding)

Deprecated.

Copy and convert bytes from an InputStream to chars on a
 Writer, using the specified encoding.

static void
copy(java.io.Reader input,
    java.io.OutputStream output)

Deprecated.

Serialize chars from a Reader to bytes on an
 OutputStream, and flush the OutputStream.

static int
copy(java.io.Reader input,
    java.io.Writer output)

Deprecated.

Copy chars from a Reader to a Writer.

static void
copy(java.lang.String input,
    java.io.OutputStream output)

Deprecated.

Serialize chars from a String to bytes on an
 OutputStream, and
 flush the OutputStream.

static void
copy(java.lang.String input,
    java.io.Writer output)

Deprecated.

Copy chars from a String to a Writer.

Methods inherited from class java.lang.Object

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

Constructor Detail

CopyUtils

public CopyUtils()

Deprecated.

Instances should NOT be constructed in standard programming.

Method Detail

copy

public static void copy(byte[] input,
                        java.io.OutputStream output)
                 throws java.io.IOException

Deprecated.

Copy bytes from a byte[] to an OutputStream.

Parameters:

input - the byte array to read from

output - the OutputStream to write to

Throws:

java.io.IOException - In case of an I/O problem

copy

public static void copy(byte[] input,
                        java.io.Writer output)
                 throws java.io.IOException

Deprecated.

Copy and convert bytes from a byte[] to chars on a
 Writer.
 The platform's default encoding is used for the byte-to-char conversion.

Parameters:

input - the byte array to read from

output - the Writer to write to

Throws:

java.io.IOException - In case of an I/O problem

copy

public static void copy(byte[] input,
                        java.io.Writer output,
                        java.lang.String encoding)
                 throws java.io.IOException

Deprecated.

Copy and convert bytes from a byte[] to chars on a
 Writer, using the specified encoding.

Parameters:

input - the byte array to read from

output - the Writer to write to

encoding - The name of a supported character encoding. See the
 IANA
 Charset Registry for a list of valid encoding types.

Throws:

java.io.IOException - In case of an I/O problem

copy

public static int copy(java.io.InputStream input,
                       java.io.OutputStream output)
                throws java.io.IOException

Deprecated.

Copy bytes from an InputStream to an
 OutputStream.

Parameters:

input - the InputStream to read from

output - the OutputStream to write to

Returns:

the number of bytes copied

Throws:

java.io.IOException - In case of an I/O problem

copy

public static int copy(java.io.Reader input,
                       java.io.Writer output)
                throws java.io.IOException

Deprecated.

Copy chars from a Reader to a Writer.

Parameters:

input - the Reader to read from

output - the Writer to write to

Returns:

the number of characters copied

Throws:

java.io.IOException - In case of an I/O problem

copy

public static void copy(java.io.InputStream input,
                        java.io.Writer output)
                 throws java.io.IOException

Deprecated.

Copy and convert bytes from an InputStream to chars on a
 Writer.
 The platform's default encoding is used for the byte-to-char conversion.

Parameters:

input - the InputStream to read from

output - the Writer to write to

Throws:

java.io.IOException - In case of an I/O problem

copy

public static void copy(java.io.InputStream input,
                        java.io.Writer output,
                        java.lang.String encoding)
                 throws java.io.IOException

Deprecated.

Copy and convert bytes from an InputStream to chars on a
 Writer, using the specified encoding.

Parameters:

input - the InputStream to read from

output - the Writer to write to

encoding - The name of a supported character encoding. See the
 IANA
 Charset Registry for a list of valid encoding types.

Throws:

java.io.IOException - In case of an I/O problem

copy

public static void copy(java.io.Reader input,
                        java.io.OutputStream output)
                 throws java.io.IOException

Deprecated.

Serialize chars from a Reader to bytes on an
 OutputStream, and flush the OutputStream.

Parameters:

input - the Reader to read from

output - the OutputStream to write to

Throws:

java.io.IOException - In case of an I/O problem

copy

public static void copy(java.lang.String input,
                        java.io.OutputStream output)
                 throws java.io.IOException

Deprecated.

Serialize chars from a String to bytes on an
 OutputStream, and
 flush the OutputStream.

Parameters:

input - the String to read from

output - the OutputStream to write to

Throws:

java.io.IOException - In case of an I/O problem

copy

public static void copy(java.lang.String input,
                        java.io.Writer output)
                 throws java.io.IOException

Deprecated.

Copy chars from a String to a Writer.

Parameters:

input - the String to read from

output - the Writer to write to

Throws:

java.io.IOException - In case of an I/O problem

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
    /** EnumDeclaration = ENUM Ident [IMPLEMENTS TypeList] EnumBody
     *  @param mods    The modifiers starting the enum declaration
     *  @param dc       The documentation comment for the enum, or null.
     */
    JCClassDecl enumDeclaration(JCModifiers mods, String dc) {
    	DEBUG.P(this,"enumDeclaration(2)");
    	DEBUG.P("startPos="+S.pos());
        int pos = S.pos();
        accept(ENUM);
        Name name = ident();

        List<JCExpression> implementing = List.nil();
        if (S.token() == IMPLEMENTS) {
            S.nextToken();
            implementing = typeList();
        }

        List<JCTree> defs = enumBody(name);
        JCModifiers newMods = //在modifiersOpt()已加Flags.ENUM
            F.at(mods.pos).Modifiers(mods.flags|Flags.ENUM, mods.annotations);
        //枚举类没有TypeParameters也没有EXTENDS TypeList
        JCClassDecl result = toP(F.at(pos).
            ClassDef(newMods, name, List.<JCTypeParameter>nil(),
                null, implementing, defs));
        attach(result, dc);
        DEBUG.P(2,this,"enumDeclaration(2)");
        return result;
    }

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace MBozwood\Cities;

use Illuminate\Support\ServiceProvider;

/**
 * CountryListServiceProvider
 *
 */

class CitiesServiceProvider extends ServiceProvider {

    /**
     * Indicates if loading of the provider is deferred.
     *
     * @var bool
     */
    protected $defer = false;

    /**
    * Bootstrap the application.
    *
    * @return void
    */
    public function boot()
    {
        // The publication files to publish
        $this->publishes([__DIR__ . '/../../config/config.php' => config_path('cities.php')]);
        // Append the country settings
        $this->mergeConfigFrom(
            __DIR__ . '/../../config/config.php', 'cities'
        );
        /*$this->app['config']['database.connections'] = array_merge(
            $this->app['config']['database.connections'],
            \Config::get('career.library.database.connections')
        );*/
    }

    /**
     * Register everything.
     *
     * @return void
     */
    public function register()
    {
        $this->registerCities();
        $this->registerCommands();
    }

    /**
     * Register the service provider.
     *
     * @return void
     */
    public function registerCities()
    {
        $this->app->bind('cities', function($app)
        {
            return new Cities();
        });
    }

    /**
     * Register the artisan commands.
     *
     * @return void
     */
    protected function registerCommands()
    {
        $this->app->singleton('command.cities.migration', function ($app)
        {
            return new MigrationCommand($app);
        });

        $this->commands('command.cities.migration');
    }

    /**
     * Get the services provided by the provider.
     *
     * @return array
     */
    public function provides()
    {
        return array('cities');
    }
}


text:
package swag

import (
	"sort"
	"sync"
)

// indexOfInitialisms is a thread-safe implementation of the sorted index of initialisms.
// Since go1.9, this may be implemented with sync.Map.
type indexOfInitialisms struct {
	sortMutex *sync.Mutex
	index     *sync.Map
}

func newIndexOfInitialisms() *indexOfInitialisms {
	return &indexOfInitialisms{
		sortMutex: new(sync.Mutex),
		index:     new(sync.Map),
	}
}

func (m *indexOfInitialisms) load(initial map[string]bool) *indexOfInitialisms {
	m.sortMutex.Lock()
	defer m.sortMutex.Unlock()
	for k, v := range initial {
		m.index.Store(k, v)
	}
	return m
}

func (m *indexOfInitialisms) isInitialism(key string) bool {
	_, ok := m.index.Load(key)
	return ok
}

func (m *indexOfInitialisms) add(key string) *indexOfInitialisms {
	m.index.Store(key, true)
	return m
}

func (m *indexOfInitialisms) sorted() (result []string) {
	m.sortMutex.Lock()
	defer m.sortMutex.Unlock()
	m.index.Range(func(key, value interface{}) bool {
		k := key.(string)
		result = append(result, k)
		return true
	})
	sort.Sort(sort.Reverse(byLength(result)))
	return
}


text:
//Copyright 2015 Erik De Rijcke
//
//Licensed under the Apache License,Version2.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 org.freedesktop.wayland.util;

import com.sun.jna.Memory;
import com.sun.jna.Pointer;
import org.freedesktop.wayland.HasNative;
import org.freedesktop.wayland.util.jna.wl_message;

/**
 * Wrapper class for a {@link Message} to create a native wayland message for use with the native library. To create
 * a new native context for a given {@link Message}, use {@link #init(org.freedesktop.wayland.util.jna.wl_message, Message)}.
 *
 * @see InterfaceMeta
 */
public class MessageMeta implements HasNative<wl_message> {

    private final wl_message pointer;
    private final Message    message;

    private boolean valid;

    protected MessageMeta(final wl_message pointer,
                          final Message message) {
        this.pointer = pointer;
        this.message = message;
        ObjectCache.store(getNative().getPointer(),
                          this);
    }

    public static void init(final wl_message messagePointer,
                            final Message message) {
        //init args interfaces
        final Class<?>[] types = message.types();
        Pointer typesPointerPointer = null;
        if (types.length > 0) {
            final Pointer typesPointer = new Memory(Pointer.SIZE * types.length);
            for (int i = 0; i < types.length; i++) {
                typesPointer.setPointer(i * Pointer.SIZE,
                                        InterfaceMeta.get(types[i])
                                                     .getNative()
                                                     .getPointer());
            }
            typesPointerPointer = typesPointer;
        }
        //set name
        final Pointer m = new Memory(message.name()
                                            .length() + 1);
        m.setString(0,
                    message.name());
        messagePointer.writeField("name",
                                  m);
        //set signature
        final Pointer s = new Memory(message.signature()
                                            .length() + 1);
        s.setString(0,
                    message.signature());
        messagePointer.writeField("signature",
                                  s);
        //set types
        messagePointer.writeField("types",
                                  typesPointerPointer);

        new MessageMeta(messagePointer,
                        message);
    }

    public wl_message getNative() {
        return this.pointer;
    }

    public Message getMessage() {
        return this.message;
    }

    @Override
    public boolean isValid() {
        return this.valid;
    }

    @Override
    public boolean equals(final Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        final MessageMeta messageMeta = (MessageMeta) o;

        return getNative().equals(messageMeta.getNative());
    }

    @Override
    public int hashCode() {
        return getNative().hashCode();
    }

    @Override
    protected void finalize() throws Throwable {
        this.valid = false;
        super.finalize();
    }
}


text:
import luigi
from luigi.contrib.ftp import RemoteTarget

#: the FTP server
HOST = "some_host"
#: the username
USER = "user"
#: the password
PWD = "some_password"

class ExperimentTask(luigi.ExternalTask):
    """
    This class represents something that was created elsewhere by an external process,
    so all we want to do is to implement the output method.
    """

    def output(self):
        """
        Returns the target output for this task.
        In this case, a successful execution of this task will create a file that will be created in a FTP server.

        :return: the target output for this task.
        :rtype: object (:py:class:`~luigi.target.Target`)
        """
        return RemoteTarget('/experiment/output1.txt', HOST, username=USER, password=PWD)

    def run(self):
        """
        The execution of this task will write 4 lines of data on this task's target output.
        """
        with self.output().open('w') as outfile:
            print("data 0 200 10 50 60", file=outfile)
            print("data 1 190 9 52 60", file=outfile)
            print("data 2 200 10 52 60", file=outfile)
            print("data 3 195 1 52 60", file=outfile)

class ProcessingTask(luigi.Task):
    """
    This class represents something that was created elsewhere by an external process,
    so all we want to do is to implement the output method.
    """

    def requires(self):
        """
        This task's dependencies:

        * :py:class:`~.ExperimentTask`

        :return: object (:py:class:`luigi.task.Task`)
        """
        return ExperimentTask()

    def output(self):
        """
        Returns the target output for this task.
        In this case, a successful execution of this task will create a file on the local filesystem.

        :return: the target output for this task.
        :rtype: object (:py:class:`~luigi.target.Target`)
        """
        return luigi.LocalTarget('/tmp/processeddata.txt')

    def run(self):
        avg = 0.0
        elements = 0
        sumval = 0.0

        # Target objects are a file system/format abstraction and this will return a file stream object
        # NOTE: self.input() actually returns the ExperimentTask.output() target
        for line in self.input().open('r'):
            values = line.split(" ")
            avg += float(values[2])
            sumval += float(values[3])
            elements = elements + 1

        # average
        avg = avg / elements

        # save calculated values
        with self.output().open('w') as outfile:
            print(avg, sumval, file=outfile)

if __name__ == '__main__':
    luigi.run()


text:
using Microsoft.AspNetCore.Mvc.ModelBinding;

namespace AuthorizationServer.ViewModels.Authorization
{
    public class LogoutViewModel
    {
        [BindNever]
        public string RequestId { get; set; }
    }
}


text:
cask 'mongodb-compass-isolated-edition' do
  version '1.21.2'
  sha256 'a99fbc8ef7e29e1dc9228dc8b85ad49f3c96b8ef3f29916ec7e16c33c221ff7f'

  url "https://downloads.mongodb.com/compass/mongodb-compass-isolated-#{version}-darwin-x64.dmg"
  appcast 'https://www.mongodb.com/download-center/compass'
  name 'MongoDB Compass Isolated'
  homepage 'https://www.mongodb.com/products/compass'

  app 'MongoDB Compass Isolated Edition.app'
end


text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <title>@yield('meta-title', 'Page Title') - Tyloo.fr Backend</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

    <link href="/assets/css/backend.css" rel="stylesheet">

            T.fr

            TYLOO.fr

                Toggle navigation

                            email) }}?s=25" class="user-image" alt="User Image">

                            {{ $user->name }}

                                email) }}?s=90" class="img-circle" alt="User Image">

                                    {{ $user->name }}

                                    Profile

                                    Sign out

                    email) }}?s=45" class="img-circle" alt="User Image">

{{ $user->name }}

Administration

 Dashboard

                     Posts

 List Posts

 Add a Post

                     Works

 List Works

 Add a Work

                     Tags

 List Tags

 Add a Tag

                     Customers

 List Customers

 Add a Cusotmer

                     Users

 List Users

 Add an User

 Settings

@yield('page-title', 'Page Header')

 Admin

@yield('breadcrumb-title', 'Dashboard')

            @yield('content')

            Powered by Laravel & AdminLTE

        Copyright © 1988-{{ date('Y') }} Tyloo.fr. All rights reserved.


text:
#pragma once

//////////////////////////////////////////////////////////////////////////////

#include <server/SyncpathListController.hpp>
#include <win32cpp/ListView.hpp>

//////////////////////////////////////////////////////////////////////////////

namespace musik { namespace server {

//////////////////////////////////////////////////////////////////////////////

class SyncpathListModel : public win32cpp::ListView::Model, public win32cpp::EventHandler{
    public:
        SyncpathListModel(SyncpathListController *controller);
        virtual win32cpp::uistring CellValueToString(int rowIndex, win32cpp::ListView::ColumnRef column);
        void UpdateSyncPaths();
    private:

        void OnPathsUpdated();

        SyncpathListController *controller;

        friend class SyncpathListController;

        typedef std::vector<win32cpp::uistring> PathVector;
        PathVector paths;
};

//////////////////////////////////////////////////////////////////////////////

} }     // musik::server


text:
import unittest
import os
from subprocess import Popen as execute
from pymodbus.datastore.modredis import RedisSlaveContext
from base_context import ContextRunner

class RedisSlaveContextTest(ContextRunner, unittest.TestCase):
    '''
    These are the integration tests for using the redis
    slave context.
    '''

    def setUp(self):
        ''' Initializes the test environment '''
        self.context = RedisSlaveContext() # the redis client will block, so no wait needed
        self.initialize("redis-server")

    def tearDown(self):
        ''' Cleans up the test environment '''
        self.server.kill()
        self.fnull.close()
        self.shutdown()

#---------------------------------------------------------------------------#
# Main
#---------------------------------------------------------------------------#
if __name__ == "__main__":
    unittest.main()


text:
"""
Module for testing moving
"""

from hamcrest import assert_that, equal_to, is_
from mockito import mock
from pyherc.data import (Model, Portal, add_portal, add_character, get_characters,
                         get_character, move_character)
from pyherc.data.constants import Direction
from pyherc.data.model import ESCAPED_DUNGEON
from pyherc.ports import set_action_factory
from pyherc.test.builders import (ActionFactoryBuilder, CharacterBuilder,
                                  LevelBuilder)
from pyherc.test.helpers import EventListener
from pyherc.test.matchers import has_marked_for_redrawing, is_illegal, is_legal, EventType
from mockito import verify, mock
import pyherc

class TestEventDispatching():
    """
    Tests for event dispatching relating to moving
    """
    def __init__(self):
        """
        Default constructor
        """
        super().__init__()

        self.model = None
        self.character = None
        self.level = None
        self.listener = None
        self.actions = None

    def setup(self):
        """
        Setup test case
        """
        self.model = Model()

        self.character = (CharacterBuilder()
                          .with_model(self.model)
                          .with_location((1, 1))
                          .build())

        self.model.dungeon = (LevelBuilder()
                              .with_character(self.character)
                              .build())

        self.listener = mock()

        self.model.register_event_listener(self.listener)

        set_action_factory(ActionFactoryBuilder()
                           .build())

    def test_event_is_relayed(self):
        """
        Test that moving will create an event and send it forward
        """
        pyherc.vtable['\ufdd0:move'](character=self.character,
                                     direction=Direction.east)

        verify(self.listener).receive_event(EventType('move'))

class TestMoving():
    """
    Tests for moving
    """

    def __init__(self):
        """
        Default constructor
        """
        super().__init__()
        self.actions = None
        self.character = None
        self.level1 = None
        self.level2 = None
        self.portal1 = None
        self.portal2 = None
        self.model = None

    def setup(self):
        """
        Setup the test case
        """
        self.character = (CharacterBuilder()
                          .with_model(Model())
                          .build())

        self.level1 = (LevelBuilder()
                       .with_floor_tile("floor")
                       .with_wall_at((1, 0))
                       .build())

        self.level2 = (LevelBuilder()
                       .with_floor_tile("floor")
                       .build())
        self.portal1 = Portal((None, None), None)

        self.portal1.icon = 1
        self.portal2 = Portal(("stairs", "stairs"), None)
        self.portal2 = Portal(("stairs", "stairs"), None)

        add_portal(self.level1, (5, 5), self.portal1)
        add_portal(self.level2, (10, 10), self.portal2, self.portal1)

        add_character(self.level1, (5, 5), self.character)

        set_action_factory(ActionFactoryBuilder()
                           .build())

    def test_moving_when_stairs_are_blocked(self):
        """
        Moving should be possible, even if stairs other end is blocked
        """
        blocker = CharacterBuilder().build()

        add_character(self.level2, (10, 10), blocker)

        pyherc.vtable['\ufdd0:move'](character=self.character,
                                     direction=Direction.enter)

        assert_that(blocker.level, is_(equal_to(self.level2)))
        assert_that(self.character.level, is_(equal_to(self.level2)))

    def check_move_result(self, start, direction, expected_location):
        """
        Test that taking single step is possible
        """
        self.character.location = start

        pyherc.vtable['\ufdd0:move'](character=self.character,
                                     direction=direction)

        assert_that(self.character.location,
                    is_(equal_to(expected_location)))

    def test_simple_move(self):
        """
        Test that taking single step is possible
        """
        test_data = [(1, (5, 4)),
                     (2, (6, 4)),
                     (3, (6, 5)),
                     (4, (6, 6)),
                     (5, (5, 6)),
                     (6, (4, 6)),
                     (7, (4, 5)),
                     (8, (4, 4))]

        for row in test_data:
            yield (self.check_move_result, (5, 5), row[0], row[1])

    def test_walking_to_walls(self):
        """
        Test that it is not possible to walk through walls
        """
        move_character(self.level1, (1, 1), self.character)

        pyherc.vtable['\ufdd0:move'](character=self.character,
                                     direction=Direction.north)

        assert_that(self.character.location, is_(equal_to((1, 1))))

    def test_entering_portal(self):
        """
        Test that character can change level via portal
        """
        pyherc.vtable['\ufdd0:move'](character=self.character,
                                     direction=Direction.enter)

        assert_that(self.character.level, is_(equal_to(self.level2)))
        assert_that(self.character.location, is_(equal_to((10, 10))))

    def test_entering_portal_adds_character_to_creatures(self):
        """
        Test that entering portal will add character to the creatures list
        """
        assert self.character.level == self.level1
        assert self.character in get_characters(self.level1)

        pyherc.vtable['\ufdd0:move'](character=self.character,
                                     direction=Direction.enter)

        assert self.character.level == self.level2
        assert self.character in get_characters(self.level2)

    def test_entering_portal_removes_character_from_old_level(self):
        """
        Test that entering portal will remove character from level
        """
        assert self.character.level == self.level1
        assert self.character in get_characters(self.level1)

        pyherc.vtable['\ufdd0:move'](character=self.character,
                                     direction=Direction.enter)

        assert self.character not in get_characters(self.level1)

    def test_entering_non_existent_portal(self):
        """
        Test that character can not walk through floor
        """
        move_character(self.level1, (6, 3), self.character)

        pyherc.vtable['\ufdd0:move'](character=self.character,
                                     direction=Direction.enter)

        assert_that(self.character.location, is_(equal_to((6, 3))))
        assert_that(self.character.level, is_(equal_to(self.level1)))

    def test_moving_uses_time(self):
        """
        Test that moving around uses time
        """
        tick = self.character.tick

        pyherc.vtable['\ufdd0:move'](character=self.character,
                                     direction=Direction.east)

        assert self.character.tick > tick

    def test_taking_escape_stairs_ends_game(self):
        """
        Test that player taking escape stairs will create escape
        """
        model = self.character.model
        model.player = self.character

        portal3 = Portal((None, None), None)
        portal3.exits_dungeon = True
        add_portal(self.level1, (2, 2), portal3)
        self.character.location = (2, 2)

        pyherc.vtable['\ufdd0:move'](character=self.character,
                                     direction=Direction.enter)

        assert_that(model.end_condition, is_(equal_to(ESCAPED_DUNGEON)))

class TestSwitchingPlaces():
    """
    Sometimes characters can switch places with each other
    """

    def __init__(self):
        """
        Default constructor
        """
        super().__init__()

        self.level = None
        self.monster_1 = None
        self.monster_2 = None
        self.actions = None

    def setup(self):
        """
        Test setup
        """
        self.level = LevelBuilder().build()

        self.monster_1 = (CharacterBuilder()
                          .with_name('Pete')
                          .build())

        self.monster_2 = (CharacterBuilder()
                          .with_name('Uglak')
                          .build())

        self.monster_1.artificial_intelligence = lambda : None
        self.monster_2.artificial_intelligence = lambda : None

        add_character(self.level, (5, 5), self.monster_1)
        add_character(self.level, (6, 5), self.monster_2)

        set_action_factory(ActionFactoryBuilder()
                           .build())

    def test_switch_places(self):
        """
        Two monsters can switch places
        """
        pyherc.vtable['\ufdd0:move'](self.monster_1, Direction.east)

        assert_that(self.monster_1.location, is_(equal_to((6, 5))))
        assert_that(self.monster_2.location, is_(equal_to((5, 5))))

    def test_system_consistency(self):
        """
        Switching places should leave system in consistent state
        """
        pyherc.vtable['\ufdd0:move'](self.monster_1, Direction.east)

        assert_that(get_character(self.level, (6, 5)), is_(equal_to(self.monster_1)))
        assert_that(get_character(self.level, (5, 5)), is_(equal_to(self.monster_2)))


text:
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Test</title>
</head>
<body>
    Teste

    <iframe id="ìframe" src="ui-module-default/" width="100%" height="100%"></iframe>

    <script src="http://localhost:3000/socket.io/socket.io.js"></script>
    <script>
        const socket = io.connect('http://localhost:3000/');

        const $ = document.querySelector;
        const $$ = document.querySelectorAll;

        socket.on('update', function (data) {
            const iframe = $('#'+data.moduleId).contentWindow;

            iframe.postMessage({
                type: 'update',
                prop: data.prop,
                val: data.val,
            }, '*');
        });

        socket.on('data', function (data) {
            for (let client of data.clients) {
                const iframe = $('#'+client.iframe).contentWindow;

                iframe.addEventListener('load', function(){
                    iframe.postMessage({
                        type: 'create',
                        state: data.clients[0].state,
                    }, '*');
                });

                window.addEventListener('message', function(e) {
                    socket.emit(e.data.type, e.data.data);
                });
            }
        });
    </script>
</body>
</html>


text:
> ⚠ **Important**: this comparison hasn't been updated in years.

This table documents the similarity and difference between
[**markdownlint**](https://github.com/markdownlint/markdownlint/blob/master/docs/RULES.md)
rules and **remark-lint**'s rules.

| markdownlint | remark | note |
| - | - | - |
| MD001 | heading-increment | - |
| MD002 | first-heading-level | - |
| MD003 | heading-style | - |
| MD004 | unordered-list-marker-style | - |
| MD005 | - | mixture of `list-item-indent`, `list-item-bullet-indent`, and `list-item-content-indent` |
| MD006 | list-item-bullet-indent | - |
| MD007 | list-item-bullet-indent | - |
| MD009 | - | Partially by hard-break-spaces |
| MD010 | no-tabs | - |
| MD011 | no-shortcut-reference-link | Although a different message, this will lead you in the right direction |
| MD012 | no-consecutive-blank-lines | - |
| MD013 | maximum-line-length | - |
| MD014 | no-shell-dollars | - |
| MD018 | no-heading-content-indent | Only works in pedantic mode |
| MD019 | no-heading-content-indent | - |
| MD020 | no-heading-content-indent | Only works in pedantic mode |
| MD021 | no-heading-content-indent | - |
| MD022 | no-missing-blank-lines | - |
| MD023 | no-heading-indent | - |
| MD024 | no-duplicate-headings | - |
| MD025 | no-multiple-toplevel-headings | - |
| MD026 | no-heading-punctuation | - |
| MD027 | blockquote-indentation | Won't warn when that's your preferred, consistent style |
| MD028 | no-blockquote-without-marker | - |
| MD029 | ordered-list-marker-value | markdownlint defaults to `one`, whereas remark-lint defaults to `ordered` |
| MD030 | list-item-indent | - |
| MD031 | no-missing-blank-lines | - |
| MD032 | no-missing-blank-lines | - |
| MD033 | no-html | - |
| MD034 | no-literal-urls | - |
| MD035 | rule-style | - |
| MD036 | no-emphasis-as-heading | remark-lint only warns when the emphasis is followed by a colon, but that might change. |
| MD037 | no-inline-padding | - |
| MD038 | no-inline-padding | - |
| MD039 | no-inline-padding | - |
| MD039 | no-inline-padding | - |
| MD040 | fenced-code-flag | - |


text:
<?php

class Google_Service_Classroom_ListCoursesResponse extends Google_Collection
{
  protected $collection_key = 'courses';
  protected $coursesType = 'Google_Service_Classroom_Course';
  protected $coursesDataType = 'array';
  public $nextPageToken;

  /**
   * @param Google_Service_Classroom_Course[]
   */
  public function setCourses($courses)
  {
    $this->courses = $courses;
  }
  /**
   * @return Google_Service_Classroom_Course[]
   */
  public function getCourses()
  {
    return $this->courses;
  }
  public function setNextPageToken($nextPageToken)
  {
    $this->nextPageToken = $nextPageToken;
  }
  public function getNextPageToken()
  {
    return $this->nextPageToken;
  }
}


text:
import sys
import re
import os
import inspect
###############

# Physical Constants

PHYSICAL_CONSTANTS = {
    'h'  : 6.626070E-34, # Planck's constants in J * s
    'c'  : 2.997925E+10, # speed of light in units of cm/s
    'Eh' : 4.359745E-18, # energy of a hartree in units of J = kg m^2/s^2
    'a0' : 5.291772E-11, # bohr radius in m
    'atb': 5.291772E-01, # angstroms per bohr
    'amu': 1.660468E-27, # atomic mass unit in units kg
    'kB' : 1.380649E-23  # Boltzmann's constant in J/K
}
    #CM/2.998E10/,EM/1.440E13/,HBC/1.4387/

###############

# Atomic Weight Information

class Element(object):
    def __init__(self, full_name, atomic_number, symbol, default_mass):
        # the name of this element, like "hydrogen"
        full_name = str(full_name)
        self.full_name = full_name
        if re.match("[^a-z]", full_name):
            print("Unexpected non-lowercase character in element name: %s" % full_name)
            print("Quitting.")
            sys.exit(1)

        # the symbol of this element, like "H"
        symbol = str(symbol)
        self.symbol = symbol
        if re.match("[^a-zA-Z]", symbol):
            print("Unexpected non-letter character in element symbol: %s" % symbol)
            print("Quitting.")
            sys.exit(1)
        if len(symbol) < 1 or len(symbol) > 2:
            print("Unexpected length of element symbol (must be 1 or 2): %s" % symbol)
            print("Quitting.")
            sys.exit(1)

        # the atomic number of this element, like 1
        atomic_number = int(atomic_number)
        self.atomic_number = atomic_number
        if atomic_number < 1 or atomic_number > 200:
            print("Unexpected atomic number: %d" % atomic_number)
            print("Quitting.")
            sys.exit(1)

        # the average weight for this element, like 1.00783
        default_mass = float(default_mass)
        self.default_mass = default_mass
        if default_mass < 0.0 or default_mass > 500.0:
            print("Unexpected default mass: %d" % default_mass)
            print("Quitting.")
            sys.exit(1)

        # pairs of tuples strings (like "2H") to masses (like 2.0141)
        self.replacements = []

    def __str__(self):
        string = "%s (%s, Z=%d, default mass = %.4f" % (self.full_name.capitalize(), self.symbol, self.atomic_number, self.default_mass)
        if len(self.replacements) == 0:
            string += ", no isotopic replacements possible)\n"
        else:
            string += ")\n"
            for s,m in self.replacements:
                string += "    %2s : %.4f\n" % (s,m)
        return string[:-1]

    def add_replacement(self, symbol, mass):
        symbol = str(symbol)
        if re.match("[^a-zA-Z0-9]", symbol):
            print("Unexpected non-letter character in isotopic replacement symbol: %s" % symbol)
            print("Quitting.")
            sys.exit(1)
        if len(symbol) < 1 or len(symbol) > 4:
            print("Unexpected length of element symbol in replacement (must be 1-4 inclusive, found %d): %s" % (len(symbol), symbol))
            print("Quitting.")
            sys.exit(1)
        for s,m in self.replacements:
            if s == symbol:
                print("Must use a unique symbol for every isotopic replacement: %s" % s)
                sys.exit(1)
        mass = float(mass)
        if mass < 0.0 or mass > 500.0:
            print("Unexpected isotopic replacement mass: %f" % mass)
            sys.exit(1)
        self.replacements.append((symbol,mass))

# read in atomic weight data
elements = []

root = os.path.split(os.path.abspath(__file__))[0]

for line in open(root + "/weights.dat", "r"):
    # ignore comments and blank lines
    line = line.strip()
    if len(line) == 0 or line[0] == "#":
        continue
    line = line.split("#",1)[0]

    # parse
    fields = line.split(",") #line.encode("ascii","ignore").split(",")
    if len(fields) < 4:
        print("Error: not enough data on this line of weights.dat:")
        print(line)
        print("\nQuitting.")
        sys.exit(1)
    element = Element(*fields[0:4])
    if (len(fields)-4) % 2 != 0:
        print("Unexpected number of isotopic replacement fields on this line of weights.dat.")
        print("The number of fields after the first four must be a multiple of 2 (found %d)." % (len(fields)-4))
        print(line)
        print("\nQuitting.")
        sys.exit(1)
    if (len(fields) > 4):
        for i in range(4, len(fields), 2):
            element.add_replacement(fields[i], fields[i+1])
    elements.append(element)
    #print element
print("Read atomic weight data for %d elements." % len(elements))

# map from atomic number to default masses
DEFAULT_MASSES = { e.atomic_number : e.default_mass for e in elements }

# map from valid isotopic replacements to masses
REPLACEMENTS = {}
for e in elements:
    for replacement,mass in e.replacements:
        REPLACEMENTS[replacement] = mass

# map from isotopic replacements to atomic numbers
REPLACEMENTS_Z = {}
for e in elements:
    for replacement,mass in e.replacements:
        REPLACEMENTS_Z[replacement]=e.atomic_number

# threshold to separate linear molecules from non-linear molecules
LINEARITY_THRESHOLD = 1e-06
DROP_NUM_LINEAR = 5
# DROP_NUM_NONLINEAR = 6


text:
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"

"""
Test that we can generate Visual Studio 7.1 project (.vcproj) and
solution (.sln) files that contain SCC information and look correct.
"""

import os

import TestSConsMSVS

test = TestSConsMSVS.TestSConsMSVS()

# Make the test infrastructure think we have this version of MSVS installed.
test._msvs_versions = ['7.1']

expected_slnfile = TestSConsMSVS.expected_slnfile_7_1
expected_vcprojfile = TestSConsMSVS.expected_vcprojfile_7_1
SConscript_contents = """\
env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='7.1',
                CPPDEFINES=['DEF1', 'DEF2',('DEF3','1234')],
                CPPPATH=['inc1', 'inc2'],
                MSVS_SCC_CONNECTION_ROOT='.',
                MSVS_SCC_PROVIDER='MSSCCI:Perforce SCM',
                MSVS_SCC_PROJECT_NAME='Perforce Project',
                MSVS_SCC_AUX_PATH='AUX')

testsrc = ['test1.cpp', 'test2.cpp']
testincs = ['sdk.h']
testlocalincs = ['test.h']
testresources = ['test.rc']
testmisc = ['readme.txt']

env.MSVSProject(target = 'Test.vcproj',
                slnguid = '{SLNGUID}',
                srcs = testsrc,
                incs = testincs,
                localincs = testlocalincs,
                resources = testresources,
                misc = testmisc,
                buildtarget = 'Test.exe',
                variant = 'Release')
"""

expected_sln_sccinfo = """\
\tGlobalSection(SourceCodeControl) = preSolution
\t\tSccNumberOfProjects = 2
\t\tSccProjectName0 = Perforce\u0020Project
\t\tSccLocalPath0 = .
\t\tSccProvider0 = MSSCCI:Perforce\u0020SCM
\t\tCanCheckoutShared = true
\t\tSolutionUniqueID = {SLNGUID}
\t\tSccProjectUniqueName1 = Test.vcproj
\t\tSccLocalPath1 = .
\t\tCanCheckoutShared = true
\t\tSccProjectFilePathRelativizedFromConnection1 = .\\\\
\tEndGlobalSection
"""

expected_vcproj_sccinfo = """\
\tSccProjectName="Perforce Project"
\tSccAuxPath="AUX"
\tSccLocalPath="."
\tSccProvider="MSSCCI:Perforce SCM"
"""

test.write('SConstruct', SConscript_contents)

test.run(arguments="Test.vcproj")

test.must_exist(test.workpath('Test.vcproj'))
vcproj = test.read('Test.vcproj', 'r')
expect = test.msvs_substitute(expected_vcprojfile, '7.1', None, 'SConstruct',
                              vcproj_sccinfo=expected_vcproj_sccinfo)
# don't compare the pickled data
assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)

test.must_exist(test.workpath('Test.sln'))
sln = test.read('Test.sln', 'r')
expect = test.msvs_substitute(expected_slnfile, '7.1', None, 'SConstruct',
                              sln_sccinfo=expected_sln_sccinfo)
# don't compare the pickled data
assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)

test.pass_test()

# Local Variables:
# tab-width:4
# indent-tabs-mode:nil
# End:
# vim: set expandtab tabstop=4 shiftwidth=4:


text:
// This file is automatically generated.

package adila.db;

/*
 * Acer Iconia Tab A701
 *
 * DEVICE: picasso_mf
 * MODEL: A701
 */
final class picasso5fmf_a701 {
    public static final String DATA = "Acer|Iconia Tab A701|";
}


text:
package com.microsoft.azure.management.mediaservices.v2019_05_01_preview.implementation;

import com.microsoft.azure.management.mediaservices.v2019_05_01_preview.Operation;
import com.microsoft.azure.arm.model.implementation.WrapperImpl;
import com.microsoft.azure.management.mediaservices.v2019_05_01_preview.OperationDisplay;
import com.microsoft.azure.management.mediaservices.v2019_05_01_preview.MetricProperties;

class OperationImpl extends WrapperImpl<OperationInner> implements Operation {
    private final MediaManager manager;
    OperationImpl(OperationInner inner, MediaManager manager) {
        super(inner);
        this.manager = manager;
    }

    @Override
    public MediaManager manager() {
        return this.manager;
    }

    @Override
    public OperationDisplay display() {
        return this.inner().display();
    }

    @Override
    public String name() {
        return this.inner().name();
    }

    @Override
    public String origin() {
        return this.inner().origin();
    }

    @Override
    public MetricProperties properties() {
        return this.inner().properties();
    }

}


text:
Project Type

                Administrator

Project Type

                                <a type="button" class="btn btn-primary" href="<?php echo $this->config->item('link_project_type_create'); ?>">Add Project Type


text:
@implementation NSArray (Blocks)

#pragma mark - Enumeration

- (void)each:(void (^)(id))block;
{
  [self enumerateObjectsUsingBlock: ^(id item, NSUInteger i, BOOL *stop) { block(item); }];
}

- (void)eachWithIndex:(void (^)(id, NSUInteger))block;
{
  [self enumerateObjectsUsingBlock: ^(id item, NSUInteger i, BOOL *stop) { block(item, i); }];
}

- (void)eachMatching:(BOOL (^)(id item))predicate do:(void (^)(id item))action;
{
  for (id obj in self)
  {
    if (predicate(obj))
    {
      action(obj);
    }
  }
}

#pragma mark - Filters

- (NSArray *)filter:(BOOL (^)(id))block;
{
  NSMutableArray *result = [NSMutableArray arrayWithCapacity:[self count]];

  for (id obj in self)
  {
    if (!block(obj))
    {
      [result addObject:obj];
    }
  }

  return [[result copy] autorelease];
}

- (NSArray *)pick:(BOOL (^)(id))block;
{
  NSMutableArray *result = [NSMutableArray arrayWithCapacity:[self count]];

  for (id obj in self)
  {
    if (block(obj))
    {
      [result addObject:obj];
    }
  }

  return [[result copy] autorelease];
}

- (id)first:(BOOL (^)(id))block;
{
	id result = nil;

  for (id obj in self)
  {
    if (block(obj))
    {
      result = obj;
      break;
    }
  }

  return result;
}

- (NSUInteger)indexOfFirst:(BOOL (^)(id item))block;
{
  return [self indexOfObjectPassingTest:^ BOOL (id item, NSUInteger idx, BOOL *stop) {
		if (block(item))
    {
      *stop = YES;
      return YES;
    }

    return NO;
  }];
}

- (id)last:(BOOL (^)(id))block;
{
	id result = nil;

  for (id obj in [self reverseObjectEnumerator])
  {
    if (block(obj))
    {
      result = obj;
      break;
    }
  }

  return result;
}

- (NSUInteger)indexOfLast:(BOOL (^)(id item))block;
{
  return [self indexOfObjectWithOptions:NSEnumerationReverse passingTest:^ BOOL (id item, NSUInteger idx, BOOL *stop) {
		if (block(item))
    {
      *stop = YES;
      return YES;
    }

    return NO;
  }];
}

#pragma mark - Transformations

- (NSArray *)map:(id (^)(id item))block;
{
  return [self map:block filterNil:YES];
}

- (NSArray *)map:(id (^)(id item))block filterNil:(BOOL)filter_nil;
{
  NSMutableArray *result = [NSMutableArray arrayWithCapacity:[self count]];

  for (id obj in self)
  {
    id instance = block(obj);

    if (nil != instance)
    {
      [result addObject:instance];
    }
    else if (!filter_nil)
    {
      [result addObject:[NSNull null]];
    }
  }

  return [NSArray arrayWithArray:result];
}

- (id)reduce:(id (^)(id current, id item))block initial:(id)initial;
{
  id result = initial;

  for (id obj in self)
  {
    result = block(result, obj);
  }

  return result;
}

- (NSArray *)intersperse:(id (^) (id current, id next))separator;
{
  if ([self count] < 2) return [[self copy] autorelease];

  NSMutableArray *result = [NSMutableArray arrayWithCapacity:(([self count] * 2) - 1)];

  id current = [self first];
  for (NSUInteger idx = 1; idx < [self count]; idx++) {
    [result addObject:current];

    id next = [self objectAtIndex:idx];
    [result addObject:separator(current, next)];
    current = next;
  }
  [result addObject:[self last]];

  return [[result copy] autorelease];
}

- (BOOL)any:(BOOL (^)(id))block;
{
  return NSNotFound != [self indexOfFirst:block];
}

- (BOOL)all:(BOOL (^)(id))block;
{
  return NSNotFound == [self indexOfFirst:^ BOOL (id item) { return !block(item); }];
}

- (NSArray *)pad:(NSInteger)size;
{
  return [self pad:size with:^ id (NSInteger index) {
    return [NSNull null];
  }];
}

- (NSArray *)pad:(NSInteger)size with:(id (^)())fill;
{
  if ([self count] >= size) return self;

  NSMutableArray *result = [NSMutableArray arrayWithCapacity:size];
  [result addObjectsFromArray:self];

  for (NSInteger idx = [result count]; idx < size; idx++)
  {
    [result addObject:fill()];
  }

  return [[result copy] autorelease];
}

@end


text:
To test, run

 > npm start

This will start the Webpack dev server. You can then open http://localhost:9000

# Building

To change the actual site, run

 > npm run build.prod


text:
/*
 * Licensed 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.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.compute.model;

/**
 * A network interface resource attached to an instance.
 *
 *
 This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Compute Engine API. For a detailed explanation see:
 * https://developers.google.com/api-client-library/java/google-http-java-client/json
 *

 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class NetworkInterface extends com.google.api.client.json.GenericJson {

  /**
   * An array of configurations for this interface. Currently, only one access config,
   * ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will
   * have no external internet access.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<AccessConfig> accessConfigs;

  static {
    // hack to force ProGuard to consider AccessConfig used, since otherwise it would be stripped out
    // see https://github.com/google/google-api-java-client/issues/543
    com.google.api.client.util.Data.nullOf(AccessConfig.class);
  }

  /**
   * An array of alias IP ranges for this network interface. You can only specify this field for
   * network interfaces in VPC networks.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<AliasIpRange> aliasIpRanges;

  static {
    // hack to force ProGuard to consider AliasIpRange used, since otherwise it would be stripped out
    // see https://github.com/google/google-api-java-client/issues/543
    com.google.api.client.util.Data.nullOf(AliasIpRange.class);
  }

  /**
   * Fingerprint hash of contents stored in this network interface. This field will be ignored when
   * inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided
   * in order to update the NetworkInterface, otherwise the request will fail with error 412
   * conditionNotMet.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String fingerprint;

  /**
   * [Output Only] The prefix length of the primary internal IPv6 range.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer internalIpv6PrefixLength;

  /**
   * An array of IPv6 access configurations for this interface. Currently, only one IPv6 access
   * config, DIRECT_IPV6, is supported. If there is no ipv6AccessConfig specified, then this
   * instance will have no external IPv6 Internet access.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<AccessConfig> ipv6AccessConfigs;

  static {
    // hack to force ProGuard to consider AccessConfig used, since otherwise it would be stripped out
    // see https://github.com/google/google-api-java-client/issues/543
    com.google.api.client.util.Data.nullOf(AccessConfig.class);
  }

  /**
   * [Output Only] An IPv6 internal network address for this network interface.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String ipv6Address;

  /**
   * [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String kind;

  /**
   * [Output Only] The name of the network interface, which is generated by the server. For network
   * devices, these are eth0, eth1, etc.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String name;

  /**
   * URL of the network resource for this instance. When creating an instance, if neither the
   * network nor the subnetwork is specified, the default network global/networks/default is used;
   * if the network is not specified but the subnetwork is specified, the network is inferred.
   *
   * If you specify this property, you can specify the network as a full or partial URL. For
   * example, the following are all valid URLs:   -
   * https://www.googleapis.com/compute/v1/projects/project/global/networks/network  -
   * projects/project/global/networks/network  - global/networks/default
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String network;

  /**
   * An IPv4 internal IP address to assign to the instance for this network interface. If not
   * specified by the user, an unused internal IP is assigned by the system.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String networkIP;

  /**
   * The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String nicType;

  /**
   * The networking queue count that's specified by users for the network interface. Both Rx and Tx
   * queues will be set to this number. It'll be empty if not specified by the users.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer queueCount;

  /**
   * The stack type for this network interface to identify whether the IPv6 feature is enabled or
   * not. If not specified, IPV4_ONLY will be used.
   *
   * This field can be both set at instance creation and update network interface operations.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String stackType;

  /**
   * The URL of the Subnetwork resource for this instance. If the network resource is in legacy
   * mode, do not specify this field. If the network is in auto subnet mode, specifying the
   * subnetwork is optional. If the network is in custom subnet mode, specifying the subnetwork is
   * required. If you specify this field, you can specify the subnetwork as a full or partial URL.
   * For example, the following are all valid URLs: -
   * https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork  -
   * regions/region/subnetworks/subnetwork
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String subnetwork;

  /**
   * An array of configurations for this interface. Currently, only one access config,
   * ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will
   * have no external internet access.
   * @return value or {@code null} for none
   */
  public java.util.List<AccessConfig> getAccessConfigs() {
    return accessConfigs;
  }

  /**
   * An array of configurations for this interface. Currently, only one access config,
   * ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will
   * have no external internet access.
   * @param accessConfigs accessConfigs or {@code null} for none
   */
  public NetworkInterface setAccessConfigs(java.util.List<AccessConfig> accessConfigs) {
    this.accessConfigs = accessConfigs;
    return this;
  }

  /**
   * An array of alias IP ranges for this network interface. You can only specify this field for
   * network interfaces in VPC networks.
   * @return value or {@code null} for none
   */
  public java.util.List<AliasIpRange> getAliasIpRanges() {
    return aliasIpRanges;
  }

  /**
   * An array of alias IP ranges for this network interface. You can only specify this field for
   * network interfaces in VPC networks.
   * @param aliasIpRanges aliasIpRanges or {@code null} for none
   */
  public NetworkInterface setAliasIpRanges(java.util.List<AliasIpRange> aliasIpRanges) {
    this.aliasIpRanges = aliasIpRanges;
    return this;
  }

  /**
   * Fingerprint hash of contents stored in this network interface. This field will be ignored when
   * inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided
   * in order to update the NetworkInterface, otherwise the request will fail with error 412
   * conditionNotMet.
   * @see #decodeFingerprint()
   * @return value or {@code null} for none
   */
  public java.lang.String getFingerprint() {
    return fingerprint;
  }

  /**
   * Fingerprint hash of contents stored in this network interface. This field will be ignored when
   * inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided
   * in order to update the NetworkInterface, otherwise the request will fail with error 412
   * conditionNotMet.
   * @see #getFingerprint()
   * @return Base64 decoded value or {@code null} for none
   *
   * @since 1.14
   */
  public byte[] decodeFingerprint() {
    return com.google.api.client.util.Base64.decodeBase64(fingerprint);
  }

  /**
   * Fingerprint hash of contents stored in this network interface. This field will be ignored when
   * inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided
   * in order to update the NetworkInterface, otherwise the request will fail with error 412
   * conditionNotMet.
   * @see #encodeFingerprint()
   * @param fingerprint fingerprint or {@code null} for none
   */
  public NetworkInterface setFingerprint(java.lang.String fingerprint) {
    this.fingerprint = fingerprint;
    return this;
  }

  /**
   * Fingerprint hash of contents stored in this network interface. This field will be ignored when
   * inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided
   * in order to update the NetworkInterface, otherwise the request will fail with error 412
   * conditionNotMet.
   * @see #setFingerprint()
   *
   *

   * The value is encoded Base64 or {@code null} for none.
   *

   *
   * @since 1.14
   */
  public NetworkInterface encodeFingerprint(byte[] fingerprint) {
    this.fingerprint = com.google.api.client.util.Base64.encodeBase64URLSafeString(fingerprint);
    return this;
  }

  /**
   * [Output Only] The prefix length of the primary internal IPv6 range.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getInternalIpv6PrefixLength() {
    return internalIpv6PrefixLength;
  }

  /**
   * [Output Only] The prefix length of the primary internal IPv6 range.
   * @param internalIpv6PrefixLength internalIpv6PrefixLength or {@code null} for none
   */
  public NetworkInterface setInternalIpv6PrefixLength(java.lang.Integer internalIpv6PrefixLength) {
    this.internalIpv6PrefixLength = internalIpv6PrefixLength;
    return this;
  }

  /**
   * An array of IPv6 access configurations for this interface. Currently, only one IPv6 access
   * config, DIRECT_IPV6, is supported. If there is no ipv6AccessConfig specified, then this
   * instance will have no external IPv6 Internet access.
   * @return value or {@code null} for none
   */
  public java.util.List<AccessConfig> getIpv6AccessConfigs() {
    return ipv6AccessConfigs;
  }

  /**
   * An array of IPv6 access configurations for this interface. Currently, only one IPv6 access
   * config, DIRECT_IPV6, is supported. If there is no ipv6AccessConfig specified, then this
   * instance will have no external IPv6 Internet access.
   * @param ipv6AccessConfigs ipv6AccessConfigs or {@code null} for none
   */
  public NetworkInterface setIpv6AccessConfigs(java.util.List<AccessConfig> ipv6AccessConfigs) {
    this.ipv6AccessConfigs = ipv6AccessConfigs;
    return this;
  }

  /**
   * [Output Only] An IPv6 internal network address for this network interface.
   * @return value or {@code null} for none
   */
  public java.lang.String getIpv6Address() {
    return ipv6Address;
  }

  /**
   * [Output Only] An IPv6 internal network address for this network interface.
   * @param ipv6Address ipv6Address or {@code null} for none
   */
  public NetworkInterface setIpv6Address(java.lang.String ipv6Address) {
    this.ipv6Address = ipv6Address;
    return this;
  }

  /**
   * [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
   * @return value or {@code null} for none
   */
  public java.lang.String getKind() {
    return kind;
  }

  /**
   * [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
   * @param kind kind or {@code null} for none
   */
  public NetworkInterface setKind(java.lang.String kind) {
    this.kind = kind;
    return this;
  }

  /**
   * [Output Only] The name of the network interface, which is generated by the server. For network
   * devices, these are eth0, eth1, etc.
   * @return value or {@code null} for none
   */
  public java.lang.String getName() {
    return name;
  }

  /**
   * [Output Only] The name of the network interface, which is generated by the server. For network
   * devices, these are eth0, eth1, etc.
   * @param name name or {@code null} for none
   */
  public NetworkInterface setName(java.lang.String name) {
    this.name = name;
    return this;
  }

  /**
   * URL of the network resource for this instance. When creating an instance, if neither the
   * network nor the subnetwork is specified, the default network global/networks/default is used;
   * if the network is not specified but the subnetwork is specified, the network is inferred.
   *
   * If you specify this property, you can specify the network as a full or partial URL. For
   * example, the following are all valid URLs:   -
   * https://www.googleapis.com/compute/v1/projects/project/global/networks/network  -
   * projects/project/global/networks/network  - global/networks/default
   * @return value or {@code null} for none
   */
  public java.lang.String getNetwork() {
    return network;
  }

  /**
   * URL of the network resource for this instance. When creating an instance, if neither the
   * network nor the subnetwork is specified, the default network global/networks/default is used;
   * if the network is not specified but the subnetwork is specified, the network is inferred.
   *
   * If you specify this property, you can specify the network as a full or partial URL. For
   * example, the following are all valid URLs:   -
   * https://www.googleapis.com/compute/v1/projects/project/global/networks/network  -
   * projects/project/global/networks/network  - global/networks/default
   * @param network network or {@code null} for none
   */
  public NetworkInterface setNetwork(java.lang.String network) {
    this.network = network;
    return this;
  }

  /**
   * An IPv4 internal IP address to assign to the instance for this network interface. If not
   * specified by the user, an unused internal IP is assigned by the system.
   * @return value or {@code null} for none
   */
  public java.lang.String getNetworkIP() {
    return networkIP;
  }

  /**
   * An IPv4 internal IP address to assign to the instance for this network interface. If not
   * specified by the user, an unused internal IP is assigned by the system.
   * @param networkIP networkIP or {@code null} for none
   */
  public NetworkInterface setNetworkIP(java.lang.String networkIP) {
    this.networkIP = networkIP;
    return this;
  }

  /**
   * The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.
   * @return value or {@code null} for none
   */
  public java.lang.String getNicType() {
    return nicType;
  }

  /**
   * The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.
   * @param nicType nicType or {@code null} for none
   */
  public NetworkInterface setNicType(java.lang.String nicType) {
    this.nicType = nicType;
    return this;
  }

  /**
   * The networking queue count that's specified by users for the network interface. Both Rx and Tx
   * queues will be set to this number. It'll be empty if not specified by the users.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getQueueCount() {
    return queueCount;
  }

  /**
   * The networking queue count that's specified by users for the network interface. Both Rx and Tx
   * queues will be set to this number. It'll be empty if not specified by the users.
   * @param queueCount queueCount or {@code null} for none
   */
  public NetworkInterface setQueueCount(java.lang.Integer queueCount) {
    this.queueCount = queueCount;
    return this;
  }

  /**
   * The stack type for this network interface to identify whether the IPv6 feature is enabled or
   * not. If not specified, IPV4_ONLY will be used.
   *
   * This field can be both set at instance creation and update network interface operations.
   * @return value or {@code null} for none
   */
  public java.lang.String getStackType() {
    return stackType;
  }

  /**
   * The stack type for this network interface to identify whether the IPv6 feature is enabled or
   * not. If not specified, IPV4_ONLY will be used.
   *
   * This field can be both set at instance creation and update network interface operations.
   * @param stackType stackType or {@code null} for none
   */
  public NetworkInterface setStackType(java.lang.String stackType) {
    this.stackType = stackType;
    return this;
  }

  /**
   * The URL of the Subnetwork resource for this instance. If the network resource is in legacy
   * mode, do not specify this field. If the network is in auto subnet mode, specifying the
   * subnetwork is optional. If the network is in custom subnet mode, specifying the subnetwork is
   * required. If you specify this field, you can specify the subnetwork as a full or partial URL.
   * For example, the following are all valid URLs: -
   * https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork  -
   * regions/region/subnetworks/subnetwork
   * @return value or {@code null} for none
   */
  public java.lang.String getSubnetwork() {
    return subnetwork;
  }

  /**
   * The URL of the Subnetwork resource for this instance. If the network resource is in legacy
   * mode, do not specify this field. If the network is in auto subnet mode, specifying the
   * subnetwork is optional. If the network is in custom subnet mode, specifying the subnetwork is
   * required. If you specify this field, you can specify the subnetwork as a full or partial URL.
   * For example, the following are all valid URLs: -
   * https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork  -
   * regions/region/subnetworks/subnetwork
   * @param subnetwork subnetwork or {@code null} for none
   */
  public NetworkInterface setSubnetwork(java.lang.String subnetwork) {
    this.subnetwork = subnetwork;
    return this;
  }

  @Override
  public NetworkInterface set(String fieldName, Object value) {
    return (NetworkInterface) super.set(fieldName, value);
  }

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

}


text:
import {isMatchMediaChangeEventListenerSupported} from './platform';

let query: MediaQueryList = null;
const onChange: ({matches}: {matches: boolean}) => void = ({matches}) => listeners.forEach((listener) => listener(matches));
const listeners = new Set<(isDark: boolean) => void>();

export function runColorSchemeChangeDetector(callback: (isDark: boolean) => void) {
    listeners.add(callback);
    if (query) {
        return;
    }
    query = matchMedia('(prefers-color-scheme: dark)');
    if (isMatchMediaChangeEventListenerSupported) {
        query.addEventListener('change', onChange);
    } else {
        query.addListener(onChange);
    }
}

export function stopColorSchemeChangeDetector() {
    if (!query || !onChange) {
        return;
    }
    if (isMatchMediaChangeEventListenerSupported) {
        query.removeEventListener('change', onChange);
    } else {
        query.removeListener(onChange);
    }
    listeners.clear();
    query = null;
}

export const isSystemDarkModeEnabled = () => (query || matchMedia('(prefers-color-scheme: dark)')).matches;


text:
package com.example.android.bluetoothchat;

import android.app.ActionBar;
import android.app.Activity;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.Vibrator;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.EditorInfo;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;

import com.example.android.common.logger.Log;

/**
 * This fragment controls Bluetooth to communicate with other devices.
 */
public class TVremoteFragment extends Fragment {

    private static final String TAG = "TVremoteFragment";

    /**
     * Vibrate motor
     */
    private Vibrator MyVib;

    /**
     *
     * buttons
     */
    private ImageButton bDownArrow;
    private ImageButton bEight;
    private ImageButton bFive;
    private ImageButton bFour;
    private ImageButton bInput;
    private ImageButton bLeftArrow;
    private ImageButton bLouder;
    private ImageButton bMute;
    private ImageButton bNine;
    private ImageButton bOK;
    private ImageButton bOne;
    private ImageButton bQuieter;
    private ImageButton bRightArrow;
    private ImageButton bSeven;
    private ImageButton bSix;
    private ImageButton bThree;
    private ImageButton bTVpower;
    private ImageButton bTwo;
    private ImageButton bUpArrow;
    private ImageButton bZero;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setHasOptionsMenu(true);

        MyVib = (Vibrator) getActivity().getSystemService(Context.VIBRATOR_SERVICE);
    }

    @Override
    public void onStart() {
        super.onStart();
        setupTVRemote();
    }

    @Override
    public void onDestroy() {
    }

    @Override
    public void onResume() {
        super.onResume();
    }

    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
                             @Nullable Bundle savedInstanceState) {
        return inflater.inflate(R.layout.tv_remote, container, false);
    }

    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        bDownArrow = (ImageButton) view.findViewById(R.id.down_arrow);
        bEight = (ImageButton) view.findViewById(R.id.eight);
        bFive = (ImageButton) view.findViewById(R.id.five);
        bFour = (ImageButton) view.findViewById(R.id.four);
        bLeftArrow = (ImageButton) view.findViewById(R.id.left_arrow);
        bLouder = (ImageButton) view.findViewById(R.id.louder);
        bMute = (ImageButton) view.findViewById(R.id.mute);
        bNine = (ImageButton) view.findViewById(R.id.nine);
        bOK = (ImageButton) view.findViewById(R.id.ok);
        bOne = (ImageButton) view.findViewById(R.id.one);
        bQuieter = (ImageButton) view.findViewById(R.id.quieter);
        bRightArrow = (ImageButton) view.findViewById(R.id.right_arrow);
        bSeven = (ImageButton) view.findViewById(R.id.seven);
        bSix = (ImageButton) view.findViewById(R.id.six);
        bThree = (ImageButton) view.findViewById(R.id.three);
        bTVpower = (ImageButton) view.findViewById(R.id.tvpower);
        bTwo = (ImageButton) view.findViewById(R.id.two);
        bUpArrow = (ImageButton) view.findViewById(R.id.up_arrow);
        bZero = (ImageButton) view.findViewById(R.id.zero);
    }

    /**
     * Set up the UI and background operations for chat.
     */
    private void setupTVRemote() {
        Log.d(TAG, "setupButton()");

        /**
         * Buttons
         */
        // Initialize the send button with a listener that for click events
        bDownArrow.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                // Send a message using content of the edit text widge
                sendMessage("Conf1_ChannelD\r\n");
                if (Global.mState == 3) {
                    MyVib.vibrate(100);
                }
            }
        });

        bEight.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                // Send a message using content of the edit text widge
                sendMessage("Conf1_ChannelD\r\n");
                if (Global.mState == 3) {
                    MyVib.vibrate(100);
                }
            }
        });

        bFive.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                // Send a message using content of the edit text widge
                sendMessage("Conf1_ChannelD\r\n");
                if (Global.mState == 3) {
                    MyVib.vibrate(100);
                }
            }
        });

        bFour.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                // Send a message using content of the edit text widge
                sendMessage("Conf1_ChannelD\r\n");
                if (Global.mState == 3) {
                    MyVib.vibrate(100);
                }
            }
        });

        bInput.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                // Send a message using content of the edit text widge
                sendMessage("Conf1_ChannelD\r\n");
                if (Global.mState == 3) {
                    MyVib.vibrate(100);
                }
            }
        });

        bLeftArrow.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                // Send a message using content of the edit text widge
                sendMessage("Conf1_ChannelD\r\n");
                if (Global.mState == 3) {
                    MyVib.vibrate(100);
                }
            }
        });

        bLouder.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                // Send a message using content of the edit text widge
                sendMessage("Conf1_ChannelD\r\n");
                if (Global.mState == 3) {
                    MyVib.vibrate(100);
                }
            }
        });

        bMute.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                // Send a message using content of the edit text widge
                sendMessage("Conf1_ChannelD\r\n");
                if (Global.mState == 3) {
                    MyVib.vibrate(100);
                }
            }
        });

        bNine.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                // Send a message using content of the edit text widge
                sendMessage("Conf1_ChannelD\r\n");
                if (Global.mState == 3) {
                    MyVib.vibrate(100);
                }
            }
        });

        bOK.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                // Send a message using content of the edit text widge
                sendMessage("Conf1_ChannelD\r\n");
                if (Global.mState == 3) {
                    MyVib.vibrate(100);
                }
            }
        });

        bOne.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                // Send a message using content of the edit text widge
                sendMessage("Conf1_ChannelD\r\n");
                if (Global.mState == 3) {
                    MyVib.vibrate(100);
                }
            }
        });

        bQuieter.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                // Send a message using content of the edit text widge
                sendMessage("Conf1_ChannelD\r\n");
                if (Global.mState == 3) {
                    MyVib.vibrate(100);
                }
            }
        });

        bRightArrow.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                // Send a message using content of the edit text widge
                sendMessage("Conf1_ChannelD\r\n");
                if (Global.mState == 3) {
                    MyVib.vibrate(100);
                }
            }
        });

        bSeven.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                // Send a message using content of the edit text widge
                sendMessage("Conf1_ChannelD\r\n");
                if (Global.mState == 3) {
                    MyVib.vibrate(100);
                }
            }
        });

        bSix.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                // Send a message using content of the edit text widge
                sendMessage("Conf1_ChannelD\r\n");
                if (Global.mState == 3) {
                    MyVib.vibrate(100);
                }
            }
        });

        bThree.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                // Send a message using content of the edit text widge
                sendMessage("Conf1_ChannelD\r\n");
                if (Global.mState == 3) {
                    MyVib.vibrate(100);
                }
            }
        });

        bTVpower.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                // Send a message using content of the edit text widge
                sendMessage("Conf1_ChannelD\r\n");
                if (Global.mState == 3) {
                    MyVib.vibrate(100);
                }
            }
        });

        bTwo.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                // Send a message using content of the edit text widge
                sendMessage("Conf1_ChannelD\r\n");
                if (Global.mState == 3) {
                    MyVib.vibrate(100);
                }
            }
        });

        bUpArrow.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                // Send a message using content of the edit text widge
                sendMessage("Conf1_ChannelD\r\n");
                if (Global.mState == 3) {
                    MyVib.vibrate(100);
                }
            }
        });

        bZero.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                // Send a message using content of the edit text widge
                sendMessage("Conf1_ChannelD\r\n");
                if (Global.mState == 3) {
                    MyVib.vibrate(100);
                }
            }
        });
    }

    /**
     * Sends a message.
     *
     * @param message A string of text to send.
     */
    private void sendMessage(String message) {
        // Check that we're actually connected before trying anything
    }

}


text:
<?php

return [

    /*
    |--------------------------------------------------------------------------
    | History Language Lines
    |--------------------------------------------------------------------------
    |
    | The following language lines contain strings associated to the
    | system adding lines to the history table.
    |
    */

    'backend' => [
        'none'            => 'Aucun historique récent.',
        'none_for_type'   => 'Aucun historique pour ce type.',
        'none_for_entity' => 'Aucun historique pour :entity.',
        'recent_history'  => 'Historique récent',

        'roles' => [
            'created' => 'a créé le rôle',
            'deleted' => 'a effacé le rôle',
            'updated' => 'a mis à jour le rôle',
        ],
        'users' => [
            'changed_password'    => "a modifié le mot de passe de l'utilisateur",
            'confirmed' => "a confirmé le compte de l'utilisateur",
            'created'             => "a créé l'utilisateur",
            'deactivated'         => "a désactivé l'utilisateur",
            'deleted'             => "a effacé l'utilisateur",
            'deleted_social'      => 'a effacé le compte de réseau social',
            'permanently_deleted' => "a définitivement effacé l'utilisateur",
            'updated'             => "a mis à jour l'utilisateur",
            'unconfirmed' => "a infirmé le compte de l'utilisateur",
            'reactivated'         => "a réactivé l'utilisateur",
            'restored'            => "a restauré l'utilisateur",
        ],
    ],
];