text:
package com.lag.altanizio.conceitosdetopografia;

import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Button;

import java.io.File;
import java.net.URISyntaxException;

/**
 * A simple {@link Fragment} subclass.
 */
public class PDFreaderFragm extends Fragment {
    private String pdf;
    private File file;
    private Button button01;

    public PDFreaderFragm() {

    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_pdfreader, container, false);

        button01 = (Button) view.findViewById(R.id.button);

        button01.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                InicioFragm tab5 = new InicioFragm();
            }
        });

        WebView pdfView = (WebView) view.findViewById(R.id.pdfView);
        pdfView.getSettings().setJavaScriptEnabled(true);
        if (pdf!=null) {
            pdfView.loadUrl("http://docs.google.com/gview?embedded=true&url=" + pdf);
        }else {
            try{
            Intent intent = new Intent(Intent.ACTION_VIEW);
            intent.setDataAndType(Uri.fromFile(file),"application/pdf");
            intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                getActivity().startActivity(intent);
            } catch (Exception e) {
                //not an intent uri
            }
        }

            pdfView.setWebViewClient(new WebViewClient() {
                @Override
                public void onPageStarted (WebView view, String url, Bitmap favicon){

                    super.onPageStarted(view, url, favicon);
                   // if (pdf.startsWith("http")) {

                    // }else {
                    //     shouldOverrideUrlLoading(view, url);
                    //  }

                }

                @Override
                public boolean shouldOverrideUrlLoading(WebView webView, String url) {

                    Uri parsedUri = Uri.parse(pdf);
                    PackageManager packageManager = getActivity().getPackageManager();
                    Intent browseIntent = new Intent(Intent.ACTION_VIEW).setData(parsedUri);

                    try {
                        Intent intent = Intent.parseUri(pdf, Intent.URI_INTENT_SCHEME);
                        if (intent.resolveActivity(getActivity().getPackageManager()) != null) {
                            getActivity().startActivity(intent);
                            return true;
                        }
                        //try to find fallback url
                        String fallbackUrl = intent.getStringExtra("browser_fallback_url");
                        if (fallbackUrl != null) {
                            webView.loadUrl(fallbackUrl);
                            return true;
                        }
                        //invite to install
                        Intent marketIntent = new Intent(Intent.ACTION_VIEW).setData(
                                Uri.parse("market://details?id=" + intent.getPackage()));
                        if (marketIntent.resolveActivity(packageManager) != null) {
                            getActivity().startActivity(marketIntent);
                            return true;
                        }
                    } catch (URISyntaxException e) {
                        //not an intent uri
                    }

                    return true;//do nothing in other cases

                }
            });

        return view;
    }

    @Override
    public void onStop() {
        super.onStop();
        Runtime.getRuntime().gc();
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        Runtime.getRuntime().gc();
    }

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

}


text:
package org.apache.flink.configuration.description;

import org.junit.Test;

import static org.apache.flink.configuration.description.LinkElement.link;
import static org.apache.flink.configuration.description.TextElement.text;
import static org.junit.Assert.assertEquals;

/** Tests for {@link Description} and formatting with {@link HtmlFormatter}. */
public class DescriptionHtmlTest {
    @Test
    public void testDescriptionWithLink() {
        Description description =
                Description.builder()
                        .text("This is a text with a link %s", link("https://somepage", "to here"))
                        .build();

        String formattedDescription = new HtmlFormatter().format(description);

        assertEquals(
                "This is a text with a link " + "to here",
                formattedDescription);
    }

    @Test
    public void testDescriptionWithPercents() {
        Description description =
                Description.builder()
                        .text("This is a text that has some percentage value of 20%.")
                        .build();

        String formattedDescription = new HtmlFormatter().format(description);

        assertEquals("This is a text that has some percentage value of 20%.", formattedDescription);
    }

    @Test
    public void testDescriptionWithMultipleLinks() {
        Description description =
                Description.builder()
                        .text(
                                "This is a text with a link %s and another %s",
                                link("https://somepage", "to here"), link("https://link"))
                        .build();

        String formattedDescription = new HtmlFormatter().format(description);

        assertEquals(
                "This is a text with a link to here and another "
                        + "https://link",
                formattedDescription);
    }

    @Test
    public void testDescriptionWithList() {
        Description description =
                Description.builder()
                        .text("This is some list: ")
                        .list(
                                link("http://first_link"),
                                text(
                                        "this is second element of list with a %s",
                                        link("https://link")))
                        .build();

        String formattedDescription = new HtmlFormatter().format(description);

        assertEquals(
                "This is some list:

http://first_link"
                        + "

this is second element of list "
                        + "with a https://link

",
                formattedDescription);
    }

    @Test
    public void testDescriptionWithLineBreak() {
        Description description =
                Description.builder()
                        .text("This is first line.")
                        .linebreak()
                        .text("This is second line.")
                        .build();

        String formattedDescription = new HtmlFormatter().format(description);

        assertEquals("This is first line.
This is second line.", formattedDescription);
    }

    @Test
    public void testDescriptionWithListAndEscaping() {
        Description description =
                Description.builder()
                        .text("This is some list: ")
                        .list(text("this is first element with illegal character '>' and '<'"))
                        .build();

        String formattedDescription = new HtmlFormatter().format(description);

        assertEquals(
                "This is some list:

this is first element with illegal character '>' and '<'

",
                formattedDescription);
    }
}

redpajama_set_name: RedPajamaGithub


text:
export function requireDefined (ref, message) {
  if (name === undefined) {
    throw new Error(message)
  }
  return ref
}

export default {
  requireDefined (ref, message) {
    if (ref === undefined) {
      throw new Error(message)
    }
    return ref
  },
  requireDate (date, message) {
    if (!(date instanceof Date)) {
      throw new Error(message)
    }
    return date
  }
}


text:
var get = Ember.get, set = Ember.set;

/**
  Child sessions are useful to keep changes isolated
  from parent sessions until flush time.
*/
Ep.ChildSession = Ep.Session.extend({

  fetch: function(model) {
    var res = this._super(model);
    if(!res) {
      res = get(this, 'parent').fetch(model);
      if(res) {
        res = this.adopt(res.copy());

        // Unlike hasMany's, belongsTo do not lookup on the
        // session during property access. Therefore, we need
        // to adopt manually.
        res.eachRelationship(function(name, relationship) {
          if(relationship.kind === 'belongsTo') {
            var child = get(res, name);
            if(child) {
              set(child, 'session', this);
            }
          }
        }, this);
      }
    }
    return res;
  },

  load: function(type, id) {
    if(typeof type === "string") {
      type = this.lookupType(type);
    }
    // always coerce to string
    id = id.toString();

    var cached = this.getForId(type, id);
    if(cached && get(cached, 'isLoaded')) {
      return Ep.resolveModel(cached);
    }

    // load and resolve immediately if the parent already has it loaded
    var parentModel = get(this, 'parent').getForId(type, id);
    if(parentModel && get(parentModel, 'isLoaded')) {
      return Ep.resolveModel(this.merge(parentModel));
    }

    var session = this;
    return Ep.resolveModel(this.parent.load(type, id).then(function(model) {
      return session.merge(model);
    }, function(model) {
      throw session.merge(model);
    }), type, id, session);
  },

  query: function(type, query) {
    var session = this;
    return this.parent.query(type, query).then(function(models) {
      // TODO: model array could automatically add to session?
      var merged = Ep.ModelArray.create({session: session, content: []});
      set(merged, 'meta', get(models, 'meta'));
      models.forEach(function(model) {
        merged.pushObject(session.merge(model));
      });
      return merged;
    });
  },

  refresh: function(model) {
    var session = this;
    return this.parent.refresh(model).then(function(refreshedModel) {
      return session.merge(refreshedModel);
    }, function(refreshedModel) {
      throw session.merge(refreshedModel);
    });
  },

  flush: function() {
    var session = this,
        dirtyModels = get(this, 'dirtyModels'),
        shadows = get(this, 'shadows'),
        parent = this.parent;

    // flush all local updates to the parent session
    var dirty = get(this, 'dirtyModels');

    // TODO: merge in latest from parent first? (essentially making this a rebase)
    dirty.forEach(function(model) {
      // update the values of a corresponding model in the parent session
      // if a corresponding model doesn't exist, its added to the parent session
      parent.update(model);
    });

    // TODO: how do we isolate this flush to *only* child models
    var promise = parent.flush().then(function(models) {
      var res = models.map(function(model) {
        return session.merge(model);
      });
      return res;
    }, function(models) {
      var res = models.map(function(model) {
        return session.merge(model);
      });
      throw res;
    });

    // update shadows with current models
    dirtyModels.forEach(function(model) {
      this.shadows.add(model.copy());
    }, this);

    return promise;
  },

  reifyClientId: function(model) {
    return this.parent.reifyClientId(model);
  },

  getForId: function(type, id) {
    var adapter = get(this.parent, 'adapter');
    var clientId = adapter.getClientId(type, id);
    return this.models.getForClientId(clientId);
  },

  remoteCall: function(context, name) {
    var session = this;
    return this.parent.remoteCall.apply(this.parent, arguments).then(function(model) {
      return session.merge(model);
    }, function(model) {
      throw session.merge(model);
    });
  }

});


text:
using droid.Runtime.Managers;
using droid.Runtime.Messaging.Messages;
using UnityEditor;
using UnityEngine;

namespace droid.Editor.Windows {
  /// <summary>
  ///
  /// </summary>
  public class SimulationWindow : EditorWindow {
    /// <summary>
    ///
    /// </summary>
    [MenuItem(EditorWindowMenuPath._WindowMenuPath + "SimulationWindow")]
    [MenuItem(EditorWindowMenuPath._ToolMenuPath + "SimulationWindow")]
    public static void ShowWindow() {
      GetWindow(typeof(SimulationWindow)); //Show existing window instance. If one doesn't exist, make one.
      //window.Show();
    }

    Texture _icon;
    NeodroidManager _simulation_manager;

    /// <summary>
    /// </summary>
    void OnEnable() {
      this._icon =
          (Texture2D)AssetDatabase.LoadAssetAtPath(NeodroidSettings.Current.NeodroidImportLocationProp
                                                   + "Gizmos/Icons/clock.png",
                                                   typeof(Texture2D));
      this.titleContent = new GUIContent("Neo:Sim", this._icon, "Window for controlling simulation");
    }

    void OnFocus() { this.Setup(); }

    void Setup() {
      var serialised_object = new SerializedObject(this);
      if (this._simulation_manager == null) {
        this._simulation_manager = FindObjectOfType<NeodroidManager>();
      }

      serialised_object.ApplyModifiedProperties();
    }

    void OnGUI() {
      EditorGUILayout.ObjectField(this._simulation_manager, typeof(AbstractNeodroidManager), true);
      EditorGUI.BeginDisabledGroup(!Application.isPlaying);

      if (GUILayout.Button("Step")) {
        this._simulation_manager?.SendToEnvironments(new[] {
                                                               new
                                                                   Reaction(new
                                                                                ReactionParameters(StepResetObserve
                                                                                .Step_,
                                                                                true,
                                                                                configure :
                                                                                true),
                                                                            null,
                                                                            null,
                                                                            null,
                                                                            null,
                                                                            "")
                                                           });
      }

      if (GUILayout.Button("Reset")) {
        this._simulation_manager?.ResetAllEnvironments();
      }

      if (this._simulation_manager) {
        this._simulation_manager.TestActuators =
            EditorGUILayout.Toggle("Test Actuators", this._simulation_manager.TestActuators);
      }

      EditorGUI.EndDisabledGroup();
    }
  }
}


text:
var mongoose = require('mongoose');
var loggedIn = require('../middleware/loggedIn');
var BlogPost = mongoose.model('BlogPost');

module.exports = function (app) {
    app.get("/post/create", loggedIn, function (req, res) {
        res.render('post/create.jade');
    });

    app.post("/post/create", loggedIn, function (req, res, next) {
        var body = req.param('body');
        var title = req.param('title');
        var user = req.session.user;

        BlogPost.create({
            body: body,
            title: title,
            author: user
        }, function (err, post) {
            if (err) return next(err);
            res.redirect('/post/' + post.id);
        });
    });

    //read
    console.log("Registering /post/:id route");
    app.get("/post/:id", function (req, res, next) {
        var id = req.param('id');
        console.log('Showing post with id %s', id);
        var query = BlogPost.findById(id);

        query.populate('author');

        query.exec(function (err, post) {
            if(err) return next(err);

            if(!post) return next();//404

            res.render('post/view.jade', {post:post});
        });
    });

    //remove
    app.get('/post/remove/:id', loggedIn, function (req, res, next) {
        var id = req.param('id');

        BlogPost.findOne({_id:id}, function(err, post) {
            if(err) next(err);

            if(post.author != req.session.user) {
                return res.status(403);
            }

            post.remove(function(err) {
                if(err) next(err);

                res.redirect('/');
            })
        })
    });

    //update
    app.get('/post/edit/:id', function(req, res, next) {
        var post = BlogPost.findById({_id: req.param('id')});
        res.render('post/crate.jade', {post:post});
    });
};


text:
require 'test_helper'

module Workflow
  class InstitutionsControllerTest < ActionController::TestCase
    setup do
      @institution = institutions(:one)
    end

    test "should get index" do
      get :index
      assert_response :success
      assert_not_nil assigns(:institutions)
    end

    test "should get new" do
      get :new
      assert_response :success
    end

    test "should create institution" do
      assert_difference('Institution.count') do
        post :create, institution: { acronym: @institution.acronym, active: @institution.active, address: @institution.address, city: @institution.city, cnpj: @institution.cnpj, description: @institution.description, name: @institution.name }
      end

      assert_redirected_to institution_path(assigns(:institution))
    end

    test "should show institution" do
      get :show, id: @institution
      assert_response :success
    end

    test "should get edit" do
      get :edit, id: @institution
      assert_response :success
    end

    test "should update institution" do
      patch :update, id: @institution, institution: { acronym: @institution.acronym, active: @institution.active, address: @institution.address, city: @institution.city, cnpj: @institution.cnpj, description: @institution.description, name: @institution.name }
      assert_redirected_to institution_path(assigns(:institution))
    end

    test "should destroy institution" do
      assert_difference('Institution.count', -1) do
        delete :destroy, id: @institution
      end

      assert_redirected_to institutions_path
    end
  end
end


text:
<?php

defined('_JEXEC') or die;

/**
 * Redirect link list controller class.
 *
 * @package     Joomla.Administrator
 * @subpackage  com_redirect
 * @since       1.6
 */
class RedirectControllerLinks extends JControllerAdmin
{
	/**
	 * Method to update a record.
	 * @since   1.6
	 */
	public function activate()
	{
		// Check for request forgeries.
		JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));

		$ids     = $this->input->get('cid', array(), 'array');
		$newUrl  = $this->input->getString('new_url');
		$comment = $this->input->getString('comment');

		if (empty($ids))
		{
			JError::raiseWarning(500, JText::_('COM_REDIRECT_NO_ITEM_SELECTED'));
		}
		else
		{
			// Get the model.
			$model = $this->getModel();

			JArrayHelper::toInteger($ids);

			// Remove the items.
			if (!$model->activate($ids, $newUrl, $comment))
			{
				JError::raiseWarning(500, $model->getError());
			}
			else {
				$this->setMessage(JText::plural('COM_REDIRECT_N_LINKS_UPDATED', count($ids)));
			}
		}

		$this->setRedirect('index.php?option=com_redirect&view=links');
	}

	/**
	 * Proxy for getModel.
	 * @since   1.6
	 */
	public function getModel($name = 'Link', $prefix = 'RedirectModel', $config = array('ignore_request' => true))
	{
		$model = parent::getModel($name, $prefix, $config);

		return $model;
	}
}


text:
import java.util.NoSuchElementException;
import java.util.Scanner;

public class Queue {
    private interface Qnode {
        String first();
        Qnode rest();
    }
    private Qnode items;
    private Qnode end;

    public Queue() {
        items = null;
        end = null;
    }

    public synchronized String tryTake() {
        if(items == null)
            throw new NoSuchElementException();
        String ret = items.first();
        items = items.rest();
        return ret;
    }

    public synchronized String take() {
        while(items == null) {
            try {
                wait();
            } catch (InterruptedException e) {}
        }
        String ret = items.first();
        items = items.rest();
        return ret;
    }

    public synchronized void put(String s) {
        class ModifiableNode implements Qnode {
            String first;
            Qnode rest = null;

            public ModifiableNode(String first) {
                this.first = first;
            }

            public String first() { return first; }
            public Qnode rest() { return rest; }
        }

        Qnode newEnd = new ModifiableNode(s);
        if(items == null) {
            items = newEnd;
            end = newEnd;
        } else {
            ((ModifiableNode) end).rest = newEnd;
            end = newEnd;
        }

        notifyAll();
    }

    public static void main(String[] args) throws InterruptedException {
        final int c = 10;
        Queue q = new Queue();

        Thread[] consumers = new Thread[c];
        Runnable task = () -> { System.out.println(Thread.currentThread().getName() + q.take()); };
        Runnable task2 = new Runnable() {
            public void run() {
                System.out.println(Thread.currentThread().getName() + q.take());
            }
        };

        for(int i = 0; i < c; ++i)
            consumers[i] = new Thread(task, String.format("Thread %d: ", i));

        Thread producer = new Thread(new Runnable() {
            public void run() {
                for(int i = 0; i < c; ++i) {
                    try {
                        Thread.sleep(100);//(int) (Math.random() * 3000));
                    } catch (InterruptedException e) {}
                    q.put(Integer.toHexString(i));
                }
            }
        });

        for(int i = c - 1; i >= 0; --i)
            consumers[i].start();

        Scanner kb = new Scanner(System.in);
        System.out.println("Waiting to start producer.... type something and hit enter!");
        kb.next();
        producer.start();

        for(int i = 0; i < c; ++i)
            consumers[i].join();

        System.out.println("All consumer threads are done!");
    }
}


text:
const removePlugin = require('../removePlugin');
const Config = require('../../../models/config');

describe('removePlugin', function() {
    const config = Config.createWithValues({
        plugins: ['hello', 'world', '-disabled']
    });

    it('should remove the plugin from the list', function() {
        const newConfig = removePlugin(config, 'hello');

        const testDep = newConfig.getPluginDependency('hello');
        expect(testDep).toNotBeDefined();
    });

    it('should remove the disabled plugin from the list', function() {
        const newConfig = removePlugin(config, 'disabled');

        const testDep = newConfig.getPluginDependency('disabled');
        expect(testDep).toNotBeDefined();
    });

    it('should disable default plugin', function() {
        const newConfig = removePlugin(config, 'search');

        const disabledDep = newConfig.getPluginDependency('search');
        expect(disabledDep).toBeDefined();
        expect(disabledDep.getVersion()).toEqual('*');
        expect(disabledDep.isEnabled()).toBeFalsy();
    });
});


text:
@implementation UserTableViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        _chatIdLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 0, 250, 60)];
        [self addSubview:_chatIdLabel];

        _aLLevel = [[UILabel alloc] initWithFrame:CGRectMake(260, 0, 50, 60)];
        [self addSubview:_aLLevel];
    }
    return self;
}

- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end


text:
@interface LEThemeColor : NSObject

@property int red;
@property int green;
@property int blue;
@property int alpha;

-(id) initWithRed: (int) aRed
            green: (int) aGreen
             blue: (int) aBlue
            alpha: (int) aAlpha;

- (UIColor*) getColor;

@end


text:
import * as React from 'react'
import { TagType } from './utils'

declare namespace Tag {
  interface TagProps extends Omit<React.HTMLProps<Tag>, 'wrap'> {
    children?: React.ReactNode
    type: TagType
    wrap?: boolean
  }
}

declare class Tag extends React.Component<Tag.TagProps> { }
export = Tag


text:
@implementation NSUserDefaults (YCYSafeAccess)

+ (NSString *)ycy_stringForKey:(NSString *)defaultName {
    return [[NSUserDefaults standardUserDefaults] stringForKey:defaultName];
}

+ (NSArray *)ycy_arrayForKey:(NSString *)defaultName {
    return [[NSUserDefaults standardUserDefaults] arrayForKey:defaultName];
}

+ (NSDictionary *)ycy_dictionaryForKey:(NSString *)defaultName {
    return [[NSUserDefaults standardUserDefaults] dictionaryForKey:defaultName];
}

+ (NSData *)ycy_dataForKey:(NSString *)defaultName {
    return [[NSUserDefaults standardUserDefaults] dataForKey:defaultName];
}

+ (NSArray *)ycy_stringArrayForKey:(NSString *)defaultName {
    return [[NSUserDefaults standardUserDefaults] stringArrayForKey:defaultName];
}

+ (NSInteger)ycy_integerForKey:(NSString *)defaultName {
    return [[NSUserDefaults standardUserDefaults] integerForKey:defaultName];
}

+ (float)ycy_floatForKey:(NSString *)defaultName {
    return [[NSUserDefaults standardUserDefaults] floatForKey:defaultName];
}

+ (double)ycy_doubleForKey:(NSString *)defaultName {
    return [[NSUserDefaults standardUserDefaults] doubleForKey:defaultName];
}

+ (BOOL)ycy_boolForKey:(NSString *)defaultName {
    return [[NSUserDefaults standardUserDefaults] boolForKey:defaultName];
}

+ (NSURL *)ycy_URLForKey:(NSString *)defaultName {
    return [[NSUserDefaults standardUserDefaults] URLForKey:defaultName];
}

#pragma mark - WRITE FOR STANDARD

+ (void)ycy_setObject:(id)value forKey:(NSString *)defaultName {
    [[NSUserDefaults standardUserDefaults] setObject:value forKey:defaultName];
    [[NSUserDefaults standardUserDefaults] synchronize];
}

#pragma mark - READ ARCHIVE FOR STANDARD

+ (id)ycy_arcObjectForKey:(NSString *)defaultName {
    return [NSKeyedUnarchiver unarchiveObjectWithData:[[NSUserDefaults standardUserDefaults] objectForKey:defaultName]];
}

#pragma mark - WRITE ARCHIVE FOR STANDARD

+ (void)ycy_setArcObject:(id)value forKey:(NSString *)defaultName {
    [[NSUserDefaults standardUserDefaults] setObject:[NSKeyedArchiver archivedDataWithRootObject:value] forKey:defaultName];
    [[NSUserDefaults standardUserDefaults] synchronize];
}

@end


text:
/**
 * (c) 2013 SAP AG or an SAP affiliate company.  All rights reserved.
 *
 * No part of this publication may be reproduced or transmitted in any form or for any purpose
 * without the express permission of SAP AG.  The information contained herein may be changed
 * without prior notice.
 */
package com.sap.mobile.platform.server.sample.properties;

import org.springframework.beans.factory.InitializingBean;

public class WebSiteBean implements InitializingBean {

	@SuppressWarnings("unused")
	private static final long serialVersionUID = 1L;

	private int port = -1;

	private String protocol;

	private String server;

	private String uri;

	public int getPort() {
		return this.port;
	}

	public void setport(int port) {
		this.port = port;
	}

	public String getServer() {
		return this.server;
	}

	public void setServer(String server) {
		this.server = server;
	}

	public String getProtocol() {
		return this.protocol;
	}

	public void setProtocol(String protocol) {
		this.protocol = protocol;
	}

	public String getUri() {
		return this.uri;
	}

	public void setUri(String uri) {
		this.uri = uri;
	}

	/*
	 * (non-Javadoc)
	 *
	 * @see
	 * org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
	 */
	@Override
	public void afterPropertiesSet() throws Exception {
		if (protocol == null || server == null || port == -1 || uri == null) {
			throw new IllegalArgumentException(
					"The following properties are required; protocol, server, port and uri");
		}
	}

	public void init() {
		StringBuilder url = new StringBuilder();
		url.append(protocol).append("://");
		url.append(server).append(":").append(String.valueOf(port));
		url.append(uri);

		System.out.print("The full URL is: " + url.toString());
	}

}


text:
// flow-typed signature: 205ade5639b3ad6e81a4cbe6b7d11fdc
// flow-typed version: <<STUB>>/boron_v^0.2.3/flow_v0.57.3

/**
 * This is an autogenerated libdef stub for:
 *
 *   'boron'
 *
 * Fill this stub out by replacing all the `any` types.
 *
 * Once filled out, we encourage you to share your work with the
 * community by sending a pull request to:
 * https://github.com/flowtype/flow-typed
 */

declare module 'boron' {
  declare module.exports: any;
}

/**
 * We include stubs for each file inside this npm package in case you need to
 * require those files directly. Feel free to delete any files that aren't
 * needed.
 */
declare module 'boron/Boron' {
  declare module.exports: any;
}

declare module 'boron/DropModal' {
  declare module.exports: any;
}

declare module 'boron/FadeModal' {
  declare module.exports: any;
}

declare module 'boron/FlyModal' {
  declare module.exports: any;
}

declare module 'boron/modalFactory' {
  declare module.exports: any;
}

declare module 'boron/OutlineModal' {
  declare module.exports: any;
}

declare module 'boron/ScaleModal' {
  declare module.exports: any;
}

declare module 'boron/WaveModal' {
  declare module.exports: any;
}

// Filename aliases
declare module 'boron/Boron.js' {
  declare module.exports: $Exports<'boron/Boron'>;
}
declare module 'boron/DropModal.js' {
  declare module.exports: $Exports<'boron/DropModal'>;
}
declare module 'boron/FadeModal.js' {
  declare module.exports: $Exports<'boron/FadeModal'>;
}
declare module 'boron/FlyModal.js' {
  declare module.exports: $Exports<'boron/FlyModal'>;
}
declare module 'boron/modalFactory.js' {
  declare module.exports: $Exports<'boron/modalFactory'>;
}
declare module 'boron/OutlineModal.js' {
  declare module.exports: $Exports<'boron/OutlineModal'>;
}
declare module 'boron/ScaleModal.js' {
  declare module.exports: $Exports<'boron/ScaleModal'>;
}
declare module 'boron/WaveModal.js' {
  declare module.exports: $Exports<'boron/WaveModal'>;
}


text:
namespace Json.Comparer
{
    /// <summary>
    /// The type of JToken being compared. It is simplified representation of the JTokenType with a single Value for all different value types.
    /// </summary>
    public enum ComparedTokenType
    {
        /// <summary>
        /// The Tokesn compared consisted of Objects.
        /// </summary>
        Object = 0,

        /// <summary>
        /// The tokens compared consisted of Arrays.
        /// </summary>
        Array = 1,

        /// <summary>
        /// The tokens compared consisted of Properties.
        /// </summary>
        Property = 2,

        /// <summary>
        /// The tokens compared consisted of value type. So for example int, string datetime etc.
        /// </summary>
        Value = 3
    }
}


text:
var expect = require('chai').expect;
var check = require('validator').check;
var ValidationHelper = require('../../../server/util/ValidationHelper');

describe('Validation Helper', function() {

	describe('Check Regex', function() {

		it('Regular expression to allow alpha numeric, accented chars, numbers and spaces', function() {
			var expression = "This is ò valid Learni#ng * Desìgn N@meè 123?";
			try {
				check(expression).regex(ValidationHelper.FIRST_ALPHANUMERIC_REST_ANY_CHAR);
			} catch(err) {
				expect(err).to.be.null;
			}
		});

		it('First character cannot be a special character', function() {
			var expression = "* This is not allowed";
			try {
				check(expression).regex(ValidationHelper.FIRST_ALPHANUMERIC_REST_ANY_CHAR);
			} catch(err) {
				expect(err).not.to.be.null;
			}
		});

		it('Dashes are allowed', function() {
			var expression = "this-is-a-valid-learning-design-name";
			try {
				check(expression).regex(ValidationHelper.FIRST_ALPHANUMERIC_REST_ANY_CHAR);
			} catch(err) {
				expect(err).to.be.null;
			}
		});

	});

	describe('Validate Any - Regex', function() {

		it('Wrapper to validation regex allows alpha numeric, special chars, numbers, spaces', function() {
			var ldName = "This is ò valid Learni#ng * Desìgn N@meè 123?";
			var ldNameInvalidMessage = "Invalid characters";

			var validationResult = ValidationHelper.validateAny(ValidationHelper.validateRegEx,
				[ldName, ldNameInvalidMessage, ValidationHelper.FIRST_ALPHANUMERIC_REST_ANY_CHAR]);
			expect(validationResult).to.be.null;
		});

	});

	describe('Validate at least one qcer', function() {

		var qcerValidationMessage = 'At least one qcer must be selected.';

		it('Returns message if qcers are undefined', function() {
			var qcers = undefined;
			var result = ValidationHelper.validateAtLeastOneQcer(qcers, qcerValidationMessage);
			expect(result).to.equal(qcerValidationMessage);
		});

		it('Returns message if qcers are null', function() {
			var qcers = null;
			var result = ValidationHelper.validateAtLeastOneQcer(qcers, qcerValidationMessage);
			expect(result).to.equal(qcerValidationMessage);
		});

		it('Returns message if all qcers are empty', function() {
			var qcers = {};
			var result = ValidationHelper.validateAtLeastOneQcer(qcers, qcerValidationMessage);
			expect(result).to.equal(qcerValidationMessage);
		});

		it('Returns message if all qcers are false', function() {
			var qcers = {"1":false, "2":false};
			var result = ValidationHelper.validateAtLeastOneQcer(qcers, qcerValidationMessage);
			expect(result).to.equal(qcerValidationMessage);
		});

		it('Returns message if qcer list has one item and its false', function() {
			var qcers = {"1":false};
			var result = ValidationHelper.validateAtLeastOneQcer(qcers, qcerValidationMessage);
			expect(result).to.equal(qcerValidationMessage);
		});

		it('Returns null if qcer list has one item and its true', function() {
			var qcers = {"1":true};
			var result = ValidationHelper.validateAtLeastOneQcer(qcers, qcerValidationMessage);
			expect(result).to.be.null;
		});

		it('Returns null if qcer list has multiple items all true', function() {
			var qcers = {"1":true, "4":true};
			var result = ValidationHelper.validateAtLeastOneQcer(qcers, qcerValidationMessage);
			expect(result).to.be.null;
		});

		it('Returns null if qcer list has multiple items some true', function() {
			var qcers = {"1":false, "4":false, "6":true};
			var result = ValidationHelper.validateAtLeastOneQcer(qcers, qcerValidationMessage);
			expect(result).to.be.null;
		});

	});

});


text:
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved.                             */
/* Open Source Software - may be modified and shared by FRC teams. The code   */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project.                                                               */
/*----------------------------------------------------------------------------*/

package edu.wpi.first.wpilibj.templates;

import edu.wpi.first.wpilibj.Compressor;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.Solenoid;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;

/**
 * The VM is configured to automatically run this class, and to call the
 * functions corresponding to each mode, as described in the SimpleRobot
 * documentation. If you change the name of this class or the package after
 * creating this project, you must also update the manifest file in the resource
 * directory.
 */
public class Team522Robot extends SimpleRobot {

    private RobotDrive drive = new RobotDrive(1, 2, 3, 4);
    private Joystick leftStick = new Joystick(1);
    private Joystick rightStick = new Joystick(2);
    private Joystick thirdStick = new Joystick (3);
    private Compressor air = new Compressor(1,1);
    private Solenoid pistonDown = new Solenoid(7);
    private Solenoid pistonUp = new Solenoid(8);

    public Team522Robot() {

    }

    public void autonomous() {

        air.start();

        drive.drive(-0.5, -0.5);
        Timer.delay(2);
    }

    public void operatorControl() {
        while(isOperatorControl() && isEnabled()){
            drive.tankDrive(leftStick.getY(), rightStick.getY());

            if(thirdStick.getRawButton(1)){
                deployDoor(true);
            }
            else if(thirdStick.getRawButton(3) || thirdStick.getRawButton(2)){
                deployDoor(false);
            }

            SmartDashboard.putDouble("Joystick 1: ", leftStick.getY());
            SmartDashboard.putDouble("Joystick 2: ", rightStick.getY());

            Timer.delay(0.005);
        }
    }

    public void deployDoor(boolean raiseDoor){

        //In-case teleop started first
        if(!air.enabled()){
            air.start();
        }

        if(raiseDoor){
            pistonUp.set(true);
            pistonDown.set(false);
            SmartDashboard.putString("Door Position: ", "Raised");
        }
        else{
            pistonDown.set(true);
            pistonUp.set(false);
            SmartDashboard.putString("Door Position: ", "Lowered");
        }
    }

}


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

package com.google.cloud.vision.v1;

/**
 *

 * Structural unit of text representing a number of words in certain order.
 *

 *
 * Protobuf type {@code google.cloud.vision.v1.Paragraph}
 */
public  final class Paragraph extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.Paragraph)
    ParagraphOrBuilder {
  // Use Paragraph.newBuilder() to construct.
  private Paragraph(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private Paragraph() {
    words_ = java.util.Collections.emptyList();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
  }
  private Paragraph(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    int mutable_bitField0_ = 0;
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          default: {
            if (!input.skipField(tag)) {
              done = true;
            }
            break;
          }
          case 10: {
            com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder subBuilder = null;
            if (property_ != null) {
              subBuilder = property_.toBuilder();
            }
            property_ = input.readMessage(com.google.cloud.vision.v1.TextAnnotation.TextProperty.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(property_);
              property_ = subBuilder.buildPartial();
            }

            break;
          }
          case 18: {
            com.google.cloud.vision.v1.BoundingPoly.Builder subBuilder = null;
            if (boundingBox_ != null) {
              subBuilder = boundingBox_.toBuilder();
            }
            boundingBox_ = input.readMessage(com.google.cloud.vision.v1.BoundingPoly.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(boundingBox_);
              boundingBox_ = subBuilder.buildPartial();
            }

            break;
          }
          case 26: {
            if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
              words_ = new java.util.ArrayList<com.google.cloud.vision.v1.Word>();
              mutable_bitField0_ |= 0x00000004;
            }
            words_.add(
                input.readMessage(com.google.cloud.vision.v1.Word.parser(), extensionRegistry));
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
        words_ = java.util.Collections.unmodifiableList(words_);
      }
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Paragraph_descriptor;
  }

  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Paragraph_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.vision.v1.Paragraph.class, com.google.cloud.vision.v1.Paragraph.Builder.class);
  }

  private int bitField0_;
  public static final int PROPERTY_FIELD_NUMBER = 1;
  private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_;
  /**
   *

   * Additional information detected for the paragraph.
   *

   *
   * optional .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;
   */
  public boolean hasProperty() {
    return property_ != null;
  }
  /**
   *

   * Additional information detected for the paragraph.
   *

   *
   * optional .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;
   */
  public com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty() {
    return property_ == null ? com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_;
  }
  /**
   *

   * Additional information detected for the paragraph.
   *

   *
   * optional .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;
   */
  public com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() {
    return getProperty();
  }

  public static final int BOUNDING_BOX_FIELD_NUMBER = 2;
  private com.google.cloud.vision.v1.BoundingPoly boundingBox_;
  /**
   *

   * The bounding box for the paragraph.
   * The vertices are in the order of top-left, top-right, bottom-right,
   * bottom-left. When a rotation of the bounding box is detected the rotation
   * is represented as around the top-left corner as defined when the text is
   * read in the 'natural' orientation.
   * For example:
   *   * when the text is horizontal it might look like:
   *      0----1
   *      |    |
   *      3----2
   *   * when it's rotated 180 degrees around the top-left corner it becomes:
   *      2----3
   *      |    |
   *      1----0
   *   and the vertice order will still be (0, 1, 2, 3).
   *

   *
   * optional .google.cloud.vision.v1.BoundingPoly bounding_box = 2;
   */
  public boolean hasBoundingBox() {
    return boundingBox_ != null;
  }
  /**
   *

   * The bounding box for the paragraph.
   * The vertices are in the order of top-left, top-right, bottom-right,
   * bottom-left. When a rotation of the bounding box is detected the rotation
   * is represented as around the top-left corner as defined when the text is
   * read in the 'natural' orientation.
   * For example:
   *   * when the text is horizontal it might look like:
   *      0----1
   *      |    |
   *      3----2
   *   * when it's rotated 180 degrees around the top-left corner it becomes:
   *      2----3
   *      |    |
   *      1----0
   *   and the vertice order will still be (0, 1, 2, 3).
   *

   *
   * optional .google.cloud.vision.v1.BoundingPoly bounding_box = 2;
   */
  public com.google.cloud.vision.v1.BoundingPoly getBoundingBox() {
    return boundingBox_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingBox_;
  }
  /**
   *

   * The bounding box for the paragraph.
   * The vertices are in the order of top-left, top-right, bottom-right,
   * bottom-left. When a rotation of the bounding box is detected the rotation
   * is represented as around the top-left corner as defined when the text is
   * read in the 'natural' orientation.
   * For example:
   *   * when the text is horizontal it might look like:
   *      0----1
   *      |    |
   *      3----2
   *   * when it's rotated 180 degrees around the top-left corner it becomes:
   *      2----3
   *      |    |
   *      1----0
   *   and the vertice order will still be (0, 1, 2, 3).
   *

   *
   * optional .google.cloud.vision.v1.BoundingPoly bounding_box = 2;
   */
  public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() {
    return getBoundingBox();
  }

  public static final int WORDS_FIELD_NUMBER = 3;
  private java.util.List<com.google.cloud.vision.v1.Word> words_;
  /**
   *

   * List of words in this paragraph.
   *

   *
   * repeated .google.cloud.vision.v1.Word words = 3;
   */
  public java.util.List<com.google.cloud.vision.v1.Word> getWordsList() {
    return words_;
  }
  /**
   *

   * List of words in this paragraph.
   *

   *
   * repeated .google.cloud.vision.v1.Word words = 3;
   */
  public java.util.List<? extends com.google.cloud.vision.v1.WordOrBuilder>
      getWordsOrBuilderList() {
    return words_;
  }
  /**
   *

   * List of words in this paragraph.
   *

   *
   * repeated .google.cloud.vision.v1.Word words = 3;
   */
  public int getWordsCount() {
    return words_.size();
  }
  /**
   *

   * List of words in this paragraph.
   *

   *
   * repeated .google.cloud.vision.v1.Word words = 3;
   */
  public com.google.cloud.vision.v1.Word getWords(int index) {
    return words_.get(index);
  }
  /**
   *

   * List of words in this paragraph.
   *

   *
   * repeated .google.cloud.vision.v1.Word words = 3;
   */
  public com.google.cloud.vision.v1.WordOrBuilder getWordsOrBuilder(
      int index) {
    return words_.get(index);
  }

  private byte memoizedIsInitialized = -1;
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (property_ != null) {
      output.writeMessage(1, getProperty());
    }
    if (boundingBox_ != null) {
      output.writeMessage(2, getBoundingBox());
    }
    for (int i = 0; i < words_.size(); i++) {
      output.writeMessage(3, words_.get(i));
    }
  }

  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (property_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, getProperty());
    }
    if (boundingBox_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, getBoundingBox());
    }
    for (int i = 0; i < words_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, words_.get(i));
    }
    memoizedSize = size;
    return size;
  }

  private static final long serialVersionUID = 0L;
  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof com.google.cloud.vision.v1.Paragraph)) {
      return super.equals(obj);
    }
    com.google.cloud.vision.v1.Paragraph other = (com.google.cloud.vision.v1.Paragraph) obj;

    boolean result = true;
    result = result && (hasProperty() == other.hasProperty());
    if (hasProperty()) {
      result = result && getProperty()
          .equals(other.getProperty());
    }
    result = result && (hasBoundingBox() == other.hasBoundingBox());
    if (hasBoundingBox()) {
      result = result && getBoundingBox()
          .equals(other.getBoundingBox());
    }
    result = result && getWordsList()
        .equals(other.getWordsList());
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptorForType().hashCode();
    if (hasProperty()) {
      hash = (37 * hash) + PROPERTY_FIELD_NUMBER;
      hash = (53 * hash) + getProperty().hashCode();
    }
    if (hasBoundingBox()) {
      hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER;
      hash = (53 * hash) + getBoundingBox().hashCode();
    }
    if (getWordsCount() > 0) {
      hash = (37 * hash) + WORDS_FIELD_NUMBER;
      hash = (53 * hash) + getWordsList().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.vision.v1.Paragraph parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.cloud.vision.v1.Paragraph 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.vision.v1.Paragraph parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.cloud.vision.v1.Paragraph parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.cloud.vision.v1.Paragraph parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.cloud.vision.v1.Paragraph 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.vision.v1.Paragraph parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.google.cloud.vision.v1.Paragraph 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.vision.v1.Paragraph parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.cloud.vision.v1.Paragraph parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(com.google.cloud.vision.v1.Paragraph prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  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;
  }
  /**
   *

   * Structural unit of text representing a number of words in certain order.
   *

   *
   * Protobuf type {@code google.cloud.vision.v1.Paragraph}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.Paragraph)
      com.google.cloud.vision.v1.ParagraphOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Paragraph_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Paragraph_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.vision.v1.Paragraph.class, com.google.cloud.vision.v1.Paragraph.Builder.class);
    }

    // Construct using com.google.cloud.vision.v1.Paragraph.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
        getWordsFieldBuilder();
      }
    }
    public Builder clear() {
      super.clear();
      if (propertyBuilder_ == null) {
        property_ = null;
      } else {
        property_ = null;
        propertyBuilder_ = null;
      }
      if (boundingBoxBuilder_ == null) {
        boundingBox_ = null;
      } else {
        boundingBox_ = null;
        boundingBoxBuilder_ = null;
      }
      if (wordsBuilder_ == null) {
        words_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000004);
      } else {
        wordsBuilder_.clear();
      }
      return this;
    }

    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Paragraph_descriptor;
    }

    public com.google.cloud.vision.v1.Paragraph getDefaultInstanceForType() {
      return com.google.cloud.vision.v1.Paragraph.getDefaultInstance();
    }

    public com.google.cloud.vision.v1.Paragraph build() {
      com.google.cloud.vision.v1.Paragraph result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    public com.google.cloud.vision.v1.Paragraph buildPartial() {
      com.google.cloud.vision.v1.Paragraph result = new com.google.cloud.vision.v1.Paragraph(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (propertyBuilder_ == null) {
        result.property_ = property_;
      } else {
        result.property_ = propertyBuilder_.build();
      }
      if (boundingBoxBuilder_ == null) {
        result.boundingBox_ = boundingBox_;
      } else {
        result.boundingBox_ = boundingBoxBuilder_.build();
      }
      if (wordsBuilder_ == null) {
        if (((bitField0_ & 0x00000004) == 0x00000004)) {
          words_ = java.util.Collections.unmodifiableList(words_);
          bitField0_ = (bitField0_ & ~0x00000004);
        }
        result.words_ = words_;
      } else {
        result.words_ = wordsBuilder_.build();
      }
      result.bitField0_ = to_bitField0_;
      onBuilt();
      return result;
    }

    public Builder clone() {
      return (Builder) super.clone();
    }
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return (Builder) super.setField(field, value);
    }
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return (Builder) super.clearField(field);
    }
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return (Builder) super.clearOneof(oneof);
    }
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, Object value) {
      return (Builder) super.setRepeatedField(field, index, value);
    }
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return (Builder) super.addRepeatedField(field, value);
    }
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.cloud.vision.v1.Paragraph) {
        return mergeFrom((com.google.cloud.vision.v1.Paragraph)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.vision.v1.Paragraph other) {
      if (other == com.google.cloud.vision.v1.Paragraph.getDefaultInstance()) return this;
      if (other.hasProperty()) {
        mergeProperty(other.getProperty());
      }
      if (other.hasBoundingBox()) {
        mergeBoundingBox(other.getBoundingBox());
      }
      if (wordsBuilder_ == null) {
        if (!other.words_.isEmpty()) {
          if (words_.isEmpty()) {
            words_ = other.words_;
            bitField0_ = (bitField0_ & ~0x00000004);
          } else {
            ensureWordsIsMutable();
            words_.addAll(other.words_);
          }
          onChanged();
        }
      } else {
        if (!other.words_.isEmpty()) {
          if (wordsBuilder_.isEmpty()) {
            wordsBuilder_.dispose();
            wordsBuilder_ = null;
            words_ = other.words_;
            bitField0_ = (bitField0_ & ~0x00000004);
            wordsBuilder_ =
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getWordsFieldBuilder() : null;
          } else {
            wordsBuilder_.addAllMessages(other.words_);
          }
        }
      }
      onChanged();
      return this;
    }

    public final boolean isInitialized() {
      return true;
    }

    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      com.google.cloud.vision.v1.Paragraph parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.google.cloud.vision.v1.Paragraph) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_;
    /**
     *

     * Additional information detected for the paragraph.
     *

     *
     * optional .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;
     */
    public boolean hasProperty() {
      return propertyBuilder_ != null || property_ != null;
    }
    /**
     *

     * Additional information detected for the paragraph.
     *

     *
     * optional .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;
     */
    public com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty() {
      if (propertyBuilder_ == null) {
        return property_ == null ? com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_;
      } else {
        return propertyBuilder_.getMessage();
      }
    }
    /**
     *

     * Additional information detected for the paragraph.
     *

     *
     * optional .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;
     */
    public Builder setProperty(com.google.cloud.vision.v1.TextAnnotation.TextProperty value) {
      if (propertyBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        property_ = value;
        onChanged();
      } else {
        propertyBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *

     * Additional information detected for the paragraph.
     *

     *
     * optional .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;
     */
    public Builder setProperty(
        com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder builderForValue) {
      if (propertyBuilder_ == null) {
        property_ = builderForValue.build();
        onChanged();
      } else {
        propertyBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *

     * Additional information detected for the paragraph.
     *

     *
     * optional .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;
     */
    public Builder mergeProperty(com.google.cloud.vision.v1.TextAnnotation.TextProperty value) {
      if (propertyBuilder_ == null) {
        if (property_ != null) {
          property_ =
            com.google.cloud.vision.v1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial();
        } else {
          property_ = value;
        }
        onChanged();
      } else {
        propertyBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *

     * Additional information detected for the paragraph.
     *

     *
     * optional .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;
     */
    public Builder clearProperty() {
      if (propertyBuilder_ == null) {
        property_ = null;
        onChanged();
      } else {
        property_ = null;
        propertyBuilder_ = null;
      }

      return this;
    }
    /**
     *

     * Additional information detected for the paragraph.
     *

     *
     * optional .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;
     */
    public com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder getPropertyBuilder() {

      onChanged();
      return getPropertyFieldBuilder().getBuilder();
    }
    /**
     *

     * Additional information detected for the paragraph.
     *

     *
     * optional .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;
     */
    public com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() {
      if (propertyBuilder_ != null) {
        return propertyBuilder_.getMessageOrBuilder();
      } else {
        return property_ == null ?
            com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_;
      }
    }
    /**
     *

     * Additional information detected for the paragraph.
     *

     *
     * optional .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder>
        getPropertyFieldBuilder() {
      if (propertyBuilder_ == null) {
        propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder>(
                getProperty(),
                getParentForChildren(),
                isClean());
        property_ = null;
      }
      return propertyBuilder_;
    }

    private com.google.cloud.vision.v1.BoundingPoly boundingBox_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> boundingBoxBuilder_;
    /**
     *

     * The bounding box for the paragraph.
     * The vertices are in the order of top-left, top-right, bottom-right,
     * bottom-left. When a rotation of the bounding box is detected the rotation
     * is represented as around the top-left corner as defined when the text is
     * read in the 'natural' orientation.
     * For example:
     *   * when the text is horizontal it might look like:
     *      0----1
     *      |    |
     *      3----2
     *   * when it's rotated 180 degrees around the top-left corner it becomes:
     *      2----3
     *      |    |
     *      1----0
     *   and the vertice order will still be (0, 1, 2, 3).
     *

     *
     * optional .google.cloud.vision.v1.BoundingPoly bounding_box = 2;
     */
    public boolean hasBoundingBox() {
      return boundingBoxBuilder_ != null || boundingBox_ != null;
    }
    /**
     *

     * The bounding box for the paragraph.
     * The vertices are in the order of top-left, top-right, bottom-right,
     * bottom-left. When a rotation of the bounding box is detected the rotation
     * is represented as around the top-left corner as defined when the text is
     * read in the 'natural' orientation.
     * For example:
     *   * when the text is horizontal it might look like:
     *      0----1
     *      |    |
     *      3----2
     *   * when it's rotated 180 degrees around the top-left corner it becomes:
     *      2----3
     *      |    |
     *      1----0
     *   and the vertice order will still be (0, 1, 2, 3).
     *

     *
     * optional .google.cloud.vision.v1.BoundingPoly bounding_box = 2;
     */
    public com.google.cloud.vision.v1.BoundingPoly getBoundingBox() {
      if (boundingBoxBuilder_ == null) {
        return boundingBox_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingBox_;
      } else {
        return boundingBoxBuilder_.getMessage();
      }
    }
    /**
     *

     * The bounding box for the paragraph.
     * The vertices are in the order of top-left, top-right, bottom-right,
     * bottom-left. When a rotation of the bounding box is detected the rotation
     * is represented as around the top-left corner as defined when the text is
     * read in the 'natural' orientation.
     * For example:
     *   * when the text is horizontal it might look like:
     *      0----1
     *      |    |
     *      3----2
     *   * when it's rotated 180 degrees around the top-left corner it becomes:
     *      2----3
     *      |    |
     *      1----0
     *   and the vertice order will still be (0, 1, 2, 3).
     *

     *
     * optional .google.cloud.vision.v1.BoundingPoly bounding_box = 2;
     */
    public Builder setBoundingBox(com.google.cloud.vision.v1.BoundingPoly value) {
      if (boundingBoxBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        boundingBox_ = value;
        onChanged();
      } else {
        boundingBoxBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *

     * The bounding box for the paragraph.
     * The vertices are in the order of top-left, top-right, bottom-right,
     * bottom-left. When a rotation of the bounding box is detected the rotation
     * is represented as around the top-left corner as defined when the text is
     * read in the 'natural' orientation.
     * For example:
     *   * when the text is horizontal it might look like:
     *      0----1
     *      |    |
     *      3----2
     *   * when it's rotated 180 degrees around the top-left corner it becomes:
     *      2----3
     *      |    |
     *      1----0
     *   and the vertice order will still be (0, 1, 2, 3).
     *

     *
     * optional .google.cloud.vision.v1.BoundingPoly bounding_box = 2;
     */
    public Builder setBoundingBox(
        com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) {
      if (boundingBoxBuilder_ == null) {
        boundingBox_ = builderForValue.build();
        onChanged();
      } else {
        boundingBoxBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *

     * The bounding box for the paragraph.
     * The vertices are in the order of top-left, top-right, bottom-right,
     * bottom-left. When a rotation of the bounding box is detected the rotation
     * is represented as around the top-left corner as defined when the text is
     * read in the 'natural' orientation.
     * For example:
     *   * when the text is horizontal it might look like:
     *      0----1
     *      |    |
     *      3----2
     *   * when it's rotated 180 degrees around the top-left corner it becomes:
     *      2----3
     *      |    |
     *      1----0
     *   and the vertice order will still be (0, 1, 2, 3).
     *

     *
     * optional .google.cloud.vision.v1.BoundingPoly bounding_box = 2;
     */
    public Builder mergeBoundingBox(com.google.cloud.vision.v1.BoundingPoly value) {
      if (boundingBoxBuilder_ == null) {
        if (boundingBox_ != null) {
          boundingBox_ =
            com.google.cloud.vision.v1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial();
        } else {
          boundingBox_ = value;
        }
        onChanged();
      } else {
        boundingBoxBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *

     * The bounding box for the paragraph.
     * The vertices are in the order of top-left, top-right, bottom-right,
     * bottom-left. When a rotation of the bounding box is detected the rotation
     * is represented as around the top-left corner as defined when the text is
     * read in the 'natural' orientation.
     * For example:
     *   * when the text is horizontal it might look like:
     *      0----1
     *      |    |
     *      3----2
     *   * when it's rotated 180 degrees around the top-left corner it becomes:
     *      2----3
     *      |    |
     *      1----0
     *   and the vertice order will still be (0, 1, 2, 3).
     *

     *
     * optional .google.cloud.vision.v1.BoundingPoly bounding_box = 2;
     */
    public Builder clearBoundingBox() {
      if (boundingBoxBuilder_ == null) {
        boundingBox_ = null;
        onChanged();
      } else {
        boundingBox_ = null;
        boundingBoxBuilder_ = null;
      }

      return this;
    }
    /**
     *

     * The bounding box for the paragraph.
     * The vertices are in the order of top-left, top-right, bottom-right,
     * bottom-left. When a rotation of the bounding box is detected the rotation
     * is represented as around the top-left corner as defined when the text is
     * read in the 'natural' orientation.
     * For example:
     *   * when the text is horizontal it might look like:
     *      0----1
     *      |    |
     *      3----2
     *   * when it's rotated 180 degrees around the top-left corner it becomes:
     *      2----3
     *      |    |
     *      1----0
     *   and the vertice order will still be (0, 1, 2, 3).
     *

     *
     * optional .google.cloud.vision.v1.BoundingPoly bounding_box = 2;
     */
    public com.google.cloud.vision.v1.BoundingPoly.Builder getBoundingBoxBuilder() {

      onChanged();
      return getBoundingBoxFieldBuilder().getBuilder();
    }
    /**
     *

     * The bounding box for the paragraph.
     * The vertices are in the order of top-left, top-right, bottom-right,
     * bottom-left. When a rotation of the bounding box is detected the rotation
     * is represented as around the top-left corner as defined when the text is
     * read in the 'natural' orientation.
     * For example:
     *   * when the text is horizontal it might look like:
     *      0----1
     *      |    |
     *      3----2
     *   * when it's rotated 180 degrees around the top-left corner it becomes:
     *      2----3
     *      |    |
     *      1----0
     *   and the vertice order will still be (0, 1, 2, 3).
     *

     *
     * optional .google.cloud.vision.v1.BoundingPoly bounding_box = 2;
     */
    public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() {
      if (boundingBoxBuilder_ != null) {
        return boundingBoxBuilder_.getMessageOrBuilder();
      } else {
        return boundingBox_ == null ?
            com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingBox_;
      }
    }
    /**
     *

     * The bounding box for the paragraph.
     * The vertices are in the order of top-left, top-right, bottom-right,
     * bottom-left. When a rotation of the bounding box is detected the rotation
     * is represented as around the top-left corner as defined when the text is
     * read in the 'natural' orientation.
     * For example:
     *   * when the text is horizontal it might look like:
     *      0----1
     *      |    |
     *      3----2
     *   * when it's rotated 180 degrees around the top-left corner it becomes:
     *      2----3
     *      |    |
     *      1----0
     *   and the vertice order will still be (0, 1, 2, 3).
     *

     *
     * optional .google.cloud.vision.v1.BoundingPoly bounding_box = 2;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder>
        getBoundingBoxFieldBuilder() {
      if (boundingBoxBuilder_ == null) {
        boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder>(
                getBoundingBox(),
                getParentForChildren(),
                isClean());
        boundingBox_ = null;
      }
      return boundingBoxBuilder_;
    }

    private java.util.List<com.google.cloud.vision.v1.Word> words_ =
      java.util.Collections.emptyList();
    private void ensureWordsIsMutable() {
      if (!((bitField0_ & 0x00000004) == 0x00000004)) {
        words_ = new java.util.ArrayList<com.google.cloud.vision.v1.Word>(words_);
        bitField0_ |= 0x00000004;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.google.cloud.vision.v1.Word, com.google.cloud.vision.v1.Word.Builder, com.google.cloud.vision.v1.WordOrBuilder> wordsBuilder_;

    /**
     *

     * List of words in this paragraph.
     *

     *
     * repeated .google.cloud.vision.v1.Word words = 3;
     */
    public java.util.List<com.google.cloud.vision.v1.Word> getWordsList() {
      if (wordsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(words_);
      } else {
        return wordsBuilder_.getMessageList();
      }
    }
    /**
     *

     * List of words in this paragraph.
     *

     *
     * repeated .google.cloud.vision.v1.Word words = 3;
     */
    public int getWordsCount() {
      if (wordsBuilder_ == null) {
        return words_.size();
      } else {
        return wordsBuilder_.getCount();
      }
    }
    /**
     *

     * List of words in this paragraph.
     *

     *
     * repeated .google.cloud.vision.v1.Word words = 3;
     */
    public com.google.cloud.vision.v1.Word getWords(int index) {
      if (wordsBuilder_ == null) {
        return words_.get(index);
      } else {
        return wordsBuilder_.getMessage(index);
      }
    }
    /**
     *

     * List of words in this paragraph.
     *

     *
     * repeated .google.cloud.vision.v1.Word words = 3;
     */
    public Builder setWords(
        int index, com.google.cloud.vision.v1.Word value) {
      if (wordsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureWordsIsMutable();
        words_.set(index, value);
        onChanged();
      } else {
        wordsBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *

     * List of words in this paragraph.
     *

     *
     * repeated .google.cloud.vision.v1.Word words = 3;
     */
    public Builder setWords(
        int index, com.google.cloud.vision.v1.Word.Builder builderForValue) {
      if (wordsBuilder_ == null) {
        ensureWordsIsMutable();
        words_.set(index, builderForValue.build());
        onChanged();
      } else {
        wordsBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *

     * List of words in this paragraph.
     *

     *
     * repeated .google.cloud.vision.v1.Word words = 3;
     */
    public Builder addWords(com.google.cloud.vision.v1.Word value) {
      if (wordsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureWordsIsMutable();
        words_.add(value);
        onChanged();
      } else {
        wordsBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *

     * List of words in this paragraph.
     *

     *
     * repeated .google.cloud.vision.v1.Word words = 3;
     */
    public Builder addWords(
        int index, com.google.cloud.vision.v1.Word value) {
      if (wordsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureWordsIsMutable();
        words_.add(index, value);
        onChanged();
      } else {
        wordsBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *

     * List of words in this paragraph.
     *

     *
     * repeated .google.cloud.vision.v1.Word words = 3;
     */
    public Builder addWords(
        com.google.cloud.vision.v1.Word.Builder builderForValue) {
      if (wordsBuilder_ == null) {
        ensureWordsIsMutable();
        words_.add(builderForValue.build());
        onChanged();
      } else {
        wordsBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *

     * List of words in this paragraph.
     *

     *
     * repeated .google.cloud.vision.v1.Word words = 3;
     */
    public Builder addWords(
        int index, com.google.cloud.vision.v1.Word.Builder builderForValue) {
      if (wordsBuilder_ == null) {
        ensureWordsIsMutable();
        words_.add(index, builderForValue.build());
        onChanged();
      } else {
        wordsBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *

     * List of words in this paragraph.
     *

     *
     * repeated .google.cloud.vision.v1.Word words = 3;
     */
    public Builder addAllWords(
        java.lang.Iterable<? extends com.google.cloud.vision.v1.Word> values) {
      if (wordsBuilder_ == null) {
        ensureWordsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, words_);
        onChanged();
      } else {
        wordsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *

     * List of words in this paragraph.
     *

     *
     * repeated .google.cloud.vision.v1.Word words = 3;
     */
    public Builder clearWords() {
      if (wordsBuilder_ == null) {
        words_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000004);
        onChanged();
      } else {
        wordsBuilder_.clear();
      }
      return this;
    }
    /**
     *

     * List of words in this paragraph.
     *

     *
     * repeated .google.cloud.vision.v1.Word words = 3;
     */
    public Builder removeWords(int index) {
      if (wordsBuilder_ == null) {
        ensureWordsIsMutable();
        words_.remove(index);
        onChanged();
      } else {
        wordsBuilder_.remove(index);
      }
      return this;
    }
    /**
     *

     * List of words in this paragraph.
     *

     *
     * repeated .google.cloud.vision.v1.Word words = 3;
     */
    public com.google.cloud.vision.v1.Word.Builder getWordsBuilder(
        int index) {
      return getWordsFieldBuilder().getBuilder(index);
    }
    /**
     *

     * List of words in this paragraph.
     *

     *
     * repeated .google.cloud.vision.v1.Word words = 3;
     */
    public com.google.cloud.vision.v1.WordOrBuilder getWordsOrBuilder(
        int index) {
      if (wordsBuilder_ == null) {
        return words_.get(index);  } else {
        return wordsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *

     * List of words in this paragraph.
     *

     *
     * repeated .google.cloud.vision.v1.Word words = 3;
     */
    public java.util.List<? extends com.google.cloud.vision.v1.WordOrBuilder>
         getWordsOrBuilderList() {
      if (wordsBuilder_ != null) {
        return wordsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(words_);
      }
    }
    /**
     *

     * List of words in this paragraph.
     *

     *
     * repeated .google.cloud.vision.v1.Word words = 3;
     */
    public com.google.cloud.vision.v1.Word.Builder addWordsBuilder() {
      return getWordsFieldBuilder().addBuilder(
          com.google.cloud.vision.v1.Word.getDefaultInstance());
    }
    /**
     *

     * List of words in this paragraph.
     *

     *
     * repeated .google.cloud.vision.v1.Word words = 3;
     */
    public com.google.cloud.vision.v1.Word.Builder addWordsBuilder(
        int index) {
      return getWordsFieldBuilder().addBuilder(
          index, com.google.cloud.vision.v1.Word.getDefaultInstance());
    }
    /**
     *

     * List of words in this paragraph.
     *

     *
     * repeated .google.cloud.vision.v1.Word words = 3;
     */
    public java.util.List<com.google.cloud.vision.v1.Word.Builder>
         getWordsBuilderList() {
      return getWordsFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.google.cloud.vision.v1.Word, com.google.cloud.vision.v1.Word.Builder, com.google.cloud.vision.v1.WordOrBuilder>
        getWordsFieldBuilder() {
      if (wordsBuilder_ == null) {
        wordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.vision.v1.Word, com.google.cloud.vision.v1.Word.Builder, com.google.cloud.vision.v1.WordOrBuilder>(
                words_,
                ((bitField0_ & 0x00000004) == 0x00000004),
                getParentForChildren(),
                isClean());
        words_ = null;
      }
      return wordsBuilder_;
    }
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return this;
    }

    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return this;
    }

    // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.Paragraph)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Paragraph)
  private static final com.google.cloud.vision.v1.Paragraph DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.google.cloud.vision.v1.Paragraph();
  }

  public static com.google.cloud.vision.v1.Paragraph getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<Paragraph>
      PARSER = new com.google.protobuf.AbstractParser<Paragraph>() {
    public Paragraph parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
        return new Paragraph(input, extensionRegistry);
    }
  };

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

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

  public com.google.cloud.vision.v1.Paragraph getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}


text:
/**
 *
 */

function wizard_onStepChange(event, currentIndex, newIndex) {
	if (console) {
		console.log("wizard_onStepChange():: Enter");
		console.log("wizard_onStepChange():: event = "+event);
		console.log("wizard_onStepChange():: currentIndex = "+currentIndex);
		console.log("wizard_onStepChange():: newIndex = "+newIndex);
	}

	return true;
}

function wizard_onFinished(event, currentIndex) {
	if (console) {
		console.log("wizard_onFinished():: Enter");
		console.log("wizard_onFinished():: event = "+event);
		console.log("wizard_onFinished():: currentIndex = "+currentIndex);
	}

	$("#wizardForm").submit();
	return true
}

function wizard_onCancel(event){
	if (console) {
		console.log("wizard_onCancel():: Enter");
		console.log("wizard_onCancel():: event = "+event);
	}

	location.pathname = "/photoadmin";
	return true;
}