text:
import webob

from nova import compute
from nova import exception
from nova import log as logging
from nova.api.openstack import extensions
from nova.api.openstack import wsgi

LOG = logging.getLogger(__name__)
authorize = extensions.extension_authorizer('compute', 'console_output')

class ConsoleOutputController(wsgi.Controller):
    def __init__(self, *args, **kwargs):
        super(ConsoleOutputController, self).__init__(*args, **kwargs)
        self.compute_api = compute.API()

    @wsgi.action('os-getConsoleOutput')
    def get_console_output(self, req, id, body):
        """Get text console output."""
        context = req.environ['nova.context']
        authorize(context)

        try:
            instance = self.compute_api.routing_get(context, id)
        except exception.NotFound:
            raise webob.exc.HTTPNotFound(_('Instance not found'))

        try:
            length = body['os-getConsoleOutput'].get('length')
        except (TypeError, KeyError):
            raise webob.exc.HTTPBadRequest(_('Malformed request body'))

        try:
            output = self.compute_api.get_console_output(context,
                                                         instance,
                                                         length)
        except exception.NotFound:
            raise webob.exc.HTTPNotFound(_('Instance not found'))

        return {'output': output}

class Console_output(extensions.ExtensionDescriptor):
    """Console log output support, with tailing ability."""

    name = "Console_output"
    alias = "os-console-output"
    namespace = "http://docs.openstack.org/compute/ext/" \
                "os-console-output/api/v2"
    updated = "2011-12-08T00:00:00+00:00"

    def get_controller_extensions(self):
        controller = ConsoleOutputController()
        extension = extensions.ControllerExtension(self, 'servers', controller)
        return [extension]


text:
title: April 2020
date: 2020/05/17 13:08
metadata:
    description: 'coreBOS work during April 2020.'
    keywords: 'CRM, vtiger, opensource, corebos'
    author: 'Joe Bordes'
header_image_file: April.png
header_image_height: 330
header_image_width: 560
taxonomy:
    category: blog
    tag: [development, 2020, functionality]
---

April was a more normal month with the typical constant flow of fixes and enhancements that we normally see along with the last touches of the new features that landed in the previous months. Read on to see what a "normal" month looks like ;-)

===

 ! Business Question enhancements

Business Questions are on their way to becoming a very important part of the application and get a lot of attention this month.

- Business Question builder
  - field-table relation and field name column relation variables for Builder
  - question builder results: data table and answer
  - save question from the builder
  - change tui-grid to an un-min version with latest changes
  - update fields on module change and add a message to SQL editor
  - add a label for query context in builder
  - add support for getSetting and functions with quotes
  - order and group by
  - change setype to correct name: getEntity
  - context module picklist, fill in on load and change
  - delete field rows
  - delete fields in reverse order to not alter order as we delete the array
  - initial load from a question record
  - save non FQN for sort and groupby
  - set correct fields for order and group by
  - result data table pagination
  - support context variable in the builder data table
  - support empty initial load
  - support for direct SQL Query in getAnswer
  - update query on limit change
  - use backend paging on results and convert page size to a number
  - debugging builder
- [Business Question Materialized View](https://corebos.com/documentation/doku.php?noprocess=1&id=en:adminmanual:businessquestions#materialized_views)
  - scheduled task to update materialized view based on related module change
  - add CRM entity alias and main table alias fields into advanced usage block
  - move other advanced fields into advanced usage block
  - modify materialized view functionality
- [Business Question Mermaid Graph Process Flow](https://corebos.com/documentation/doku.php?noprocess=1&id=en:adminmanual:businessquestions#mermaid_graphs)
  - process flow execution graph
  - pass context to answer question
  - load mermaid graph without document load event for cases when we load via ajax

![Question Process Flow Path](cbquestionprocesspath.png)

- Others
  - support for actor modules (Currency, Group, DocumentFolders)
  - correctly clear spaces in column separators
  - correctly format SQL select and data columns naming
  - eliminate warning when property label does not exist
  - getAnswer with direct SQL
  - getAnswer with no saved record: passing in context
  - getSQL with no saved record: passing in context.

 ! Features and Implementor/Developer enhancements

- **Calendar_goDirectToDetailView** global variable to open event detail view directly on click instead of the action popup screen
- add alert time field per scheduled task for cron watcher to notify differently per task. -1 deactivates the alert completely.

![scheduled task alert time](cronalerttime.png)

- Page Header subtitle contents depends on value of **Application_DetailView_PageHeader_Message** global variable

[plugin:youtube](https://youtu.be/Pzx1VqVXKMU)

- support ModComments block in edit view with the EDITVIEWWIDGET
- support (limited) Duplication in Documents module
- support other field reference syntax in In and NotIn Business Map Validations {{{other_field}}}
``` XML
<map>
  <originmodule>
    <originname>cbCalendar</originname>
  </originmodule>
  <fields>
    <field>
      <fieldname>activitytype</fieldname>
      <validations>
        <validation>
          <rule>notIn</rule>
          <restrictions>
          <restriction>Call</restriction>
          <restriction>{{cf_999}}</restriction>
          </restrictions>
        </validation>
      </validations>
    </field>
  </fields>
</map>
```
- Import enhancements
  - Save import default values in mapping. Now when you save an import field mapping we save also the selected default values and load them when you select the map.
  - Import from the command line with the [Import Business Map](https://corebos.com/documentation/doku.php?noprocess=1&id=en:adminmanual:businessmappings:import)
- checkFieldUsage changes
  - convert to function in its own file so we can use it from anywhere in the application
  - change  function to return if found or not and where
  - add checks for calendar module view and status fields
  - search for email templates in MsgTemplates module
  - search in Picklist Dependency, Business Question, Business Map, Tooltip, Calendar, Webforms
  - add module conditions to queries to reduce the number of false positives
  - document function
- using the checkFieldUsage function we add field name update and delete checks to preserve application integrity. We also add a field label check.

| Before        | After           |
| ------------- |:-------------:|
| ![checkFieldUsage Before](checkFieldUsageFalsePositives.png?link) | ![checkFieldUsage After](checkFieldUsageLessFalsePositives.png?link) |

- Execute Functions: getMergedDescription and isPermitted
- add support for EDITVIEWWIDGET business action
- Edit and Detail View business action buttons and menu buttons

![Edit and Detail View Buttons](EDVButtons.png)

- temporarily deactivate Zendesk. It was a POC which was not used in the end and requires some additional features to work
- **getMergedDescriptionForURL** function which merges a URL Template with the fields from a record respecting the specific structure of a URL and it's parameters
- **getFieldTablesForModule** Business Map helper method that can be used in Business Maps
- convert field and column names to lower case when creating fields and importing modules to reduce module install errors
- **coreBOS UI Components** Dropdown action menu which we use to implement the Edit and Detail View business action menu buttons
- **Tests:** keep getting some love and care as we fix things and add coverage.

 ! Web Service

- **GetRelatedModulesOneToMany** method. Returns a list of modules that have a capture field to the indicated module.
- **getRelatedRecordsThroughModule** method. Returns second level related records through a bridge module.
- showqueryfromwsdoquery
  - add a semicolon to query if not given
  - better test query without eliminating order by clause
- Actor entities
  - apply profile permissions to web service actor entities
  - correct variable name in hasAssignPrivilege
  - get module from query, launch ws2sql against handler
  - remove the semicolon from query after getting it back from WS
  - refactor query results to its own function so we can call it separately
- set picklist default values on create. **Important** now empty picklist fields with a default value defined in the application will be set when creating
- eliminate warning on picklist fields with no values
- inform of error on empty ID in update and retrieve
- delete unused variable
- define missing global variable

 ! Workflow

- add Date Range and Status to workflow. Now we can make a workflow active only during certain date periods and also completely deactivate it. All workflows are set active by default.
- add min/max functions to workflow expression language
- support for crc32 hash method in workflow hash expression
- Get/Set/Del Settings methods for workflow expressions
- support for getSetting for URL and Auth token in Run Web Service workflow task
- use getMergedDescriptionForURL to evaluate the URL as it is constructed and apply LDS to the Push Notification workflow task
- add missing NOT expression operator to list of available operations
- correctly define count function in list of available operations
- filter emails for calendar based scheduled workflows
- open evaluation record select popup screen on field focus in Expression Editor. Like all other capture fields
- correct JSON call in update and create of the old version of web service client library

 ! coreBOS Standard Code Formatting, Security, and Optimizations

- coreBOS Standard code Formatting: Emails, Import, MailConverter, ModTracker, Users, Workflow, Utils, Settings:Privileges
- eliminate old Calendar support
- eliminate warnings in calendar, when processing dollar as date for queries, in Settings:Privileges
- update ADODB to 5.20.17
- optimization eliminate unused class in Database abstraction layer: change calls for constants
- optimization simplify conditions in Emails
- optimization eliminate unnecessary SQL call for total number of pages in List View
- optimization getTableNameForField: change like for equality
- optimization move constant function call outside of loop in Webservice
- security: make config.inc.php read-only
- disconnect a user when they are made inactive
- documentation fix comments in Privileges and Utils functions
- documentation set UpdateInfo function header to phpDocumentor format and eliminate variable for hardcoded string

 ! Others

- move CSS to head, outside body
- sync and cleanup Documents DetailView to support new business actions
- sync and cleanup all custom EditView scripts, including Documents
- apply LDS to Clock, HelpInfo, Updater and Capture field icons
- change HTML style to LDS CSS in Application Message
- only block screen on detail view Business Actions workflow launch if error checks have passed
- deactivate calendar events reminder check if module access is not permitted
- fix capture field buttons which were not working after page header change and form restructure. Apply LDS
- apply color scheme to bar charts
- Emails
  - avoid SQL error if parentid contains incorrect reference (comes from mail converter)
  - calculate the parentid field in a more secure way to compensate for old deleted records
  - eliminate redundant footer buttons
  - empty the from_mail on reply
- hide create button for all integrations
- add module Receipt Cards condition to retrieve Cost price on products and for filter in Autocomplete
- MailConverter
  - convert new lines to BR for cron output in browser
  - get correct fieldid for idlists reference and fix incorrect ones the best we can
- recover MassEdit1x1 and SaveRepeat functionality lost when applying new page header
- convert private methods to public in Module Update
- make Our Sites URL larger
- make Email password field larger
- drop unused column in User
- improve view of ModTracker entries
- use Application_ListView_Max_Text_Length to truncate Page Header title
- fix error by retrieving database row before using it in PBXManager event manager
- fir Popup quick save which was missing javascript hooks
- QueryGenerator
  - fix condition for empty reference fields
  - filter when reference field is related with two or more modules
  - filter blank date fields
- show Detail View buttons on the related list view
- correct variable name in the global search
- add try-catch on map evaluation and strict empty string comparison on Show Message DetailViewWidget result
- correct SQL for inserting values and set a default value in database to prevent error when update Outgoing server only
- date time field validations incorrect field array index
- constant translation effort:
  - Ranieri from Slemernet keeps the pt_br translation up to date and finds some places where we still aren't translating.
    - CronTask, Settings
  - Components: ldsmodal and ldsprompt support for i18n
  - Business Question: add help info on SQL query for materialized views
  - Business Question: delete field button
  - Business Question: materialized view scheduled workflow handler fields
  - copy followup label to cbCalendar for translation support in workflows
  - Contacts: it_it
  - CronTask: translate watcher email if no language is set
  - Import: delete duplicate label in nl_nl
  - Messages: ID field and minor syntax error
  - correctly translate module name in Global Search assistive text
  - PageHeader: translate save and cancel using getTranslatedString to permit override per module
  - Web service: Currency, Group, DocumentFolder entities
  - Web service: translate module ID field label and add label_raw in Actor modules
  - Web service: set the current language by escalating different options

![April Insights](corebosgithub2004.png)

**Thanks for reading.**

redpajama_set_name: RedPajamaGithub


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

package com.google.container.v1;

public interface ReservationAffinityOrBuilder
    extends
    // @@protoc_insertion_point(interface_extends:google.container.v1.ReservationAffinity)
    com.google.protobuf.MessageOrBuilder {

  /**
   *
   *
   *

   * Corresponds to the type of reservation consumption.
   *

   *
   * .google.container.v1.ReservationAffinity.Type consume_reservation_type = 1;
   *
   * @return The enum numeric value on the wire for consumeReservationType.
   */
  int getConsumeReservationTypeValue();
  /**
   *
   *
   *

   * Corresponds to the type of reservation consumption.
   *

   *
   * .google.container.v1.ReservationAffinity.Type consume_reservation_type = 1;
   *
   * @return The consumeReservationType.
   */
  com.google.container.v1.ReservationAffinity.Type getConsumeReservationType();

  /**
   *
   *
   *

   * Corresponds to the label key of a reservation resource. To target a
   * SPECIFIC_RESERVATION by name, specify
   * "compute.googleapis.com/reservation-name" as the key and specify the name
   * of your reservation as its value.
   *

   *
   * string key = 2;
   *
   * @return The key.
   */
  java.lang.String getKey();
  /**
   *
   *
   *

   * Corresponds to the label key of a reservation resource. To target a
   * SPECIFIC_RESERVATION by name, specify
   * "compute.googleapis.com/reservation-name" as the key and specify the name
   * of your reservation as its value.
   *

   *
   * string key = 2;
   *
   * @return The bytes for key.
   */
  com.google.protobuf.ByteString getKeyBytes();

  /**
   *
   *
   *

   * Corresponds to the label value(s) of reservation resource(s).
   *

   *
   * repeated string values = 3;
   *
   * @return A list containing the values.
   */
  java.util.List<java.lang.String> getValuesList();
  /**
   *
   *
   *

   * Corresponds to the label value(s) of reservation resource(s).
   *

   *
   * repeated string values = 3;
   *
   * @return The count of values.
   */
  int getValuesCount();
  /**
   *
   *
   *

   * Corresponds to the label value(s) of reservation resource(s).
   *

   *
   * repeated string values = 3;
   *
   * @param index The index of the element to return.
   * @return The values at the given index.
   */
  java.lang.String getValues(int index);
  /**
   *
   *
   *

   * Corresponds to the label value(s) of reservation resource(s).
   *

   *
   * repeated string values = 3;
   *
   * @param index The index of the value to return.
   * @return The bytes of the values at the given index.
   */
  com.google.protobuf.ByteString getValuesBytes(int index);
}


text:
'use strict';

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _ = require('../');

var _2 = _interopRequireDefault(_);

describe('reduceReducers()', function () {
  it('combines multiple reducers into a single reducer', function () {
    var reducer = _2['default'](function (prev, curr) {
      return _extends({}, prev, { A: prev.A + curr });
    }, function (prev, curr) {
      return _extends({}, prev, { B: prev.B * curr });
    });

    expect(reducer({ A: 1, B: 2 }, 3)).to.deep.equal({ A: 4, B: 6 });
    expect(reducer({ A: 5, B: 8 }, 13)).to.deep.equal({ A: 18, B: 104 });
  });

  it('chains multiple reducers into a single reducer', function () {
    var addReducer = function addReducer(prev, curr) {
      return _extends({}, prev, { A: prev.A + curr });
    };
    var multReducer = function multReducer(prev, curr) {
      return _extends({}, prev, { A: prev.A * curr });
    };
    var reducerAddMult = _2['default'](addReducer, multReducer);
    var reducerMultAdd = _2['default'](multReducer, addReducer);

    expect(reducerAddMult({ A: 1, B: 2 }, 3)).to.deep.equal({ A: 12, B: 2 });
    expect(reducerMultAdd({ A: 1, B: 2 }, 3)).to.deep.equal({ A: 6, B: 2 });
  });
});


text:
var manager, mapPanel, tree, toolbar, url;

Ext.onReady(function() {
    Ext.QuickTips.init();

    msURL = "http://dev8.mapgears.com/cgi-bin/mswms_gmap_trunk";
    tinyURL = "http://dev8.mapgears.com/cgi-bin/tinyows-trunk";

    // == Map ==
    var options = {
        allOverlays: true,
        projection: new OpenLayers.Projection("EPSG:900913"),
        displayProjection: new OpenLayers.Projection("EPSG:4326"),
        units: "m",
        numZoomLevels: 18,
        maxResolution: 156543.0339,
        maxExtent: new OpenLayers.Bounds(-20037508, -20037508,
                                         20037508, 20037508.34)
    };
    map = new OpenLayers.Map('map', options);

    // == Toolbar and Actions ==
    var actions = [];

    // ZoomToMaxExtent control, a "button" control
    action = new GeoExt.Action({
        control: new OpenLayers.Control.ZoomToMaxExtent(),
        map: map,
        text: "max extent",
        tooltip: "zoom to max extent"
    });
    actions.push(action);
    actions.push("-");

    // Navigation control and DrawFeature controls
    // in the same toggle group
    action = new GeoExt.Action({
        text: "nav",
        control: new OpenLayers.Control.Navigation(),
        map: map,
        // button options
        toggleGroup: "myGroup",
        allowDepress: false,
        pressed: true,
        tooltip: "navigate",
        // check item options
        group: "myGroup",
        checked: true
    });
    actions.push(action);
    toolbar = new Ext.Toolbar(actions);

    // == MapPanel ==
    wmsOptions = {isBaseLayer: false, singleTile: true, visibility: false};
    mapPanel = new GeoExt.MapPanel({
        region: "center",
        layers: [
            //new OpenLayers.Layer.OSM(),
            new OpenLayers.Layer.WMS('Bathymetry', msURL, {
                transparent: true, layers: 'bathymetry'},
                Ext.applyIf({visibility: true}, wmsOptions)),
            new OpenLayers.Layer.WMS('Drainage', msURL, {
                transparent: true, layers: 'drainage'}, wmsOptions),
            new OpenLayers.Layer.WMS('Roads', msURL, {
                transparent: true, layers: 'road'}, wmsOptions),
            new OpenLayers.Layer.WMS('Cities', msURL, {
                transparent: true, layers: 'popplace'}, wmsOptions)
        ],
        map: map,
        tbar: toolbar
    });

    tree = new Ext.tree.TreePanel({
        region: 'east',
        root: new GeoExt.tree.LayerContainer({
            text: 'Map Layers',
            layerStore: mapPanel.layers,
            leaf: false,
            expanded: true
        }),
        enableDD: true,
        width: 170
    });

    new Ext.Panel({
        renderTo: "content",
        layout: "border",
        width: 570,
        height: 350,
        items: [mapPanel, tree]
    });

    map.setCenter(new OpenLayers.LonLat(-8005708,6182838), 7);

    // WFSTFeatureEditingManager
    var extWindow = new Ext.Window({
        resizable: true,
        modal: false,
        closable: false,
        closeAction: 'hide',
        width: 550,
        height: 450,
        title: "WFSTFeatureEditing",
        layout: 'fit',
        items: []
    });

    manager = new GeoExt.ux.WFSTFeatureEditingManager({
        "map": mapPanel.map,
        "toolbar": toolbar,
        "url": tinyURL,
        "actionGroup": "myGroup",
        "mainPanelContainer": extWindow,
        "ignoredAttributes": {name:[
            "the_geom", "id", "gid", "fid", "name_e", "name_f"
        ]}
    });
});


text:
package com.rahul.udacity.cs2.ui.place_detail;

import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.net.Uri;
import android.support.design.widget.CollapsingToolbarLayout;
import android.support.v7.widget.CardView;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.google.android.gms.analytics.HitBuilders;
import com.google.android.gms.analytics.Tracker;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;
import com.rahul.udacity.cs2.R;
import com.rahul.udacity.cs2.base.ApplicationController;
import com.rahul.udacity.cs2.base.BaseActivity;
import com.rahul.udacity.cs2.database.DatabaseSave;
import com.rahul.udacity.cs2.ui.reviews.ReviewActivity;
import com.rahul.udacity.cs2.utility.Constants;
import com.rahul.udacity.cs2.utility.Utility;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.util.ArrayList;

public class PlaceDetailActivity extends BaseActivity implements OnMapReadyCallback, PlaceDetailView {
    private String phone_number, place_website;
    private static final String TAG_RESULT = "result";
    private static final String TAG_VICINITY = "vicinity";
    private static final String TAG_PLACE_NAME = "name";
    private static final String TAG_OPENING_HOURS = "opening_hours";
    private static final String TAG_FORMATTED_ADDRESS = "formatted_address";
    private static final String TAG_PHONE_NUMBER = "formatted_phone_number";
    private static final String TAG_TIMETABLE = "weekday_text";
    private static final String TAG_PHOTO = "photos";
    private static final String TAG_PHOTOS_REFERENCE = "photo_reference";
    private static final String TAG_TOTAL_RATING = "user_ratings_total";
    private static final String TAG_WEBSITE = "website";
    private static final String TAG_GEOMETRY = "geometry";
    private static final String TAG_LOCATION = "location";
    private static final String TAG_LAT = "lat";
    private static final String TAG_LNG = "lng";
    private ArrayList<String> photos_references = new ArrayList<>();
    DatabaseSave db;
    ImageView image;
    TextView place_name, place_vicinity, place_address, rating;
    LinearLayout call_now, website, timetable, saveLayout, reviews, photo_layout;
    SupportMapFragment fm;
    double lat, lng;
    CardView card2, card3;
    ImageView saveImage;
    TextView saveText;
    int choice;

    private GoogleMap googleMap;
    private String url;
    private PlaceDetailPresenter placeDetailPresenter;

    public void setMap(double lat, double lng) {
        LatLng sydney = new LatLng(lat, lng);
        googleMap.addMarker(new MarkerOptions().position(sydney).title("Here"));
        googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(lat, lng), 12.0f));
    }

    @Override
    public void onMapReady(GoogleMap googleMap) {
        this.googleMap = googleMap;
        placeDetailPresenter.getPlaceDetail(url);
    }

    public void setPhotos() {

        ImageView img;

        for (int i = 0; i < photos_references.size(); i++) {
            img = new ImageView(PlaceDetailActivity.this);

            img.setPadding(5, 0, 5, 0);
            ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
            String photo = photos_references.get(i);
            img.setLayoutParams(params);

            Glide.with(PlaceDetailActivity.this).load("https://maps.googleapis.com/maps/api/place/photo?maxwidth=500&photoreference="
                    + photo + "&key=" + getString(R.string.api_key))
                    .asBitmap().override(300, 300).into(img);
            photo_layout.addView(img);
        }
    }

    @Override
    protected void onResume() {
        super.onResume();
        Tracker t = ApplicationController.getApplicationInstance().getTracker();
        t.setScreenName("Place Detail Screen");
        t.send(new HitBuilders.AppViewBuilder().build());
    }

    @Override
    protected void initUi() {
        placeDetailPresenter = new PlaceDetailPresenter(this);
        db = new DatabaseSave(this);

        getHeaderToolBar().inflateMenu(R.menu.menu_place_detail);
        getHeaderToolBar().setOnMenuItemClickListener(new Toolbar.OnMenuItemClickListener() {
            @Override
            public boolean onMenuItemClick(MenuItem item) {
                switch (item.getItemId()) {
                    case R.id.share:
                        try {
                            Intent sharingIntent = new Intent(Intent.ACTION_SEND);
                            sharingIntent.setType("text/plain");
                            sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT,
                                    "Download traveladvisor to help plan your trips perfectly.");
                            startActivity(Intent.createChooser(sharingIntent,
                                    "Share using"));
                        } catch (Exception e) {
                            Log.i("Error", e.getMessage());
                            Utility.showSnackBar(getActivity(), "No activity found to open website");

                        }
                        break;
                }
                return false;
            }
        });

        image = (ImageView) findViewById(R.id.imagePosterFull);
        saveImage = (ImageView) findViewById(R.id.saveImage);
        place_name = (TextView) findViewById(R.id.place_name);
        place_vicinity = (TextView) findViewById(R.id.place_vicinity);
        place_address = (TextView) findViewById(R.id.address);
        saveText = (TextView) findViewById(R.id.saveText);
        call_now = (LinearLayout) findViewById(R.id.call);
        website = (LinearLayout) findViewById(R.id.website);
        saveLayout = (LinearLayout) findViewById(R.id.save);
        timetable = (LinearLayout) findViewById(R.id.timetable);
        reviews = (LinearLayout) findViewById(R.id.reviews);
        photo_layout = (LinearLayout) findViewById(R.id.photoLayout);
        rating = (TextView) findViewById(R.id.rating);
        card2 = (CardView) findViewById(R.id.card2);
        card3 = (CardView) findViewById(R.id.card3);

        CollapsingToolbarLayout collapsingToolbar = (CollapsingToolbarLayout) findViewById(R.id.collapsing_toolbar);
        collapsingToolbar.setOnTouchListener(new View.OnTouchListener() {
            @Override
            public boolean onTouch(View v, MotionEvent event) {
                return true;
            }
        });

        fm = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
        fm.getMapAsync(this);

        final String place_id = getIntent().getStringExtra(Constants.PLACE_ID);
        choice = getIntent().getIntExtra(Constants.CHOICE, 0);
        url = "https://maps.googleapis.com/maps/api/place/details/json?placeid=" + place_id + "&key=" + getString(R.string.api_key);

        Log.d("place_id", place_id);

        call_now.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent callIntent = new Intent(Intent.ACTION_DIAL);
                callIntent.setData(Uri.parse("tel:" + phone_number));
                startActivity(callIntent);
            }
        });

        website.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                try {
                    Intent intent = new Intent(Intent.ACTION_VIEW);
                    intent.setData(Uri.parse(place_website + ""));
                    startActivity(intent);
                } catch (Exception e) {
                    Utility.showSnackBar(getActivity(), "No activity found to open website");
                }
            }
        });

        reviews.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent i = new Intent(PlaceDetailActivity.this, ReviewActivity.class);
                i.putExtra(Constants.PLACE_ID, place_id);
                startActivity(i);

            }
        });

        saveLayout.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                switch (choice) {
                    case Constants.TYPE_PLACES:

                        if (!db.getPlaces(place_id)) {
                            saveImage.setImageResource(R.drawable.favourite_icon_red);
                            saveText.setText(R.string.saved);
                            saveText.setTextColor(Color.RED);
                            db.addPlaces(place_id, place_name.getText().toString());
                        } else {
                            Utility.showSnackBar(getActivity(), getString(R.string.already_added));
                        }
                        informDataUpdatedToWidgets();
                        break;

                    case Constants.TYPE_HOTELS:

                        if (!db.gethotel(place_id)) {
                            saveImage.setImageResource(R.drawable.favourite_icon_red);
                            saveText.setText(R.string.saved);
                            saveText.setTextColor(Color.RED);
                            db.addHotels(place_id, place_name.getText().toString());
                        } else {
                            Utility.showSnackBar(getActivity(), getString(R.string.already_added));
                        }
                        informDataUpdatedToWidgets();
                        break;

                    case Constants.TYPE_RESTAURANTS:

                        if (!db.getRes(place_id)) {
                            saveImage.setImageResource(R.drawable.favourite_icon_red);
                            saveText.setText(R.string.saved);
                            saveText.setTextColor(Color.RED);
                            db.addRestaurants(place_id, place_name.getText().toString());
                        } else {
                            Utility.showSnackBar(getActivity(), getString(R.string.already_added));
                        }
                        informDataUpdatedToWidgets();
                        break;

                    case 4:
                        if (!db.getPlaces(place_id)) {
                            saveImage.setImageResource(R.drawable.favourite_icon_red);
                            saveText.setText(R.string.saved);
                            saveText.setTextColor(Color.RED);
                            db.addPlaces(place_id, place_name.getText().toString());
                        } else {
                            Utility.showSnackBar(getActivity(), getString(R.string.already_added));
                        }
                        informDataUpdatedToWidgets();
                        break;
                }
            }
        });

        switch (choice) {
            case 1:
                if (db.getPlaces(place_id)) {
                    saveImage.setImageResource(R.drawable.favourite_icon_red);
                    saveText.setText(R.string.saved_caps);
                    saveText.setTextColor(Color.RED);
                }
                break;

            case 2:
                if (db.gethotel(place_id)) {
                    saveImage.setImageResource(R.drawable.favourite_icon_red);
                    saveText.setText(R.string.saved_caps);
                    saveText.setTextColor(Color.RED);
                }
                break;

            case 3:

                if (db.getRes(place_id)) {
                    saveImage.setImageResource(R.drawable.favourite_icon_red);
                    saveText.setText(R.string.saved_caps);
                    saveText.setTextColor(Color.RED);
                }
                break;

            case 4:
                if (db.getPlaces(place_id)) {
                    saveImage.setImageResource(R.drawable.favourite_icon_red);
                    saveText.setText(R.string.saved_caps);
                    saveText.setTextColor(Color.RED);
                }
                break;
        }

    }

    private void informDataUpdatedToWidgets() {
        Intent newIntent = new Intent(Utility.ACTION_DATA_UPDATE)
                .setPackage(getApplicationContext().getPackageName());
        getApplicationContext().sendBroadcast(newIntent);
    }

    @Override
    protected int getLayoutById() {
        return R.layout.place_detail_layout;
    }

    @Override
    public Context getViewContext() {
        return this;
    }

    @Override
    public void showProgress(boolean showProgress) {
        showProgressDialog(showProgress);
    }

    @Override
    public void parseData(JSONObject jsonObject) {
        try {

            JSONObject list = jsonObject.getJSONObject(TAG_RESULT);
            final ArrayList<String> photos_reference = new ArrayList<>();

            if (list.has(TAG_PHOTO)) {
                JSONArray photos = list.getJSONArray(TAG_PHOTO);

                for (int j = 0; j < photos.length(); j++) {
                    JSONObject photo = photos.getJSONObject(j);

                    photos_reference.add(photo.getString(TAG_PHOTOS_REFERENCE));
                    photos_references.add(photo.getString(TAG_PHOTOS_REFERENCE));

                }

                Glide.with(PlaceDetailActivity.this).load("https://maps.googleapis.com/maps/api/place/photo?maxwidth=500&photoreference="
                        + photos_reference.get(0) + "&key=" + getString(R.string.api_key)).asBitmap().into(image);
                image.setAlpha(0.6f);

            } else {
                card2.setVisibility(View.GONE);
            }

            String placename = list.getString(TAG_PLACE_NAME);
            place_name.setText(placename);

            String vicinity = list.getString(TAG_VICINITY);
            place_vicinity.setText(vicinity);

            String address = list.getString(TAG_FORMATTED_ADDRESS);
            place_address.setText(address);

            JSONObject geometry = list.getJSONObject(TAG_GEOMETRY);
            JSONObject location = geometry.getJSONObject(TAG_LOCATION);

            lat = Double.parseDouble(location.getString(TAG_LAT));
            lng = Double.parseDouble(location.getString(TAG_LNG));

            double rate = 0;
            try {
                if (list.has(TAG_TOTAL_RATING))
                    rate = list.getDouble(TAG_TOTAL_RATING);
                else
                    rate = list.getDouble("rating");
            } catch (Exception e) {
                Log.i("Error", e.getMessage());
            }
            rating.setText(getString(R.string.user_rating, rate + ""));

            if (list.has(TAG_OPENING_HOURS)) {
                JSONObject opening_hours = list.getJSONObject(TAG_OPENING_HOURS);

                JSONArray times = opening_hours.getJSONArray(TAG_TIMETABLE);

                TextView textView;

                for (int j = 0; j < times.length(); j++) {
                    String time1 = (String) times.get(j);
                    textView = new TextView(getActivity());
                    ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);

                    textView.setLayoutParams(params);
                    textView.setPadding(3, 8, 3, 8);
                    textView.setText(time1);
                    textView.setTextSize(17);
                    textView.setTextColor(Color.parseColor("#2f2f2f"));

                    timetable.addView(textView);
                }
            } else {
                card3.setVisibility(View.GONE);
            }

            place_website = list.getString(TAG_WEBSITE);
            phone_number = list.getString(TAG_PHONE_NUMBER);

        } catch (JSONException e) {
            e.printStackTrace();
        }
        setMap(lat, lng);
        setPhotos();
    }
}


text:
@interface XBL_storageLanguage : NSManagedObject

@property (nonatomic, retain) NSString * shortname;
@property (nonatomic, retain) NSString * name;
@property (nonatomic, retain) NSString * support;

+ (void)addText:(NSDictionary *)item;
+ (NSArray *)getFormat:(NSString *)format argument:(NSArray *)argument;
+ (NSArray *)getAll;

+ (void)clean;

@end


text:
#include <Library/ReportStatusCodeLib.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/PcdLib.h>
#include <Library/DevicePathLib.h>

#include <Protocol/StatusCode.h>

#include <Guid/StatusCodeDataTypeId.h>
#include <Guid/StatusCodeDataTypeDebug.h>

//
// Define the maximum extended data size that is supported when a status code is
// reported at TPL_HIGH_LEVEL.
//
#define MAX_EXTENDED_DATA_SIZE  0x200

EFI_STATUS_CODE_PROTOCOL  *mReportStatusCodeLibStatusCodeProtocol = NULL;

/**
  Locate the report status code service.

  Retrieve ReportStatusCode() API of Report Status Code Protocol.

**/
VOID
InternalGetReportStatusCode (
  VOID
  )
{
  EFI_STATUS  Status;

  if (mReportStatusCodeLibStatusCodeProtocol != NULL) {
    return;
  }

  //
  // Check gBS just in case ReportStatusCode is called before gBS is initialized.
  //
  if (gBS != NULL && gBS->LocateProtocol != NULL) {
    Status = gBS->LocateProtocol (&gEfiStatusCodeRuntimeProtocolGuid, NULL, (VOID**) &mReportStatusCodeLibStatusCodeProtocol);
    if (EFI_ERROR (Status)) {
      mReportStatusCodeLibStatusCodeProtocol = NULL;
    }
  }
}

/**
  Internal worker function that reports a status code through the Report Status Code Protocol.

  If status code service is not cached, then this function checks if Report Status Code
  Protocol is available in system.  If Report Status Code Protocol is not available, then
  EFI_UNSUPPORTED is returned.  If Report Status Code Protocol is present, then it is
  cached in mReportStatusCodeLibStatusCodeProtocol. Finally this function reports status
  code through the Report Status Code Protocol.

  @param  Type              Status code type.
  @param  Value             Status code value.
  @param  Instance          Status code instance number.
  @param  CallerId          Pointer to a GUID that identifies the caller of this
                            function.  This is an optional parameter that may be
                            NULL.
  @param  Data              Pointer to the extended data buffer.  This is an
                            optional parameter that may be NULL.

  @retval EFI_SUCCESS       The status code was reported.
  @retval EFI_UNSUPPORTED   Report Status Code Protocol is not available.
  @retval EFI_UNSUPPORTED   Status code type is not supported.

**/
EFI_STATUS
InternalReportStatusCode (
  IN EFI_STATUS_CODE_TYPE     Type,
  IN EFI_STATUS_CODE_VALUE    Value,
  IN UINT32                   Instance,
  IN CONST EFI_GUID           *CallerId OPTIONAL,
  IN EFI_STATUS_CODE_DATA     *Data     OPTIONAL
  )
{
  if ((ReportProgressCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) ||
      (ReportErrorCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) ||
      (ReportDebugCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_DEBUG_CODE)) {
    //
    // If mReportStatusCodeLibStatusCodeProtocol is NULL, then check if Report Status Code Protocol is available in system.
    //
    InternalGetReportStatusCode ();
    if (mReportStatusCodeLibStatusCodeProtocol == NULL) {
      return EFI_UNSUPPORTED;
    }

    //
    // A Report Status Code Protocol is present in system, so pass in all the parameters to the service.
    //
    return mReportStatusCodeLibStatusCodeProtocol->ReportStatusCode (Type, Value, Instance, (EFI_GUID *)CallerId, Data);
  }

  return EFI_UNSUPPORTED;
}

/**
  Converts a status code to an 8-bit POST code value.

  Converts the status code specified by CodeType and Value to an 8-bit POST code
  and returns the 8-bit POST code in PostCode.  If CodeType is an
  EFI_PROGRESS_CODE or CodeType is an EFI_ERROR_CODE, then bits 0..4 of PostCode
  are set to bits 16..20 of Value, and bits 5..7 of PostCode are set to bits
  24..26 of Value., and TRUE is returned.  Otherwise, FALSE is returned.

  If PostCode is NULL, then ASSERT().

  @param  CodeType  The type of status code being converted.
  @param  Value     The status code value being converted.
  @param  PostCode  A pointer to the 8-bit POST code value to return.

  @retval  TRUE   The status code specified by CodeType and Value was converted
                  to an 8-bit POST code and returned in  PostCode.
  @retval  FALSE  The status code specified by CodeType and Value could not be
                  converted to an 8-bit POST code value.

**/
BOOLEAN
EFIAPI
CodeTypeToPostCode (
  IN  EFI_STATUS_CODE_TYPE   CodeType,
  IN  EFI_STATUS_CODE_VALUE  Value,
  OUT UINT8                  *PostCode
  )
{
  //
  // If PostCode is NULL, then ASSERT()
  //
  ASSERT (PostCode != NULL);

  //
  // Convert Value to an 8 bit post code
  //
  if (((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) ||
      ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE)       ) {
    *PostCode  = (UINT8) ((((Value & EFI_STATUS_CODE_CLASS_MASK) >> 24) << 5) |
                          (((Value & EFI_STATUS_CODE_SUBCLASS_MASK) >> 16) & 0x1f));
    return TRUE;
  }
  return FALSE;
}

/**
  Extracts ASSERT() information from a status code structure.

  Converts the status code specified by CodeType, Value, and Data to the ASSERT()
  arguments specified by Filename, Description, and LineNumber.  If CodeType is
  an EFI_ERROR_CODE, and CodeType has a severity of EFI_ERROR_UNRECOVERED, and
  Value has an operation mask of EFI_SW_EC_ILLEGAL_SOFTWARE_STATE, extract
  Filename, Description, and LineNumber from the optional data area of the
  status code buffer specified by Data.  The optional data area of Data contains
  a Null-terminated ASCII string for the FileName, followed by a Null-terminated
  ASCII string for the Description, followed by a 32-bit LineNumber.  If the
  ASSERT() information could be extracted from Data, then return TRUE.
  Otherwise, FALSE is returned.

  If Data is NULL, then ASSERT().
  If Filename is NULL, then ASSERT().
  If Description is NULL, then ASSERT().
  If LineNumber is NULL, then ASSERT().

  @param  CodeType     The type of status code being converted.
  @param  Value        The status code value being converted.
  @param  Data         Pointer to status code data buffer.
  @param  Filename     Pointer to the source file name that generated the ASSERT().
  @param  Description  Pointer to the description of the ASSERT().
  @param  LineNumber   Pointer to source line number that generated the ASSERT().

  @retval  TRUE   The status code specified by CodeType, Value, and Data was
                  converted ASSERT() arguments specified by Filename, Description,
                  and LineNumber.
  @retval  FALSE  The status code specified by CodeType, Value, and Data could
                  not be converted to ASSERT() arguments.

**/
BOOLEAN
EFIAPI
ReportStatusCodeExtractAssertInfo (
  IN EFI_STATUS_CODE_TYPE        CodeType,
  IN EFI_STATUS_CODE_VALUE       Value,
  IN CONST EFI_STATUS_CODE_DATA  *Data,
  OUT CHAR8                      **Filename,
  OUT CHAR8                      **Description,
  OUT UINT32                     *LineNumber
  )
{
  EFI_DEBUG_ASSERT_DATA  *AssertData;

  ASSERT (Data        != NULL);
  ASSERT (Filename    != NULL);
  ASSERT (Description != NULL);
  ASSERT (LineNumber  != NULL);

  if (((CodeType & EFI_STATUS_CODE_TYPE_MASK)      == EFI_ERROR_CODE) &&
      ((CodeType & EFI_STATUS_CODE_SEVERITY_MASK)  == EFI_ERROR_UNRECOVERED) &&
      ((Value    & EFI_STATUS_CODE_OPERATION_MASK) == EFI_SW_EC_ILLEGAL_SOFTWARE_STATE)) {
    AssertData   = (EFI_DEBUG_ASSERT_DATA *)(Data + 1);
    *Filename    = (CHAR8 *)(AssertData + 1);
    *Description = *Filename + AsciiStrLen (*Filename) + 1;
    *LineNumber  = AssertData->LineNumber;
    return TRUE;
  }
  return FALSE;
}

/**
  Extracts DEBUG() information from a status code structure.

  Converts the status code specified by Data to the DEBUG() arguments specified
  by ErrorLevel, Marker, and Format.  If type GUID in Data is
  EFI_STATUS_CODE_DATA_TYPE_DEBUG_GUID, then extract ErrorLevel, Marker, and
  Format from the optional data area of the status code buffer specified by Data.
  The optional data area of Data contains a 32-bit ErrorLevel followed by Marker
  which is 12 UINTN parameters, followed by a Null-terminated ASCII string for
  the Format.  If the DEBUG() information could be extracted from Data, then
  return TRUE.  Otherwise, FALSE is returned.

  If Data is NULL, then ASSERT().
  If ErrorLevel is NULL, then ASSERT().
  If Marker is NULL, then ASSERT().
  If Format is NULL, then ASSERT().

  @param  Data        Pointer to status code data buffer.
  @param  ErrorLevel  Pointer to error level mask for a debug message.
  @param  Marker      Pointer to the variable argument list associated with Format.
  @param  Format      Pointer to a Null-terminated ASCII format string of a
                      debug message.

  @retval  TRUE   The status code specified by Data was converted DEBUG() arguments
                  specified by ErrorLevel, Marker, and Format.
  @retval  FALSE  The status code specified by Data could not be converted to
                  DEBUG() arguments.

**/
BOOLEAN
EFIAPI
ReportStatusCodeExtractDebugInfo (
  IN CONST EFI_STATUS_CODE_DATA  *Data,
  OUT UINT32                     *ErrorLevel,
  OUT BASE_LIST                  *Marker,
  OUT CHAR8                      **Format
  )
{
  EFI_DEBUG_INFO  *DebugInfo;

  ASSERT (Data       != NULL);
  ASSERT (ErrorLevel != NULL);
  ASSERT (Marker     != NULL);
  ASSERT (Format     != NULL);

  //
  // If the GUID type is not EFI_STATUS_CODE_DATA_TYPE_DEBUG_GUID then return FALSE
  //
  if (!CompareGuid (&Data->Type, &gEfiStatusCodeDataTypeDebugGuid)) {
    return FALSE;
  }

  //
  // Retrieve the debug information from the status code record
  //
  DebugInfo = (EFI_DEBUG_INFO *)(Data + 1);

  *ErrorLevel = DebugInfo->ErrorLevel;

  //
  // The first 12 * sizeof (UINT64) bytes following EFI_DEBUG_INFO are for variable arguments
  // of format in DEBUG string. Its address is returned in Marker and has to be 64-bit aligned.
  // It must be noticed that EFI_DEBUG_INFO follows EFI_STATUS_CODE_DATA, whose size is
  // 20 bytes. The size of EFI_DEBUG_INFO is 4 bytes, so we can ensure that Marker
  // returned is 64-bit aligned.
  // 64-bit aligned is a must, otherwise retrieving 64-bit parameter from BASE_LIST will
  // cause unalignment exception.
  //
  *Marker = (BASE_LIST) (DebugInfo + 1);
  *Format = (CHAR8 *)(((UINT64 *)*Marker) + 12);

  return TRUE;
}

/**
  Reports a status code.

  Reports the status code specified by the parameters Type and Value.  Status
  code also require an instance, caller ID, and extended data.  This function
  passed in a zero instance, NULL extended data, and a caller ID of
  gEfiCallerIdGuid, which is the GUID for the module.

  ReportStatusCode()must actively prevent recusrsion.  If ReportStatusCode()
  is called while processing another any other Report Status Code Library function,
  then ReportStatusCode() must return immediately.

  @param  Type   Status code type.
  @param  Value  Status code value.

  @retval  EFI_SUCCESS       The status code was reported.
  @retval  EFI_DEVICE_ERROR  There status code could not be reported due to a
                             device error.
  @retval  EFI_UNSUPPORTED   Report status code is not supported

**/
EFI_STATUS
EFIAPI
ReportStatusCode (
  IN EFI_STATUS_CODE_TYPE   Type,
  IN EFI_STATUS_CODE_VALUE  Value
  )
{
  return InternalReportStatusCode (Type, Value, 0, &gEfiCallerIdGuid, NULL);
}

/**
  Reports a status code with a Device Path Protocol as the extended data.

  Allocates and fills in the extended data section of a status code with the
  Device Path Protocol specified by DevicePath.  This function is responsible
  for allocating a buffer large enough for the standard header and the device
  path.  The standard header is filled in with a GUID of
  gEfiStatusCodeSpecificDataGuid.  The status code is reported with a zero
  instance and a caller ID of gEfiCallerIdGuid.

  ReportStatusCodeWithDevicePath()must actively prevent recursion.  If
  ReportStatusCodeWithDevicePath() is called while processing another any other
  Report Status Code Library function, then ReportStatusCodeWithDevicePath()
  must return EFI_DEVICE_ERROR immediately.

  If DevicePath is NULL, then ASSERT().

  @param  Type        Status code type.
  @param  Value       Status code value.
  @param  DevicePath  Pointer to the Device Path Protocol to be reported.

  @retval  EFI_SUCCESS           The status code was reported with the extended
                                 data specified by DevicePath.
  @retval  EFI_OUT_OF_RESOURCES  There were not enough resources to allocate the
                                 extended data section.
  @retval  EFI_UNSUPPORTED       Report status code is not supported

**/
EFI_STATUS
EFIAPI
ReportStatusCodeWithDevicePath (
  IN EFI_STATUS_CODE_TYPE            Type,
  IN EFI_STATUS_CODE_VALUE           Value,
  IN CONST EFI_DEVICE_PATH_PROTOCOL  *DevicePath
  )
{
  ASSERT (DevicePath != NULL);
  return ReportStatusCodeWithExtendedData (
           Type,
           Value,
           (VOID *)DevicePath,
           GetDevicePathSize (DevicePath)
           );
}

/**
  Reports a status code with an extended data buffer.

  Allocates and fills in the extended data section of a status code with the
  extended data specified by ExtendedData and ExtendedDataSize.  ExtendedData
  is assumed to be one of the data structures specified in Related Definitions.
  These data structure do not have the standard header, so this function is
  responsible for allocating a buffer large enough for the standard header and
  the extended data passed into this function.  The standard header is filled
  in with a GUID of  gEfiStatusCodeSpecificDataGuid.  The status code is reported
  with a zero instance and a caller ID of gEfiCallerIdGuid.

  ReportStatusCodeWithExtendedData()must actively prevent recursion.  If
  ReportStatusCodeWithExtendedData() is called while processing another any other
  Report Status Code Library function, then ReportStatusCodeWithExtendedData()
  must return EFI_DEVICE_ERROR immediately.

  If ExtendedData is NULL, then ASSERT().
  If ExtendedDataSize is 0, then ASSERT().

  @param  Type              Status code type.
  @param  Value             Status code value.
  @param  ExtendedData      Pointer to the extended data buffer to be reported.
  @param  ExtendedDataSize  The size, in bytes, of the extended data buffer to
                            be reported.

  @retval  EFI_SUCCESS           The status code was reported with the extended
                                 data specified by ExtendedData and ExtendedDataSize.
  @retval  EFI_OUT_OF_RESOURCES  There were not enough resources to allocate the
                                 extended data section.
  @retval  EFI_UNSUPPORTED       Report status code is not supported

**/
EFI_STATUS
EFIAPI
ReportStatusCodeWithExtendedData (
  IN EFI_STATUS_CODE_TYPE   Type,
  IN EFI_STATUS_CODE_VALUE  Value,
  IN CONST VOID             *ExtendedData,
  IN UINTN                  ExtendedDataSize
  )
{
  ASSERT (ExtendedData     != NULL);
  ASSERT (ExtendedDataSize != 0);
  return ReportStatusCodeEx (
           Type,
           Value,
           0,
           NULL,
           NULL,
           ExtendedData,
           ExtendedDataSize
           );
}

/**
  Reports a status code with full parameters.

  The function reports a status code.  If ExtendedData is NULL and ExtendedDataSize
  is 0, then an extended data buffer is not reported.  If ExtendedData is not
  NULL and ExtendedDataSize is not 0, then an extended data buffer is allocated.
  ExtendedData is assumed not have the standard status code header, so this function
  is responsible for allocating a buffer large enough for the standard header and
  the extended data passed into this function.  The standard header is filled in
  with a GUID specified by ExtendedDataGuid.  If ExtendedDataGuid is NULL, then a
  GUID of gEfiStatusCodeSpecificDataGuid is used.  The status code is reported with
  an instance specified by Instance and a caller ID specified by CallerId.  If
  CallerId is NULL, then a caller ID of gEfiCallerIdGuid is used.

  ReportStatusCodeEx()must actively prevent recursion. If
  ReportStatusCodeEx() is called while processing another any
  other Report Status Code Library function, then
  ReportStatusCodeEx() must return EFI_DEVICE_ERROR immediately.

  If ExtendedData is NULL and ExtendedDataSize is not zero, then ASSERT().
  If ExtendedData is not NULL and ExtendedDataSize is zero, then ASSERT().

  @param  Type              Status code type.
  @param  Value             Status code value.
  @param  Instance          Status code instance number.
  @param  CallerId          Pointer to a GUID that identifies the caller of this
                            function.  If this parameter is NULL, then a caller
                            ID of gEfiCallerIdGuid is used.
  @param  ExtendedDataGuid  Pointer to the GUID for the extended data buffer.
                            If this parameter is NULL, then a the status code
                            standard header is filled in with
                            gEfiStatusCodeSpecificDataGuid.
  @param  ExtendedData      Pointer to the extended data buffer.  This is an
                            optional parameter that may be NULL.
  @param  ExtendedDataSize  The size, in bytes, of the extended data buffer.

  @retval  EFI_SUCCESS           The status code was reported.
  @retval  EFI_OUT_OF_RESOURCES  There were not enough resources to allocate
                                 the extended data section if it was specified.
  @retval  EFI_UNSUPPORTED       Report status code is not supported

**/
EFI_STATUS
EFIAPI
ReportStatusCodeEx (
  IN EFI_STATUS_CODE_TYPE   Type,
  IN EFI_STATUS_CODE_VALUE  Value,
  IN UINT32                 Instance,
  IN CONST EFI_GUID         *CallerId          OPTIONAL,
  IN CONST EFI_GUID         *ExtendedDataGuid  OPTIONAL,
  IN CONST VOID             *ExtendedData      OPTIONAL,
  IN UINTN                  ExtendedDataSize
  )
{
  EFI_STATUS            Status;
  EFI_STATUS_CODE_DATA  *StatusCodeData;
  EFI_TPL               Tpl;
  UINT64                Buffer[(MAX_EXTENDED_DATA_SIZE / sizeof (UINT64)) + 1];

  ASSERT (!((ExtendedData == NULL) && (ExtendedDataSize != 0)));
  ASSERT (!((ExtendedData != NULL) && (ExtendedDataSize == 0)));

  if (gBS == NULL || gBS->AllocatePool == NULL || gBS->FreePool == NULL) {
    return EFI_UNSUPPORTED;
  }

  //
  // Retrieve the current TPL
  //
  Tpl = gBS->RaiseTPL (TPL_HIGH_LEVEL);
  gBS->RestoreTPL (Tpl);

  StatusCodeData = NULL;
  if (Tpl <= TPL_NOTIFY) {
    //
    // Allocate space for the Status Code Header and its buffer
    //
    gBS->AllocatePool (EfiBootServicesData, sizeof (EFI_STATUS_CODE_DATA) + ExtendedDataSize, (VOID **)&StatusCodeData);
  }

  if (StatusCodeData == NULL) {
    //
    // If a buffer could not be allocated, then see if the local variable Buffer can be used
    //
    if (ExtendedDataSize > (MAX_EXTENDED_DATA_SIZE - sizeof (EFI_STATUS_CODE_DATA))) {
      //
      // The local variable Buffer not large enough to hold the extended data associated
      // with the status code being reported.
      //
      DEBUG ((EFI_D_ERROR, "Status code extended data is too large to be reported!\n"));
      return EFI_OUT_OF_RESOURCES;
    }
    StatusCodeData = (EFI_STATUS_CODE_DATA  *)Buffer;
  }

  //
  // Fill in the extended data header
  //
  StatusCodeData->HeaderSize = (UINT16) sizeof (EFI_STATUS_CODE_DATA);
  StatusCodeData->Size = (UINT16) ExtendedDataSize;
  if (ExtendedDataGuid == NULL) {
    ExtendedDataGuid = &gEfiStatusCodeSpecificDataGuid;
  }
  CopyGuid (&StatusCodeData->Type, ExtendedDataGuid);

  //
  // Fill in the extended data buffer
  //
  if (ExtendedData != NULL) {
    CopyMem (StatusCodeData + 1, ExtendedData, ExtendedDataSize);
  }

  //
  // Report the status code
  //
  if (CallerId == NULL) {
    CallerId = &gEfiCallerIdGuid;
  }
  Status = InternalReportStatusCode (Type, Value, Instance, CallerId, StatusCodeData);

  //
  // Free the allocated buffer
  //
  if (StatusCodeData != (EFI_STATUS_CODE_DATA  *)Buffer) {
    gBS->FreePool (StatusCodeData);
  }

  return Status;
}

/**
  Returns TRUE if status codes of type EFI_PROGRESS_CODE are enabled

  This function returns TRUE if the REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED
  bit of PcdReportStatusCodeProperyMask is set.  Otherwise FALSE is returned.

  @retval  TRUE   The REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED bit of
                  PcdReportStatusCodeProperyMask is set.
  @retval  FALSE  The REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED bit of
                  PcdReportStatusCodeProperyMask is clear.

**/
BOOLEAN
EFIAPI
ReportProgressCodeEnabled (
  VOID
  )
{
  return (BOOLEAN) ((PcdGet8 (PcdReportStatusCodePropertyMask) & REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED) != 0);
}

/**
  Returns TRUE if status codes of type EFI_ERROR_CODE are enabled

  This function returns TRUE if the REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED
  bit of PcdReportStatusCodeProperyMask is set.  Otherwise FALSE is returned.

  @retval  TRUE   The REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED bit of
                  PcdReportStatusCodeProperyMask is set.
  @retval  FALSE  The REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED bit of
                  PcdReportStatusCodeProperyMask is clear.

**/
BOOLEAN
EFIAPI
ReportErrorCodeEnabled (
  VOID
  )
{
  return (BOOLEAN) ((PcdGet8 (PcdReportStatusCodePropertyMask) & REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED) != 0);
}

/**
  Returns TRUE if status codes of type EFI_DEBUG_CODE are enabled

  This function returns TRUE if the REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED
  bit of PcdReportStatusCodeProperyMask is set.  Otherwise FALSE is returned.

  @retval  TRUE   The REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED bit of
                  PcdReportStatusCodeProperyMask is set.
  @retval  FALSE  The REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED bit of
                  PcdReportStatusCodeProperyMask is clear.

**/
BOOLEAN
EFIAPI
ReportDebugCodeEnabled (
  VOID
  )
{
  return (BOOLEAN) ((PcdGet8 (PcdReportStatusCodePropertyMask) & REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED) != 0);
}


text:
source "$(dirname "${BASH_SOURCE}")/lib/init.sh"

function cleanup() {
    return_code=$?
    os::test::junit::generate_report
    os::util::describe_return_code "${return_code}"
    exit "${return_code}"
}
trap "cleanup" EXIT

os::test::junit::declare_suite_start "verify/generated"
os::cmd::expect_success "${OS_ROOT}/hack/update-generated.sh"
os::cmd::expect_success "git diff --quiet ${OS_ROOT}/test/extended/util/annotate/generated/"
os::cmd::expect_success "git diff --quiet ${OS_ROOT}/test/extended/util/image/zz_generated.txt"

os::test::junit::declare_suite_end


text:
namespace CppNet
{
	template<typename T = Byte>
	interface ICrypto
	{
		virtual System::Tuple<T*, size_t> Encrypt(T* bytes, size_t len) const = 0;
		virtual System::Tuple<T*, size_t> Decrypt(T* bytes, size_t len) const = 0;
	};
}

#endif


text:
package io.sgr.telegram.bot.api.http;

import static com.google.common.base.Preconditions.checkNotNull;

import io.sgr.telegram.bot.api.models.http.ApiResponse;

import org.slf4j.Logger;
import retrofit2.CallAdapter;
import retrofit2.Retrofit;

import java.lang.annotation.Annotation;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.concurrent.CompletableFuture;

import javax.annotation.Nonnull;

public class DefaultCallAdapterFactory extends CallAdapter.Factory {

    private final boolean retry;
    private final Logger logger;

    public DefaultCallAdapterFactory(final boolean retry, @Nonnull final Logger logger) {
        this.retry = retry;
        this.logger = checkNotNull(logger, "Missing logger!");
    }

    @Override
    public CallAdapter<?, ?> get(@Nonnull final Type returnType, @Nonnull final Annotation[] annotations, @Nonnull final Retrofit retrofit) {
        if (getRawType(returnType) != CompletableFuture.class) {
            return null;
        }
        if (!(returnType instanceof ParameterizedType)) {
            throw new IllegalStateException("CompletableFuture return type must be parameterized as"
                    + " CompletableFuture<Foo> or CompletableFuture<? extends Foo>");
        }
        final Type innerType = getParameterUpperBound(0, (ParameterizedType) returnType);
        return new CompletableFutureBasedCallAdapter<>(new ApiResponseType(innerType), retry, logger);
    }

    static final class ApiResponseType implements ParameterizedType {

        private final Type innerType;

        private ApiResponseType(final Type innerType) {
            this.innerType = innerType;
        }

        @Override public Type[] getActualTypeArguments() {
            return new Type[]{innerType};
        }

        @Override public Type getRawType() {
            return ApiResponse.class;
        }

        @Override public Type getOwnerType() {
            return Object.class;
        }

    }

}


text:
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1 = require('@angular/core');
var Subject_1 = require('rxjs/Subject');
var PostmanService = (function () {
    function PostmanService() {
        this.searchParamSource = new Subject_1.Subject();
        this.searchParam$ = this.searchParamSource.asObservable();
    }
    PostmanService.prototype.sendSearchParam = function (searchParameter) {
        this.searchParamSource.next(searchParameter);
        //this.searchParamSource.complete();
        // DO NOT send complete() right below next() noob !!!!!!
        // SINGLE SERVICE INSTANCE !! REMEMBER
    };
    PostmanService.prototype.getSearchParam = function () {
        return this.searchParam$;
    };
    PostmanService = __decorate([
        core_1.Injectable(),
        __metadata('design:paramtypes', [])
    ], PostmanService);
    return PostmanService;
}());
exports.PostmanService = PostmanService;
//# sourceMappingURL=postman.service.js.map


text:
package com.google.schemaorg.core;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Multimap;
import com.google.schemaorg.SchemaOrgType;
import com.google.schemaorg.SchemaOrgTypeImpl;
import com.google.schemaorg.ValueType;
import com.google.schemaorg.core.datatype.Text;
import com.google.schemaorg.core.datatype.URL;
import com.google.schemaorg.goog.GoogConstants;
import com.google.schemaorg.goog.PopularityScoreSpecification;

/** Implementation of {@link MedicalTrial}. */
public class MedicalTrialImpl extends MedicalStudyImpl implements MedicalTrial {
  private static final ImmutableSet<String> PROPERTY_SET = initializePropertySet();

  private static ImmutableSet<String> initializePropertySet() {
    ImmutableSet.Builder<String> builder = ImmutableSet.builder();

    builder.add(CoreConstants.PROPERTY_ADDITIONAL_TYPE);

    builder.add(CoreConstants.PROPERTY_ALTERNATE_NAME);

    builder.add(CoreConstants.PROPERTY_CODE);

    builder.add(CoreConstants.PROPERTY_DESCRIPTION);

    builder.add(CoreConstants.PROPERTY_GUIDELINE);

    builder.add(CoreConstants.PROPERTY_IMAGE);

    builder.add(CoreConstants.PROPERTY_MAIN_ENTITY_OF_PAGE);

    builder.add(CoreConstants.PROPERTY_MEDICINE_SYSTEM);

    builder.add(CoreConstants.PROPERTY_NAME);

    builder.add(CoreConstants.PROPERTY_OUTCOME);

    builder.add(CoreConstants.PROPERTY_PHASE);

    builder.add(CoreConstants.PROPERTY_POPULATION);

    builder.add(CoreConstants.PROPERTY_POTENTIAL_ACTION);

    builder.add(CoreConstants.PROPERTY_RECOGNIZING_AUTHORITY);

    builder.add(CoreConstants.PROPERTY_RELEVANT_SPECIALTY);

    builder.add(CoreConstants.PROPERTY_SAME_AS);

    builder.add(CoreConstants.PROPERTY_SPONSOR);

    builder.add(CoreConstants.PROPERTY_STATUS);

    builder.add(CoreConstants.PROPERTY_STUDY);

    builder.add(CoreConstants.PROPERTY_STUDY_LOCATION);

    builder.add(CoreConstants.PROPERTY_STUDY_SUBJECT);

    builder.add(CoreConstants.PROPERTY_TRIAL_DESIGN);

    builder.add(CoreConstants.PROPERTY_URL);

    builder.add(GoogConstants.PROPERTY_DETAILED_DESCRIPTION);

    builder.add(GoogConstants.PROPERTY_POPULARITY_SCORE);

    return builder.build();
  }

  static final class BuilderImpl extends SchemaOrgTypeImpl.BuilderImpl<MedicalTrial.Builder>
      implements MedicalTrial.Builder {

    @Override
    public MedicalTrial.Builder addAdditionalType(URL value) {
      return addProperty(CoreConstants.PROPERTY_ADDITIONAL_TYPE, value);
    }

    @Override
    public MedicalTrial.Builder addAdditionalType(String value) {
      return addProperty(CoreConstants.PROPERTY_ADDITIONAL_TYPE, Text.of(value));
    }

    @Override
    public MedicalTrial.Builder addAlternateName(Text value) {
      return addProperty(CoreConstants.PROPERTY_ALTERNATE_NAME, value);
    }

    @Override
    public MedicalTrial.Builder addAlternateName(String value) {
      return addProperty(CoreConstants.PROPERTY_ALTERNATE_NAME, Text.of(value));
    }

    @Override
    public MedicalTrial.Builder addCode(MedicalCode value) {
      return addProperty(CoreConstants.PROPERTY_CODE, value);
    }

    @Override
    public MedicalTrial.Builder addCode(MedicalCode.Builder value) {
      return addProperty(CoreConstants.PROPERTY_CODE, value.build());
    }

    @Override
    public MedicalTrial.Builder addCode(String value) {
      return addProperty(CoreConstants.PROPERTY_CODE, Text.of(value));
    }

    @Override
    public MedicalTrial.Builder addDescription(Text value) {
      return addProperty(CoreConstants.PROPERTY_DESCRIPTION, value);
    }

    @Override
    public MedicalTrial.Builder addDescription(String value) {
      return addProperty(CoreConstants.PROPERTY_DESCRIPTION, Text.of(value));
    }

    @Override
    public MedicalTrial.Builder addGuideline(MedicalGuideline value) {
      return addProperty(CoreConstants.PROPERTY_GUIDELINE, value);
    }

    @Override
    public MedicalTrial.Builder addGuideline(MedicalGuideline.Builder value) {
      return addProperty(CoreConstants.PROPERTY_GUIDELINE, value.build());
    }

    @Override
    public MedicalTrial.Builder addGuideline(String value) {
      return addProperty(CoreConstants.PROPERTY_GUIDELINE, Text.of(value));
    }

    @Override
    public MedicalTrial.Builder addImage(ImageObject value) {
      return addProperty(CoreConstants.PROPERTY_IMAGE, value);
    }

    @Override
    public MedicalTrial.Builder addImage(ImageObject.Builder value) {
      return addProperty(CoreConstants.PROPERTY_IMAGE, value.build());
    }

    @Override
    public MedicalTrial.Builder addImage(URL value) {
      return addProperty(CoreConstants.PROPERTY_IMAGE, value);
    }

    @Override
    public MedicalTrial.Builder addImage(String value) {
      return addProperty(CoreConstants.PROPERTY_IMAGE, Text.of(value));
    }

    @Override
    public MedicalTrial.Builder addMainEntityOfPage(CreativeWork value) {
      return addProperty(CoreConstants.PROPERTY_MAIN_ENTITY_OF_PAGE, value);
    }

    @Override
    public MedicalTrial.Builder addMainEntityOfPage(CreativeWork.Builder value) {
      return addProperty(CoreConstants.PROPERTY_MAIN_ENTITY_OF_PAGE, value.build());
    }

    @Override
    public MedicalTrial.Builder addMainEntityOfPage(URL value) {
      return addProperty(CoreConstants.PROPERTY_MAIN_ENTITY_OF_PAGE, value);
    }

    @Override
    public MedicalTrial.Builder addMainEntityOfPage(String value) {
      return addProperty(CoreConstants.PROPERTY_MAIN_ENTITY_OF_PAGE, Text.of(value));
    }

    @Override
    public MedicalTrial.Builder addMedicineSystem(MedicineSystem value) {
      return addProperty(CoreConstants.PROPERTY_MEDICINE_SYSTEM, value);
    }

    @Override
    public MedicalTrial.Builder addMedicineSystem(String value) {
      return addProperty(CoreConstants.PROPERTY_MEDICINE_SYSTEM, Text.of(value));
    }

    @Override
    public MedicalTrial.Builder addName(Text value) {
      return addProperty(CoreConstants.PROPERTY_NAME, value);
    }

    @Override
    public MedicalTrial.Builder addName(String value) {
      return addProperty(CoreConstants.PROPERTY_NAME, Text.of(value));
    }

    @Override
    public MedicalTrial.Builder addOutcome(Text value) {
      return addProperty(CoreConstants.PROPERTY_OUTCOME, value);
    }

    @Override
    public MedicalTrial.Builder addOutcome(String value) {
      return addProperty(CoreConstants.PROPERTY_OUTCOME, Text.of(value));
    }

    @Override
    public MedicalTrial.Builder addPhase(Text value) {
      return addProperty(CoreConstants.PROPERTY_PHASE, value);
    }

    @Override
    public MedicalTrial.Builder addPhase(String value) {
      return addProperty(CoreConstants.PROPERTY_PHASE, Text.of(value));
    }

    @Override
    public MedicalTrial.Builder addPopulation(Text value) {
      return addProperty(CoreConstants.PROPERTY_POPULATION, value);
    }

    @Override
    public MedicalTrial.Builder addPopulation(String value) {
      return addProperty(CoreConstants.PROPERTY_POPULATION, Text.of(value));
    }

    @Override
    public MedicalTrial.Builder addPotentialAction(Action value) {
      return addProperty(CoreConstants.PROPERTY_POTENTIAL_ACTION, value);
    }

    @Override
    public MedicalTrial.Builder addPotentialAction(Action.Builder value) {
      return addProperty(CoreConstants.PROPERTY_POTENTIAL_ACTION, value.build());
    }

    @Override
    public MedicalTrial.Builder addPotentialAction(String value) {
      return addProperty(CoreConstants.PROPERTY_POTENTIAL_ACTION, Text.of(value));
    }

    @Override
    public MedicalTrial.Builder addRecognizingAuthority(Organization value) {
      return addProperty(CoreConstants.PROPERTY_RECOGNIZING_AUTHORITY, value);
    }

    @Override
    public MedicalTrial.Builder addRecognizingAuthority(Organization.Builder value) {
      return addProperty(CoreConstants.PROPERTY_RECOGNIZING_AUTHORITY, value.build());
    }

    @Override
    public MedicalTrial.Builder addRecognizingAuthority(String value) {
      return addProperty(CoreConstants.PROPERTY_RECOGNIZING_AUTHORITY, Text.of(value));
    }

    @Override
    public MedicalTrial.Builder addRelevantSpecialty(MedicalSpecialty value) {
      return addProperty(CoreConstants.PROPERTY_RELEVANT_SPECIALTY, value);
    }

    @Override
    public MedicalTrial.Builder addRelevantSpecialty(String value) {
      return addProperty(CoreConstants.PROPERTY_RELEVANT_SPECIALTY, Text.of(value));
    }

    @Override
    public MedicalTrial.Builder addSameAs(URL value) {
      return addProperty(CoreConstants.PROPERTY_SAME_AS, value);
    }

    @Override
    public MedicalTrial.Builder addSameAs(String value) {
      return addProperty(CoreConstants.PROPERTY_SAME_AS, Text.of(value));
    }

    @Override
    public MedicalTrial.Builder addSponsor(Organization value) {
      return addProperty(CoreConstants.PROPERTY_SPONSOR, value);
    }

    @Override
    public MedicalTrial.Builder addSponsor(Organization.Builder value) {
      return addProperty(CoreConstants.PROPERTY_SPONSOR, value.build());
    }

    @Override
    public MedicalTrial.Builder addSponsor(String value) {
      return addProperty(CoreConstants.PROPERTY_SPONSOR, Text.of(value));
    }

    @Override
    public MedicalTrial.Builder addStatus(MedicalStudyStatus value) {
      return addProperty(CoreConstants.PROPERTY_STATUS, value);
    }

    @Override
    public MedicalTrial.Builder addStatus(String value) {
      return addProperty(CoreConstants.PROPERTY_STATUS, Text.of(value));
    }

    @Override
    public MedicalTrial.Builder addStudy(MedicalStudy value) {
      return addProperty(CoreConstants.PROPERTY_STUDY, value);
    }

    @Override
    public MedicalTrial.Builder addStudy(MedicalStudy.Builder value) {
      return addProperty(CoreConstants.PROPERTY_STUDY, value.build());
    }

    @Override
    public MedicalTrial.Builder addStudy(String value) {
      return addProperty(CoreConstants.PROPERTY_STUDY, Text.of(value));
    }

    @Override
    public MedicalTrial.Builder addStudyLocation(AdministrativeArea value) {
      return addProperty(CoreConstants.PROPERTY_STUDY_LOCATION, value);
    }

    @Override
    public MedicalTrial.Builder addStudyLocation(AdministrativeArea.Builder value) {
      return addProperty(CoreConstants.PROPERTY_STUDY_LOCATION, value.build());
    }

    @Override
    public MedicalTrial.Builder addStudyLocation(String value) {
      return addProperty(CoreConstants.PROPERTY_STUDY_LOCATION, Text.of(value));
    }

    @Override
    public MedicalTrial.Builder addStudySubject(MedicalEntity value) {
      return addProperty(CoreConstants.PROPERTY_STUDY_SUBJECT, value);
    }

    @Override
    public MedicalTrial.Builder addStudySubject(MedicalEntity.Builder value) {
      return addProperty(CoreConstants.PROPERTY_STUDY_SUBJECT, value.build());
    }

    @Override
    public MedicalTrial.Builder addStudySubject(String value) {
      return addProperty(CoreConstants.PROPERTY_STUDY_SUBJECT, Text.of(value));
    }

    @Override
    public MedicalTrial.Builder addTrialDesign(MedicalTrialDesign value) {
      return addProperty(CoreConstants.PROPERTY_TRIAL_DESIGN, value);
    }

    @Override
    public MedicalTrial.Builder addTrialDesign(String value) {
      return addProperty(CoreConstants.PROPERTY_TRIAL_DESIGN, Text.of(value));
    }

    @Override
    public MedicalTrial.Builder addUrl(URL value) {
      return addProperty(CoreConstants.PROPERTY_URL, value);
    }

    @Override
    public MedicalTrial.Builder addUrl(String value) {
      return addProperty(CoreConstants.PROPERTY_URL, Text.of(value));
    }

    @Override
    public MedicalTrial.Builder addDetailedDescription(Article value) {
      return addProperty(GoogConstants.PROPERTY_DETAILED_DESCRIPTION, value);
    }

    @Override
    public MedicalTrial.Builder addDetailedDescription(Article.Builder value) {
      return addProperty(GoogConstants.PROPERTY_DETAILED_DESCRIPTION, value.build());
    }

    @Override
    public MedicalTrial.Builder addDetailedDescription(String value) {
      return addProperty(GoogConstants.PROPERTY_DETAILED_DESCRIPTION, Text.of(value));
    }

    @Override
    public MedicalTrial.Builder addPopularityScore(PopularityScoreSpecification value) {
      return addProperty(GoogConstants.PROPERTY_POPULARITY_SCORE, value);
    }

    @Override
    public MedicalTrial.Builder addPopularityScore(PopularityScoreSpecification.Builder value) {
      return addProperty(GoogConstants.PROPERTY_POPULARITY_SCORE, value.build());
    }

    @Override
    public MedicalTrial.Builder addPopularityScore(String value) {
      return addProperty(GoogConstants.PROPERTY_POPULARITY_SCORE, Text.of(value));
    }

    @Override
    public MedicalTrial build() {
      return new MedicalTrialImpl(properties, reverseMap);
    }
  }

  public MedicalTrialImpl(
      Multimap<String, ValueType> properties, Multimap<String, Thing> reverseMap) {
    super(properties, reverseMap);
  }

  @Override
  public String getFullTypeName() {
    return CoreConstants.TYPE_MEDICAL_TRIAL;
  }

  @Override
  public boolean includesProperty(String property) {
    return PROPERTY_SET.contains(CoreConstants.NAMESPACE + property)
        || PROPERTY_SET.contains(GoogConstants.NAMESPACE + property)
        || PROPERTY_SET.contains(property);
  }

  @Override
  public ImmutableList<SchemaOrgType> getPhaseList() {
    return getProperty(CoreConstants.PROPERTY_PHASE);
  }

  @Override
  public ImmutableList<SchemaOrgType> getTrialDesignList() {
    return getProperty(CoreConstants.PROPERTY_TRIAL_DESIGN);
  }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:padding="16dp"
    tools:context="name.seguri.android.getforegroundactivity.MainActivity">

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/usage"/>

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="8dp"
        android:onClick="onClick"
        android:text="@string/open_accessibility_settings"/>

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:text="@string/usage2"/>

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:text="@string/usage3"/>

    <EditText
        android:id="@+id/editPackageName"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="@string/hint_package"
        android:text="@string/example_package"/>

    <EditText
        android:id="@+id/editClassName"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="@string/hint_class"
        android:text="@string/example_class"/>

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="8dp"
        android:onClick="onNewIntent"
        android:text="@string/launch"/>

</LinearLayout>


text:
extern I2C_HandleTypeDef I2cHandle_X;
extern I2C_HandleTypeDef I2cHandle_Y;
extern const mp_obj_type_t pyb_i2c_type;

void i2c_init(void);
void i2c_start(I2C_HandleTypeDef *i2c_handle);


text:
import unittest
import os
import mock
import handler as sut

class fakeAddress():
    def __init__(self, uri, *args, headers=None, allow_redirects=False):
        return

    @property
    def status_code(self):
        return 200

    def json(self):
        return {
            "stateOrRegion" : "",
            "city" : "Glasgow",
            "countryCode" : "UK",
            "postalCode" : "",
            "addressLine1" : "",
            "addressLine2" : "",
            "addressLine3" : "",
            "districtOrCounty" : ""
        }

class fakeLocation():
    @property
    def latitude(self):
        return 55.8642

    @property
    def longitude(self):
        return -4.2518

class TestHomeRequestIntentHandler(unittest.TestCase):
    @mock.patch.object(sut.Pollen, 'pollencount', "Awful")
    @mock.patch.object(sut.Nominatim, 'geocode', lambda self, city: fakeLocation())
    @mock.patch.object(sut.requests, 'get', fakeAddress)
    def setUp(self):
        os.environ['SKILL_ID'] = "TEST_SKILL_ID"
        self.context = {
        }
        self.event = {
            'session': {
                'sessionId': 'unittest',
                'application': {
                    'applicationId': "TEST_SKILL_ID"
                }
            },
            'request': {
                'requestId': 'test-homerequest',
                'type': 'IntentRequest',
                'intent': {
                    'name': 'HomeRequestIntent'
                }
            },
            'context': {
                'System': {
                    'user': {
                        'permissions': {
                            'consentToken': 'TEST_CONSENT_TOKEN'
                        },
                    },
                    'device': {
                        'deviceId': 'TEST_DEVICE_ID'
                    },
                    'apiEndpoint': 'https://api.eu.amazonalexa.com'
                }
            }
        }
        self.result = sut.lambda_handler(self.event, self.context)

    def testOutputSpeech(self):
        self.assertEqual(
            self.result['response']['outputSpeech'],
            {
                'text': "Today in Glasgow, the Pollen Count is Awful",
                'type': "PlainText"})

    def testCard(self):
        self.assertEqual(
            self.result['response']['card'],
            {
                'title': "Pollen Count",
                'content': "Today in Glasgow, the Pollen Count is Awful",
                'type': "Simple"})

    def testShouldEndSession(self):
        self.assertTrue(self.result['response']['shouldEndSession'])

    def testResponse(self):
        self.assertEqual(self.result['sessionAttributes'], {})
        self.assertEqual(self.result['version'], "1.0")

if __name__ == "__main__":
    unittest.main()


text:
package org.ovirt.engine.core.common.action;

import org.ovirt.engine.core.compat.*;
import org.ovirt.engine.core.common.businessentities.*;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;

import org.ovirt.engine.core.common.queries.*;

@XmlAccessorType(XmlAccessType.NONE)
@XmlType(name = "AddImageFromImportParameters")
public class AddImageFromImportParameters extends AddImageFromScratchParameters {
    private static final long serialVersionUID = 4373704503946067322L;
    // C# TO JAVA CONVERTER TODO TASK: Java annotations will not correspond to
    // .NET attributes:
    @XmlElement(name = "CandidateID")
    private String privateCandidateID;

    public String getCandidateID() {
        return privateCandidateID;
    }

    private void setCandidateID(String value) {
        privateCandidateID = value;
    }

    @XmlElement(name = "Path")
    private String privatePath;

    public String getPath() {
        return privatePath;
    }

    private void setPath(String value) {
        privatePath = value;
    }

    @XmlElement(name = "Source")
    private ImportCandidateSourceEnum privateSource = ImportCandidateSourceEnum.forValue(0);

    public ImportCandidateSourceEnum getSource() {
        return privateSource;
    }

    private void setSource(ImportCandidateSourceEnum value) {
        privateSource = value;
    }

    @XmlElement(name = "Force")
    private boolean privateForce;

    public boolean getForce() {
        return privateForce;
    }

    private void setForce(boolean value) {
        privateForce = value;
    }

    public AddImageFromImportParameters(Guid imageId, Guid vmTemplateId, DiskImageBase diskInfo, String candidateID,
            String path, ImportCandidateSourceEnum source, boolean force) {
        super(imageId, vmTemplateId, diskInfo);
        setCandidateID(candidateID);
        setPath(path);
        setSource(source);
        setForce(force);
    }

    public AddImageFromImportParameters() {
    }
}


text:
.class final Lcom/android/internal/telephony/cat/Tone$1;
.super Ljava/lang/Object;
.source "Tone.java"

# interfaces
.implements Landroid/os/Parcelable$Creator;

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/android/internal/telephony/cat/Tone;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = null
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Ljava/lang/Object;",
        "Landroid/os/Parcelable$Creator",
        "<",
        "Lcom/android/internal/telephony/cat/Tone;",
        ">;"
    }
.end annotation

# direct methods
.method constructor <init>()V
    .locals 0

    .prologue
    .line 181
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

# virtual methods
.method public createFromParcel(Landroid/os/Parcel;)Lcom/android/internal/telephony/cat/Tone;
    .locals 2
    .parameter "in"

    .prologue
    .line 183
    invoke-static {}, Lcom/android/internal/telephony/cat/Tone;->values()[Lcom/android/internal/telephony/cat/Tone;

    move-result-object v0

    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v1

    aget-object v0, v0, v1

    return-object v0
.end method

.method public bridge synthetic createFromParcel(Landroid/os/Parcel;)Ljava/lang/Object;
    .locals 1
    .parameter "x0"

    .prologue
    .line 181
    invoke-virtual {p0, p1}, Lcom/android/internal/telephony/cat/Tone$1;->createFromParcel(Landroid/os/Parcel;)Lcom/android/internal/telephony/cat/Tone;

    move-result-object v0

    return-object v0
.end method

.method public newArray(I)[Lcom/android/internal/telephony/cat/Tone;
    .locals 1
    .parameter "size"

    .prologue
    .line 187
    new-array v0, p1, [Lcom/android/internal/telephony/cat/Tone;

    return-object v0
.end method

.method public bridge synthetic newArray(I)[Ljava/lang/Object;
    .locals 1
    .parameter "x0"

    .prologue
    .line 181
    invoke-virtual {p0, p1}, Lcom/android/internal/telephony/cat/Tone$1;->newArray(I)[Lcom/android/internal/telephony/cat/Tone;

    move-result-object v0

    return-object v0
.end method