text:
namespace System.ServiceModel.PeerResolvers
{
    using System.Collections.Generic;
    using System.ServiceModel.Channels;
    using System.ServiceModel;
    using System.Runtime.Serialization;

    [MessageContract(IsWrapped = false)]
    public class ResolveResponseInfo
    {
        [DataContract(Name = "ResolveResponseInfo", Namespace = PeerStrings.Namespace)]
        class ResolveResponseInfoDC
        {
            [DataMember(Name = "Addresses")]
            public IList<PeerNodeAddress> Addresses;

            public ResolveResponseInfoDC(PeerNodeAddress[] addresses)
            {
                this.Addresses = (IList<PeerNodeAddress>)addresses;
            }
        }

        public ResolveResponseInfo() : this(null) { }

        public ResolveResponseInfo(PeerNodeAddress[] addresses)
        {
            this.body = new ResolveResponseInfoDC(addresses);
        }

        public IList<PeerNodeAddress> Addresses
        {
            get { return body.Addresses; }
            set { this.body.Addresses = value; }
        }

        [MessageBodyMember(Name = "ResolveResponse", Namespace = PeerStrings.Namespace)]
        ResolveResponseInfoDC body;

        public bool HasBody()
        {
            return body != null;
        }
    }
}


text: exports = module.exports = require('./CtnrOverviewWidget');

redpajama_set_name: RedPajamaGithub


text:
package br.com.remomeurumo.persistence;

import javax.interceptor.InterceptorBinding;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

@Inherited // importante devido aos proxies CDI
@InterceptorBinding
@Retention(RUNTIME)
@Target({METHOD, TYPE})
public @interface Transactional {
    // vazio
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

		<title>Test Page for the Apache HTTP Server on Scientific Linux</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

Scientific Linux Test Page

This page is used to test the proper operation of the Apache HTTP server after it has been installed. If you can read this page, it means that the Apache HTTP server installed at this site is working properly.

If you are a member of the general public:

The fact that you are seeing this page indicates that the website you just visited is either experiencing problems, or is undergoing routine maintenance.

If you would like to let the administrators of this website know that you've seen this page instead of the page you expected, you should send them e-mail. In general, mail sent to the name "webmaster" and directed to the website's domain should reach the appropriate person.

For example, if you experienced problems while visiting www.example.com, you should send e-mail to "webmaster@example.com".

For information on Scientific Linux, please visit the Scientific Linux website.

If you are the website administrator:

You may now add content to the directory <tt>/var/www/html/</tt>. Note that until you do so, people visiting your website will see this page, and not your content. To prevent this page from ever being used, follow the instructions in the file <tt>/etc/httpd/conf.d/welcome.conf</tt>.

You are free to use the image below on web sites powered by the Apache HTTP Server:


text:
.controls {
  margin-bottom: 40px;
}

.locale-selector {
  float: right;
  width: auto;
}

.controls > .search-wrapper .fa-spin,
.controls > .search-wrapper.loading .fa-search {
  display: none;
}

.controls > .search-wrapper.loading .fa-spin {
  display: block;
}

.clipboard-success {
  float: left;
  color: #7bc876;
}

#helpers .machinery li {
  padding-left: 5px;
  padding-right: 5px;
}

#helpers .machinery li:hover {
  background: #333941;
  cursor: pointer;
}


text:
package security

import (
	"net/http"

	"github.com/go-openapi/runtime"
)

// Authorized provides a default implementation of the Authorizer interface where all
// requests are authorized (successful)
func Authorized() runtime.Authorizer {
	return runtime.AuthorizerFunc(func(_ *http.Request, _ interface{}) error { return nil })
}


text:
'use strict'

let config = require('../config')
,port = config.port
,host = 'http://127.0.0.1:' + port
,tests = [
	{
		title: 'work-flow'
		,waitForElementVisible: '#wrapper'
		,elementPresent: 'h1'
		,containsText: ['.btn-link', 'forget password']
		,elementCount: ['h1', 1]
		,url: 'http://127.0.0.1:' + port + '/login'
	}
]
//disable
exports['@disabled'] = 0

tests.forEach(function(test) {

	exports[test.title] = function(browser) {

		browser
			.url(test.url)
			.assert.elementPresent(test.elementPresent)
			.assert.containsText(test.containsText[0], test.containsText[1])
			.assert.elementCount(test.elementCount[0], test.elementCount[1])
			.click('button[type="submit"]', function() {
				browser.assert.elementCount('.alert.alert-danger:visible', 1)
			})
			.setValue('input[type=email]', 'xxxx@gg.kk', function() {
				browser.assert.elementCount('.alert.alert-danger:visible', 0)
			})
			.clearValue('input[type=email]')
			.setValue('input[type=email]', 'admin@example.com')
			.setValue('input[type=password]', '12345', function() {
				browser.assert.elementCount('.alert.alert-danger:visible', 1)
			})
			.clearValue('input[type=password]')
			.setValue('input[type=password]', '123456a', function() {
				browser.assert.elementCount('.alert.alert-danger:visible', 0)
			})
			.click('button[type="submit"]')
			.pause(1000)

			//now in reset-password page
			require('../sub-tests/reset-password')(browser)

			//now in /admin/main
			require('../sub-tests/main')(browser)

			//now in /admin/group new user group
			require('../sub-tests/user-groups1')(browser)

			//now in /admin/group edit user group
			require('../sub-tests/user-groups2')(browser)

			//now in /admin/file
			require('../sub-tests/files')(browser)

			//now in /admin/user
			require('../sub-tests/user')(browser)

			//now in /admin/cat
			require('../sub-tests/cat')(browser)

			//now in /admin/post
			require('../sub-tests/post')(browser)

			//end
			browser.end()
	}

})


text:
class CreateCardBehavior < ActiveRecord::Migration
  def change
    create_table :card_behaviors do |t|
      t.text :name, null: false
      t.timestamps
    end
  end
end


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<title>Documentation: examples/CompCrop/CompCrop_v0_32.ino Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

Documentation

For Arduino users

Main Page

Related Pages

Modules

Classes

Files

Examples

File List

File Members

CompCrop_v0_32.ino

    1

   20 #include "Nextion.h"

   21

   22 /*

   23  * Declare a crop object [page id:0,component id:1, component name: "q0"].

   24  */

   25 NexCrop q0 = NexCrop(0, 1, "q0");

   26

   27 NexTouch *nex_listen_list[] =

   28 {

   29     &q0,

   30     NULL

   31 };

   32

   33 /*

   34  * Crop component pop callback function.

   35  * In this example,the image of current crop component will be changed every time when it is released.

   36  */

   37 void q0PopCallback(void *ptr)

   38 {

   39     uint32_t number = 0;

   40     dbSerialPrintln("q0PopCallback");

   41

   42     q0.getPic(&number);

   43

   44     number += 1;

   45     number %= 2;

   46

   47     q0.setPic(number);

   48 }

   49

   50 void setup(void)

   51 {

   52     nexInit();

   53     q0.attachPop(q0PopCallback);

   54     dbSerialPrintln("setup done");

   55 }

   56

   57 void loop(void)

   58 {

   59     nexLoop(nex_listen_list);

   60 }

   61

nexLoop

void nexLoop(NexTouch *nex_listen_list[])

Listen touch event and calling callbacks attached before.

Definition: NexHardware.cpp:235

NexCrop::getPic

bool getPic(uint32_t *number)

Get the number of picture.

Definition: NexCrop.cpp:46

NexTouch::attachPop

void attachPop(NexTouchEventCb pop, void *ptr=NULL)

Attach an callback function of pop touch event.

Definition: NexTouch.cpp:39

nexInit

bool nexInit(void)

Init Nextion.

Definition: NexHardware.cpp:220

Nextion.h

The header file including all other header files provided by this library.

NexCrop::setPic

bool setPic(uint32_t number)

Set the number of picture.

Definition: NexCrop.cpp:55

NexCrop

NexCrop component.

Definition: NexCrop.h:30

NexTouch

Father class of the components with touch events.

Definition: NexTouch.h:53

examples

CompCrop

CompCrop_v0_32.ino

Generated on Fri Jan 6 2017 14:00:36 for Documentation by

     1.8.7


text:
namespace ChilliSource
{
    /// A render command for loading the mesh data pertaining to a single render mesh into
    /// render memory.
    ///
    /// This must be instantiated via a RenderCommandList.
    ///
    /// This is immutable and therefore thread-safe.
    ///
    class LoadMeshRenderCommand final : public RenderCommand
    {
    public:
        /// @return The render mesh that should be loaded.
        ///
        RenderMesh* GetRenderMesh() const noexcept { return m_renderMesh; }

        /// @return The vertex data buffer.
        ///
        const u8* GetVertexData() const noexcept { return m_vertexData.get(); }

        /// Moves the Vertex data out of this class. Use with caution as this command
        /// will be in a broken state after this is used.
        ///
        /// @return The vertex data buffer.
        ///
        std::unique_ptr<const u8[]> ClaimVertexData() noexcept;

        /// @return The size of the vertex data buffer.
        ///
        u32 GetVertexDataSize() const noexcept { return m_vertexDataSize; }

        /// @return The index data buffer.
        ///
        const u8* GetIndexData() const noexcept { return m_indexData.get(); }

        /// Moves the Index data out of this class. Use with caution as this command
        /// will be in a broken state after this is used.
        ///
        /// @return The index data buffer.
        ///
        std::unique_ptr<const u8[]> ClaimIndexData() noexcept;

        /// @return The size of the index data buffer.
        ///
        u32 GetIndexDataSize() const noexcept { return m_indexDataSize; }

    private:
        friend class RenderCommandList;

        /// Constructs a new instance with the given render mesh and mesh data.
        ///
        /// @param renderMesh
        ///     The render mesh that should be loaded.
        /// @param vertexData
        ///     The vertex data buffer.
        /// @param vertexDataSize
        ///     The size of the vertex data buffer.
        /// @param indexData
        ///     The index data buffer.
        /// @param indexDataSize
        ///     The size of the index data buffer.
        ///
        LoadMeshRenderCommand(RenderMesh* renderMesh, std::unique_ptr<const u8[]> vertexData, u32 vertexDataSize, std::unique_ptr<const u8[]> indexData, u32 indexDataSize) noexcept;

        RenderMesh* m_renderMesh;
        std::unique_ptr<const u8[]> m_vertexData;
        u32 m_vertexDataSize;
        std::unique_ptr<const u8[]> m_indexData;
        u32 m_indexDataSize;
        bool m_shouldBackupData = false;
    };
}

#endif


text:
/**
 * Package for Collections comparing task.
 * @author Wladyslaw Lazin (mailto:wladislaw.lazin@gmail.com)
 * @version $Id$
 * @since 22.11.17
 */
package ru.job4j.perfcomparison;


text:
require 'active_support/core_ext/array/extract_options'
require 'file_mover/remote_source'
require 'file_mover/sink'
require 'file_mover/utils'

module FileMover
  # Base class for ftp/sftp sources and sinks.
  #
  # Clients must implement
  # * #ftp_get_files(_session_) which gets files using some _session_
  # * #session which must yield the _session_
  #
  # Required params:
  # * :remote_dir, :host, :user
  #
  class FtpBase < RemoteSource
    include Sink
    attribute :remote_dir
    attribute :host
    attribute :port
    attribute :user
    attribute :password

    def initialize *args
      opts = args.extract_options!
      case args.size
      when 1 then super(params_from(uri))
      when 0 then super opts
      else raise ArgumentError, "invalid #{args}"
      end
    end

    def get_remote_files *args
      session do |session|
        logger.debug{"#{self}: about to *ftp get"}
        files = ftp_get_files session, *args
        logger.debug{"#{self}: *ftp got files #{files.inspect}"}
      end
    end

    def put_files pathes
      session{|session| ftp_put session, pathes}
      Utils.basenames pathes
    end

    def to_s
      "#{self.class.to_s.split(/::/).last.downcase}://#{host}/#{remote_dir}"
    end

    private
    def self.params_from_uri _uri
      uri = URI(_uri.to_s.gsub(/\A.*:/,'ftp:'))
      { host: uri.host, port: uri.port, user: uri.user, password: uri.password, remote_dir: uri.path }
    end

    protected

    def ftp_success! ftp, event
      handle on_success, {
         proc:    ->(handler){ handler.call event },
         suffix:  ->(suffix){
                         event.source_pathes.each do |path|
                           logger.debug{"#{self}: appending #{suffix} to #{path}"}
                           ftp_rename ftp, path, "#{path}#{suffix}"
                         end
                       },
         delete:  ->{ event.source_pathes.each do |path|
                        logger.debug{"#{self}: deleting remote #{path}"}
                        ftp_delete ftp, path
                      end
                    }
      }
    end

  end
end


text:
get '/' do
  if request.xhr?
    erb :index, { layout: false }
  else
    erb :index
  end
end

get '/login' do
  if auth_logged_in?
    redirect "/profile/#{auth_current_user.id}"
  end
  @username = ''

  if request.xhr?
    erb :'users/login', { layout: false }
  else
    erb :'users/login'
  end
end

post '/login' do
  @username = params[:username]
  user = User.find_by_username(@username)

  if (user && user.password == params[:password])
    auth_login(user)
    redirect "/profile/#{user.id}"
  else
    @form_error = 'Unable to log you in.'
    erb :'users/login'
  end
end

get '/register' do
  if auth_logged_in?
    redirect "/profile/#{auth_current_user.id}"
  end

  @user = User.new

  if request.xhr?
    erb :'users/register', { layout: false }
  else
    erb :'users/register'
  end
end

post '/register' do
  @user = User.new

  test_pw = params[:password]
  confirm_pw = @user.password_confirmation(params)

  @user.username = params[:username]
  @user.password = params[:password]

  if confirm_pw && @user.save
    auth_login(@user)
    redirect "/profile/#{auth_current_user.id}"
  else
    if test_pw.size == 0
      @form_error = "Dude... Type in a password."
    elsif confirm_pw == false
      @form_error = "Dude... You typed your confirmation password incorrectly."
    else
      @form_error = "Username has already been taken. Please select another Username."
    end
    erb :'users/register'
  end
end

get '/logout' do
  auth_logout
  redirect '/'
end

#edit account
get '/profile/:id/edit' do
  @user = User.find(params[:id])
  erb :'users/edit'
end

put '/profile/:id' do |id|
  @user = User.find(params[:id])

  if @user.save
    auth_current_user.update(params[:user])
    @form_message = "Edited account information"
    erb :'users/edit'
  else
    @form_message = "Wrong Password"
    erb :'users/edit'
  end

  # redirect "/profile/#{auth_current_user.id}"

end

#delete account
delete '/profile/:id' do |id|
  user = User.find_by_id(id)

  if (user && user.password == params[:confirm_pw])
    User.find(id).destroy
    auth_logout
    redirect '/'
  else
    @form_error = "Incorrect Password."
    erb :'users/edit'
  end
end

#profile page with all characters
get '/profile/:id' do
  @user = User.find(params[:id])
  @all_characters = auth_current_user.characters

  erb :'users/profile'
end

not_found do
  status 404
  erb :oops
end


text:
package org.poormanscastle.studies.compilers.utils.grammartools.lr;

import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;

import org.poormanscastle.studies.compilers.utils.grammartools.AbstractGrammar;
import org.poormanscastle.studies.compilers.utils.grammartools.Grammar;
import org.poormanscastle.studies.compilers.utils.grammartools.Production;
import org.poormanscastle.studies.compilers.utils.grammartools.Symbol;

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

/**
 * Grammar implementation for LR(0) languages.
 * <p/>
 * Created by georg on 09.02.16.
 */
public class LR0Grammar extends AbstractGrammar {

    private final Set<LRState> states = new HashSet<>();

    private final Set<LREdge> edges = new HashSet<>();

    @Override
    public Grammar initialize() {
        calculateStatesAndTransitions();
        return this;
    }

    public Set<LRState> getStates() {
        return Collections.unmodifiableSet(states);
    }

    public Set<LREdge> getEdges() {
        return Collections.unmodifiableSet(edges);
    }

    /**
     * calculates the LR(0) states for this LR(0) grammar.
     */
    public void calculateStatesAndTransitions() {
        states.clear();
        edges.clear();
        // create an initial state for the closure(startProduction)
        LRState startState = new LRState();
        startState.getItems().add(new LRItem(productions.get(0)));
        states.add(calculateClosure(startState));

        int oldSizeEdges, oldSizeStates;
        do {
            List<LRState> deltaList = new LinkedList<>();
            oldSizeEdges = edges.size();
            oldSizeStates = states.size();
            for (LRState sourceState : states) {
                for (LRItem item : sourceState.getItems()) {
                    if (!item.isReducible()) {
                        // For items with next symbol == EOF, no edges get calculated.
                        // if the parser follows and edge in the state machine, this results in a shift or goto action.
                        // EOF on the other hand should result in an accept action.
                        if (item.getNextSymbol() != Symbol.EOF) {
                            LRState targetState = calculateEdge(sourceState, item.getNextSymbol());
                            // if this state - identified by its items, thus productions and parser positions within
                            // those production - has already been encountered along another edge before use the
                            // existing one. otherwise let the new edge point to the newly encountered state.
                            if (states.contains(targetState)) {
                                // maybe for this use case, replace the Set<LRState> with a Map<LRState, LRState>.
                                for (LRState state : states) {
                                    if (state.equals(targetState)) {
                                        targetState = state; break;
                                    }
                                }
                            }
                            deltaList.add(targetState);
                            edges.add(new LREdge(sourceState, targetState, item.getNextSymbol()));
                        }
                    }
                }
            }
            states.addAll(deltaList);
            checkState(oldSizeEdges >= 0 && oldSizeEdges <= edges.size());
            checkState(oldSizeStates >= 0 && oldSizeStates <= states.size());
        } while (oldSizeEdges < edges.size() || oldSizeStates < states.size());
    }

    /**
     * calculates the closure for a state, i.e. add more items to the state when there is a dot to the left
     * of a nonterminal.
     *
     * @param state
     * @return state for method call chaining there reference to the given state is returned.
     */
    public LRState calculateClosure(LRState state) {
        int oldSize;
        do {
            List<LRItem> deltaList = new LinkedList<>();
            oldSize = state.getItems().size();
            for (LRItem item : state.getItems()) {
                if (!item.isReducible() && !item.getNextSymbol().isTerminal()) {
                    for (Production production : productions) {
                        if (item.getNextSymbol() == production.getLhs()) {
                            deltaList.add(new LRItem(production));
                        }
                    }
                }
            }
            state.getItems().addAll(deltaList);
            checkState(oldSize <= state.getItems().size());
        } while (oldSize < state.getItems().size());
        return state;
    }

    public LRState calculateEdge(LRState state, Symbol x) {
        LRState newState = new LRState();
        for (LRItem item : state.getItems()) {
            if (!item.isReducible() && item.getNextSymbol() == x) {
                newState.getItems().add(new LRItem(item.getProduction(), item.getPosition() + 1));
            }
        }
        return calculateClosure(newState);
    }
}


text:
$(document).ready(function() {

	$.ajax({
		url: "http://htmlandcssbook.com/js/jsonp.js",
		dataType: "jsonp",
		jsonp: false, //set to false if you don't want to include callback=? in url string
		jsonpCallback: "showEvents", //this property is required only if jsonp property is set to false.
		success: function showEvents(data) {
			var $newContent = '';
			$.each( data.events, function($i) {
			  $newContent += '
';
			  $newContent += '';
			  $newContent += '
' + data.events[$i].location + '
';
			  $newContent += data.events[$i].date + '
';
			  $newContent += '
';
			});
			$('#content').html($newContent);
		},
		error: function() {
			alert("The JSONP data request could not be processed.");
		}
	});

});


text:
<!DOCTYPE html>

  <meta charset="UTF-8">

  <link rel="stylesheet" type="text/css" href="style.css">
  <meta name="viewport" content="width=device-width, user-scalable=no, minimal-ui,initial-scale = 1,maximum-scale = 1">

      <
      >
      >
      <

     <form  method="get">
     <input placeholder="Nome" class="Nnome" id="Nome" />
     <input type="button" class="Nenviar" value="Enviar" id="b_enviar" />
     </form>

Por favor, Espere...


text:
using System;
using System.Collections.Generic;
using System.Data.Entity;

namespace iQuarc.Movies.Model.Initialization
{
	internal static class MediaTypeInitializer
	{
		internal static void Initialize(DbContext context)
		{
			DbSet<MediaTypeEntity> entities = context.Set<MediaTypeEntity>();

			entities.Add(new MediaTypeEntity { Id = 1, Name = "Image" });
			entities.Add(new MediaTypeEntity { Id = 2, Name = "Audio" });
			entities.Add(new MediaTypeEntity { Id = 3, Name = "Video" });
		}
	}

	internal static class DataInitializer
	{
		internal static void Intialize(DbContext context)
		{
			DbSet<MovieEntity> movies = context.Set<MovieEntity>();

			List<MovieEntity> moviesData = new List<MovieEntity>
			                               {
				                               new MovieEntity
				                               {
					                               Name = "Interstellar",
					                               ReleaseDate = new DateTime(2014, 11, 7)
				                               },
											   new MovieEntity
											   {
												   Name = "Guardians of the Galaxy",
												   ReleaseDate = new DateTime(2014, 8, 1)
											   }
			                               };

			moviesData.ForEach(e => movies.Add(e));

			DbSet<MediaEntity> media = context.Set<MediaEntity>();

			List<MediaEntity> mediaData = new List<MediaEntity>
			                              {

				                              media.Add(new MediaEntity
				                                        {
					                                        MediaTypeId = 1,
					                                        MediaUrl = "http://ia.media-imdb.com/images/M/MV5BMjIxNTU4MzY4MF5BMl5BanBnXkFtZTgwMzM4ODI3MjE@._V1__SX1857_SY927_.jpg",
					                                        Name = "Interstellar (2014) Poster",
															Movie = moviesData[0]
				                                        })
			                              };

			mediaData.ForEach(e => media.Add(e));
		}
	}
}


text:
<?php

class TestDummyBMSkillTestStinger extends BMSkill {
    /**
     * An array containing the names of functions run by
     * BMCanHaveSkill->run_hooks()
     *
     * @var array
     */
    public static $hooked_methods = array("attack_values");

    public static function attack_values($args) {
        $alist = &$args['attackValues'];

        for ($i = $alist[0] - 1; $i > 0; $i--) {
            $alist[] = $i;
        }
    }
}


text:
$category@: media
formats:
  - websites
teaser:
  text: Displays a media stream from the nexxOMNIA platform.
---

# amp-nexxtv-player

## Example

With the responsive layout, the width and height from the example should yield correct layouts for 16:9 aspect ratio videos:

```html
<amp-nexxtv-player
  data-mediaid="71QQG852413DU7J"
  data-client="761"
  data-streamtype="video"
  data-mode="static"
  data-disable-ads="1"
  data-streaming-filter="nxp-bitrate-2500"
  layout="responsive"
  width="480"
  height="270"
></amp-nexxtv-player>
```

## Attributes

    data-mediaid (required)
    Represents the ID of the media you want to play.

    data-client OR data-domain-id(required)
    Your domain ID.

    data-streamtype (optional)

Indicates the media streaming type, which can be one of the following:

`video` (default)

`audio`

`playlist`

`audioalbum`: An audio playlist

`live`

`radio`

`set`

`collection`: collection of media items

    data-mode (optional)
    Indicates the data mode, which can be static (default) or api.

    data-disable-ads (optional)
    Ads are enabled by default. Set value to 1 to disable.

    data-streaming-filter (optional)
    Set streaming filter e.g. "nxp-bitrate-0750" for max 750kbit max bitrate.

    data-exit-mode (optional)

Defines player exit screen

`replay`

`loop`

`load`

    common attributes
    This element includes common attributes extended to AMP components.

## Validation

See [amp-nexxtv-player rules](https://github.com/ampproject/amphtml/blob/main/extensions/amp-nexxtv-player/validator-amp-nexxtv-player.protoascii) in the AMP validator specification.


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

<title>IntegrityVerifier (River-Internet vtrunk API Documentation)</title>
<meta name="date" content="2016-03-28">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

net.jini.security

Interface IntegrityVerifier

All Known Implementing Classes:

FileIntegrityVerifier, HttpmdIntegrityVerifier, HttpsIntegrityVerifier

public interface IntegrityVerifier

Defines the interface for integrity verifiers used by
 Security.verifyCodebaseIntegrity,
 allowing the URLs that provide content integrity to be extended.

Since:

2.0

Author:

Sun Microsystems, Inc.

Method Summary

All Methods Instance Methods Abstract Methods

Modifier and Type
Method and Description

boolean
providesIntegrity(URL url)

Returns true if the specified URL is known to provide
 content integrity; returns false otherwise.

Method Detail

providesIntegrity

boolean providesIntegrity(URL url)

Returns true if the specified URL is known to provide
 content integrity; returns false otherwise.

Parameters:

url - URL to verify

Returns:

true if the specified URL is known to provide
 content integrity; false otherwise

Throws:

NullPointerException - if the URL is null

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.


text:
package com.amazonaws.services.resourcegroupstaggingapi;

import javax.annotation.Generated;

import com.amazonaws.services.resourcegroupstaggingapi.model.*;

/**
 * Abstract implementation of {@code AWSResourceGroupsTaggingAPIAsync}. Convenient method forms pass through to the
 * corresponding overload that takes a request object and an {@code AsyncHandler}, which throws an
 * {@code UnsupportedOperationException}.
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AbstractAWSResourceGroupsTaggingAPIAsync extends AbstractAWSResourceGroupsTaggingAPI implements AWSResourceGroupsTaggingAPIAsync {

    protected AbstractAWSResourceGroupsTaggingAPIAsync() {
    }

    @Override
    public java.util.concurrent.Future<GetResourcesResult> getResourcesAsync(GetResourcesRequest request) {

        return getResourcesAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<GetResourcesResult> getResourcesAsync(GetResourcesRequest request,
            com.amazonaws.handlers.AsyncHandler<GetResourcesRequest, GetResourcesResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<GetTagKeysResult> getTagKeysAsync(GetTagKeysRequest request) {

        return getTagKeysAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<GetTagKeysResult> getTagKeysAsync(GetTagKeysRequest request,
            com.amazonaws.handlers.AsyncHandler<GetTagKeysRequest, GetTagKeysResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<GetTagValuesResult> getTagValuesAsync(GetTagValuesRequest request) {

        return getTagValuesAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<GetTagValuesResult> getTagValuesAsync(GetTagValuesRequest request,
            com.amazonaws.handlers.AsyncHandler<GetTagValuesRequest, GetTagValuesResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<TagResourcesResult> tagResourcesAsync(TagResourcesRequest request) {

        return tagResourcesAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<TagResourcesResult> tagResourcesAsync(TagResourcesRequest request,
            com.amazonaws.handlers.AsyncHandler<TagResourcesRequest, TagResourcesResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<UntagResourcesResult> untagResourcesAsync(UntagResourcesRequest request) {

        return untagResourcesAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<UntagResourcesResult> untagResourcesAsync(UntagResourcesRequest request,
            com.amazonaws.handlers.AsyncHandler<UntagResourcesRequest, UntagResourcesResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

}


text:
#ifndef _MuscleAnalysis_h_
#define _MuscleAnalysis_h_

//=============================================================================
// INCLUDES
//=============================================================================
#include <OpenSim/Common/Storage.h>
#include <OpenSim/Simulation/Model/Analysis.h>
#include "osimAnalysesDLL.h"
#include <OpenSim/Simulation/Model/Muscle.h>

#ifdef SWIG
	#ifdef OSIMANALYSES_API
		#undef OSIMANALYSES_API
		#define OSIMANALYSES_API
	#endif
#endif

namespace OpenSim {

//=============================================================================
//=============================================================================
/**
 * A class for recording and computting basic quantities (length, shortening
 * velocity, tendon length, ...) for muscles during a simulation.
 *
 * @author Ajay Seth, Matthew Millard, Katherine Holzbaur, Frank C. Anderson
 * @version 1.0
 */
class OSIMANALYSES_API MuscleAnalysis : public Analysis {
OpenSim_DECLARE_CONCRETE_OBJECT(MuscleAnalysis, Analysis);

//=============================================================================
// DATA
//=============================================================================
public:
	// STRUCT FOR PAIRING MOMENT ARM STORAGE OBJECTS WITH THEIR
	// ASSOCIATE GENERALIZED COORDINATE
	typedef struct {
		Coordinate *q;
		Storage *momentArmStore;
		Storage *momentStore;
	}
// Excluding this from Doxygen until it has better documentation! -Sam Hamner
    /// @cond

	StorageCoordinatePair;
	/// @endcond
private:

	/** List of muscles for which to compute moment arms. */
	PropertyStrArray _muscleListProp;

	/** List of generalized coordinates for which to compute moment arms. */
	PropertyStrArray _coordinateListProp;

	/** Compute moments and moment arms. */
	PropertyBool _computeMomentsProp;

	/** Pennation angle storage. */
	Storage *_pennationAngleStore;
	/** Muscle-tendon length storage. */
	Storage *_lengthStore;
	/** Fiber length storage. */
	Storage *_fiberLengthStore;
	/** Normalized fiber length storage. */
	Storage *_normalizedFiberLengthStore;
	/** Tendon length storage. */
	Storage *_tendonLengthStore;

	/** Lengthening velocity of the muscle fibers. */
	Storage *_fiberVelocityStore;
	/** Normalized lengthening velocity of the muscle fibers. */
	Storage *_normFiberVelocityStore;
	/** Angular velocity of the muscle fibers. */
	Storage *_pennationAngularVelocityStore;

	/** Force applied by the muscle. */
	Storage *_forceStore;
	/** Force in the muscle fibers. */
	Storage *_fiberForceStore;
	/** Active force in the muscle fibers. */
	Storage *_activeFiberForceStore;
	/** Passive force in the muscle fibers. */
	Storage *_passiveFiberForceStore;
	/** Active force in the muscle fibers along tendon. */
	Storage *_activeFiberForceAlongTendonStore;
	/** Passive force in the muscle fibers along tendon. */
	Storage *_passiveFiberForceAlongTendonStore;

	/** Fiber power */
	Storage *_fiberActivePowerStore;
    Storage *_fiberPassivePowerStore;
	/** Tendon power */
	Storage *_tendonPowerStore;
	/** Muscle actuator power */
	Storage *_musclePowerStore;

	// FOR MOMENT ARMS AND MOMENTS----------------
	/** Work array for holding the list of muscles.  This array */
	Array<std::string> _muscleList;

	/** Work array for holding the list of coordinates. */
	Array<std::string> _coordinateList;

	bool _computeMoments;
#ifndef SWIG
	/** Array of active storage and coordinate pairs. */
	ArrayPtrs<StorageCoordinatePair> _momentArmStorageArray;
#endif
	/** Array of active muscles. */
	ArrayPtrs<Muscle> _muscleArray;

//=============================================================================
// METHODS
//=============================================================================
public:
	MuscleAnalysis(Model *aModel=0);
	MuscleAnalysis(const std::string &aFileName);
	MuscleAnalysis(const MuscleAnalysis &aObject);
	virtual ~MuscleAnalysis();

private:
	void setNull();
	void setupProperties();
	void constructDescription();
	void constructColumnLabels();

public:
	//--------------------------------------------------------------------------
	// OPERATORS
	//--------------------------------------------------------------------------
#ifndef SWIG
	MuscleAnalysis& operator=(const MuscleAnalysis &aMuscleAnalysis);
#endif
	//--------------------------------------------------------------------------
	// GET AND SET
	//--------------------------------------------------------------------------
	virtual void setModel(Model& aModel);
	void setStorageCapacityIncrements(int aIncrement);

    Storage* getPennationAngleStorage() const {
        return _pennationAngleStore; }
	Storage* getMuscleTendonLengthStorage() const {
        return _lengthStore; }
	Storage* getFiberLengthStorage() const {
        return _fiberLengthStore; }
	Storage* getNormalizedFiberLengthStorage() const {
        return _normalizedFiberLengthStore; }
	Storage* getTendonLengthStorage() const {
        return _tendonLengthStore; }

    Storage* getFiberVelocityStorage() const {
        return _fiberVelocityStore; }
    Storage* getNormalizedFiberVelocityStorage() const {
        return _normFiberVelocityStore; }
    Storage* getPennationAngularVelocityStorage() const {
        return _pennationAngularVelocityStore; }

	Storage* getForceStorage() const {
        return _forceStore; }
	Storage* getFiberForceStorage() const {
        return _fiberForceStore; }
	Storage* getActiveFiberForceStorage() const {
        return _activeFiberForceStore; }
	Storage* getPassiveFiberForceStorage() const {
        return _passiveFiberForceStore; }
	Storage* getActiveFiberForceAlongTendonStorage() const {
        return _activeFiberForceAlongTendonStore; }
	Storage* getPassiveFiberForceAlongTendonStorage() const {
        return _passiveFiberForceAlongTendonStore; }

    Storage* getFiberActivePowerStorage() const {
        return _fiberActivePowerStore; }
    Storage* getFiberPassivePowerStorage() const {
        return _fiberPassivePowerStore; }
    Storage* getTendonPowerStorage() const {
        return _tendonPowerStore; }
    Storage* getMusclePowerStorage() const {
        return _musclePowerStore; }

    void setMuscles(Array<std::string>& aMuscles);
	void setCoordinates(Array<std::string>& aCoordinates);

	void setComputeMoments(bool aTrueFalse) {
		_computeMoments = aTrueFalse;
	}
	bool getComputeMoments() const {
		return _computeMoments;
	}

	const ArrayPtrs<StorageCoordinatePair>& getMomentArmStorageArray() const { return _momentArmStorageArray; }

	//--------------------------------------------------------------------------
	// ANALYSIS
	//--------------------------------------------------------------------------
	virtual int
        begin( SimTK::State& s );
    virtual int
        step(const SimTK::State& s, int setNumber );
    virtual int
        end( SimTK::State& s );
protected:
    virtual int
        record(const SimTK::State& s );
	//--------------------------------------------------------------------------
	// IO
	//--------------------------------------------------------------------------
public:
	virtual int
		printResults(const std::string &aBaseName,const std::string &aDir="",
		double aDT=-1.0,const std::string &aExtension=".sto");
	/**
     * Intended for use only by GUI that holds one MuscleAnalysis and keeps changing attributes to generate various plots
     * For all other use cases, the code handles the allocation/deallocation of resources internally.
     */
 	void allocateStorageObjects();
//=============================================================================
};	// END of class MuscleAnalysis

}; //namespace
//=============================================================================
//=============================================================================

#endif // #ifndef __MuscleAnalysis_h__


text:
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <android.support.v4.widget.SwipeRefreshLayout
        android:id="@+id/swipeRefreshLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <android.support.v7.widget.RecyclerView
            android:id="@+id/recyclerView"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

    </android.support.v4.widget.SwipeRefreshLayout>

    <android.support.design.widget.FloatingActionButton
        android:id="@+id/place_picker_fab"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentEnd="true"
        android:layout_alignParentRight="true"
        android:layout_gravity="bottom|end"
        android:layout_margin="@dimen/fab_margin"
        android:src="@drawable/ic_place"
        android:tint="@color/app_white" />

</android.support.design.widget.CoordinatorLayout>


text:
from webiopi.devices.bus import Bus, UART_Bus
from webiopi.utils.types import toint, str2bool
from serial import Serial
from webiopi.utils.logger import debug

class UART_PYSERIAL(UART_Bus):
    def __init__(self, dev="", baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=0, xonxoff=False, rtscts=False, dsrdtr=False):
        self.port = dev
        self.baudrate = toint(baudrate)
        self.bytesize = toint(bytesize)
        self.parity = parity
        self.stopbits = toint(stopbits)
        self.timeout = toint(timeout)
        self.xonxoff = str2bool(xonxoff)
        self.rtscts = str2bool(rtscts)
        self.dsrdtr = str2bool(dsrdtr)
        Bus.__init__(self, "UART", "pyserial:%s" % dev, None)

    def __str__(self):
        return "UART_PYSERIAL(%s %dbps)" % (self.dev, self.baudrate)

#---------- Bus abstraction methods reimplementation ----------

    def open(self):
        debug("UART_PYSERIAL: Opening serial interface %s (baud=%d,bytesize=%d,parity=%s,stopbits=%d,timeout=%d,xonxoff=%s,rtscts=%s,dsrdtr=%s)" %
              (self.port, self.baudrate, self.bytesize, self.parity, self.stopbits, self.timeout, self.xonxoff, self.rtscts, self.dsrdtr))
        ser = Serial(port=self.port,
                     baudrate=self.baudrate,
                     bytesize=self.bytesize,
                     parity=self.parity,
                     stopbits=self.stopbits,
                     timeout=self.timeout,
                     xonxoff=self.xonxoff,
                     rtscts=self.rtscts,
                     dsrdtr=self.dsrdtr
                     )
        self.ser = ser

    def close(self):
        debug("UART_PYSERIAL: Closing serial interface %s" % self.ser.port)
        self.ser.close()

#---------- UART abstraction communication methods redirected to reading/writing using pySerial ----------

    def read(self, size=1):
        return self.ser.read(size)

    def write(self, data):
        self.ser.write(data)

    def available(self):
        return self.ser.in_waiting


text:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:soap1="http://mydomain.com/ws/soapheaders">
	<soap:Header>
		<soap1:locale>en_AU</soap1:locale>
	</soap:Header>
	<soap:Body>
		<Fault>
			<Detail>
				<MyServiceException>
					<ErrorCode>ABC</ErrorCode>
					<FaultString>Something bad happened</FaultString>
				</MyServiceException>
			</Detail>
		</Fault>
	</soap:Body>
</soap:Envelope>


text:
  349/B
  Batagama,North
  Jaela
  Western
  11325
  SL
  349/B,Jaela
  51.526421;-0.081067;25


text:
tpg
===

text base shit yo


text:
using ExtendedXmlSerializer.ContentModel;
using ExtendedXmlSerializer.ContentModel.Conversion;

namespace ExtendedXmlSerializer
{
	/// <summary>
	/// Extension methods that assist or enable functionality found within the content model namespace (
	/// <see cref="ContentModel"/>).
	/// </summary>
	public static class ExtensionMethodsForContentModel
	{
		/// <summary>
		/// Given a generalized serializer, create a type-specific serializer that handles the specified type.  This is
		/// typically used for simple casting to and from a general object type and should be handled with care as an
		/// incorrect type will throw errors.
		/// </summary>
		/// <typeparam name="T">The type to use for serialization.</typeparam>
		/// <param name="this">The this.</param>
		/// <returns>ISerializer<T>.</returns>
		public static ISerializer<T> For<T>(this ISerializer @this) => @this as ISerializer<T> ??
		                                                               new GeneralSerializerAdapter<T>(@this);

		/// <summary>
		/// Given a type-specific serializer, create a generalized serializer that serializes and deserializes in terms of a
		/// general <see cref="System.Object"/>.
		/// </summary>
		/// <typeparam name="T">The type that the given serializer uses.</typeparam>
		/// <param name="this">The serializer used to create a new serializer.</param>
		public static ISerializer Adapt<T>(this ISerializer<T> @this) => @this as ISerializer ??
		                                                                 new GenericSerializerAdapter<T>(@this);

		/// <summary>
		/// Given a type-specific writer, create a generalized writer that writers in terms of a general
		/// <see cref="System.Object"/>.
		/// </summary>
		/// <typeparam name="T">The type that the writer is used to write.</typeparam>
		/// <param name="this">The writer instance which to base the new writer.</param>
		/// <returns>The generalized writer.</returns>
		public static IWriter Adapt<T>(this IWriter<T> @this) => @this as IWriter ?? new GenericWriterAdapter<T>(@this);

		/// <summary>
		/// Given a struct-specific converter, creates its nullable equivalent.
		/// </summary>
		/// <typeparam name="T">The struct type of the converter.</typeparam>
		/// <param name="this">The converter upon which to base the new converter.</param>
		/// <returns>IConverter<System.Nullable<T>>.</returns>
		public static IConverter<T?> Structured<T>(this IConverter<T> @this) where T : struct
			=> new StructureConverter<T>(@this);

		/// <summary>
		/// Given a type-specific converter, create a generalized converter that serializes and deserializes in terms of a
		/// general <see cref="System.Object"/>.
		/// </summary>
		/// <typeparam name="T"></typeparam>
		/// <param name="this">The type-specific converter upon which to base the new generalized converter.</param>
		/// <returns>A generalized IConverter.</returns>
		public static IConverter Adapt<T>(this IConverter<T> @this) => new Converter<T>(@this.Parse, @this.Format);
	}
}


text:
/* *********************************************** */

// sBlog.Net

// sBlog.Net is a minimalistic blog engine software.

// Homepage: http://sblogproject.net
// Github: http://github.com/karthik25/sBlog.Net

// This project is licensed under the BSD license.
// See the License.txt file for more information.

/* *********************************************** */
$(document).ready(function () {
    $('.chkClickable').live('click', function () {
        $(this).next('.hdnStatus').val($(this).is(':checked'));
    });

    $('#btnAdd').click(function () {
        var text = $('#txtCat').val().trim();

        var regex = /\<[\S* ]*\>/;
        var alphaRegex = /[a-zA-Z]{1,}/;

        if (text.match(regex) != null) {
            showMessage('Category name entered is invalid');
            return;
        }

        if (text.match(alphaRegex) == null) {
            showMessage('Category name entered is invalid, should have at least 1 alphabet');
            return;
        }

        if (text != '' && !isPresent(text)) {
            if (text.length <= 50) {
                ajaxAdd(text);
            }
            else {
                showMessage('Category name cannot be more than 50 characters');
            }
        }
    });
});

function showMessage(message) {
    alert(message);
    $('#txtCat').val('').focus();
}

function isPresent(text) {
    var status = false;
    var elements = $("label[for^='chkBox_selectcategories_']");
    $(elements).each(function () {
        if ($(this).text() == text) {
            status = true;

            var currentTop = $(this).offset().top;
            var parentTop = $('.cpCheckBoxContent').position().top;
            $('.cpCheckBoxContent').scrollTop(currentTop - parentTop);

            $('#txtCat').val('');
        }
    });

    return status;
}

function ajaxAdd(text) {
    $.ajax({
        type: 'GET',
        url: '/Admin/CategoryAdmin/AddCategory',
        data: { 'categoryName': text },
        success: function (data) {
            if (data != null && data.CategoryID != 0) {
                addCategory(data.CategoryName, data.CategoryID);
                $(".cpCheckBoxContent").animate({ scrollTop: $(".cpCheckBoxContent").prop("scrollHeight") }, 1000);
            }
            $('#txtCat').val('');
        },
        error: function (req, status, err) {
            alert('an error occurred');
        }
    });
}

// create a new category
function addCategory(name, value) {
    var max = parseInt($("input[id^='valValue_selectcategories_']").last().attr('id').split('_')[2]) + 1;
    var element1 = document.createElement('input');
    $(element1).attr('id', 'valValue_selectcategories_' + max)
	           .attr('name', 'valValue_selectcategories_' + max)
	           .attr('type', 'hidden')
	           .attr('value', value);
    var element2 = document.createElement('input');
    $(element2).attr('id', 'chkBox_selectcategories_' + max)
	           .attr('name', 'chkBox_selectcategories_' + max)
	           .attr('type', 'checkbox')
	           .attr('class', 'chkClickable')
               .attr('checked', 'checked')
	           .attr('value', 'true');
    var element3 = document.createElement('input');
    $(element3).attr('id', 'hdnChk_selectcategories_' + max)
	           .attr('name', 'hdnChk_selectcategories_' + max)
	           .attr('type', 'hidden')
	           .attr('class', 'hdnStatus')
	           .attr('value', 'true');
    var element4 = document.createElement('label');
    $(element4).attr('for', 'chkBox_selectcategories_' + max);
    element4.innerHTML = " " + name;
    var element5 = document.createElement('input');
    $(element5).attr('id', 'lblLabel_selectcategories_' + max)
	           .attr('name', 'lblLabel_selectcategories_' + max)
	           .attr('type', 'hidden')
	           .attr('value', name);
    var element6 = document.createElement('br');
    $('.cpCheckBoxContent').append(element1)
	               .append(element2)
	               .append(element3)
                   .append(element4)
                   .append(element5)
                   .append(element6);
}


text:
/**
 * Autogenerated by Thrift Compiler (0.9.3)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package org.apache.hadoop.hive.metastore.api;

import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;

import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public class WMTrigger implements org.apache.thrift.TBase<WMTrigger, WMTrigger._Fields>, java.io.Serializable, Cloneable, Comparable<WMTrigger> {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("WMTrigger");

  private static final org.apache.thrift.protocol.TField RESOURCE_PLAN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("resourcePlanName", org.apache.thrift.protocol.TType.STRING, (short)1);
  private static final org.apache.thrift.protocol.TField TRIGGER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("triggerName", org.apache.thrift.protocol.TType.STRING, (short)2);
  private static final org.apache.thrift.protocol.TField TRIGGER_EXPRESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("triggerExpression", org.apache.thrift.protocol.TType.STRING, (short)3);
  private static final org.apache.thrift.protocol.TField ACTION_EXPRESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("actionExpression", org.apache.thrift.protocol.TType.STRING, (short)4);
  private static final org.apache.thrift.protocol.TField IS_IN_UNMANAGED_FIELD_DESC = new org.apache.thrift.protocol.TField("isInUnmanaged", org.apache.thrift.protocol.TType.BOOL, (short)5);
  private static final org.apache.thrift.protocol.TField NS_FIELD_DESC = new org.apache.thrift.protocol.TField("ns", org.apache.thrift.protocol.TType.STRING, (short)6);

  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
  static {
    schemes.put(StandardScheme.class, new WMTriggerStandardSchemeFactory());
    schemes.put(TupleScheme.class, new WMTriggerTupleSchemeFactory());
  }

  private String resourcePlanName; // required
  private String triggerName; // required
  private String triggerExpression; // optional
  private String actionExpression; // optional
  private boolean isInUnmanaged; // optional
  private String ns; // optional

  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
    RESOURCE_PLAN_NAME((short)1, "resourcePlanName"),
    TRIGGER_NAME((short)2, "triggerName"),
    TRIGGER_EXPRESSION((short)3, "triggerExpression"),
    ACTION_EXPRESSION((short)4, "actionExpression"),
    IS_IN_UNMANAGED((short)5, "isInUnmanaged"),
    NS((short)6, "ns");

    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

    static {
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
        byName.put(field.getFieldName(), field);
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, or null if its not found.
     */
    public static _Fields findByThriftId(int fieldId) {
      switch(fieldId) {
        case 1: // RESOURCE_PLAN_NAME
          return RESOURCE_PLAN_NAME;
        case 2: // TRIGGER_NAME
          return TRIGGER_NAME;
        case 3: // TRIGGER_EXPRESSION
          return TRIGGER_EXPRESSION;
        case 4: // ACTION_EXPRESSION
          return ACTION_EXPRESSION;
        case 5: // IS_IN_UNMANAGED
          return IS_IN_UNMANAGED;
        case 6: // NS
          return NS;
        default:
          return null;
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, throwing an exception
     * if it is not found.
     */
    public static _Fields findByThriftIdOrThrow(int fieldId) {
      _Fields fields = findByThriftId(fieldId);
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
      return fields;
    }

    /**
     * Find the _Fields constant that matches name, or null if its not found.
     */
    public static _Fields findByName(String name) {
      return byName.get(name);
    }

    private final short _thriftId;
    private final String _fieldName;

    _Fields(short thriftId, String fieldName) {
      _thriftId = thriftId;
      _fieldName = fieldName;
    }

    public short getThriftFieldId() {
      return _thriftId;
    }

    public String getFieldName() {
      return _fieldName;
    }
  }

  // isset id assignments
  private static final int __ISINUNMANAGED_ISSET_ID = 0;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.TRIGGER_EXPRESSION,_Fields.ACTION_EXPRESSION,_Fields.IS_IN_UNMANAGED,_Fields.NS};
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
  static {
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
    tmpMap.put(_Fields.RESOURCE_PLAN_NAME, new org.apache.thrift.meta_data.FieldMetaData("resourcePlanName", org.apache.thrift.TFieldRequirementType.REQUIRED,
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.TRIGGER_NAME, new org.apache.thrift.meta_data.FieldMetaData("triggerName", org.apache.thrift.TFieldRequirementType.REQUIRED,
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.TRIGGER_EXPRESSION, new org.apache.thrift.meta_data.FieldMetaData("triggerExpression", org.apache.thrift.TFieldRequirementType.OPTIONAL,
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.ACTION_EXPRESSION, new org.apache.thrift.meta_data.FieldMetaData("actionExpression", org.apache.thrift.TFieldRequirementType.OPTIONAL,
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.IS_IN_UNMANAGED, new org.apache.thrift.meta_data.FieldMetaData("isInUnmanaged", org.apache.thrift.TFieldRequirementType.OPTIONAL,
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.NS, new org.apache.thrift.meta_data.FieldMetaData("ns", org.apache.thrift.TFieldRequirementType.OPTIONAL,
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    metaDataMap = Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WMTrigger.class, metaDataMap);
  }

  public WMTrigger() {
  }

  public WMTrigger(
    String resourcePlanName,
    String triggerName)
  {
    this();
    this.resourcePlanName = resourcePlanName;
    this.triggerName = triggerName;
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public WMTrigger(WMTrigger other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetResourcePlanName()) {
      this.resourcePlanName = other.resourcePlanName;
    }
    if (other.isSetTriggerName()) {
      this.triggerName = other.triggerName;
    }
    if (other.isSetTriggerExpression()) {
      this.triggerExpression = other.triggerExpression;
    }
    if (other.isSetActionExpression()) {
      this.actionExpression = other.actionExpression;
    }
    this.isInUnmanaged = other.isInUnmanaged;
    if (other.isSetNs()) {
      this.ns = other.ns;
    }
  }

  public WMTrigger deepCopy() {
    return new WMTrigger(this);
  }

  @Override
  public void clear() {
    this.resourcePlanName = null;
    this.triggerName = null;
    this.triggerExpression = null;
    this.actionExpression = null;
    setIsInUnmanagedIsSet(false);
    this.isInUnmanaged = false;
    this.ns = null;
  }

  public String getResourcePlanName() {
    return this.resourcePlanName;
  }

  public void setResourcePlanName(String resourcePlanName) {
    this.resourcePlanName = resourcePlanName;
  }

  public void unsetResourcePlanName() {
    this.resourcePlanName = null;
  }

  /** Returns true if field resourcePlanName is set (has been assigned a value) and false otherwise */
  public boolean isSetResourcePlanName() {
    return this.resourcePlanName != null;
  }

  public void setResourcePlanNameIsSet(boolean value) {
    if (!value) {
      this.resourcePlanName = null;
    }
  }

  public String getTriggerName() {
    return this.triggerName;
  }

  public void setTriggerName(String triggerName) {
    this.triggerName = triggerName;
  }

  public void unsetTriggerName() {
    this.triggerName = null;
  }

  /** Returns true if field triggerName is set (has been assigned a value) and false otherwise */
  public boolean isSetTriggerName() {
    return this.triggerName != null;
  }

  public void setTriggerNameIsSet(boolean value) {
    if (!value) {
      this.triggerName = null;
    }
  }

  public String getTriggerExpression() {
    return this.triggerExpression;
  }

  public void setTriggerExpression(String triggerExpression) {
    this.triggerExpression = triggerExpression;
  }

  public void unsetTriggerExpression() {
    this.triggerExpression = null;
  }

  /** Returns true if field triggerExpression is set (has been assigned a value) and false otherwise */
  public boolean isSetTriggerExpression() {
    return this.triggerExpression != null;
  }

  public void setTriggerExpressionIsSet(boolean value) {
    if (!value) {
      this.triggerExpression = null;
    }
  }

  public String getActionExpression() {
    return this.actionExpression;
  }

  public void setActionExpression(String actionExpression) {
    this.actionExpression = actionExpression;
  }

  public void unsetActionExpression() {
    this.actionExpression = null;
  }

  /** Returns true if field actionExpression is set (has been assigned a value) and false otherwise */
  public boolean isSetActionExpression() {
    return this.actionExpression != null;
  }

  public void setActionExpressionIsSet(boolean value) {
    if (!value) {
      this.actionExpression = null;
    }
  }

  public boolean isIsInUnmanaged() {
    return this.isInUnmanaged;
  }

  public void setIsInUnmanaged(boolean isInUnmanaged) {
    this.isInUnmanaged = isInUnmanaged;
    setIsInUnmanagedIsSet(true);
  }

  public void unsetIsInUnmanaged() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISINUNMANAGED_ISSET_ID);
  }

  /** Returns true if field isInUnmanaged is set (has been assigned a value) and false otherwise */
  public boolean isSetIsInUnmanaged() {
    return EncodingUtils.testBit(__isset_bitfield, __ISINUNMANAGED_ISSET_ID);
  }

  public void setIsInUnmanagedIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISINUNMANAGED_ISSET_ID, value);
  }

  public String getNs() {
    return this.ns;
  }

  public void setNs(String ns) {
    this.ns = ns;
  }

  public void unsetNs() {
    this.ns = null;
  }

  /** Returns true if field ns is set (has been assigned a value) and false otherwise */
  public boolean isSetNs() {
    return this.ns != null;
  }

  public void setNsIsSet(boolean value) {
    if (!value) {
      this.ns = null;
    }
  }

  public void setFieldValue(_Fields field, Object value) {
    switch (field) {
    case RESOURCE_PLAN_NAME:
      if (value == null) {
        unsetResourcePlanName();
      } else {
        setResourcePlanName((String)value);
      }
      break;

    case TRIGGER_NAME:
      if (value == null) {
        unsetTriggerName();
      } else {
        setTriggerName((String)value);
      }
      break;

    case TRIGGER_EXPRESSION:
      if (value == null) {
        unsetTriggerExpression();
      } else {
        setTriggerExpression((String)value);
      }
      break;

    case ACTION_EXPRESSION:
      if (value == null) {
        unsetActionExpression();
      } else {
        setActionExpression((String)value);
      }
      break;

    case IS_IN_UNMANAGED:
      if (value == null) {
        unsetIsInUnmanaged();
      } else {
        setIsInUnmanaged((Boolean)value);
      }
      break;

    case NS:
      if (value == null) {
        unsetNs();
      } else {
        setNs((String)value);
      }
      break;

    }
  }

  public Object getFieldValue(_Fields field) {
    switch (field) {
    case RESOURCE_PLAN_NAME:
      return getResourcePlanName();

    case TRIGGER_NAME:
      return getTriggerName();

    case TRIGGER_EXPRESSION:
      return getTriggerExpression();

    case ACTION_EXPRESSION:
      return getActionExpression();

    case IS_IN_UNMANAGED:
      return isIsInUnmanaged();

    case NS:
      return getNs();

    }
    throw new IllegalStateException();
  }

  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
  public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case RESOURCE_PLAN_NAME:
      return isSetResourcePlanName();
    case TRIGGER_NAME:
      return isSetTriggerName();
    case TRIGGER_EXPRESSION:
      return isSetTriggerExpression();
    case ACTION_EXPRESSION:
      return isSetActionExpression();
    case IS_IN_UNMANAGED:
      return isSetIsInUnmanaged();
    case NS:
      return isSetNs();
    }
    throw new IllegalStateException();
  }

  @Override
  public boolean equals(Object that) {
    if (that == null)
      return false;
    if (that instanceof WMTrigger)
      return this.equals((WMTrigger)that);
    return false;
  }

  public boolean equals(WMTrigger that) {
    if (that == null)
      return false;

    boolean this_present_resourcePlanName = true && this.isSetResourcePlanName();
    boolean that_present_resourcePlanName = true && that.isSetResourcePlanName();
    if (this_present_resourcePlanName || that_present_resourcePlanName) {
      if (!(this_present_resourcePlanName && that_present_resourcePlanName))
        return false;
      if (!this.resourcePlanName.equals(that.resourcePlanName))
        return false;
    }

    boolean this_present_triggerName = true && this.isSetTriggerName();
    boolean that_present_triggerName = true && that.isSetTriggerName();
    if (this_present_triggerName || that_present_triggerName) {
      if (!(this_present_triggerName && that_present_triggerName))
        return false;
      if (!this.triggerName.equals(that.triggerName))
        return false;
    }

    boolean this_present_triggerExpression = true && this.isSetTriggerExpression();
    boolean that_present_triggerExpression = true && that.isSetTriggerExpression();
    if (this_present_triggerExpression || that_present_triggerExpression) {
      if (!(this_present_triggerExpression && that_present_triggerExpression))
        return false;
      if (!this.triggerExpression.equals(that.triggerExpression))
        return false;
    }

    boolean this_present_actionExpression = true && this.isSetActionExpression();
    boolean that_present_actionExpression = true && that.isSetActionExpression();
    if (this_present_actionExpression || that_present_actionExpression) {
      if (!(this_present_actionExpression && that_present_actionExpression))
        return false;
      if (!this.actionExpression.equals(that.actionExpression))
        return false;
    }

    boolean this_present_isInUnmanaged = true && this.isSetIsInUnmanaged();
    boolean that_present_isInUnmanaged = true && that.isSetIsInUnmanaged();
    if (this_present_isInUnmanaged || that_present_isInUnmanaged) {
      if (!(this_present_isInUnmanaged && that_present_isInUnmanaged))
        return false;
      if (this.isInUnmanaged != that.isInUnmanaged)
        return false;
    }

    boolean this_present_ns = true && this.isSetNs();
    boolean that_present_ns = true && that.isSetNs();
    if (this_present_ns || that_present_ns) {
      if (!(this_present_ns && that_present_ns))
        return false;
      if (!this.ns.equals(that.ns))
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    List<Object> list = new ArrayList<Object>();

    boolean present_resourcePlanName = true && (isSetResourcePlanName());
    list.add(present_resourcePlanName);
    if (present_resourcePlanName)
      list.add(resourcePlanName);

    boolean present_triggerName = true && (isSetTriggerName());
    list.add(present_triggerName);
    if (present_triggerName)
      list.add(triggerName);

    boolean present_triggerExpression = true && (isSetTriggerExpression());
    list.add(present_triggerExpression);
    if (present_triggerExpression)
      list.add(triggerExpression);

    boolean present_actionExpression = true && (isSetActionExpression());
    list.add(present_actionExpression);
    if (present_actionExpression)
      list.add(actionExpression);

    boolean present_isInUnmanaged = true && (isSetIsInUnmanaged());
    list.add(present_isInUnmanaged);
    if (present_isInUnmanaged)
      list.add(isInUnmanaged);

    boolean present_ns = true && (isSetNs());
    list.add(present_ns);
    if (present_ns)
      list.add(ns);

    return list.hashCode();
  }

  @Override
  public int compareTo(WMTrigger other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetResourcePlanName()).compareTo(other.isSetResourcePlanName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetResourcePlanName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resourcePlanName, other.resourcePlanName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTriggerName()).compareTo(other.isSetTriggerName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTriggerName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.triggerName, other.triggerName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTriggerExpression()).compareTo(other.isSetTriggerExpression());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTriggerExpression()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.triggerExpression, other.triggerExpression);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetActionExpression()).compareTo(other.isSetActionExpression());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetActionExpression()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.actionExpression, other.actionExpression);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetIsInUnmanaged()).compareTo(other.isSetIsInUnmanaged());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIsInUnmanaged()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isInUnmanaged, other.isInUnmanaged);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetNs()).compareTo(other.isSetNs());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetNs()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ns, other.ns);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }

  public _Fields fieldForId(int fieldId) {
    return _Fields.findByThriftId(fieldId);
  }

  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
  }

  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder("WMTrigger(");
    boolean first = true;

    sb.append("resourcePlanName:");
    if (this.resourcePlanName == null) {
      sb.append("null");
    } else {
      sb.append(this.resourcePlanName);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("triggerName:");
    if (this.triggerName == null) {
      sb.append("null");
    } else {
      sb.append(this.triggerName);
    }
    first = false;
    if (isSetTriggerExpression()) {
      if (!first) sb.append(", ");
      sb.append("triggerExpression:");
      if (this.triggerExpression == null) {
        sb.append("null");
      } else {
        sb.append(this.triggerExpression);
      }
      first = false;
    }
    if (isSetActionExpression()) {
      if (!first) sb.append(", ");
      sb.append("actionExpression:");
      if (this.actionExpression == null) {
        sb.append("null");
      } else {
        sb.append(this.actionExpression);
      }
      first = false;
    }
    if (isSetIsInUnmanaged()) {
      if (!first) sb.append(", ");
      sb.append("isInUnmanaged:");
      sb.append(this.isInUnmanaged);
      first = false;
    }
    if (isSetNs()) {
      if (!first) sb.append(", ");
      sb.append("ns:");
      if (this.ns == null) {
        sb.append("null");
      } else {
        sb.append(this.ns);
      }
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    if (!isSetResourcePlanName()) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'resourcePlanName' is unset! Struct:" + toString());
    }

    if (!isSetTriggerName()) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'triggerName' is unset! Struct:" + toString());
    }

    // check for sub-struct validity
  }

  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
    try {
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
    try {
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
      __isset_bitfield = 0;
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private static class WMTriggerStandardSchemeFactory implements SchemeFactory {
    public WMTriggerStandardScheme getScheme() {
      return new WMTriggerStandardScheme();
    }
  }

  private static class WMTriggerStandardScheme extends StandardScheme<WMTrigger> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, WMTrigger struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField schemeField;
      iprot.readStructBegin();
      while (true)
      {
        schemeField = iprot.readFieldBegin();
        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
          break;
        }
        switch (schemeField.id) {
          case 1: // RESOURCE_PLAN_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.resourcePlanName = iprot.readString();
              struct.setResourcePlanNameIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // TRIGGER_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.triggerName = iprot.readString();
              struct.setTriggerNameIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // TRIGGER_EXPRESSION
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.triggerExpression = iprot.readString();
              struct.setTriggerExpressionIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // ACTION_EXPRESSION
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.actionExpression = iprot.readString();
              struct.setActionExpressionIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // IS_IN_UNMANAGED
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.isInUnmanaged = iprot.readBool();
              struct.setIsInUnmanagedIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // NS
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.ns = iprot.readString();
              struct.setNsIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      struct.validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot, WMTrigger struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.resourcePlanName != null) {
        oprot.writeFieldBegin(RESOURCE_PLAN_NAME_FIELD_DESC);
        oprot.writeString(struct.resourcePlanName);
        oprot.writeFieldEnd();
      }
      if (struct.triggerName != null) {
        oprot.writeFieldBegin(TRIGGER_NAME_FIELD_DESC);
        oprot.writeString(struct.triggerName);
        oprot.writeFieldEnd();
      }
      if (struct.triggerExpression != null) {
        if (struct.isSetTriggerExpression()) {
          oprot.writeFieldBegin(TRIGGER_EXPRESSION_FIELD_DESC);
          oprot.writeString(struct.triggerExpression);
          oprot.writeFieldEnd();
        }
      }
      if (struct.actionExpression != null) {
        if (struct.isSetActionExpression()) {
          oprot.writeFieldBegin(ACTION_EXPRESSION_FIELD_DESC);
          oprot.writeString(struct.actionExpression);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetIsInUnmanaged()) {
        oprot.writeFieldBegin(IS_IN_UNMANAGED_FIELD_DESC);
        oprot.writeBool(struct.isInUnmanaged);
        oprot.writeFieldEnd();
      }
      if (struct.ns != null) {
        if (struct.isSetNs()) {
          oprot.writeFieldBegin(NS_FIELD_DESC);
          oprot.writeString(struct.ns);
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

  private static class WMTriggerTupleSchemeFactory implements SchemeFactory {
    public WMTriggerTupleScheme getScheme() {
      return new WMTriggerTupleScheme();
    }
  }

  private static class WMTriggerTupleScheme extends TupleScheme<WMTrigger> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, WMTrigger struct) throws org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      oprot.writeString(struct.resourcePlanName);
      oprot.writeString(struct.triggerName);
      BitSet optionals = new BitSet();
      if (struct.isSetTriggerExpression()) {
        optionals.set(0);
      }
      if (struct.isSetActionExpression()) {
        optionals.set(1);
      }
      if (struct.isSetIsInUnmanaged()) {
        optionals.set(2);
      }
      if (struct.isSetNs()) {
        optionals.set(3);
      }
      oprot.writeBitSet(optionals, 4);
      if (struct.isSetTriggerExpression()) {
        oprot.writeString(struct.triggerExpression);
      }
      if (struct.isSetActionExpression()) {
        oprot.writeString(struct.actionExpression);
      }
      if (struct.isSetIsInUnmanaged()) {
        oprot.writeBool(struct.isInUnmanaged);
      }
      if (struct.isSetNs()) {
        oprot.writeString(struct.ns);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, WMTrigger struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      struct.resourcePlanName = iprot.readString();
      struct.setResourcePlanNameIsSet(true);
      struct.triggerName = iprot.readString();
      struct.setTriggerNameIsSet(true);
      BitSet incoming = iprot.readBitSet(4);
      if (incoming.get(0)) {
        struct.triggerExpression = iprot.readString();
        struct.setTriggerExpressionIsSet(true);
      }
      if (incoming.get(1)) {
        struct.actionExpression = iprot.readString();
        struct.setActionExpressionIsSet(true);
      }
      if (incoming.get(2)) {
        struct.isInUnmanaged = iprot.readBool();
        struct.setIsInUnmanagedIsSet(true);
      }
      if (incoming.get(3)) {
        struct.ns = iprot.readString();
        struct.setNsIsSet(true);
      }
    }
  }

}


text:
require_relative 'database/export'
require_relative 'configuration'
require_relative 'converters/contentful_model_to_json'

class Migrator

  attr_reader :exporter, :config, :converter

  def initialize(settings)
    @config = Contentful::Configuration.new(settings)
    @exporter = Contentful::Exporter::Database::Export.new(config)
    @converter = Contentful::Converter::ContentfulModelToJson.new(config)
  end

  def run(action)
    case action.to_s
      when '--extract-to-json'
        exporter.save_data_as_json
      when '--create-content-model-from-json'
        converter.create_content_type_json
      when '--prepare-json'
        exporter.create_data_relations
      when '--list-tables'
        exporter.tables_name
      when '--convert-content-model-to-json'
        converter.convert_to_import_form
    end
  end
end


text:
app.controller("AppCtrl", function($http){
  var app = this;
  $http.get("js/data.json")
    .success(function (data) {
      app.customers = data;
    });
});