text:
[![InformHer](https://raw.github.com/pup-progguild/InformHerWeb/master/img/informher-banner-with-icon.png)](http://pup-progguild.github.io/InformHerAPI/)
# InformHer API

[![Build Status](https://travis-ci.org/pup-progguild/InformHerAPI.png)](https://travis-ci.org/pup-progguild/InformHerAPI)
[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/pup-progguild/InformHerAPI/badges/quality-score.png?s=48c6685d02e8f073abb84040aa40ace2761a9275)](https://scrutinizer-ci.com/g/pup-progguild/InformHerAPI/)
[![Code Coverage](https://scrutinizer-ci.com/g/pup-progguild/InformHerAPI/badges/coverage.png?s=4cfeed62b33b895568ae357d9c22899fb3b1f9fc)](https://scrutinizer-ci.com/g/pup-progguild/InformHerAPI/)
[![Dependency Status](https://www.versioneye.com/user/projects/52f081ccec1375c64f000157/badge.png)](https://www.versioneye.com/user/projects/52f081ccec1375c64f000157)

This is the [InformHer API](https://github.com/pup-progguild/InformHerAPI) for the InformHer app for mobile and web.

### Documentation

Base API URL is

* http://informherapi.cloudapp.net/

**NOTE**: You'll be redirected to this page if you access the Base API URL without any appended URIs

### Usage

If in cURL,

```bash
$> curl --include --request GET 'http://informherapi.cloudapp.net/posts/2'
```

Sample JSON response would be,

```json
{
	"status": "POST_SHOW_SUCCESSFUL",
	"posts": {
		"id": "2",
		"title": "Is it alright to ask a question here?",
		"content": "To make your document look professionally produced, Word provides header, footer, cover page, and text box designs that complement each other. For example, you can add a matching cover page, header, and sidebar.",
		"geolocation": null,
		"srclink": null,
		"created_at": "2014-02-27 07:40:21",
		"updated_at": "2014-02-27 07:40:21",
		"likers": "3",
		"is_featured": false,
		"comments_count": "8",
		"tags": [{
			"id": "5",
			"tagname": "news"
		}],
		"author": {
			"id": "2",
			"username": "ni-kun",
			"email": "ni-kun@informher.com",
			"profile": {
				"avatar_url": "https:\/\/secure.gravatar.com\/avatar\/fabe04b0ebf26d5e9bd05a504778f382?s=80&r=g&d=identicon",
				"badge": "The Second User",
				"twt_handle": "ni-kun",
				"facebook_username": "ni-kun",
				"bio": "This is the second user. Name was taken from the Japanese word for 'two'",
				"hompage_url": "http:\/\/ni-kun.com",
				"user_id": "2",
				"created_at": "2014-02-27 07:40:23",
				"updated_at": "2014-02-27 07:40:23",
				"email_address": "ni-kun@informher.com",
				"assigned_roles": ["User"],
				"username": "ni-kun"
			}
		},
		"category": {
			"name": "ask"
		}
	}
}
```

### Endpoints

We'll be making better docs, but we hope this would suffice in the meantime. Please see our uploaded [Postman Collection](https://www.getpostman.com/collections/8ccf078ae58b3ecdc019) for testing the endpoints.

| URI                                         | Short Description      | Action                                 | POST Params        | Required Roles (Any)				|
|---------------------------------------------|------------------------|----------------------------------------|---------|---------------|
| GET posts                                   | GetAllPosts            | PostController@index                   |         |               |
| GET posts/{id}                              | GetPost                | PostController@show                    |         |               |
| GET posts/{id}/comments/{id?}        		  | GetCommentsFromPost    | PostController@comments                |         |               |
| GET posts/{id}/tags                         | GetAllTagsFromPost     | PostController@tags                    |         |               |
| GET posts/{id}/likes                        | GetAllLikesFromPost    | PostController@likes                   |         |               |
| GET posts/{id}/comments/{id}/likes   	      | GetAllLikesFromComment | PostController@likes                   |         |               |
| POST posts/{post?}                          | CreateEditPost         | PostController@create_edit             | string:['title', 'content', 'geolocation'] , array:['tags']       |               |
| POST posts/{id}/comments/{id?}       		  | CreateUpdateComment    | PostController@create_update_comment   | string:['message']        |               |
| POST posts/{id}/like                        | LikePost               | PostController@like                    |         |               |
| POST posts/{id}/comments/{id}/like   		  | LikePostComment        | PostController@like                    |         |               |
| POST posts/search                           | SearchPosts            | PostController@search                  | params:[title,content,author,tags,all] , string:['query']        |               |
| DELETE posts/{id}/comments/{id?}     		  | DeletePostComment      | PostController@delete_comment          |         |               |
| DELETE posts/{id}                           | DeletePost             | PostController@destroy                 |         |               |
| GET tags                                    | Tags                   | TagController@index                    |         |               |
| GET category                                | Categories             | CategoryController@index               |         |               |
| GET user/confirm/{code}                     | ConfirmUser            | UserController@getConfirm              |         |               |
| GET user/reset/{token}                      | RetrieveResetPassToken | UserController@getReset                |         |               |
| POST user									  | RegisterUser	       | UserController@postIndex               | string:['username', 'password', 'email']        |               |
| POST user/login							  | LoginToInformHer       | UserController@postLogin               | string:['username', 'password']        |               |
| POST user/forgot							  | ProcessForgotPass      | UserController@postForgot              |         |               |
| POST user/reset 							  | ResetPassUsingToken    | UserController@postReset               |         |               |
| GET user/logout							  | LogoutToInformHer      | UserController@getLogout               |         |               |
| GET user                                    | GetLoggedUserProps     | UserController@getIndex                |         |               |
| GET user/posts    						  | GetLoggedUserPosts     | UserController@getPosts                |         |               |
| GET user/comments							  | GetLoggedUserComments  | UserController@getComments             |         |               |
| GET user/profile							  | GetLoggedUserProfile   | UserController@getProfile              |         |               |
| POST user/profile							  | ProcessUserProfile     | UserController@postProfile             |         |               |
| GET admin/users/{id}/delete                 | DeleteUser             | AdminController@delete_user          	|         | Administrator              |
| POST admin/users/{id}/promote               | PromoteUser            | AdminController@promote              	|         | Administrator              |
| POST admin/users/{id}/demote                | DemoteUser             | AdminController@demote                 |         | Administrator              |
| GET admin/posts/unapproved                  | ShowUnapprovedPosts    | AdminController@show_unapproved      	|         | Administrator, Moderator              |
| GET admin/posts/{id}/approve                | ApprovePost            | AdminController@show_post            	|         | Administrator, Moderator              |
| GET admin/posts/{id}/hide                   | HidePost               | AdminController@hide                 	|         | Administrator, Moderator              |
| POST admin/tags/{id?}                       | AddCreateTags          | TagController@create_edit              |         | Administrator, Moderator              |
| DELETE admin/tags/{id}                      | DeleteTag              | TagController@destroy                  |         | Administrator, Moderator               |

### BuiltWith

- [Laravel PHP](https://github.com/laravel/laravel)

### TechStack

- [PHP 5.4+](http://php.net)
- [Nginx](http://nginx.org/)
- [MariaDB 10+](https://mariadb.com/)
- [Memcached](http://memcached.org/)
- [Ubuntu 13.10](http://www.ubuntu.com)
- [Windows Azure](http://www.windowsazure.com)

### License

Copyright 2014 PUP Programming Guild

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](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.

### Devs

- Mark Jayson Fuentes @[awkwardusername](https://github.com/awkwardusername) [lead]
- PUP Programming Guild @[pup-progguild](https://github.com/pup-progguild) [the rest of the team ;)]

About Us
--------

We're the [**PUP Programming Guild**](https://github.com/pup-progguild/), a bunch of students from the [Polytechnic University of the Philippines](http://www.pup.edu.ph) who consumes more time outside school, than inside classes. But really, we take our studies to heart. We deal with *competitions*, *hackathons*, and [*action movies*](http://www.youtube.com/watch?v=Xt_OgYMQFRY).

--------

Like us on [Facebook](https://www.facebook.com/PupProgrammingGuild) or Follow us on [Twitter](https://twitter.com/pup_progguild).


text:
TABLE OF INTERACTIONS WITH

ANTIPURINES

From the French ANSM drug interactions document of September 2016, p. 28

ANTIPURINES

CLASS CODE: ANTIPUR

VITAMIN K ANTAGONISTS

CLASS CODE:

B01AA-001

Decrease of the effect of the Vitamin K antagonist due to increase of its hepatic metabolism

Precaution for use

More frequent testing of the INR. Possible adjustment of the dosage of the Vitamin K antagonist at the beginning of the treatment with the immuno-inhibitor and after it is stopped

ANTIPURINES

CLASS CODE: ANTIPUR

DERIVATIVES OF AMINOSALICYLIC ACID (ASA)

CLASS CODE:

A07EC-001

Risk of increase of the myelotoxicity of the immunoinhibitor, by inhibition of its hepatic metabolism by the ASA derivative, especially with patients presenting a partial deficit of thiopurine methyltransferase (TPMT)

Take into account

ANTIPURINES

CLASS CODE: ANTIPUR

XANTHINE OXYDASE INHIBITORS

CLASS CODE: M04AA0

Possibly serious medullary insufficiency

CONTRAINDICATION

ANTIPURINES

CLASS CODE: ANTIPUR

RIBAVIRIN

RxNorm: 9344

ATC: J05AB04

Increased risks of serious undesirable effects, due to inhibition of the metabolism of the immunoinhibitor by the ribavirin

Not recommended

redpajama_set_name: RedPajamaGithub


text:
Configuration files

## Install
1. `git clone https://github.com/jan-alexander/dotfiles.git ~/.dotfiles`
2. `cd ~/.dotfiles`
3. `./install.sh`

## Vim Plugins
Vim plugins are managed with [vim-plug](https://github.com/junegunn/vim-plug). To install, run `vim +PlugInstall`.

## Terminal settings
Import following colorschemes:
 - [osx-terminal.app-colors-solarized](https://github.com/tomislav/osx-terminal.app-colors-solarized)
 - set Terminal.app colorscheme to `solarized dark`

Map the `Caps lock` key to `Ctrl` like shown here: [Moving The Ctrl Key](http://emacswiki.org/emacs/MovingTheCtrlKey).

## Credits
Credits go to [nicknisi](https://github.com/nicknisi/dotfiles).


text:
package com.blackducksoftware.integration.jira.mocks;

import com.atlassian.event.api.EventPublisher;

public class EventPublisherMock implements EventPublisher {

    public boolean registered = false;

    public boolean published = false;

    @Override
    public void register(final Object arg0) {
        registered = true;
    }

    @Override
    public void unregister(final Object arg0) {
        registered = false;
        published = false;
    }

    @Override
    public void unregisterAll() {
        registered = false;
        published = false;
    }

    @Override
    public void publish(final Object arg0) {
        published = true;
    }
}


text:
let x: typeof import('./x');
let Y: import('./y').Y;
let z: import("/z").foo.bar<string>;


text:
<ion-view view-title="Setup" id="setup-view">
   <ion-content class="has-header" overflow-scroll="true" padding="true">

Match #

<input type="number" ng-model="setup.matchNumber" />

                  <select ng-model="setup.red1" style="background-color: salmon">
                     <option ng-repeat="team in setup.teams | orderBy: 'number'">{{team.number}}</option>
                  </select>

               <select ng-model="setup.red2" style="background-color: salmon">
                  <option ng-repeat="team in setup.teams | orderBy: 'number'">{{team.number}}</option>
               </select>

               <select ng-model="setup.red3" style="background-color: salmon">
                  <option ng-repeat="team in setup.teams | orderBy: 'number'">{{team.number}}</option>
               </select>

               <select ng-model="setup.blue1" style="background-color: slateblue">
                  <option ng-repeat="team in setup.teams | orderBy: 'number'">{{team.number}}</option>
               </select>

               <select ng-model="setup.blue2" style="background-color: slateblue">
                  <option ng-repeat="team in setup.teams | orderBy: 'number'">{{team.number}}</option>
               </select>

               <select ng-model="setup.blue3" style="background-color: slateblue">
                  <option ng-repeat="team in setup.teams | orderBy: 'number'">{{team.number}}</option>
               </select>

         <button style="" class="button button-energized button-block " ng-click="setup.addMatch()">Add Match</button>

               <colgroup>
                  <col span="1" style="width: 10em; background-color: saddlebrown" />
                  <col span="1" style="width: 10em; background-color: salmon" />
                  <col span="1" style="width: 10em; background-color: salmon" />
                  <col span="1" style="width: 10em; background-color: salmon" />
                  <col span="1" style="width: 10em; background-color: slateblue" />
                  <col span="1" style="width: 10em; background-color: slateblue" />
                  <col span="1" style="width: 10em; background-color: slateblue" />
               </colgroup>

                     Match #
                     Red 1	>
                     Red 2	>
                     Red 3	>
                     Blue 1	>
                     Blue 2	>
                     Blue 3	>

                  {{match.number}}
                  {{match.red[0]}}
                  {{match.red[1]}}
                  {{match.red[2]}}
                  {{match.blue[0]}}
                  {{match.blue[1]}}
                  {{match.blue[2]}}

Enter a match # (mandatory), three red team #s and three blue team #s, then tap "Add Match"

Double-tap a match in the list to remove the match from the event (careful!)

If a team number is not available from the pulldowns, add the team on the Configuration tab

   </ion-content>
</ion-view>


text:
A cross-platform J-RPG engine. Still very much a work in progress, but it
might get somewhere someday.

## Features

- Cross-platform
- Walruses
- Highly experimental stuff inside (yes it's radioactive)

## Does not feature

- Walrii
- The game
- Actual content

## Getting the code wih Git

To get the dependencies together with the source, you need to do a recursive clone
of the repo:

```bash
git clone --recursive https://github.com/WalrusRPG/WalrusRPG.git
```

If you forgot to include `--recursive` while cloning, it's not too late:

```bash
cd WalrusRPG
git submodule update --init --recursive
```

You'll have to compile ConvertIMG yourself for now, it might be added to the
build system later.

## Compiling

The build system currently depends on GNU Make and the Ndless toolchain when compiling for the Nspire,
or SFML for systems that it supports.

We use the [tinystl](https://github.com/mendsley/tinystl)library to keep binaries small (the C++STL is pretty heavy), [imgui](https://github.com/ocornut/imgui) for debug HUD on SFML and [lodepng](http://lodev.org/lodepng/) to load textures, so be
sure to clone the submodules as well !

To compile the project, simply run make (-j friendly).

## Plans

### What needs to be done

- Entities (planning in progress)
- Events
- Battle Engine (planning in progress)
- I/O file data
- Scripting
- UI (research in progress)
- Character system.
- Items

### What's already done
- Map system.
- Basic text routines.
- Support for multiple platforms, including the TI-Nspire CX and SFML


text:
<?php

namespace Zeega\DataBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Zeega\DataBundle\Entity\Item
 */
class Item
{
    /**
     * @var integer $id
     */
    private $id;

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

    /**
     * @var integer $user_id
     */
    private $user_id;

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

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

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

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

    /**
     * @var \DateTime $date_created
     */
    private $date_created;

    /**
     * @var \DateTime $date_updated
     */
    private $date_updated;

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

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

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

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

    /**
     * @var integer $child_items_count
     */
    private $child_items_count;

    /**
     * @var float $media_geo_latitude
     */
    private $media_geo_latitude;

    /**
     * @var float $media_geo_longitude
     */
    private $media_geo_longitude;

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

    /**
     * @var \DateTime $media_date_created
     */
    private $media_date_created;

    /**
     * @var \DateTime $media_date_created_end
     */
    private $media_date_created_end;

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

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

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

    /**
     * @var array $attributes
     */
    private $attributes;

    /**
     * @var array $tags
     */
    private $tags;

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

    /**
     * @var boolean $enabled
     */
    private $enabled;

    /**
     * @var boolean $published
     */
    private $published;

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

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

    /**
     * @var integer $duration
     */
    private $duration;

    /**
     * @var Zeega\DataBundle\Entity\User
     */
    private $user;

    /**
     * @var \Doctrine\Common\Collections\ArrayCollection
     */
    private $child_items;

    /**
     * @var \Doctrine\Common\Collections\ArrayCollection
     */
    private $parent_items;

    /**
     * Constructor
     */
    public function __construct()
    {
        $this->tags = new \Doctrine\Common\Collections\ArrayCollection();
        $this->child_items = new \Doctrine\Common\Collections\ArrayCollection();
        $this->parent_items = new \Doctrine\Common\Collections\ArrayCollection();
    }

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

	/**
     * Set id
     *
     * @param integer $id
	 * @return Item
     */
    public function setId($id)
    {
        $this->id = $id;

		return $this;
    }

    /**
     * Set title
     *
     * @param string $title
     * @return Item
     */
    public function setTitle($title)
    {
        $this->title = $title;

        return $this;
    }

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

    /**
     * Set user_id
     *
     * @param integer $userId
     * @return Item
     */
    public function setUserId($userId)
    {
        $this->user_id = $userId;

        return $this;
    }

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

    /**
     * Set description
     *
     * @param string $description
     * @return Item
     */
    public function setDescription($description)
    {
        $this->description = $description;

        return $this;
    }

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

    /**
     * Set text
     *
     * @param string $text
     * @return Item
     */
    public function setText($text)
    {
        $this->text = $text;

        return $this;
    }

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

    /**
     * Set uri
     *
     * @param string $uri
     * @return Item
     */
    public function setUri($uri)
    {
        $this->uri = $uri;

        return $this;
    }

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

    /**
     * Set attribution_uri
     *
     * @param string $attributionUri
     * @return Item
     */
    public function setAttributionUri($attributionUri)
    {
        $this->attribution_uri = $attributionUri;

        return $this;
    }

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

    /**
     * Set date_created
     *
     * @param \DateTime $dateCreated
     * @return Item
     */
    public function setDateCreated($dateCreated)
    {
        $this->date_created = $dateCreated;

        return $this;
    }

    /**
     * Get date_created
     *
     * @return \DateTime
     */
    public function getDateCreated()
    {
        return $this->date_created;
    }

    /**
     * Set date_updated
     *
     * @param \DateTime $dateUpdated
     * @return Item
     */
    public function setDateUpdated($dateUpdated)
    {
        $this->date_updated = $dateUpdated;

        return $this;
    }

    /**
     * Get date_updated
     *
     * @return \DateTime
     */
    public function getDateUpdated()
    {
        return $this->date_updated;
    }

    /**
     * Set archive
     *
     * @param string $archive
     * @return Item
     */
    public function setArchive($archive)
    {
        $this->archive = $archive;

        return $this;
    }

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

    /**
     * Set media_type
     *
     * @param string $mediaType
     * @return Item
     */
    public function setMediaType($mediaType)
    {
        $this->media_type = $mediaType;

        return $this;
    }

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

    /**
     * Set layer_type
     *
     * @param string $layerType
     * @return Item
     */
    public function setLayerType($layerType)
    {
        $this->layer_type = $layerType;

        return $this;
    }

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

    /**
     * Set thumbnail_url
     *
     * @param string $thumbnailUrl
     * @return Item
     */
    public function setThumbnailUrl($thumbnailUrl)
    {
        $this->thumbnail_url = $thumbnailUrl;

        return $this;
    }

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

    /**
     * Set child_items_count
     *
     * @param integer $childItemsCount
     * @return Item
     */
    public function setChildItemsCount($childItemsCount)
    {
        $this->child_items_count = $childItemsCount;

        return $this;
    }

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

    /**
     * Set media_geo_latitude
     *
     * @param float $mediaGeoLatitude
     * @return Item
     */
    public function setMediaGeoLatitude($mediaGeoLatitude)
    {
        $this->media_geo_latitude = $mediaGeoLatitude;

        return $this;
    }

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

    /**
     * Set media_geo_longitude
     *
     * @param float $mediaGeoLongitude
     * @return Item
     */
    public function setMediaGeoLongitude($mediaGeoLongitude)
    {
        $this->media_geo_longitude = $mediaGeoLongitude;

        return $this;
    }

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

    /**
     * Set location
     *
     * @param string $location
     * @return Item
     */
    public function setLocation($location)
    {
        $this->location = $location;

        return $this;
    }

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

    /**
     * Set media_date_created
     *
     * @param \DateTime $mediaDateCreated
     * @return Item
     */
    public function setMediaDateCreated($mediaDateCreated)
    {
        $this->media_date_created = $mediaDateCreated;

        return $this;
    }

    /**
     * Get media_date_created
     *
     * @return \DateTime
     */
    public function getMediaDateCreated()
    {
        return $this->media_date_created;
    }

    /**
     * Set media_date_created_end
     *
     * @param \DateTime $mediaDateCreatedEnd
     * @return Item
     */
    public function setMediaDateCreatedEnd($mediaDateCreatedEnd)
    {
        $this->media_date_created_end = $mediaDateCreatedEnd;

        return $this;
    }

    /**
     * Get media_date_created_end
     *
     * @return \DateTime
     */
    public function getMediaDateCreatedEnd()
    {
        return $this->media_date_created_end;
    }

    /**
     * Set media_creator_username
     *
     * @param string $mediaCreatorUsername
     * @return Item
     */
    public function setMediaCreatorUsername($mediaCreatorUsername)
    {
        $this->media_creator_username = $mediaCreatorUsername;

        return $this;
    }

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

    /**
     * Set media_creator_realname
     *
     * @param string $mediaCreatorRealname
     * @return Item
     */
    public function setMediaCreatorRealname($mediaCreatorRealname)
    {
        $this->media_creator_realname = $mediaCreatorRealname;

        return $this;
    }

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

    /**
     * Set license
     *
     * @param string $license
     * @return Item
     */
    public function setLicense($license)
    {
        $this->license = $license;

        return $this;
    }

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

    /**
     * Set attributes
     *
     * @param array $attributes
     * @return Item
     */
    public function setAttributes($attributes)
    {
        $this->attributes = $attributes;

        return $this;
    }

    /**
     * Get attributes
     *
     * @return array
     */
    public function getAttributes()
    {
        return $this->attributes;
    }

    /**
     * Set tags
     *
     * @param array $tags
     * @return Item
     */
    public function setTags($tags)
    {
        $this->tags = $tags;

        return $this;
    }

	 /**
     * Add tags
     *
     * @param Zeega\DataBundle\Entity\ItemTags $tags
     */
    public function addItemTags(\Zeega\DataBundle\Entity\ItemTags $tags)
    {
        $this->tags[] = $tags;
    }

	public function addTags($tags)
	{
		foreach ($tags as $tag){
			if (!in_array($tag, $this->tags)) {
				$this->tags[] = $tag;
			}
		}
	}

    /**
     * Get tags
     *
     * @return array
     */
    public function getTags()
    {
        return $this->tags;
    }

    /**
     * Set id_at_source
     *
     * @param string $idAtSource
     * @return Item
     */
    public function setIdAtSource($idAtSource)
    {
        $this->id_at_source = $idAtSource;

        return $this;
    }

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

    /**
     * Set enabled
     *
     * @param boolean $enabled
     * @return Item
     */
    public function setEnabled($enabled)
    {
        $this->enabled = $enabled;

        return $this;
    }

    /**
     * Get enabled
     *
     * @return boolean
     */
    public function getEnabled()
    {
        return $this->enabled;
    }

    /**
     * Set published
     *
     * @param boolean $published
     * @return Item
     */
    public function setPublished($published)
    {
        $this->published = $published;

        return $this;
    }

    /**
     * Get published
     *
     * @return boolean
     */
    public function getPublished()
    {
        return $this->published;
    }

    /**
     * Set geo_latlng
     *
     * @param string $geoLatlng
     * @return Item
     */
    public function setGeoLatlng($geoLatlng)
    {
        $this->geo_latlng = $geoLatlng;

        return $this;
    }

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

    /**
     * Set ingested_by
     *
     * @param string $ingestedBy
     * @return Item
     */
    public function setIngestedBy($ingestedBy)
    {
        $this->ingested_by = $ingestedBy;

        return $this;
    }

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

    /**
     * Set duration
     *
     * @param integer $duration
     * @return Item
     */
    public function setDuration($duration)
    {
        $this->duration = $duration;

        return $this;
    }

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

    /**
     * Set user
     *
     * @param Zeega\DataBundle\Entity\User $user
     * @return Item
     */
    public function setUser(\Zeega\DataBundle\Entity\User $user = null)
    {
        $this->user = $user;

        return $this;
    }

    /**
     * Get user
     *
     * @return Zeega\DataBundle\Entity\User
     */
    public function getUser()
    {
        return $this->user;
    }

    /**
     * Add child_items
     *
     * @param Zeega\DataBundle\Entity\Item $childItems
     * @return Item
     */
    public function addChildItem(\Zeega\DataBundle\Entity\Item $childItems)
    {
        $this->child_items[] = $childItems;

        return $this;
    }

    /**
     * Remove child_items
     *
     * @param Zeega\DataBundle\Entity\Item $childItems
     */
    public function removeChildItem(\Zeega\DataBundle\Entity\Item $childItems)
    {
        $this->child_items->removeElement($childItems);
    }

    /**
     * Get child_items
     *
     * @return Doctrine\Common\Collections\Collection
     */
    public function getChildItems()
    {
        return $this->child_items;
    }

    /**
     * Add parent_items
     *
     * @param Zeega\DataBundle\Entity\Item $parentItems
     * @return Item
     */
    public function addParentItem(\Zeega\DataBundle\Entity\Item $parentItems)
    {
        $this->parent_items[] = $parentItems;

        return $this;
    }

    /**
     * Remove parent_items
     *
     * @param Zeega\DataBundle\Entity\Item $parentItems
     */
    public function removeParentItem(\Zeega\DataBundle\Entity\Item $parentItems)
    {
        $this->parent_items->removeElement($parentItems);
    }

    /**
     * Get parent_items
     *
     * @return Doctrine\Common\Collections\Collection
     */
    public function getParentItems()
    {
        return $this->parent_items;
    }
    /**
     * @ORM\PrePersist
     */
    public function onPrePersist()
    {
        $this->setDateUpdated(new \DateTime("now"));
    }

    /**
     * @ORM\PreUpdate
     */
    public function onPreUpdate()
    {
        $this->setDateUpdated(new \DateTime("now"));
    }
}


text:
layout: updates/post
title: "Toggle the DevTools dock state with a keyboard shortcut"
published_on: 2015-05-19
updated_on: 2015-05-19
tags:
  - devtools
authors:
  - umarhansa
description: "Use Cmd + Shift + D to toggle the DevTools dock state between the last two recently used states."
featured_image: /web/updates/images/2015-05-19-toggle-the-devtools-dock-state-with-a-keyboard-shortcut/dock-undock-shortcut.gif
source_name: DevTips
source_url: https://umaar.com/dev-tips/19-dock-undock-shortcut
---

Use Cmd + Shift + D to toggle the DevTools dock state between the last two recently used states. Dock options are:

Dock to right

Dock to bottom

Undock DevTools


text:
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package org.chromium.chrome.browser.browserservices.ui.splashscreen;

import android.app.Activity;
import android.graphics.PixelFormat;
import android.os.Build;
import android.os.SystemClock;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewPropertyAnimator;
import android.view.ViewTreeObserver;

import androidx.annotation.IntDef;
import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;

import org.chromium.base.ObserverList;
import org.chromium.base.TraceEvent;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.browserservices.trustedwebactivityui.TwaFinishHandler;
import org.chromium.chrome.browser.compositor.CompositorViewHolder;
import org.chromium.chrome.browser.customtabs.BaseCustomTabActivity;
import org.chromium.chrome.browser.customtabs.CustomTabOrientationController;
import org.chromium.chrome.browser.customtabs.content.CustomTabActivityTabProvider;
import org.chromium.chrome.browser.customtabs.content.TabCreationMode;
import org.chromium.chrome.browser.customtabs.content.TabObserverRegistrar;
import org.chromium.chrome.browser.customtabs.content.TabObserverRegistrar.CustomTabTabObserver;
import org.chromium.chrome.browser.dependency_injection.ActivityScope;
import org.chromium.chrome.browser.flags.CachedFeatureFlags;
import org.chromium.chrome.browser.flags.ChromeFeatureList;
import org.chromium.chrome.browser.lifecycle.ActivityLifecycleDispatcher;
import org.chromium.chrome.browser.lifecycle.DestroyObserver;
import org.chromium.chrome.browser.lifecycle.InflationObserver;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.url.GURL;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.reflect.Method;

import javax.inject.Inject;

import dagger.Lazy;

/** Shows and hides splash screen for Webapps, WebAPKs and TWAs. */
@ActivityScope
public class SplashController
        extends CustomTabTabObserver implements InflationObserver, DestroyObserver {
    private static class SingleShotOnDrawListener implements ViewTreeObserver.OnDrawListener {
        private final View mView;
        private final Runnable mAction;
        private boolean mHasRun;

        public static void install(View view, Runnable action) {
            view.getViewTreeObserver().addOnDrawListener(
                    new SingleShotOnDrawListener(view, action));
        }

        private SingleShotOnDrawListener(View view, Runnable action) {
            mView = view;
            mAction = action;
        }

        @Override
        public void onDraw() {
            if (mHasRun) return;
            mHasRun = true;
            mAction.run();
            // Cannot call removeOnDrawListener within OnDraw, so do on next tick.
            mView.post(() -> mView.getViewTreeObserver().removeOnDrawListener(this));
        }
    };

    @IntDef({TranslucencyRemoval.NONE, TranslucencyRemoval.ON_SPLASH_SHOWN,
            TranslucencyRemoval.ON_SPLASH_HIDDEN})
    @Retention(RetentionPolicy.SOURCE)
    public @interface TranslucencyRemoval {
        int NONE = 0;
        int ON_SPLASH_SHOWN = 1;
        int ON_SPLASH_HIDDEN = 2;
    }

    private static final String TAG = "SplashController";

    private final Activity mActivity;
    private final ActivityLifecycleDispatcher mLifecycleDispatcher;
    private final TabObserverRegistrar mTabObserverRegistrar;
    private final TwaFinishHandler mFinishHandler;
    private final CustomTabActivityTabProvider mTabProvider;
    private final Lazy<CompositorViewHolder> mCompositorViewHolder;

    private SplashDelegate mDelegate;

    /** View to which the splash screen is added. */
    private ViewGroup mParentView;

    @Nullable
    private View mSplashView;

    @Nullable
    private ViewPropertyAnimator mFadeOutAnimator;

    /** The duration of the splash hide animation. */
    private long mSplashHideAnimationDurationMs;

    /** Indicates when translucency should be removed. */
    private @TranslucencyRemoval int mTranslucencyRemovalStrategy;

    private boolean mDidPreInflationStartup;

    /** Whether the splash hide animation was started. */
    private boolean mWasSplashHideAnimationStarted;

    /** Time that the splash screen was shown. */
    private long mSplashShownTimestamp;

    /** Whether translucency was removed. */
    private boolean mRemovedTranslucency;

    private ObserverList<SplashscreenObserver> mObservers;

    @Inject
    public SplashController(Activity activity, ActivityLifecycleDispatcher lifecycleDispatcher,
            TabObserverRegistrar tabObserverRegistrar,
            CustomTabOrientationController orientationController, TwaFinishHandler finishHandler,
            CustomTabActivityTabProvider tabProvider,
            Lazy<CompositorViewHolder> compositorViewHolder) {
        mActivity = activity;
        mLifecycleDispatcher = lifecycleDispatcher;
        mTabObserverRegistrar = tabObserverRegistrar;
        mObservers = new ObserverList<>();
        mTranslucencyRemovalStrategy = TranslucencyRemoval.NONE;
        mFinishHandler = finishHandler;
        mTabProvider = tabProvider;
        mCompositorViewHolder = compositorViewHolder;

        boolean isWindowInitiallyTranslucent =
                BaseCustomTabActivity.isWindowInitiallyTranslucent(activity);
        mTranslucencyRemovalStrategy =
                computeTranslucencyRemovalStrategy(isWindowInitiallyTranslucent);

        orientationController.delayOrientationRequestsIfNeeded(this, isWindowInitiallyTranslucent);

        mLifecycleDispatcher.register(this);
        mTabObserverRegistrar.registerActivityTabObserver(this);
    }

    public void setConfig(SplashDelegate delegate, long splashHideAnimationDurationMs) {
        mDelegate = delegate;
        mSplashHideAnimationDurationMs = splashHideAnimationDurationMs;
        if (mDidPreInflationStartup) {
            showSplash();
        }
    }

    /**
     * Brings splash view back to the front of the parent's view hierarchy, reattaching the view to
     * the parent if necessary.
     */
    public void bringSplashBackToFront() {
        if (mSplashView == null) return;

        if (mSplashView.getParent() != null) {
            mParentView.removeView(mSplashView);
        }
        mParentView.addView(mSplashView);
    }

    @VisibleForTesting
    public View getSplashScreenForTests() {
        return mSplashView;
    }

    @VisibleForTesting
    public boolean wasSplashScreenHiddenForTests() {
        return mSplashShownTimestamp > 0 && mSplashView == null;
    }

    @Override
    public void onPreInflationStartup() {
        mDidPreInflationStartup = true;
        if (mDelegate != null) {
            showSplash();
        }
    }

    @Override
    public void onPostInflationStartup() {
        if (mTranslucencyRemovalStrategy == TranslucencyRemoval.ON_SPLASH_SHOWN) {
            // In rare cases I see toolbar flickering. TODO(pshmakov): investigate why.
            mActivity.findViewById(R.id.coordinator).setVisibility(View.INVISIBLE);
        }
        bringSplashBackToFront();
    }

    @Override
    public void onDestroy() {
        if (mFadeOutAnimator != null) {
            mFadeOutAnimator.cancel();
        }
    }

    @Override
    public void didFirstVisuallyNonEmptyPaint(Tab tab) {
        if (canHideSplashScreen()) {
            hideSplash(tab, false /* loadFailed */);
        }
    }

    @Override
    public void onPageLoadFinished(Tab tab, GURL url) {
        if (canHideSplashScreen()) {
            hideSplash(tab, false /* loadFailed */);
        }
    }

    @Override
    public void onPageLoadFailed(Tab tab, int errorCode) {
        if (canHideSplashScreen()) {
            hideSplash(tab, true /* loadFailed */);
        }
    }

    @Override
    public void onInteractabilityChanged(Tab tab, boolean isInteractable) {
        if (!tab.isLoading() && isInteractable
                && mTabProvider.getInitialTabCreationMode() == TabCreationMode.RESTORED
                && canHideSplashScreen()) {
            hideSplash(tab, false /* loadFailed */);
        }
    }

    @Override
    public void onCrash(Tab tab) {
        hideSplash(tab, true /* loadFailed */);
    }

    private void showSplash() {
        mSplashShownTimestamp = SystemClock.elapsedRealtime();
        try (TraceEvent te = TraceEvent.scoped("SplashScreen.build")) {
            mSplashView = mDelegate.buildSplashView();
        }
        if (mSplashView == null) {
            mTabObserverRegistrar.unregisterActivityTabObserver(this);
            mLifecycleDispatcher.unregister(this);
            if (mTranslucencyRemovalStrategy != TranslucencyRemoval.NONE) {
                removeTranslucency();
            }
            return;
        }

        mParentView = (ViewGroup) mActivity.findViewById(android.R.id.content);
        mParentView.addView(mSplashView);

        recordTraceEventsShowedSplash();

        if (mTranslucencyRemovalStrategy == TranslucencyRemoval.ON_SPLASH_SHOWN) {
            // Without swapping the pixel format, removing translucency is only safe before
            // SurfaceView is attached.
            removeTranslucency();
        }

        // If the client's activity is opaque, finishing the activities one after another may lead
        // to bottom activity showing itself in a short flash. The problem can be solved by bottom
        // activity killing the whole task.
        mFinishHandler.setShouldAttemptFinishingTask(true);
    }

    private static @TranslucencyRemoval int computeTranslucencyRemovalStrategy(
            boolean isWindowInitiallyTranslucent) {
        if (!isWindowInitiallyTranslucent) return TranslucencyRemoval.NONE;

        // Activity#convertFromTranslucent() incorrectly makes the Window opaque when a surface view
        // is attached. This is fixed in http://b/126897750#comment14 The bug causes the SurfaceView
        // to become black. We need to manually swap the pixel format to restore it. When hardware
        // acceleration is disabled, swapping the pixel format causes the surface to get recreated.
        // A bug fix in Android N preserves the old surface till the new one is drawn.
        //
        // Removing translucency is important for performance, otherwise the windows under Chrome
        // will continue being drawn (e.g. launcher with wallpaper). Without removing translucency,
        // we also see visual glitches in the following cases:
        // - closing activity (example: https://crbug.com/856544#c41)
        // - send activity to the background (example: https://crbug.com/856544#c30)
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N
                && CachedFeatureFlags.isEnabled(
                        ChromeFeatureList.SWAP_PIXEL_FORMAT_TO_FIX_CONVERT_FROM_TRANSLUCENT)) {
            return TranslucencyRemoval.ON_SPLASH_HIDDEN;
        }
        return TranslucencyRemoval.ON_SPLASH_SHOWN;
    }

    private boolean canHideSplashScreen() {
        return !mDelegate.shouldWaitForSubsequentPageLoadToHideSplash();
    }

    /** Hides the splash screen. */
    private void hideSplash(final Tab tab, boolean loadFailed) {
        if (mLifecycleDispatcher.isActivityFinishingOrDestroyed()) {
            return;
        }

        if (mTranslucencyRemovalStrategy == TranslucencyRemoval.ON_SPLASH_HIDDEN
                && !mRemovedTranslucency) {
            removeTranslucency();

            // Activity#convertFromTranslucent() incorrectly makes the Window opaque -
            // WindowStateAnimator#setOpaqueLocked(true) - when a surface view is
            // attached. This is fixed in http://b/126897750#comment14. The
            // Window currently has format PixelFormat.TRANSLUCENT (Set by the SurfaceView's
            // ViewParent#requestTransparentRegion() call). Swap the pixel format to
            // force an opacity change back to non-opaque.
            mActivity.getWindow().setFormat(PixelFormat.TRANSPARENT);

            mParentView.invalidate();
        }

        if (loadFailed) {
            animateHideSplash(tab);
            return;
        }
        // Delay hiding the splash screen till the compositor has finished drawing the next frame.
        // Without this callback we were seeing a short flash of white between the splash screen and
        // the web content (crbug.com/734500).
        mCompositorViewHolder.get().getCompositorView().surfaceRedrawNeededAsync(
                () -> { animateHideSplash(tab); });
    }

    private void removeTranslucency() {
        mRemovedTranslucency = true;

        // Removing the temporary translucency, so that underlying windows don't get drawn.
        try {
            Method method = Activity.class.getDeclaredMethod("convertFromTranslucent");
            method.setAccessible(true);
            method.invoke(mActivity);
        } catch (ReflectiveOperationException e) {
        }

        notifyTranslucencyRemoved();
    }

    private void animateHideSplash(final Tab tab) {
        if (mWasSplashHideAnimationStarted) return;

        mWasSplashHideAnimationStarted = true;
        mTabObserverRegistrar.unregisterActivityTabObserver(this);

        recordTraceEventsStartedHidingSplash();

        // Show browser UI in case we hid it in onPostInflationStartup().
        mActivity.findViewById(R.id.coordinator).setVisibility(View.VISIBLE);

        if (mSplashHideAnimationDurationMs == 0) {
            hideSplashNow(tab);
            return;
        }
        mFadeOutAnimator = mSplashView.animate()
                                   .alpha(0f)
                                   .setDuration(mSplashHideAnimationDurationMs)
                                   .withEndAction(() -> { hideSplashNow(tab); });
    }

    private void hideSplashNow(Tab tab) {
        mParentView.removeView(mSplashView);

        long splashHiddenTimestamp = SystemClock.elapsedRealtime();
        recordTraceEventsFinishedHidingSplash();

        assert mSplashShownTimestamp != 0;
        mDelegate.onSplashHidden(tab, mSplashShownTimestamp, splashHiddenTimestamp);
        notifySplashscreenHidden(mSplashShownTimestamp, splashHiddenTimestamp);

        mFinishHandler.setShouldAttemptFinishingTask(false);

        mLifecycleDispatcher.unregister(this);

        mDelegate = null;
        mSplashView = null;
        mFadeOutAnimator = null;
    }

    /**
     * Register an observer for the splashscreen hidden/visible events.
     */
    public void addObserver(SplashscreenObserver observer) {
        mObservers.addObserver(observer);
    }

    /**
     * Deregister an observer for the splashscreen hidden/visible events.
     */
    public void removeObserver(SplashscreenObserver observer) {
        mObservers.removeObserver(observer);
    }

    private void notifyTranslucencyRemoved() {
        for (SplashscreenObserver observer : mObservers) {
            observer.onTranslucencyRemoved();
        }
    }

    private void notifySplashscreenHidden(long startTimestamp, long endTimestmap) {
        for (SplashscreenObserver observer : mObservers) {
            observer.onSplashscreenHidden(startTimestamp, endTimestmap);
        }
        mObservers.clear();
    }

    private void recordTraceEventsShowedSplash() {
        SingleShotOnDrawListener.install(
                mParentView, () -> { TraceEvent.startAsync("SplashScreen.visible", hashCode()); });
    }

    private void recordTraceEventsStartedHidingSplash() {
        TraceEvent.startAsync("SplashScreen.hidingAnimation", hashCode());
    }

    private void recordTraceEventsFinishedHidingSplash() {
        TraceEvent.finishAsync("SplashScreen.hidingAnimation", hashCode());
        SingleShotOnDrawListener.install(mParentView,
                () -> { TraceEvent.finishAsync("WebappSplashScreen.visible", hashCode()); });
    }
}


text:
/* eslint-env mocha */
'use strict'

import { expect } from 'chai'
import trumpet from 'trumpet'
import fs from 'fs'
import path from 'path'

import { trumpetInnerText, trumpetClasses, trumpetAttr } from '../../../lib/html-parsers/index'

describe('HTML parsers tools', () => {
  it('trumpetInnerText function  delivers a function', () => {
    const f = trumpetInnerText(() => {})
    expect(f).to.be.a.function
  })

  it('trumpetInnerText delivers a stream parser that calls callback with inner text', (done) => {
    const f = trumpetInnerText((innerText) => {
      expect(innerText).to.equal('my text')
      done()
    })

    const tr = trumpet()
    tr.select('#test1', f)
    fs.createReadStream(path.join(__dirname, 'mock.html')).pipe(tr)
  })

  it('trumpetInnerText delivers a stream parser that calls callback with trimmed text', (done) => {
    const f = trumpetInnerText((innerText) => {
      expect(innerText).to.equal('my text')
      done()
    })

    const tr = trumpet()
    tr.select('#test1b', f)
    fs.createReadStream(path.join(__dirname, 'mock.html')).pipe(tr)
  })

  it('trumpetInnerText delivers a stream parser that never callback for wrong stream format', (done) => {
    const f = trumpetInnerText(() => {
      done('Failed, should not call callback!')
    })

    const tr = trumpet()
    tr.select('#test1', f)
    fs.createReadStream(path.join(__dirname, 'mock.json')).pipe(tr)

    tr.on('end', done)
  })

  it('trumpetClasses function delivers a function', () => {
    const f = trumpetClasses(() => {})
    expect(f).to.be.a.function
  })

  it('trumpetClasses delivers a function that calls callback with classes', (done) => {
    const f = trumpetClasses((classes) => {
      expect(classes).to.include('class_test_1')
      expect(classes).to.include('class_test_2')
      expect(classes).to.have.lengthOf(2)
      done()
    })

    const tr = trumpet()
    tr.select('#test2', f)
    fs.createReadStream(path.join(__dirname, 'mock.html')).pipe(tr)
  })

  it('trumpetAttr function delivers a function', () => {
    const f = trumpetAttr('id', () => {})
    expect(f).to.be.a.function
  })

  it('trumpetAttr delivers a function that calls callback with an attribute value', (done) => {
    const f = trumpetAttr('class', (classes) => {
      expect(classes).to.equal('class_test_1 class_test_2')
      done()
    })

    const tr = trumpet()
    tr.select('#test2', f)
    fs.createReadStream(path.join(__dirname, 'mock.html')).pipe(tr)
  })
})


text:
httpbin_manifests="""
---
apiVersion: v1
kind: Service
metadata:
  name: httpbin
spec:
  type: ClusterIP
  selector:
    service: httpbin
  ports:
  - port: 80
    targetPort: http
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: httpbin
spec:
  replicas: 1
  selector:
    matchLabels:
      service: httpbin
  template:
    metadata:
      labels:
        service: httpbin
    spec:
      containers:
      - name: httpbin
        image: kennethreitz/httpbin
        ports:
        - name: http
          containerPort: 80
"""

qotm_manifests = """
---
apiVersion: v1
kind: Service
metadata:
  name: qotm
spec:
  selector:
    service: qotm
  ports:
    - port: 80
      targetPort: http-api
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: qotm
spec:
  selector:
    matchLabels:
      service: qotm
  replicas: 1
  strategy:
    type: RollingUpdate
  template:
    metadata:
      annotations:
        sidecar.istio.io/inject: "false"
      labels:
        service: qotm
    spec:
      serviceAccountName: ambassador
      containers:
      - name: qotm
        image: docker.io/datawire/qotm:1.3
        ports:
        - name: http-api
          containerPort: 5000
"""

websocket_echo_server_manifests="""
---
apiVersion: v1
kind: Service
metadata:
  name: websocket-echo-server
spec:
  selector:
    service: websocket-echo-server
  ports:
  - protocol: TCP
    port: 80
    targetPort: 8080
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: websocket-echo-server
spec:
  selector:
    matchLabels:
      service: websocket-echo-server
  replicas: 1
  strategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        service: websocket-echo-server
    spec:
      containers:
      - name: websocket-echo-server
        image: docker.io/johnesmet/go-websocket-echo-server:latest
"""


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

namespace PowerArgs.Games
{
    [AttributeUsage(AttributeTargets.Property)]
    public class IMultiPlayerEventIgnore : Attribute { }
    public abstract class MultiPlayerMessage
    {
        private static Type[] SupportedDataTypes = new Type[]
        {
            typeof(string),
            typeof(int),
            typeof(float),
            typeof(bool)
        };

        public string Sender { get; set; }
        public string Recipient { get; set; }
        public string RequestId { get; set; }
        private string Enc(string val) => val == null ? "null" : val.Replace("/", "-");

        public string Serialize()
        {
            var messageContents = Base64Encode(GetType().Name);
            messageContents += "\n" + Base64Encode(nameof(Sender)) + ":" + Base64Encode(Sender);
            messageContents += "\n" + Base64Encode(nameof(Recipient)) + ":" + Base64Encode(Recipient);

            if(RequestId != null)
            {
                messageContents += "\n" + Base64Encode(nameof(RequestId)) + ":" + Base64Encode(RequestId);
            }

            foreach (var property in GetType().GetProperties().Where(p => p.HasAttr<IMultiPlayerEventIgnore>() == false))
            {
                AssertSupported(property.PropertyType);
                var val = property.GetValue(this);
                string stringVal;
                if(property.PropertyType == typeof(string))
                {
                    stringVal = (string)val;
                }
                else
                {
                    stringVal = val.ToString();
                }

                messageContents += "\n" + Base64Encode(property.Name) + ":" + Base64Encode(stringVal);
            }
            return messageContents;
        }

        public static MultiPlayerMessage Deserialize(string message)
        {
            var lines = message.Split('\n');
            var type = Base64Decode(lines[0]);
            var ret = ObjectFactory.CreateInstance<MultiPlayerMessage>(type);

            for (var i = 1; i < lines.Length; i++)
            {
                var split = lines[i].Split(':');
                var key = Base64Decode(split[0]);
                var value = Base64Decode(split[1]);

                var prop = ret.GetType().GetProperty(key);

                if(prop.PropertyType == typeof(string))
                {
                    prop.SetValue(ret, value);
                }
                else
                {
                    var parseMethod = prop.PropertyType.GetMethods(System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public)
                        .Where(p => p.Name == nameof(int.Parse) && p.GetParameters().Length == 1 && p.GetParameters()[0].ParameterType == typeof(string)).Single();
                    prop.SetValue(ret, parseMethod.Invoke(null, new object[] { value }));
                }
            }

            return ret;
        }

        private void AssertSupported(Type t)
        {
            if (SupportedDataTypes.Contains(t) == false)
            {
                throw new NotSupportedException($"Type '{t.FullName}' not supported");
            }
        }

        private static string Base64Encode(string plainText)
        {
            if (plainText == null) return "$null";
            var plainTextBytes = System.Text.Encoding.UTF8.GetBytes(plainText);
            return System.Convert.ToBase64String(plainTextBytes);
        }

        private static string Base64Decode(string base64EncodedData)
        {
            if (base64EncodedData == "$null")
            {
                return null;
            }
            else
            {
                var base64EncodedBytes = System.Convert.FromBase64String(base64EncodedData);
                return System.Text.Encoding.UTF8.GetString(base64EncodedBytes);
            }
        }
    }
}


text:
import web_idl

from . import name_style
from . import style_format
from .blink_v8_bridge import blink_class_name
from .blink_v8_bridge import blink_type_info
from .code_node import CodeNode
from .code_node import EmptyNode
from .code_node import LiteralNode
from .code_node import SequenceNode
from .code_node import render_code_node
from .codegen_accumulator import CodeGenAccumulator
from .path_manager import PathManager

def make_copyright_header():
    return LiteralNode("""\
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// DO NOT EDIT: This file is auto-generated by
// //third_party/blink/renderer/bindings/scripts/generate_bindings.py
//
// Use the GN flag `blink_enable_generated_code_formatting=true` to enable
// formatting of the generated files.\
""")

def make_forward_declarations(accumulator):
    assert isinstance(accumulator, CodeGenAccumulator)

    class ForwardDeclarations(object):
        def __init__(self, accumulator):
            self._accumulator = accumulator

        def __str__(self):
            return "\n".join([
                "class {};".format(class_name)
                for class_name in sorted(self._accumulator.class_decls)
            ] + [
                "struct {};".format(struct_name)
                for struct_name in sorted(self._accumulator.struct_decls)
            ])

    return LiteralNode(ForwardDeclarations(accumulator))

def make_header_include_directives(accumulator):
    assert isinstance(accumulator, CodeGenAccumulator)

    class HeaderIncludeDirectives(object):
        def __init__(self, accumulator):
            self._accumulator = accumulator

        def __str__(self):
            lines = []

            if self._accumulator.stdcpp_include_headers:
                lines.extend([
                    "#include <{}>".format(header) for header in sorted(
                        self._accumulator.stdcpp_include_headers)
                ])
                lines.append("")

            lines.extend([
                "#include \"{}\"".format(header)
                for header in sorted(self._accumulator.include_headers)
            ])

            return "\n".join(lines)

    return LiteralNode(HeaderIncludeDirectives(accumulator))

def collect_forward_decls_and_include_headers(idl_types):
    assert isinstance(idl_types, (list, tuple))
    assert all(isinstance(idl_type, web_idl.IdlType) for idl_type in idl_types)

    header_forward_decls = set()
    header_include_headers = set()
    source_forward_decls = set()
    source_include_headers = set()

    def collect(idl_type):
        if idl_type.is_any or idl_type.is_object:
            header_include_headers.add(
                "third_party/blink/renderer/bindings/core/v8/script_value.h")
        elif idl_type.is_boolean or idl_type.is_numeric:
            pass
        elif idl_type.is_buffer_source_type:
            header_include_headers.update([
                "third_party/blink/renderer/core/typed_arrays/array_buffer_view_helpers.h",
                "third_party/blink/renderer/core/typed_arrays/dom_typed_array.h",
                "third_party/blink/renderer/platform/heap/member.h",
            ])
        elif idl_type.is_nullable:
            if not blink_type_info(idl_type.inner_type).has_null_value:
                header_include_headers.add("third_party/abseil-cpp/absl/types/optional.h")
        elif idl_type.is_promise:
            header_include_headers.add(
                "third_party/blink/renderer/bindings/core/v8/script_promise.h")
        elif (idl_type.is_sequence or idl_type.is_frozen_array
              or idl_type.is_record or idl_type.is_variadic):
            header_include_headers.add(
                "third_party/blink/renderer/platform/heap/collection_support/heap_vector.h"
            )
        elif idl_type.is_string:
            header_include_headers.add(
                "third_party/blink/renderer/platform/wtf/text/wtf_string.h")
        elif idl_type.is_typedef:
            pass
        elif idl_type.is_void:
            pass
        elif idl_type.type_definition_object:
            type_def_obj = idl_type.type_definition_object
            if type_def_obj.is_enumeration:
                header_include_headers.add(
                    PathManager(type_def_obj).api_path(ext="h"))
            elif type_def_obj.is_interface:
                header_forward_decls.add(blink_class_name(type_def_obj))
                header_include_headers.add(
                    "third_party/blink/renderer/platform/heap/member.h")
                source_include_headers.add(
                    PathManager(type_def_obj).blink_path(ext="h"))
            else:
                header_forward_decls.add(blink_class_name(type_def_obj))
                header_include_headers.add(
                    "third_party/blink/renderer/platform/heap/member.h")
                source_include_headers.add(
                    PathManager(type_def_obj).api_path(ext="h"))
        elif idl_type.union_definition_object:
            union_def_obj = idl_type.union_definition_object
            header_forward_decls.add(blink_class_name(union_def_obj))
            header_include_headers.add(
                "third_party/blink/renderer/platform/heap/member.h")
            source_include_headers.add(
                PathManager(union_def_obj).api_path(ext="h"))
        else:
            assert False, "Unknown type: {}".format(idl_type.syntactic_form)

    for idl_type in idl_types:
        idl_type.apply_to_all_composing_elements(collect)

    return (header_forward_decls, header_include_headers, source_forward_decls,
            source_include_headers)

def component_export(component, for_testing):
    assert isinstance(component, web_idl.Component)
    assert isinstance(for_testing, bool)

    if for_testing:
        return ""
    return name_style.macro(component, "EXPORT")

def component_export_header(component, for_testing):
    assert isinstance(component, web_idl.Component)
    assert isinstance(for_testing, bool)

    if for_testing:
        return None
    if component == "core":
        return "third_party/blink/renderer/core/core_export.h"
    elif component == "modules":
        return "third_party/blink/renderer/modules/modules_export.h"
    elif component == "extensions_chromeos":
        return "third_party/blink/renderer/extensions/chromeos/extensions_chromeos_export.h"
    else:
        assert False

def enclose_with_header_guard(code_node, header_guard):
    assert isinstance(code_node, CodeNode)
    assert isinstance(header_guard, str)

    return SequenceNode([
        LiteralNode("#ifndef {}".format(header_guard)),
        LiteralNode("#define {}".format(header_guard)),
        EmptyNode(),
        code_node,
        EmptyNode(),
        LiteralNode("#endif  // {}".format(header_guard)),
    ])

def write_code_node_to_file(code_node, filepath):
    """Renders |code_node| and then write the result to |filepath|."""
    assert isinstance(code_node, CodeNode)
    assert isinstance(filepath, str)

    rendered_text = render_code_node(code_node)

    format_result = style_format.auto_format(rendered_text, filename=filepath)
    if not format_result.did_succeed:
        raise RuntimeError("Style-formatting failed: filename = {filename}\n"
                           "---- stderr ----\n"
                           "{stderr}:".format(
                               filename=format_result.filename,
                               stderr=format_result.error_message))

    web_idl.file_io.write_to_file_if_changed(
        filepath, format_result.contents.encode('utf-8'))


text:
using System;
using System.Reflection;
using Java.Util;

namespace Dot42.Internal
{
    /// <summary>
    /// Helper for obtaining custom attributes.
    /// </summary>
	internal static class PropertyInfoProvider
	{
        private static readonly PropertyInfo[] Empty = new PropertyInfo[0];
        private static readonly HashMap<Type, PropertyInfo[]> loadedProperties = new HashMap<Type, PropertyInfo[]>();
        private static readonly object dataLock = new object();

        /// <summary>
        /// Returns an array of all attributes defined on this member.
        /// Returns an empty array if no attributes are defined on this member.
        /// </summary>
        /// <param name="inherit">If true, look in base classes for inherited custom attributes.</param>
        internal static PropertyInfo[] GetProperties(Type type)
        {
            PropertyInfo[] result;
            lock (dataLock)
            {
                result = loadedProperties.Get(type);
                if (result != null) return result;
            }

            // Not found, build it
            result = BuildProperties(type);

            // Store in loaded map
            lock (dataLock)
            {
                loadedProperties.Put(type, result);
            }

            return result;
        }

        /// <summary>
        /// Build all properties for a given type.
        /// </summary>
        private static PropertyInfo[] BuildProperties(Type type)
        {
            var ann = type.GetAnnotation<IProperties>(typeof (IProperties));
            if (ann == null) return Empty;

            var properties = ann.Properties();
            var count = properties.Length;
            if (count == 0) return Empty;

            // Build PropertyInfo structures
            var infos = new PropertyInfo[count];
            for (var i = 0; i < count; i++)
            {
                var p = properties[i];
                var getArr = p.Get();
                var getter = ((getArr != null) && (getArr.Length > 0)) ? getArr[0] : null;
                var setArr = p.Set();
                var setter = ((setArr != null) && (setArr.Length > 0)) ? setArr[0] : null;
                var attributesArr = p.Attributes();
                var attributes = ((attributesArr != null) && (attributesArr.Length > 0)) ? attributesArr[0] : null;
                infos[i] = new PropertyInfo(p.Name(), getter, setter, attributes);
            }
            return infos;
        }
	}
}


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>com.puppycrawl.tools.checkstyle.checks.javadoc (checkstyle 5.6 API)</title>
<meta name="date" content="2012-09-18">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">

com.puppycrawl.tools.checkstyle.checks.javadoc

Classes

InvalidJavadocTag

JavadocMethodCheck

JavadocPackageCheck

JavadocStyleCheck

JavadocTag

JavadocTags

JavadocTypeCheck

JavadocUtils

JavadocVariableCheck

WriteTagCheck

Enums

JavadocUtils.JavadocTagType


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/compute/v1/compute.proto

package com.google.cloud.compute.v1;

/**
 *
 *
 *

 *

 *
 * Protobuf type {@code google.cloud.compute.v1.ServerBinding}
 */
public final class ServerBinding extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.ServerBinding)
    ServerBindingOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use ServerBinding.newBuilder() to construct.
  private ServerBinding(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private ServerBinding() {
    type_ = "";
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
    return new ServerBinding();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    return this.unknownFields;
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.cloud.compute.v1.Compute
        .internal_static_google_cloud_compute_v1_ServerBinding_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.compute.v1.Compute
        .internal_static_google_cloud_compute_v1_ServerBinding_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.compute.v1.ServerBinding.class,
            com.google.cloud.compute.v1.ServerBinding.Builder.class);
  }

  /**
   *
   *
   *

   *

   *
   * Protobuf enum {@code google.cloud.compute.v1.ServerBinding.Type}
   */
  public enum Type implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     *

     * A value indicating that the enum field is not set.
     *

     *
     * UNDEFINED_TYPE = 0;
     */
    UNDEFINED_TYPE(0),
    /**
     *
     *
     *

     * Node may associate with any physical server over its lifetime.
     *

     *
     * RESTART_NODE_ON_ANY_SERVER = 502950985;
     */
    RESTART_NODE_ON_ANY_SERVER(502950985),
    /**
     *
     *
     *

     * Node may associate with minimal physical servers over its lifetime.
     *

     *
     * RESTART_NODE_ON_MINIMAL_SERVERS = 204166495;
     */
    RESTART_NODE_ON_MINIMAL_SERVERS(204166495),
    /** SERVER_BINDING_TYPE_UNSPECIFIED = 180825512; */
    SERVER_BINDING_TYPE_UNSPECIFIED(180825512),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     *

     * A value indicating that the enum field is not set.
     *

     *
     * UNDEFINED_TYPE = 0;
     */
    public static final int UNDEFINED_TYPE_VALUE = 0;
    /**
     *
     *
     *

     * Node may associate with any physical server over its lifetime.
     *

     *
     * RESTART_NODE_ON_ANY_SERVER = 502950985;
     */
    public static final int RESTART_NODE_ON_ANY_SERVER_VALUE = 502950985;
    /**
     *
     *
     *

     * Node may associate with minimal physical servers over its lifetime.
     *

     *
     * RESTART_NODE_ON_MINIMAL_SERVERS = 204166495;
     */
    public static final int RESTART_NODE_ON_MINIMAL_SERVERS_VALUE = 204166495;
    /** SERVER_BINDING_TYPE_UNSPECIFIED = 180825512; */
    public static final int SERVER_BINDING_TYPE_UNSPECIFIED_VALUE = 180825512;

    public final int getNumber() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalArgumentException(
            "Can't get the number of an unknown enum value.");
      }
      return value;
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static Type valueOf(int value) {
      return forNumber(value);
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     */
    public static Type forNumber(int value) {
      switch (value) {
        case 0:
          return UNDEFINED_TYPE;
        case 502950985:
          return RESTART_NODE_ON_ANY_SERVER;
        case 204166495:
          return RESTART_NODE_ON_MINIMAL_SERVERS;
        case 180825512:
          return SERVER_BINDING_TYPE_UNSPECIFIED;
        default:
          return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap<Type> internalGetValueMap() {
      return internalValueMap;
    }

    private static final com.google.protobuf.Internal.EnumLiteMap<Type> internalValueMap =
        new com.google.protobuf.Internal.EnumLiteMap<Type>() {
          public Type findValueByNumber(int number) {
            return Type.forNumber(number);
          }
        };

    public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalStateException(
            "Can't get the descriptor of an unrecognized enum value.");
      }
      return getDescriptor().getValues().get(ordinal());
    }

    public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
      return getDescriptor();
    }

    public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
      return com.google.cloud.compute.v1.ServerBinding.getDescriptor().getEnumTypes().get(0);
    }

    private static final Type[] VALUES = values();

    public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
      }
      if (desc.getIndex() == -1) {
        return UNRECOGNIZED;
      }
      return VALUES[desc.getIndex()];
    }

    private final int value;

    private Type(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.ServerBinding.Type)
  }

  private int bitField0_;
  public static final int TYPE_FIELD_NUMBER = 3575610;
  private volatile java.lang.Object type_;
  /**
   *
   *
   *

   *
   * Check the Type enum for the list of possible values.
   *

   *
   * optional string type = 3575610;
   *
   * @return Whether the type field is set.
   */
  @java.lang.Override
  public boolean hasType() {
    return ((bitField0_ & 0x00000001) != 0);
  }
  /**
   *
   *
   *

   *
   * Check the Type enum for the list of possible values.
   *

   *
   * optional string type = 3575610;
   *
   * @return The type.
   */
  @java.lang.Override
  public java.lang.String getType() {
    java.lang.Object ref = type_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      type_ = s;
      return s;
    }
  }
  /**
   *
   *
   *

   *
   * Check the Type enum for the list of possible values.
   *

   *
   * optional string type = 3575610;
   *
   * @return The bytes for type.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getTypeBytes() {
    java.lang.Object ref = type_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      type_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  private byte memoizedIsInitialized = -1;

  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (((bitField0_ & 0x00000001) != 0)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3575610, type_);
    }
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (((bitField0_ & 0x00000001) != 0)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3575610, type_);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof com.google.cloud.compute.v1.ServerBinding)) {
      return super.equals(obj);
    }
    com.google.cloud.compute.v1.ServerBinding other =
        (com.google.cloud.compute.v1.ServerBinding) obj;

    if (hasType() != other.hasType()) return false;
    if (hasType()) {
      if (!getType().equals(other.getType())) return false;
    }
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (hasType()) {
      hash = (37 * hash) + TYPE_FIELD_NUMBER;
      hash = (53 * hash) + getType().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.compute.v1.ServerBinding parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.compute.v1.ServerBinding parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.compute.v1.ServerBinding parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.compute.v1.ServerBinding parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.compute.v1.ServerBinding parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.compute.v1.ServerBinding parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.compute.v1.ServerBinding parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.compute.v1.ServerBinding parseFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.cloud.compute.v1.ServerBinding parseDelimitedFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.cloud.compute.v1.ServerBinding parseDelimitedFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.cloud.compute.v1.ServerBinding parseFrom(
      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.compute.v1.ServerBinding parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() {
    return newBuilder();
  }

  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }

  public static Builder newBuilder(com.google.cloud.compute.v1.ServerBinding prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   *
   *
   *

   *

   *
   * Protobuf type {@code google.cloud.compute.v1.ServerBinding}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.ServerBinding)
      com.google.cloud.compute.v1.ServerBindingOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.compute.v1.Compute
          .internal_static_google_cloud_compute_v1_ServerBinding_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.compute.v1.Compute
          .internal_static_google_cloud_compute_v1_ServerBinding_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.compute.v1.ServerBinding.class,
              com.google.cloud.compute.v1.ServerBinding.Builder.class);
    }

    // Construct using com.google.cloud.compute.v1.ServerBinding.newBuilder()
    private Builder() {}

    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
    }

    @java.lang.Override
    public Builder clear() {
      super.clear();
      type_ = "";
      bitField0_ = (bitField0_ & ~0x00000001);
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.cloud.compute.v1.Compute
          .internal_static_google_cloud_compute_v1_ServerBinding_descriptor;
    }

    @java.lang.Override
    public com.google.cloud.compute.v1.ServerBinding getDefaultInstanceForType() {
      return com.google.cloud.compute.v1.ServerBinding.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.cloud.compute.v1.ServerBinding build() {
      com.google.cloud.compute.v1.ServerBinding result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.cloud.compute.v1.ServerBinding buildPartial() {
      com.google.cloud.compute.v1.ServerBinding result =
          new com.google.cloud.compute.v1.ServerBinding(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        to_bitField0_ |= 0x00000001;
      }
      result.type_ = type_;
      result.bitField0_ = to_bitField0_;
      onBuilt();
      return result;
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }

    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.setField(field, value);
    }

    @java.lang.Override
    public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }

    @java.lang.Override
    public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }

    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }

    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.cloud.compute.v1.ServerBinding) {
        return mergeFrom((com.google.cloud.compute.v1.ServerBinding) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.compute.v1.ServerBinding other) {
      if (other == com.google.cloud.compute.v1.ServerBinding.getDefaultInstance()) return this;
      if (other.hasType()) {
        bitField0_ |= 0x00000001;
        type_ = other.type_;
        onChanged();
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 28604882:
              {
                type_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000001;
                break;
              } // case 28604882
            default:
              {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }

    private int bitField0_;

    private java.lang.Object type_ = "";
    /**
     *
     *
     *

     *
     * Check the Type enum for the list of possible values.
     *

     *
     * optional string type = 3575610;
     *
     * @return Whether the type field is set.
     */
    public boolean hasType() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     *
     *
     *

     *
     * Check the Type enum for the list of possible values.
     *

     *
     * optional string type = 3575610;
     *
     * @return The type.
     */
    public java.lang.String getType() {
      java.lang.Object ref = type_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        type_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     *

     *
     * Check the Type enum for the list of possible values.
     *

     *
     * optional string type = 3575610;
     *
     * @return The bytes for type.
     */
    public com.google.protobuf.ByteString getTypeBytes() {
      java.lang.Object ref = type_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        type_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     *

     *
     * Check the Type enum for the list of possible values.
     *

     *
     * optional string type = 3575610;
     *
     * @param value The type to set.
     * @return This builder for chaining.
     */
    public Builder setType(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000001;
      type_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     *
     * Check the Type enum for the list of possible values.
     *

     *
     * optional string type = 3575610;
     *
     * @return This builder for chaining.
     */
    public Builder clearType() {
      bitField0_ = (bitField0_ & ~0x00000001);
      type_ = getDefaultInstance().getType();
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     *
     * Check the Type enum for the list of possible values.
     *

     *
     * optional string type = 3575610;
     *
     * @param value The bytes for type to set.
     * @return This builder for chaining.
     */
    public Builder setTypeBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      bitField0_ |= 0x00000001;
      type_ = value;
      onChanged();
      return this;
    }

    @java.lang.Override
    public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }

    // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.ServerBinding)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.ServerBinding)
  private static final com.google.cloud.compute.v1.ServerBinding DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.cloud.compute.v1.ServerBinding();
  }

  public static com.google.cloud.compute.v1.ServerBinding getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<ServerBinding> PARSER =
      new com.google.protobuf.AbstractParser<ServerBinding>() {
        @java.lang.Override
        public ServerBinding parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          Builder builder = newBuilder();
          try {
            builder.mergeFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw e.setUnfinishedMessage(builder.buildPartial());
          } catch (com.google.protobuf.UninitializedMessageException e) {
            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
          } catch (java.io.IOException e) {
            throw new com.google.protobuf.InvalidProtocolBufferException(e)
                .setUnfinishedMessage(builder.buildPartial());
          }
          return builder.buildPartial();
        }
      };

  public static com.google.protobuf.Parser<ServerBinding> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<ServerBinding> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.cloud.compute.v1.ServerBinding getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}


text:
(function(){

var task1 = {
	render: function(){
		document.getElementById("screenX").textContent = window.screenX;
		document.getElementById("screenY").textContent = window.screenY;
		document.getElementById("screenWidth").textContent = window.innerWidth;
		document.getElementById("screenHeight").textContent = window.innerHeight;
		document.getElementById("location").textContent = window.location.pathname;

	},
	resize: function() {
		window.addEventListener("resize", this.render);
	},
	devInfo: function() {
		var btnDev = document.getElementById("dev-info");
		var btnBoo = document.getElementById("dev-info-container");
		var everything = "Marco Susilo" + "
" + "Student" + "
" + "www.github.com/yaymarco";
		btnDev.addEventListener("click", function() {
			btnBoo.innerHTML = everything;
		});
	}
}
task1.render();
task1.resize();
task1.devInfo();

})();


text:
SYNONYM

#### According to
Index Fungorum

#### Published in
null

#### Original name
Polyporus pleuropoda Ces.

### Remarks
null


text:
package org.apache.spark.ml.optim

import org.apache.spark.mllib.linalg.Vector

/**
  * :: DeveloperApi ::
  * Class used to perform steps (weight update) with per-coordinate learning rate.
  *
  */
abstract class PerCoordinateUpdater extends Serializable {
  def compute(
      weightsOld: Vector,
      gradient: Vector,
      alpha: Double,
      beta: Double,
      l1: Double,
      l2: Double,
      n: Vector,
      z: Vector): (Vector, Double, Vector, Vector)
}


text:
#include <aws/codepipeline/model/PutThirdPartyJobSuccessResultRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>

#include <utility>

using namespace Aws::CodePipeline::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;

PutThirdPartyJobSuccessResultRequest::PutThirdPartyJobSuccessResultRequest() :
    m_jobIdHasBeenSet(false),
    m_clientTokenHasBeenSet(false),
    m_currentRevisionHasBeenSet(false),
    m_continuationTokenHasBeenSet(false),
    m_executionDetailsHasBeenSet(false)
{
}

Aws::String PutThirdPartyJobSuccessResultRequest::SerializePayload() const
{
  JsonValue payload;

  if(m_jobIdHasBeenSet)
  {
   payload.WithString("jobId", m_jobId);

  }

  if(m_clientTokenHasBeenSet)
  {
   payload.WithString("clientToken", m_clientToken);

  }

  if(m_currentRevisionHasBeenSet)
  {
   payload.WithObject("currentRevision", m_currentRevision.Jsonize());

  }

  if(m_continuationTokenHasBeenSet)
  {
   payload.WithString("continuationToken", m_continuationToken);

  }

  if(m_executionDetailsHasBeenSet)
  {
   payload.WithObject("executionDetails", m_executionDetails.Jsonize());

  }

  return payload.View().WriteReadable();
}

Aws::Http::HeaderValueCollection PutThirdPartyJobSuccessResultRequest::GetRequestSpecificHeaders() const
{
  Aws::Http::HeaderValueCollection headers;
  headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodePipeline_20150709.PutThirdPartyJobSuccessResult"));
  return headers;

}


text:
using System;
using FluentAssertions;

namespace AutoAdapter.Tests.AssemblyToProcess.InterfaceToInterfaceTests.NonGenericInterfaceToGenericInterfaceTest
{
    public class TestClass
    {
        //[AdapterMethod]
        public TDestination CreateAdapter<TSource, TDestination>(TSource instance)
        {
            throw new Exception();
        }

        public void RunTest()
        {
            var adapter = CreateAdapter<ISourceInterface, IDestinationInterface<string>>(new SourceClass());

            adapter.Echo("Input").Should().Be("Input");
        }
    }

    public interface ISourceInterface
    {
        string Echo(string value);
    }

    public interface IDestinationInterface<T>
    {
        string Echo(T value);
    }

    public class SourceClass : ISourceInterface
    {
        public string Echo(string value)
        {
            return value;
        }
    }
}


text:
require_relative "base"

module Conduit::Driver::Sprint
  class QueryDeviceCapabilities < Conduit::Driver::Sprint::Base
    wsdl_service        "WholesaleQueryDeviceInfoService/v1"
    xsd                 "wholesaleQueryDeviceCapabilities/v1/wholesaleQueryDeviceCapabilitiesV1.xsd"
    operation           :wholesale_query_device_capabilities_v1
    required_attributes :meid, :capability_type_names

    def test_gateway
      "webservicesgatewaytest.sprint.com:444/#{test_environment}/services/mvno"
    end
  end
end


text:
pyinstaller --noconfirm  --clean ^
--exclude-module PyQt4 ^
--exclude-module PyQt4.QtCore ^
--exclude-module PyQt4.QtGui ^
--hidden-import=h5py._errors ^
--hidden-import=h5py.defs ^
--hidden-import=h5py.utils ^
--hidden-import=h5py.h5ac ^
--hidden-import=h5py._proxy ^
test_pyinstaller_reader.py


text:
var PORT = process.env.PORT || 3000;

var DatabaseURL = 'mongodb://admin:test@ds155414.mlab.com:55414/library'

module.exports = {PORT, DatabaseURL};